From nobody Tue Nov 14 20:08:39 2023 X-Original-To: dev-commits-ports-all@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 4SVHRq5FJqz50k05; Tue, 14 Nov 2023 20:08:39 +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 4SVHRq2hSBz4VWN; Tue, 14 Nov 2023 20:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699992519; 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=KrXhbDwU26Ub0rYsRTEl2I5kak0CUC5e7fgNDojVwlA=; b=X5pj37MmxaqbDyHP1/FaJ6uJtoGqe11LbLPrmIYIdXgVTqu/ekursZuLowriei0IPq2wTC HYlgvWA5O5xsmqGXtrYB66jSaRuqOKbz/EMvsSl9THFU4CEVAoJqlLmZUg5mXna2pPHMC4 Uoyc0UY8I9kCTy6NM6yVEimfSskzdm26bmZFt4YFTK+F3Ap4K9LdQS40kzm8EWecaT53Kj qF197okSuOAI6fWMcc6fl5idO1yuUWMc8OBwJCq7rxyFVdzV1oA0K9UGzn802m6o+FqWRy T3KymRy1voI7FZ5O+Ge3Lk1tQG3Unig7KII0W1bUgz1B8qrqDteS0BSnVQPT1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699992519; 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=KrXhbDwU26Ub0rYsRTEl2I5kak0CUC5e7fgNDojVwlA=; b=DP5CBynTFCNwm3PVgAXk2B70TLsE7OkTWhDZUit3PrCZbI2eNWPFtbMkPn/bziAy9Oc+gt eIWg3qspXFbSwDU6CQ29HIFKG1m55JJPlTcSd/1yJgWCFR8kWHvVRHq0m8HLpueAEMJntV UqSISIZN5Ddu4ZBmQxwNiNWQDzDGIxu0DQK6qpWiqY5dawKbTuSYnfCXkm+iOi7rKgGIrp wHC8DsdUcFB8sgoHQDgUWxJSBekLKi/qV7eq6Sb/DbtfwGQUpWUaKUA2lP/dEyE0k6oDzI 2K1qRIAjY93ABrrtSFgZ0pMLIaZnhR8lMGcM9nX4sBdeQSIPmy+8jdOuSKIHMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699992519; a=rsa-sha256; cv=none; b=hiIO5w/BuLWx+MMELHIf72DIh1GtAYVmlANf4UVnBwiXxzhwqlBpWoQUScvPKUwchcdFid 1S2bR9alzEU/6fKgWp9vfybrZyCfQXXXubOMRCY0DSaDQO2nT1cxS2lQ57FO0YvkXUs6hY jJs3bZNp7UX5UTwLxd6VjMvxwcZ8KaUw8k2qkCdTte1Q/IS3jasJiQhWVZBZR6YUWX42nj w4TKcTCHLkOTjjXhObkvacjLu0bn1EuhuYcprUGhpyj65fS7kq7I5SXp+lhAHMhUch/IXd fFMKh8hqqrmVqHNC0x128vwT9yIOgo3e6np9JSqDzQgdpHN5xlaOuZqnYJaY2g== 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 4SVHRq1pSMz12vl; Tue, 14 Nov 2023 20:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AEK8drU056937; Tue, 14 Nov 2023 20:08:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AEK8djI056934; Tue, 14 Nov 2023 20:08:39 GMT (envelope-from git) Date: Tue, 14 Nov 2023 20:08:39 GMT Message-Id: <202311142008.3AEK8djI056934@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: f702184e22c5 - main - sysutils/nut: Update to 2.8.1 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f702184e22c59f90bf34c8032ae825f915eeecf7 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=f702184e22c59f90bf34c8032ae825f915eeecf7 commit f702184e22c59f90bf34c8032ae825f915eeecf7 Author: Cy Schubert AuthorDate: 2023-11-14 20:05:57 +0000 Commit: Cy Schubert CommitDate: 2023-11-14 20:08:14 +0000 sysutils/nut: Update to 2.8.1 --- sysutils/nut/Makefile | 19 +- sysutils/nut/distinfo | 6 +- sysutils/nut/files/patch-clients_upslog.c | 280 --------------------- sysutils/nut/files/patch-docs_man_upslog.8 | 16 -- sysutils/nut/files/patch-docs_man_upslog.txt | 14 -- sysutils/nut/files/patch-m4_nut__check_libltdl.m4 | 21 ++ .../files/patch-tools_nut-scanner_nutscan-init.c | 16 -- sysutils/nut/pkg-plist | 17 +- 8 files changed, 48 insertions(+), 341 deletions(-) diff --git a/sysutils/nut/Makefile b/sysutils/nut/Makefile index 4f236d4816e9..ba3573fc8cb7 100644 --- a/sysutils/nut/Makefile +++ b/sysutils/nut/Makefile @@ -1,6 +1,5 @@ PORTNAME= nut -PORTVERSION= 2.8.0 -PORTREVISION= 24 +PORTVERSION= 2.8.1 CATEGORIES= sysutils MASTER_SITES= http://www.networkupstools.org/source/${PORTVERSION:R}/ @@ -69,9 +68,15 @@ CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \ --with-pidpath=${STATEDIR} \ --with-pkgconfig-dir=${PREFIX}/libdata/pkgconfig \ --with-user=${NUT_USER} \ - --with-group=${NUT_GROUP} - -CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib + --with-group=${NUT_GROUP} \ + --with-python=${PYTHON_CMD} \ + --without-python2 \ + --with-python3=${PYTHON_CMD} \ + --without-nut_monitor \ + --with-ltdl --with-nut-scanner + +CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib -pthread +CPPFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib LIB_DEPENDS+= libltdl.so:devel/libltdl MANPAGES_CONFIGURE_ON= --with-doc=man=auto @@ -143,7 +148,7 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${STAGEDIR}${DOCSDIR}/cables ${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/docs/FAQ.txt ${STAGEDIR}${DOCSDIR} -.for file in AUTHORS COPYING ChangeLog INSTALL MAINTAINERS NEWS README UPGRADING +.for file in AUTHORS COPYING ChangeLog INSTALL MAINTAINERS NEWS README ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR} .endfor .endif @@ -152,7 +157,5 @@ post-install: ${INSTALL_DATA} ${PATCHDIR}/nut.newsyslog ${STAGEDIR}${EXAMPLESDIR}/newsyslog.sample ${INSTALL_DATA} ${PATCHDIR}/nut_upslog.sample ${STAGEDIR}${EXAMPLESDIR}/nut_upslog.sample ${MKDIR} ${STAGEDIR}/var/log/nut - @${RM} ${STAGEDIR}${PREFIX}/etc/nut/solaris-init/nut - @${RMDIR} ${STAGEDIR}${PREFIX}/etc/nut/solaris-init .include diff --git a/sysutils/nut/distinfo b/sysutils/nut/distinfo index f7d0b489a82a..91721deab284 100644 --- a/sysutils/nut/distinfo +++ b/sysutils/nut/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1651085820 -SHA256 (nut-2.8.0.tar.gz) = c3e5a708da797b7c70b653d37b1206a000fcb503b85519fe4cdf6353f792bfe5 -SIZE (nut-2.8.0.tar.gz) = 3287640 +TIMESTAMP = 1699981499 +SHA256 (nut-2.8.1.tar.gz) = 7da48ee23b1f0d8d72560bb0af84f5c5ae4dbe35452b84cb49840132e47f099c +SIZE (nut-2.8.1.tar.gz) = 4125263 diff --git a/sysutils/nut/files/patch-clients_upslog.c b/sysutils/nut/files/patch-clients_upslog.c deleted file mode 100644 index 87c87dc6e2c8..000000000000 --- a/sysutils/nut/files/patch-clients_upslog.c +++ /dev/null @@ -1,280 +0,0 @@ ---- clients/upslog.c.orig 2022-08-29 22:20:14.342137000 -0700 -+++ clients/upslog.c 2022-08-29 22:21:10.934419000 -0700 -@@ -41,32 +45,49 @@ - #include "upslog.h" - - static int reopen_flag = 0, exit_flag = 0; -- static uint16_t port; -- static char *upsname, *hostname; -- static UPSCONN_t ups; -+ static char *upsname; -+ static UPSCONN_t *ups; - -- static FILE *logfile; -- static const char *logfn, *monhost; -+ static char *logfn, *monhost; - static sigset_t nut_upslog_sigmask; - static char logbuffer[LARGEBUF], *logformat; - - static flist_t *fhead = NULL; -+ struct monhost_ups { -+ char *monhost; -+ char *logfn; -+ char *upsname; -+ char *hostname; -+ uint16_t port; -+ UPSCONN_t *ups; -+ FILE *logfile; -+ struct monhost_ups *next; -+ }; -+ static struct monhost_ups *monhost_ups_anchor = NULL; -+ static struct monhost_ups *monhost_ups_current = NULL; -+ static struct monhost_ups *monhost_ups_prev = NULL; - -+ - #define DEFAULT_LOGFORMAT "%TIME @Y@m@d @H@M@S% %VAR battery.charge% " \ - "%VAR input.voltage% %VAR ups.load% [%VAR ups.status%] " \ - "%VAR ups.temperature% %VAR input.frequency%" - - static void reopen_log(void) - { -- if (logfile == stdout) { -- upslogx(LOG_INFO, "logging to stdout"); -- return; -- } -+ for (monhost_ups_current = monhost_ups_anchor; -+ monhost_ups_current != NULL; -+ monhost_ups_current = monhost_ups_current->next) { -+ if (monhost_ups_current->logfile == stdout) { -+ upslogx(LOG_INFO, "logging to stdout"); -+ return; -+ } - -- fclose(logfile); -- logfile = fopen(logfn, "a"); -- if (logfile == NULL) -- fatal_with_errno(EXIT_FAILURE, "could not reopen logfile %s", logfn); -+ if ((monhost_ups_current->logfile = freopen( -+ monhost_ups_current->logfn, "a", -+ monhost_ups_current->logfile)) == NULL) -+ fatal_with_errno(EXIT_FAILURE, -+ "could not reopen logfile %s", logfn); -+ } - } - - static void set_reopen_flag(int sig) -@@ -131,6 +152,8 @@ - printf(" -p - Base name for PID file (defaults to \"%s\")\n", prog); - printf(" -s - Monitor UPS - @[:]\n"); - printf(" - Example: -s myups@server\n"); -+ printf(" -m - Monitor UPS \n"); -+ printf(" - Example: -m myups@server,/var/log/myups.log\n"); - printf(" -u - Switch to if started as root\n"); - - printf("\n"); -@@ -215,7 +238,7 @@ - query[2] = var; - numq = 3; - -- ret = upscli_get(&ups, numq, query, &numa, &answer); -+ ret = upscli_get(ups, numq, query, &numa, &answer); - - if ((ret < 0) || (numa < numq)) { - snprintfcat(logbuffer, sizeof(logbuffer), "NA"); -@@ -368,7 +391,7 @@ - } - - /* go through the list of functions and call them in order */ --static void run_flist(void) -+static void run_flist(struct monhost_ups *monhost_ups_print) - { - flist_t *tmp; - -@@ -382,8 +405,8 @@ - tmp = tmp->next; - } - -- fprintf(logfile, "%s\n", logbuffer); -- fflush(logfile); -+ fprintf(monhost_ups_print->logfile, "%s\n", logbuffer); -+ fflush(monhost_ups_print->logfile); - } - - /* -s -@@ -396,6 +419,7 @@ - int main(int argc, char **argv) - { - int interval = 30, i, foreground = -1; -+ size_t monhost_len = 0; - const char *prog = xbasename(argv[0]); - time_t now, nextpoll = 0; - const char *user = NULL; -@@ -407,7 +431,7 @@ - - printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); - -- while ((i = getopt(argc, argv, "+hs:l:i:f:u:Vp:FB")) != -1) { -+ while ((i = getopt(argc, argv, "+hs:l:i:f:u:Vp:FBm:")) != -1) { - switch(i) { - case 'h': - help(prog); -@@ -415,6 +439,33 @@ - break; - #endif - -+ case 'm': { /* var scope */ -+ char *m_arg, *s; -+ -+ monhost_ups_prev = monhost_ups_current; -+ monhost_ups_current = xmalloc(sizeof(struct monhost_ups)); -+ if (monhost_ups_anchor == NULL) -+ monhost_ups_anchor = monhost_ups_current; -+ else -+ monhost_ups_prev->next = monhost_ups_current; -+ monhost_ups_current->next = NULL; -+ monhost_len++; -+ -+ /* Be sure to not mangle original optarg, nor rely on its longevity */ -+ s = xstrdup(optarg); -+ m_arg = s; -+ monhost_ups_current->monhost = xstrdup(strsep(&m_arg, ",")); -+ if (!m_arg) -+ fatalx(EXIT_FAILURE, "Argument '-m upsspec,logfile' requires exactly 2 components in the tuple"); -+ monhost_ups_current->logfn = xstrdup(strsep(&m_arg, ",")); -+ if (m_arg) /* Had a third comma - also unexpected! */ -+ fatalx(EXIT_FAILURE, "Argument '-m upsspec,logfile' requires exactly 2 components in the tuple"); -+ if (upscli_splitname(monhost_ups_current->monhost, &(monhost_ups_current->upsname), &(monhost_ups_current->hostname), &(monhost_ups_current->port)) != 0) { -+ fatalx(EXIT_FAILURE, "Error: invalid UPS definition. Required format: upsname[@hostname[:port]]\n"); -+ } -+ free(s); -+ } /* var scope */ -+ break; - case 's': - monhost = optarg; - break; -@@ -479,42 +530,59 @@ - snprintfcat(logformat, LARGEBUF, "%s ", argv[i]); - } - -- if (!monhost) -- fatalx(EXIT_FAILURE, "No UPS defined for monitoring - use -s "); -+ if (monhost_ups_anchor == NULL) { -+ if (monhost) { -+ monhost_ups_current = xmalloc(sizeof(struct monhost_ups)); -+ monhost_ups_anchor = monhost_ups_current; -+ monhost_ups_current->next = NULL; -+ monhost_ups_current->monhost = monhost; -+ monhost_len=1; -+ } else { -+ fatalx(EXIT_FAILURE, "No UPS defined for monitoring - use -s "); -+ } - -- if (!logfn) -- fatalx(EXIT_FAILURE, "No filename defined for logging - use -l "); -+ if (logfn) -+ monhost_ups_current->logfn = logfn; -+ else -+ fatalx(EXIT_FAILURE, "No filename defined for logging - use -l "); -+ } - - /* shouldn't happen */ - if (!logformat) - fatalx(EXIT_FAILURE, "No format defined - but this should be impossible"); - -- printf("logging status of %s to %s (%is intervals)\n", -- monhost, logfn, interval); -+ for (monhost_ups_current = monhost_ups_anchor; -+ monhost_ups_current != NULL; -+ monhost_ups_current = monhost_ups_current->next) { -+ printf("logging status of %s to %s (%is intervals)\n", -+ monhost_ups_current->monhost, monhost_ups_current->logfn, interval); -+ if (upscli_splitname(monhost_ups_current->monhost, &(monhost_ups_current->upsname), &(monhost_ups_current->hostname), &(monhost_ups_current->port)) != 0) { -+ fatalx(EXIT_FAILURE, "Error: invalid UPS definition. Required format: upsname[@hostname[:port]]\n"); -+ } - -- if (upscli_splitname(monhost, &upsname, &hostname, &port) != 0) { -- fatalx(EXIT_FAILURE, "Error: invalid UPS definition. Required format: upsname[@hostname[:port]]\n"); -- } -+ monhost_ups_current->ups = xmalloc(sizeof(UPSCONN_t)); -+ if (upscli_connect(monhost_ups_current->ups, monhost_ups_current->hostname, monhost_ups_current->port, UPSCLI_CONN_TRYSSL) < 0) -+ fprintf(stderr, "Warning: initial connect failed: %s\n", -+ upscli_strerror(monhost_ups_current->ups)); - -- if (upscli_connect(&ups, hostname, port, UPSCLI_CONN_TRYSSL) < 0) -- fprintf(stderr, "Warning: initial connect failed: %s\n", -- upscli_strerror(&ups)); -+ if (strcmp(monhost_ups_current->logfn, "-") == 0) -+ monhost_ups_current->logfile = stdout; -+ else -+ monhost_ups_current->logfile = fopen(monhost_ups_current->logfn, "a"); - -- if (strcmp(logfn, "-") == 0) -- logfile = stdout; -- else -- logfile = fopen(logfn, "a"); -+ if (monhost_ups_current->logfile == NULL) -+ fatal_with_errno(EXIT_FAILURE, "could not open logfile %s", logfn); - -- if (logfile == NULL) -- fatal_with_errno(EXIT_FAILURE, "could not open logfile %s", logfn); -+ } - -+ - /* now drop root if we have it */ - new_uid = get_user_pwent(user); - - open_syslog(prog); - - if (foreground < 0) { -- if (logfile == stdout) { -+ if (monhost_ups_anchor->logfile == stdout) { - foreground = 1; - } else { - foreground = 0; -@@ -552,25 +620,35 @@ - reopen_flag = 0; - } - -- /* reconnect if necessary */ -- if (upscli_fd(&ups) < 0) { -- upscli_connect(&ups, hostname, port, 0); -- } -+ for (monhost_ups_current = monhost_ups_anchor; -+ monhost_ups_current != NULL; -+ monhost_ups_current = monhost_ups_current->next) { -+ ups = monhost_ups_current->ups; /* XXX Not ideal */ -+ upsname = monhost_ups_current->upsname; /* XXX Not ideal */ -+ /* reconnect if necessary */ -+ if (upscli_fd(ups) < 0) { -+ upscli_connect(ups, monhost_ups_current->hostname, monhost_ups_current->port, 0); -+ } - -- run_flist(); -+ run_flist(monhost_ups_current); - -- /* don't keep connection open if we don't intend to use it shortly */ -- if (interval > 30) { -- upscli_disconnect(&ups); -+ /* don't keep connection open if we don't intend to use it shortly */ -+ if (interval > 30) { -+ upscli_disconnect(ups); -+ } - } - } - - upslogx(LOG_INFO, "Signal %d: exiting", exit_flag); -+ for (monhost_ups_current = monhost_ups_anchor; -+ monhost_ups_current != NULL; -+ monhost_ups_current = monhost_ups_current->next) { - -- if (logfile != stdout) -- fclose(logfile); -+ if (monhost_ups_current->logfile != stdout) -+ fclose(monhost_ups_current->logfile); - -- upscli_disconnect(&ups); -+ upscli_disconnect(monhost_ups_current->ups); -+ } - - exit(EXIT_SUCCESS); - } diff --git a/sysutils/nut/files/patch-docs_man_upslog.8 b/sysutils/nut/files/patch-docs_man_upslog.8 deleted file mode 100644 index 37b1379ca6bf..000000000000 --- a/sysutils/nut/files/patch-docs_man_upslog.8 +++ /dev/null @@ -1,16 +0,0 @@ ---- docs/man/upslog.8.orig 2022-08-30 05:56:02.734873000 -0700 -+++ docs/man/upslog.8 2022-08-30 06:09:47.928348000 -0700 -@@ -134,6 +134,13 @@ - upsname[@hostname[:port]]\&. The default hostname is "localhost"\&. - .RE - .PP -+\fB\-m\fR \fItuple\fR -+.RS 4 -+Monitor multiple UPSs\&. The format for this option is a tuple of -+ups and logfile separated by commas\&. An example would be: -+upsname@hostname:9999,/var/log/nut/cps.log -+.RE -+.PP - \fB\-u\fR \fIusername\fR - .RS 4 - If started as root, upslog will diff --git a/sysutils/nut/files/patch-docs_man_upslog.txt b/sysutils/nut/files/patch-docs_man_upslog.txt deleted file mode 100644 index e26d91e2d5f2..000000000000 --- a/sysutils/nut/files/patch-docs_man_upslog.txt +++ /dev/null @@ -1,14 +0,0 @@ ---- docs/man/upslog.txt.orig 2022-08-30 05:56:02.761764000 -0700 -+++ docs/man/upslog.txt 2022-08-30 06:04:33.428455000 -0700 -@@ -78,6 +78,11 @@ - Monitor this UPS. The format for this option is - +upsname[@hostname[:port]]+. The default hostname is "localhost". - -+*-m* 'tuple':: -+Monitor multiple UPSs. The format for this option is a tuple of -+ups and logfile separated by commas. An example would be: -+`upsname@hostname:9999,/var/log/nut/cps.log` -+ - *-u* 'username':: - - If started as root, upslog will *setuid*(2) to the user id diff --git a/sysutils/nut/files/patch-m4_nut__check_libltdl.m4 b/sysutils/nut/files/patch-m4_nut__check_libltdl.m4 new file mode 100644 index 000000000000..ae4a2710adf5 --- /dev/null +++ b/sysutils/nut/files/patch-m4_nut__check_libltdl.m4 @@ -0,0 +1,21 @@ +--- m4/nut_check_libltdl.m4.orig 2023-08-01 07:33:24.593954000 -0700 ++++ m4/nut_check_libltdl.m4 2023-08-01 07:35:18.506094000 -0700 +@@ -10,10 +10,7 @@ + dnl No NUT_CHECK_PKGCONFIG here: (lib)ltdl.pc was not seen on any OS + + dnl save CFLAGS and LIBS +- CFLAGS_ORIG="${CFLAGS}" +- LIBS_ORIG="${LIBS}" + LIBS="" +- CFLAGS="" + dnl For fallback below: + myCFLAGS="" + +@@ -71,7 +68,5 @@ + unset myCFLAGS + + dnl restore original CFLAGS and LIBS +- CFLAGS="${CFLAGS_ORIG}" +- LIBS="${LIBS_ORIG}" + fi + ]) diff --git a/sysutils/nut/files/patch-tools_nut-scanner_nutscan-init.c b/sysutils/nut/files/patch-tools_nut-scanner_nutscan-init.c deleted file mode 100644 index bc341494ce73..000000000000 --- a/sysutils/nut/files/patch-tools_nut-scanner_nutscan-init.c +++ /dev/null @@ -1,16 +0,0 @@ -diff --git tools/nut-scanner/nutscan-init.c.orig tools/nut-scanner/nutscan-init.c -index 9ea3f5d..13f4e78 100644 ---- tools/nut-scanner/nutscan-init.c.orig -+++ tools/nut-scanner/nutscan-init.c -@@ -133,7 +133,11 @@ void nutscan_init(void) - char *libname = NULL; - #ifdef WITH_USB - #if WITH_LIBUSB_1_0 -+ #ifdef __FreeBSD__ -+ libname = get_libname("libusb.so"); -+ #else - libname = get_libname("libusb-1.0.so"); -+ #endif - #else - libname = get_libname("libusb-0.1.so"); - if (!libname) { diff --git a/sysutils/nut/pkg-plist b/sysutils/nut/pkg-plist index 495030137062..4c14df5baa16 100644 --- a/sysutils/nut/pkg-plist +++ b/sysutils/nut/pkg-plist @@ -40,19 +40,21 @@ bin/upssched-cmd lib/libnutclient.a lib/libnutclient.so lib/libnutclient.so.2 -lib/libnutclient.so.2.0.0 +lib/libnutclient.so.2.0.2 lib/libupsclient.a lib/libupsclient.so lib/libupsclient.so.6 -lib/libupsclient.so.6.0.0 +lib/libupsclient.so.6.0.1 lib/libnutclientstub.a lib/libnutclientstub.so lib/libnutclientstub.so.1 -lib/libnutclientstub.so.1.0.0 +lib/libnutclientstub.so.1.0.1 lib/libnutscan.a lib/libnutscan.so lib/libnutscan.so.2 -lib/libnutscan.so.2.0.0 +lib/libnutscan.so.2.0.2 +%%PYTHON_SITELIBDIR%%/PyNUT.py +%%PYTHON_SITELIBDIR%%/test_nutclient.py %%DEV%%libdata/pkgconfig/libnutclient.pc %%DEV%%libdata/pkgconfig/libnutscan.pc %%DEV%%libdata/pkgconfig/libupsclient.pc @@ -104,6 +106,7 @@ lib/libnutscan.so.2.0.0 %%USB%%libexec/nut/richcomm_usb %%SERIAL%%libexec/nut/safenet %%SERIAL%%libexec/nut/skel +libexec/nut/sms_ser %%SNMP%%libexec/nut/snmp-ups %%SERIAL%%libexec/nut/solis %%SERIAL%%libexec/nut/tripplite @@ -117,6 +120,7 @@ lib/libnutscan.so.2.0.0 %%MODBUS%%libexec/nut/phoenixcontact_modbus %%MODBUS%%libexec/nut/socomec_jbus %%SERIAL%%libexec/nut/victronups +%%DEV%%libexec/sockdebug %%MANPAGES%%%%DEV%%man/man3/libnutclient.3.gz %%MANPAGES%%%%DEV%%man/man3/libnutclient_commands.3.gz %%MANPAGES%%%%DEV%%man/man3/libnutclient_devices.3.gz @@ -156,6 +160,9 @@ lib/libnutscan.so.2.0.0 %%MANPAGES%%%%DEV%%man/man3/nutscan_add_option_to_device.3.gz %%MANPAGES%%%%DEV%%man/man3/nutscan_cidr_to_ip.3.gz %%MANPAGES%%%%DEV%%man/man3/nutscan_display_parsable.3.gz +%%MANPAGES%%%%DEV%%man/man3/nutscan_display_sanity_check.3.gz +%%MANPAGES%%%%DEV%%man/man3/nutscan_display_sanity_check_serial.3.gz +%%MANPAGES%%%%DEV%%man/man3/nutscan_display_ups_conf_with_sanity_check.3.gz %%MANPAGES%%%%DEV%%man/man3/nutscan_display_ups_conf.3.gz %%MANPAGES%%%%DEV%%man/man3/nutscan_free_device.3.gz %%MANPAGES%%%%DEV%%man/man3/nutscan_get_serial_ports_list.3.gz @@ -258,6 +265,7 @@ lib/libnutscan.so.2.0.0 %%MANPAGES%%%%SERIAL%%man/man8/powerpanel.8.gz %%MANPAGES%%%%SERIAL%%man/man8/rhino.8.gz %%MANPAGES%%%%SERIAL%%man/man8/safenet.8.gz +%%MANPAGES%%man/man8/sms_ser.8.gz %%MANPAGES%%%%SERIAL%%man/man8/solis.8.gz %%MANPAGES%%%%SERIAL%%man/man8/tripplite.8.gz %%MANPAGES%%%%SERIAL%%man/man8/tripplitesu.8.gz @@ -265,6 +273,7 @@ lib/libnutscan.so.2.0.0 %%MANPAGES%%%%SERIAL%%man/man8/victronups.8.gz %%MANPAGES%%%%USB%%man/man8/bcmxcp_usb.8.gz %%MANPAGES%%%%USB%%man/man8/richcomm_usb.8.gz +%%MANPAGES%%%%DEV%%man/man8/sockdebug.8.gz %%MANPAGES%%%%USB%%man/man8/tripplite_usb.8.gz %%MANPAGES%%%%USB%%man/man8/usbhid-ups.8.gz %%MANPAGES%%%%SNMP%%man/man8/snmp-ups.8.gz