On Mon, Apr 20, 2026 at 05:31:48PM -0700, Ryan Freeman wrote: > Hi, > > Attached is a patch to pull net/slurm up to version 0.4.4 with additional > patches from an open PR: https://github.com/mattthias/slurm/pull/53 > > 0.4.3 to 0.4.4 does change the build system to meson. > Installing the manpage is no-longer a manual step in the port Makefile. > OpenBSD ports patches were pulled in upstream, except the manpage patch. > This one is pulled upstream but after the 0.4.4 release, so the local > patch remains: https://github.com/mattthias/slurm/commit/ef79c98269eb16bc49efcb520588a379c99f4f57 > > The PR adds several fixes, important enough to bring them in (almost) > entirely. Changes for code paths limited to other platforms are ignored. > > The PR has been open for 2 years, but I did post indicating the fixes worked > good for me, hopefully @mattthias merges the request. > > applied from Iksas' pull request: > - fix out-of-bounds accesses of _x_speedarray 4873377 > - remove unused constants 7a47a63 > - tidy up height constants cc6d46d > - fix an error where ERR_IFACE_DOWN would never be set 0111751 > - wrap numerical constants in parantheses to prevent silent errors in the future 8b673e9 > - fix calculation of maximum speed 32e054a > - fix a bug where the graph would not automatically re-scale c8c32a9 > - make sure graphs are centered when a terminal of width 80 is used c2022b3 > - fix more out-of-bounds memory accesses 362f597 > - fix graph rescaling in classic mode (-c) 323d2bf > > ignored parts of the pull request: > - patch for src/hpux.c > - patch for os.h, dealing with constants when building for HP-UX or Solaris > > Is this an OK direction for pulling in these outside patches? Is using 'pl' > the appropriate marker under PKGNAME? > > Tests good on amd64, ran for a few days and noted making terminal window larger > doesn't immediately muck up the output anymore. There used to be some visible > character garbage when first starting the program as well, that is now gone. Apologies for not responding to the reply; I wasn't subscribed to ports@ and only saw it on marc.info. I fixed that. Applied @landry's suggestion to just use the fork repo for now w/ a comment. Added benefit is the fork includes the man page patch, so all patches are gone. Index: Makefile =================================================================== RCS file: /cvs/ports/net/slurm/Makefile,v diff -u -p -r1.17 Makefile --- Makefile 13 Feb 2026 12:02:17 -0000 1.17 +++ Makefile 22 Apr 2026 04:01:51 -0000 @@ -1,14 +1,12 @@ COMMENT = network traffic monitor and statistics -GH_VERSION = 0.4.3 -GH_ACCOUNT = mattthias -GH_PROJECT = slurm -GH_TAGNAME = upstream/${GH_VERSION} -DISTNAME = ${GH_PROJECT}-${GH_VERSION} +V = 0.4.4 +# alt repo pulls in several fixes https://github.com/mattthias/slurm/pull/53 +DIST_TUPLE = github Iksas slurm 323d2bfced4b762f207633b50c0832ae1b19c40c . +PKGNAME = slurm-${V}pl0 CATEGORIES = net -REVISION = 0 -HOMEPAGE = http://github.com/mattthias/slurm/wiki/ +HOMEPAGE = https://github.com/mattthias/slurm/wiki/ MAINTAINER = Ryan Freeman <ryan@slipgate.org> @@ -17,18 +15,15 @@ PERMIT_PACKAGE = Yes WANTLIB = c curses -MODULES = devel/cmake - -MODCMAKE_POLICY_VERSION_OVERRIDE = Yes +MODULES = devel/meson pre-configure: - @${SUBST_CMD} ${WRKSRC}/theme.c ${WRKSRC}/slurm.1 + @${SUBST_CMD} ${WRKSRC}/slurm.1 post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/slurm/ .for i in COPYRIGHT FAQ THANKS COPYING ${INSTALL_DATA} ${WRKSRC}/$i ${PREFIX}/share/doc/slurm/ .endfor - ${INSTALL_MAN} ${WRKSRC}/slurm.1 ${PREFIX}/man/man1/ .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/net/slurm/distinfo,v diff -u -p -r1.4 distinfo --- distinfo 23 Sep 2015 09:44:55 -0000 1.4 +++ distinfo 22 Apr 2026 04:01:51 -0000 @@ -1,2 +1,2 @@ -SHA256 (slurm-0.4.3.tar.gz) = uWDA0hWSe+HQLBduGxiTIYVgMCJskfhAKEiGtyfTo6w= -SIZE (slurm-0.4.3.tar.gz) = 36085 +SHA256 (Iksas-slurm-323d2bfced4b762f207633b50c0832ae1b19c40c.tar.gz) = TtrWagW1fLkI6DvmsQqFnx677CnC7CArl/9TuOs57W8= +SIZE (Iksas-slurm-323d2bfced4b762f207633b50c0832ae1b19c40c.tar.gz) = 76428 Index: patches/patch-slurm_1 =================================================================== RCS file: patches/patch-slurm_1 diff -N patches/patch-slurm_1 --- patches/patch-slurm_1 11 Mar 2022 19:47:31 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,23 +0,0 @@ -avoid makewhatis error; N.B. hand-edited to avoid CVS keyword. - ---- slurm.1.orig Fri Feb 6 02:33:54 2004 -+++ slurm.1 Wed Sep 17 10:24:47 2008 -@@ -1,3 +1,2 @@ --.TH slurm 1 - .Dd February 23, 2003 - .Dt slurm 1 -@@ -11,5 +10,6 @@ - .Op Fl csl - .Op Fl d Ar delay --.B -i interface -+.Op Fl i Ar interface -+.Op Fl t Ar theme - .Sh DESCRIPTION - slurm is a generic network load monitor which shows device statistics -@@ -34,4 +34,6 @@ - .It Fl i Ar interface - select interface to monitor (required) -+.It Fl t Ar theme -+select theme, searches ~/.slurm and ${PREFIX}/share/slurm - .El - .Sh KEYS Index: patches/patch-src_if_media_c =================================================================== RCS file: patches/patch-src_if_media_c diff -N patches/patch-src_if_media_c --- patches/patch-src_if_media_c 11 Mar 2022 19:47:31 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,47 +0,0 @@ ---- src/if_media.c.orig Mon Sep 27 07:08:59 2004 -+++ src/if_media.c Fri Sep 11 09:22:41 2015 -@@ -51,7 +51,7 @@ int get_if_speed (char *ifstring) - int speed=ERR_IFACE_NO_SPEED; - int s; /* socket */ - struct ifmediareq ifmr; -- int *media_list; -+ uint64_t *media_list; - int type, physical; - - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) -@@ -75,7 +75,7 @@ int get_if_speed (char *ifstring) - return ERR_IFACE_NO_SPEED; - } - -- media_list = (int *)malloc(ifmr.ifm_count * sizeof(int)); -+ media_list = (uint64_t *)malloc(ifmr.ifm_count * sizeof(uint64_t)); - if (media_list == NULL) - fprintf(stderr, "malloc() error in if_media.c\n"); - ifmr.ifm_ulist = media_list; -@@ -95,8 +95,16 @@ int get_if_speed (char *ifstring) - * - */ - -+#ifdef IFM_TYPE -+ type = IFM_TYPE(ifmr.ifm_active); -+#else - type = ifmr.ifm_active & 0xf0; -+
No comments:
Post a Comment