diff options
Diffstat (limited to 'sys-power/nut')
-rw-r--r-- | sys-power/nut/Manifest | 18 | ||||
-rw-r--r-- | sys-power/nut/files/lighttpd_nut.conf-2.2.0 | 22 | ||||
-rw-r--r-- | sys-power/nut/files/nut-2.6.5-init.d-upsd | 37 | ||||
-rw-r--r-- | sys-power/nut/files/nut-2.7.1-snmpusb-order.patch | 37 | ||||
-rw-r--r-- | sys-power/nut/files/nut-2.7.4-nut-scanner.patch | 35 | ||||
-rw-r--r-- | sys-power/nut/files/nut-2.7.4-py3.patch | 56 | ||||
-rw-r--r-- | sys-power/nut/files/nut-2.7.4-slibtool.patch | 61 | ||||
-rw-r--r-- | sys-power/nut/files/nut-openssl-1.1-support.patch | 151 | ||||
-rw-r--r-- | sys-power/nut/files/systemd_notify.patch (renamed from sys-power/nut/files/systemd_notify.path) | 0 | ||||
-rw-r--r-- | sys-power/nut/metadata.xml | 51 | ||||
-rw-r--r-- | sys-power/nut/nut-2.7.4-r8.ebuild | 274 | ||||
-rw-r--r-- | sys-power/nut/nut-2.8.2.ebuild (renamed from sys-power/nut/nut-2.8.0-r2.ebuild) | 68 | ||||
-rw-r--r-- | sys-power/nut/nut-9999.ebuild | 11 |
13 files changed, 66 insertions, 755 deletions
diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest index 00001ab6c6b0..6bcf06f4949f 100644 --- a/sys-power/nut/Manifest +++ b/sys-power/nut/Manifest @@ -1,21 +1,13 @@ -AUX lighttpd_nut.conf-2.2.0 852 BLAKE2B 782d4e411266612f1393af5ff05bca420ce7e99e6490138515567fb56c401b6f6e4e8b8a85071cb3f640a30f5cf4be0cff7a408ac2b5f9f505c7a2df1211eb83 SHA512 3bdb8cf6823d06ff84fd85f4484be4d842ce4a06722ebe22d7ddd6ea1b78ea08411a7f4a62a31df1b697f5e687f7ee88c8c4872e6a5a05390cef4a46798a7f35 AUX nut-2.2.2-init.d-upsdrv 859 BLAKE2B 7911afe5ab45fa0123b43ac2fe186dbfa4eb9cb224fe5c6dc702d436d94de92492edc3ccce6a28273267c7b051e296c6ce42b9f420087e0e413921190611f07d SHA512 6ca718fcd0019420eabb4b69e3f24334872336be56c07b14c668813bf3d2b82f92903028d7d3142be743ed22d8dc94d7e471d9596710b9dbc1717e2576d3a8f3 AUX nut-2.6.2-lowspeed-buffer-size.patch 553 BLAKE2B 2f758e7b807117e20b465951676ff524d1d2b52b5a69fcb09ad6811730c0038fff4b81cfcc1daaf6f0cfc6d5248be35c4be8b58f9193fe26028361c888ed1535 SHA512 59a953d3c89acccc3d5c028b36de15059f512d0a8074e7fed1d3831570bd09a544e44b5b754b4ad72f8163295db21160c142a83f4d608e40a401c9452823d7b7 -AUX nut-2.6.5-init.d-upsd 671 BLAKE2B a8658d22ffdba585d9fd6de13a347a16e98182bd484c41f6eb8b3e38d94be6a4eea4475f2586d2a7d8146858bc14b2fd0e861a56681ae25a5ce3116a2b7d435c SHA512 79c36537fb40b8284afb8edc28afa0f98fdf96e8def0382278c6242b4602f1911e29a174825ee676f77aa609b6409ce3483a1d188354956d20be9862c4e78180 AUX nut-2.6.5-init.d-upslog 573 BLAKE2B 2a0e04f83990035beb12eee33cfe7ce4fdcd1f310a7ba6f2255e4ad3a1f76245acf4a66332eea5cce7765d914ce7c14f02da50ebb8fa8640c871a12f492ed28b SHA512 06ca7fa8f3fe729b07a919d2a0ecb573b8ac180c447f927504524fca18894e045492458271b9a15898861cb3839b9fb95b2c843e241c7148bc25331ab8360b36 AUX nut-2.6.5-init.d-upsmon 557 BLAKE2B 2681668f09426397a79ade8fe706c182dcb5c58c8e0189d51f9ccd0eddaf9eae78a083da38625f8868b355f2096ad7566b27cbaf967aa7472a92a760fa9ef767 SHA512 9559af5c12ef23db196762e2f999a463518383506ded48903ca5ad4b06230644668bbaa1fd007784514140ef391f76bb0bd6e11efa5d1698b79c57b7f5f74cf2 -AUX nut-2.7.1-snmpusb-order.patch 1417 BLAKE2B 20c3150559d3810c8bf15a9560ccf950ad1bb26bd58b4f2bcf3736871f4599bc3ad948e5f008b1549184f78d0fa3b417bbc8728660fbb110f4537fce83231bad SHA512 df3701821bc4ef45a5089e4d4439c3367fb23cefce7d06168bd422a8c32a1b373ae9fb3456bd5f90a51a672edf9ce29254a08c2045efe210a11b82399793ec19 -AUX nut-2.7.4-nut-scanner.patch 1615 BLAKE2B dd672f2996ca650a6456084dc92d6a9c6ea1b0fe2d1b812bffcfdefda5e797f3f89e19e325f5a2d9ba066b077b9855d2403e111038bd4024f255f2fee243f500 SHA512 5db031aa5c74e4987824b2ac7a5f6e073de16b8958104ceabb7482a6c6b7779d8380fc30b6189ca2cfee9ab795a7413e537d093b0a338aee73d3385b54d280d7 -AUX nut-2.7.4-py3.patch 1940 BLAKE2B 5bb77bca18ad40a1ba4e579098accb0135c0f4b24436425de3983204554ddb0aeceb473a7a6729048dbfb6175e015129a8bfcce26b169b3e21c905f9f08f079e SHA512 2a4f12954bdf2e50cbfb7a7dd09ed83be27ed2a6d0a2e4244ca8b309614515599c81541b5cfb4c81244b739cf3a47d56cb2746db3fae9e8861c5115c0287041b -AUX nut-2.7.4-slibtool.patch 2470 BLAKE2B 6baadd663f83209f3abbb4a6b83f170df56da07bb679f6e47571151406c879cfe9a0dbe17fa72678ca66fdcd07ad07bfb8a38e4821cf529e9367a71fad18de69 SHA512 9dfa6c38a56dcf6d743e4ea4eb46ff5e4a81e77eb79df97921662e00c6f4bee4f70a845c3e49ef5ecda31e0e90b8e7f5b450a9c3cd8c5742b093409b894556a8 AUX nut-2.8.0-init.d-upsd 667 BLAKE2B f3ec275cd401df017428c3772fb3f0d51b66173e3d08fdd844e8499bd216b455d6a2846e991c53285092eafc1ad3f43665185c853a438f5331ecd95c2c8c2e30 SHA512 4a58aea9b0119c6ba0949a5d8365cf8785aa49050fb9cb6f6e0ac4d12d1b8e947823d0c41b64500f453fdf236dee6cf60f812c76a65bff9b2ea0f2b713852dc3 -AUX nut-openssl-1.1-support.patch 3873 BLAKE2B 17877276e46372aa17d357efc0851b9cdb33b14ac0c40913b47ea513a8ecaa6eebe3241ae8b324583070d76b6c12d3cf18c043778754b5774af846fb8a33b4d7 SHA512 8945f2f663dc50cfd7041cc7f2c4af5cca4b5ef9cfa1be48c122a623e6eadfc511bbaa60a8bd6b68bb2569c75d5f64613d595ad7444b8d6ec9f773d7743872a1 AUX nut.powerfail.initd 1305 BLAKE2B 88bd2a1b5b3fbb2ab9ea4d408e4cc57399702c587ec8314c5b78aa5ce03d4de0f4850ecd580140bf5a42947853f7f64953e0a2859fb1f83de185682d6b600500 SHA512 9e171fc192efaa16e554725b6bf40377e648400f6f6e860d436218289fadcf96c7209fed76129d0dfec912dc5702cca11c90fea072767135fe1a2ba8e11ef2ac -AUX systemd_notify.path 1753 BLAKE2B a44167bf491b393474b94ee4c375013cd23d1e1151311eab40ba6ca2c190019631aeb3fd21e20b9ce0a0b98d98506c88ddd9fe043a1000268d8b7b4195d8b489 SHA512 9984fb879a002cd00949dd7e10f5720f3b50ce871312750dbdb8b805903b37b1f8be2c7b2f6b79a13739fba2c28bf0f85427af7c9b7421ebf13cabfb3cd88381 -DIST nut-2.7.4.tar.gz 2509831 BLAKE2B 367c687efd739150898a14c700d5fddbe22bf926522923e1842011ec49b67d6638620500c4eda50291feb474cc6eef39fff63764cb3e0fad5898abee981f8308 SHA512 320c4aff85d8a370c5eff77d33924fdfc3caf6a250620693cdd5bf3336b3a80d8a207488eee841bcf8b72fbad68fda4c074e63b99c56e7886716fc934122d11a +AUX systemd_notify.patch 1753 BLAKE2B a44167bf491b393474b94ee4c375013cd23d1e1151311eab40ba6ca2c190019631aeb3fd21e20b9ce0a0b98d98506c88ddd9fe043a1000268d8b7b4195d8b489 SHA512 9984fb879a002cd00949dd7e10f5720f3b50ce871312750dbdb8b805903b37b1f8be2c7b2f6b79a13739fba2c28bf0f85427af7c9b7421ebf13cabfb3cd88381 DIST nut-2.8.0.tar.gz 3287640 BLAKE2B 6ad87e9c90920d45846d9c1311e8feeb3c36bfa506d62d938940c00d2fc7f7b30632d079a8ee969db624824ae4fd3e14e41e8acd1eda296e26a3aa340f186b94 SHA512 3c413ae54088045a713eb80cf1bdda474f41bb3b67c7c0248aa7a0c4d441dce1ff42627a2735273d7e36892d1f2eeb895220cf28af63fec2fa0c7a267f82d577 -EBUILD nut-2.7.4-r8.ebuild 8839 BLAKE2B df9cfb0d44952cf6847964a15721153a57f4effd146ef9f9ffcff29c87a09038167ff74009a086132d21a06ae72a16a6c39758eb2cbe59e6eb1b4a660ccb3e7a SHA512 8cae8d96ad22e44ba3594ee09e399dee5a566e5e16b140a5fd707d2f4efc794655fa6cf83602ba4c3a7667cb304294a7b3898ed28812a0ec56dad01e26312fd0 -EBUILD nut-2.8.0-r2.ebuild 5808 BLAKE2B 267fbf12c94da4b9516ccdf7524a87210fa14e547993a2476f61f76f39126384ce7f1a9eec42fe0c05b77bc29e50260c96bff29914d4fb775a9b29600b6010c9 SHA512 935fa8fb6a67786abe5d5afe8be9ad3053dfeccde935ece806b9ac8392246d0db11f90e45b36d912c3d8c137e2d5bb46a9284bb21f4d952fa7c09b4a7bd7acf4 +DIST nut-2.8.2.tar.gz 5599935 BLAKE2B 87187293d8acda72c2d807d6f41f2601a318540f63a0ea93782b115402c6b43a0b61ecc710fd6de126d25e59dd4e03681f2b859a87549e9d5f7617ac7b2dad8c SHA512 b6f8f22318e4a4fcb8073a63132b1cb083952c665191b82a7d6765a61b859575a4b0c2ba84ed17cfb8c88d34179876d64520dd2f75f02fe8707b406da2c0821c EBUILD nut-2.8.0-r3.ebuild 5736 BLAKE2B ff76344746befe48fbdcd9c3f9d6230151c5443504e26cf55fc4dd6e24aa98f361470d80a2ce913a08eb66fe0d9ac8a3fa7c9bd3bbff98c2f82a4ee98ee635e9 SHA512 6f213d2a7e9affa7b598ce3bea7c0cf2915e25d9143007fe679733a95cf584ac6a810a4ccd8dc12b8b3ce8184cafc4d45572ca26130068409efd43754bdd62c0 -EBUILD nut-9999.ebuild 6881 BLAKE2B 3be9c0da9c89ad7b6bbc1a51d3b85d21a2462b5caea152dc4b0356005494cd7329f5d4156e696e5ca11824d0036d2519f28771977f240672900401b2b4fffd36 SHA512 1f2f2ad0a4d9ef14a125fd4cc8c7e589a994b36d1315d0c7639b3b85c11572bd765242babbe238348d1868ea98c69e934d1b4b2cc52d383a2b5c85251f7a645f -MISC metadata.xml 6068 BLAKE2B 499dd975b0364733e71175eb061d935f754343d32d6eba547a26659438a0488a25509e907516b73d7bfd9714be28bc2159dd8688d2578611c9b9fca419881446 SHA512 cc42c7645c78516a2b2e82ec09098c88c1f7fbcc68f5685906811b9182dd4869c31c4eb865c5deab8cc105cf24e32161cf7db746fe793e6bea08fbf12f561e79 +EBUILD nut-2.8.2.ebuild 7020 BLAKE2B 685f158397397b0f50cfc5bac5ca381637a8b0360c57456ab8c853b8846cc2d1c74a0174bb664feda948868cb057268ad2fd3b99d7b46a3004410857981e893f SHA512 73b7bf4c7f2c32b6c4490f339024cc0927b6c4c7fe04a9934f78f3557bcbdeac186d26a7b002608dd27beb37ac4647b620dd0731a49eb3ff4ec3aa4b42403e86 +EBUILD nut-9999.ebuild 7023 BLAKE2B ad690148ce213afab2543325097f54f446dacd46f87859a187c44e56e7b72cd77e749cc94656d4284ceac13fe3e12f03aa7bd2913ba590d354514f3a10c570c7 SHA512 155e017f531bbe10465e1205088811cd07d05da1e73df32f6af856f88df1a47c30d4e8fe5f499654a725cbdf3f67d1fe6aef825b84f80ec4fafa243caa928311 +MISC metadata.xml 1351 BLAKE2B 7673ac0c20af6c4b5e3a57f2cad063b40f4141069974544202fe0c34e1df3996fa91af47598616208b17c100c590db4afeff3d0ef61731c6a05768ed2421c9b3 SHA512 7f4755b84bd2c84f42c987a035cd4b91f74a57bbfa57289cfe7aafd02e10e43beca25edced1273a4282db6a257262201e6921190c5ac069fc9ffcd0767ebb31b 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 <robbat2@gentoo.org> - -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 <arnaud.quette@free.fr> -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 <git@the-compiler.org> -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 <git@the-compiler.org> -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 <orbea@riseup.net> -Date: Sat, 27 Mar 2021 15:18:17 -0700 -Subject: [PATCH] drivers: Fix undefined references with slibtool. - -Signed-off-by: orbea <orbea@riseup.net> ---- - 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 <build+lede@de-korte.org> -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(); diff --git a/sys-power/nut/files/systemd_notify.path b/sys-power/nut/files/systemd_notify.patch index 657e0075420c..657e0075420c 100644 --- a/sys-power/nut/files/systemd_notify.path +++ b/sys-power/nut/files/systemd_notify.patch diff --git a/sys-power/nut/metadata.xml b/sys-power/nut/metadata.xml index 4579366e6071..35a29398e316 100644 --- a/sys-power/nut/metadata.xml +++ b/sys-power/nut/metadata.xml @@ -26,57 +26,6 @@ <flag name="snmp">Includes all UPS drivers that use SNMP.</flag> <flag name="usb">Includes all UPS drivers that use USB.</flag> <flag name="xml">Includes all UPS drivers that use XML.</flag> - <flag name="ups_drivers_al175">Driver for Eltek UPS models with AL175 alarm module</flag> - <flag name="ups_drivers_bcmxcp">Driver for UPSes supporting the serial BCM/XCP protocol</flag> - <flag name="ups_drivers_belkin">Driver for Belkin serial UPS equipment</flag> - <flag name="ups_drivers_belkinunv">Driver for Belkin "Universal UPS" and compatible</flag> - <flag name="ups_drivers_bestfcom">Driver for Best Power Fortress/Ferrups</flag> - <flag name="ups_drivers_bestfortress">Driver for old Best Fortress UPS equipment</flag> - <flag name="ups_drivers_bestuferrups">Driver for Best Power Micro-Ferrups</flag> - <flag name="ups_drivers_bestups">Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment</flag> - <flag name="ups_drivers_dummy-ups">Driver for multi-purpose UPS emulation</flag> - <flag name="ups_drivers_etapro">Driver for ETA UPS equipment</flag> - <flag name="ups_drivers_everups">Driver for Ever UPS models</flag> - <flag name="ups_drivers_gamatronic">Driver for Gamatronic UPS equipment</flag> - <flag name="ups_drivers_genericups">Driver for contact-closure UPS equipment</flag> - <flag name="ups_drivers_isbmex">Driver for ISBMEX UPS equipment</flag> - <flag name="ups_drivers_liebert">Driver for Liebert contact-closure UPS equipment</flag> - <flag name="ups_drivers_liebert-esp2">Driver for Liebert UPS, using the ESP-II serial protocol</flag> - <flag name="ups_drivers_masterguard">Driver for Masterguard UPS equipment</flag> - <flag name="ups_drivers_metasys">Driver for Meta System UPS equipment</flag> - <flag name="ups_drivers_mge-utalk">Driver for MGE UPS SYSTEMS UTalk protocol equipment</flag> - <flag name="ups_drivers_microdowell">Driver for Microdowell Enterprise UPS series</flag> - <flag name="ups_drivers_mge-shut">Driver for SHUT Protocol UPS equipment</flag> - <flag name="ups_drivers_oldmge-shut">Driver for SHUT Protocol UPS equipment (older implementation)</flag> - <flag name="ups_drivers_oneac">Driver for Oneac UPS equipment</flag> - <flag name="ups_drivers_optiups">Driver for Opti-UPS (Viewsonic) UPS and Zinto D (ONLINE-USV) equipment</flag> - <flag name="ups_drivers_powercom">UPS driver for serial Powercom/Trust/Advice UPS equipment</flag> - <flag name="ups_drivers_rhino">Driver for Brazilian Microsol RHINO UPS equipment</flag> - <flag name="ups_drivers_safenet">Driver for SafeNet compatible UPS equipment</flag> - <flag name="ups_drivers_solis">Driver for Brazilian Microsol SOLIS UPS equipment</flag> - <flag name="ups_drivers_tripplite">Driver for Tripp-Lite SmartPro UPS equipment</flag> - <flag name="ups_drivers_tripplitesu">Driver for Tripp-Lite SmartOnline (SU) UPS equipment</flag> - <flag name="ups_drivers_upscode2">Driver for UPScode II compatible UPS equipment</flag> - <flag name="ups_drivers_victronups">Driver for IMV/Victron UPS unit Match, Match Lite, NetUps</flag> - <flag name="ups_drivers_powerpanel">Driver for PowerPanel Plus compatible UPS equipment</flag> - <flag name="ups_drivers_blazer_ser">Driver for Megatec/Q1 protocol serial based UPS equipment</flag> - <flag name="ups_drivers_clone">Fake driver to clone outlets for device grouping</flag> - <flag name="ups_drivers_clone-outlet">Fake driver to clone outlets for device grouping</flag> - <flag name="ups_drivers_ivtscd">driver for the IVT Solar Controller Device</flag> - <flag name="ups_drivers_apcsmart">Driver for American Power Conversion Smart Protocol UPS equipment</flag> - <flag name="ups_drivers_apcsmart-old">Driver for American Power Conversion Smart Protocol UPS equipment</flag> - <flag name="ups_drivers_apcupsd-ups">Driver for apcupsd client access</flag> - <flag name="ups_drivers_riello_ser">Driver for Riello UPS Protocol UPS equipment</flag> - <flag name="ups_drivers_nutdrv_qx">Driver for Q* protocol serial and USB based UPS equipment</flag> - <flag name="ups_drivers_usbhid-ups">Driver for USB/HID UPS equipment</flag> - <flag name="ups_drivers_bcmxcp_usb">Experimental driver for UPSes supporting the BCM/XCP protocol over USB</flag> - <flag name="ups_drivers_tripplite_usb">Driver for older Tripp Lite USB UPSes (not PDC HID)</flag> - <flag name="ups_drivers_blazer_usb">Driver for Megatec/Q1 protocol USB based UPS equipment</flag> - <flag name="ups_drivers_richcomm_usb">Driver UPS equipment using Richcomm dry-contact to USB solution</flag> - <flag name="ups_drivers_riello_usb">Driver for Riello UPS Protocol UPS equipment via USB</flag> - <flag name="ups_drivers_netxml-ups">Driver for Eaton / MGE Network Management Card / Proxy (XML/HTTP Protocol) equipment</flag> - <flag name="ups_drivers_snmp-ups">Multi-MIB Driver for SNMP UPS equipment</flag> - <flag name="ups_drivers_nut-ipmipsu">Driver for IPMI Power Supply Units (PSU)</flag> </use> <upstream> <remote-id type="github">networkupstools/nut</remote-id> diff --git a/sys-power/nut/nut-2.7.4-r8.ebuild b/sys-power/nut/nut-2.7.4-r8.ebuild deleted file mode 100644 index f4f14a439035..000000000000 --- a/sys-power/nut/nut-2.7.4-r8.ebuild +++ /dev/null @@ -1,274 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools bash-completion-r1 desktop fixheadtails flag-o-matic systemd toolchain-funcs - -MY_P=${P/_/-} - -DESCRIPTION="Network-UPS Tools" -HOMEPAGE="https://www.networkupstools.org/" -SRC_URI="https://networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 arm ~arm64 ~ppc ppc64 ~riscv x86" - -IUSE="cgi ipmi snmp +usb selinux split-usr ssl tcpd xml zeroconf" - -CDEPEND=" - acct-group/nut - acct-user/nut -" - -DEPEND=" - dev-libs/libltdl - net-libs/libnsl:= - virtual/udev - cgi? ( >=media-libs/gd-2[png] ) - ipmi? ( sys-libs/freeipmi ) - snmp? ( net-analyzer/net-snmp:= ) - ssl? ( >=dev-libs/openssl-1:= ) - tcpd? ( sys-apps/tcp-wrappers ) - usb? ( virtual/libusb:0= ) - xml? ( >=net-libs/neon-0.25.0:= ) - zeroconf? ( net-dns/avahi )" - -BDEPEND=" - ${CDEPEND} - virtual/pkgconfig" - -RDEPEND=" - ${CDEPEND} - ${DEPEND} - selinux? ( sec-policy/selinux-nut )" - -S="${WORKDIR}/${MY_P}" - -# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package -SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx" -SNMP_DRIVERLIST="snmp-ups" -USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx" -USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST} -#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx" -NEONXML_DRIVERLIST="netxml-ups" -IPMI_DRIVERLIST="nut-ipmipsu" -# Now we build from it: -for name in ${SERIAL_DRIVERLIST} ; do - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}" -done -for name in ${USB_DRIVERLIST} ; do - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}" - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )" -done -for name in ${NEONXML_DRIVERLIST}; do - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )" -done -for name in ${SNMP_DRIVERLIST} ; do - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )" -done -for name in ${IPMI_DRIVERLIST} ; do - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )" -done -IUSE="${IUSE} ${IUSE_UPS_DRIVERS}" - -# public files should be 644 root:root -NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf" -# private files should be 640 root:nut - readable by nut, writeable by root, -NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" -# public files should be 644 root:root, only installed if USE=cgi -NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" - -PATCHES=( - "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch - "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch - "${FILESDIR}"/nut-openssl-1.1-support.patch - "${FILESDIR}"/nut-2.7.4-py3.patch - "${FILESDIR}"/nut-2.7.4-nut-scanner.patch - "${FILESDIR}"/nut-2.7.4-slibtool.patch -) - -src_prepare() { - default - - sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ - -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \ - -i configure.ac || die - - sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \ - -i scripts/udev/Makefile.am || die - - rm ltmain.sh m4/lt* m4/libtool.m4 || die - - sed -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \ - -i lib/libupsclient{.pc,-config}.in || die #361685 - - eautoreconf -} - -src_configure() { - local myconf - - filter-lto - # bug #786702 - append-cxxflags -std=c++14 - - tc-export CC - tc-export CXX - tc-export AR - - local UPS_DRIVERS="" - for u in $USE ; do - u2=${u#ups_drivers_} - [[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}" - done - UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }" - myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}" - - use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi" - - # TODO: USE flag for sys-power/powerman - econf \ - --sysconfdir=/etc/nut \ - --datarootdir=/usr/share/nut \ - --datadir=/usr/share/nut \ - --disable-static \ - --with-statepath=/var/lib/nut \ - --with-drvpath=/$(get_libdir)/nut \ - --with-htmlpath=/usr/share/nut/html \ - --with-user=nut \ - --with-group=nut \ - --with-logfacility=LOG_DAEMON \ - --with-dev \ - --with-serial \ - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ - --without-powerman \ - $(use_with cgi) \ - $(use_with ipmi) \ - $(use_with ipmi freeipmi) \ - $(use_with snmp) \ - $(use_with ssl) \ - $(use_with tcpd wrap) \ - $(use_with usb) \ - $(use_with xml neon) \ - $(use_with zeroconf avahi) \ - ${myconf} -} - -src_install() { - emake DESTDIR="${D}" install - - find "${D}" -name '*.la' -delete || die - - dodir /sbin - use split-usr && dosym ../usr/sbin/upsdrvctl /sbin/upsdrvctl - - if use cgi; then - elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." - elog "copy them to your web server's ScriptPath to activate (this is a" - elog "change from the old location)." - elog "If you use lighttpd, see lighttpd_nut.conf in the documentation." - fi - - # this must be done after all of the install phases - for i in "${D}"/etc/nut/*.sample ; do - mv "${i}" "${i/.sample/}" || die - done - - local DOCS=( AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING ) - einstalldocs - - newdoc lib/README README.lib - newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf - - docinto cables - dodoc docs/cables/* - - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog - newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail - - keepdir /var/lib/nut - - einfo "Setting up permissions on files and directories" - fperms 0700 /var/lib/nut - fowners nut:nut /var/lib/nut - - # Do not remove eval here, because the variables contain shell expansions. - eval fperms 0640 ${NUT_PRIVATE_FILES} - eval fowners root:nut ${NUT_PRIVATE_FILES} - - # Do not remove eval here, because the variables contain shell expansions. - eval fperms 0644 ${NUT_PUBLIC_FILES} - eval fowners root:root ${NUT_PUBLIC_FILES} - - # Do not remove eval here, because the variables contain shell expansions. - if use cgi; then - eval fperms 0644 ${NUT_CGI_FILES} - eval fowners root:root ${NUT_CGI_FILES} - fi - - # this is installed for 2.4 and fbsd guys - if ! has_version virtual/udev; then - einfo "Installing non-udev hotplug support" - insinto /etc/hotplug/usb - insopts -m 755 - doins scripts/hotplug/nut-usbups.hotplug - fi - - newbashcomp "${S}"/scripts/misc/nut.bash_completion upsc - bashcomp_alias upsc upscmd upsd upsdrvctl upsmon upsrw -} - -pkg_postinst() { - # this is to ensure that everybody that installed old versions still has - # correct permissions - - chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null - chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null - eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null - eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - if use cgi; then - eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null - eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null - fi - - warningmsg elog -} - -warningmsg() { - msgfunc="$1" - [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" - ${msgfunc} "Please note that NUT now runs under the 'nut' user." - ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." - ${msgfunc} "However if you use a USB UPS you may need to look at the udev or" - ${msgfunc} "hotplug rules that are installed, and alter them suitably." - ${msgfunc} '' - ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream." - ${msgfunc} '' - ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore." - ${msgfunc} "If you have multiple UPS units, you can use their NUT names to" - ${msgfunc} "have a service per UPS:" - ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" - ${msgfunc} '' - ${msgfunc} 'If you want apcupsd to power off your UPS when it' - ${msgfunc} 'shuts down your system in a power failure, you must' - ${msgfunc} 'add nut.powerfail to your shutdown runlevel:' - ${msgfunc} '' - ${msgfunc} 'rc-update add nut.powerfail shutdown' - ${msgfunc} '' - -} diff --git a/sys-power/nut/nut-2.8.0-r2.ebuild b/sys-power/nut/nut-2.8.2.ebuild index d196168233bc..a94d82dc5fab 100644 --- a/sys-power/nut/nut-2.8.0-r2.ebuild +++ b/sys-power/nut/nut-2.8.2.ebuild @@ -3,8 +3,9 @@ EAPI=8 -inherit bash-completion-r1 flag-o-matic linux-info optfeature systemd -inherit tmpfiles toolchain-funcs udev +PYTHON_COMPAT=( python3_{10..12} ) +inherit bash-completion-r1 desktop flag-o-matic linux-info optfeature +inherit python-single-r1 systemd tmpfiles toolchain-funcs udev wrapper xdg MY_P=${P/_/-} @@ -16,27 +17,37 @@ if [[ ${PV} == *9999 ]] ; then inherit git-r3 else SRC_URI="https://networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" - KEYWORDS="amd64 arm ~arm64 ~ppc ppc64 ~riscv x86" + KEYWORDS="amd64 arm ~arm64 ~riscv x86" # waiting for ~arch of dev-libs/libgpiod: ~ppc ~ppc64 fi S="${WORKDIR}/${MY_P}" LICENSE="GPL-2" SLOT="0" -IUSE="cgi doc ipmi serial i2c +man snmp +usb modbus selinux split-usr ssl tcpd test xml zeroconf" +IUSE="gpio cgi doc ipmi serial i2c +man snmp +usb modbus selinux ssl tcpd test xml zeroconf python monitor systemd" RESTRICT="!test? ( test )" +REQUIRED_USE=" + monitor? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) + snmp? ( python ) +" + +# sys-apps/systemd-253 required for Type=notify-reload DEPEND=" acct-group/nut acct-user/nut dev-libs/libltdl virtual/udev cgi? ( >=media-libs/gd-2[png] ) + gpio? ( dev-libs/libgpiod ) i2c? ( sys-apps/i2c-tools ) ipmi? ( sys-libs/freeipmi ) modbus? ( dev-libs/libmodbus ) + python? ( ${PYTHON_DEPS} ) snmp? ( net-analyzer/net-snmp:= ) ssl? ( >=dev-libs/openssl-1:= ) + systemd? ( >=sys-apps/systemd-253 ) tcpd? ( sys-apps/tcp-wrappers ) usb? ( virtual/libusb:1 ) xml? ( >=net-libs/neon-0.25.0:= ) @@ -49,12 +60,18 @@ BDEPEND=" " RDEPEND=" ${DEPEND} + monitor? ( $(python_gen_cond_dep ' + dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] + ') + ) selinux? ( sec-policy/selinux-nut ) " PATCHES=( "${FILESDIR}/${PN}-2.6.2-lowspeed-buffer-size.patch" + "${FILESDIR}/systemd_notify.patch" ) +PATCH_NEEDS_AUTOGEN=1 pkg_pretend() { if use i2c; then @@ -66,6 +83,10 @@ pkg_pretend() { ERROR_HIDRAW="HIDRAW is needed to support USB UPSes" ERROR_I2C_CHARDEV="USB_HIDDEV is needed to support USB UPSes" fi + if use gpio; then + CONFIG_CHECK="~GPIO_CDEV_V1" + ERROR_GPIO_CDEV_V1="GPIO_CDEV_V1 is needed to support GPIO UPSes" + fi if use serial; then CONFIG_CHECK="~SERIAL_8250" ERROR_SERIAL_8250="SERIAL_8250 is needed to support Serial UPSes" @@ -75,12 +96,18 @@ pkg_pretend() { check_extra_config } +pkg_setup() { + use python && python-single-r1_pkg_setup +} + src_prepare() { default - if [[ ${PV} == *9999 ]] ; then + if [[ ${PV} == *9999 ]] || [[ ${PATCH_NEEDS_AUTOGEN} == 1 ]] ; then ./autogen.sh || die fi + + xdg_environment_reset } src_configure() { @@ -104,17 +131,19 @@ src_configure() { --without-powerman --without-python --without-python2 - --without-python3 --with-altpidpath=/run/nut --with-pidpath=/run/nut - $(use_enable test cppunit) $(use_with cgi) + $(use_with gpio) $(use_with i2c linux_i2c) $(use_with ipmi freeipmi) $(use_with ipmi) + $(use_with monitor nut_monitor) + $(use_with python pynut) $(use_with serial) $(use_with snmp) $(use_with ssl) + $(use_with systemd libsystemd) $(use_with tcpd wrap) $(use_with usb) $(use_with xml neon) @@ -127,6 +156,7 @@ src_configure() { use cgi && myeconfargs+=( --with-cgipath=/usr/share/nut/cgi ) use man && myeconfargs+=( --with-doc=man ) + use python && myeconfargs+=( --with-python3="${PYTHON}" ) || myeconfargs+=( --without-python3 ) export bashcompdir="$(get_bashcompdir)" @@ -141,7 +171,6 @@ src_install() { find "${ED}" -name '*.la' -delete || die dodir /sbin - use split-usr && dosym ../usr/sbin/upsdrvctl /sbin/upsdrvctl if use cgi; then elog "CGI monitoring scripts are installed in ${EPREFIX}/usr/share/nut/cgi." @@ -158,11 +187,11 @@ src_install() { mv "${i}" "${i/.sample/}" || die done - local DOCS=( AUTHORS MAINTAINERS NEWS README TODO UPGRADING ) + local DOCS=( AUTHORS MAINTAINERS NEWS.adoc README.adoc TODO.adoc UPGRADING.adoc ) einstalldocs if use doc; then - newdoc lib/README README.lib + newdoc lib/README.adoc README.lib.adoc dodoc docs/*.txt docinto cables dodoc docs/cables/* @@ -182,10 +211,21 @@ src_install() { doins scripts/avahi/nut.service fi - mv "${ED}"/usr/lib/tmpfiles.d/nut-common.tmpfiles "${ED}"/usr/lib/tmpfiles.d/nut-common-tmpfiles.conf || die + if use monitor; then + make_wrapper NUT-Monitor-py3qt5 /usr/share/nut/nut-monitor/app/NUT-Monitor-py3qt5 /usr/share/nut/nut-monitor/app + + # Install desktop shortcut + newmenu scripts/python/app/nut-monitor-py3qt5.desktop nut-monitor.desktop + + # Installing Application icons + local res + for res in 48 64 256; do + doicon -s ${res} scripts/python/app/icons/${res}x${res}/nut-monitor.png + done + doicon -s scalable scripts/python/app/icons/scalable/nut-monitor.svg + fi - # Fix double directory - sed -i -e 's:/nut/nut:/nut:g' "${ED}"/usr/lib/tmpfiles.d/nut-common-tmpfiles.conf || die + use python && python_optimize } pkg_postinst() { @@ -214,8 +254,10 @@ pkg_postinst() { udev_reload tmpfiles_process nut-common-tmpfiles.conf + xdg_pkg_postinst } pkg_postrm() { udev_reload + xdg_pkg_postrm } diff --git a/sys-power/nut/nut-9999.ebuild b/sys-power/nut/nut-9999.ebuild index 22a0e6bc597a..9a6702956acb 100644 --- a/sys-power/nut/nut-9999.ebuild +++ b/sys-power/nut/nut-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -17,7 +17,7 @@ if [[ ${PV} == *9999 ]] ; then inherit git-r3 else SRC_URI="https://networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" - KEYWORDS="~amd64 ~arm64 ~x86" + KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" # waiting for ~arch of dev-libs/libgpiod: ~ppc ~ppc64 fi S="${WORKDIR}/${MY_P}" @@ -69,8 +69,9 @@ RDEPEND=" PATCHES=( "${FILESDIR}/${PN}-2.6.2-lowspeed-buffer-size.patch" - "${FILESDIR}/systemd_notify.path" + "${FILESDIR}/systemd_notify.patch" ) +PATCH_NEEDS_AUTOGEN=1 pkg_pretend() { if use i2c; then @@ -102,7 +103,7 @@ pkg_setup() { src_prepare() { default - if [[ ${PV} == *9999 ]] ; then + if [[ ${PV} == *9999 ]] || [[ ${PATCH_NEEDS_AUTOGEN} == 1 ]] ; then ./autogen.sh || die fi @@ -190,7 +191,7 @@ src_install() { einstalldocs if use doc; then - newdoc lib/README.adoc + newdoc lib/README.adoc README.lib.adoc dodoc docs/*.txt docinto cables dodoc docs/cables/* |