Fix image creation issue
authorEd Bartosh <eduard.bartosh@intel.com>
Wed, 7 May 2014 16:22:02 +0000 (19:22 +0300)
committerLin A Yang <lin.a.yang@intel.com>
Thu, 8 May 2014 02:52:24 +0000 (05:52 +0300)
commit758ab8f2a0c4d16b08fe22622c2ccc9b4fe98629
treea8795ccf940d7a816ef1e79312c6d31a0119d34c
parent97b173652ce245ee5a566d087668e91ae5cf76ac
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 <eduard.bartosh@intel.com>
job_pre_release_obs.py