summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-01-06 01:59:59 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-01-06 02:17:54 +0100
commit2c1ed4889d421b96887fffe2a4945a26bdc21733 (patch)
treef61cc60d319ab3012fe98811dd46caab5c392110
parentec46ac689756af28ec46d3d0bc966d2c821c80c9 (diff)
downloadabslibre-2c1ed4889d421b96887fffe2a4945a26bdc21733.tar.gz
abslibre-2c1ed4889d421b96887fffe2a4945a26bdc21733.tar.bz2
abslibre-2c1ed4889d421b96887fffe2a4945a26bdc21733.zip
pacman: hardcode the architecture in pacman.conf to avoid breaking systems
Without that fix, when creating a chroot with the following commands on Parabola x86_64, the resulting chroot is 64bit: # mkdir rootfs # pacstrap -C /usr/share/pacman/defaults/pacman.conf.i686 ./rootfs/ # file rootfs/usr/bin/pacman rootfs/usr/bin/pacman: ELF 64-bit LSB pie executable, x86-64, [...] In addition, if we run Parabola i686 on an x86_64 computer with linux-libre-64, and that we try to install packages (after pacman -Sy), some packages will refuse to be installed because they have dependencies on 64bit libraries packages while we have 32bit ones instead: # pacman -S e2fsprogs resolving dependencies... looking for conflicting packages... error: failed to prepare transaction (could not satisfy dependencies) :: installing e2fsprogs (1.46.5-1) breaks dependency 'libss.so=2-32' required by krb5 :: installing e2fsprogs (1.46.5-1) breaks dependency 'libcom_err.so=2-32' required by krb5 but packages without such dependencies (like xterm or coreutils) can be installed without warnings and we end up with non-working packages: # pacman -S xterm [the installation proceeds] # file /usr/bin/xterm /usr/bin/xterm: ELF 64-bit LSB pie executable, x86-64, [...] # xterm bash: /usr/bin/xterm: No such file or directory So it's a good idea to hardcode the architecture by default. The Arch Linux 32 installer uses auto to auto-detect the CPU currently in use to select matching repositories. But in Parabola, for x86 32bit we only have one i686 repository and no pentium4 or i586. In addition, all the Parabola installers don't depend on auto (the multi architecture installer has two complete Parabola systems, one for i686 and one for x86_64, so it doesn't need auto). Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--libre/pacman/PKGBUILD2
-rw-r--r--libre/pacman/pacman.conf.i6862
-rw-r--r--libre/pacman/pacman.conf.x86_642
3 files changed, 3 insertions, 3 deletions
diff --git a/libre/pacman/PKGBUILD b/libre/pacman/PKGBUILD
index cf8f31434..3f75c987b 100644
--- a/libre/pacman/PKGBUILD
+++ b/libre/pacman/PKGBUILD
@@ -10,7 +10,7 @@
pkgname=pacman
pkgver=6.0.0
pkgrel=3
-pkgrel+=.parabola1
+pkgrel+=.parabola2
pkgdesc="A library-based package manager with dependency support"
arch=('x86_64')
arch+=('i686' 'armv7h')
diff --git a/libre/pacman/pacman.conf.i686 b/libre/pacman/pacman.conf.i686
index bf9a8f6da..46c0dc077 100644
--- a/libre/pacman/pacman.conf.i686
+++ b/libre/pacman/pacman.conf.i686
@@ -19,7 +19,7 @@ HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
-Architecture = auto
+Architecture = i686
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
diff --git a/libre/pacman/pacman.conf.x86_64 b/libre/pacman/pacman.conf.x86_64
index 035d88bf6..9ac6985ff 100644
--- a/libre/pacman/pacman.conf.x86_64
+++ b/libre/pacman/pacman.conf.x86_64
@@ -19,7 +19,7 @@ HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
-Architecture = auto
+Architecture = x86_64
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =