[remctl/el5] Update to 3.7

Ken Dreyer ktdreyer at fedoraproject.org
Fri Jan 24 02:07:25 UTC 2014


commit ff3cf20bae0336dd26dcf372090ddf50fd434245
Author: Ken Dreyer <ktdreyer at ktdreyer.com>
Date:   Thu Jan 23 19:05:38 2014 -0700

    Update to 3.7
    
    - Drop upstreamed EL5 perl patch
    - Drop RPM conditionals for Fedoras earlier than 19
    - Add systemd support
    - Use upstream's php.ini instead of our own
    - Ship upstream's READMEs for PHP, Python, and Ruby

 .gitignore                |    1 +
 remctl-3.5-perl-el5.patch |   18 ----------
 remctl.ini                |    2 -
 remctl.spec               |   77 +++++++++++++++++++++++++++++++++++----------
 sources                   |    2 +-
 5 files changed, 62 insertions(+), 38 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 64fc791..a996158 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ remctl-2.11.tar.gz
 /remctl-3.2.tar.gz
 /remctl-3.3.tar.gz
 /remctl-3.6.tar.xz
+/remctl-3.7.tar.xz
diff --git a/remctl.spec b/remctl.spec
index 7cd8754..80ed2d1 100644
--- a/remctl.spec
+++ b/remctl.spec
@@ -1,5 +1,5 @@
 Name: remctl
-Version: 3.6
+Version: 3.7
 Release: 1%{?dist}
 Summary: Client/server for Kerberos-authenticated command execution
 
@@ -7,9 +7,19 @@ Group: Applications/Internet
 License: MIT
 URL: http://www.eyrie.org/~eagle/software/remctl
 Source0: http://archives.eyrie.org/software/kerberos/remctl-%{version}.tar.xz
-Source1: remctl.ini
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
+# Use systemd unit files on Fedora and RHEL 7.
+%if 0%{?fedora} || 0%{?rhel} >= 7
+  %global _with_systemd 1
+%endif
+
+%if 0%{?_with_systemd}
+Requires(preun):  systemd
+Requires(postun): systemd
+Requires(post):   systemd
+%endif
+
 BuildRequires: krb5-devel
 BuildRequires: perl(Module::Build)
 BuildRequires: perl(Test::Pod)
@@ -21,13 +31,13 @@ BuildRequires: python2-devel
 BuildRequires: ruby
 BuildRequires: ruby(abi) = 1.8
 %endif
-%if 0%{?fedora} >= 19
+%if 0%{?fedora} || 0%{?rhel} >= 7
 BuildRequires: ruby(release)
 %endif
 BuildRequires: ruby-devel
-
-# EL5 Module::Build compat
-Patch0: remctl-3.5-perl-el5.patch
+%if 0%{?_with_systemd}
+BuildRequires: systemd-devel
+%endif
 
 # RHEL 5/6 compatibility for PHP
 %if 0%{?el5}
@@ -52,7 +62,6 @@ Patch0: remctl-3.5-perl-el5.patch
 %{!?ruby_vendorarchdir: %global ruby_vendorarchdir %(ruby -rrbconfig -e 'puts Config::CONFIG["vendorarchdir"] ')}
 %endif
 
-
 %description
 
 remctl (the client) and remctld (the server) implement a client/server
@@ -118,9 +127,7 @@ Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 %{?el5:Requires:  ruby(abi) = 1.8}
 %{?el6:Requires:  ruby(abi) = 1.8}
-%{?fc17:Requires: ruby(abi) = 1.9.1}
-%{?fc18:Requires: ruby(abi) = 1.9.1}
-%if 0%{?fedora} >= 19
+%if 0%{?fedora} || 0%{?rhel} >= 7
 Requires: ruby(release)
 %endif
 Provides: ruby(remctl) = %{version}-%{release}
@@ -133,10 +140,6 @@ remctl's Ruby bindings, you need to install this package.
 %prep
 %setup -q
 
-%if 0%{?el5}
-%patch0 -p1
-%endif
-
 %build
 export REMCTL_PERL_FLAGS="installdirs=vendor"
 %configure \
@@ -181,13 +184,38 @@ find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
 
 # PHP configuration
 mkdir -p %{buildroot}%{php_inidir}
-install -p %{SOURCE1} %{buildroot}%{php_inidir}
+install -p php/remctl.ini %{buildroot}%{php_inidir}
+
+# Install PHP, Python, Ruby READMEs
+for d in php python ruby; do
+  %if 0%{?fedora} || 0%{?rhel} >= 8
+    subpackage_docdir=%{_docdir}/%{name}-${d}
+  %else
+    subpackage_docdir=%{_docdir}/%{name}-${d}-%{version}
+  %endif
+  mkdir -p %{buildroot}${subpackage_docdir}
+  install -p ${d}/README %{buildroot}${subpackage_docdir}/README
+done
 
 %clean
 rm -rf %{buildroot}
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post
+/sbin/ldconfig
+%if 0%{?_with_systemd}
+  %systemd_post remctld.service
+%endif
+
+%preun
+%if 0%{?_with_systemd}
+  %systemd_preun remctld.service
+%endif
+
+%postun
+/sbin/ldconfig
+%if 0%{?_with_systemd}
+  %systemd_postun remctld.service
+%endif
 
 %files 
 %defattr(-,root,root,-)
@@ -197,6 +225,10 @@ rm -rf %{buildroot}
 %{_sbindir}/remctld
 %{_mandir}/man1/remctl*
 %{_mandir}/man8/remctl*
+%if 0%{?_with_systemd}
+%{_unitdir}/remctld.service
+%{_unitdir}/remctld.socket
+%endif
 
 %files devel
 %defattr(-,root,root,-)
@@ -213,11 +245,13 @@ rm -rf %{buildroot}
 
 %files php
 %defattr(-,root,root,-)
+%doc README
 %{php_extdir}/remctl.so
 %config(noreplace) %{php_inidir}/remctl.ini
 
 %files python
 %defattr(-,root,root,-)
+%doc README
 %{python_sitearch}/_remctl.so
 %{python_sitearch}/remctl.py
 %{python_sitearch}/remctl.pyc
@@ -226,10 +260,19 @@ rm -rf %{buildroot}
 
 %files ruby
 %defattr(-,root,root,-)
+%doc README
 %{ruby_vendorarchdir}/remctl.so
 
 
 %changelog
+* Thu Jan 23 2014 Ken Dreyer <ktdreyer at ktdreyer.com> - 3.7-1
+- Update to 3.7
+- Drop upstreamed EL5 perl patch
+- Drop RPM conditionals for Fedoras earlier than 19
+- Add systemd support
+- Use upstream's php.ini instead of our own
+- Ship upstream's READMEs for PHP, Python, and Ruby
+
 * Wed Aug 21 2013 Ken Dreyer <ktdreyer at ktdreyer.com> - 3.6-1
 - Upgrade to 3.6
 - Drop upstreamed EL5 gcc patch
diff --git a/sources b/sources
index 82de6e1..52ef433 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0165c20195faebaf0c827e8861e2092f  remctl-3.6.tar.xz
+b6e7dc5e7cf69f5be6747df049feb8a1  remctl-3.7.tar.xz


More information about the scm-commits mailing list