commit:     17aa70262a6681b9d13ab3bf432133fe41f7b511
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Tue May 28 16:31:26 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu May 30 14:54:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17aa7026

sys-power/nut: remove unused patches/files

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/36879
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 sys-power/nut/files/lighttpd_nut.conf-2.2.0       |  22 ----
 sys-power/nut/files/nut-2.6.5-init.d-upsd         |  37 ------
 sys-power/nut/files/nut-2.7.1-snmpusb-order.patch |  37 ------
 sys-power/nut/files/nut-2.7.4-nut-scanner.patch   |  35 -----
 sys-power/nut/files/nut-2.7.4-py3.patch           |  56 --------
 sys-power/nut/files/nut-2.7.4-slibtool.patch      |  61 ---------
 sys-power/nut/files/nut-openssl-1.1-support.patch | 151 ----------------------
 7 files changed, 399 deletions(-)

diff --git a/sys-power/nut/files/lighttpd_nut.conf-2.2.0 
b/sys-power/nut/files/lighttpd_nut.conf-2.2.0
deleted file mode 100644
index 434be8c87e61..000000000000
--- a/sys-power/nut/files/lighttpd_nut.conf-2.2.0
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Lighttpd configuration for using NUT under Gentoo Linux.
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-###############################################################################
-
-# Simple copy this to /etc/lighttpd/ and include it in your lighttpd.conf.
-# It will make NUT available at http://$HOST/nut/ 
-
-server.modules += ("mod_cgi")
-
-# If you want to limit it to some host, uncomment the host check and modify it 
to your needs.
-# $HTTP["host"] == "www2.example.org" {
-alias.url += ( "/nut/" => "/usr/share/nut/cgi/" )
-$HTTP["url"] =~ "^/nut/" {
-  dir-listing.activate = "disable"
-  cgi.assign = ( ".cgi" => "" )
-  index-file.names = ( "upsstats.cgi" )
-}
-# }
-
-# vim: set ft=conf foldmethod=marker et :

diff --git a/sys-power/nut/files/nut-2.6.5-init.d-upsd 
b/sys-power/nut/files/nut-2.6.5-init.d-upsd
deleted file mode 100644
index c4debd306601..000000000000
--- a/sys-power/nut/files/nut-2.6.5-init.d-upsd
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_started_commands="reload"
-
-pidfile=/var/lib/nut/upsd.pid
-bin=/usr/sbin/upsd
-
-depend() {
-       use net
-       before upsmon
-       after upsdrv
-}
-
-start() {
-       ebegin "Starting upsd"
-       # clean up first
-       pkill -u root,nut -x ${bin}
-       sleep 1
-       rm -f ${pidfile}
-       # now start up
-       start-stop-daemon --start --quiet --exec ${bin}
-       eend $?
-}
-
-stop() {
-       ebegin "Stopping upsd"
-       start-stop-daemon --stop --quiet --pidfile ${pidfile}
-       eend $?
-}
-
-reload() {
-       ebegin "Reloading upsd"
-       start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile 
${pidfile}
-       eend $?
-}

