[svn] r5590 - trunk/tools/mrepo

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Mon Jul 9 14:14:09 CEST 2007


Author: dag
Date: 2007-07-09 14:14:07 +0200 (Mon, 09 Jul 2007)
New Revision: 5590

Modified:
   trunk/tools/mrepo/ChangeLog
   trunk/tools/mrepo/mrepo
Log:
Added fuseiso support (as opposed to devloop) to allow +255 ISO and user mounts (Chandan Dutta Chowdhury)

Modified: trunk/tools/mrepo/ChangeLog
===================================================================
--- trunk/tools/mrepo/ChangeLog	2007-07-08 12:39:59 UTC (rev 5589)
+++ trunk/tools/mrepo/ChangeLog	2007-07-09 12:14:07 UTC (rev 5590)
@@ -14,6 +14,7 @@
 - Added arch ia32e as alias for x86_64
 - Fixed RPM links from a file:/// source (Gabe Johnson)
 - Fixed a typo (rhns://) in the RHEL5 template (Bjoern Engels)
+- Added fuseiso support (as opposed to devloop) to allow +255 ISO and user mounts (Chandan Dutta Chowdhury)
 
 * 0.8.4 - Sint-Jacobsplein - released 13/12/2006
 - Renamed Yam to mrepo (Matthew Hannigan)

Modified: trunk/tools/mrepo/mrepo
===================================================================
--- trunk/tools/mrepo/mrepo	2007-07-08 12:39:59 UTC (rev 5589)
+++ trunk/tools/mrepo/mrepo	2007-07-09 12:14:07 UTC (rev 5590)
@@ -257,7 +257,7 @@
             if section in self.cfg.sections():
                 for option in self.cfg.options(section):
                     variables[option] = self.cfg.get(section, option)
-            
+
         for section in self.cfg.sections():
             if section in ('main', 'repos', 'variables', 'vars', 'DEFAULT'):
                 continue
@@ -405,8 +405,13 @@
         else:
             remove(os.path.join(self.dir, 'iso'))
         regexp = re.compile('.+[_-]CD[0-9]?\..+')
-        opts = '-o loop,ro'
-        if readfile('/selinux/enforce') == '1':
+        if cf.cmd['mount'].find('fuseiso') != -1:
+            opts = '-n'
+            extra_opts = '-oallow_other'
+        else:
+            opts = '-o loop,ro'
+            extra_opts = ''
+        if readfile('/selinux/enforce') == '1' and cf.cmd['mount'].find('fuseiso') == -1:
             opts = opts + ',context=system_u:object_r:httpd_sys_content_t'
         for iso in self.isos:
             if cf.shareiso:
@@ -433,9 +438,9 @@
                 mkdir(mount)
                 if not os.path.ismount(mount):
                     info(2, '%s: Mount ISO %s to %s' % (self.nick, os.path.basename(iso), mount))
-                    run('%s %s %s %s' % (cf.cmd['mount'], opts, iso, mount))
+                    run('%s %s %s %s %s' % (cf.cmd['mount'], opts, iso, mount, extra_opts))
         return discs
-    
+
     def umount(self):
         "Umount all mounted ISOs"
         discnr = 0
@@ -661,7 +666,7 @@
                 error(0, '%s: Existing lock %s found owned by another process with pid %s. This should NOT happen.' % (self.dist.nick, lockfile, pid))
         else:
             error(0, '%s: Lockfile %s does not exist. Cannot unlock. Something fishy here ?' % (self.dist.nick, lockfile))
-    
+
     def createmd(self):
         metadata = ('apt', 'createrepo', 'repomd', 'repoview', 'yum')
         index = ('repoview',)
@@ -690,7 +695,6 @@
         except mrepoGenerateException, e:
             error(0, 'Generating repo failed for %s with message:\n  %s' % (self.name, e.value))
             exitcode = 2
-        
 
     def repomd(self):
         "Create a repomd repository"



More information about the svn-commits mailing list