attempt to solve mount (/proc /dev/pts) issues :
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 26 Nov 2007 22:09:44 +0000 (22:09 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 26 Nov 2007 22:09:44 +0000 (22:09 +0000)
(*) attempt to use netsharedpath with /proc and /dev/pts on all platforms
(*) this is done in .rpmmacros, as well as in /etc/rpm/macros in
    the vserver *AND* in the chroot being built
(*) mount/umount /proc restored on all platforms

Makefile
mkfedora

index 6a47c3a..38e84ea 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -274,6 +274,8 @@ export HOME := $(shell pwd)
        rm -f $@ 
        echo "%_topdir $(HOME)" >> $@
        echo "%_tmppath $(HOME)/tmp" >> $@
+       echo "%_netsharedpath /proc:/dev/pts" >> $@
+       echo "%_install_langs C:de:en:es:fr" >> $@
 
 ### run spec2make on the spec file and include the result
 # usage: spec2make package
index 09fb7cc..b238215 100755 (executable)
--- a/mkfedora
+++ b/mkfedora
@@ -193,25 +193,22 @@ set -e
 mount -t devpts none $vroot/dev/pts
 mount -t tmpfs none $vroot/dev/shm
 
-# xxx fixme : do this mount/unmount thing for fc4 only
-if [ "$releasever" -lt 6 ] ; then
-    ## make rpms ignore installing stuff to /proc
-    mkdir -p $vroot/etc/rpm
-    # Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
-    # you have to use at least one language beside 'C'
-    echo "%_install_langs         C:de:en:es:fr" > $vroot/etc/rpm/macros
-    echo "%_netsharedpath /proc" >> $vroot/etc/rpm/macros
-    # Mount /proc in reference image
-    mkdir -p $vroot/proc
-    mount -t proc none $vroot/proc
-fi
+## make rpms ignore installing stuff to /proc
+mkdir -p $vroot/etc/rpm
+# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
+# you have to use at least one language beside 'C'
+echo "%_install_langs C:de:en:es:fr" > $vroot/etc/rpm/macros
+echo "%_netsharedpath /proc:/dev/pts" >> $vroot/etc/rpm/macros
+# append to the vserver's rpm macros
+echo "%_install_langs C:de:en:es:fr" > /etc/rpm/macros
+echo "%_netsharedpath /proc:/dev/pts" >> /etc/rpm/macros
+# Mount /proc in reference image
+mkdir -p $vroot/proc
+mount -t proc none $vroot/proc
 
 cleanup ()
 {
-    # xxx fixme : do this mount/unmount thing for fc4 only
-    if [ "$releasever" -lt 6 ] ; then
-       umount -l $vroot/proc
-    fi
+    umount -l $vroot/proc
     umount -l $vroot/dev/shm
     umount -l $vroot/dev/pts
 }