diff --git a/sys-power/nut/files/nut-2.7.1-snmpusb-order.patch 
b/sys-power/nut/files/nut-2.7.1-snmpusb-order.patch
deleted file mode 100644
index e62b6571d2ce..000000000000
--- a/sys-power/nut/files/nut-2.7.1-snmpusb-order.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-The code that generates the SNMP and USB headers to compile against does not
-have a deterministic order, leading to different results at times.
-
-Signed-off-by: Robin H. Johnson <[email protected]>
-
-diff -Nuar --exclude .libs --exclude '*.o' --exclude core 
nut-2.7.1.orig/tools/nut-snmpinfo.py nut-2.7.1/tools/nut-snmpinfo.py
---- nut-2.7.1.orig/tools/nut-snmpinfo.py       2014-01-04 19:08:19.117150636 
-0800
-+++ nut-2.7.1/tools/nut-snmpinfo.py    2013-07-26 12:41:11.000000000 -0700
-@@ -78,7 +78,9 @@
- output_file.write( "/* SNMP IDs device table */\n" )
- output_file.write( "static snmp_device_id_t snmp_device_table[] = {\n" )
- 
--for filename in glob.glob('../drivers/*-mib.c'):
-+mibs = glob.glob('../drivers/*-mib.c')
-+mibs.sort()
-+for filename in mibs:
-       list_of_line = open(filename,'r').read().split(';')
-       for line in list_of_line:
-               if "mib2nut_info_t" in line:
-diff -Nuar --exclude .libs --exclude '*.o' --exclude core 
nut-2.7.1.orig/tools/nut-usbinfo.pl nut-2.7.1/tools/nut-usbinfo.pl
---- nut-2.7.1.orig/tools/nut-usbinfo.pl        2014-01-04 19:12:45.595949760 
-0800
-+++ nut-2.7.1/tools/nut-usbinfo.pl     2013-11-17 11:27:38.000000000 -0800
-@@ -75,7 +75,12 @@
- 
- ################# MAIN #################
- 
--find(\&find_usbdevs,$scanPath);
-+find({ 
-+              wanted => \&find_usbdevs, 
-+              follow => 1, 
-+              preprocess => sub { return sort @_ },
-+      },
-+      $scanPath);
- &gen_usb_files;
- 
- ################# SUB METHOD #################
-

diff --git a/sys-power/nut/files/nut-2.7.4-nut-scanner.patch 
b/sys-power/nut/files/nut-2.7.4-nut-scanner.patch
deleted file mode 100644
index c846e3a782cd..000000000000
--- a/sys-power/nut/files/nut-2.7.4-nut-scanner.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 5d98d5536699222bc93c58c1e6f6df43dc9bfcff Mon Sep 17 00:00:00 2001
-From: Arnaud Quette <[email protected]>
-Date: Thu, 10 Mar 2016 14:41:40 +0100
-Subject: [PATCH] Fix nut-scanner compilation in some environments
-
-Following the commits 5187dab (common: add some string-related functions) and
-e767df5 (common: consolidate some string-related functions), the build rules of
-nut-scanner were not updated to also use str.c. Since the libcommon.la
-dependency was still there, some environments managed to build cleanly, while
-other are failing.  Update build dependencies to fix this situation
----
- tools/nut-scanner/Makefile.am | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tools/nut-scanner/Makefile.am b/tools/nut-scanner/Makefile.am
-index 558cb23b8f..db85c68287 100644
---- a/tools/nut-scanner/Makefile.am
-+++ b/tools/nut-scanner/Makefile.am
-@@ -14,14 +14,14 @@ libnutscan_la_SOURCES = scan_nut.c scan_ipmi.c \
-                       scan_avahi.c scan_eaton_serial.c nutscan-serial.c \
-                       ../../drivers/serial.c \
-                       ../../drivers/bcmxcp_ser.c \
--                      ../../common/common.c
-+                      ../../common/common.c ../../common/str.c
- libnutscan_la_LIBADD = $(NETLIBS) $(LIBLTDL_LIBS)
- libnutscan_la_LDFLAGS = $(SERLIBS) -version-info 1:0:0
- libnutscan_la_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include 
$(LIBLTDL_CFLAGS) -I$(top_srcdir)/drivers
- 
- nut_scanner_SOURCES = nut-scanner.c
- nut_scanner_CFLAGS = -I$(top_srcdir)/clients -I$(top_srcdir)/include
--nut_scanner_LDADD = libnutscan.la ../../common/libcommon.la
-+nut_scanner_LDADD = libnutscan.la
- 
- if WITH_SSL
-   libnutscan_la_CFLAGS += $(LIBSSL_CFLAGS)

