From 12c0b79b6a21deb04b0e92cf702ca74e147cc3b6 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Thu, 1 Dec 2005 03:44:52 +0000 Subject: 2005-11-30 Jeremy Katz * scripts/upd-instroot: Try to build policy with semodule so that all the files are there. If it works, will fix #174563 --- scripts/upd-instroot | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/upd-instroot b/scripts/upd-instroot index 44d24a771..78ab0a7d8 100755 --- a/scripts/upd-instroot +++ b/scripts/upd-instroot @@ -110,7 +110,7 @@ mkdir -p $DEST mkdir -p $DESTGR PACKAGES="glibc glibc-common setup openssl python newt slang libselinux - libsepol libtermcap zlib ash e2fsprogs util-linux raidtools popt mdadm + libsepol libtermcap zlib ash e2fsprogs util-linux raidtools popt mdadm libsemanage procps rpm rpm-libs XFree86 Xconfigurator anaconda tzdata anaconda-runtime kudzu hwdata bzip2 beecrypt bzip2-libs dosfstools pciutils reiserfs-utils parted sed @@ -297,6 +297,7 @@ $LIBDIR/libnss_dns* $LIBDIR/libnss_files* $LIBDIR/libresolv* $LIBDIR/libselinux* +$LIBDIR/libsemanage* $LIBDIR/libsepol* $LIBDIR/libss* $LIBDIR/libtermcap* @@ -433,9 +434,11 @@ usr/sbin/mkofboot usr/sbin/ofpath usr/sbin/ybin usr/sbin/load_policy +usr/sbin/semodule usr/sbin/lvm usr/sbin/build-locale-archive usr/share/anaconda/anaconda.conf +usr/share/selinux/targeted/base.pp usr/share/terminfo/b/bterm usr/share/terminfo/l/linux usr/share/terminfo/v/vt100 @@ -1048,6 +1051,16 @@ if [ -n "$NEEDGR" ]; then mkfontdir $DESTGR/usr/share/X11/fonts/* fi +echo "Creating SELinux policy..." +if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then + runroot $COMPONENT --onlyone --arch $ARCH "/usr/sbin/chroot $DESTGR /usr/sbin/semodule -b /usr/share/selinux/targeted/base.pp -n -s targeted" +else + /usr/sbin/chroot $DESTGR /usr/sbin/semodule -b /usr/share/selinux/targeted/base.pp -n -s targeted +fi +rm -rf $DEST/etc/selinux +mkdir $DEST/etc/selinux +cp -r $DESTGR/etc/selinux/* $DEST/etc/selinux/ + echo "Getting pango modules" if [ -n "$NEEDGR" ]; then # sick sick sick hack for pango-querymodules being -32 or -64 -- cgit