1
0
mirror of https://github.com/gluster/gluster-block.git synced 2026-02-05 12:45:33 +01:00
Files
gluster-block/gluster-block.spec.in
Xiubo Li 2127af7dfb spec: update the spec
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Niels Devos <ndevos@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2019-07-03 14:01:02 +05:30

176 lines
5.5 KiB
RPMSpec

##-----------------------------------------------------------------------------
## All %%global definitions should be placed here and keep them sorted
##
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) || ( 0%{?centos_version} && 0%{?centos_version} > 6)
%global _with_systemd true
%else
%global _with_initd true
%endif
%if ( 0%{?rhel} && 0%{?rhel} <= 7 ) || ( 0%{?centos_version} && 0%{?centos_version} <= 7 )
%global _disable_tirpc --enable-tirpc=no
%endif
##-----------------------------------------------------------------------------
## All package definitions should be placed here
##
Summary: Gluster block storage utility
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: @PACKAGE_RELEASE@
License: GPLv2 or LGPLv3+
URL: https://github.com/gluster/gluster-block
Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
BuildRequires: pkgconfig(glusterfs-api)
BuildRequires: pkgconfig(json-c)
BuildRequires: help2man >= 1.36
%if ( 0%{?_disable_tirpc:0} )
BuildRequires: pkgconfig(libtirpc)
BuildRequires: rpcgen
%endif
%if ( 0%{?_with_systemd:1} )
%{?systemd_requires}
BuildRequires: systemd
%endif
Requires: tcmu-runner >= 1.1.3
Requires: targetcli >= 2.1.fb49
Requires: python-rtslib >= 2.1.fb69
Requires: rpcbind
%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
%build
%configure %{?_disable_tirpc}
%make_build
%install
%make_install
%if ( 0%{?_with_initd:1} )
mv %{buildroot}/%{_initddir}/gluster-blockd.initd %{buildroot}/%{_initddir}/gluster-blockd
%endif
%if ( 0%{?_with_systemd:1} )
%post
%systemd_post gluster-block-target.service
%systemd_post gluster-blockd.service
%preun
%systemd_preun gluster-block-target.service
%systemd_preun gluster-blockd.service
find %{_sharedstatedir}/gluster-block/ -name 'gb_upgrade.status' -delete
%postun
%systemd_postun_with_restart gluster-block-target.service
%systemd_postun_with_restart gluster-blockd.service
%endif
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%doc README.md
%if ( 0%{?_with_initd:1} )
%doc COPYING-GPLV2 COPYING-LGPLV3
%else
%license COPYING-GPLV2 COPYING-LGPLV3
%endif
%{_sbindir}/gluster-block
%{_sbindir}/gluster-blockd
%{_mandir}/man8/gluster-block*.8*
%dir %{_localstatedir}/log/gluster-block
%if ( 0%{?_with_systemd:1} )
%{_unitdir}/gluster-blockd.service
%{_unitdir}/gluster-block-target.service
%else
%attr(0755,-,-) %{_initddir}/gluster-blockd
%endif
%config(noreplace) %{_sysconfdir}/sysconfig/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
%dir %attr(0755,-,-) %{_sharedstatedir}/gluster-block
%attr(0644,-,-) %{_sharedstatedir}/gluster-block/gluster-block-caps.info
%changelog
* Tue May 14 2019 Xiubo Li <xiubli@redhat.com>
- Fix rpmlint dangerous-command-in-preun rm warning
* Thu May 02 2019 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- Renaming logrotate configure file back to project name
* Fri Apr 26 2019 Xiubo Li <xiubli@redhat.com>
- Rename logrotate configure file
* Mon Apr 22 2019 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- update targetcli and tcmu-runner dependency version
* Mon Apr 15 2019 Niels de Vos <ndevos@redhat.com>
- use the modern libtirpc package, will be removed from glibc
- new Fedora releases require rpcgen (unbundled from glibc)
* Wed Apr 03 2019 Xiubo Li <xiubli@redhat.com>
- Add logrotate support
* Sun Oct 14 2018 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- add install details for upgrade_activities.sh
* Fri Sep 28 2018 Michael Adam <obnox@redhat.com>
- create and package log directory
* Tue Jul 17 2018 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- change install path for gluster-block-caps.info
- add install details for wait-for-bricks.sh
* Tue Mar 06 2018 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- update about gluster-block-caps.info
* Mon Sep 25 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- Fix Unclosed %if block in the spec file
* Thu Sep 21 2017 Niels de Vos <ndevos@redhat.com>
- added systemd macros in the scriptlets
- use pkgconfig for BuildRequires
- run setup in quiet mode
- run make_* macros instead of make commands in build/install section
- drop the INSTALL file from the documentation
* Fri Sep 15 2017 Ji-Hyeon Gim <potatogim@potatogim.net>
- update with sysconfig handling for non-systemd distros
* Fri Aug 11 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- add wrapper target service unit
* Thu Jun 22 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- update with missing dependencies
* Tue Jun 06 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- add gluster-blockd sysconfig template
* Mon Mar 27 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- add json-c-devel to build dependency list
* Mon Mar 6 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- conditionally enable with_systemd flag
* Mon Feb 27 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- add INSTALL
* Mon Feb 27 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- add Man page entry
* Thu Feb 23 2017 Niels de Vos <ndevos@redhat.com>
- cleanup and add licenses and README.md to the package
* Sun Feb 5 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
- Initial spec file