git: 5bfa5d580da5 - main - sysutils/toybox: Update to 0.8.11

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Sat, 27 Apr 2024 16:45:26 UTC
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5bfa5d580da5a49a09768211eba04a76117d6c7e

commit 5bfa5d580da5a49a09768211eba04a76117d6c7e
Author:     Vidar Karlsen <vidar@karlsen.tech>
AuthorDate: 2024-04-20 12:52:42 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-04-27 16:45:16 +0000

    sysutils/toybox: Update to 0.8.11
    
    Changelog: https://landley.net/toybox/news.html#08-04-2024
    - New toys: dd, fold, nbd-server, su, ts, tsort, uname
    - Bugfix: df now works
    - passwd is temporarily removed waiting on an infrastructure rewrite
    
    Changes to the port itself:
    - I reworked the install portion to stay closer to upstream's way of
    doing it. This reduces the amount of clutter in the Makefile and makes
    it easier to update the port in the future.
    - The port patches[1][2] have been sent upstream.
    
    [1] Enabling shuf and uname
    [2] Fixing the portability shim to use the correct parameters with
    getmntinfo():
    https://github.com/landley/toybox/commit/7d9ee89d3cf80f5e712badd7caa988ce235ccda1
    
    PR:             278481
---
 sysutils/toybox/Makefile                           | 36 +++-------------------
 sysutils/toybox/distinfo                           |  6 ++--
 .../toybox/files/patch-kconfig_freebsd__miniconfig | 18 +++++------
 sysutils/toybox/files/patch-lib_portability.c      | 11 +++++++
 sysutils/toybox/pkg-plist                          | 36 +++++++++++++++++++++-
 5 files changed, 63 insertions(+), 44 deletions(-)

diff --git a/sysutils/toybox/Makefile b/sysutils/toybox/Makefile
index fcc1c03f4c6a..1db4c8bfc737 100644
--- a/sysutils/toybox/Makefile
+++ b/sysutils/toybox/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	toybox
-PORTVERSION=	0.8.10
+PORTVERSION=	0.8.11
 CATEGORIES=	sysutils
 MASTER_SITES=	http://landley.net/toybox/downloads/
 
@@ -16,29 +16,14 @@ BUILD_DEPENDS=	bash:shells/bash gsed:textproc/gsed
 
 USES=		gmake shebangfix
 
-SHEBANG_FILES=	mkroot/record-commands scripts/bloatcheck \
+SHEBANG_FILES=	mkroot/record-commands scripts/probes/bloatcheck \
 		scripts/mcm-buildall.sh scripts/change.sh \
-		scripts/findglobals.sh 	scripts/genconfig.sh \
+		scripts/probes/findglobals scripts/genconfig.sh \
 		scripts/install.sh scripts/make.sh scripts/mkroot.sh \
