[Mach-cvs] CVS: mach2/scripts mach.in,1.255,1.256
Brought to you by:
thomasvs
|
From: Thomas V. S. <tho...@us...> - 2009-11-15 13:26:40
|
Update of /cvsroot/mach/mach2/scripts In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12211/scripts Modified Files: mach.in Log Message: * src/mach-helper.c: Allow bind mount of /selinux. * scripts/mach.in: Mount and unmount /selinux as well if it exists. This fixes the build of Flumotion failing because Xvfb does not start up without it. Index: mach.in =================================================================== RCS file: /cvsroot/mach/mach2/scripts/mach.in,v retrieving revision 1.255 retrieving revision 1.256 diff -C2 -d -r1.255 -r1.256 *** mach.in 14 Nov 2009 17:37:43 -0000 1.255 --- mach.in 15 Nov 2009 13:26:27 -0000 1.256 *************** *** 503,506 **** --- 503,507 ---- self.resultdir = get_config_dir (config, 'result') self.statedir = get_config_dir (self.config, 'state') + # where downloads are stored self.tmpdir = get_config_dir (self.config, 'tmp') *************** *** 570,574 **** def mount (self): ! "mount proc into chroot" # FIXME: the next three lines are workaround code for when not having # proc --- 571,575 ---- def mount (self): ! "mount proc and optionally selinux into chroot" # FIXME: the next three lines are workaround code for when not having # proc *************** *** 579,582 **** --- 580,584 ---- # first umount for completeness; you never know self.umount () + debug ("mounting proc") file = open (os.path.join (self.statedir, 'mount'), "a+") *************** *** 585,588 **** --- 587,599 ---- os.system (command) file.write ('%s/proc\n' % self.rootdir) + + if os.path.exists ('/selinux'): + ensure_dir (os.path.join (self.rootdir, 'selinux')) + debug ("mounting selinux") + command = '%s -o bind /selinux %s/selinux' % (self.config['mount'], self.rootdir) + debug (command) + os.system (command) + file.write ('%s/selinux\n' % self.rootdir) + file.close () *************** *** 1009,1015 **** --- 1020,1035 ---- return + # clean up yum cache + if self.config['installer'] == 'yum': + self.installer (["clean", "all", ]) + if os.path.exists (self.rootdir): self.umount () + # remove temporary files; to clean up e.g. broken downloads + if os.path.exists (self.tmpdir): + debug ("Removing tmpdir %s" % self.tmpdir) + os.system ("rm -rf %s" % self.tmpdir) + # remove all state info if os.path.exists (self.statedir): |