[ipvsadm] Update spec file and fix install paths
rohara
rohara at fedoraproject.org
Tue May 20 03:48:53 UTC 2014
commit 068551b8e7b7c5e5798413d8028e53b836760b42
Author: Ryan O'Hara <rohara at redhat.com>
Date: Mon May 19 22:48:42 2014 -0500
Update spec file and fix install paths
ipvsadm.spec | 95 ++++++++++++++++++++++++++-------------------------------
1 files changed, 43 insertions(+), 52 deletions(-)
---
diff --git a/ipvsadm.spec b/ipvsadm.spec
index e4c8378..823f3ec 100644
--- a/ipvsadm.spec
+++ b/ipvsadm.spec
@@ -1,88 +1,79 @@
Name: ipvsadm
Summary: Utility to administer the Linux Virtual Server
Version: 1.27
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
URL: https://kernel.org/pub/linux/utils/kernel/ipvsadm/
-Group: Applications/System
Source0: https://kernel.org/pub/linux/utils/kernel/ipvsadm/%{name}-%{version}.tar.gz
Source1: ipvsadm.service
Source2: ipvsadm-config
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Buildrequires: libnl3-devel
Buildrequires: popt-devel
BuildRequires: systemd
+
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
-# For triggerun
-Requires(post): systemd-sysv
%description
-ipvsadm is a utility to administer the IP Virtual Server services
-offered by the Linux kernel.
-
+ipvsadm is used to setup, maintain, and inspect the virtual server
+table in the Linux kernel. The Linux Virtual Server can be used to
+build scalable network services based on a cluster of two or more
+nodes. The active node of the cluster redirects service requests to a
+collection of server hosts that will actually perform the
+services. Supported Features include:
+ - two transport layer (layer-4) protocols (TCP and UDP)
+ - three packet-forwarding methods (NAT, tunneling, and direct routing)
+ - eight load balancing algorithms (round robin, weighted round robin,
+ least-connection, weighted least-connection, locality-based
+ least-connection, locality-based least-connection with
+ replication, destination-hashing, and source-hashing)
%prep
%setup -q
-
%build
-# Don't use _smp_mflags as it makes the build fail (1.2.4)
CFLAGS="%{optflags}" make
-
%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}/etc/rc.d/init.d
-make install BUILD_ROOT=%{buildroot} MANDIR=%{_mandir}
-# Remove the provided init script
-rm -f %{buildroot}/etc/rc.d/init.d/ipvsadm
-install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/ipvsadm.service
-# Install config file which controls the service behavior
-install -D -p -m 0600 %{SOURCE2} %{buildroot}/etc/sysconfig/ipvsadm-config
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}%{_sysconfdir}/rc.d/init.d
+%{__make} install BUILD_ROOT=%{buildroot}%{_prefix} SBIN=%{buildroot}%{_sbindir} MANDIR=%{buildroot}%{_mandir} MAN=%{buildroot}%{_mandir}/man8 INIT=%{buildroot}%{_sysconfdir}/rc.d/init.d
+%{__rm} -f %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
+%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
+%{__install} -p -D -m 0600 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}-config
%clean
-rm -rf %{buildroot}
-
+%{__rm} -rf %{buildroot}
%post
-%systemd_post ipvsadm.service
+%systemd_post %{name}.service
%preun
-%systemd_preun ipvsadm.service
+%systemd_preun %{name}.service
%postun
-%systemd_postun_with_restart ipvsadm.service
-
-
-%triggerun -- ipvsadm < 1.26-4
-# Save the current service runlevel info
-# User must manually run systemd-sysv-convert --apply ipvsadm
-# to migrate them to systemd targets
-/usr/bin/systemd-sysv-convert --save ipvsadm >/dev/null 2>&1 ||:
-
-# Run these because the SysV package being removed won't do them
-/sbin/chkconfig --del ipvsadm >/dev/null 2>&1 || :
-/bin/systemctl try-restart ipvsadm.service >/dev/null 2>&1 || :
+%systemd_postun_with_restart %{name}.service
%files
-%defattr(-,root,root)
-%doc README
-%{_unitdir}/ipvsadm.service
-%config(noreplace) /etc/sysconfig/ipvsadm-config
-/sbin/ipvsadm
-/sbin/ipvsadm-restore
-/sbin/ipvsadm-save
-%{_mandir}/man8/ipvsadm.8*
-%{_mandir}/man8/ipvsadm-restore.8*
-%{_mandir}/man8/ipvsadm-save.8*
-
+%defattr(-,root,root,-)
+%doc MAINTAINERS README
+%{_unitdir}/%{name}.service
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-config
+%{_sbindir}/%{name}
+%{_sbindir}/%{name}-restore
+%{_sbindir}/%{name}-save
+%{_mandir}/man8/%{name}.8*
+%{_mandir}/man8/%{name}-restore.8*
+%{_mandir}/man8/%{name}-save.8*
%changelog
+* Mon May 19 2014 Ryan O'Hara <rohara at redhat.com> - 1.27-3
+- Update spec file and fix install paths
+
* Fri Nov 22 2013 Xose Vazquez Perez <xose.vazquez at gmail.com> - 1.27-2
- Link with libnl3
@@ -194,10 +185,10 @@ rm -rf %{buildroot}
* Fri Jun 13 2003 Mike McLean <mikem at redhat.com> 1.21-8
- dropping ppc from excluded arches
-* Thu Apr 4 2003 Mike McLean <mikem at redhat.com> 1.21-7
+* Fri Apr 4 2003 Mike McLean <mikem at redhat.com> 1.21-7
- changing %%ExcludeArch
-* Thu Apr 4 2003 Mike McLean <mikem at redhat.com> 1.21-6
+* Fri Apr 4 2003 Mike McLean <mikem at redhat.com> 1.21-6
- added BuildRequires: kernel-source
- escaped all %% characters in %%changelog
@@ -209,7 +200,7 @@ rm -rf %{buildroot}
- Argh,.. %%docdir was defined which overrode what I'd
intended to happen
-* Tue Aug 1 2002 Philip Copeland <bryce at redhat.com>
+* Thu Aug 1 2002 Philip Copeland <bryce at redhat.com>
- Ah... the manuals were being pushed into /usr/man
instead of /usr/share/man. Fixed.
@@ -217,13 +208,13 @@ rm -rf %{buildroot}
- Minor Makefile tweak so that we do a minimal hunt for to find
the ip_vs.h file location
-* Thu Dec 16 2001 Wensong Zhang <wensong at linuxvirtualserver.org>
+* Sun Dec 16 2001 Wensong Zhang <wensong at linuxvirtualserver.org>
- Changed to install ipvsadm man pages according to the %%{_mandir}
-* Thu Dec 30 2000 Wensong Zhang <wensong at linuxvirtualserver.org>
+* Sat Dec 30 2000 Wensong Zhang <wensong at linuxvirtualserver.org>
- update the %%file section
-* Thu Dec 17 2000 Wensong Zhang <wensong at linuxvirtualserver.org>
+* Sun Dec 17 2000 Wensong Zhang <wensong at linuxvirtualserver.org>
- Added a if-condition to keep both new or old rpm utility building
the package happily.
More information about the scm-commits
mailing list