packages: gfs/gfs.spec, gfs/gfs-blkid.patch (NEW) - updated to 2.03.10 (the...

qboosh qboosh at pld-linux.org
Mon May 23 17:03:21 CEST 2011


Author: qboosh                       Date: Mon May 23 15:03:21 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- updated to 2.03.10 (the last 2nd generation cluster release)
- added blkid patch (migrate from obsolete libvolume_id to libblkid)

---- Files affected:
packages/gfs:
   gfs.spec (1.13 -> 1.14) , gfs-blkid.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/gfs/gfs.spec
diff -u packages/gfs/gfs.spec:1.13 packages/gfs/gfs.spec:1.14
--- packages/gfs/gfs.spec:1.13	Tue Apr  3 02:10:12 2007
+++ packages/gfs/gfs.spec	Mon May 23 17:03:15 2011
@@ -2,17 +2,19 @@
 Summary:	Shared-disk cluster file system
 Summary(pl.UTF-8):	Klastrowy system plików na współdzielonym dysku
 Name:		gfs
-Version:	2.00.00
+Version:	2.03.10
 Release:	1
 Epoch:		1
-License:	GPL v2
+License:	GPL v2+
 Group:		Applications/System
 Source0:	ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
-# Source0-md5:	2ef3f4ba9d3c87b50adfc9b406171085
+# Source0-md5:	379b560096e315d4b52e238a5c72ba4a
+Patch0:		%{name}-blkid.patch
 URL:		http://sources.redhat.com/cluster/gfs/
-BuildRequires:	libvolume_id-devel
+BuildRequires:	libblkid-devel >= 2.16
 BuildRequires:	ncurses-devel
 BuildRequires:	perl-base
+Requires:	libblkid >= 2.16
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_sbindir	/sbin
@@ -40,26 +42,29 @@
 
 %prep
 %setup -q -n cluster-%{version}
-install %{name}-kernel/src/gfs/{gfs_ioctl.h,gfs_ondisk.h} %{name}/include
-cd %{name}
-
-%{__perl} -pi -e 's,-Wall,%{rpmcflags} -I/usr/include/ncurses -Wall,' make/defines.mk.input
-%{__perl} -pi -e 's/-O2 //' gfs_{mkfs,quota,tool}/Makefile
+%patch0 -p1
 
 %build
-cd %{name}
 ./configure \
+	--cc="%{__cc}" \
+	--cflags="%{rpmcflags} -Wall" \
+	--ldflags="%{rpmldflags}" \
+	--incdir=%{_includedir} \
+	--ncursesincdir=%{_includedir}/ncurses \
 	--libdir=%{_libdir} \
+	--libexecdir=%{_libdir} \
 	--mandir=%{_mandir} \
 	--prefix=%{_prefix} \
-	--sbindir=%{_sbindir}
-%{__make}
+	--sbindir=%{_sbindir} \
+	--without_gfs2 \
+	--without_gnbd \
+	--without_kernel_modules
+%{__make} -C %{name}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-cd %{name}
 
-%{__make} install \
+%{__make} -C %{name} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 %clean
@@ -67,9 +72,15 @@
 
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_sbindir}/*
+%attr(755,root,root) %{_sbindir}/fsck.gfs
+%attr(755,root,root) %{_sbindir}/gfs_*
+%attr(755,root,root) %{_sbindir}/mkfs.gfs
+%attr(755,root,root) %{_sbindir}/mount.gfs
+%attr(755,root,root) %{_sbindir}/umount.gfs
+# TODO: PLDify
 #%attr(754,root,root) /etc/rc.d/init.d/gfs
-%{_mandir}/man?/*
+%{_mandir}/man8/gfs.8*
+%{_mandir}/man8/gfs_*.8*
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -77,6 +88,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.14  2011/05/23 15:03:15  qboosh
+- updated to 2.03.10 (the last 2nd generation cluster release)
+- added blkid patch (migrate from obsolete libvolume_id to libblkid)
+
 Revision 1.13  2007/04/03 00:10:12  zbyniu
 - up to 2.00.00 (a little obsoleted by gfs2)
 

================================================================
Index: packages/gfs/gfs-blkid.patch
diff -u /dev/null packages/gfs/gfs-blkid.patch:1.1
--- /dev/null	Mon May 23 17:03:21 2011
+++ packages/gfs/gfs-blkid.patch	Mon May 23 17:03:15 2011
@@ -0,0 +1,70 @@
+--- cluster-2.03.10/gfs/gfs_mkfs/main.c.orig	2008-12-09 09:36:04.000000000 +0100
++++ cluster-2.03.10/gfs/gfs_mkfs/main.c	2011-05-23 16:54:19.847098734 +0200
+@@ -10,11 +10,11 @@
+ #include <assert.h>
+ #include <time.h>
+ #include <mntent.h>
++#include <blkid/blkid.h>
+ 
+ #include "global.h"
+ #include "gfs_ondisk.h"
+ #include "osi_list.h"
+-#include "libvolume_id.h"
+ #include "libgfs.h"
+ #include "copyright.cf"
+ 
+@@ -207,34 +207,36 @@ static void decode_arguments(int argc, c
+ void are_you_sure(commandline_t *comline)
+ {
+ 	char input[32];
+-	struct volume_id *vid = NULL;
++	blkid_probe pr;
+ 	int fd;
+ 
+ 	fd = open(comline->device, O_RDONLY);
+ 	if (fd < 0)
+ 		die("Error: device %s not found.\n", comline->device);
+-	vid = volume_id_open_fd(fd);
+-	if (vid == NULL) {
++	pr = blkid_new_probe();
++	if (pr == NULL) {
+ 		close(fd);
+ 		die("error identifying the contents of %s: %s\n",
+ 		    comline->device, strerror(errno));
+ 	}
+ 	printf("This will destroy any data on %s.\n",
+ 	       comline->device);
+-	if (volume_id_probe_all(vid, 0, MKFS_DEFAULT_BSIZE) == 0) {
++	blkid_probe_set_request(pr, BLKID_PROBREQ_TYPE | BLKID_PROBREQ_USAGE);
++	if ((blkid_probe_set_device(pr, fd, 0, MKFS_DEFAULT_BSIZE) == 0) &&
++	    (blkid_do_safeprobe(pr) == 0)) {
+ 		const char *fstype, *fsusage;
+ 		int rc;
+ 
+-		rc = volume_id_get_type(vid, &fstype);
++		rc = blkid_probe_lookup_value(pr, "TYPE", &fstype, NULL);
+ 		if (rc) {
+-			rc = volume_id_get_usage(vid, &fsusage);
++			rc = blkid_probe_lookup_value(pr, "USAGE", &fsusage, NULL);
+ 			if (!rc || strncmp(fsusage, "other", 5) == 0)
+ 				fsusage = "partition";
+ 			printf("  It appears to contain a %s %s.\n", fstype,
+ 			       fsusage);
+ 		}
+ 	}
+-	volume_id_close(vid);
++	blkid_free_probe(pr);
+ 	close(fd);
+ 	printf("\nAre you sure you want to proceed? [y/n] ");
+ 	if (fgets(input, 32, stdin) == NULL || input[0] != 'y')
+--- cluster-2.03.10/gfs/gfs_mkfs/Makefile.orig	2008-12-09 09:36:04.000000000 +0100
++++ cluster-2.03.10/gfs/gfs_mkfs/Makefile	2011-05-23 16:54:37.883766007 +0200
+@@ -24,7 +24,7 @@ CFLAGS += -I${gfskincdir} -I${volidincdi
+ CFLAGS += -I$(S)/../include -I$(S)/../libgfs
+ CFLAGS += -I${incdir}
+ 
+-LDFLAGS += -L${volidlibdir} -lvolume_id
++LDFLAGS += -L${volidlibdir} -lblkid
+ LDFLAGS += -L../libgfs -lgfs
+ 
+ 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gfs/gfs.spec?r1=1.13&r2=1.14&f=u



More information about the pld-cvs-commit mailing list