mirror of
https://github.com/luzifer-docker/archlinux.git
synced 2024-11-09 16:00:11 +00:00
Ensure hook is not restored in software updates
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
c061e8954f
commit
57c1869f99
2 changed files with 14 additions and 0 deletions
1
exclude
1
exclude
|
@ -7,6 +7,7 @@ etc/pacman.d/gnupg/private-keys-v1.d/*
|
||||||
etc/pacman.d/gnupg/pubring.gpg~
|
etc/pacman.d/gnupg/pubring.gpg~
|
||||||
etc/pacman.d/gnupg/S.*
|
etc/pacman.d/gnupg/S.*
|
||||||
root/*
|
root/*
|
||||||
|
run/*
|
||||||
tmp/*
|
tmp/*
|
||||||
var/cache/pacman/pkg/*
|
var/cache/pacman/pkg/*
|
||||||
var/lib/pacman/sync/*
|
var/lib/pacman/sync/*
|
||||||
|
|
13
mkroots.sh
13
mkroots.sh
|
@ -42,5 +42,18 @@ arch-chroot ${tmpdir} pacman-key --populate archlinux
|
||||||
# Temporarily break the tmpfiles hook which causes every pacman operation to hang forever
|
# Temporarily break the tmpfiles hook which causes every pacman operation to hang forever
|
||||||
sed -i 's!^Exec.*!Exec = /usr/bin/true!' ${tmpdir}/usr/share/libalpm/hooks/30-systemd-tmpfiles.hook
|
sed -i 's!^Exec.*!Exec = /usr/bin/true!' ${tmpdir}/usr/share/libalpm/hooks/30-systemd-tmpfiles.hook
|
||||||
|
|
||||||
|
cat >${tmpdir}/usr/share/libalpm/hooks/01-remove-tmpfiles.hook <<-'EOF'
|
||||||
|
[Trigger]
|
||||||
|
Type = Path
|
||||||
|
Operation = Install
|
||||||
|
Operation = Upgrade
|
||||||
|
Target = usr/share/libalpm/hooks/*.hook
|
||||||
|
|
||||||
|
[Action]
|
||||||
|
Description = Removing tmpfiles hook...
|
||||||
|
When = PostTransaction
|
||||||
|
Exec = /usr/bin/bash -exc "/usr/bin/sed -i 's!^Exec = .*/systemd-hook tmpfiles!Exec = /usr/bin/true!' /usr/share/libalpm/hooks/*.hook"
|
||||||
|
EOF
|
||||||
|
|
||||||
# Pack rootfs
|
# Pack rootfs
|
||||||
tar --numeric-owner --xattrs --acls --exclude-from=exclude -C ${tmpdir} -c . -f archlinux.tar
|
tar --numeric-owner --xattrs --acls --exclude-from=exclude -C ${tmpdir} -c . -f archlinux.tar
|
||||||
|
|
Loading…
Reference in a new issue