From 64e8202562dbc43336e991788030ddc5daa441ae Mon Sep 17 00:00:00 2001 From: Kaleb S. KEITHLEY Date: Mar 31 2020 18:05:08 +0000 Subject: initial commit in git.centos.org, 0.4 from Fedora Signed-off-by: Kaleb S. KEITHLEY --- diff --git a/README.md b/README.md index c3e8aaf..e178b11 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,13 @@ Instructions for building the glusterfs package for the CentOS Storage SIG can b * [Comunity Build System](https://wiki.centos.org/HowTos/CommunityBuildSystem) * [Storage SIG landing page](https://wiki.centos.org/SpecialInterestGroup/Storage/Gluster) +E.g. build the src.rpm with: + $ rpmbuild -bs \ + --define "_sourcedir $PWD/SOURCES" --define "_srcrpmdir $PWD" \ + --define "dist .el8" SPECS/gluster-block.spec + +To build: + + $ cbs build [--scratch] storage8-gluster-6-el8 gluster-block-0.4-5.el8.src.rpm + + diff --git a/SOURCES/.gitkeep b/SOURCES/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/SOURCES/.gitkeep diff --git a/SOURCES/0001-build-add-AM_PROG_CC_C_O-in-configure.ac.patch b/SOURCES/0001-build-add-AM_PROG_CC_C_O-in-configure.ac.patch deleted file mode 100644 index 237ed20..0000000 --- a/SOURCES/0001-build-add-AM_PROG_CC_C_O-in-configure.ac.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0e19ee428c4e4d2c16369e44baec25915a399ac3 Mon Sep 17 00:00:00 2001 -From: Niels de Vos -Date: Wed, 20 Dec 2017 14:58:28 +0100 -Subject: [PATCH] build: add AM_PROG_CC_C_O in configure.ac - ---- - Makefile.am | 1 + - configure.ac | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/Makefile.am b/Makefile.am -index 962da8c..32c0dd0 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,4 +1,5 @@ - ACLOCAL_AMFLAGS = -I m4 -+AUTOMAKE_OPTIONS = subdir-objects - - SUBDIRS = rpc utils cli daemon systemd docs - -diff --git a/configure.ac b/configure.ac -index 3fd3646..101c391 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -62,6 +62,7 @@ LT_INIT - - # Checks for programs. - AC_PROG_CC -+AM_PROG_CC_C_O - - AC_CHECK_PROG(RPCGEN, rpcgen, yes, no) - if test "x$RPCGEN" = "xno"; then --- -2.14.3 - diff --git a/SOURCES/gluster-block-0.4-logrotate.patch b/SOURCES/gluster-block-0.4-logrotate.patch new file mode 100644 index 0000000..46fdb04 --- /dev/null +++ b/SOURCES/gluster-block-0.4-logrotate.patch @@ -0,0 +1,125 @@ +From 9dcb253bcb39109cf42502258d2d0c086c15998f Mon Sep 17 00:00:00 2001 +From: Prasanna Kumar Kalever +Date: Thu, 2 May 2019 15:08:23 +0530 +Subject: [PATCH] logrotate: rename logrotate config file + +Problem: +------- +Build was failing with: +[root@localhost x86_64]# rpmlint gluster-block-0.4-1.x86_64.rpm +gluster-block.x86_64: E: incoherent-logrotate-file /etc/logrotate.d/gluster-blockd +1 packages and 0 specfiles checked; 1 errors. + +Solution: +-------- +incoherent-logrotate-file ? + +Solution:- The log file or directory name should be the same as the +package name in lower case. + +Hence renaming the logrotate filename back to gluster-block + +Signed-off-by: Prasanna Kumar Kalever +Reviewed-by: Xiubo Li +--- + docs/gluster-block.8 | 2 +- + docs/gluster-blockd.8 | 2 +- + extras/Makefile.am | 8 ++++---- + .../{gluster-blockd.logrotate => gluster-block.logrotate} | 0 + gluster-block.spec.in | 5 ++++- + utils/utils.h | 2 +- + 6 files changed, 11 insertions(+), 8 deletions(-) + rename extras/{gluster-blockd.logrotate => gluster-block.logrotate} (100%) + +diff --git a/docs/gluster-block.8 b/docs/gluster-block.8 +index 6322cef..d7c2a88 100644 +--- a/docs/gluster-block.8 ++++ b/docs/gluster-block.8 +@@ -190,7 +190,7 @@ To generate the block volumes target configuration and load it + .br + /etc/sysconfig/gluster-blockd + .br +-/etc/logrotate.d/gluster-blockd ++/etc/logrotate.d/gluster-block + .PP + + +diff --git a/docs/gluster-blockd.8 b/docs/gluster-blockd.8 +index 44652b3..6c172a4 100644 +--- a/docs/gluster-blockd.8 ++++ b/docs/gluster-blockd.8 +@@ -68,7 +68,7 @@ Run gluster-blockd in ignore remote rpc mode + .br + /etc/sysconfig/gluster-blockd + .br +-/etc/logrotate.d/gluster-blockd ++/etc/logrotate.d/gluster-block + .PP + + +diff --git a/extras/Makefile.am b/extras/Makefile.am +index 67a77b5..89430eb 100644 +--- a/extras/Makefile.am ++++ b/extras/Makefile.am +@@ -1,5 +1,5 @@ + EXTRA_DIST = replace-node.sh wait-for-bricks.sh upgrade_activities.sh \ +- gluster-blockd.logrotate ++ gluster-block.logrotate + + DISTCLEANFILES = Makefile.in + +@@ -12,11 +12,11 @@ install-data-local: + $(INSTALL_DATA) -m 755 $(top_srcdir)/extras/upgrade_activities.sh \ + $(DESTDIR)$(GLUSTER_BLOCKD_LIBEXECDIR)/upgrade_activities.sh; \ + $(MKDIR_P) $(DESTDIR)$(GLUSTER_BLOCKD_LOGROTATEDIR); \ +- $(INSTALL_DATA) gluster-blockd.logrotate \ +- $(DESTDIR)$(GLUSTER_BLOCKD_LOGROTATEDIR)/gluster-blockd; ++ $(INSTALL_DATA) gluster-block.logrotate \ ++ $(DESTDIR)$(GLUSTER_BLOCKD_LOGROTATEDIR)/gluster-block; + + uninstall-local: + rm -f $(DESTDIR)$(GLUSTER_BLOCKD_LIBEXECDIR)/wait-for-bricks.sh \ + $(DESTDIR)$(GLUSTER_BLOCKD_LIBEXECDIR)/upgrade_activities.sh \ + $(DESTDIR)$(GLUSTER_BLOCKD_WORKDIR)/gb_upgrade.status \ +- $(DESTDIR)$(GLUSTER_BLOCKD_LOGROTATEDIR)/gluster-blockd; ++ $(DESTDIR)$(GLUSTER_BLOCKD_LOGROTATEDIR)/gluster-block; +diff --git a/extras/gluster-blockd.logrotate b/extras/gluster-block.logrotate +similarity index 100% +rename from extras/gluster-blockd.logrotate +rename to extras/gluster-block.logrotate +diff --git a/gluster-block.spec.in b/gluster-block.spec.in +index 201a364..af9d80f 100644 +--- a/gluster-block.spec.in ++++ b/gluster-block.spec.in +@@ -91,7 +91,7 @@ rm -rf ${RPM_BUILD_ROOT} + %attr(0755,-,-) %{_initddir}/gluster-blockd + %endif + %config(noreplace) %{_sysconfdir}/sysconfig/gluster-blockd +-%config(noreplace) %{_sysconfdir}/logrotate.d/gluster-blockd ++%config(noreplace) %{_sysconfdir}/logrotate.d/gluster-block + %dir %attr(0755,-,-) %{_libexecdir}/gluster-block + %attr(0755,-,-) %{_libexecdir}/gluster-block/wait-for-bricks.sh + %attr(0755,-,-) %{_libexecdir}/gluster-block/upgrade_activities.sh +@@ -99,6 +99,9 @@ rm -rf ${RPM_BUILD_ROOT} + %attr(0644,-,-) %{_sharedstatedir}/gluster-block/gluster-block-caps.info + + %changelog ++* Thu May 02 2019 Prasanna Kumar Kalever ++- Renaming logrotate configure file back to project name ++ + * Fri Apr 26 2019 Xiubo Li + - Rename logrotate configure file + +diff --git a/utils/utils.h b/utils/utils.h +index 40250e6..b24827a 100644 +--- a/utils/utils.h ++++ b/utils/utils.h +@@ -29,7 +29,7 @@ + + # include "list.h" + +-# define GB_LOGROTATE_PATH "/etc/logrotate.d/gluster-blockd" ++# define GB_LOGROTATE_PATH "/etc/logrotate.d/gluster-block" + # define GB_LOGDIR_DEF DATADIR "/log/gluster-block" + # define GB_INFODIR DATADIR "/run" + diff --git a/SPECS/gluster-block.spec b/SPECS/gluster-block.spec index 7d50d11..8f9796c 100644 --- a/SPECS/gluster-block.spec +++ b/SPECS/gluster-block.spec @@ -1,32 +1,36 @@ Summary: Gluster block storage utility Name: gluster-block -Version: 0.3 -Release: 2%{?dist} +Version: 0.4 +Release: 1%{?dist} License: GPLv2 or LGPLv3+ URL: https://github.com/gluster/gluster-block Source0: https://github.com/gluster/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0001: 0001-build-add-AM_PROG_CC_C_O-in-configure.ac.patch +# from https://github.com/gluster/gluster-block/pull/231 +Patch0: gluster-block-0.4-logrotate.patch BuildRequires: pkgconfig(glusterfs-api) BuildRequires: pkgconfig(json-c) BuildRequires: help2man >= 1.36 -%{?systemd_requires} +BuildRequires: libtirpc-devel +BuildRequires: rpcgen BuildRequires: systemd # tarball releases require running ./autogen.sh BuildRequires: automake, autoconf, libtool, git -Requires: tcmu-runner-handler-glfs >= 1.0.4 -Requires: targetcli >= 2.1.fb43 +Requires: tcmu-runner >= 1.1.3 +Requires: targetcli >= 2.1.fb49 +Requires: python-rtslib >= 2.1.fb69 Requires: rpcbind +%{?systemd_requires} + %description gluster-block is a CLI utility, which aims at making gluster backed block storage creation and maintenance as simple as possible. %prep -%setup -q -%patch0001 -p1 -b.AM_PROG_CC_C_O +%autosetup -p 1 %build echo %{version} > VERSION @@ -36,6 +40,7 @@ echo %{version} > VERSION %install %make_install +touch %{buildroot}%{_sharedstatedir}/gluster-block/gb_upgrade.status %post %systemd_post gluster-block-target.service @@ -54,14 +59,51 @@ echo %{version} > VERSION %doc README.md %{_sbindir}/gluster-block %{_sbindir}/gluster-blockd -%{_mandir}/man8/gluster-block*.8* +%doc %{_mandir}/man8/gluster-block*.8* %{_unitdir}/gluster-blockd.service %{_unitdir}/gluster-block-target.service %config(noreplace) %{_sysconfdir}/sysconfig/gluster-blockd +%config(noreplace) %{_sysconfdir}/logrotate.d/gluster-block +%{_libexecdir}/gluster-block +%dir %{_localstatedir}/log/gluster-block +%dir %{_sharedstatedir}/gluster-block +%ghost %{_sharedstatedir}/gluster-block/gb_upgrade.status +%config(noreplace) %{_sharedstatedir}/gluster-block/gluster-block-caps.info %changelog -* Wed Dec 20 2017 Niels de Vos - 0.3-2 -- tcmu-runner has subpackages now, we need tcmu-runner-handler-glfs +* Tue Jan 28 2020 Fedora Release Engineering - 0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri May 3 2019 Niels de Vos - 0.4-3 +- Update runtime dependency versions for tcmu-runner, targetcli and rtslib + +* Fri May 3 2019 Niels de Vos - 0.4-2 +- Correct the filename of the logrotate configuration + +* Fri May 3 2019 Niels de Vos - 0.4-1 +- Update to version 0.4 + +* Thu Jan 31 2019 Fedora Release Engineering - 0.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Mar 06 2018 Björn Esser - 0.3-5 +- Add patch to build against libtirpc-devel instead glibc-rpc +- Add needed BR: rpcgen, libtirpc-devel + +* Tue Mar 06 2018 Björn Esser - 0.3-4 +- Rebuilt for libjson-c.so.4 (json-c v0.13.1) + +* Wed Feb 07 2018 Fedora Release Engineering - 0.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sun Dec 10 2017 Björn Esser - 0.3-2 +- Rebuilt for libjson-c.so.3 * Mon Nov 06 2017 Prasanna Kumar Kalever - 0.3-1 - Update to 0.3