From 7b095250030dd85684226a6191d739d2f04424a3 Mon Sep 17 00:00:00 2001 From: Morten Linderud Date: Fri, 21 Dec 2018 23:06:18 +0100 Subject: Expand check_root keepenv variables Les us source makepkg.conf settings from the environemnt. This also includes `GNUPGHOME` which is present in `makechrootpkg`, but not included in archbuild. Signed-off-by: Morten Linderud --- archbuild.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archbuild.in') diff --git a/archbuild.in b/archbuild.in index 1e5b582..bd5706d 100644 --- a/archbuild.in +++ b/archbuild.in @@ -39,7 +39,7 @@ while getopts 'hcr:' arg; do esac done -check_root SOURCE_DATE_EPOCH +check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME # Pass all arguments after -- right to makepkg makechrootpkg_args+=("${@:$OPTIND}") -- cgit v1.2.3-54-g00ecf From b855f188d07765aa16fa4e1872bf408269c0d205 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 27 Jun 2018 10:44:15 +0200 Subject: fix whitespace errors --- archbuild.in | 2 +- find-libdeps.in | 2 +- mkarchroot.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'archbuild.in') diff --git a/archbuild.in b/archbuild.in index bd5706d..163a108 100644 --- a/archbuild.in +++ b/archbuild.in @@ -71,7 +71,7 @@ else -C "@pkgdatadir@/pacman-${repo}.conf" \ -M "@pkgdatadir@/makepkg-${arch}.conf" \ "${chroots}/${repo}-${arch}/root" \ - pacman -Syu --noconfirm || abort + pacman -Syu --noconfirm || abort fi # Always build official packages reproducibly diff --git a/find-libdeps.in b/find-libdeps.in index ce92a4e..7a3e6f5 100644 --- a/find-libdeps.in +++ b/find-libdeps.in @@ -57,7 +57,7 @@ process_sofile() { case $script_mode in deps) find_args=(-perm -u+x);; - provides) find_args=(-name '*.so*');; + provides) find_args=(-name '*.so*');; esac find . -type f "${find_args[@]}" | while read -r filename; do diff --git a/mkarchroot.in b/mkarchroot.in index 5983abc..a916f2a 100644 --- a/mkarchroot.in +++ b/mkarchroot.in @@ -84,7 +84,7 @@ while read -r varname; do done < <(declare -x | sed -r 's/^declare -x ([^=]*)=.*/\1/' | grep -i '_proxy$') env -i "${_env[@]}" \ pacstrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \ - "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages' + "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages' printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen" cat '/etc/hosts' > "$working_dir/etc/hosts" -- cgit v1.2.3-54-g00ecf From 4b8cf1e2411b828249c32e9f9643e027e0bfca44 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 22 Jun 2017 10:55:51 +0200 Subject: separate mirrorlist for i686 and x86_64 --- Makefile | 5 +++ arch-nspawn.in | 29 +++++++++--- archbuild.in | 10 ++++- pacman-extra-32.conf | 93 ++++++++++++++++++++++++++++++++++++++ pacman-gnome-unstable-32.conf | 102 ++++++++++++++++++++++++++++++++++++++++++ pacman-kde-unstable-32.conf | 96 +++++++++++++++++++++++++++++++++++++++ pacman-staging-32.conf | 99 ++++++++++++++++++++++++++++++++++++++++ pacman-testing-32.conf | 93 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 520 insertions(+), 7 deletions(-) create mode 100644 pacman-extra-32.conf create mode 100644 pacman-gnome-unstable-32.conf create mode 100644 pacman-kde-unstable-32.conf create mode 100644 pacman-staging-32.conf create mode 100644 pacman-testing-32.conf (limited to 'archbuild.in') diff --git a/Makefile b/Makefile index e812936..4bb8d9c 100644 --- a/Makefile +++ b/Makefile @@ -21,13 +21,18 @@ BINPROGS = \ CONFIGFILES = \ makepkg-x86_64.conf \ + pacman-extra-32.conf \ pacman-extra.conf \ + pacman-testing-32.conf \ pacman-testing.conf \ + pacman-staging-32.conf \ pacman-staging.conf \ pacman-multilib.conf \ pacman-multilib-testing.conf \ pacman-multilib-staging.conf \ + pacman-kde-unstable-32.conf \ pacman-kde-unstable.conf \ + pacman-gnome-unstable-32.conf \ pacman-gnome-unstable.conf COMMITPKG_LINKS = \ diff --git a/arch-nspawn.in b/arch-nspawn.in index b9c846e..a5e1957 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -58,9 +58,28 @@ 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) -# shellcheck disable=2016 -host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | head -1 | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#') +if [[ ! "$CARCH" = 'x86_64' ]]; 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#') +fi # shellcheck disable=2016 [[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g') @@ -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" @@ -108,8 +129,6 @@ fi build_mount_args copy_hostconf -eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")" - [[ -z $nosetarch ]] || unset CARCH exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \ diff --git a/archbuild.in b/archbuild.in index 163a108..645fb9c 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="-32" + fi fi chroots='/var/lib/archbuild' clean_first=false @@ -61,14 +67,14 @@ 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" \ "${chroots}/${repo}-${arch}/root" \ "${base_packages[@]}" || abort 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" \ "${chroots}/${repo}-${arch}/root" \ pacman -Syu --noconfirm || abort diff --git a/pacman-extra-32.conf b/pacman-extra-32.conf new file mode 100644 index 0000000..bf9ac67 --- /dev/null +++ b/pacman-extra-32.conf @@ -0,0 +1,93 @@ +# +# /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. + +#[testing] +#Include = /etc/pacman.d/mirrorlist + +[core] +Include = /etc/pacman.d/mirrorlist32 + +[extra] +Include = /etc/pacman.d/mirrorlist32 + +#[community-testing] +#Include = /etc/pacman.d/mirrorlist + +[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 + diff --git a/pacman-gnome-unstable-32.conf b/pacman-gnome-unstable-32.conf new file mode 100644 index 0000000..e558e22 --- /dev/null +++ b/pacman-gnome-unstable-32.conf @@ -0,0 +1,102 @@ +# +# /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. + +[gnome-unstable] +Include = /etc/pacman.d/mirrorlist32 + +[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 + diff --git a/pacman-kde-unstable-32.conf b/pacman-kde-unstable-32.conf new file mode 100644 index 0000000..4f82881 --- /dev/null +++ b/pacman-kde-unstable-32.conf @@ -0,0 +1,96 @@ +# +# /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. + +[kde-unstable] +Include = /etc/pacman.d/mirrorlist32 + +[testing] +Include = /etc/pacman.d/mirrorlist32 + +[core] +Include = /etc/pacman.d/mirrorlist32 + +[extra] +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 + diff --git a/pacman-staging-32.conf b/pacman-staging-32.conf new file mode 100644 index 0000000..540c5f7 --- /dev/null +++ b/pacman-staging-32.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 + diff --git a/pacman-testing-32.conf b/pacman-testing-32.conf new file mode 100644 index 0000000..5775f94 --- /dev/null +++ b/pacman-testing-32.conf @@ -0,0 +1,93 @@ +# +# /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. + +[testing] +Include = /etc/pacman.d/mirrorlist32 + +[core] +Include = /etc/pacman.d/mirrorlist32 + +[extra] +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 + -- cgit v1.2.3-54-g00ecf From 0b416e77f24dff58aca2b5bd625697493008e036 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 16 Jun 2017 17:17:19 +0200 Subject: archbuild.in: set pacman cache dir to /var/cache/archbuild32 in case of non-x86_64-build, so we do not use any-packages from x86_64 mirrors, and cross-mount inside to /var/cache/pacman/pkg --- archbuild.in | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'archbuild.in') diff --git a/archbuild.in b/archbuild.in index 645fb9c..2c5aca5 100644 --- a/archbuild.in +++ b/archbuild.in @@ -47,6 +47,14 @@ done check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME +if [ "${arch}" = "x86_64" ]; then + cache_dir='' +else + mkdir -p '/var/cache/archbuild32' + cache_dir='-c/var/cache/archbuild32' + makechrootpkg_args+=('-d/var/cache/archbuild32:/var/cache/pacman/pkg') +fi + # Pass all arguments after -- right to makepkg makechrootpkg_args+=("${@:$OPTIND}") @@ -69,6 +77,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then setarch "${arch}" mkarchroot \ -C "@pkgdatadir@/pacman-${repo}${arch_ext}.conf" \ -M "@pkgdatadir@/makepkg-${arch}.conf" \ + ${cache_dir} \ "${chroots}/${repo}-${arch}/root" \ "${base_packages[@]}" || abort else @@ -76,6 +85,7 @@ else arch-nspawn \ -C "@pkgdatadir@/pacman-${repo}${arch_ext}.conf" \ -M "@pkgdatadir@/makepkg-${arch}.conf" \ + ${cache_dir} \ "${chroots}/${repo}-${arch}/root" \ pacman -Syu --noconfirm || abort fi -- cgit v1.2.3-54-g00ecf