Date: Sat, 31 Jan 2004 06:47:23 +0300 From: Sergey Matveychuk <sem@ciam.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/62141: [MAINTAINER] sysutils/grub: changes Message-ID: <E1Amm6N-0004VG-MF@Current.sem-home.ciam.ru> Resent-Message-ID: <200401310350.i0V3oBie020259@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 62141 >Category: ports >Synopsis: [MAINTAINER] sysutils/grub: changes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Fri Jan 30 19:50:11 PST 2004 >Closed-Date: >Last-Modified: >Originator: Sergey Matveychuk >Release: FreeBSD 5.2-RELEASE i386 >Organization: >Environment: System: FreeBSD Current.sem-home.ciam.ru 5.2-RELEASE FreeBSD 5.2-RELEASE #6: Sat Jan 17 16:12:04 MSK 2004 >Description: [DESCRIBE CHANGES] * add missing manpage (noted by krion@) * fixup working with /dev/fd0 (partly PR/51946) * add patch from PR/52310 - send a DHCP CLASS_ID tag 2 committer: close those PRs please. Added file(s): - files/patch-netboot_main.c Generated with FreeBSD Port Tools 0.50 >How-To-Repeat: >Fix: --- grub-0.94_1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/sysutils/grub.orig/Makefile /usr/ports/sysutils/grub/Makefile --- /usr/ports/sysutils/grub.orig/Makefile Sat Jan 31 03:59:18 2004 +++ /usr/ports/sysutils/grub/Makefile Sat Jan 31 04:07:19 2004 @@ -7,6 +7,7 @@ PORTNAME= grub PORTVERSION= 0.94 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ftp://alpha.gnu.org/gnu/grub/ @@ -19,7 +20,7 @@ ONLY_FOR_ARCHS= i386 MAN1= mbchk.1 -MAN8= grub.8 grub-install.8 grub-md5-crypt.8 +MAN8= grub.8 grub-install.8 grub-md5-crypt.8 grub-terminfo.8 INFO= grub multiboot #.if defined(WITH_SPLASHIMAGE) diff -ruN --exclude=CVS /usr/ports/sysutils/grub.orig/files/patch-lib_device.c /usr/ports/sysutils/grub/files/patch-lib_device.c --- /usr/ports/sysutils/grub.orig/files/patch-lib_device.c Sat Jan 31 03:59:12 2004 +++ /usr/ports/sysutils/grub/files/patch-lib_device.c Sat Jan 31 06:33:19 2004 @@ -1,5 +1,5 @@ ---- lib/device.c.orig Sat Jan 24 01:52:56 2004 -+++ lib/device.c Sun Jan 25 00:07:02 2004 +--- lib/device.c.orig Sat Jan 17 18:57:57 2004 ++++ lib/device.c Sat Jan 31 06:32:24 2004 @@ -78,6 +78,12 @@ # include <sys/ioctl.h> /* ioctl */ # include <sys/disklabel.h> @@ -13,7 +13,26 @@ #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ */ #ifdef HAVE_OPENDISK -@@ -123,6 +129,7 @@ +@@ -94,8 +100,16 @@ + { + int fd; + +- fd = open (map[drive], O_RDONLY); +- assert (fd >= 0); ++#if defined(__FreeBSD__) ++ if(geom->flags == -1) ++ { ++#endif ++ fd = open (map[drive], O_RDONLY); ++ assert (fd >= 0); ++#if defined(__FreeBSD__) ++ } else ++ fd = geom->flags; ++#endif + + #if defined(__linux__) + /* Linux */ +@@ -123,6 +137,7 @@ /* FreeBSD, NetBSD or OpenBSD */ { struct disklabel hdg; @@ -21,10 +40,11 @@ if (ioctl (fd, DIOCGDINFO, &hdg)) goto fail; -@@ -131,6 +138,38 @@ +@@ -131,7 +146,40 @@ geom->sectors = hdg.d_nsectors; geom->total_sectors = hdg.d_secperunit; +- close (fd); +#else + u_int u, secsize; + off_t mediasize; @@ -57,10 +77,24 @@ + geom->sectors = hdg.d_nsectors; + geom->total_sectors = hdg.d_secperunit; +#endif - close (fd); ++ if(geom->flags == -1) ++ close (fd); return; } -@@ -233,7 +272,7 @@ + +@@ -203,7 +251,11 @@ + sprintf (name, "/dev/fd%d", unit); + #elif defined(__FreeBSD__) + /* FreeBSD */ ++#if __FreeBSD__ >= 4 ++ sprintf (name, "/dev/fd%d", unit); ++#else + sprintf (name, "/dev/rfd%d", unit); ++#endif + #elif defined(__NetBSD__) + /* NetBSD */ + /* opendisk() doesn't work for floppies. */ +@@ -233,7 +285,7 @@ #elif defined(__FreeBSD__) /* FreeBSD */ # if __FreeBSD__ >= 4 @@ -69,7 +103,7 @@ # else /* __FreeBSD__ <= 3 */ sprintf (name, "/dev/rwd%d", unit); # endif /* __FreeBSD__ <= 3 */ -@@ -274,7 +313,11 @@ +@@ -274,7 +326,11 @@ sprintf (name, "/dev/sd%d", unit); #elif defined(__FreeBSD__) /* FreeBSD */ diff -ruN --exclude=CVS /usr/ports/sysutils/grub.orig/files/patch-netboot_main.c /usr/ports/sysutils/grub/files/patch-netboot_main.c --- /usr/ports/sysutils/grub.orig/files/patch-netboot_main.c Thu Jan 1 03:00:00 1970 +++ /usr/ports/sysutils/grub/files/patch-netboot_main.c Sat Jan 31 04:15:50 2004 @@ -0,0 +1,18 @@ +--- netboot/main.c.orig Sat Jan 18 21:13:02 2003 ++++ netboot/main.c Sat Jan 18 21:13:27 2003 +@@ -82,6 +82,7 @@ + RFC2132_MSG_TYPE, 1, DHCPDISCOVER, + RFC2132_MAX_SIZE,2, /* request as much as we can */ + ETH_MAX_MTU / 256, ETH_MAX_MTU % 256, ++ RFC2132_VENDOR_CLASS_ID,4,'G','R','U','B', + RFC2132_PARAM_LIST, 4, RFC1533_NETMASK, RFC1533_GATEWAY, + RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH + }; +@@ -93,6 +94,7 @@ + RFC2132_REQ_ADDR, 4, 0, 0, 0, 0, + RFC2132_MAX_SIZE, 2, /* request as much as we can */ + ETH_MAX_MTU / 256, ETH_MAX_MTU % 256, ++ RFC2132_VENDOR_CLASS_ID,4,'G','R','U','B', + /* request parameters */ + RFC2132_PARAM_LIST, + /* 4 standard + 2 vendortags */ --- grub-0.94_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Amm6N-0004VG-MF>