ports/141166: [patch] sysutils/syslinux: update to version 3.83

Boris Samorodov bsam at FreeBSD.org
Fri Dec 4 09:00:11 UTC 2009


>Number:         141166
>Category:       ports
>Synopsis:       [patch] sysutils/syslinux: update to version 3.83
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 04 09:00:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Boris Samorodov
>Release:        FreeBSD 9.0-CURRENT i386
>Organization:
InPharmtech, Co.
>Environment:
System: FreeBSD bb.ipt.ru 9.0-CURRENT FreeBSD 9.0-CURRENT #5 r200019: Wed Dec 2 12:21:43 MSK 2009 bsam at bb.ipt.ru:/m/home/bsam/FreeBSD/base/head/obj/m/home/bsam/FreeBSD/base/head/src/sys/BB i386

>Description:
	A new version is available.
>How-To-Repeat:
>Fix:
	Note: files/patch-boot_option is removed.

--- syslinux.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/sysutils/syslinux/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	15 Jun 2009 18:55:42 -0000	1.3
+++ Makefile	4 Dec 2009 08:29:39 -0000
@@ -7,10 +7,10 @@
 #
 
 PORTNAME=	syslinux
-PORTVERSION=	3.72
+PORTVERSION=	3.83
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_KERNEL_ORG}
-MASTER_SITE_SUBDIR=	linux/boot/syslinux/Old
+MASTER_SITE_SUBDIR=	linux/boot/syslinux
 
 MAINTAINER=	luigi at FreeBSD.org
 COMMENT=	Syslinux for FreeBSD
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/sysutils/syslinux/distinfo,v
retrieving revision 1.1
diff -u -r1.1 distinfo
--- distinfo	31 Dec 2008 11:43:34 -0000	1.1
+++ distinfo	4 Dec 2009 08:29:39 -0000
@@ -1,3 +1,3 @@
-MD5 (syslinux-3.72.tar.bz2) = 9858c801ecd36265f4374996324f01a0
-SHA256 (syslinux-3.72.tar.bz2) = dc19ea3e1297468d9b4c579aba1dd491c963a02887f7fb362c95c6f1c0567e90
-SIZE (syslinux-3.72.tar.bz2) = 3262688
+MD5 (syslinux-3.83.tar.bz2) = 069160bc3776eca71a57cabace22bb24
+SHA256 (syslinux-3.83.tar.bz2) = 9ec84d6dcc188f082a875b69796b196f98ea8c0102b55b03123616a285c2d9f9
+SIZE (syslinux-3.83.tar.bz2) = 3184349
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/sysutils/syslinux/pkg-plist,v
retrieving revision 1.1
diff -u -r1.1 pkg-plist
--- pkg-plist	31 Dec 2008 11:43:34 -0000	1.1
+++ pkg-plist	4 Dec 2009 08:29:39 -0000
@@ -8,17 +8,23 @@
 share/syslinux/menu.c32
 share/syslinux/vesamenu.c32
 share/syslinux/chain.c32
+share/syslinux/cmd.c32
+share/syslinux/config.c32
 share/syslinux/cpuidtest.c32
+share/syslinux/disk.c32
 share/syslinux/dmitest.c32
 share/syslinux/elf.c32
 share/syslinux/ethersel.c32
+share/syslinux/gpxecmd.c32
 share/syslinux/ifcpu64.c32
+share/syslinux/kbdmap.c32
 share/syslinux/linux.c32
-share/syslinux/mboot.c32
 share/syslinux/meminfo.c32
 share/syslinux/pcitest.c32
 share/syslinux/pmload.c32
 share/syslinux/reboot.c32
 share/syslinux/sanboot.c32
 share/syslinux/sdi.c32
+share/syslinux/vesainfo.c32
+share/syslinux/vpdtest.c32
 @dirrm share/syslinux
Index: files/patch-1
===================================================================
RCS file: /home/pcvs/ports/sysutils/syslinux/files/patch-1,v
retrieving revision 1.1
diff -u -r1.1 patch-1
--- files/patch-1	31 Dec 2008 11:43:34 -0000	1.1
+++ files/patch-1	4 Dec 2009 08:29:39 -0000
@@ -24,18 +24,6 @@
  # Things to install in /usr/lib/syslinux
  INSTALL_AUX   =	core/pxelinux.0 gpxe/gpxelinux.0 core/isolinux.bin \
  		core/isolinux-debug.bin \
