From 156dc3b7416ce6e32eed8da0521d4763eb40978f Mon Sep 17 00:00:00 2001 From: Mid Favila Date: Sat, 19 Feb 2022 18:01:48 +0000 Subject: [PATCH] Rework net-tools and inetutils to properly set permissions after install. --- ports/official/core/net-tools/build | 5 ----- ports/official/core/net-tools/post-install | 6 ++++++ ports/official/core/ubase/checksums | 2 +- ports/official/core/ubase/files/makefile.mid | 11 +---------- ports/unofficial/rolling/9base-git-mod/checksums | 2 +- .../rolling/9base-git-mod/files/makefile.mid | 2 -- ports/unofficial/stable/inetutils/build | 3 ++- ports/unofficial/stable/inetutils/post-install | 8 ++++++++ ports/unofficial/stable/man-pages/build | 5 +++++ 9 files changed, 24 insertions(+), 20 deletions(-) create mode 100755 ports/official/core/net-tools/post-install create mode 100755 ports/unofficial/stable/inetutils/post-install diff --git a/ports/official/core/net-tools/build b/ports/official/core/net-tools/build index af1404c..8e29cb0 100755 --- a/ports/official/core/net-tools/build +++ b/ports/official/core/net-tools/build @@ -8,8 +8,3 @@ sed -i 's/\/sbin/\/usr\/bin/' Makefile make make DESTDIR="$1" install - -for bin in route -do chmod 6770 "$1/usr/bin/$bin" -chgrp network "$1/usr/bin/$bin" -done diff --git a/ports/official/core/net-tools/post-install b/ports/official/core/net-tools/post-install new file mode 100755 index 0000000..ea91dad --- /dev/null +++ b/ports/official/core/net-tools/post-install @@ -0,0 +1,6 @@ +#!/bin/sh -e + +for bin in ypdomainname route rarp nisdomainname netstat nameif mii-tool iptunnel ipmaddr ifconfig hostname domainname dnsdomainname arp +do chgrp network "/usr/bin/$bin" +chmod 6550 "/usr/bin/$bin" +done diff --git a/ports/official/core/ubase/checksums b/ports/official/core/ubase/checksums index 61b06d0..54dd87a 100644 --- a/ports/official/core/ubase/checksums +++ b/ports/official/core/ubase/checksums @@ -1,4 +1,4 @@ 628770a9b0d2ccab618d3d5b9bec85e2c2180169dd94449c67ba69283c43cbf7 714715936ff5e8a3574a41031cfbf05d4b061f19fcc07175e717f5db70b7f8e4 4b2932a50164230b0defd4de008e423babf053bac823930258378b0efee64065 -0fba4476fd5cdf9d6b5d1c5847c6ff65e462c6dcec849c795b25c45cdcb1b002 +b4254c3b1f36a0967f6217849680937782261798c5b41e6e4b03cd8c3d073445 diff --git a/ports/official/core/ubase/files/makefile.mid b/ports/official/core/ubase/files/makefile.mid index 4731653..bda6ec1 100644 --- a/ports/official/core/ubase/files/makefile.mid +++ b/ports/official/core/ubase/files/makefile.mid @@ -54,8 +54,6 @@ BIN = \ last \ mesg \ mkswap \ - mount \ - mountpoint \ pagesize \ pivot_root \ readahead \ @@ -64,11 +62,8 @@ BIN = \ swapoff \ swapon \ switch_root \ - sysctl \ truncate \ - umount \ unshare \ - uptime \ vtallow \ who @@ -85,7 +80,6 @@ MAN1 = \ stat.1 \ truncate.1 \ unshare.1 \ - uptime.1 \ vtallow.1 \ who.1 @@ -98,15 +92,12 @@ MAN8 = \ hwclock.8 \ killall5.8 \ mkswap.8 \ - mount.8 \ pivot_root.8 \ readahead.8 \ swaplabel.8 \ swapoff.8 \ swapon.8 \ - switch_root.8 \ - sysctl.8 \ - umount.8 + switch_root.8 LIBUTILOBJ = $(LIBUTILSRC:.c=.o) OBJ = $(BIN:=.o) $(LIBUTILOBJ) diff --git a/ports/unofficial/rolling/9base-git-mod/checksums b/ports/unofficial/rolling/9base-git-mod/checksums index 5ad1fc4..09ed2c3 100644 --- a/ports/unofficial/rolling/9base-git-mod/checksums +++ b/ports/unofficial/rolling/9base-git-mod/checksums @@ -1 +1 @@ -10af8e8dd6ed0ab1f5caba93c7eb74983fdd9d958edacb6ce8d869ce4cc9373c +786b375ce3c2f4cb5530ebb33af966610987146d1257a53483665e66c98e712b diff --git a/ports/unofficial/rolling/9base-git-mod/files/makefile.mid b/ports/unofficial/rolling/9base-git-mod/files/makefile.mid index 54de433..b698695 100644 --- a/ports/unofficial/rolling/9base-git-mod/files/makefile.mid +++ b/ports/unofficial/rolling/9base-git-mod/files/makefile.mid @@ -5,9 +5,7 @@ include config.mk SUBDIRS = lib9\ yacc\ ascii\ - bc\ cleanname\ - dc\ factor\ fortune\ fmt\ diff --git a/ports/unofficial/stable/inetutils/build b/ports/unofficial/stable/inetutils/build index c60323c..c3706fc 100755 --- a/ports/unofficial/stable/inetutils/build +++ b/ports/unofficial/stable/inetutils/build @@ -16,7 +16,8 @@ --disable-ping6 \ --disable-dnsdomainname \ --disable-hostname \ - --disable-readline + --disable-readline \ + --disable-ifconfig make make DESTDIR="$1" install diff --git a/ports/unofficial/stable/inetutils/post-install b/ports/unofficial/stable/inetutils/post-install new file mode 100755 index 0000000..7ebedbf --- /dev/null +++ b/ports/unofficial/stable/inetutils/post-install @@ -0,0 +1,8 @@ +#!/bin/sh -e + +for i in whois traceroute tftp telnet ping ifconfig ftp +do +chgrp network "/usr/bin/$i" +chmod 4550 "$1/usr/bin/$i" +done + diff --git a/ports/unofficial/stable/man-pages/build b/ports/unofficial/stable/man-pages/build index 0fa9b71..fd2bd39 100755 --- a/ports/unofficial/stable/man-pages/build +++ b/ports/unofficial/stable/man-pages/build @@ -1,3 +1,8 @@ #!/bin/sh -e make prefix=/usr DESTDIR="$1" install + +for i in /usr/share/man/man1/time.1 /usr/share/man/man3/getspnam.3 /usr/share/man/man5/passwd.5 /usr/share/man/man5/tzfile.5 /usr/share/man/man7/man.7 /usr/share/man/man8/tzselect.8 /usr/share/man/man8/zdump.8 /usr/share/man/man8/zic.8 +do + rm "$1$i" +done