From 07b1928ed8e4aeecad00fe874f1f36556f532f39 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Jul 05 2018 20:15:26 +0000 Subject: Add a patch to open nss libs in the chroot to avoid install_root keeping them open. See https://bugzilla.redhat.com/show_bug.cgi?id=1591804 --- diff --git a/appliance-tools.spec b/appliance-tools.spec index 558faa3..8b3696b 100644 --- a/appliance-tools.spec +++ b/appliance-tools.spec @@ -1,7 +1,7 @@ Name: appliance-tools Summary: Tools for building Appliances Version: 008.0 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Base URL: https://pagure.io/appliance-tools @@ -13,6 +13,7 @@ Patch0: 0001-Set-releasever.patch Patch1: 0002-Make-it-possible-to-disable-compression.patch Patch3: 0001-Use-block-size-with-xz-to-make-seekable-xz-compresse.patch Patch4: 0001-Remove-usage-of-kickstart.get_modules-rhbz-1544075.patch +Patch5: lookup-fake-user-for-nss.patch # Ensure system deps are installed (rhbz#1409536) Requires: python2-imgcreate >= 1:25.0-2 @@ -57,6 +58,10 @@ rm -fv %{buildroot}%{_pkgdocdir}/COPYING %{python2_sitelib}/ec2convert/* %changelog +* Thu Jul 05 2018 Kevin Fenzi - 008.0-9 +- Add a patch to open nss libs in the chroot to avoid install_root keeping them open. +- See https://bugzilla.redhat.com/show_bug.cgi?id=1591804 + * Sat Feb 10 2018 Neal Gompa - 008.0-8 - Fix compatibility with pykickstart 3.9+ (#1544075) - Bump requires of livecd-tools to minimum version with pykickstart 3.9+ compatibility diff --git a/lookup-fake-user-for-nss.patch b/lookup-fake-user-for-nss.patch new file mode 100644 index 0000000..eeb0e06 --- /dev/null +++ b/lookup-fake-user-for-nss.patch @@ -0,0 +1,29 @@ +diff -Nur appliance-tools-008.0.orig/tools/appliance-creator appliance-tools-008.0/tools/appliance-creator +--- appliance-tools-008.0.orig/tools/appliance-creator 2018-07-05 13:09:19.391655392 -0700 ++++ appliance-tools-008.0/tools/appliance-creator 2018-07-05 13:12:11.185416692 -0700 +@@ -168,8 +168,25 @@ + del forgettable + return hack + ++# ++# https://bugzilla.redhat.com/show_bug.cgi?id=1591804 ++# Try and look up a unknown user in the chroot so it ++# Opens and uses all the nss libraries in the chroot ++# Instead of doing so in the install root which might ++# Keep the libraries open and fail the build. ++# ++def do_unknown_user_hack(): ++ import pwd as forgettable ++ try: ++ forgettable.getpwnam('fwefwkejkgre') ++ except: ++ pass ++ del forgettable ++ return ++ + if __name__ == "__main__": + hack = do_nss_sss_hack() ++ do_unknown_user_hack() + sys.exit(main()) + +