-		scripts/portability.sh 	scripts/runtest.sh \
+		scripts/portability.sh scripts/runtest.sh \
 		scripts/single.sh scripts/test.sh configure \
 		tests/*
 
-BIN_LINKS=	[ cat chgrp chmod chown cksum cpio crc32 date dos2unix echo \
-		egrep false fgrep fsync grep help hostname kill ln ls mkdir \
-		mknod mktemp mountpoint nice pidof printenv pwd rm rmdir sed \
-		sleep sync touch true uname unix2dos usleep vmstat
-SBIN_LINKS=	killall5 lsmod mkswap modinfo sysctl
-USRBIN_LINKS=	acpi ascii base64 basename bunzip2 bzcat cal chrt chvt \
-		clear cmp comm count cut dirname du expand factor fallocate \
-		file find flock fmt groups head hexedit iconv id killall link \
-		logger logname lspci lsusb makedevs mkfifo mkpasswd nl nohup \
-		od paste patch pmap printf pwdx readlink realpath renice \
-		reset rev seq setsid shred shuf sort split strings tac tee \
-		test time timeout truncate tty uniq unlink uudecode uuencode \
-		uuidgen w watch wc which who whoami xargs xxd yes
-USRSBIN_LINKS=	chroot
-
 do-configure:
 	cd ${WRKSRC} && HOSTCC=${CC} ${GMAKE} bsd_defconfig
 
@@ -48,17 +33,6 @@ do-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/sbin
 	${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/usr/bin
 	${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/usr/sbin
-.for f in ${BIN_LINKS}
-	${LN} -s ../../bin/toybox ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/${f}
-.endfor
-.for f in ${SBIN_LINKS}
-	${LN} -s ../../bin/toybox ${STAGEDIR}${PREFIX}/${PORTNAME}/sbin/${f}
-.endfor
-.for f in ${USRBIN_LINKS}
-	${LN} -s ../../../bin/toybox ${STAGEDIR}${PREFIX}/${PORTNAME}/usr/bin/${f}
-.endfor
-.for f in ${USRSBIN_LINKS}
-	${LN} -s ../../../bin/toybox ${STAGEDIR}${PREFIX}/${PORTNAME}/usr/sbin/${f}
-.endfor
+	(cd ${WRKSRC} && PREFIX=${STAGEDIR}${PREFIX}/${PORTNAME} scripts/install.sh --symlink --long)
 
 .include <bsd.port.mk>
diff --git a/sysutils/toybox/distinfo b/sysutils/toybox/distinfo
index bc7591fec2b3..d0448f1e4eb3 100644
--- a/sysutils/toybox/distinfo
+++ b/sysutils/toybox/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1690881504
-SHA256 (toybox-0.8.10.tar.gz) = d3afee05ca90bf425ced73f527e418fecd626c5340b5f58711a14531f8d7d108
-SIZE (toybox-0.8.10.tar.gz) = 3534989
+TIMESTAMP = 1712845660
+SHA256 (toybox-0.8.11.tar.gz) = 15aa3f832f4ec1874db761b9950617f99e1e38144c22da39a71311093bfe67dc
+SIZE (toybox-0.8.11.tar.gz) = 3550912
diff --git a/sysutils/toybox/files/patch-kconfig_freebsd__miniconfig b/sysutils/toybox/files/patch-kconfig_freebsd__miniconfig
index 8d866ec5bc8d..9c3235ddc757 100644
--- a/sysutils/toybox/files/patch-kconfig_freebsd__miniconfig
+++ b/sysutils/toybox/files/patch-kconfig_freebsd__miniconfig
@@ -1,10 +1,10 @@
---- kconfig/freebsd_miniconfig.orig	2023-07-30 09:41:04 UTC
+--- kconfig/freebsd_miniconfig.orig	2024-04-09 01:50:07 UTC
 +++ kconfig/freebsd_miniconfig
-@@ -49,6 +49,7 @@ CONFIG_RENICE=y
- CONFIG_RM=y
- CONFIG_RMDIR=y
- CONFIG_SED=y
-+CONFIG_SHUF=y
- CONFIG_SLEEP=y
- CONFIG_SORT=y
- CONFIG_SPLIT=y
+@@ -150,6 +150,7 @@ CONFIG_SYNC=y
+ CONFIG_SEQ=y
+ CONFIG_SU=y
+ CONFIG_SYNC=y
++CONFIG_UNAME=y
+ CONFIG_TOYBOX_SUID=y
+ CONFIG_TOYBOX_FLOAT=y
+ CONFIG_TOYBOX_HELP=y
diff --git a/sysutils/toybox/files/patch-lib_portability.c b/sysutils/toybox/files/patch-lib_portability.c
new file mode 100644
index 000000000000..02d2ada24326
--- /dev/null
+++ b/sysutils/toybox/files/patch-lib_portability.c
@@ -0,0 +1,11 @@
+--- lib/portability.c.orig	2024-04-09 01:50:07 UTC
++++ lib/portability.c
+@@ -65,7 +65,7 @@ struct mtab_list *xgetmountlist(char *path)
+   int i, count;
+ 
+   if (path) error_exit("xgetmountlist");
+-  if ((count = getmntinfo(&entries, 0)) == 0) perror_exit("getmntinfo");
++  if (!(count = getmntinfo(&entries, MNT_NOWAIT))) perror_exit("getmntinfo");
+ 
+   // The "test" part of the loop is done before the first time through and
+   // again after each "increment", so putting the actual load there avoids
diff --git a/sysutils/toybox/pkg-plist b/sysutils/toybox/pkg-plist
index 44e9fef8cdc9..ead06d7fd2dc 100644
--- a/sysutils/toybox/pkg-plist
+++ b/sysutils/toybox/pkg-plist
@@ -8,6 +8,8 @@ toybox/bin/cksum
 toybox/bin/cpio
 toybox/bin/crc32
 toybox/bin/date
+toybox/bin/df
+toybox/bin/dnsdomainname
 toybox/bin/dos2unix
 toybox/bin/echo
 toybox/bin/egrep
@@ -24,6 +26,7 @@ toybox/bin/mkdir
 toybox/bin/mknod
 toybox/bin/mktemp
 toybox/bin/mountpoint
+toybox/bin/netcat
 toybox/bin/nice
 toybox/bin/pidof
 toybox/bin/printenv
@@ -32,8 +35,11 @@ toybox/bin/rm
 toybox/bin/rmdir
 toybox/bin/sed
 toybox/bin/sleep
+toybox/bin/stat
+toybox/bin/su
 toybox/bin/sync
 toybox/bin/touch
+toybox/bin/toybox
 toybox/bin/true
 toybox/bin/uname
 toybox/bin/unix2dos
@@ -46,20 +52,22 @@ toybox/sbin/modinfo
 toybox/sbin/sysctl
 toybox/usr/bin/acpi
 toybox/usr/bin/ascii
+toybox/usr/bin/base32
 toybox/usr/bin/base64
 toybox/usr/bin/basename
 toybox/usr/bin/bunzip2
 toybox/usr/bin/bzcat
 toybox/usr/bin/cal
 toybox/usr/bin/chrt
-toybox/usr/bin/chvt
 toybox/usr/bin/clear
 toybox/usr/bin/cmp
 toybox/usr/bin/comm
 toybox/usr/bin/count
 toybox/usr/bin/cut
+toybox/usr/bin/dd
 toybox/usr/bin/dirname
 toybox/usr/bin/du
+toybox/usr/bin/env
 toybox/usr/bin/expand
 toybox/usr/bin/factor
 toybox/usr/bin/fallocate
@@ -67,9 +75,15 @@ toybox/usr/bin/file
 toybox/usr/bin/find
 toybox/usr/bin/flock
 toybox/usr/bin/fmt
+toybox/usr/bin/fold
+toybox/usr/bin/ftpget
+toybox/usr/bin/ftpput
 toybox/usr/bin/groups
+toybox/usr/bin/gunzip
 toybox/usr/bin/head
 toybox/usr/bin/hexedit
+toybox/usr/bin/host
+toybox/usr/bin/httpd
 toybox/usr/bin/iconv
 toybox/usr/bin/id
 toybox/usr/bin/killall
@@ -79,8 +93,13 @@ toybox/usr/bin/logname
 toybox/usr/bin/lspci
 toybox/usr/bin/lsusb
 toybox/usr/bin/makedevs
+toybox/usr/bin/mcookie
+toybox/usr/bin/md5sum
+toybox/usr/bin/microcom
 toybox/usr/bin/mkfifo
 toybox/usr/bin/mkpasswd
+toybox/usr/bin/nbd-server
+toybox/usr/bin/nc
 toybox/usr/bin/nl
 toybox/usr/bin/nohup
 toybox/usr/bin/od
@@ -89,6 +108,8 @@ toybox/usr/bin/patch
 toybox/usr/bin/pmap
 toybox/usr/bin/printf
 toybox/usr/bin/pwdx
+toybox/usr/bin/pwgen
+toybox/usr/bin/readelf
 toybox/usr/bin/readlink
 toybox/usr/bin/realpath
 toybox/usr/bin/renice
@@ -96,18 +117,28 @@ toybox/usr/bin/reset
 toybox/usr/bin/rev
 toybox/usr/bin/seq
 toybox/usr/bin/setsid
+toybox/usr/bin/sha1sum
+toybox/usr/bin/sha224sum
+toybox/usr/bin/sha256sum
+toybox/usr/bin/sha384sum
+toybox/usr/bin/sha3sum
+toybox/usr/bin/sha512sum
 toybox/usr/bin/shred
 toybox/usr/bin/shuf
 toybox/usr/bin/sort
 toybox/usr/bin/split
 toybox/usr/bin/strings
 toybox/usr/bin/tac
+toybox/usr/bin/tail
 toybox/usr/bin/tee
 toybox/usr/bin/test
 toybox/usr/bin/time
 toybox/usr/bin/timeout
 toybox/usr/bin/truncate
+toybox/usr/bin/ts
+toybox/usr/bin/tsort
 toybox/usr/bin/tty
+toybox/usr/bin/unicode
 toybox/usr/bin/uniq
 toybox/usr/bin/unlink
 toybox/usr/bin/uudecode
@@ -116,10 +147,13 @@ toybox/usr/bin/uuidgen
 toybox/usr/bin/w
 toybox/usr/bin/watch
 toybox/usr/bin/wc
+toybox/usr/bin/wget
 toybox/usr/bin/which
 toybox/usr/bin/who
 toybox/usr/bin/whoami
 toybox/usr/bin/xargs
 toybox/usr/bin/xxd
 toybox/usr/bin/yes
+toybox/usr/bin/zcat
 toybox/usr/sbin/chroot
+toybox/usr/sbin/devmem