pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/misc/mbuffer



Module Name:    pkgsrc
Committed By:   hauke
Date:           Mon Apr 28 11:38:38 UTC 2025

Modified Files:
        pkgsrc/misc/mbuffer: Makefile distinfo
        pkgsrc/misc/mbuffer/patches: patch-mbuffer.c
Added Files:
        pkgsrc/misc/mbuffer/patches: patch-idev.c
Removed Files:
        pkgsrc/misc/mbuffer/patches: patch-network.c

Log Message:
Update misc/mbuffer to v20241007

Add NetBSD support

Fix PKG_SYSCONFDIR

>From upstream's changelog:

20241007:
- build fix for -Wincompatible-pointer-types
- configure script update to autoconf version 2.71

20240929:
- updated default buffer calculation for more sane defaults
- minor updates for debug messages

20240818:
- fix port range check (Peter Pentchev)
- fix ipv6 only mode
- enhanced incoming host check to work with IP, hostname, FQHN
- enhanced ipv6 hostname parsing

20240707:
- fix IPv4 address printing
- listen on IPv6 and IPv4 if possible
- add debug messages for defaults on address family
- build fix for systems without getaddrinfo
- gracefully handle empty address infos

20240107:
- corrections for documentation and help output
  (patch by Andreas Hartmann)
- added environment variables for auto-loader command

20231216:
- changed from `which` to `command` for Debian forward compatibility

20230301:
- Fix breaking connections on WAN links: retry on EAGAIN
  (fix by Nico Schümann)

20220418:
- fix handling of filesystem full on stdout

20211018:
- fixes related to TCP timeout handling
- enhancement: support setting config file via env var MBUFFERRC
- documentation update

20211004:
- make TCPTimeout=0 disable the TCP timeout
- changed default TCP timeout from 10s to 100s
- TCP timeout now can be give with suffixes ms,s,min,h
- documented option for TCP timeout

20210829:
- enhancement: accept IPv6 addresses in square bracket format
- enhancement: more detailed warning message for connect failures
- work around Solaris default old mercurial and incompatible sed

20210328:
- removed cancel after join for reader thread
- updated install-sh
- mbuffer.1 has outdated version tag

20210209:
- fix: hash algos should not suppress stdout

20200929:
- enhancement: added option --no-direct to disable use of O_DIRECT
- defaults: raised default TCP timeout to 10ms for WAN connections
- fix: leave TCP buffer size untouched if not set
- enhancement: add option to set TCP timeout
- performance optimization: use recv with MSG_WAITALL instead of read
- configure fix: look for objdump also with target prefix
- testing: make sure to use gtar for testing to avoid unexpected failures
- portability: NetBSD compatibility fix
- build enhancement: added dependency calculation for make
- build enhancement: automatic version string generation

20200505:
- configure fix for some powerpc toolchains
- update config.sub and config.guess
- added option to perform direct I/Os on temporary file

20191016:
- autoadjust dependent parameters
- human readable buffer size information instead of kiB

20190725:
- hashing infrastructure should also be enabled with libdl available
- report input file name in message for open failure
- fix: don't try to open network output as file after failure
- fix: potential issue related to inet6 hosts handling
- added complementary cmake based building and testing
- some cleanup work

20190127:
- fix: erronous empty file generation on network connection failure

20190119:
- enhanced default settings for better performance
- use O_DIRECT on input and output if possible
- option --direct is now deprecated and has no effect
- Output Size must be adjusted to Blocksize during initialization
- man-page corrections
- fixed some messages (typos and formatting)

20190113:
- fix for network initialization for systems without getaddrinfo
  (patch by Peter Pentchev)
- support suppressing messages with Verbose=silent and Verbose=none
- fix detection of invalid arguments to option -v
- Copyright update to 2019

20181119:
- consistently use CLOCK_MONOTONIC if available
  (patch by Peter Pentchev)
- handle time standing still or running backward
  (only relevant on systems without CLOCK_MONOTONIC)
