From c2353ad8593a9c6d6c7a81c025416bd3dacdb748 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 25 Aug 2021 15:38:38 -0600 Subject: [PATCH] Update archiso profile to match upstream changes --- setup/build_linux | 5 ++++- setup/linux/packages/base | 1 + .../airootfs/etc/modprobe.d/broadcom-wl.conf | 7 +++++++ .../etc/pacman.d/hooks/40-locale-gen.hook | 13 +++++++++++++ ...zz99-remove-custom-hooks-from-airootfs.hook | 18 ++++++++++++++++++ .../journald.conf.d/volatile-storage.conf | 3 --- .../systemd/logind.conf.d/do-not-suspend.conf | 3 --- .../etc/systemd/network/20-ethernet.network | 3 --- .../etc/systemd/network/20-wireless.network | 3 --- .../systemd/system/etc-pacman.d-gnupg.mount | 3 --- .../etc/systemd/system/pacman-init.service | 3 --- .../airootfs/root/customize_airootfs.sh | 12 ------------ ...linux.conf => 01-archiso-x86_64-linux.conf} | 3 --- .../entries/02-archiso-x86_64-ram-linux.conf | 4 ++++ .../profile_base/efiboot/loader/loader.conf | 5 +---- setup/linux/profile_base/pacman.conf | 1 + setup/linux/profile_base/profiledef.sh | 1 + setup/linux/profile_base/syslinux/syslinux.cfg | 2 +- 18 files changed, 51 insertions(+), 39 deletions(-) create mode 100644 setup/linux/profile_base/airootfs/etc/modprobe.d/broadcom-wl.conf create mode 100644 setup/linux/profile_base/airootfs/etc/pacman.d/hooks/40-locale-gen.hook create mode 100644 setup/linux/profile_base/airootfs/etc/pacman.d/hooks/zzzz99-remove-custom-hooks-from-airootfs.hook delete mode 100755 setup/linux/profile_base/airootfs/root/customize_airootfs.sh rename setup/linux/profile_base/efiboot/loader/entries/{archiso-x86_64-linux.conf => 01-archiso-x86_64-linux.conf} (81%) create mode 100644 setup/linux/profile_base/efiboot/loader/entries/02-archiso-x86_64-ram-linux.conf diff --git a/setup/build_linux b/setup/build_linux index 1c46e8ac..2b0bb620 100755 --- a/setup/build_linux +++ b/setup/build_linux @@ -172,6 +172,9 @@ function update_live_env() { # MOTD sed -i -r "s/_+/$KIT_NAME_FULL Linux Environment/" "$PROFILE_DIR/airootfs/etc/motd" + # Network + ln -s "/run/systemd/resolve/stub-resolv.conf" "$PROFILE_DIR/airootfs/etc/resolv.conf" + # Oh My ZSH git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$SKEL_DIR/.oh-my-zsh" rm -Rf "$SKEL_DIR/.oh-my-zsh/.git" @@ -208,7 +211,7 @@ function update_live_env() { # Tech user echo "tech:$(echo "$TECH_PASSWORD" | openssl passwd -6 -stdin):14871::::::" >> "$PROFILE_DIR/airootfs/etc/shadow" - # Timezonew + # Timezone ln -sf "/usr/share/zoneinfo/$LINUX_TIME_ZONE" "$PROFILE_DIR/airootfs/etc/localtime" if [[ "${1:-}" != "--minimal" ]]; then diff --git a/setup/linux/packages/base b/setup/linux/packages/base index 30301029..eab576d6 100644 --- a/setup/linux/packages/base +++ b/setup/linux/packages/base @@ -47,6 +47,7 @@ mkinitcpio-archiso mprime nano ncdu +openssh p7zip perl pipes.sh diff --git a/setup/linux/profile_base/airootfs/etc/modprobe.d/broadcom-wl.conf b/setup/linux/profile_base/airootfs/etc/modprobe.d/broadcom-wl.conf new file mode 100644 index 00000000..0eae70c9 --- /dev/null +++ b/setup/linux/profile_base/airootfs/etc/modprobe.d/broadcom-wl.conf @@ -0,0 +1,7 @@ +# The broadcom-wl package requires some modules to be disabled in order to use +# wl. Since the ISO image needs to cover many hardware cases, this file +# overrides the default blacklist in /usr/lib/modprobe.d/ +# +# If you need to use wl, you may need to delete this file, then `rmmod` any +# already-loaded modules that are now blacklisted before proceeding to modprobe +# wl itself. diff --git a/setup/linux/profile_base/airootfs/etc/pacman.d/hooks/40-locale-gen.hook b/setup/linux/profile_base/airootfs/etc/pacman.d/hooks/40-locale-gen.hook new file mode 100644 index 00000000..82dd1994 --- /dev/null +++ b/setup/linux/profile_base/airootfs/etc/pacman.d/hooks/40-locale-gen.hook @@ -0,0 +1,13 @@ +# remove from airootfs! +[Trigger] +Operation = Install +Type = Package +Target = glibc + +[Action] +Description = Uncommenting en_US.UTF-8 locale and running locale-gen... +When = PostTransaction +Depends = glibc +Depends = sed +Depends = sh +Exec = /bin/sh -c "sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen && locale-gen" diff --git a/setup/linux/profile_base/airootfs/etc/pacman.d/hooks/zzzz99-remove-custom-hooks-from-airootfs.hook b/setup/linux/profile_base/airootfs/etc/pacman.d/hooks/zzzz99-remove-custom-hooks-from-airootfs.hook new file mode 100644 index 00000000..8dfb9435 --- /dev/null +++ b/setup/linux/profile_base/airootfs/etc/pacman.d/hooks/zzzz99-remove-custom-hooks-from-airootfs.hook @@ -0,0 +1,18 @@ +# remove from airootfs! +# As a workaround for https://bugs.archlinux.org/task/49347 , remove pacman hooks specific to the ISO build process. +# If not, they would be used when pacstrap is run in the live environment. + +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = Package +Target = * + +[Action] +Description = Work around FS#49347 by removing custom pacman hooks that are only required during ISO build... +When = PostTransaction +Depends = sh +Depends = coreutils +Depends = grep +Exec = /bin/sh -c "rm -- $(grep -Frl 'remove from airootfs' /etc/pacman.d/hooks/)" diff --git a/setup/linux/profile_base/airootfs/etc/systemd/journald.conf.d/volatile-storage.conf b/setup/linux/profile_base/airootfs/etc/systemd/journald.conf.d/volatile-storage.conf index 3104779c..b69850df 100644 --- a/setup/linux/profile_base/airootfs/etc/systemd/journald.conf.d/volatile-storage.conf +++ b/setup/linux/profile_base/airootfs/etc/systemd/journald.conf.d/volatile-storage.conf @@ -1,5 +1,2 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - [Journal] Storage=volatile diff --git a/setup/linux/profile_base/airootfs/etc/systemd/logind.conf.d/do-not-suspend.conf b/setup/linux/profile_base/airootfs/etc/systemd/logind.conf.d/do-not-suspend.conf index c6b17a4e..f3ecb393 100644 --- a/setup/linux/profile_base/airootfs/etc/systemd/logind.conf.d/do-not-suspend.conf +++ b/setup/linux/profile_base/airootfs/etc/systemd/logind.conf.d/do-not-suspend.conf @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - [Login] HandleSuspendKey=ignore HandleHibernateKey=ignore diff --git a/setup/linux/profile_base/airootfs/etc/systemd/network/20-ethernet.network b/setup/linux/profile_base/airootfs/etc/systemd/network/20-ethernet.network index efa309c5..37878b0c 100644 --- a/setup/linux/profile_base/airootfs/etc/systemd/network/20-ethernet.network +++ b/setup/linux/profile_base/airootfs/etc/systemd/network/20-ethernet.network @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - [Match] Name=en* Name=eth* diff --git a/setup/linux/profile_base/airootfs/etc/systemd/network/20-wireless.network b/setup/linux/profile_base/airootfs/etc/systemd/network/20-wireless.network index bf9ab9d2..e1d624cc 100644 --- a/setup/linux/profile_base/airootfs/etc/systemd/network/20-wireless.network +++ b/setup/linux/profile_base/airootfs/etc/systemd/network/20-wireless.network @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - [Match] Name=wlp* Name=wlan* diff --git a/setup/linux/profile_base/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount b/setup/linux/profile_base/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount index f86a91da..4eab5513 100644 --- a/setup/linux/profile_base/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount +++ b/setup/linux/profile_base/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - [Unit] Description=Temporary /etc/pacman.d/gnupg directory diff --git a/setup/linux/profile_base/airootfs/etc/systemd/system/pacman-init.service b/setup/linux/profile_base/airootfs/etc/systemd/system/pacman-init.service index 3adec4c0..23b81445 100644 --- a/setup/linux/profile_base/airootfs/etc/systemd/system/pacman-init.service +++ b/setup/linux/profile_base/airootfs/etc/systemd/system/pacman-init.service @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - [Unit] Description=Initializes Pacman keyring Wants=haveged.service diff --git a/setup/linux/profile_base/airootfs/root/customize_airootfs.sh b/setup/linux/profile_base/airootfs/root/customize_airootfs.sh deleted file mode 100755 index b562ea91..00000000 --- a/setup/linux/profile_base/airootfs/root/customize_airootfs.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/env bash -# -# Warning: customize_airootfs.sh is deprecated! Support for it will be removed in a future archiso version. - -set -o errexit -set -o errtrace -set -o nounset -set -o pipefail - -sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen -locale-gen - diff --git a/setup/linux/profile_base/efiboot/loader/entries/archiso-x86_64-linux.conf b/setup/linux/profile_base/efiboot/loader/entries/01-archiso-x86_64-linux.conf similarity index 81% rename from setup/linux/profile_base/efiboot/loader/entries/archiso-x86_64-linux.conf rename to setup/linux/profile_base/efiboot/loader/entries/01-archiso-x86_64-linux.conf index 8dd7a169..11624b65 100644 --- a/setup/linux/profile_base/efiboot/loader/entries/archiso-x86_64-linux.conf +++ b/setup/linux/profile_base/efiboot/loader/entries/01-archiso-x86_64-linux.conf @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - title Arch Linux (x86_64, UEFI) linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img diff --git a/setup/linux/profile_base/efiboot/loader/entries/02-archiso-x86_64-ram-linux.conf b/setup/linux/profile_base/efiboot/loader/entries/02-archiso-x86_64-ram-linux.conf new file mode 100644 index 00000000..d66f5a6b --- /dev/null +++ b/setup/linux/profile_base/efiboot/loader/entries/02-archiso-x86_64-ram-linux.conf @@ -0,0 +1,4 @@ +title Arch Linux (x86_64, UEFI) Copy to RAM +linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux +initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img +options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram diff --git a/setup/linux/profile_base/efiboot/loader/loader.conf b/setup/linux/profile_base/efiboot/loader/loader.conf index 1ea5ce56..17110fab 100644 --- a/setup/linux/profile_base/efiboot/loader/loader.conf +++ b/setup/linux/profile_base/efiboot/loader/loader.conf @@ -1,5 +1,2 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - timeout 3 -default archiso-x86_64-linux.conf +default 01-archiso-x86_64-linux.conf diff --git a/setup/linux/profile_base/pacman.conf b/setup/linux/profile_base/pacman.conf index 1d48e528..6bc8e2cc 100644 --- a/setup/linux/profile_base/pacman.conf +++ b/setup/linux/profile_base/pacman.conf @@ -1,6 +1,7 @@ [options] HoldPkg = pacman glibc Architecture = auto +ParallelDownloads = 5 SigLevel = Required DatabaseOptional LocalFileSigLevel = Optional diff --git a/setup/linux/profile_base/profiledef.sh b/setup/linux/profile_base/profiledef.sh index e25deef1..3f177eb4 100644 --- a/setup/linux/profile_base/profiledef.sh +++ b/setup/linux/profile_base/profiledef.sh @@ -7,6 +7,7 @@ iso_publisher="SUPPORT_URL" iso_application="KIT_NAME_FULL Linux Environment" iso_version="$(date +%Y-%m-%d)" install_dir="arch" +buildmodes=('iso') bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito') arch="x86_64" pacman_conf="pacman.conf" diff --git a/setup/linux/profile_base/syslinux/syslinux.cfg b/setup/linux/profile_base/syslinux/syslinux.cfg index e59f84da..f441b62f 100644 --- a/setup/linux/profile_base/syslinux/syslinux.cfg +++ b/setup/linux/profile_base/syslinux/syslinux.cfg @@ -1,4 +1,4 @@ -SERIAL 0 38400 +SERIAL 0 115200 UI vesamenu.c32 MENU TITLE _______ MENU BACKGROUND syslinux.png