diff --git a/sys-power/nut/files/nut-2.7.4-py3.patch 
b/sys-power/nut/files/nut-2.7.4-py3.patch
deleted file mode 100644
index dbe661982eb1..000000000000
--- a/sys-power/nut/files/nut-2.7.4-py3.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From eea0c5e9e5566c36a8b1e364ed4909231901a8f5 Mon Sep 17 00:00:00 2001
-From: Florian Bruhin <[email protected]>
-Date: Tue, 29 Nov 2016 10:45:04 +0100
-Subject: [PATCH 1/2] Make gen-nutupsconf-aug.py work with Python 3
-
-This makes the script work with Python 2.6+.
-Fixes #345.
----
- scripts/augeas/gen-nutupsconf-aug.py | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/scripts/augeas/gen-nutupsconf-aug.py 
b/scripts/augeas/gen-nutupsconf-aug.py
-index 55db17a73..4bb201602 100755
---- a/scripts/augeas/gen-nutupsconf-aug.py
-+++ b/scripts/augeas/gen-nutupsconf-aug.py
-@@ -18,6 +18,8 @@
- # This program extracts all drivers specific variables, declared
- # using 'addvar()' and output a complete ups.conf lens for Augeas
- 
-+from __future__ import print_function
-+
- import sys
- import re
- import glob
-@@ -69,7 +71,7 @@ def grep(string,list):
- 
-       if (len(sys.argv) == 2):
-               dirPrefix = sys.argv[1]
--              print dirPrefix
-+              print(dirPrefix)
- 
-       # 1/ Extract all specific drivers parameters, in a sorted list with 
unique entries
-       # 1.1/ List all drivers implementation files
-
-From 7bf209a5deef1ec1f05cf89c25c8399590d4e4e8 Mon Sep 17 00:00:00 2001
-From: Florian Bruhin <[email protected]>
-Date: Tue, 29 Nov 2016 17:37:01 +0100
-Subject: [PATCH 2/2] Fix gitlog2changelog.py on python 3
-
----
- tools/gitlog2changelog.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/gitlog2changelog.py b/tools/gitlog2changelog.py
-index d8c089187..f0bea4af6 100755
---- a/tools/gitlog2changelog.py
-+++ b/tools/gitlog2changelog.py
-@@ -80,7 +80,7 @@
-             else:
-                 message = message + " " + line.strip()
-     # If this line is hit all of the files have been stored for this commit
--    elif re.search('files? changed', line) >= 0:
-+    elif re.search('files? changed', line):
-         filesFound = True
-         continue
-     # Collect the files for this commit. FIXME: Still need to add +/- to files