- updated INSTALL file to reflect available options
- added explanation for lack of MacOS support


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/misc/mbuffer/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/misc/mbuffer/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/misc/mbuffer/patches/patch-idev.c
cvs rdiff -u -r1.1 -r1.2 pkgsrc/misc/mbuffer/patches/patch-mbuffer.c
cvs rdiff -u -r1.2 -r0 pkgsrc/misc/mbuffer/patches/patch-network.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/misc/mbuffer/Makefile
diff -u pkgsrc/misc/mbuffer/Makefile:1.9 pkgsrc/misc/mbuffer/Makefile:1.10
--- pkgsrc/misc/mbuffer/Makefile:1.9    Tue Oct 24 22:10:03 2023
+++ pkgsrc/misc/mbuffer/Makefile        Mon Apr 28 11:38:37 2025
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.9 2023/10/24 22:10:03 wiz Exp $
+# $NetBSD: Makefile,v 1.10 2025/04/28 11:38:37 hauke Exp $
 
-DISTNAME=      mbuffer-20180625
-PKGREVISION=   2
+DISTNAME=      mbuffer-20241007
 CATEGORIES=    misc
 MASTER_SITES=  http://www.maier-komor.de/software/mbuffer/
 EXTRACT_SUFX=  .tgz
@@ -11,11 +10,12 @@ HOMEPAGE=   https://www.maier-komor.de/mbu
 COMMENT=       Tool for buffering data streams
 LICENSE=       gnu-gpl-v3
 
-BROKEN_ON_PLATFORM=    NetBSD-*-*      # Needs sysctl bits
+USE_LANGUAGES=         c
+USE_CC_FEATURES=       c99
+USE_TOOLS+=            gmake
 
-GNU_CONFIGURE= yes
-
-USE_LANGUAGES= c c99
+GNU_CONFIGURE=         yes
+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
 
 SUBST_CLASSES+=                etc
 SUBST_STAGE.etc=       pre-configure
@@ -30,5 +30,7 @@ CONF_FILES+=          share/examples/mbuffer/mbu
 
 CHECK_PORTABILITY_SKIP+=       configure.in
 
+TEST_TARGET=           test0 test1 test2 test3 test4 test5 test6 test7
+
 .include "../../security/openssl/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/misc/mbuffer/distinfo
diff -u pkgsrc/misc/mbuffer/distinfo:1.8 pkgsrc/misc/mbuffer/distinfo:1.9
--- pkgsrc/misc/mbuffer/distinfo:1.8    Tue Oct 26 10:59:14 2021
+++ pkgsrc/misc/mbuffer/distinfo        Mon Apr 28 11:38:37 2025
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.8 2021/10/26 10:59:14 nia Exp $
+$NetBSD: distinfo,v 1.9 2025/04/28 11:38:37 hauke Exp $
 
-BLAKE2s (mbuffer-20180625.tgz) = cf66c1297ff1bfacdd4ac93bbbb6112991c9e4b7da2e9e360fc29423be72e019
-SHA512 (mbuffer-20180625.tgz) = 01d712f51ac0b206d6ee91fbbd4cea4873784aaca02daa9b3d72cfcc0a63696b20c15ca4b6e834924f02f2878ac90192110df584c55fb1a65620ae8b0f7ec87e
-Size (mbuffer-20180625.tgz) = 140946 bytes
+BLAKE2s (mbuffer-20241007.tgz) = 776f4f0b32d8e4cc7069c5e67a968a49afdc371d0062657dab24851bb09bf488
+SHA512 (mbuffer-20241007.tgz) = cb8f9e962510030f8e1500dcd21a556b73144c445bc12ece3915df201fa5e8849c183546c7ce700e06d1c734c0fdf36e31046ac984e232b64f9b019b54e1ddd2
+Size (mbuffer-20241007.tgz) = 152029 bytes
 SHA1 (patch-Makefile.in) = 0aea9d6e1bc836f671846bf29d006c56f14d3514
 SHA1 (patch-configure) = e3f9fe62c308369f89511dc31f781a92fd7b4405
-SHA1 (patch-mbuffer.c) = ca1b0fee1a11529f787b2a2b0d6ee03ed9fcfd14
+SHA1 (patch-idev.c) = dbc5f3764933b42cb194d6d0c148f27682bcfba3
+SHA1 (patch-mbuffer.c) = a614b756ff7e7ed88a20335d8f36f7f16afae5c4
 SHA1 (patch-mbuffer.rc) = f6639110e0a30f62a8a61e725a5403c88703d671
-SHA1 (patch-network.c) = 496fa35d88a9cdec4f7a6121c8b31a64f0ee8f57

