[Fedora-livecd-list] mandatory syslinux on live cd causes perl dependency

Mads Kiilerich mads at kiilerich.com
Wed Mar 3 19:24:18 UTC 2010


Marc Herbert wrote, On 03/03/2010 11:19 AM:
> Mads Kiilerich a écrit :
>
>    
>> Or could syslinux be split into a executable package depending on perl
>> and a /usr/share/syslinux package?
>>      
> This looks like the best solution to me in the long term. If a small,
> well defined and useful subset of syslinux can be isolated, saving
> 30Megs of dependencies, then it should be extracted to some new, small
> "syslinux-data" RPM. This could be useful in other contexts.
>    

Livecd-creator is executed on the host system and creates isolinux.cfg 
(syslinux.cfg) by its own logic and hardcoded templates. It also runs 
isohybrid if available, and the hosts livecd-iso-to-disk runs syslinux. 
I don't see any reason why livecd-creator should use vesamenu.c32 and 
isolinux.bin from the installed image.

Using files from different unrelated packages even has the risk of 
causing problems whenever the feature-set changes.

I think the best solution is to drop the hardcoded dependency to 
syslinux and use the files from the host system. Perhaps something like 
the following (untested) patch.

And of course, if anyone wants to customize or replace these files they 
can do whatever they want and modify it in an unchrooted %post, just 
like all other boot-loader manipulations

/Mads


diff --git a/imgcreate/live.py b/imgcreate/live.py
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -308,7 +308,7 @@
                   "-boot-load-size", "4" ]

      def _get_required_packages(self):
-        return ["syslinux"] + 
LiveImageCreatorBase._get_required_packages(self)
+        return LiveImageCreatorBase._get_required_packages(self)

      def _get_isolinux_stanzas(self, isodir):
          return ""
@@ -316,7 +316,7 @@
      def __find_syslinux_menu(self):
          for menu in ("vesamenu.c32", "menu.c32"):
              for dir in ("/usr/lib/syslinux/", "/usr/share/syslinux/"):
-                if os.path.isfile(self._instroot + dir + menu):
+                if os.path.isfile(dir + menu):
                      return menu

          raise CreatorError("syslinux not installed : "
@@ -337,10 +337,10 @@
              files += [mboot]

          for f in files:
-            if os.path.exists(self._instroot + "/usr/lib/syslinux/" + f):
-                path = self._instroot + "/usr/lib/syslinux/" + f
-            elif os.path.exists(self._instroot + "/usr/share/syslinux/" 
+ f):
-                path = self._instroot + "/usr/share/syslinux/" + f
+            if os.path.exists("/usr/lib/syslinux/" + f):
+                path = "/usr/lib/syslinux/" + f
+            elif os.path.exists("/usr/share/syslinux/" + f):
+                path = "/usr/share/syslinux/" + f
              if not os.path.isfile(path):
                  raise CreatorError("syslinux not installed : "
                                     "%s not found" % path)




More information about the livecd mailing list