diff --git a/sys-power/nut/files/nut-2.7.4-slibtool.patch 
b/sys-power/nut/files/nut-2.7.4-slibtool.patch
deleted file mode 100644
index ddcebdc2ec4f..000000000000
--- a/sys-power/nut/files/nut-2.7.4-slibtool.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From a0328e384ad3fb230c2276c8b6dd9f2c47ac07fb Mon Sep 17 00:00:00 2001
-From: orbea <[email protected]>
-Date: Sat, 27 Mar 2021 15:18:17 -0700
-Subject: [PATCH] drivers: Fix undefined references with slibtool.
-
-Signed-off-by: orbea <[email protected]>
----
- drivers/Makefile.am | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/Makefile.am b/drivers/Makefile.am
-index 40746364e3..3c2277cfc0 100644
---- a/drivers/Makefile.am
-+++ b/drivers/Makefile.am
-@@ -4,8 +4,8 @@
- # (libtool version of the static lib, in order to access LTLIBOBJS)
- #FIXME: SERLIBS is only useful for LDADD_DRIVERS_SERIAL not for LDADD_COMMON
- LDADD_COMMON = ../common/libcommon.la ../common/libparseconf.la
--LDADD_DRIVERS = $(LDADD_COMMON) main.o dstate.o
--LDADD_DRIVERS_SERIAL = $(LDADD_DRIVERS) $(SERLIBS) serial.o
-+LDADD_DRIVERS = libdummy.la $(LDADD_COMMON)
-+LDADD_DRIVERS_SERIAL = libdummy_serial.la $(LDADD_DRIVERS) $(SERLIBS)
- 
- # most targets are drivers, so make this the default
- LDADD = $(LDADD_DRIVERS_SERIAL)
-@@ -109,6 +109,7 @@ bcmxcp_LDADD = $(LDADD) -lm
- belkin_SOURCES = belkin.c
- belkinunv_SOURCES = belkinunv.c
- bestfcom_SOURCES = bestfcom.c
-+bestfortress_SOURCES = bestfortress.c
- bestuferrups_SOURCES = bestuferrups.c
- bestups_SOURCES = bestups.c
- blazer_ser_SOURCES = blazer.c blazer_ser.c
-@@ -198,7 +199,6 @@ richcomm_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS)
- riello_usb_SOURCES = riello.c riello_usb.c libusb.c usb-common.c
- riello_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm
- 
--
- # HID-over-serial
- mge_shut_SOURCES = usbhid-ups.c libshut.c libhid.c hidparser.c mge-hid.c
- # per-target CFLAGS are necessary here
-@@ -253,7 +253,7 @@ nutdrv_qx_LDADD = $(LDADD_DRIVERS) -lm
- nutdrv_qx_CFLAGS = $(AM_CFLAGS)
- if WITH_SERIAL
- nutdrv_qx_CFLAGS += -DQX_SERIAL
--nutdrv_qx_LDADD += $(SERLIBS) serial.o
-+nutdrv_qx_LDADD += libdummy_serial.la $(SERLIBS)
- endif
- if WITH_USB
- nutdrv_qx_CFLAGS += -DQX_USB
-@@ -291,5 +291,8 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h 
bcmxcp.h bcmxcp_ser.h      \
- 
- # Define a dummy library so that Automake builds rules for the
- # corresponding object files.  This library is not actually built,
--EXTRA_LIBRARIES = libdummy.a
--libdummy_a_SOURCES = main.c dstate.c serial.c
-+EXTRA_LTLIBRARIES = libdummy.la libdummy_serial.la
-+libdummy_la_SOURCES = main.c dstate.c
-+libdummy_la_LDFLAGS = -no-undefined -static
-+libdummy_serial_la_SOURCES = serial.c
-+libdummy_serial_la_LDFLAGS = -no-undefined -static

