Fix systemd service file.
Guenther
This commit is contained in:
parent
f7792704e2
commit
107256de2d
483
gssproxy-packaging.patch
Normal file
483
gssproxy-packaging.patch
Normal file
@ -0,0 +1,483 @@
|
||||
From 22144e84ba3236e1e5133fc1800acfa9162bb677 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gdeschner@redhat.com>
|
||||
Date: Wed, 4 Apr 2012 17:24:48 +0200
|
||||
Subject: [PATCH 1/8] Add various fixes to gssproxy.spec.
|
||||
|
||||
Guenther
|
||||
---
|
||||
proxy/contrib/gssproxy.spec.in | 107 +++++++++++-----------------------------
|
||||
1 file changed, 29 insertions(+), 78 deletions(-)
|
||||
|
||||
diff --git a/proxy/contrib/gssproxy.spec.in b/proxy/contrib/gssproxy.spec.in
|
||||
index 668b9ae..2950d6d 100644
|
||||
--- a/proxy/contrib/gssproxy.spec.in
|
||||
+++ b/proxy/contrib/gssproxy.spec.in
|
||||
@@ -1,75 +1,44 @@
|
||||
-%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
|
||||
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
-%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
-%endif
|
||||
-
|
||||
-Name: @PACKAGE_NAME@
|
||||
-Version: @PACKAGE_VERSION@
|
||||
-Release: 0@PRERELEASE_VERSION@%{?dist}
|
||||
-Group: Applications/System
|
||||
-Summary: System Security Services Daemon
|
||||
-License: MIT
|
||||
-URL: http://fedorahosted.org/gss-proxy/
|
||||
-Source0: %{name}-%{version}.tar.gz
|
||||
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
-
|
||||
-### Patches ###
|
||||
-
|
||||
-### Dependencies ###
|
||||
-
|
||||
-Requires: krb5-libs
|
||||
-Requires: keyutils-libs
|
||||
-Requires(post): initscripts chkconfig /sbin/ldconfig
|
||||
-Requires(preun): initscripts chkconfig
|
||||
-Requires(postun): initscripts chkconfig /sbin/ldconfig
|
||||
+Name: @PACKAGE_NAME@
|
||||
+Version: @PACKAGE_VERSION@
|
||||
+Release: 0@PRERELEASE_VERSION@%{?dist}
|
||||
+Summary: GSSAPI Proxy
|
||||
+
|
||||
+Group: System Environment/Libraries
|
||||
+License: MIT
|
||||
+URL: http://fedorahosted.org/gss-proxy
|
||||
+Source0: %{name}-%{version}.tar.gz
|
||||
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
%global servicename gssproxy
|
||||
%global gsspstatedir %{_localstatedir}/lib/gssproxy
|
||||
%global pipepath %{gsspstatedir}/pipes
|
||||
-%global pubconfpath %{sysconfdir}/gssproxy
|
||||
+%global pubconfpath %{_sysconfdir}/gssproxy
|
||||
|
||||
### Build Dependencies ###
|
||||
|
||||
+BuildRequires: gettext-devel, krb5-devel, iniparser-devel, libverto-devel, popt-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
BuildRequires: m4
|
||||
-%{?fedora:BuildRequires: popt-devel}
|
||||
-%if 0%{?rhel} <= 5
|
||||
-BuildRequires: popt
|
||||
-%endif
|
||||
-%if 0%{?rhel} >= 6
|
||||
-BuildRequires: popt-devel
|
||||
-%endif
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: libxml2
|
||||
BuildRequires: docbook-style-xsl
|
||||
-BuildRequires: krb5-devel
|
||||
BuildRequires: doxygen
|
||||
-BuildRequires: libselinux-devel
|
||||
-BuildRequires: keyutils-libs-devel
|
||||
-BuildRequires: gettext-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: findutils
|
||||
|
||||
+
|
||||
%description
|
||||
A proxy for GSSAPI credential handling
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
-%build
|
||||
-
|
||||
-# RHEL 5 uses an old libtool, so we need to force it to reconfigure
|
||||
-# This is safe to do on newer packages too, as it will just
|
||||
-# gather the appropriate m4 files from the libtool package
|
||||
-for i in libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
|
||||
-do
|
||||
- find . -name $i -exec rm -f {} \;
|
||||
-done
|
||||
-
|
||||
-autoreconf -ivf
|
||||
|
||||
+%build
|
||||
+cd proxy
|
||||
+autoreconf -f -i
|
||||
%configure \
|
||||
--with-pipe-path=%{pipepath} \
|
||||
--with-pubconf-path=%{pubconfpath} \
|
||||
@@ -80,45 +49,30 @@ autoreconf -ivf
|
||||
make %{?_smp_mflags} all
|
||||
|
||||
|
||||
-# Only build docs on recent distros
|
||||
-%if 0%{?fedora}
|
||||
-make %{?_smp_mflags} docs
|
||||
-%endif
|
||||
-
|
||||
-%if 0%{?rhel} >= 6
|
||||
-make %{?_smp_mflags} docs
|
||||
-%endif
|
||||
-
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
-
|
||||
+cd proxy
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
-
|
||||
-# Prepare language files
|
||||
-/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT gssproxy
|
||||
-
|
||||
-# Remove .la files created by libtool
|
||||
-find $RPM_BUILD_ROOT -name "*.la" -exec rm -f {} \;
|
||||
-
|
||||
-# Suppress developer-only documentation
|
||||
-rm -Rf ${RPM_BUILD_ROOT}/%{_docdir}/%{name}/doc
|
||||
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/gssproxy
|
||||
+install -m644 examples/gssproxy-example.conf $RPM_BUILD_ROOT%{_sysconfdir}/gssproxy/gssproxy.conf
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
+
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
-%doc COPYING
|
||||
-%doc examples/gssproxy-example.conf
|
||||
-%{_initrddir}/%{name}
|
||||
+%doc README NOTES
|
||||
+%doc proxy/examples/gssproxy-example.conf
|
||||
+#%{_initrddir}/%{name}
|
||||
%{_sbindir}/gssproxy
|
||||
-%{_libdir}/%{name}/
|
||||
+#%{_libdir}/%{name}/
|
||||
%dir %{gsspstatedir}
|
||||
%attr(755,root,root) %dir %{pipepath}
|
||||
%attr(755,root,root) %dir %{pubconfpath}
|
||||
%attr(750,root,root) %dir %{_var}/log/%{name}
|
||||
-%attr(711,root,root) %dir %{_sysconfdir}/gssproxy
|
||||
-%ghost %attr(0600,root,root) %config(noreplace) %%{_sysconfdir}/gssproxy/gssproxy.conf
|
||||
+%attr(711,root,root) %dir /%{_sysconfdir}/gssproxy
|
||||
+%attr(0600,root,root) %config(noreplace) /%{_sysconfdir}/gssproxy/gssproxy.conf
|
||||
%{_mandir}/man5/gssproxy.conf.5*
|
||||
%{_mandir}/man8/gssproxy.8*
|
||||
|
||||
@@ -136,12 +90,9 @@ if [ $1 = 0 ]; then
|
||||
/sbin/chkconfig --del %{servicename}
|
||||
fi
|
||||
|
||||
-%postun -p /sbin/ldconfig
|
||||
-
|
||||
-%post client -p /sbin/ldconfig
|
||||
-
|
||||
-%postun client -p /sbin/ldconfig
|
||||
-
|
||||
%changelog
|
||||
+* Wed Mar 28 2012 Guenther Deschner <gdeschner@redhat.com> 0.0.1-1
|
||||
+- Various fixes
|
||||
+
|
||||
* Mon Dec 12 2011 Simo Sorce <simo@redhat.com> - @PACKAGE_VERSION@-0@PRERELEASE_VERSION@
|
||||
- Automated build of the gssproxy daemon
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
|
||||
From b7b121d00878b7236e24f1a1b98cb1444feea8de Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gdeschner@redhat.com>
|
||||
Date: Mon, 2 Jul 2012 14:42:28 +0200
|
||||
Subject: [PATCH 2/8] Add systemd packaging to gssproxy spec file.
|
||||
|
||||
Guenther
|
||||
---
|
||||
proxy/contrib/gssproxy.spec.in | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/proxy/contrib/gssproxy.spec.in b/proxy/contrib/gssproxy.spec.in
|
||||
index 2950d6d..0a3444d 100644
|
||||
--- a/proxy/contrib/gssproxy.spec.in
|
||||
+++ b/proxy/contrib/gssproxy.spec.in
|
||||
@@ -27,6 +27,7 @@ BuildRequires: docbook-style-xsl
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: findutils
|
||||
+BuildRequires: systemd-units
|
||||
|
||||
|
||||
%description
|
||||
@@ -54,7 +55,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
cd proxy
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/gssproxy
|
||||
+mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
||||
install -m644 examples/gssproxy-example.conf $RPM_BUILD_ROOT%{_sysconfdir}/gssproxy/gssproxy.conf
|
||||
+install -m644 systemd/gssproxy.service $RPM_BUILD_ROOT%{_unitdir}/gssproxy.service
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@@ -64,9 +67,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%defattr(-,root,root,-)
|
||||
%doc README NOTES
|
||||
%doc proxy/examples/gssproxy-example.conf
|
||||
-#%{_initrddir}/%{name}
|
||||
+%{_unitdir}/gssproxy.service
|
||||
%{_sbindir}/gssproxy
|
||||
-#%{_libdir}/%{name}/
|
||||
%dir %{gsspstatedir}
|
||||
%attr(755,root,root) %dir %{pipepath}
|
||||
%attr(755,root,root) %dir %{pubconfpath}
|
||||
@@ -91,6 +93,9 @@ if [ $1 = 0 ]; then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
+* Mon Jul 02 2012 Guenther Deschner <gdeschner@redhat.com> 0.0.1-2
|
||||
+- Add systemd packaging
|
||||
+
|
||||
* Wed Mar 28 2012 Guenther Deschner <gdeschner@redhat.com> 0.0.1-1
|
||||
- Various fixes
|
||||
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
|
||||
From ac8b4bd391903fb97c43bb4d7690d59e0c8b8cf3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gdeschner@redhat.com>
|
||||
Date: Mon, 2 Jul 2012 17:28:48 +0200
|
||||
Subject: [PATCH 3/8] Fix systemd config file for gssproxy.
|
||||
|
||||
Guenther
|
||||
---
|
||||
proxy/systemd/gssproxy.service | 2 +-
|
||||
proxy/systemd/gssproxy.service.in | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/proxy/systemd/gssproxy.service b/proxy/systemd/gssproxy.service
|
||||
index ab25699..45bbf6e 100644
|
||||
--- a/proxy/systemd/gssproxy.service
|
||||
+++ b/proxy/systemd/gssproxy.service
|
||||
@@ -4,7 +4,7 @@ Description=GSSAPI Proxy Daemon
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
-ExecStart=${exec_prefix}/sbin/gssproxy -D -f
|
||||
+ExecStart=${exec_prefix}/sbin/gssproxy -D
|
||||
# These two should be used with traditional UNIX forking daemons
|
||||
# consult systemd.service(5) for more details
|
||||
Type=forking
|
||||
diff --git a/proxy/systemd/gssproxy.service.in b/proxy/systemd/gssproxy.service.in
|
||||
index 996b60d..8c0be48 100644
|
||||
--- a/proxy/systemd/gssproxy.service.in
|
||||
+++ b/proxy/systemd/gssproxy.service.in
|
||||
@@ -4,7 +4,7 @@ Description=GSSAPI Proxy Daemon
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
-ExecStart=@sbindir@/gssproxy -D -f
|
||||
+ExecStart=@sbindir@/gssproxy -D
|
||||
# These two should be used with traditional UNIX forking daemons
|
||||
# consult systemd.service(5) for more details
|
||||
Type=forking
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
|
||||
From ba0fc6bab3453e1cb9d2f751c7e623aaeb0a74f7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gdeschner@redhat.com>
|
||||
Date: Mon, 2 Jul 2012 18:14:14 +0200
|
||||
Subject: [PATCH 4/8] Fix systemd service file as we dont write a pidfile at
|
||||
the moment.
|
||||
|
||||
Guenther
|
||||
---
|
||||
proxy/systemd/gssproxy.service | 3 ++-
|
||||
proxy/systemd/gssproxy.service.in | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/proxy/systemd/gssproxy.service b/proxy/systemd/gssproxy.service
|
||||
index 45bbf6e..e8fe130 100644
|
||||
--- a/proxy/systemd/gssproxy.service
|
||||
+++ b/proxy/systemd/gssproxy.service
|
||||
@@ -8,7 +8,8 @@ ExecStart=${exec_prefix}/sbin/gssproxy -D
|
||||
# These two should be used with traditional UNIX forking daemons
|
||||
# consult systemd.service(5) for more details
|
||||
Type=forking
|
||||
-PIDFile=${prefix}/var/run/gssproxy.pid
|
||||
+# At the moment GSSPROXY does not create a pidfile
|
||||
+#PIDFile=${prefix}/var/run/gssproxy.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
diff --git a/proxy/systemd/gssproxy.service.in b/proxy/systemd/gssproxy.service.in
|
||||
index 8c0be48..d55f991 100644
|
||||
--- a/proxy/systemd/gssproxy.service.in
|
||||
+++ b/proxy/systemd/gssproxy.service.in
|
||||
@@ -8,7 +8,8 @@ ExecStart=@sbindir@/gssproxy -D
|
||||
# These two should be used with traditional UNIX forking daemons
|
||||
# consult systemd.service(5) for more details
|
||||
Type=forking
|
||||
-PIDFile=@localstatedir@/run/gssproxy.pid
|
||||
+# At the moment GSSPROXY does not create a pidfile
|
||||
+#PIDFile=@localstatedir@/run/gssproxy.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
|
||||
From 18bda16f4b3b50ffb37706d11ad451369fd59a7d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gdeschner@redhat.com>
|
||||
Date: Tue, 3 Jul 2012 17:26:44 +0200
|
||||
Subject: [PATCH 5/8] Packaging fixes from Andreas Schneider <asn@redhat.com>.
|
||||
|
||||
Guenther
|
||||
---
|
||||
proxy/contrib/gssproxy.spec.in | 21 +++++++++++----------
|
||||
1 file changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/proxy/contrib/gssproxy.spec.in b/proxy/contrib/gssproxy.spec.in
|
||||
index 0a3444d..8b17c4f 100644
|
||||
--- a/proxy/contrib/gssproxy.spec.in
|
||||
+++ b/proxy/contrib/gssproxy.spec.in
|
||||
@@ -38,7 +38,7 @@ A proxy for GSSAPI credential handling
|
||||
|
||||
|
||||
%build
|
||||
-cd proxy
|
||||
+pushd proxy
|
||||
autoreconf -f -i
|
||||
%configure \
|
||||
--with-pipe-path=%{pipepath} \
|
||||
@@ -48,19 +48,20 @@ autoreconf -f -i
|
||||
--disable-rpath
|
||||
|
||||
make %{?_smp_mflags} all
|
||||
-
|
||||
+popd
|
||||
|
||||
%install
|
||||
-rm -rf $RPM_BUILD_ROOT
|
||||
-cd proxy
|
||||
-make install DESTDIR=$RPM_BUILD_ROOT
|
||||
-mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/gssproxy
|
||||
-mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
||||
-install -m644 examples/gssproxy-example.conf $RPM_BUILD_ROOT%{_sysconfdir}/gssproxy/gssproxy.conf
|
||||
-install -m644 systemd/gssproxy.service $RPM_BUILD_ROOT%{_unitdir}/gssproxy.service
|
||||
+rm -rf %{buildroot}
|
||||
+pushd proxy
|
||||
+make install DESTDIR=%{buildroot}
|
||||
+install -d -m755 %{buildroot}%{_sysconfdir}/gssproxy
|
||||
+install -d -m755 %{buildroot}%{_unitdir}
|
||||
+install -m644 examples/gssproxy-example.conf %{buildroot}%{_sysconfdir}/gssproxy/gssproxy.conf
|
||||
+install -m644 systemd/gssproxy.service %{buildroot}%{_unitdir}/gssproxy.service
|
||||
+popd
|
||||
|
||||
%clean
|
||||
-rm -rf $RPM_BUILD_ROOT
|
||||
+rm -rf %{buildroot}
|
||||
|
||||
|
||||
%files
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
|
||||
From ea5059c2f17ba5ca00fb349230094db58e0c52d7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gdeschner@redhat.com>
|
||||
Date: Tue, 3 Jul 2012 17:40:36 +0200
|
||||
Subject: [PATCH 6/8] Adjust release version.
|
||||
|
||||
Guenther
|
||||
---
|
||||
proxy/contrib/gssproxy.spec.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/proxy/contrib/gssproxy.spec.in b/proxy/contrib/gssproxy.spec.in
|
||||
index 8b17c4f..08e6d2c 100644
|
||||
--- a/proxy/contrib/gssproxy.spec.in
|
||||
+++ b/proxy/contrib/gssproxy.spec.in
|
||||
@@ -1,6 +1,6 @@
|
||||
Name: @PACKAGE_NAME@
|
||||
Version: @PACKAGE_VERSION@
|
||||
-Release: 0@PRERELEASE_VERSION@%{?dist}
|
||||
+Release: 2@PRERELEASE_VERSION@%{?dist}
|
||||
Summary: GSSAPI Proxy
|
||||
|
||||
Group: System Environment/Libraries
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
|
||||
From 82241ceb4e31f43a2a3e9c73fc6cf62e920fbb44 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gdeschner@redhat.com>
|
||||
Date: Fri, 13 Jul 2012 12:22:11 +0200
|
||||
Subject: [PATCH 7/8] packaging: Fix source tarball url in spec.
|
||||
|
||||
Guenther
|
||||
---
|
||||
proxy/contrib/gssproxy.spec.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/proxy/contrib/gssproxy.spec.in b/proxy/contrib/gssproxy.spec.in
|
||||
index 08e6d2c..72130f2 100644
|
||||
--- a/proxy/contrib/gssproxy.spec.in
|
||||
+++ b/proxy/contrib/gssproxy.spec.in
|
||||
@@ -6,7 +6,7 @@ Summary: GSSAPI Proxy
|
||||
Group: System Environment/Libraries
|
||||
License: MIT
|
||||
URL: http://fedorahosted.org/gss-proxy
|
||||
-Source0: %{name}-%{version}.tar.gz
|
||||
+Source0: http://fedorahosted.org/released/gss-proxy/%{name}-%{version}.tar.gz
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
%global servicename gssproxy
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
|
||||
From 65a1a23f9f85dc78a39df642860356ca6d94cff1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gdeschner@redhat.com>
|
||||
Date: Fri, 13 Jul 2012 12:22:28 +0200
|
||||
Subject: [PATCH 8/8] packaging: Fix systemd scriplets.
|
||||
|
||||
Guenther
|
||||
---
|
||||
proxy/contrib/gssproxy.spec.in | 22 ++++++++++++++--------
|
||||
1 file changed, 14 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/proxy/contrib/gssproxy.spec.in b/proxy/contrib/gssproxy.spec.in
|
||||
index 72130f2..8c67e91 100644
|
||||
--- a/proxy/contrib/gssproxy.spec.in
|
||||
+++ b/proxy/contrib/gssproxy.spec.in
|
||||
@@ -80,17 +80,23 @@ rm -rf %{buildroot}
|
||||
%{_mandir}/man8/gssproxy.8*
|
||||
|
||||
%post
|
||||
-/sbin/ldconfig
|
||||
-/sbin/chkconfig --add %{servicename}
|
||||
-
|
||||
-if [ $1 -ge 1 ] ; then
|
||||
- /sbin/service %{servicename} condrestart 2>&1 > /dev/null
|
||||
+if [ $1 -eq 1 ] ; then
|
||||
+ # Initial installation
|
||||
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%preun
|
||||
-if [ $1 = 0 ]; then
|
||||
- /sbin/service %{servicename} stop 2>&1 > /dev/null
|
||||
- /sbin/chkconfig --del %{servicename}
|
||||
+if [ $1 -eq 0 ] ; then
|
||||
+ # Package removal, not upgrade
|
||||
+ /bin/systemctl --no-reload disable gssproxy.service > /dev/null 2>&1 || :
|
||||
+ /bin/systemctl stop gssproxy.service > /dev/null 2>&1 || :
|
||||
+fi
|
||||
+
|
||||
+%postun
|
||||
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
+if [ $1 -ge 1 ] ; then
|
||||
+ # Package upgrade, not uninstall
|
||||
+ /bin/systemctl try-restart gssproxy.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%changelog
|
||||
--
|
||||
1.7.10.4
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: gssproxy
|
||||
Version: 0.0.2
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: GSSAPI Proxy
|
||||
|
||||
Group: System Environment/Libraries
|
||||
@ -8,6 +8,7 @@ License: MIT
|
||||
URL: http://fedorahosted.org/gss-proxy
|
||||
Source0: http://fedorahosted.org/released/gss-proxy/%{name}-%{version}.tar.gz
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
Patch0: gssproxy-packaging.patch
|
||||
|
||||
%global servicename gssproxy
|
||||
%global gsspstatedir %{_localstatedir}/lib/gssproxy
|
||||
@ -41,6 +42,7 @@ A proxy for GSSAPI credential handling
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch0 -p2 -b .packaging
|
||||
|
||||
%build
|
||||
autoreconf -f -i
|
||||
@ -98,6 +100,9 @@ if [ $1 -ge 1 ] ; then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Mon Jul 16 2012 Guenther Deschner <gdeschner@redhat.com> 0.0.2-4
|
||||
- Fix systemd service file
|
||||
|
||||
* Fri Jul 13 2012 Guenther Deschner <gdeschner@redhat.com> 0.0.2-3
|
||||
- Fix various packaging issues
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user