Bug 141166 - [patch] sysutils/syslinux: update to version 3.83
Summary: [patch] sysutils/syslinux: update to version 3.83
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Luigi Rizzo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-04 09:00 UTC by Boris Samorodov
Modified: 2010-02-13 17:07 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Samorodov freebsd_committer 2009-12-04 09:00:02 UTC
	A new version is available.

Fix: Note: files/patch-boot_option is removed.



-- 
WBR, bsam--AC8s1HZ89yGgTq9ipAf4fEthg6R4Wx4bmc4hOdzC6YSsC1qd
Content-Type: text/plain; name="syslinux.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="syslinux.diff"

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@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);
+
Comment 1 Edwin Groothuis freebsd_committer 2009-12-04 09:01:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->luigi

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2009-12-08 10:09:12 UTC
luigi       2009-12-08 10:09:02 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/syslinux    Makefile distinfo pkg-plist 
    sysutils/syslinux/files patch-1 patch-2 
  Added files:
    sysutils/syslinux/files patch-com32_lib_MCONFIG 
                            patch-libinstaller_syslinux.h 
                            patch-mtools_syslinux.c 
  Removed files:
    sysutils/syslinux/files patch-boot_option 
  Log:
  Update to 3.83
  This is basically PR ports/141166 by Boris Samorodov, which
  updates the code to version 3.83 and splits the patches
  into smaller chunks to ease future updates.
  
  I have only touched the indentation in one function in patch-mtools_syslinux.c
  
  Submitted-by:   Boris Samorodov
  PR:     141166
  
  Revision  Changes    Path
  1.4       +2 -2      ports/sysutils/syslinux/Makefile
  1.2       +3 -3      ports/sysutils/syslinux/distinfo
  1.2       +0 -76     ports/sysutils/syslinux/files/patch-1
  1.2       +0 -22     ports/sysutils/syslinux/files/patch-2
  1.2       +0 -65     ports/sysutils/syslinux/files/patch-boot_option (dead)
  1.1       +11 -0     ports/sysutils/syslinux/files/patch-com32_lib_MCONFIG (new)
  1.1       +21 -0     ports/sysutils/syslinux/files/patch-libinstaller_syslinux.h (new)
  1.1       +119 -0    ports/sysutils/syslinux/files/patch-mtools_syslinux.c (new)
  1.2       +6 -1      ports/sysutils/syslinux/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Martin Wilke freebsd_committer 2010-02-13 17:07:02 UTC
State Changed
From-To: open->closed

already committed.