diff --git a/sys-power/nut/files/nut-openssl-1.1-support.patch 
b/sys-power/nut/files/nut-openssl-1.1-support.patch
deleted file mode 100644
index 5d1c2afe7dca..000000000000
--- a/sys-power/nut/files/nut-openssl-1.1-support.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From da1f5aa699f54e0f6977ab64a3bc2f90a51c3104 Mon Sep 17 00:00:00 2001
-From: Arjen de Korte <[email protected]>
-Date: Mon, 27 Nov 2017 21:10:13 +0100
-Subject: [PATCH] Add support for openssl-1.1.0
-
---- a/clients/upsclient.c
-+++ b/clients/upsclient.c
-@@ -299,11 +299,6 @@
- {
- #ifdef WITH_OPENSSL
-       int ret, ssl_mode = SSL_VERIFY_NONE;
--#if OPENSSL_VERSION_NUMBER >= 0x10000000L
--      const SSL_METHOD        *ssl_method;
--#else
--      SSL_METHOD      *ssl_method;
--#endif
- #elif defined(WITH_NSS) /* WITH_OPENSSL */
-       SECStatus       status;
- #endif /* WITH_OPENSSL | WITH_NSS */
-@@ -315,22 +310,32 @@
-       }
-       
- #ifdef WITH_OPENSSL
--      
--      SSL_library_init();
--      SSL_load_error_strings();
- 
--      ssl_method = TLSv1_client_method();
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+      SSL_load_error_strings();
-+      SSL_library_init();
- 
--      if (!ssl_method) {
--              return 0;
--      }
-+      ssl_ctx = SSL_CTX_new(SSLv23_client_method());
-+#else
-+      ssl_ctx = SSL_CTX_new(TLS_client_method());
-+#endif
- 
--      ssl_ctx = SSL_CTX_new(ssl_method);
-       if (!ssl_ctx) {
-               upslogx(LOG_ERR, "Can not initialize SSL context");
-               return -1;
-       }
-       
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+      /* set minimum protocol TLSv1 */
-+      SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
-+#else
-+      ret = SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION);
-+      if (ret != 1) {
-+              upslogx(LOG_ERR, "Can not set minimum protocol to TLSv1");
-+              return -1;
-+      }
-+#endif
-+
-       if (!certpath) {
-               if (certverify == 1) {
-                       upslogx(LOG_ERR, "Can not verify certificate if any is 
specified");
-@@ -737,7 +742,7 @@
-       switch(res)
-       {
-       case 1:
--              upsdebugx(3, "SSL connected");
-+              upsdebugx(3, "SSL connected (%s)", SSL_get_version(ups->ssl));
-               break;
-       case 0:
-               upslog_with_errno(1, "SSL_connect do not accept handshake.");
---- a/clients/upssched.c
-+++ b/clients/upssched.c
-@@ -794,7 +794,7 @@
-       }
- 
-       if (!strcmp(cmd, "EXECUTE")) {
--              if (ca1 == '\0') {
-+              if (ca1[0] == '\0') {
-                       upslogx(LOG_ERR, "Empty EXECUTE command argument");
-                       return;
-               }
---- a/m4/nut_check_libopenssl.m4
-+++ b/m4/nut_check_libopenssl.m4
-@@ -58,7 +58,7 @@
- 
-       dnl check if openssl is usable
-       AC_CHECK_HEADERS(openssl/ssl.h, [nut_have_openssl=yes], 
[nut_have_openssl=no], [AC_INCLUDES_DEFAULT])
--      AC_CHECK_FUNCS(SSL_library_init, [], [nut_have_openssl=no])
-+      AC_CHECK_FUNCS(SSL_CTX_new, [], [nut_have_openssl=no])
- 
-       if test "${nut_have_openssl}" = "yes"; then
-               nut_with_ssl="yes"
---- a/server/netssl.c
-+++ b/server/netssl.c
-@@ -274,7 +274,7 @@
-       {
-       case 1:
-               client->ssl_connected = 1;
--              upsdebugx(3, "SSL connected");
-+              upsdebugx(3, "SSL connected (%s)", 
SSL_get_version(client->ssl));
-               break;
-               
-       case 0:
-@@ -370,13 +370,7 @@
- {
- #ifdef WITH_NSS
-       SECStatus status;
--#elif defined(WITH_OPENSSL)
--#if OPENSSL_VERSION_NUMBER >= 0x10000000L
--      const SSL_METHOD        *ssl_method;
--#else
--      SSL_METHOD      *ssl_method;
--#endif
--#endif /* WITH_NSS|WITH_OPENSSL */
-+#endif /* WITH_NSS */
- 
-       if (!certfile) {
-               return;
-@@ -386,18 +380,29 @@
- 
- #ifdef WITH_OPENSSL
- 
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       SSL_load_error_strings();
-       SSL_library_init();
- 
--      if ((ssl_method = TLSv1_server_method()) == NULL) {
-+      ssl_ctx = SSL_CTX_new(SSLv23_server_method());
-+#else
-+      ssl_ctx = SSL_CTX_new(TLS_server_method());
-+#endif
-+
-+      if (!ssl_ctx) {
-               ssl_debug();
--              fatalx(EXIT_FAILURE, "TLSv1_server_method failed");
-+              fatalx(EXIT_FAILURE, "SSL_CTX_new failed");
-       }
- 
--      if ((ssl_ctx = SSL_CTX_new(ssl_method)) == NULL) {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+      /* set minimum protocol TLSv1 */
-+      SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
-+#else
-+      if (SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION) != 1) {
-               ssl_debug();
--              fatalx(EXIT_FAILURE, "SSL_CTX_new failed");
-+              fatalx(EXIT_FAILURE, 
"SSL_CTX_set_min_proto_version(TLS1_VERSION)");
-       }
-+#endif
- 
-       if (SSL_CTX_use_certificate_chain_file(ssl_ctx, certfile) != 1) {
-               ssl_debug();

Reply via email to