Bug#791651: Does not run chroot hooks
Package: live-build
Version: 5.0~a9-1
Severity: important
Tags: patch
Hey,
Seems like git commit 50794b1de broke running the chroot hooks.. Fixed in
attached patch
-- Package-specific info:
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf, armel
Kernel: Linux 4.0.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages live-build depends on:
ii debootstrap 1.0.70
Versions of packages live-build recommends:
ii apt-utils 1.0.9.10
ii cpio 2.11+dfsg-4.1
ii live-boot-doc 5.0~a4-1
ii live-config-doc 5.0~a3-1
ii live-manual-html [live-manual] 1:5.0~a1-1
ii wget 1.16.3-3
Versions of packages live-build suggests:
ii debian-keyring 2015.06.19
ii gpgv 1.4.19-3
-- no debconf information
>From 03b5bb93dba75bafb3c41a20bdab30bc984aa7d2 Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Date: Tue, 7 Jul 2015 10:35:44 +0200
Subject: [PATCH] Fix running of local hooks
Commit 50794b1de broke running any local chroot hooks as it's both
looking in the wrong spot to see if there are any hooks and if it would
look in the right spot it tries to run the wrong type of hooks (binary
rather then chroot)...
Fix this to make hooks work again
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---
scripts/build/chroot_hooks | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/build/chroot_hooks b/scripts/build/chroot_hooks
index d202260..4fbacdb 100755
--- a/scripts/build/chroot_hooks
+++ b/scripts/build/chroot_hooks
@@ -78,12 +78,12 @@ then
fi
## Processing local hooks
-if ls config/hooks/*.chroot > /dev/null 2>&1
+if ls config/hooks/normal/*.chroot config/hooks/live/*.chroot > /dev/null 2>&1
then
# Restoring cache
Restore_cache cache/packages.chroot
- for HOOK in config/hooks/normal/*.binary config/hooks/live/*.binary
+ for HOOK in config/hooks/normal/*.chroot config/hooks/live/*.chroot
do
if [ ! -e "${HOOK}" ]
then
--
2.1.4
Reply to: