ppisar pushed to perl-mogilefs-server (master). "Modernize specification file"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Oct 29 14:05:35 UTC 2015
From 162e398322de1ad496304fe4de158821bb9eac69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Thu, 29 Oct 2015 12:40:11 +0100
Subject: Modernize specification file
---
perl-mogilefs-server.spec | 133 +++++++++++++++++++++-------------------------
1 file changed, 60 insertions(+), 73 deletions(-)
diff --git a/perl-mogilefs-server.spec b/perl-mogilefs-server.spec
index c679645..958c205 100644
--- a/perl-mogilefs-server.spec
+++ b/perl-mogilefs-server.spec
@@ -1,6 +1,6 @@
Name: perl-mogilefs-server
Version: 2.36
-Release: 14%{?dist}
+Release: 15%{?dist}
Summary: Server part of the MogileFS distributed filesystem
License: GPL+ or Artistic
Group: System Environment/Daemons
@@ -11,11 +11,13 @@ Source2: mogilefsd.init
Source3: mogilefsd.conf
Source4: mogilefs.conf
Patch0: mogilefs-remove_deps.patch
-
BuildArch: noarch
-
+BuildRequires: coreutils
+BuildRequires: findutils
BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: make
+BuildRequires: sed
# Run-time:
BuildRequires: perl(base)
BuildRequires: perl(bytes)
@@ -74,11 +76,14 @@ BuildRequires: perl(Test::More)
BuildRequires: perl(Time::HiRes)
# Optional tests:
BuildRequires: perl(MogileFS::Client)
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
-Provides: mogilefs-server = %{version}-%{release}
-Obsoletes: mogilefs-server < 2.17-5
+# Skip perl-MogileFS-Utils for mogadm tool because the tests require system
+# MySQL RDBMS running.
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Provides: mogilefs-server = %{version}-%{release}
+Obsoletes: mogilefs-server < 2.17-5
+# Remove mogstored backends and Perlbal from Requires:
+%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Mogstored::HTTPServer::.*|Perlbal)\\)
%description
Server part of the MogileFS distributed filesystem
@@ -88,74 +93,75 @@ Server part of the MogileFS distributed filesystem
Summary: MogileFS tracker daemon
Group: System Environment/Daemons
Requires: initscripts
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires(pre): glibc-common
Requires(pre): shadow-utils
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
+%description -n mogilefsd
+The MogileFS tracker daemon mogilefsd
+
%package -n mogstored
Summary: MogileFS storage daemon
Group: System Environment/Daemons
+BuildRequires: perl(Gearman::Client::Async)
+BuildRequires: perl(Gearman::Server)
Requires: initscripts
Requires: sysstat
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires: perl(Mogstored::HTTPServer::None)
+Requires(pre): glibc-common
Requires(pre): shadow-utils
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
-Requires: perl(Mogstored::HTTPServer::None)
-BuildRequires: perl(Gearman::Client::Async)
-BuildRequires: perl(Gearman::Server)
+
+%description -n mogstored
+The MogileFS storage daemon mogstored
%package -n mogstored-backend-perlbal
Summary: Perlbal backend for mogstored
Group: System Environment/Daemons
-Requires: perl(Mogstored::HTTPServer), Perlbal
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildRequires: perl(Perlbal) >= 1.75
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires: perl(Mogstored::HTTPServer)
+Requires: Perlbal
+
+%description -n mogstored-backend-perlbal
+Perlbal backend for mogstored, the MogileFS storage daemon
%package -n mogstored-backend-apache
Summary: Apache backend for mogstored
Group: System Environment/Daemons
-Requires: perl(Mogstored::HTTPServer), httpd
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires: httpd
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires: perl(Mogstored::HTTPServer)
+
+%description -n mogstored-backend-apache
+Apache backend for mogstored, the MogileFS storage daemon
%package -n mogstored-backend-lighttpd
Summary: LigHTTPd backend for mogstored
Group: System Environment/Daemons
-Requires: perl(Mogstored::HTTPServer), lighttpd
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires: lighttpd
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires: perl(Mogstored::HTTPServer)
+
+%description -n mogstored-backend-lighttpd
+LigHTTPd backend for mogstored, the MogileFS storage daemon
+
%package -n mogstored-backend-none
Summary: Backend which allows mogstored to work with unmanaged DAV servers
Group: System Environment/Daemons
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(Mogstored::HTTPServer)
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
-
-%description -n mogilefsd
-The MogileFS tracker daemon mogilefsd
-
-
-%description -n mogstored
-The MogileFS storage daemon mogstored
-
-
-%description -n mogstored-backend-perlbal
-Perlbal backend for mogstored, the MogileFS storage daemon
-
-
-%description -n mogstored-backend-apache
-Apache backend for mogstored, the MogileFS storage daemon
-
-
-%description -n mogstored-backend-lighttpd
-LigHTTPd backend for mogstored, the MogileFS storage daemon
%description -n mogstored-backend-none
Backend which allows mogstored to work with unmanaged DAV servers
@@ -164,40 +170,29 @@ Backend which allows mogstored to work with unmanaged DAV servers
%prep
%setup -q -n mogilefs-server-%{version}
%patch0 -p1
-
-# Remove mogstored backends and Perlbal from Requires:
-cat << \EOF > mogstored-req
-#!/bin/sh
-%{__perl_requires} $* |\
- sed -e '/perl(Mogstored::HTTPServer::.*)/d' \
- -e '/perl(Perlbal)/d'
-EOF
-
-%define __perl_requires %{_builddir}/mogilefs-server-%{version}/mogstored-req
-chmod +x %{__perl_requires}
+rm -rv lib/mogdeps
+# Remove test that interfere with system service
+rm t/mogstored-shutdown.t
+sed -i -e '/^t\/mogstored-shutdown\.t/d' MANIFEST
%build
-rm -rv lib/mogdeps
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
-make pure_install PERL_INSTALL_ROOT=%{buildroot}
-
+make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
-find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
-
%{_fixperms} %{buildroot}/*
-%{__install} -d -m0755 %{buildroot}%{_initrddir}
-%{__install} -p -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/mogstored
-%{__install} -p -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/mogilefsd
+install -d -m0755 %{buildroot}%{_initrddir}
+install -p -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/mogstored
+install -p -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/mogilefsd
-%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/mogilefs
-%{__install} -p -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/mogilefs/mogilefsd.conf
-%{__install} -p -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/mogilefs/mogilefs.conf
+install -d -m0755 %{buildroot}%{_sysconfdir}/mogilefs
+install -p -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/mogilefs/mogilefsd.conf
+install -p -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/mogilefs/mogilefs.conf
# remove the SQLite backend for now, since the latest driver
# is not in Fedora yet (#245699) and most people are probably
@@ -208,7 +203,6 @@ rm %{buildroot}%{perl_vendorlib}/MogileFS/Store/Postgres.pm
%check
-rm t/mogstored-shutdown.t
make test
@@ -254,7 +248,6 @@ fi
%files -n mogilefsd
-%defattr(-,root,root,-)
%doc CHANGES TODO doc/
%{_bindir}/mogilefsd
%{_bindir}/mogdbsetup
@@ -267,9 +260,7 @@ fi
%config(noreplace) %{_sysconfdir}/mogilefs/mogilefsd.conf
%{_initrddir}/mogilefsd
-
%files -n mogstored
-%defattr(-,root,root,-)
%{_bindir}/mogstored
%{_bindir}/mogautomount
%{_mandir}/man1/mogstored.*
@@ -281,27 +272,23 @@ fi
%{perl_vendorlib}/Mogstored/SideChannel*
%{_initrddir}/mogstored
-
%files -n mogstored-backend-perlbal
-%defattr(-,root,root,-)
%{perl_vendorlib}/Mogstored/HTTPServer/Perlbal.pm
-
%files -n mogstored-backend-apache
-%defattr(-,root,root,-)
%{perl_vendorlib}/Mogstored/HTTPServer/Apache.pm
-
%files -n mogstored-backend-lighttpd
-%defattr(-,root,root,-)
%{perl_vendorlib}/Mogstored/HTTPServer/Lighttpd.pm
%files -n mogstored-backend-none
-%defattr(-,root,root,-)
%{perl_vendorlib}/Mogstored/HTTPServer/None.pm
%changelog
+* Thu Oct 29 2015 Petr Pisar <ppisar at redhat.com> - 2.36-15
+- Modernize specification file
+
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.36-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
--
cgit v0.11.2
http://pkgs.fedoraproject.org/cgit/perl-mogilefs-server.git/commit/?h=master&id=162e398322de1ad496304fe4de158821bb9eac69
More information about the perl-devel
mailing list