From 3cd5b536a528308846814e57797c67e67732ee5c Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Sat, 27 Jan 2024 03:31:12 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20uncomment=20mirrors=20because=20?= =?UTF-8?q?we=20removed=20reflector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - .../etc/pacman.d/hooks/uncomment-mirrors.hook | 13 +++++++++++++ ...zz99-remove-custom-hooks-from-airootfs.hook | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 archiso/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook create mode 100644 archiso/airootfs/etc/pacman.d/hooks/zzzz99-remove-custom-hooks-from-airootfs.hook diff --git a/.gitignore b/.gitignore index 8009d74..fb73aba 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,5 @@ meta-data *.qcow2 archiso/packages.x86_64 archiso/airootfs/etc/gdm/ -archiso/airootfs/etc/pacman.d/ archiso/airootfs/etc/systemd/system/display-manager.service archiso/airootfs/etc/motd diff --git a/archiso/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook b/archiso/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook new file mode 100644 index 0000000..342aa95 --- /dev/null +++ b/archiso/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook @@ -0,0 +1,13 @@ +# remove from airootfs! +[Trigger] +Operation = Install +Operation = Upgrade +Type = Package +Target = pacman-mirrorlist + +[Action] +Description = Uncommenting all mirrors in /etc/pacman.d/mirrorlist... +When = PostTransaction +Depends = pacman-mirrorlist +Depends = sed +Exec = /usr/bin/sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist diff --git a/archiso/airootfs/etc/pacman.d/hooks/zzzz99-remove-custom-hooks-from-airootfs.hook b/archiso/airootfs/etc/pacman.d/hooks/zzzz99-remove-custom-hooks-from-airootfs.hook new file mode 100644 index 0000000..8dfb943 --- /dev/null +++ b/archiso/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/)"