Update spec file and fix install paths
This commit is contained in:
parent
b787a45c23
commit
068551b8e7
95
ipvsadm.spec
95
ipvsadm.spec
@ -1,88 +1,79 @@
|
|||||||
Name: ipvsadm
|
Name: ipvsadm
|
||||||
Summary: Utility to administer the Linux Virtual Server
|
Summary: Utility to administer the Linux Virtual Server
|
||||||
Version: 1.27
|
Version: 1.27
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://kernel.org/pub/linux/utils/kernel/ipvsadm/
|
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
|
Source0: https://kernel.org/pub/linux/utils/kernel/ipvsadm/%{name}-%{version}.tar.gz
|
||||||
Source1: ipvsadm.service
|
Source1: ipvsadm.service
|
||||||
Source2: ipvsadm-config
|
Source2: ipvsadm-config
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
||||||
Buildrequires: libnl3-devel
|
Buildrequires: libnl3-devel
|
||||||
Buildrequires: popt-devel
|
Buildrequires: popt-devel
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
|
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
Requires(postun): systemd
|
Requires(postun): systemd
|
||||||
# For triggerun
|
|
||||||
Requires(post): systemd-sysv
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
ipvsadm is a utility to administer the IP Virtual Server services
|
ipvsadm is used to setup, maintain, and inspect the virtual server
|
||||||
offered by the Linux kernel.
|
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
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Don't use _smp_mflags as it makes the build fail (1.2.4)
|
|
||||||
CFLAGS="%{optflags}" make
|
CFLAGS="%{optflags}" make
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
%{__rm} -rf %{buildroot}
|
||||||
mkdir -p %{buildroot}/etc/rc.d/init.d
|
%{__mkdir_p} %{buildroot}%{_sysconfdir}/rc.d/init.d
|
||||||
make install BUILD_ROOT=%{buildroot} MANDIR=%{_mandir}
|
%{__make} install BUILD_ROOT=%{buildroot}%{_prefix} SBIN=%{buildroot}%{_sbindir} MANDIR=%{buildroot}%{_mandir} MAN=%{buildroot}%{_mandir}/man8 INIT=%{buildroot}%{_sysconfdir}/rc.d/init.d
|
||||||
# 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} -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
|
%clean
|
||||||
rm -rf %{buildroot}
|
%{__rm} -rf %{buildroot}
|
||||||
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post ipvsadm.service
|
%systemd_post %{name}.service
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%systemd_preun ipvsadm.service
|
%systemd_preun %{name}.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%systemd_postun_with_restart ipvsadm.service
|
%systemd_postun_with_restart %{name}.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 || :
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,-)
|
||||||
%doc README
|
%doc MAINTAINERS README
|
||||||
%{_unitdir}/ipvsadm.service
|
%{_unitdir}/%{name}.service
|
||||||
%config(noreplace) /etc/sysconfig/ipvsadm-config
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-config
|
||||||
/sbin/ipvsadm
|
%{_sbindir}/%{name}
|
||||||
/sbin/ipvsadm-restore
|
%{_sbindir}/%{name}-restore
|
||||||
/sbin/ipvsadm-save
|
%{_sbindir}/%{name}-save
|
||||||
%{_mandir}/man8/ipvsadm.8*
|
%{_mandir}/man8/%{name}.8*
|
||||||
%{_mandir}/man8/ipvsadm-restore.8*
|
%{_mandir}/man8/%{name}-restore.8*
|
||||||
%{_mandir}/man8/ipvsadm-save.8*
|
%{_mandir}/man8/%{name}-save.8*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 19 2014 Ryan O'Hara <rohara@redhat.com> - 1.27-3
|
||||||
|
- Update spec file and fix install paths
|
||||||
|
|
||||||
* Fri Nov 22 2013 Xose Vazquez Perez <xose.vazquez@gmail.com> - 1.27-2
|
* Fri Nov 22 2013 Xose Vazquez Perez <xose.vazquez@gmail.com> - 1.27-2
|
||||||
- Link with libnl3
|
- Link with libnl3
|
||||||
|
|
||||||
@ -194,10 +185,10 @@ rm -rf %{buildroot}
|
|||||||
* Fri Jun 13 2003 Mike McLean <mikem@redhat.com> 1.21-8
|
* Fri Jun 13 2003 Mike McLean <mikem@redhat.com> 1.21-8
|
||||||
- dropping ppc from excluded arches
|
- dropping ppc from excluded arches
|
||||||
|
|
||||||
* Thu Apr 4 2003 Mike McLean <mikem@redhat.com> 1.21-7
|
* Fri Apr 4 2003 Mike McLean <mikem@redhat.com> 1.21-7
|
||||||
- changing %%ExcludeArch
|
- changing %%ExcludeArch
|
||||||
|
|
||||||
* Thu Apr 4 2003 Mike McLean <mikem@redhat.com> 1.21-6
|
* Fri Apr 4 2003 Mike McLean <mikem@redhat.com> 1.21-6
|
||||||
- added BuildRequires: kernel-source
|
- added BuildRequires: kernel-source
|
||||||
- escaped all %% characters in %%changelog
|
- escaped all %% characters in %%changelog
|
||||||
|
|
||||||
@ -209,7 +200,7 @@ rm -rf %{buildroot}
|
|||||||
- Argh,.. %%docdir was defined which overrode what I'd
|
- Argh,.. %%docdir was defined which overrode what I'd
|
||||||
intended to happen
|
intended to happen
|
||||||
|
|
||||||
* Tue Aug 1 2002 Philip Copeland <bryce@redhat.com>
|
* Thu Aug 1 2002 Philip Copeland <bryce@redhat.com>
|
||||||
- Ah... the manuals were being pushed into /usr/man
|
- Ah... the manuals were being pushed into /usr/man
|
||||||
instead of /usr/share/man. Fixed.
|
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
|
- Minor Makefile tweak so that we do a minimal hunt for to find
|
||||||
the ip_vs.h file location
|
the ip_vs.h file location
|
||||||
|
|
||||||
* Thu Dec 16 2001 Wensong Zhang <wensong@linuxvirtualserver.org>
|
* Sun Dec 16 2001 Wensong Zhang <wensong@linuxvirtualserver.org>
|
||||||
- Changed to install ipvsadm man pages according to the %%{_mandir}
|
- Changed to install ipvsadm man pages according to the %%{_mandir}
|
||||||
|
|
||||||
* Thu Dec 30 2000 Wensong Zhang <wensong@linuxvirtualserver.org>
|
* Sat Dec 30 2000 Wensong Zhang <wensong@linuxvirtualserver.org>
|
||||||
- update the %%file section
|
- update the %%file section
|
||||||
|
|
||||||
* Thu Dec 17 2000 Wensong Zhang <wensong@linuxvirtualserver.org>
|
* Sun Dec 17 2000 Wensong Zhang <wensong@linuxvirtualserver.org>
|
||||||
- Added a if-condition to keep both new or old rpm utility building
|
- Added a if-condition to keep both new or old rpm utility building
|
||||||
the package happily.
|
the package happily.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user