[Fedora-livecd-list] [PATCH] fix x86_64, SELinux relabeling
Bill Nottingham
notting at redhat.com
Sat Feb 24 06:56:42 UTC 2007
This patch has two parts:
1) call fixfiles with a path
If we don't do that, fixfiles will parse /proc/mounts to see
what filesystems to try to relabel. In a chroot, that gets a
little fishy.
2) redo the find-library-dependencies bit in mayflower
The rework removes the hardcoded /lib and /lib/ld-linux.so.2,
which allows it to DTRT on x86_64.
Tested, x86_64 livecd boots.
Bill
-------------- next part --------------
diff --git a/creator/livecd-creator b/creator/livecd-creator
index c4ca22b..d4ad1b7 100755
--- a/creator/livecd-creator
+++ b/creator/livecd-creator
@@ -446,7 +447,7 @@ class InstallationTarget:
os.unlink("%s/install_root/%s" %(self.build_dir, f))
# finally relabel all files
- subprocess.call(["/sbin/fixfiles", "restore"], preexec_fn=run_in_root)
+ subprocess.call(["/sbin/fixfiles", "restore", "/"], preexec_fn=run_in_root)
return True
def configureBootloader(self):
diff --git a/creator/mayflower b/creator/mayflower
index 6619fbe..f9ddbc6 100755
--- a/creator/mayflower
+++ b/creator/mayflower
@@ -172,19 +172,13 @@ cp /sbin/lsmod sbin
# Copy all required shared libs
-rm -f libs
for i in bin/* sbin/*; do
- ldd $i | cut -d ' ' -f3 >> libs
-done
-LIBS=`cat libs | sort -u |grep -v ^dynamic`
-LIBS="/lib/ld-linux.so.2 $LIBS"
-cp libs /tmp/libs
-rm -f libs
-for l in $LIBS; do
- if [ "$opt_verbose" == "1" ] ; then
- echo "Copying DSO $l"
- fi
- cp $l lib
+ ldd $i | sed 's|.*=>||g' | awk '/\// { print $1 }' | while read lib ; do
+ if [ "$opt_verbose" == "1" ] ; then
+ echo "Copying DSO $l"
+ fi
+ cp --parents $lib .
+ done
done
# Write out init
More information about the Fedora-livecd-list
mailing list