From 849945586e8f7da72bc34d390c069100294cff1f Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Wed, 11 Sep 2013 18:45:18 +0200 Subject: [PATCH 1/2] - new, for cluster4 --- gfs2-utils.spec | 101 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 gfs2-utils.spec diff --git a/gfs2-utils.spec b/gfs2-utils.spec new file mode 100644 index 0000000..061130f --- /dev/null +++ b/gfs2-utils.spec @@ -0,0 +1,101 @@ +# TODO: PLDify and install init script(?) +Summary: Global File System 2 (GFS2) utilities +Summary(pl.UTF-8): Narzędzia do systemu plików GFS2 (Global File System 2) +Name: gfs2-utils +Version: 3.1.6 +Release: 1 +License: LGPL v2.1+ (libraries), GPL v2+ (applications) +Group: Applications/System +Source0: https://fedorahosted.org/releases/g/f/gfs2-utils/%{name}-%{version}.tar.gz +# Source0-md5: 9d47c272298c62868dd49c7b1f4bcefc +URL: https://fedorahosted.org/cluster/wiki/HomePage +BuildRequires: autoconf >= 2.63 +BuildRequires: automake >= 1:1.11 +BuildRequires: bison +BuildRequires: flex +BuildRequires: gettext-devel >= 0.18 +BuildRequires: libblkid-devel +BuildRequires: libtool >= 2:2.2.6 +# for gfs2 headers +BuildRequires: linux-libc-headers >= 7:3.3 +BuildRequires: ncurses-devel >= 5 +BuildRequires: pkgconfig +BuildRequires: sed >= 4.0 +BuildRequires: zlib-devel +Requires: uname(release) >= 3.3 +Obsoletes: gfs2 < 1:3 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +GFS2 is a cluster file system. It allows a cluster of computers to +simultaneously use a block device that is shared between them (with +FC, iSCSI, NBD, etc). GFS2 reads and writes to the block device like a +local file system, but also uses a lock module to allow the computers +coordinate their I/O so file system consistency is maintained. One of +the nifty features of GFS2 is perfect consistency - changes made to +the file system on one machine show up immediately on all other +machines in the cluster. + +%description -l pl.UTF-8 +GFS2 to klastrowy system plików. Pozwala klastrowi komputerów +jednocześnie używać urządzenia blokowego współdzielonego między sobą +(poprzez FC, iSCSI, NBD itp.). GFS2 wykonuje odczyty i zapisy na +urządzeniu blokowym tak, jak na lokalnym systemie plików, ale +wykorzystuje moduł blokujący, aby umożliwić komputerom koordynację +operacji wejścia-wyjścia w celu zachowania spójności systemu plików. +Jedną z bardziej istotnych cech systemu plików GFS2 jest idealna +spójność - zmiany wykonane na jednej maszynie są natychmiast widoczne +na wszystkich innych maszynach w klastrze. + +%prep +%setup -q -n gfs2-utils + +%{__sed} -i -e 's, po/Makefile.in$,,' configure.ac +%{__sed} -i -e '1s,#!/usr/bin/env python,#!/usr/bin/python,' gfs2/scripts/gfs2_{lockcapture,trace} + +%build +%{__gettextize} +%{__libtoolize} +%{__aclocal} -I m4 +%{__autoconf} +%{__autoheader} +%{__automake} +%configure \ + --disable-silent-rules + +%{__make} + +%install +rm -rf $RPM_BUILD_ROOT + +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +# packaged as %doc +%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gfs2-utils + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc doc/{COPYRIGHT,README.contributing,README.licence,gfs2.txt,journaling.txt} +%attr(755,root,root) /sbin/fsck.gfs2 +%attr(755,root,root) /sbin/gfs2_grow +%attr(755,root,root) /sbin/gfs2_jadd +%attr(755,root,root) /sbin/gfs2_lockcapture +%attr(755,root,root) /sbin/gfs2_trace +%attr(755,root,root) /sbin/mkfs.gfs2 +%attr(755,root,root) %{_sbindir}/gfs2_convert +%attr(755,root,root) %{_sbindir}/gfs2_edit +%attr(755,root,root) %{_sbindir}/tunegfs2 +%{_mandir}/man5/gfs2.5* +%{_mandir}/man8/fsck.gfs2.8* +%{_mandir}/man8/gfs2_convert.8* +%{_mandir}/man8/gfs2_edit.8* +%{_mandir}/man8/gfs2_grow.8* +%{_mandir}/man8/gfs2_jadd.8* +%{_mandir}/man8/gfs2_lockcapture.8* +%{_mandir}/man8/gfs2_trace.8* +%{_mandir}/man8/mkfs.gfs2.8* +%{_mandir}/man8/tunegfs2.8* -- 2.43.0 From 3dabe3b3c167c51d0d07fc0c17c02ef4e16dbba5 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 17 May 2018 19:26:01 +0200 Subject: [PATCH 2/2] - new URLs, updated to 3.1.10 - added link patch (fixes build with as-needed) --- gfs2-utils-link.patch | 115 ++++++++++++++++++++++++++++++++++++++++++ gfs2-utils.spec | 25 ++++++--- 2 files changed, 134 insertions(+), 6 deletions(-) create mode 100644 gfs2-utils-link.patch diff --git a/gfs2-utils-link.patch b/gfs2-utils-link.patch new file mode 100644 index 0000000..87676a1 --- /dev/null +++ b/gfs2-utils-link.patch @@ -0,0 +1,115 @@ +--- gfs2-utils-3.1.10/gfs2/libgfs2/Makefile.am.orig 2017-03-28 16:08:39.000000000 +0200 ++++ gfs2-utils-3.1.10/gfs2/libgfs2/Makefile.am 2018-05-16 22:11:05.220787174 +0200 +@@ -52,8 +52,7 @@ + $(uuid_CFLAGS) + + gfs2l_SOURCES = gfs2l.c +-gfs2l_LDADD = libgfs2.la +-gfs2l_LDFLAGS = $(uuid_LIBS) ++gfs2l_LDADD = libgfs2.la $(uuid_LIBS) + gfs2l_CPPFLAGS = \ + -I$(top_srcdir)/gfs2/include \ + -D_FILE_OFFSET_BITS=64 +--- gfs2-utils-3.1.10/gfs2/convert/Makefile.am.orig 2017-03-28 16:08:39.000000000 +0200 ++++ gfs2-utils-3.1.10/gfs2/convert/Makefile.am 2018-05-16 22:14:39.020784730 +0200 +@@ -7,5 +7,4 @@ + -I$(top_srcdir)/gfs2/include \ + -I$(top_srcdir)/gfs2/libgfs2 + +-gfs2_convert_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la +-gfs2_convert_LDFLAGS = $(uuid_LIBS) ++gfs2_convert_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la $(uuid_LIBS) +--- gfs2-utils-3.1.10/gfs2/fsck/Makefile.am.orig 2017-03-28 16:08:39.000000000 +0200 ++++ gfs2-utils-3.1.10/gfs2/fsck/Makefile.am 2018-05-17 05:29:56.060486556 +0200 +@@ -36,6 +36,4 @@ + -I$(top_srcdir)/gfs2/libgfs2 + + fsck_gfs2_LDADD = \ +- $(top_builddir)/gfs2/libgfs2/libgfs2.la +-fsck_gfs2_LDFLAGS = \ +- $(uuid_LIBS) ++ $(top_builddir)/gfs2/libgfs2/libgfs2.la $(uuid_LIBS) +--- gfs2-utils-3.1.10/gfs2/mkfs/Makefile.am.orig 2017-03-28 16:08:39.000000000 +0200 ++++ gfs2-utils-3.1.10/gfs2/mkfs/Makefile.am 2018-05-17 05:35:10.050482945 +0200 +@@ -25,10 +25,7 @@ + mkfs_gfs2_CFLAGS = \ + $(blkid_CFLAGS) \ + $(uuid_CFLAGS) +-mkfs_gfs2_LDFLAGS = \ +- $(blkid_LIBS) \ +- $(uuid_LIBS) +-mkfs_gfs2_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la ++mkfs_gfs2_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la $(blkid_LIBS) $(uuid_LIBS) + + gfs2_grow_SOURCES = \ + main_grow.c \ +@@ -36,16 +33,12 @@ + + gfs2_grow_CPPFLAGS = $(COMMON_CPPFLAGS) + gfs2_grow_CFLAGS = $(blkid_CFLAGS) +-gfs2_grow_LDFLAGS = \ +- $(blkid_LIBS) \ +- $(uuid_LIBS) +-gfs2_grow_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la ++gfs2_grow_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la $(blkid_LIBS) $(uuid_LIBS) + + gfs2_jadd_SOURCES = \ + main_jadd.c \ + metafs.c + + gfs2_jadd_CPPFLAGS = $(COMMON_CPPFLAGS) +-gfs2_jadd_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la +-gfs2_jadd_LDFLAGS = $(uuid_LIBS) ++gfs2_jadd_LDADD = $(top_builddir)/gfs2/libgfs2/libgfs2.la $(uuid_LIBS) + +--- gfs2-utils-3.1.10/gfs2/glocktop/Makefile.am.orig 2017-03-28 16:08:39.000000000 +0200 ++++ gfs2-utils-3.1.10/gfs2/glocktop/Makefile.am 2018-05-17 05:37:16.380481493 +0200 +@@ -9,10 +9,6 @@ + glocktop_CFLAGS = \ + $(ncurses_CFLAGS) + +-glocktop_LDFLAGS = \ +- $(ncurses_LIBS) \ +- $(uuid_LIBS) +- + glocktop_CPPFLAGS = \ + -D_FILE_OFFSET_BITS=64 \ + -D_LARGEFILE64_SOURCE \ +@@ -21,4 +17,4 @@ + -I$(top_srcdir)/gfs2/libgfs2 + + glocktop_LDADD = \ +- $(top_builddir)/gfs2/libgfs2/libgfs2.la ++ $(top_builddir)/gfs2/libgfs2/libgfs2.la $(ncurses_LIBS) $(uuid_LIBS) +--- gfs2-utils-3.1.10/tests/Makefile.am.orig 2017-03-28 16:08:39.000000000 +0200 ++++ gfs2-utils-3.1.10/tests/Makefile.am 2018-05-17 05:39:56.260479669 +0200 +@@ -22,9 +22,7 @@ + -I$(top_srcdir)/gfs2/libgfs2 \ + -I$(top_srcdir)/gfs2/include + nukerg_LDADD = \ +- $(top_builddir)/gfs2/libgfs2/libgfs2.la +-nukerg_LDFLAGS = \ +- $(uuid_LIBS) ++ $(top_builddir)/gfs2/libgfs2/libgfs2.la $(uuid_LIBS) + + if HAVE_CHECK + UNIT_TESTS = \ +@@ -50,16 +48,14 @@ + $(UNIT_SOURCES) \ + check_meta.c + check_meta_CFLAGS = $(UNIT_CFLAGS) +-check_meta_LDADD = $(UNIT_LDADD) +-check_meta_LDFLAGS = $(uuid_LIBS) ++check_meta_LDADD = $(UNIT_LDADD) $(uuid_LIBS) + check_meta_CPPFLAGS = $(UNIT_CPPFLAGS) + + check_rgrp_SOURCES = \ + $(UNIT_SOURCES) \ + check_rgrp.c + check_rgrp_CFLAGS = $(UNIT_CFLAGS) +-check_rgrp_LDADD = $(UNIT_LDADD) +-check_rgrp_LDFLAGS = $(uuid_LIBS) ++check_rgrp_LDADD = $(UNIT_LDADD) $(uuid_LIBS) + check_rgrp_CPPFLAGS = $(UNIT_CPPFLAGS) + endif + diff --git a/gfs2-utils.spec b/gfs2-utils.spec index 061130f..bae0f31 100644 --- a/gfs2-utils.spec +++ b/gfs2-utils.spec @@ -2,13 +2,14 @@ Summary: Global File System 2 (GFS2) utilities Summary(pl.UTF-8): Narzędzia do systemu plików GFS2 (Global File System 2) Name: gfs2-utils -Version: 3.1.6 +Version: 3.1.10 Release: 1 License: LGPL v2.1+ (libraries), GPL v2+ (applications) Group: Applications/System -Source0: https://fedorahosted.org/releases/g/f/gfs2-utils/%{name}-%{version}.tar.gz -# Source0-md5: 9d47c272298c62868dd49c7b1f4bcefc -URL: https://fedorahosted.org/cluster/wiki/HomePage +Source0: http://releases.pagure.org/gfs2-utils/%{name}-%{version}.tar.xz +# Source0-md5: 31d330b1f69da8474a52bf36a824e9c1 +Patch0: %{name}-link.patch +URL: https://pagure.io/gfs2-utils BuildRequires: autoconf >= 2.63 BuildRequires: automake >= 1:1.11 BuildRequires: bison @@ -16,11 +17,14 @@ BuildRequires: flex BuildRequires: gettext-devel >= 0.18 BuildRequires: libblkid-devel BuildRequires: libtool >= 2:2.2.6 +BuildRequires: libuuid-devel # for gfs2 headers BuildRequires: linux-libc-headers >= 7:3.3 BuildRequires: ncurses-devel >= 5 BuildRequires: pkgconfig BuildRequires: sed >= 4.0 +BuildRequires: tar >= 1:1.22 +BuildRequires: xz BuildRequires: zlib-devel Requires: uname(release) >= 3.3 Obsoletes: gfs2 < 1:3 @@ -48,7 +52,8 @@ spójność - zmiany wykonane na jednej maszynie są natychmiast widoczne na wszystkich innych maszynach w klastrze. %prep -%setup -q -n gfs2-utils +%setup -q +%patch0 -p1 %{__sed} -i -e 's, po/Makefile.in$,,' configure.ac %{__sed} -i -e '1s,#!/usr/bin/env python,#!/usr/bin/python,' gfs2/scripts/gfs2_{lockcapture,trace} @@ -61,7 +66,8 @@ na wszystkich innych maszynach w klastrze. %{__autoheader} %{__automake} %configure \ - --disable-silent-rules + --disable-silent-rules \ + --with-udevdir=/lib/udev %{__make} @@ -71,6 +77,9 @@ rm -rf $RPM_BUILD_ROOT %{__make} install \ DESTDIR=$RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT/sbin +%{__mv} $RPM_BUILD_ROOT%{_sbindir}/{fsck.gfs2,mkfs.gfs2,gfs2_{grow,jadd,lockcapture,trace}} $RPM_BUILD_ROOT/sbin + # packaged as %doc %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gfs2-utils @@ -88,7 +97,10 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) /sbin/mkfs.gfs2 %attr(755,root,root) %{_sbindir}/gfs2_convert %attr(755,root,root) %{_sbindir}/gfs2_edit +%attr(755,root,root) %{_sbindir}/gfs2_withdraw_helper +%attr(755,root,root) %{_sbindir}/glocktop %attr(755,root,root) %{_sbindir}/tunegfs2 +/lib/udev/rules.d/82-gfs2-withdraw.rules %{_mandir}/man5/gfs2.5* %{_mandir}/man8/fsck.gfs2.8* %{_mandir}/man8/gfs2_convert.8* @@ -97,5 +109,6 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/gfs2_jadd.8* %{_mandir}/man8/gfs2_lockcapture.8* %{_mandir}/man8/gfs2_trace.8* +%{_mandir}/man8/glocktop.8* %{_mandir}/man8/mkfs.gfs2.8* %{_mandir}/man8/tunegfs2.8* -- 2.43.0