Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-22 10:55:51 +0200
committerErich Eckner <git@eckner.net>2018-05-31 16:09:42 +0200
commit4a577c242cc01e686d575a079830b277b0f54da5 (patch)
treebfea68b06d163a4fa8508fb01850f6f74aee0ffd
parent52b58b0f8e1a4ccde39b6ce1f41167d8a22d093f (diff)
separate mirrorlist for i686 and x86_64
-rw-r--r--Makefile1
-rw-r--r--arch-nspawn.in26
-rw-r--r--archbuild.in10
-rw-r--r--pacman-staging-i686.conf99
4 files changed, 131 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 19fb191..2d00308 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@ CONFIGFILES = \
pacman-extra.conf \
pacman-testing.conf \
pacman-staging.conf \
+ pacman-staging-i686.conf \
pacman-multilib.conf \
pacman-multilib-testing.conf \
pacman-multilib-staging.conf \
diff --git a/arch-nspawn.in b/arch-nspawn.in
index 56e75eb..8a3989e 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -58,10 +58,29 @@ else
cache_dirs=("$cache_dir")
fi
+if [[ -n $makepkg_conf ]]; then
+ eval "$(grep -a '^CARCH=' "$makepkg_conf")"
+else
+ eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")"
+fi
+
pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
+if [[ "$CARCH" = 'i'*'86' ]]; then
+ host_mirror="$(
+ sed -n '
+ /^\s*Server\s*=/{
+ s/^.*=\s*//
+ s/\s*\(#.*\)\?$//
+ p
+ q
+ }' \
+ '/etc/pacman.d/mirrorlist32'
+ )"
+else
# shellcheck disable=2016
-host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | head -1 | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#;s#(.*/)[^/]+/extra/[^/]+#\1$arch/$repo#')
+ host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | head -1 | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#;s#(.*/)[^/]+/extra/[^/]+#\1$arch/$repo#')
# shellcheck disable=2016
+fi
[[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
# {{{ functions
@@ -81,7 +100,9 @@ build_mount_args() {
copy_hostconf () {
cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d"
- echo "Server = $host_mirror" >"$working_dir/etc/pacman.d/mirrorlist"
+ echo "Server = $host_mirror" | \
+ tee "$working_dir/etc/pacman.d/mirrorlist" > \
+ "$working_dir/etc/pacman.d/mirrorlist32"
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
[[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"
@@ -93,7 +114,6 @@ copy_hostconf () {
done
sed -r "s|^#?\\s*CacheDir.+|CacheDir = ${cache_dirs[*]}|g" -i "$working_dir/etc/pacman.conf"
- eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")"
sed -i '/^Architecture = /s| auto$| '"$CARCH|" "$working_dir/etc/pacman.conf"
}
# }}}
diff --git a/archbuild.in b/archbuild.in
index 0a84687..4194b68 100644
--- a/archbuild.in
+++ b/archbuild.in
@@ -11,11 +11,17 @@ cmd="${0##*/}"
if [[ "${cmd%%-*}" == 'multilib' ]]; then
repo="${cmd%-build}"
arch='x86_64'
+ arch_ext=''
base_packages+=(multilib-devel)
else
tag="${cmd%-build}"
repo=${tag%-*}
arch=${tag##*-}
+ if [ "${arch}" = 'x86_64' ]; then
+ arch_ext=''
+ else
+ arch_ext="-${arch}"
+ fi
fi
chroots='/var/lib/archbuild'
clean_first=false
@@ -69,7 +75,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
rm -rf --one-file-system "${chroots}/${repo}-${arch}"
mkdir -p "${chroots}/${repo}-${arch}"
setarch "${arch}" mkarchroot \
- -C "@pkgdatadir@/pacman-${repo}.conf" \
+ -C "@pkgdatadir@/pacman-${repo}${arch_ext}.conf" \
-M "@pkgdatadir@/makepkg-${arch}.conf" \
${cache_dir} \
"${chroots}/${repo}-${arch}/root" \
@@ -77,7 +83,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
else
lock 9 "${chroots}/${repo}-${arch}/root.lock" "Locking clean chroot"
arch-nspawn \
- -C "@pkgdatadir@/pacman-${repo}.conf" \
+ -C "@pkgdatadir@/pacman-${repo}${arch_ext}.conf" \
-M "@pkgdatadir@/makepkg-${arch}.conf" \
${cache_dir} \
"${chroots}/${repo}-${arch}/root" \
diff --git a/pacman-staging-i686.conf b/pacman-staging-i686.conf
new file mode 100644
index 0000000..540c5f7
--- /dev/null
+++ b/pacman-staging-i686.conf
@@ -0,0 +1,99 @@
+#
+# /etc/pacman.conf
+#
+# See the pacman.conf(5) manpage for option and repository directives
+
+#
+# GENERAL OPTIONS
+#
+[options]
+# The following paths are commented out with their default values listed.
+# If you wish to use different paths, uncomment and update the paths.
+#RootDir = /
+#DBPath = /var/lib/pacman/
+#CacheDir = /var/cache/pacman/pkg/
+#LogFile = /var/log/pacman.log
+#GPGDir = /etc/pacman.d/gnupg/
+#HookDir = /etc/pacman.d/hooks/
+HoldPkg = pacman glibc
+#XferCommand = /usr/bin/curl -C - -f %u > %o
+#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
+#CleanMethod = KeepInstalled
+#UseDelta = 0.7
+Architecture = auto
+
+# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
+#IgnorePkg =
+#IgnoreGroup =
+
+#NoUpgrade =
+#NoExtract =
+
+# Misc options
+#UseSyslog
+#Color
+#TotalDownload
+# We cannot check disk space from within a chroot environment
+#CheckSpace
+#VerbosePkgLists
+
+# By default, pacman accepts packages signed by keys that its local keyring
+# trusts (see pacman-key and its man page), as well as unsigned packages.
+SigLevel = Required DatabaseOptional
+LocalFileSigLevel = Optional
+#RemoteFileSigLevel = Required
+
+# NOTE: You must run `pacman-key --init` before first using pacman; the local
+# keyring can then be populated with the keys of all official Arch Linux
+# packagers with `pacman-key --populate archlinux`.
+
+#
+# REPOSITORIES
+# - can be defined here or included from another file
+# - pacman will search repositories in the order defined here
+# - local/custom mirrors can be added here or in separate files
+# - repositories listed first will take precedence when packages
+# have identical names, regardless of version number
+# - URLs will have $repo replaced by the name of the current repo
+# - URLs will have $arch replaced by the name of the architecture
+#
+# Repository entries are of the format:
+# [repo-name]
+# Server = ServerName
+# Include = IncludePath
+#
+# The header [repo-name] is crucial - it must be present and
+# uncommented to enable the repo.
+#
+
+# The testing repositories are disabled by default. To enable, uncomment the
+# repo name header and Include lines. You can add preferred servers immediately
+# after the header, and they will be used before the default mirrors.
+
+[staging]
+Include = /etc/pacman.d/mirrorlist32
+
+[testing]
+Include = /etc/pacman.d/mirrorlist32
+
+[core]
+Include = /etc/pacman.d/mirrorlist32
+
+[extra]
+Include = /etc/pacman.d/mirrorlist32
+
+[community-staging]
+Include = /etc/pacman.d/mirrorlist32
+
+[community-testing]
+Include = /etc/pacman.d/mirrorlist32
+
+[community]
+Include = /etc/pacman.d/mirrorlist32
+
+# An example of a custom package repository. See the pacman manpage for
+# tips on creating your own repositories.
+#[custom]
+#SigLevel = Optional TrustAll
+#Server = file:///home/custompkgs
+