From b86b6d84a188d8dcf8fab0778dc2910770f7efad Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Wed, 11 Sep 2019 00:33:49 +0300 Subject: [PATCH] patch: hack: use bash -x for %%post scripts --- 0004-hack-use-bash-x-for-post-scripts.patch | 27 +++++++++++++++++++++ livecd-tools.spec | 4 +-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 0004-hack-use-bash-x-for-post-scripts.patch diff --git a/0004-hack-use-bash-x-for-post-scripts.patch b/0004-hack-use-bash-x-for-post-scripts.patch new file mode 100644 index 0000000..a1571bd --- /dev/null +++ b/0004-hack-use-bash-x-for-post-scripts.patch @@ -0,0 +1,27 @@ +From a7ab04c25c306e79457312a8aadf4b1c0bbef535 Mon Sep 17 00:00:00 2001 +From: Mikhail Novosyolov +Date: Wed, 11 Sep 2019 00:21:42 +0300 +Subject: [PATCH] hack: use bash -x for %%post scripts + +The value of s.interp is somwhere from python-imgcreate, +let's invoke bash in debug mode to get better logging of what happens in %%post +--- + imgcreate/creator.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/imgcreate/creator.py b/imgcreate/creator.py +index 9a07f62..0657500 100644 +--- a/imgcreate/creator.py ++++ b/imgcreate/creator.py +@@ -618,7 +618,7 @@ class ImageCreator(object): + script = "/tmp/" + os.path.basename(path) + + try: +- subprocess.check_call([s.interp, script], ++ subprocess.check_call(["/bin/bash", "-x", script], + preexec_fn = preexec, env = env) + except OSError, e: + raise CreatorError("Failed to execute %%post script " +-- +2.20.1 + diff --git a/livecd-tools.spec b/livecd-tools.spec index b2b2b73..54c418b 100644 --- a/livecd-tools.spec +++ b/livecd-tools.spec @@ -3,7 +3,7 @@ Summary: Tools for building live CDs Name: livecd-tools Version: 21.1 -Release: 62 +Release: 63 Epoch: 1 License: GPLv2+ Group: System/Base @@ -35,7 +35,7 @@ Patch22: livecd-tools-21.1.no.vga.opts.patch Patch23: livecd-tools-21.1-genisoimage.patch Patch24: 0001-Run-setfiles-after-chroot.patch Patch25: 0002-Get-system-architecture-by-bin-sh-executable-instead.patch -Patch26: 0003-Debug-SELinux-relabling-print-arguements-of-setfiles.patch +Patch27: 0004-hack-use-bash-x-for-post-scripts.patch Requires: python-imgcreate = %{EVRD} Requires: dosfstools