Index: pkgsrc/misc/mbuffer/patches/patch-mbuffer.c
diff -u pkgsrc/misc/mbuffer/patches/patch-mbuffer.c:1.1 pkgsrc/misc/mbuffer/patches/patch-mbuffer.c:1.2
--- pkgsrc/misc/mbuffer/patches/patch-mbuffer.c:1.1     Tue Sep 18 09:49:29 2018
+++ pkgsrc/misc/mbuffer/patches/patch-mbuffer.c Mon Apr 28 11:38:37 2025
@@ -1,10 +1,45 @@
-$NetBSD: patch-mbuffer.c,v 1.1 2018/09/18 09:49:29 fhajny Exp $
+$NetBSD: patch-mbuffer.c,v 1.2 2025/04/28 11:38:37 hauke Exp $
 
 Default sysconfdir location.
 
---- mbuffer.c.orig     2018-06-25 20:37:20.000000000 +0000
+Add NetBSD support for accessing the number of available VM pages.
+
+--- mbuffer.c.orig     2024-10-06 17:49:38.000000000 +0000
 +++ mbuffer.c
-@@ -1029,7 +1029,7 @@ static void initDefaults()
+@@ -46,6 +46,11 @@ typedef int caddr_t;
+ #include <sys/vmmeter.h>
+ #endif
+ 
++#ifdef __NetBSD__
++#include <sys/sysctl.h>
++#include <uvm/uvm_extern.h>
++#endif
++
+ #ifdef HAVE_SENDFILE
+ #ifdef HAVE_SENDFILE_H
+ #include <sys/sendfile.h>
+@@ -1032,6 +1037,20 @@ static void initDefaults()
+       } else {
+               AvP = vmt.t_free;
+       }
++#elif defined(__NetBSD__)
++      /* lifted from src/usr.bin/vmstat/vmstat.c, see also PR kern/49266 */
++      struct vmtotal total;
++      size_t size;
++      const int vmmeter_mib[] = { CTL_VM, VM_METER };
++
++      size = sizeof(total);
++      if (sysctl(vmmeter_mib, __arraycount(vmmeter_mib),
++              &total, &size, NULL, 0) == -1) {
++              warningmsg("unable to determine number of available pages: %s\n", strerror(errno));
++              AvP = 0;
++      } else {
++              AvP = total.t_free;
++      }
+ #else
+       warningmsg("no mechanism to determine number of available pages\n",strerror(errno));
+ #endif
+@@ -1060,7 +1079,7 @@ static void initDefaults()
  
        const char *home = getenv("HOME");
        readConfigFile("/etc/mbuffer.rc");

Added files:

Index: pkgsrc/misc/mbuffer/patches/patch-idev.c
diff -u /dev/null pkgsrc/misc/mbuffer/patches/patch-idev.c:1.1
--- /dev/null   Mon Apr 28 11:38:38 2025
+++ pkgsrc/misc/mbuffer/patches/patch-idev.c    Mon Apr 28 11:38:37 2025
@@ -0,0 +1,32 @@
+$NetBSD: patch-idev.c,v 1.1 2025/04/28 11:38:37 hauke Exp $
+
+Do not use ssp(3) when compiling idev.c:
+
+
+In file included from mbconf.h:23,
+                 from idev.c:20:
+config.h:78:19: error: redefinition of 'read'
+   78 | #define LIBC_READ read
+      |                   ^~~~
+idev.c:90:9: note: in expansion of macro 'LIBC_READ'
+   90 | ssize_t LIBC_READ(int fd, void *buf, size_t s)
+      |         ^~~~~~~~~
+In file included from /usr/include/ssp/unistd.h:34,
+                 from /usr/include/unistd.h:74,
+                 from mbconf.h:41,
+                 from idev.c:20:
+/usr/include/ssp/unistd.h:39:1: note: previous definition of 'read' was here
+   39 | __ssp_redirect0(ssize_t, read, (int __fd, void *__buf, size_t __len), \
+      | ^~~~~~~~~~~~~~~
+
+--- idev.c.orig        2025-04-28 09:10:06.810889379 +0000
++++ idev.c
+@@ -17,6 +17,8 @@
+  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  */
+ 
++#undef _FORTIFY_SOURCE
++
+ #include "mbconf.h"
+ #include <assert.h>
+ #include <dlfcn.h>



Home | Main Index | Thread Index | Old Index