[weasel-commit] Source: syslinux=3.72-4

  • From: rbuilder@xxxxxxxxx
  • To: weasel-commit@xxxxxxxxxxxxx
  • Date: Sat, 02 Jan 2010 13:33:09 -0500

================================
syslinux:source=3.72-4
cvc rdiff syslinux -1 /weasel.rpath.org@wgl:3-devel/3.72-4
================================
3.72-4 Filip Brcic (brcha@xxxxxxx) Sat Jan  2 13:32:58 2010
    Automatic promote by rBuild.

extlinux.taghandler: new
--- /dev/null
+++ extlinux.taghandler
@@ -0,0 +50 @@
+#!/bin/bash
+
+if [ $# -lt 2 ]; then
+    echo "not enough arguments: $0 $*" >&2
+    exit 1
+fi
+
+type="$1"
+shift
+action="$1"
+shift
+
+# allow for debugging
+run ()
+{
+    #echo "$@"
+    #return 0
+    "$@"
+    return $?
+}
+
+case $type in 
+    files)
+       case $action in
+           update)
+               extlinux -U /boot/extlinux
+               ;;
+       esac
+       ;;
+
+    handler)
+       case $action in
+           preremove)
+               if [ -f /boot/extlinux/extlinux.sys ]; then
+                   cat <<EOF
+The current Conary operation is removing the extlinux tag handler.
+The extlinux tag handler is responsible for updating extlinux boot
+loader installation.  If you are continuing to use extlinux as your
+boot loader, run the 'extlinux -U /boot/extlinux' command by hand
+after this Conary operation has completed.  This will synchronize
+the version of the extlinux.sys file on your system with the version
+of the extlinux modules installed on your system.
+EOF
+               fi
+               ;;
+       esac
+       ;;
+esac
+
+exit 0

syslinux.recipe: new
--- /dev/null
+++ syslinux.recipe
@@ -0,0 +66 @@
+#
+# Copyright (c) 2004-2008 rPath, Inc.
+# This file is distributed under the terms of the MIT License.
+# A copy is available at http://www.rpath.com/permanent/mit-license.html
+#
+
+class Syslinux(CPackageRecipe):
+    name = 'syslinux'
+    version = '3.72'
+
+    buildRequires = [ 'nasm:runtime', 'perl:runtime', 'perl:lib',
+        'perl-Digest-SHA1:perl', 'perl-Crypt-PasswdMD5:perl' ]
+
+    def setup(r):
+        r.macros.myver = r.version.replace('_', '-')
+        r.addArchive('ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/',
+        
#r.addArchive('ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/Testing/%(name)s-%(myver)s.tar.bz2',
+                     keyid='517D0F0E')
+        r.addSource('extlinux.tagdescription', package='extlinux',
+                    macros=True, dest='%(tagdescriptiondir)s/extlinux')
+        r.addSource('extlinux.taghandler', package='extlinux',
+                    macros=True, dest='%(taghandlerdir)s/extlinux',
+                    mode=0755)
+
+        r.Make('installer')
+        r.MakeInstall('LIBDIR=%(datadir)s', rootVar='INSTALLROOT')
+        r.Doc('doc/')
+
+        # Install EXT Linux
+        r.macros.extlinuxdir = '/boot/extlinux'
+        r.MakeDirs('%(extlinuxdir)s')
+        r.Copy('%(datadir)s/syslinux/*.c32', '%(extlinuxdir)s/')
+        r.Copy('%(datadir)s/syslinux/mbr.bin', '%(extlinuxdir)s/')
+        r.Copy('%(datadir)s/syslinux/memdisk', '%(extlinuxdir)s/')
+        r.Symlink('%(extlinuxdir)s/extlinux.conf', '%(sysconfdir)s/')
+        r.Create('%(extlinuxdir)s/extlinux.conf')
+        r.InitialContents('%(extlinuxdir)s/extlinux.conf')
+
+        r.PackageSpec('extlinux', '%(extlinuxdir)s/.*',
+                                  '%(essentialsbindir)s/extlinux',
+                                  '%(sysconfdir)s/extlinux.conf')
+
+        # Install PXE Linux
+        r.macros.pxelinuxdir = '/tftpboot'
+        r.MakeDirs('%(pxelinuxdir)s/pxelinux.cfg')
+        r.ExcludeDirectories(exceptions='%(pxelinuxdir)s/pxelinux.cfg')
+
+        r.Copy('%(datadir)s/syslinux/*.c32', '%(pxelinuxdir)s/')
+        r.Copy('%(datadir)s/syslinux/pxelinux.0', '%(pxelinuxdir)s/')
+        r.Copy('%(datadir)s/syslinux/memdisk', '%(pxelinuxdir)s/')
+
+        r.PackageSpec('pxelinux', '%(pxelinuxdir)s/.*')
+
+        # These are included in case the user is on a non-linux system,
+        # but we never will be
+        r.RemoveNonPackageFiles('.*(com|exe)')
+
+        # Component spec cross-compiler libs and headers
+        r.ComponentSpec('devel', '%(datadir)s/syslinux/com32/include/.*')
+        r.ComponentSpec('devellib', '%(datadir)s/syslinux/com32/lib.*')
+
+        # Add exceptions for cross-compiler libs
+        r.ImproperlyShared(exceptions='%(datadir)s/syslinux/com32/lib.*')
+
+        r.TagSpec('extlinux', '/boot/extlinux')
+        r.ComponentProvides('swap')

extlinux.tagdescription: new
--- /dev/null
+++ extlinux.tagdescription
@@ -0,0 +5 @@
+datasource stdin
+file %(taghandlerdir)s/extlinux
+include /boot/extlinux/.*
+implements files update
+implements handler preremove

syslinux-3.72.tar.bz2: new
syslinux-3.52-mtab-search.patch: new
--- /dev/null
+++ syslinux-3.52-mtab-search.patch
@@ -0,0 +18 @@
+--- syslinux-3.52/extlinux/extlinux.c.orig     2007-11-14 13:14:39.000000000 
-0500
++++ syslinux-3.52/extlinux/extlinux.c  2007-11-14 13:14:41.000000000 -0500
+@@ -718,8 +718,13 @@
+     /* Didn't find it in /proc/mounts, try /etc/mtab */
+     if ( (mtab = setmntent("/etc/mtab", "r")) ) {
+       while ( (mnt = getmntent(mtab)) ) {
+-      devname = mnt->mnt_fsname;
+-      break;
++        if ( (!strcmp(mnt->mnt_type, "ext2") ||
++              !strcmp(mnt->mnt_type, "ext3")) &&
++             !stat(mnt->mnt_fsname, &dst) &&
++             dst.st_rdev == st.st_dev ) {
++        devname = mnt->mnt_fsname;
++        break;
++        }
+       }
+     }
+   }


Committed by: brcha

Other related posts: