archlinux: fix bugs and changes caused by 2015-01 install ISO

This commit is contained in:
Olivier MEDOC 2015-01-13 07:44:35 +01:00 committed by Marek Marczykowski-Górecki
parent a97beee8cb
commit d0bf2bc374
5 changed files with 27 additions and 9 deletions

View File

@ -15,11 +15,11 @@ gpg --verify "$CACHEDIR/archlinux-$ISO_VERSION-dual.iso.sig" "$CACHEDIR/archlinu
if [ "$CACHEDIR/archlinux-$ISO_VERSION-dual.iso" -nt $CACHEDIR/root-image.fs ]; then if [ "$CACHEDIR/archlinux-$ISO_VERSION-dual.iso" -nt $CACHEDIR/root-image.fs ]; then
echo "Extracting squash filesystem from DVD..." echo "Extracting squash filesystem from DVD..."
mkdir mnt_archlinux_dvd mkdir mnt_archlinux_dvd
mount -o loop "$CACHEDIR/archlinux-$ISO_VERSION-dual.iso" mnt_archlinux_dvd mount -o loop "$CACHEDIR/archlinux-$ISO_VERSION-dual.iso" mnt_archlinux_dvd || echo "!!Error mounting iso to mnt_archlinux_dvd"
cp mnt_archlinux_dvd/arch/x86_64/root-image.fs.sfs $CACHEDIR/ cp mnt_archlinux_dvd/arch/x86_64/airootfs.sfs $CACHEDIR/ || echo "!!Error copying root sfs file to \$CACHEDIR"
umount mnt_archlinux_dvd umount mnt_archlinux_dvd
mount -o loop $CACHEDIR/root-image.fs.sfs mnt_archlinux_dvd mount -o loop $CACHEDIR/airootfs.sfs mnt_archlinux_dvd || echo "!!Error mounting root sfs"
cp mnt_archlinux_dvd/root-image.fs $CACHEDIR/ cp mnt_archlinux_dvd/airootfs.img $CACHEDIR/ || echo "!!Error copying root fs file"
umount mnt_archlinux_dvd umount mnt_archlinux_dvd
rm $CACHEDIR/root-image.fs.sfs rm $CACHEDIR/airootfs.sfs
fi fi

View File

@ -4,7 +4,14 @@ set -e
echo "Mounting archlinux install system into mnt_archlinux_dvd..." echo "Mounting archlinux install system into mnt_archlinux_dvd..."
mkdir -p mnt_archlinux_dvd mkdir -p mnt_archlinux_dvd
mount $CACHEDIR/root-image.fs mnt_archlinux_dvd mount $CACHEDIR/airootfs.img mnt_archlinux_dvd
echo "Fix bug intruduced in arch-chroot causing arguments not to be passed"
sed "s/unshare --fork --pid//" -i mnt_archlinux_dvd/usr/bin/arch-chroot
echo "Fix chroot cannot be umounted because of gpg-agent started by pacman"
sed "/chroot_umount() {/a pkill gpg-agent" -i mnt_archlinux_dvd/usr/bin/arch-chroot
cat mnt_archlinux_dvd/usr/bin/arch-chroot
echo "Creating chroot bootstrap environment" echo "Creating chroot bootstrap environment"
@ -12,6 +19,7 @@ mount --bind $INSTALLDIR mnt_archlinux_dvd/mnt
cp /etc/resolv.conf mnt_archlinux_dvd/etc cp /etc/resolv.conf mnt_archlinux_dvd/etc
echo "-> Initializing pacman keychain" echo "-> Initializing pacman keychain"
# Note: pacman-key starts gpg-agent automatically, which locks /dev
./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ pacman-key --init ./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ pacman-key --init
./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ pacman-key --populate ./mnt_archlinux_dvd/usr/bin/arch-chroot mnt_archlinux_dvd/ pacman-key --populate
@ -22,6 +30,7 @@ echo "--> Removing non required linux kernel (can be added manually through a pa
./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Rsc linux ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Rsc linux
echo "-> Cleaning up bootstrap environment" echo "-> Cleaning up bootstrap environment"
umount mnt_archlinux_dvd/mnt umount mnt_archlinux_dvd/mnt
umount mnt_archlinux_dvd umount mnt_archlinux_dvd

View File

@ -12,7 +12,10 @@ fi
set -e set -e
echo "Mounting archlinux install system into mnt_archlinux_dvd..." echo "Mounting archlinux install system into mnt_archlinux_dvd..."
mount $CACHEDIR/root-image.fs mnt_archlinux_dvd mount $CACHEDIR/airootfs.img mnt_archlinux_dvd
echo "Fix bug intruduced in arch-chroot causing arguments not to be passed"
sed "s/unshare --fork --pid//" -i mnt_archlinux_dvd/usr/bin/arch-chroot
PKGGROUPS=`cat $PKGLISTFILE` PKGGROUPS=`cat $PKGLISTFILE`

View File

@ -4,7 +4,10 @@ set -e
echo "Mounting archlinux install system into mnt_archlinux_dvd..." echo "Mounting archlinux install system into mnt_archlinux_dvd..."
mkdir -p mnt_archlinux_dvd mkdir -p mnt_archlinux_dvd
mount $CACHEDIR/root-image.fs mnt_archlinux_dvd mount $CACHEDIR/airootfs.img mnt_archlinux_dvd
echo "Fix bug intruduced in arch-chroot causing arguments not to be passed"
sed "s/unshare --fork --pid//" -i mnt_archlinux_dvd/usr/bin/arch-chroot
# Note: Enable x86 repos # Note: Enable x86 repos
su -c "echo '[multilib]' >> $INSTALLDIR/etc/pacman.conf" su -c "echo '[multilib]' >> $INSTALLDIR/etc/pacman.conf"

View File

@ -3,7 +3,10 @@
set -e set -e
echo "Mounting archlinux install system into mnt_archlinux_dvd..." echo "Mounting archlinux install system into mnt_archlinux_dvd..."
mount $CACHEDIR/root-image.fs mnt_archlinux_dvd mount $CACHEDIR/airootfs.img mnt_archlinux_dvd
echo "Fix bug intruduced in arch-chroot causing arguments not to be passed"
sed "s/unshare --fork --pid//" -i mnt_archlinux_dvd/usr/bin/arch-chroot
echo "--> Starting cleanup actions" echo "--> Starting cleanup actions"
# Remove unused packages and their dependencies (make dependencies) # Remove unused packages and their dependencies (make dependencies)