Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Oct 2003 04:40:34 +0400
From:      Sergey Matveychuk <sem@ciam.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        andrew@ugh.net.au
Subject:   ports/57555: [PATCH] sysutils/gpart: fix checksum and run on -CURRENT
Message-ID:  <E1A5aTK-00015l-Rx@sem-home.ciam.ru>
Resent-Message-ID: <200310040050.h940o5HD066788@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         57555
>Category:       ports
>Synopsis:       [PATCH] sysutils/gpart: fix checksum and run on -CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 03 17:50:05 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Matveychuk
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD sem-home.ciam.ru 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Sat Sep 13 12:21:16 MSD 2003
>Description:
- fix md5 checksum
- fix run on current (couldn't calculate disk geometry)
- remove dead URLs from MASTER_SITES
- change obsoleted disk name wd -> ad in manpage example

add files:
  files/patch-ac
  files/patch-ad

Port maintainer (andrew@ugh.net.au) is cc'd.

Generated with FreeBSD Port Tools 0.26
>How-To-Repeat:
>Fix:

--- gpart-0.1h.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/gpart.orig/Makefile /usr/ports/sysutils/gpart/Makefile
--- /usr/ports/sysutils/gpart.orig/Makefile	Sat Oct  4 03:56:22 2003
+++ /usr/ports/sysutils/gpart/Makefile	Sat Oct  4 03:59:51 2003
@@ -8,9 +8,7 @@
 PORTNAME=	gpart
 PORTVERSION=	0.1h
 CATEGORIES=	sysutils
-MASTER_SITES=	http://home.pages.de/~michab/gpart/ \
-		http://www.stud.uni-hannover.de/user/76201/gpart/ \
-		${MASTER_SITE_SUNSITE}
+MASTER_SITES=	${MASTER_SITE_SUNSITE}
 MASTER_SITE_SUBDIR=	system/filesystems
 
 MAINTAINER=	andrew@ugh.net.au
diff -ruN --exclude=CVS /usr/ports/sysutils/gpart.orig/distinfo /usr/ports/sysutils/gpart/distinfo
--- /usr/ports/sysutils/gpart.orig/distinfo	Sat Oct  4 03:56:22 2003
+++ /usr/ports/sysutils/gpart/distinfo	Sat Oct  4 04:00:01 2003
@@ -1 +1 @@
-MD5 (gpart-0.1h.tar.gz) = ee3a2d2dde70bcf404eb354b3d1ee6d4
+MD5 (gpart-0.1h.tar.gz) = 23a7620394033e478d0d03c392c405bd
diff -ruN --exclude=CVS /usr/ports/sysutils/gpart.orig/files/patch-ac /usr/ports/sysutils/gpart/files/patch-ac
--- /usr/ports/sysutils/gpart.orig/files/patch-ac	Thu Jan  1 03:00:00 1970
+++ /usr/ports/sysutils/gpart/files/patch-ac	Sat Oct  4 04:34:25 2003
@@ -0,0 +1,51 @@
+--- src/disku.c.orig	Sat Oct  4 04:33:32 2003
++++ src/disku.c	Sat Oct  4 04:33:38 2003
+@@ -28,7 +28,11 @@
+ 
+ #if defined(__FreeBSD__)
+ #include <errno.h>
++#include <sys/param.h>
+ #include <sys/disklabel.h>
++#if __FreeBSD_version >= 500040
++#include <sys/disk.h>
++#endif
+ #endif
+ 
+ 
+@@ -61,12 +65,36 @@
+ #endif
+ 
+ #if defined(__FreeBSD__)
++#if __FreeBSD_version < 500040
+ 	struct disklabel	dl;
+ 	if (ioctl(d->d_fd,DIOCGDINFO,&dl) == -1)
+ 		pr(FATAL,EM_IOCTLFAILED,"DIOCGDINFO",strerror(errno));
+ 	g.d_c = dl.d_ncylinders;
+ 	g.d_h = dl.d_ntracks;
+ 	g.d_s = dl.d_nsectors;
++#else
++	struct disklabel	loclab;
++	u_int    u;
++
++	if (ioctl(d->d_fd, DIOCGFWSECTORS, &u) == 0)
++		loclab.d_nsectors = u;
++	else
++		loclab.d_nsectors = 63;
++	if (ioctl(d->d_fd, DIOCGFWHEADS, &u) == 0)
++		loclab.d_ntracks = u;
++	else if (loclab.d_secperunit <= 63*1*1024)
++		loclab.d_ntracks = 1;
++	else if (loclab.d_secperunit <= 63*16*1024)
++		loclab.d_ntracks = 16;
++	else
++		loclab.d_ntracks = 255;
++	loclab.d_secpercyl = loclab.d_ntracks * loclab.d_nsectors;
++	loclab.d_ncylinders = loclab.d_secperunit / loclab.d_secpercyl;
++
++        g.d_c = loclab.d_ncylinders;
++	g.d_h = loclab.d_ntracks;
++	g.d_s = loclab.d_nsectors;
++#endif
+ #endif
+ 
+ 	return (&g);
diff -ruN --exclude=CVS /usr/ports/sysutils/gpart.orig/files/patch-ad /usr/ports/sysutils/gpart/files/patch-ad
--- /usr/ports/sysutils/gpart.orig/files/patch-ad	Thu Jan  1 03:00:00 1970
+++ /usr/ports/sysutils/gpart/files/patch-ad	Sat Oct  4 04:35:07 2003
@@ -0,0 +1,11 @@
+--- man/gpart.man.orig	Sat Oct  4 04:34:37 2003
++++ man/gpart.man	Sat Oct  4 04:34:43 2003
+@@ -378,7 +378,7 @@
+ drive without starting the scan loop in FreeBSD type
+ 
+ .RS
+-gpart -vvd /dev/wd2
++gpart -vvd /dev/ad2
+ .RE
+ .RE
+ 
--- gpart-0.1h.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?E1A5aTK-00015l-Rx>