aboutsummaryrefslogtreecommitdiff
path: root/sysutils/syslinux
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2009-12-08 10:09:02 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2009-12-08 10:09:02 +0000
commit5a3e648d5e5c62786eaf465c2a3160e68f9ea2f1 (patch)
tree65439d6a8dfa4bc244f52b346a2db38812a89f65 /sysutils/syslinux
parentc62af3a812cf69a132918ea25a0f1ce6ff5a4c17 (diff)
downloadports-5a3e648d5e5c62786eaf465c2a3160e68f9ea2f1.tar.gz
ports-5a3e648d5e5c62786eaf465c2a3160e68f9ea2f1.zip
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
Notes
Notes: svn path=/head/; revision=245401
Diffstat (limited to 'sysutils/syslinux')
-rw-r--r--sysutils/syslinux/Makefile4
-rw-r--r--sysutils/syslinux/distinfo6
-rw-r--r--sysutils/syslinux/files/patch-176
-rw-r--r--sysutils/syslinux/files/patch-222
-rw-r--r--sysutils/syslinux/files/patch-boot_option65
-rw-r--r--sysutils/syslinux/files/patch-com32_lib_MCONFIG11
-rw-r--r--sysutils/syslinux/files/patch-libinstaller_syslinux.h21
-rw-r--r--sysutils/syslinux/files/patch-mtools_syslinux.c119
-rw-r--r--sysutils/syslinux/pkg-plist7
9 files changed, 162 insertions, 169 deletions
diff --git a/sysutils/syslinux/Makefile b/sysutils/syslinux/Makefile
index 1e37aff9a04c..f9f51d254a52 100644
--- a/sysutils/syslinux/Makefile
+++ b/sysutils/syslinux/Makefile
@@ -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
diff --git a/sysutils/syslinux/distinfo b/sysutils/syslinux/distinfo
index fca55c32f6ac..047429c7a803 100644
--- a/sysutils/syslinux/distinfo
+++ b/sysutils/syslinux/distinfo
@@ -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
diff --git a/sysutils/syslinux/files/patch-1 b/sysutils/syslinux/files/patch-1
index 75f5755c0c29..e2a6061ef28a 100644
--- a/sysutils/syslinux/files/patch-1
+++ b/sysutils/syslinux/files/patch-1
@@ -24,18 +24,6 @@ diff -ubwr ./Makefile ../../work/syslinux-3.72/Makefile
# 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 @@ diff -ubwr ./com32/libutil/sha512crypt.c ../../work/syslinux-3.72/com32/libutil/
#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);
-
diff --git a/sysutils/syslinux/files/patch-2 b/sysutils/syslinux/files/patch-2
index 4242be4ea0ad..0f1939ca2ac5 100644
--- a/sysutils/syslinux/files/patch-2
+++ b/sysutils/syslinux/files/patch-2
@@ -17,25 +17,3 @@ diff -ubwr ../../work/syslinux-3.72/libinstaller/bin2c.pl ./libinstaller/bin2c.p
+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;
-
diff --git a/sysutils/syslinux/files/patch-boot_option b/sysutils/syslinux/files/patch-boot_option
deleted file mode 100644
index 93e8f9a3bdba..000000000000
--- a/sysutils/syslinux/files/patch-boot_option
+++ /dev/null
@@ -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' ) {
diff --git a/sysutils/syslinux/files/patch-com32_lib_MCONFIG b/sysutils/syslinux/files/patch-com32_lib_MCONFIG
new file mode 100644
index 000000000000..85bf06474295
--- /dev/null
+++ b/sysutils/syslinux/files/patch-com32_lib_MCONFIG
@@ -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 $@ $<
diff --git a/sysutils/syslinux/files/patch-libinstaller_syslinux.h b/sysutils/syslinux/files/patch-libinstaller_syslinux.h
new file mode 100644
index 000000000000..484e97f70b92
--- /dev/null
+++ b/sysutils/syslinux/files/patch-libinstaller_syslinux.h
@@ -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;
+
diff --git a/sysutils/syslinux/files/patch-mtools_syslinux.c b/sysutils/syslinux/files/patch-mtools_syslinux.c
new file mode 100644
index 000000000000..6c5c99648f0e
--- /dev/null
+++ b/sysutils/syslinux/files/patch-mtools_syslinux.c
@@ -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);
+
diff --git a/sysutils/syslinux/pkg-plist b/sysutils/syslinux/pkg-plist
index 8d8663014e54..1f361768cb22 100644
--- a/sysutils/syslinux/pkg-plist
+++ b/sysutils/syslinux/pkg-plist
@@ -8,17 +8,22 @@ share/syslinux/memdisk
share/syslinux/menu.c32
share/syslinux/vesamenu.c32
share/syslinux/chain.c32
+share/syslinux/cmd.c32
share/syslinux/cpuidtest.c32
+share/syslinux/disk.c32
share/syslinux/dmitest.c32
share/syslinux/elf.c32
share/syslinux/ethersel.c32
share/syslinux/ifcpu64.c32
+share/syslinux/kbdmap.c32
share/syslinux/linux.c32
-share/syslinux/mboot.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