-diff -ubwr ./com32/lib/MCONFIG ../../work/syslinux-3.72/com32/lib/MCONFIG
---- ./com32/lib/MCONFIG	2008-09-26 01:46:02.000000000 +0200
-+++ ../../work/syslinux-3.72/com32/lib/MCONFIG	2008-11-25 11:32:22.000000000 +0100
-@@ -47,7 +47,7 @@
- 	$(CC) $(CFLAGS) -S -o $@ $<
- 
- .S.o:
--	$(CC) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
-+	$(CC) $(filter-out -std=gnu99, $(CFLAGS)) -D__ASSEMBLY__ -c -o $@ $<
- 
- .S.s:
- 	$(CC) $(CFLAGS) -D__ASSEMBLY__ -E -o $@ $<
 diff -ubwr ./com32/libutil/md5.c ../../work/syslinux-3.72/com32/libutil/md5.c
 --- ./com32/libutil/md5.c	2008-09-26 01:46:02.000000000 +0200
 +++ ../../work/syslinux-3.72/com32/libutil/md5.c	2008-11-25 11:32:22.000000000 +0100
@@ -76,67 +64,3 @@
  #include <errno.h>
  #include <limits.h>
  #include <stdbool.h>
-diff -ubwr ./mtools/syslinux.c ../../work/syslinux-3.72/mtools/syslinux.c
---- ./mtools/syslinux.c	2008-09-26 01:46:02.000000000 +0200
-+++ ../../work/syslinux-3.72/mtools/syslinux.c	2008-11-25 11:32:22.000000000 +0100
-@@ -38,6 +38,8 @@
- #include "syslinux.h"
- #include "libfat.h"
- 
-+int verbose=0;
-+
- char *program;			/* Name of program */
- char *device;			/* Device to install to */
- pid_t mypid;
-@@ -159,6 +161,8 @@
-       while ( *opt ) {
- 	if ( *opt == 's' ) {
- 	  stupid = 1;
-+	} else if ( *opt == 'v' ) {
-+	  verbose++;
- 	} else if ( *opt == 'r' ) {
- 	  raid_mode = 1;
- 	} else if ( *opt == 'f' ) {
-@@ -217,11 +221,9 @@
-   fprintf(mtc,
- 	  /* "MTOOLS_NO_VFAT=1\n" */
- 	  "MTOOLS_SKIP_CHECK=1\n" /* Needed for some flash memories */
--	  "drive s:\n"
--	  "  file=\"/proc/%lu/fd/%d\"\n"
-+	  "drive s: file=\"%s\"\n"
- 	  "  offset=%llu\n",
--	  (unsigned long)mypid,
--	  dev_fd,
-+	  device,
- 	  (unsigned long long)filesystem_offset);
-   fclose(mtc);
- 
-@@ -234,8 +236,10 @@
-   }
- 
-   /* This command may fail legitimately */
-+if (verbose) fprintf(stderr, "doing mattrib\n");
-   system("mattrib -h -r -s s:/ldlinux.sys 2>/dev/null");
- 
-+if (verbose) fprintf(stderr, "doing mcopy\n");
-   mtp = popen("mcopy -D o -D O -o - s:/ldlinux.sys", "w");
-   if ( !mtp ||
-        (fwrite(syslinux_ldlinux, 1, syslinux_ldlinux_len, mtp)
-@@ -248,7 +252,9 @@
-    * Now, use libfat to create a block map
-    */
-   fs = libfat_open(libfat_xpread, dev_fd);
-+if (verbose) fprintf(stderr, "libfat_open returns %p\n", fs);
-   ldlinux_cluster = libfat_searchdir(fs, 0, "LDLINUX SYS", NULL);
-+if (verbose) fprintf(stderr, "libfat_searchdir returns %d\n", ldlinux_cluster);
-   secp = sectors;
-   nsectors = 0;
-   s = libfat_clustertosector(fs, ldlinux_cluster);
-@@ -256,6 +262,7 @@
-     *secp++ = s;
-     nsectors++;
-     s = libfat_nextsector(fs, s);
-+if (verbose) fprintf(stderr, "libfat_nextsector returns %d\n", s);
-   }
-   libfat_close(fs);
- 
Index: files/patch-2
===================================================================
RCS file: /home/pcvs/ports/sysutils/syslinux/files/patch-2,v
retrieving revision 1.1
diff -u -r1.1 patch-2
--- files/patch-2	31 Dec 2008 11:43:34 -0000	1.1
+++ files/patch-2	4 Dec 2009 08:29:39 -0000
@@ -17,25 +17,3 @@
 +printf "\nunsigned char *%s = _%s;\n", $table_name, $table_name;
  
  exit 0;
-diff -ubwr ../../work/syslinux-3.72/libinstaller/syslinux.h ./libinstaller/syslinux.h
---- ../../work/syslinux-3.72/libinstaller/syslinux.h	2008-09-26 01:46:02.000000000 +0200
-+++ ./libinstaller/syslinux.h	2008-11-26 13:32:23.000000000 +0100
-@@ -17,15 +17,15 @@
- #include "advconst.h"
- 
- /* The standard boot sector and ldlinux image */
--extern unsigned char syslinux_bootsect[];
-+extern unsigned char *syslinux_bootsect;
- extern unsigned int  syslinux_bootsect_len;
- extern int           syslinux_bootsect_mtime;
- 
--extern unsigned char syslinux_ldlinux[];
-+extern unsigned char *syslinux_ldlinux;
- extern unsigned int  syslinux_ldlinux_len;
- extern int           syslinux_ldlinux_mtime;
- 
--extern unsigned char syslinux_mbr[];
-+extern unsigned char *syslinux_mbr;
- extern unsigned int  syslinux_mbr_len;
- extern int           syslinux_mbr_mtime;
- 
Index: files/patch-boot_option
===================================================================
RCS file: files/patch-boot_option
diff -N files/patch-boot_option
--- files/patch-boot_option	31 Dec 2008 11:43:34 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,65 +0,0 @@
-diff -ubwr ../../work.2/syslinux-3.72/mtools/syslinux.c ./mtools/syslinux.c
---- ../../work.2/syslinux-3.72/mtools/syslinux.c	2008-11-26 13:32:57.000000000 +0100
-+++ ./mtools/syslinux.c	2008-11-26 14:07:05.000000000 +0100
-@@ -123,6 +123,52 @@
-   return xpread(pp, buf, secsize, offset);
- }
- 
-+/*
-+ * load a file to be used as boot image
-+ */
-+static int load_boot_image(const char *name)
-+{
-+  int l, fd;
-+  struct stat sb;
-+  unsigned char *buf;
-+
-+  memset(&sb, 0, sizeof(sb));
-+  fd = open(name, O_RDONLY);
-+  if (fd < 0) {
-+    fprintf(stderr, "cannot open boot image %s\n", name);
-+    return 1;
-+  }
-+  if (fstat(fd, &sb)) {
-+    fprintf(stderr, "cannot stat boot image %s\n", name);
-+    return 1;
-+  }
-+  if ( (sb.st_mode & S_IFREG) == 0) {
-+    fprintf(stderr, "boot image %s is not a file 0x%x\n", name, sb.st_mode);
-+    return 1;
-+  }
-+  if (sb.st_size < 1024 || sb.st_size > 0x8000) {
-+    fprintf(stderr, "boot image %s bad size %lld\n", name, sb.st_size);
-+    return 1;
-+  }
-+  buf = calloc(1, sb.st_size);
-+  if (buf == NULL) {
-+    fprintf(stderr, "malloc failed for boot image %s\n", name);
-+    return 1;
-+  }
-+  l = read(fd, buf, sb.st_size);
-+  if (l != sb.st_size) {
-+    fprintf(stderr, "read failed for boot image %s got %d\n", name, l);
-+    return 1;
-+  }
-+  if (buf[0] != 0xeb || buf[0x200] != 0x0d) {
-+    fprintf(stderr, "bad content for boot image %s\n", name);
-+    return 1;
-+  }
-+  syslinux_bootsect = buf;
-+  syslinux_ldlinux = buf + 512;
-+  syslinux_ldlinux_len = sb.st_size - 512;
-+  return 0;
-+}
- 
- int main(int argc, char *argv[])
- {
-@@ -163,6 +209,8 @@
- 	  stupid = 1;
- 	} else if ( *opt == 'v' ) {
- 	  verbose++;
-+	} else if ( *opt == 'b' && argp[1] ) {
-+	   load_boot_image(*++argp);
- 	} else if ( *opt == 'r' ) {
- 	  raid_mode = 1;
- 	} else if ( *opt == 'f' ) {
Index: files/patch-com32_lib_MCONFIG
===================================================================
RCS file: files/patch-com32_lib_MCONFIG
diff -N files/patch-com32_lib_MCONFIG
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-com32_lib_MCONFIG	4 Dec 2009 08:29:39 -0000
@@ -0,0 +1,11 @@
+--- com32/lib/MCONFIG.orig	2009-10-06 02:06:06.000000000 +0400
++++ com32/lib/MCONFIG	2009-12-04 09:46:19.000000000 +0300
+@@ -45,7 +45,7 @@
+ 	$(CC) $(MAKEDEPS) $(CFLAGS) -S -o $@ $<
+ 
+ .S.o:
+-	$(CC) $(MAKEDEPS) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
++	$(CC) $(MAKEDEPS) $(filter-out -std=gnu99, $(CFLAGS)) -D__ASSEMBLY__ -c -o $@ $<
+ 
+ .S.s:
+ 	$(CC) $(MAKEDEPS) $(CFLAGS) -D__ASSEMBLY__ -E -o $@ $<
Index: files/patch-libinstaller_syslinux.h
===================================================================
RCS file: files/patch-libinstaller_syslinux.h
diff -N files/patch-libinstaller_syslinux.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-libinstaller_syslinux.h	4 Dec 2009 08:29:39 -0000
@@ -0,0 +1,21 @@
+--- libinstaller/syslinux.h.orig	2009-10-06 02:06:06.000000000 +0400
++++ libinstaller/syslinux.h	2009-12-04 10:09:04.000000000 +0300
+@@ -17,15 +17,15 @@
+ #include "advconst.h"
+ 
+ /* The standard boot sector and ldlinux image */
+-extern unsigned char syslinux_bootsect[];
++extern unsigned char *syslinux_bootsect;
+ extern unsigned int syslinux_bootsect_len;
+ extern int syslinux_bootsect_mtime;
+ 
+-extern unsigned char syslinux_ldlinux[];
++extern unsigned char *syslinux_ldlinux;
+ extern unsigned int syslinux_ldlinux_len;
+ extern int syslinux_ldlinux_mtime;
+ 
+-extern unsigned char syslinux_mbr[];
++extern unsigned char *syslinux_mbr;
+ extern unsigned int syslinux_mbr_len;
+ extern int syslinux_mbr_mtime;
+ 
Index: files/patch-mtools_syslinux.c
===================================================================
RCS file: files/patch-mtools_syslinux.c
diff -N files/patch-mtools_syslinux.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-mtools_syslinux.c	4 Dec 2009 08:29:39 -0000
@@ -0,0 +1,119 @@
+--- mtools/syslinux.c.orig	2009-10-06 02:06:06.000000000 +0400
++++ mtools/syslinux.c	2009-12-04 11:18:37.000000000 +0300
+@@ -38,6 +38,8 @@
+ #include "syslinux.h"
+ #include "libfat.h"
+ 
++int verbose=0;
++
+ char *program;			/* Name of program */
+ char *device;			/* Device to install to */
+ pid_t mypid;
+@@ -123,6 +125,53 @@
+     return xpread(pp, buf, secsize, offset);
+ }
+ 
++/*
++ * load a file to be used as boot image
++ */
++static int load_boot_image(const char *name)
++{
++  int l, fd;
++  struct stat sb;
++  unsigned char *buf;
++
++  memset(&sb, 0, sizeof(sb));
++  fd = open(name, O_RDONLY);
++  if (fd < 0) {
++    fprintf(stderr, "cannot open boot image %s\n", name);
++    return 1;
++  }
++  if (fstat(fd, &sb)) {
++    fprintf(stderr, "cannot stat boot image %s\n", name);
++    return 1;
++  }
++  if ( (sb.st_mode & S_IFREG) == 0) {
++    fprintf(stderr, "boot image %s is not a file 0x%x\n", name, sb.st_mode);
++    return 1;
++  }
++  if (sb.st_size < 1024 || sb.st_size > 0x8000) {
++    fprintf(stderr, "boot image %s bad size %lld\n", name, sb.st_size);
++    return 1;
++  }
++  buf = calloc(1, sb.st_size);
++  if (buf == NULL) {
++    fprintf(stderr, "malloc failed for boot image %s\n", name);
++    return 1;
++  }
++  l = read(fd, buf, sb.st_size);
++  if (l != sb.st_size) {
++    fprintf(stderr, "read failed for boot image %s got %d\n", name, l);
++    return 1;
++  }
++  if (buf[0] != 0xeb || buf[0x200] != 0x0d) {
++    fprintf(stderr, "bad content for boot image %s\n", name);
++    return 1;
++  }
++  syslinux_bootsect = buf;
++  syslinux_ldlinux = buf + 512;
++  syslinux_ldlinux_len = sb.st_size - 512;
++  return 0;
++}
++
+ int main(int argc, char *argv[])
+ {
+     static unsigned char sectbuf[512];
+@@ -160,6 +209,10 @@
+ 	    while (*opt) {
+ 		if (*opt == 's') {
+ 		    stupid = 1;
++		} else if ( *opt == 'v' ) {
++		    verbose++;
++		} else if ( *opt == 'b' && argp[1] ) {
++		    load_boot_image(*++argp);
+ 		} else if (*opt == 'r') {
+ 		    raid_mode = 1;
+ 		} else if (*opt == 'f') {
+@@ -220,11 +273,10 @@
+     fprintf(mtc,
+ 	    /* "MTOOLS_NO_VFAT=1\n" */
+ 	    "MTOOLS_SKIP_CHECK=1\n"	/* Needed for some flash memories */
+-	    "drive s:\n"
+-	    "  file=\"/proc/%lu/fd/%d\"\n"
++	    "drive s: file=\"%s\"\n"
+ 	    "  offset=%llu\n",
+ 	    (unsigned long)mypid,
+-	    dev_fd, (unsigned long long)filesystem_offset);
++	    device, (unsigned long long)filesystem_offset);
+     fclose(mtc);
+ 
+     /*
+@@ -236,8 +288,10 @@
+     }
+ 
+     /* This command may fail legitimately */
++    if (verbose) fprintf(stderr, "doing mattrib\n");
+     system("mattrib -h -r -s s:/ldlinux.sys 2>/dev/null");
+ 
++    if (verbose) fprintf(stderr, "doing mcopy\n");
+     mtp = popen("mcopy -D o -D O -o - s:/ldlinux.sys", "w");
+     if (!mtp || (fwrite(syslinux_ldlinux, 1, syslinux_ldlinux_len, mtp)
+ 		 != syslinux_ldlinux_len) ||
+@@ -249,7 +303,9 @@
+      * Now, use libfat to create a block map
+      */
+     fs = libfat_open(libfat_xpread, dev_fd);
++    if (verbose) fprintf(stderr, "libfat_open returns %p\n", fs);
+     ldlinux_cluster = libfat_searchdir(fs, 0, "LDLINUX SYS", NULL);
++    if (verbose) fprintf(stderr, "libfat_searchdir returns %d\n", ldlinux_cluster);
+     secp = sectors;
+     nsectors = 0;
+     s = libfat_clustertosector(fs, ldlinux_cluster);
+@@ -257,6 +313,7 @@
+ 	*secp++ = s;
+ 	nsectors++;
+ 	s = libfat_nextsector(fs, s);
++    if (verbose) fprintf(stderr, "libfat_nextsector returns %d\n", s);
+     }
+     libfat_close(fs);
+ 
--- syslinux.diff ends here ---

-- 
WBR, bsam
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list