install binaries into /usr/bin and /usr/sbin (#1016674)
This commit is contained in:
parent
759b4321dd
commit
a592af7551
78
net-tools-install-to-usr-bin.patch
Normal file
78
net-tools-install-to-usr-bin.patch
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 0574841..8d42f9d 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -26,6 +26,8 @@
|
||||||
|
# set the base of the Installation
|
||||||
|
# BASEDIR = /mnt
|
||||||
|
BASEDIR ?= $(DESTDIR)
|
||||||
|
+BINDIR ?= /bin
|
||||||
|
+SBINDIR ?= /sbin
|
||||||
|
|
||||||
|
# path to the net-lib support library. Default: lib
|
||||||
|
NET_LIB_PATH = lib
|
||||||
|
@@ -199,39 +201,39 @@ installbin:
|
||||||
|
@echo "Notice: ifconfig and route are now installed into /bin"
|
||||||
|
@echo "######################################################"
|
||||||
|
@echo
|
||||||
|
- install -m 0755 -d ${BASEDIR}/sbin
|
||||||
|
- install -m 0755 -d ${BASEDIR}/bin
|
||||||
|
- install -m 0755 arp ${BASEDIR}/sbin
|
||||||
|
- install -m 0755 hostname ${BASEDIR}/bin
|
||||||
|
- install -m 0755 ifconfig ${BASEDIR}/bin
|
||||||
|
- install -m 0755 nameif ${BASEDIR}/sbin
|
||||||
|
- install -m 0755 netstat ${BASEDIR}/bin
|
||||||
|
- install -m 0755 plipconfig $(BASEDIR)/sbin
|
||||||
|
- install -m 0755 rarp ${BASEDIR}/sbin
|
||||||
|
- install -m 0755 route ${BASEDIR}/bin
|
||||||
|
- install -m 0755 slattach $(BASEDIR)/sbin
|
||||||
|
+ install -m 0755 -d ${BASEDIR}${SBINDIR}
|
||||||
|
+ install -m 0755 -d ${BASEDIR}${BINDIR}
|
||||||
|
+ install -m 0755 arp ${BASEDIR}${SBINDIR}
|
||||||
|
+ install -m 0755 hostname ${BASEDIR}${BINDIR}
|
||||||
|
+ install -m 0755 ifconfig ${BASEDIR}${BINDIR}
|
||||||
|
+ install -m 0755 nameif ${BASEDIR}${SBINDIR}
|
||||||
|
+ install -m 0755 netstat ${BASEDIR}${BINDIR}
|
||||||
|
+ install -m 0755 plipconfig $(BASEDIR)${SBINDIR}
|
||||||
|
+ install -m 0755 rarp ${BASEDIR}${SBINDIR}
|
||||||
|
+ install -m 0755 route ${BASEDIR}${BINDIR}
|
||||||
|
+ install -m 0755 slattach $(BASEDIR)${SBINDIR}
|
||||||
|
ifeq ($(HAVE_IP_TOOLS),1)
|
||||||
|
- install -m 0755 ipmaddr $(BASEDIR)/sbin
|
||||||
|
- install -m 0755 iptunnel $(BASEDIR)/sbin
|
||||||
|
+ install -m 0755 ipmaddr $(BASEDIR)${SBINDIR}
|
||||||
|
+ install -m 0755 iptunnel $(BASEDIR)${SBINDIR}
|
||||||
|
endif
|
||||||
|
ifeq ($(HAVE_MII),1)
|
||||||
|
- install -m 0755 mii-tool $(BASEDIR)/sbin
|
||||||
|
+ install -m 0755 mii-tool $(BASEDIR)${SBINDIR}
|
||||||
|
endif
|
||||||
|
- ln -fs hostname $(BASEDIR)/bin/dnsdomainname
|
||||||
|
- ln -fs hostname $(BASEDIR)/bin/ypdomainname
|
||||||
|
- ln -fs hostname $(BASEDIR)/bin/nisdomainname
|
||||||
|
- ln -fs hostname $(BASEDIR)/bin/domainname
|
||||||
|
+ ln -fs hostname $(BASEDIR)${BINDIR}/dnsdomainname
|
||||||
|
+ ln -fs hostname $(BASEDIR)${BINDIR}/ypdomainname
|
||||||
|
+ ln -fs hostname $(BASEDIR)${BINDIR}/nisdomainname
|
||||||
|
+ ln -fs hostname $(BASEDIR)${BINDIR}/domainname
|
||||||
|
ifeq ($(HAVE_AFDECnet),1)
|
||||||
|
- ln -fs hostname $(BASEDIR)/bin/nodename
|
||||||
|
+ ln -fs hostname $(BASEDIR)${BINDIR}/nodename
|
||||||
|
endif
|
||||||
|
|
||||||
|
savebin:
|
||||||
|
- @for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \
|
||||||
|
- ${BASEDIR}/bin/netstat \
|
||||||
|
- ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \
|
||||||
|
- ${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \
|
||||||
|
- ${BASEDIR}/bin/dnsdomainname ${BASEDIR}/bin/nisdomainname \
|
||||||
|
- ${BASEDIR}/bin/domainname ; do \
|
||||||
|
+ @for i in ${BASEDIR}${SBINDIR}/arp ${BASEDIR}${SBINDIR}/ifconfig \
|
||||||
|
+ ${BASEDIR}${BINDIR}/netstat \
|
||||||
|
+ ${BASEDIR}${SBINDIR}/rarp ${BASEDIR}${SBINDIR}/route \
|
||||||
|
+ ${BASEDIR}${BINDIR}/hostname ${BASEDIR}${BINDIR}/ypdomainname \
|
||||||
|
+ ${BASEDIR}${BINDIR}/dnsdomainname ${BASEDIR}${BINDIR}/nisdomainname \
|
||||||
|
+ ${BASEDIR}${BINDIR}/domainname ; do \
|
||||||
|
[ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved.
|
||||||
|
|
||||||
|
installdata:
|
@ -3,7 +3,7 @@
|
|||||||
Summary: Basic networking tools
|
Summary: Basic networking tools
|
||||||
Name: net-tools
|
Name: net-tools
|
||||||
Version: 2.0
|
Version: 2.0
|
||||||
Release: 0.14.%{checkout}%{?dist}
|
Release: 0.15.%{checkout}%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://sourceforge.net/projects/net-tools/
|
URL: http://sourceforge.net/projects/net-tools/
|
||||||
@ -53,6 +53,9 @@ Patch10: net-tools-netstat-probe.patch
|
|||||||
# use all interfaces instead of default (#1003875)
|
# use all interfaces instead of default (#1003875)
|
||||||
Patch20: ether-wake-interfaces.patch
|
Patch20: ether-wake-interfaces.patch
|
||||||
|
|
||||||
|
# install binaries into /usr/bin and /usr/sbin (#1016674)
|
||||||
|
Patch21: net-tools-install-to-usr-bin.patch
|
||||||
|
|
||||||
BuildRequires: gettext, libselinux
|
BuildRequires: gettext, libselinux
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd-units
|
||||||
@ -86,6 +89,7 @@ cp %SOURCE7 ./man/en_US
|
|||||||
cp %SOURCE8 ./man/en_US
|
cp %SOURCE8 ./man/en_US
|
||||||
|
|
||||||
%patch20 -p1 -b .interfaces
|
%patch20 -p1 -b .interfaces
|
||||||
|
%patch21 -p1 -b .usr_bin
|
||||||
|
|
||||||
touch ./config.h
|
touch ./config.h
|
||||||
|
|
||||||
@ -108,28 +112,23 @@ mv man/de_DE man/de
|
|||||||
mv man/fr_FR man/fr
|
mv man/fr_FR man/fr
|
||||||
mv man/pt_BR man/pt
|
mv man/pt_BR man/pt
|
||||||
|
|
||||||
make BASEDIR=%{buildroot} mandir=%{_mandir} install
|
make BASEDIR=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} install
|
||||||
|
|
||||||
# ifconfig and route are installed into /bin by default
|
install -m 755 ether-wake %{buildroot}%{_sbindir}
|
||||||
# mv them back to /sbin for now as I (jpopelka) don't think customers would be happy
|
install -m 755 mii-diag %{buildroot}%{_sbindir}
|
||||||
mv %{buildroot}/bin/ifconfig %{buildroot}/sbin
|
|
||||||
mv %{buildroot}/bin/route %{buildroot}/sbin
|
|
||||||
|
|
||||||
install -m 755 ether-wake %{buildroot}/sbin
|
rm %{buildroot}%{_sbindir}/rarp
|
||||||
install -m 755 mii-diag %{buildroot}/sbin
|
|
||||||
|
|
||||||
rm %{buildroot}/sbin/rarp
|
|
||||||
rm %{buildroot}%{_mandir}/man8/rarp.8*
|
rm %{buildroot}%{_mandir}/man8/rarp.8*
|
||||||
rm %{buildroot}%{_mandir}/de/man8/rarp.8*
|
rm %{buildroot}%{_mandir}/de/man8/rarp.8*
|
||||||
rm %{buildroot}%{_mandir}/fr/man8/rarp.8*
|
rm %{buildroot}%{_mandir}/fr/man8/rarp.8*
|
||||||
rm %{buildroot}%{_mandir}/pt/man8/rarp.8*
|
rm %{buildroot}%{_mandir}/pt/man8/rarp.8*
|
||||||
|
|
||||||
# remove hostname (has its own package)
|
# remove hostname (has its own package)
|
||||||
rm %{buildroot}/bin/dnsdomainname
|
rm %{buildroot}%{_bindir}/dnsdomainname
|
||||||
rm %{buildroot}/bin/domainname
|
rm %{buildroot}%{_bindir}/domainname
|
||||||
rm %{buildroot}/bin/hostname
|
rm %{buildroot}%{_bindir}/hostname
|
||||||
rm %{buildroot}/bin/nisdomainname
|
rm %{buildroot}%{_bindir}/nisdomainname
|
||||||
rm %{buildroot}/bin/ypdomainname
|
rm %{buildroot}%{_bindir}/ypdomainname
|
||||||
rm -rf %{buildroot}%{_mandir}/de/man1
|
rm -rf %{buildroot}%{_mandir}/de/man1
|
||||||
rm -rf %{buildroot}%{_mandir}/fr/man1
|
rm -rf %{buildroot}%{_mandir}/fr/man1
|
||||||
rm -rf %{buildroot}%{_mandir}/man1
|
rm -rf %{buildroot}%{_mandir}/man1
|
||||||
@ -146,22 +145,25 @@ install -m 644 %{SOURCE9} %{buildroot}%{_unitdir}
|
|||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
/bin/netstat
|
%{_bindir}/netstat
|
||||||
/sbin/ifconfig
|
%{_bindir}/ifconfig
|
||||||
/sbin/route
|
%{_bindir}/route
|
||||||
/sbin/arp
|
%{_sbindir}/arp
|
||||||
/sbin/ether-wake
|
%{_sbindir}/ether-wake
|
||||||
/sbin/ipmaddr
|
%{_sbindir}/ipmaddr
|
||||||
/sbin/iptunnel
|
%{_sbindir}/iptunnel
|
||||||
/sbin/mii-diag
|
%{_sbindir}/mii-diag
|
||||||
/sbin/mii-tool
|
%{_sbindir}/mii-tool
|
||||||
/sbin/nameif
|
%{_sbindir}/nameif
|
||||||
/sbin/plipconfig
|
%{_sbindir}/plipconfig
|
||||||
/sbin/slattach
|
%{_sbindir}/slattach
|
||||||
%{_mandir}/man[58]/*
|
%{_mandir}/man[58]/*
|
||||||
%attr(0644,root,root) %{_unitdir}/arp-ethers.service
|
%attr(0644,root,root) %{_unitdir}/arp-ethers.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 10 2013 Jaromír Končický <jkoncick@redhat.com> - 2.0-0.15.20131004git
|
||||||
|
- install binaries into /usr/bin and /usr/sbin (#1016674)
|
||||||
|
|
||||||
* Fri Oct 04 2013 Jiri Popelka <jpopelka@redhat.com> - 2.0-0.14.20131004git
|
* Fri Oct 04 2013 Jiri Popelka <jpopelka@redhat.com> - 2.0-0.14.20131004git
|
||||||
- latest snapshot
|
- latest snapshot
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user