From 758ab8f2a0c4d16b08fe22622c2ccc9b4fe98629 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 7 May 2014 19:22:02 +0300 Subject: [PATCH] Fix image creation issue job_prerelease_obs strips all lines of .ks file. This breaks patches in %post section and results in non-functional images. Example: this stripped patch patch -p1 -d/ <<'EOF' diff -urN bad/etc/pam.d/systemd-user good/etc/pam.d/systemd-user --- bad/etc/pam.d/systemd-user 2014-03-20 10:01:36.657843073 +0100 +++ good/etc/pam.d/systemd-user 2014-03-20 10:06:51.586121696 +0100 @@ -4,5 +4,6 @@ account include system-auth session include system-auth +session required pam_systemd.so auth required pam_deny.so password required pam_deny.so EOF causes this message in the log: Applying configurations ... Running scripts ... patching file etc/pam.d/systemd-user patch: **** malformed patch at line 6: account include system-auth and the image doesn't boot to UI because of broken systemd configuration. Change-Id: Id4e8d391036b67ba2a62a18766e9f369106ea4af Signed-off-by: Ed Bartosh --- job_pre_release_obs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/job_pre_release_obs.py b/job_pre_release_obs.py index 3d64f53..766cc7b 100755 --- a/job_pre_release_obs.py +++ b/job_pre_release_obs.py @@ -53,7 +53,7 @@ def update_ks(imagedata, snapshot_id, pkg_urls): line) if match: line = re.sub(r'@BUILD_ID@', snapshot_id, line) - new_ks_lines.append(line.strip()) + new_ks_lines.append(line) new_ks_lines.insert(new_ks_lines.index('%packages')-1, repo_line) # Update the ks files in imagedata -- 2.7.4