From nobody Sun Feb 13 19:44:05 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6768919B03DF; Sun, 13 Feb 2022 19:44:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jxd8Q6rhsz4pkg; Sun, 13 Feb 2022 19:44:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644781447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hFUiDfEaOjIoLYZsQUoM23vIw+ccI3X366XENAdSRds=; b=ILRp7S0fDDtdJMXB6/zbzIXPohzgINL6JVvAxdMnD/LQ8/L/EBAdyhC5OSp5N3YKxiX4ol I2oUxGSXBC2ZQD6trwIsBRbqFwEzF2CtMCbECEjxI9L/oQngLmkHS0+nT7+VTUKaGLrDLk yWF60HAx3f6qlm24eguTHzTLPjOEyV+y2ES9TBpJD9Tg5+u3PICA4BOj4a6ph1Mbkpfzuu anbb5AmjUEsjCWJ+0KhP8NmSIZmJAGoXBFlava6SJC/8Evd7zzRoV0AZR+XdOcXRAJCqta 7zFAbY9dIbXjztuKHklsVZWoQ018BIZ+6WkfXudwqeNcPQS7g8Pueo5uOdv3Kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABC8F21042; Sun, 13 Feb 2022 19:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21DJi5wd008976; Sun, 13 Feb 2022 19:44:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21DJi5qZ008975; Sun, 13 Feb 2022 19:44:05 GMT (envelope-from git) Date: Sun, 13 Feb 2022 19:44:05 GMT Message-Id: <202202131944.21DJi5qZ008975@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: fac8a211bfa4 - main - sysutils/toybox: update to 0.8.6 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fac8a211bfa41f0b8dfe18771ea0e159f83b3690 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644781447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hFUiDfEaOjIoLYZsQUoM23vIw+ccI3X366XENAdSRds=; b=k1VOfO/j56/6cGAYC9qewaZWPJrVoCGMC1aQz2v8KIQP/fyGP+bojhGzUEGHNOOMYJpUTR dCMZ9fqbECW+DElOn/xUhQZFFd89g9jKDX/qudasfeSOAQMR1atskf6BNL1pD306hWHUTl zqy6NuMeNO84mnpOi63ZYaXb7IJQLmZx8GG+82IOkYIw2JkSt9p03y8RfaiIoZyMDDcYA4 7VWoqygrpVE95cchXvHRR2XuTCtOqxdzI/0o3/6gvW9rcizTpXmgBKn9J0spECgzPokAsJ yJnlU2xkBjqKbrfdsy6lvhPGELxC/gxWRZMLqFd2z4WKbgsDymaTyQdnfRK7Ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644781447; a=rsa-sha256; cv=none; b=kt6u869ur06gJkiLofG6DcuB1FuiBNhri7Aqaj/GB/GUrDoM8gDXTqwvk8R24W3FT0zlZP bMtI1RAIrKwrAh+76xm3E9sphg41FvDnZcQfKlgR9UdiUhD4WCs15PLMH3SqkXu4hUl39F 1XPWFxtNI8Dcza0vmC/LLyJXPr8oZB4GApgViIN0HTHgGVDec5DsmIKRitbeOF2hhGv415 1E0xW5fxphlUtMATAnuL4S6mwDobj8tcSKr8AV3ZHRwNN3aXRJ4hVHAO9a06/bfx5TU3tv p5+BamX0FETomy3zxdv7q5F8OI2sNjWh0wkmALjtu78lEjpf8dVcy3YOkkYolg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=fac8a211bfa41f0b8dfe18771ea0e159f83b3690 commit fac8a211bfa41f0b8dfe18771ea0e159f83b3690 Author: Vidar Karlsen AuthorDate: 2022-02-13 19:19:26 +0000 Commit: Daniel Engberg CommitDate: 2022-02-13 19:43:32 +0000 sysutils/toybox: update to 0.8.6 Changelog: http://landley.net/toybox/#30-11-2021 PR: 261380 --- sysutils/toybox/Makefile | 38 ++++++-- sysutils/toybox/distinfo | 6 +- sysutils/toybox/files/patch-lib_portability.c | 42 +++++++-- sysutils/toybox/files/patch-lib_portability.h | 13 ++- sysutils/toybox/files/patch-toys_other_chvt.c | 25 ++++++ sysutils/toybox/pkg-plist | 125 ++++++++++++++++++++++++++ 6 files changed, 231 insertions(+), 18 deletions(-) diff --git a/sysutils/toybox/Makefile b/sysutils/toybox/Makefile index 35a3ab7cbbac..cac859edb6da 100644 --- a/sysutils/toybox/Makefile +++ b/sysutils/toybox/Makefile @@ -1,6 +1,7 @@ PORTNAME= toybox -PORTVERSION= 0.8.5 +PORTVERSION= 0.8.6 CATEGORIES= sysutils +MASTER_SITES= http://landley.net/toybox/downloads/ MAINTAINER= vidar@karlsen.tech COMMENT= All-in-one command line @@ -15,9 +16,6 @@ LIB_DEPENDS= libinotify.so:devel/libinotify USES= gmake shebangfix -USE_GITHUB= yes -GH_ACCOUNT= landley - SHEBANG_FILES= scripts/bloatcheck scripts/mcm-buildall.sh \ scripts/change.sh scripts/findglobals.sh \ scripts/genconfig.sh scripts/install.sh \ @@ -27,7 +25,21 @@ SHEBANG_FILES= scripts/bloatcheck scripts/mcm-buildall.sh \ scripts/test.sh configure \ tests/* -PLIST_FILES= bin/toybox +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 catv 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 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 + post-patch: ${REINPLACE_CMD} -e 's||"${LOCALBASE}/include/sys/inotify.h"|' \ @@ -39,5 +51,21 @@ do-configure: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/toybox ${STAGEDIR}${PREFIX}/bin + ${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin + ${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 .include diff --git a/sysutils/toybox/distinfo b/sysutils/toybox/distinfo index 9967e1fc3baa..449cae46b0eb 100644 --- a/sysutils/toybox/distinfo +++ b/sysutils/toybox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1621778141 -SHA256 (landley-toybox-0.8.5_GH0.tar.gz) = 27cc073222f3b726ee10d96c4f32ac2c4c936b07ea195227736755971e6d90c9 -SIZE (landley-toybox-0.8.5_GH0.tar.gz) = 2387752 +TIMESTAMP = 1643028839 +SHA256 (toybox-0.8.6.tar.gz) = 4298c90a2b238348e4fdc9f89eb4988356c80da3f0cf78c279d2e82b9119034b +SIZE (toybox-0.8.6.tar.gz) = 3458765 diff --git a/sysutils/toybox/files/patch-lib_portability.c b/sysutils/toybox/files/patch-lib_portability.c index 1653734a77b3..1dcb6f461c7c 100644 --- a/sysutils/toybox/files/patch-lib_portability.c +++ b/sysutils/toybox/files/patch-lib_portability.c @@ -1,4 +1,4 @@ ---- lib/portability.c.orig 2021-05-19 08:34:26 UTC +--- lib/portability.c.orig 2021-12-02 04:45:52 UTC +++ lib/portability.c @@ -6,6 +6,10 @@ @@ -11,7 +11,16 @@ // We can't fork() on nommu systems, and vfork() requires an exec() or exit() // before resuming the parent (because they share a heap until then). And no, // we can't implement our own clone() call that does the equivalent of fork() -@@ -536,6 +540,8 @@ int dev_minor(int dev) +@@ -332,7 +336,7 @@ ssize_t xattr_fset(int fd, const char* name, + return fsetxattr(fd, name, value, size, 0, flags); + } + +-#elif !defined(__OpenBSD__) ++#elif defined(__FreeBSD__) || defined(__OpenBSD__) + + ssize_t xattr_get(const char *path, const char *name, void *value, size_t size) + { +@@ -537,6 +541,8 @@ int dev_minor(int dev) return dev&0xffffff; #elif defined(__OpenBSD__) return minor(dev); @@ -20,7 +29,7 @@ #else #error #endif -@@ -549,6 +555,8 @@ int dev_major(int dev) +@@ -550,6 +556,8 @@ int dev_major(int dev) return (dev>>24)&0xff; #elif defined(__OpenBSD__) return major(dev); @@ -29,7 +38,7 @@ #else #error #endif -@@ -562,6 +570,8 @@ int dev_makedev(int major, int minor) +@@ -563,6 +571,8 @@ int dev_makedev(int major, int minor) return (minor&0xffffff)|((major&0xff)<<24); #elif defined(__OpenBSD__) return makedev(major, minor); @@ -38,11 +47,10 @@ #else #error #endif -@@ -621,6 +631,17 @@ int get_block_device_size(int fd, unsigned long long* - int status = (ioctl(fd, DIOCGDINFO, &lab) >= 0); +@@ -623,6 +633,17 @@ int get_block_device_size(int fd, unsigned long long* *size = lab.d_secsize * lab.d_nsectors; return status; -+} + } +#elif defined(__FreeBSD__) +#include +int get_block_device_size(int fd, unsigned long long* size) @@ -53,6 +61,24 @@ + return 1; + } + return 0; - } ++} #endif + // TODO copy_file_range +@@ -690,7 +711,7 @@ int timer_create_wrap(clockid_t c, struct sigevent *se + }; + int timer; + +- if (syscall(SYS_timer_create, c, &kk, &timer)<0) return -1; ++ if (syscall(SYS_ktimer_create, c, &kk, &timer)<0) return -1; + *t = (timer_t)(long)timer; + + return 0; +@@ -699,6 +720,6 @@ int timer_create_wrap(clockid_t c, struct sigevent *se + int timer_settime_wrap(timer_t t, int flags, struct itimerspec *val, + struct itimerspec *old) + { +- return syscall(SYS_timer_settime, t, flags, val, old); ++ return syscall(SYS_ktimer_settime, t, flags, val, old); + } + #endif diff --git a/sysutils/toybox/files/patch-lib_portability.h b/sysutils/toybox/files/patch-lib_portability.h index 44e03cf08496..9a21fed6ffe0 100644 --- a/sysutils/toybox/files/patch-lib_portability.h +++ b/sysutils/toybox/files/patch-lib_portability.h @@ -1,6 +1,6 @@ ---- lib/portability.h.orig 2021-06-01 14:59:57 UTC +--- lib/portability.h.orig 2021-12-02 04:45:52 UTC +++ lib/portability.h -@@ -217,7 +217,7 @@ int posix_fallocate(int, off_t, off_t); +@@ -229,7 +229,7 @@ int posix_fallocate(int, off_t, off_t); #include #endif @@ -9,3 +9,12 @@ static inline long statfs_bsize(struct statfs *sf) { return sf->f_iosize; } static inline long statfs_frsize(struct statfs *sf) { return sf->f_bsize; } #else +@@ -394,7 +394,7 @@ struct itimerspec { + int timer_create(clock_t c, struct sigevent *se, timer_t *t); + int timer_settime(timer_t t, int flags, struct itimerspec *new, void *old); + #elif !CFG_TOYBOX_HASTIMERS +-#include ++#include + #include + #include + int timer_create_wrap(clockid_t c, struct sigevent *se, timer_t *t); diff --git a/sysutils/toybox/files/patch-toys_other_chvt.c b/sysutils/toybox/files/patch-toys_other_chvt.c new file mode 100644 index 000000000000..01d0824ae173 --- /dev/null +++ b/sysutils/toybox/files/patch-toys_other_chvt.c @@ -0,0 +1,25 @@ +--- toys/other/chvt.c.orig 2021-12-02 04:45:52 UTC ++++ toys/other/chvt.c +@@ -18,16 +18,17 @@ config CHVT + */ + + #include "toys.h" +-#include + + void chvt_main(void) + { +- int vt, fd; ++ int vtnum, fd = fd; + char *consoles[]={"/dev/console", "/dev/vc/0", "/dev/tty", NULL}, **cc; + +- vt = atoi(*toys.optargs); +- for (cc = consoles; *cc; cc++) if ((fd = open(*cc, O_RDWR)) != -1) break; ++ vtnum=atoi(*toys.optargs); ++ for (cc = consoles; *cc; cc++) ++ if (-1 != (fd = open(*cc, O_RDWR))) break; + +- if (fd == -1 || ioctl(fd, VT_ACTIVATE, vt) || ioctl(fd, VT_WAITACTIVE, vt)) ++ // These numbers are VT_ACTIVATE and VT_WAITACTIVE from linux/vt.h ++ if (!*cc || fd < 0 || ioctl(fd, 0x5606, vtnum) || ioctl(fd, 0x5607, vtnum)) + perror_exit(0); + } diff --git a/sysutils/toybox/pkg-plist b/sysutils/toybox/pkg-plist new file mode 100644 index 000000000000..5e5e403ae910 --- /dev/null +++ b/sysutils/toybox/pkg-plist @@ -0,0 +1,125 @@ +bin/toybox +toybox/bin/[ +toybox/bin/cat +toybox/bin/chgrp +toybox/bin/chmod +toybox/bin/chown +toybox/bin/cksum +toybox/bin/cpio +toybox/bin/crc32 +toybox/bin/date +toybox/bin/dos2unix +toybox/bin/echo +toybox/bin/egrep +toybox/bin/false +toybox/bin/fgrep +toybox/bin/fsync +toybox/bin/grep +toybox/bin/help +toybox/bin/hostname +toybox/bin/kill +toybox/bin/ln +toybox/bin/ls +toybox/bin/mkdir +toybox/bin/mknod +toybox/bin/mktemp +toybox/bin/mountpoint +toybox/bin/nice +toybox/bin/pidof +toybox/bin/printenv +toybox/bin/pwd +toybox/bin/rm +toybox/bin/rmdir +toybox/bin/sed +toybox/bin/sleep +toybox/bin/sync +toybox/bin/touch +toybox/bin/true +toybox/bin/uname +toybox/bin/unix2dos +toybox/bin/usleep +toybox/bin/vmstat +toybox/sbin/killall5 +toybox/sbin/lsmod +toybox/sbin/mkswap +toybox/sbin/modinfo +toybox/sbin/sysctl +toybox/usr/bin/acpi +toybox/usr/bin/ascii +toybox/usr/bin/base64 +toybox/usr/bin/basename +toybox/usr/bin/bunzip2 +toybox/usr/bin/bzcat +toybox/usr/bin/cal +toybox/usr/bin/catv +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/dirname +toybox/usr/bin/du +toybox/usr/bin/expand +toybox/usr/bin/factor +toybox/usr/bin/fallocate +toybox/usr/bin/file +toybox/usr/bin/find +toybox/usr/bin/flock +toybox/usr/bin/fmt +toybox/usr/bin/groups +toybox/usr/bin/head +toybox/usr/bin/hexedit +toybox/usr/bin/iconv +toybox/usr/bin/id +toybox/usr/bin/killall +toybox/usr/bin/link +toybox/usr/bin/logger +toybox/usr/bin/logname +toybox/usr/bin/lspci +toybox/usr/bin/lsusb +toybox/usr/bin/makedevs +toybox/usr/bin/mkfifo +toybox/usr/bin/mkpasswd +toybox/usr/bin/nl +toybox/usr/bin/nohup +toybox/usr/bin/od +toybox/usr/bin/paste +toybox/usr/bin/patch +toybox/usr/bin/pmap +toybox/usr/bin/printf +toybox/usr/bin/pwdx +toybox/usr/bin/readlink +toybox/usr/bin/realpath +toybox/usr/bin/renice +toybox/usr/bin/reset +toybox/usr/bin/rev +toybox/usr/bin/seq +toybox/usr/bin/setsid +toybox/usr/bin/shred +toybox/usr/bin/sort +toybox/usr/bin/split +toybox/usr/bin/strings +toybox/usr/bin/tac +toybox/usr/bin/tee +toybox/usr/bin/test +toybox/usr/bin/time +toybox/usr/bin/timeout +toybox/usr/bin/truncate +toybox/usr/bin/tty +toybox/usr/bin/uniq +toybox/usr/bin/unlink +toybox/usr/bin/uudecode +toybox/usr/bin/uuencode +toybox/usr/bin/uuidgen +toybox/usr/bin/w +toybox/usr/bin/watch +toybox/usr/bin/wc +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/sbin/chroot