From 21435953e16cda318a82334ddbadb3b5c36d9ea7 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 15 Jan 2020 15:51:32 +0000 Subject: gentoo resync : 15.01.2020 --- sys-power/nut/Manifest | 8 +- .../nut/files/nut-2.6.2-lowspeed-buffer-size.patch | 16 +- sys-power/nut/files/nut-openssl-1.1-support.patch | 302 ++++----------------- sys-power/nut/nut-2.7.4-r1.ebuild | 268 ------------------ sys-power/nut/nut-2.7.4-r2.ebuild | 297 -------------------- sys-power/nut/nut-2.7.4-r3.ebuild | 17 +- 6 files changed, 80 insertions(+), 828 deletions(-) delete mode 100644 sys-power/nut/nut-2.7.4-r1.ebuild delete mode 100644 sys-power/nut/nut-2.7.4-r2.ebuild (limited to 'sys-power/nut') diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest index 1729dbe73c82..1d3e46ea5d0b 100644 --- a/sys-power/nut/Manifest +++ b/sys-power/nut/Manifest @@ -1,16 +1,14 @@ AUX NUT-Monitor-1.3-paths.patch 2833 BLAKE2B 63f1720f94c50a6b63b665a964821ad7452a26d76a454873312fb810d3bf23165ca8fec3d4e54d400a38071bf9cc3c15fdcbe4fd9f5b7f40f842c6f259a86a03 SHA512 c27b7199ec8e06746308620e0e6ddcc3edd4e3494560ca459bae9f2f4244702ef899cab9326a2042ba39556bd1dfcd307657b32b3c7959610a861a85737ffe81 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 519 BLAKE2B 916879ef2ddeb236a16e8f9a5ca0dcf13c611e5f64cd572f50f8a74a502a4882e0092a22f3b76bd0a9adc9cf61c907c71a3951241f6220fd3b58b8d54fcb3eb2 SHA512 396dd55fb5ff7a90deed86bd091fa6924c713ce51cb3b0972bc0f72ebcd7efdcea6698d16e675bfb121218160a0d370c13e353c381d85d61e0fad05e247ca625 +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 a48b215181d6b40691db244d38b5868e69844f5a1ee6f91cb8815c4386ae801f957b2fbaf53fbe5dd98925be42036dbd54dd5d13c0077c8884e018fac24d101a SHA512 9ccf947b2c5e7a73e96148edb7684f21ae84c4212b980f2ba7b88006dc1e3400b1b9017202b87648f928a3e19f4898094622a6683e0995b72f355ccb394280c3 AUX nut-2.7.1-snmpusb-order.patch 1417 BLAKE2B 20c3150559d3810c8bf15a9560ccf950ad1bb26bd58b4f2bcf3736871f4599bc3ad948e5f008b1549184f78d0fa3b417bbc8728660fbb110f4537fce83231bad SHA512 df3701821bc4ef45a5089e4d4439c3367fb23cefce7d06168bd422a8c32a1b373ae9fb3456bd5f90a51a672edf9ce29254a08c2045efe210a11b82399793ec19 AUX nut-2.7.2-no-libdummy.patch 535 BLAKE2B f18f65ca92e834b5e085358a09c7363cf156b4a156c6c99d4f7cc34a17d25cf1518f342c072791eb37db613a6dafc32aeed364b88063c4d92d20e21e34a5d807 SHA512 a402a70a4cfc922d31203560627ace87f82795aef072d333cb1bfb91a6b67fbc10769e5d68a8d2741ca512b81b5754e9141b68dcb197dbe558ed5556e2de37a1 -AUX nut-openssl-1.1-support.patch 9719 BLAKE2B 2bfe29e9f984fe5ad7854a67f60705ca3c6203392c59654738a91c2f8b543efcd498ebc3747fb509c3bc6934dde0d42cf31418572b60a8cf39fea790338bbe37 SHA512 25d7f9b761a3f7f158edc524071023973edc1c7ee50fe7f4eb487ae4ac131e112ebba944c0df20cd15bf5d2b83394e03f2387be17b95b4d5d969fba3d08e5d84 +AUX nut-openssl-1.1-support.patch 3873 BLAKE2B 17877276e46372aa17d357efc0851b9cdb33b14ac0c40913b47ea513a8ecaa6eebe3241ae8b324583070d76b6c12d3cf18c043778754b5774af846fb8a33b4d7 SHA512 8945f2f663dc50cfd7041cc7f2c4af5cca4b5ef9cfa1be48c122a623e6eadfc511bbaa60a8bd6b68bb2569c75d5f64613d595ad7444b8d6ec9f773d7743872a1 AUX nut.powerfail.initd 1306 BLAKE2B 9e9c6eb40c6a313ad625136523de730a75b811841331ae5f7dd42b71b65f591c4ab5b8da6e954ceab42da89f4a20e8655cae57354aec6ab796cec80f60ebb419 SHA512 b9aaab526d0996b36a7a6d76a3ee63c1452b0a1bed358e23f6f7f5534e0da7751281428091efc7dba2004706996850ec18318809fdacb94cd8d73ea22bda52ee DIST nut-2.7.4.tar.gz 2509831 BLAKE2B 367c687efd739150898a14c700d5fddbe22bf926522923e1842011ec49b67d6638620500c4eda50291feb474cc6eef39fff63764cb3e0fad5898abee981f8308 SHA512 320c4aff85d8a370c5eff77d33924fdfc3caf6a250620693cdd5bf3336b3a80d8a207488eee841bcf8b72fbad68fda4c074e63b99c56e7886716fc934122d11a -EBUILD nut-2.7.4-r1.ebuild 8934 BLAKE2B ebf3ac2d9e74098efd5dcf778c44c7cec1fb69df4692c0dba99d784467cb7ea0bcace95b925e0bcf2e62f65f01bfbea9e205238f1894c516661a95a4f9632a24 SHA512 331142b311dfa576d668746ffd318c08dbf27117eb75d92f2395b141802b4f92c2f81a1e7640c7d1b073274023e7d44001da538fdb2eabd4d8078b5acad931e3 -EBUILD nut-2.7.4-r2.ebuild 9720 BLAKE2B 9685414f8faa8a7565eb836d0e02671ad6d8e10f1038db98c43aa533e0fa1d2de6f1057ea9cea64887dcd1c29da7663ae1c72bf1b4c60b76fe5578b0ac9c4a25 SHA512 a1f6aad2acb0762ed0007b99ccf5af94b1d72c621adddf875b1f423d8041efb39091351ae3bd3bc172eac27214e1b5ae726967be7e3581790bfc65bf32e23060 -EBUILD nut-2.7.4-r3.ebuild 9760 BLAKE2B 9b6b485acf8f4e9713cc51875f44ef2d5d4fb20f3cac63ac85e9d4aee42609cf05410cca7106e4201ee82aaa47d5095559e21066edf588ef5a26b61dec1cbb7a SHA512 bea57a2a10f8e9f0f9a10be61100e472aabbfeaf6a745e884f06bd7000b8ab4166d215a539224d10d90076f98fea80a0905983727ceee0a7f1308258d8291476 +EBUILD nut-2.7.4-r3.ebuild 9769 BLAKE2B 3b828077d369faaea1eb57303437f5d79955bdcc681ede5ebcb81b4e30521c1bb06a43882f2527dd6b7da8cb10d323421409aa9e1a9107f63d1fdd9ba17d3150 SHA512 fe229730b0f61ba3334e4ee01920e3510302087fa449d68b9383a9d236e866cfb0d6c4c2054394f89023b3ab2a7a225b8f3cc38d9645214c1745084d874a464a MISC metadata.xml 5329 BLAKE2B a97167cdd654c0a1cfc035fbab98a8c94150522b77651186f8c706ac2ebadac6b3e38c8c563a6fa16ac91fc8da760efd204ce3d3ce8e3e0c5239a9dd8c1adf4e SHA512 e57d635a530b16627fbc4807a07a227900189a8796285f309b710c4acb951c990b4f613dc9b3cbab71c480641d8ebfd942520a13e5712527d0058ca07c16b67d diff --git a/sys-power/nut/files/nut-2.6.2-lowspeed-buffer-size.patch b/sys-power/nut/files/nut-2.6.2-lowspeed-buffer-size.patch index 1e6617316fb9..de4e2000adfa 100644 --- a/sys-power/nut/files/nut-2.6.2-lowspeed-buffer-size.patch +++ b/sys-power/nut/files/nut-2.6.2-lowspeed-buffer-size.patch @@ -5,12 +5,14 @@ Respun from nut-2.4.3-lowspeed-buffer-size.patch Index: a/drivers/libhid.c =================================================================== ---- a/drivers/libhid.c (revision 2336) -+++ a/drivers/libhid.c (revision 2407) -@@ -142,5 +142,5 @@ - int id = pData->ReportID; - int r; +--- a/drivers/libhid.c ++++ b/drivers/libhid.c +@@ -477,7 +477,7 @@ + */ + int HIDGetEvents(hid_dev_handle_t udev, HIDData_t **event, int eventsize) + { - unsigned char buf[SMALLBUF]; + unsigned char buf[8]; /* Maximum size for low-speed USB devices */ - - if (rbuf->ts[id] + age > time(NULL)) { + int itemCount = 0; + int buflen, r, i; + HIDData_t *pData; diff --git a/sys-power/nut/files/nut-openssl-1.1-support.patch b/sys-power/nut/files/nut-openssl-1.1-support.patch index 71e1bf47f1b9..5d1c2afe7dca 100644 --- a/sys-power/nut/files/nut-openssl-1.1-support.patch +++ b/sys-power/nut/files/nut-openssl-1.1-support.patch @@ -1,78 +1,11 @@ From da1f5aa699f54e0f6977ab64a3bc2f90a51c3104 Mon Sep 17 00:00:00 2001 From: Arjen de Korte Date: Mon, 27 Nov 2017 21:10:13 +0100 -Subject: [PATCH 1/7] Add support for openssl-1.1.0 +Subject: [PATCH] Add support for openssl-1.1.0 ---- - clients/upsclient.c | 4 ++++ - m4/nut_check_libopenssl.m4 | 5 +++-- - server/netssl.c | 4 ++++ - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/clients/upsclient.c b/clients/upsclient.c -index b90587b00..fc5e7523c 100644 --- a/clients/upsclient.c +++ b/clients/upsclient.c -@@ -316,7 +316,11 @@ int upscli_init(int certverify, const char *certpath, - - #ifdef WITH_OPENSSL - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_library_init(); -+#else -+ OPENSSL_init_ssl(0, NULL); -+#endif - SSL_load_error_strings(); - - ssl_method = TLSv1_client_method(); -diff --git a/m4/nut_check_libopenssl.m4 b/m4/nut_check_libopenssl.m4 -index 1b875077b..5f29f4a38 100644 ---- a/m4/nut_check_libopenssl.m4 -+++ b/m4/nut_check_libopenssl.m4 -@@ -57,8 +57,9 @@ if test -z "${nut_have_libopenssl_seen}"; then - AC_MSG_RESULT([${LIBS}]) - - 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(OPENSSL_init_ssl, [nut_have_openssl=yes], [nut_have_openssl=no]) -+ AC_CHECK_FUNCS(SSL_library_init, [nut_have_openssl=yes], []) -+ AC_CHECK_HEADERS(openssl/ssl.h, [], [nut_have_openssl=no], [AC_INCLUDES_DEFAULT]) - - if test "${nut_have_openssl}" = "yes"; then - nut_with_ssl="yes" -diff --git a/server/netssl.c b/server/netssl.c -index c2f409899..0f9a70acf 100644 ---- a/server/netssl.c -+++ b/server/netssl.c -@@ -388,7 +388,11 @@ void ssl_init(void) - #ifdef WITH_OPENSSL - - SSL_load_error_strings(); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_library_init(); -+#else -+ OPENSSL_init_ssl(0, NULL); -+#endif - - if ((ssl_method = TLSv1_server_method()) == NULL) { - ssl_debug(); - -From b15656efb2575647ca0e0b6439b6380373767b8f Mon Sep 17 00:00:00 2001 -From: Arjen de Korte -Date: Tue, 28 Nov 2017 20:00:52 +0100 -Subject: [PATCH 2/7] Allow TLSv1 and higher (not just TLSv1) - ---- - clients/upsclient.c | 30 +++++++++++++++++------------- - server/netssl.c | 26 +++++++++++++++----------- - 2 files changed, 32 insertions(+), 24 deletions(-) - -diff --git a/clients/upsclient.c b/clients/upsclient.c -index fc5e7523c..bd951e854 100644 ---- a/clients/upsclient.c -+++ b/clients/upsclient.c -@@ -299,11 +299,6 @@ int upscli_init(int certverify, const char *certpath, +@@ -299,11 +299,6 @@ { #ifdef WITH_OPENSSL int ret, ssl_mode = SSL_VERIFY_NONE; @@ -84,27 +17,24 @@ index fc5e7523c..bd951e854 100644 #elif defined(WITH_NSS) /* WITH_OPENSSL */ SECStatus status; #endif /* WITH_OPENSSL | WITH_NSS */ -@@ -315,26 +310,35 @@ int upscli_init(int certverify, const char *certpath, +@@ -315,22 +310,32 @@ } #ifdef WITH_OPENSSL -+ -+ SSL_load_error_strings(); - - #if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_library_init(); -+ -+ ssl_ctx = SSL_CTX_new(SSLv23_client_method()); - #else - OPENSSL_init_ssl(0, NULL); --#endif +- +- 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 @@ -128,11 +58,49 @@ index fc5e7523c..bd951e854 100644 if (!certpath) { if (certverify == 1) { upslogx(LOG_ERR, "Can not verify certificate if any is specified"); -diff --git a/server/netssl.c b/server/netssl.c -index 0f9a70acf..98680d25e 100644 +@@ -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 -@@ -371,13 +371,7 @@ void ssl_init(void) +@@ -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; @@ -147,22 +115,20 @@ index 0f9a70acf..98680d25e 100644 if (!certfile) { return; -@@ -388,21 +382,31 @@ void ssl_init(void) +@@ -386,18 +380,29 @@ + #ifdef WITH_OPENSSL ++#if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_load_error_strings(); -+ - #if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_library_init(); -+ -+ ssl_ctx = SSL_CTX_new(SSLv23_server_method()); - #else - OPENSSL_init_ssl(0, NULL); -+ -+ ssl_ctx = SSL_CTX_new(TLS_server_method()); - #endif - 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"); @@ -183,151 +149,3 @@ index 0f9a70acf..98680d25e 100644 if (SSL_CTX_use_certificate_chain_file(ssl_ctx, certfile) != 1) { ssl_debug(); - -From 5a8308aef9884017754fb70620c8ded34fa44290 Mon Sep 17 00:00:00 2001 -From: Arjen de Korte -Date: Tue, 28 Nov 2017 22:01:41 +0100 -Subject: [PATCH 3/7] Fix check for empty string - ---- - clients/upssched.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clients/upssched.c b/clients/upssched.c -index 97b3ed42d..3fdf118ed 100644 ---- a/clients/upssched.c -+++ b/clients/upssched.c -@@ -794,7 +794,7 @@ static void parse_at(const char *ntype, const char *un, const char *cmd, - } - - if (!strcmp(cmd, "EXECUTE")) { -- if (ca1 == '\0') { -+ if (ca1[0] == '\0') { - upslogx(LOG_ERR, "Empty EXECUTE command argument"); - return; - } - -From 5ecfb0ffe3d89a5116dd287ff2c3f60de67ecbb9 Mon Sep 17 00:00:00 2001 -From: Arjen de Korte -Date: Fri, 1 Dec 2017 12:24:00 +0100 -Subject: [PATCH 4/7] Report TLS handshake in debug mode - ---- - clients/upsclient.c | 2 +- - server/netssl.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/clients/upsclient.c b/clients/upsclient.c -index bd951e854..b7dd8f424 100644 ---- a/clients/upsclient.c -+++ b/clients/upsclient.c -@@ -745,7 +745,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) - 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."); -diff --git a/server/netssl.c b/server/netssl.c -index 98680d25e..6ae13e8d3 100644 ---- a/server/netssl.c -+++ b/server/netssl.c -@@ -275,7 +275,7 @@ void net_starttls(nut_ctype_t *client, int numarg, const char **arg) - { - case 1: - client->ssl_connected = 1; -- upsdebugx(3, "SSL connected"); -+ upsdebugx(3, "SSL connected (%s)", SSL_get_version(client->ssl)); - break; - - case 0: - -From ab0c8b41c0530d3706e4997257939026cfd29ccc Mon Sep 17 00:00:00 2001 -From: Arjen de Korte -Date: Sun, 24 Feb 2019 18:31:21 +0100 -Subject: [PATCH 5/7] Update nut_check_libopenssl.m4 - ---- - m4/nut_check_libopenssl.m4 | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/m4/nut_check_libopenssl.m4 b/m4/nut_check_libopenssl.m4 -index 5f29f4a38..7eb401cd9 100644 ---- a/m4/nut_check_libopenssl.m4 -+++ b/m4/nut_check_libopenssl.m4 -@@ -57,9 +57,8 @@ if test -z "${nut_have_libopenssl_seen}"; then - AC_MSG_RESULT([${LIBS}]) - - dnl check if openssl is usable -- AC_CHECK_FUNCS(OPENSSL_init_ssl, [nut_have_openssl=yes], [nut_have_openssl=no]) -- AC_CHECK_FUNCS(SSL_library_init, [nut_have_openssl=yes], []) -- AC_CHECK_HEADERS(openssl/ssl.h, [], [nut_have_openssl=no], [AC_INCLUDES_DEFAULT]) -+ AC_CHECK_HEADERS(openssl/ssl.h, [nut_have_openssl=yes], [nut_have_openssl=no], [AC_INCLUDES_DEFAULT]) -+ AC_CHECK_FUNCS(SSL_CTX_new, [], [nut_have_openssl=no]) - - if test "${nut_have_openssl}" = "yes"; then - nut_with_ssl="yes" - -From 1dc34a5da7308f0f85537a6761fefb3ff3098863 Mon Sep 17 00:00:00 2001 -From: Arjen de Korte -Date: Sun, 24 Feb 2019 18:34:53 +0100 -Subject: [PATCH 6/7] Update upsclient.c - ---- - clients/upsclient.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/clients/upsclient.c b/clients/upsclient.c -index b7dd8f424..541664f36 100644 ---- a/clients/upsclient.c -+++ b/clients/upsclient.c -@@ -311,15 +311,12 @@ int upscli_init(int certverify, const char *certpath, - - #ifdef WITH_OPENSSL - -- SSL_load_error_strings(); -- - #if OPENSSL_VERSION_NUMBER < 0x10100000L -+ SSL_load_error_strings(); - SSL_library_init(); - - ssl_ctx = SSL_CTX_new(SSLv23_client_method()); - #else -- OPENSSL_init_ssl(0, NULL); -- - ssl_ctx = SSL_CTX_new(TLS_client_method()); - #endif - - -From 108c31c9b170da2ee34a25fd373d21837d4d10a3 Mon Sep 17 00:00:00 2001 -From: Arjen de Korte -Date: Sun, 24 Feb 2019 18:37:42 +0100 -Subject: [PATCH 7/7] Update netssl.c - ---- - server/netssl.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/server/netssl.c b/server/netssl.c -index 6ae13e8d3..cf9419edf 100644 ---- a/server/netssl.c -+++ b/server/netssl.c -@@ -381,15 +381,12 @@ void ssl_init(void) - - #ifdef WITH_OPENSSL - -- SSL_load_error_strings(); -- - #if OPENSSL_VERSION_NUMBER < 0x10100000L -+ SSL_load_error_strings(); - SSL_library_init(); - - ssl_ctx = SSL_CTX_new(SSLv23_server_method()); - #else -- OPENSSL_init_ssl(0, NULL); -- - ssl_ctx = SSL_CTX_new(TLS_server_method()); - #endif - diff --git a/sys-power/nut/nut-2.7.4-r1.ebuild b/sys-power/nut/nut-2.7.4-r1.ebuild deleted file mode 100644 index 48deb79389f8..000000000000 --- a/sys-power/nut/nut-2.7.4-r1.ebuild +++ /dev/null @@ -1,268 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs - -MY_P=${P/_/-} - -DESCRIPTION="Network-UPS Tools" -HOMEPAGE="http://www.networkupstools.org/" -# Nut mirrors are presently broken -SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz - http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 arm ppc ppc64 x86" - -IUSE="cgi ipmi snmp +usb selinux ssl tcpd xml zeroconf" -CDEPEND=" - cgi? ( >=media-libs/gd-2[png] ) - snmp? ( net-analyzer/net-snmp ) - usb? ( virtual/libusb:0 ) - ssl? ( >=dev-libs/openssl-1:= ) - tcpd? ( sys-apps/tcp-wrappers ) - xml? ( >=net-libs/neon-0.25.0 ) - ipmi? ( sys-libs/freeipmi ) - zeroconf? ( net-dns/avahi ) - dev-libs/libltdl - net-libs/libnsl - virtual/udev" -DEPEND="$CDEPEND - >=sys-apps/sed-4 - virtual/pkgconfig" -RDEPEND="${CDEPEND} - 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}" - -pkg_setup() { - enewgroup nut 84 - enewuser nut 84 -1 /var/lib/nut nut,uucp - # As of udev-104, NUT must be in uucp and NOT in tty. - gpasswd -d nut tty 2>/dev/null - gpasswd -a nut uucp 2>/dev/null - # in some cases on old systems it wasn't in the nut group either! - gpasswd -a nut nut 2>/dev/null - warningmsg ewarn -} - -src_prepare() { - #ht_fix_file configure.in - - epatch "${FILESDIR}"/nut-2.7.2-no-libdummy.patch - epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch - epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch - - 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 -f ltmain.sh m4/lt* m4/libtool.m4 - - sed -i \ - -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \ - lib/libupsclient{.pc,-config}.in || die #361685 - - eautoreconf -} - -src_configure() { - local myconf - append-flags -fno-lto - 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 \ - --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) \ - $(systemd_with_unitdir) \ - ${myconf} -} - -src_install() { - emake DESTDIR="${D}" install - - find "${D}" -name '*.la' -exec rm -f {} + - - dodir /sbin - 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/}" - done - - dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING - - newdoc lib/README README.lib || die - newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die - - 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 - - dobashcomp "${S}"/scripts/misc/nut.bash_completion -} - -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.7.4-r2.ebuild b/sys-power/nut/nut-2.7.4-r2.ebuild deleted file mode 100644 index ad94972b18b9..000000000000 --- a/sys-power/nut/nut-2.7.4-r2.ebuild +++ /dev/null @@ -1,297 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python2_7 ) -inherit autotools bash-completion-r1 desktop fixheadtails flag-o-matic python-single-r1 systemd toolchain-funcs user - -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 ~ppc ~ppc64 ~x86" - -IUSE="cgi gui ipmi snmp +usb selinux ssl tcpd xml zeroconf" -REQUIRED_USE="gui? ( ${PYTHON_REQUIRED_USE} )" - -DEPEND=" - dev-libs/libltdl:* - net-libs/libnsl - virtual/udev - cgi? ( >=media-libs/gd-2[png] ) - gui? ( ${PYTHON_DEPS} - dev-python/pygtk[${PYTHON_USEDEP}] ) - 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=" - virtual/pkgconfig - >=sys-apps/sed-4" - -RDEPEND="${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.2-no-libdummy.patch" - "${FILESDIR}/${PN}-2.7.1-snmpusb-order.patch" - "${FILESDIR}/${PN}-2.6.2-lowspeed-buffer-size.patch" -) - -pkg_setup() { - enewgroup nut 84 - enewuser nut 84 -1 /var/lib/nut nut,uucp - # As of udev-104, NUT must be in uucp and NOT in tty. - gpasswd -d nut tty 2>/dev/null - gpasswd -a nut uucp 2>/dev/null - # in some cases on old systems it wasn't in the nut group either! - gpasswd -a nut nut 2>/dev/null - warningmsg ewarn - use gui && python-single-r1_pkg_setup -} - -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 - - use gui && eapply "${FILESDIR}"/NUT-Monitor-1.3-paths.patch - - eautoreconf -} - -src_configure() { - local myconf - append-flags -fno-lto - 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 - 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 - - if use gui; then - python_fix_shebang scripts/python/app - python_domodule scripts/python/module/PyNUT.py - python_doscript scripts/python/app/NUT-Monitor - - insinto /usr/share/nut - doins scripts/python/app/gui-1.3.glade - - dodir /usr/share/nut/pixmaps - insinto /usr/share/nut/pixmaps - doins scripts/python/app/pixmaps/* - - sed -i -e 's/nut-monitor.png/nut-monitor/' -e 's/Application;//' \ - scripts/python/app/${PN}-monitor.desktop || die - - doicon scripts/python/app/${PN}-monitor.png - domenu scripts/python/app/${PN}-monitor.desktop - 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.7.4-r3.ebuild b/sys-power/nut/nut-2.7.4-r3.ebuild index 245adf5452f6..0e0b748bd5e8 100644 --- a/sys-power/nut/nut-2.7.4-r3.ebuild +++ b/sys-power/nut/nut-2.7.4-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -15,7 +15,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 arm ppc ppc64 x86" -IUSE="cgi gui ipmi snmp +usb selinux ssl tcpd xml zeroconf" +IUSE="cgi gui ipmi snmp +usb selinux split-usr ssl tcpd xml zeroconf" REQUIRED_USE="gui? ( ${PYTHON_REQUIRED_USE} )" DEPEND=" @@ -34,8 +34,7 @@ DEPEND=" zeroconf? ( net-dns/avahi )" BDEPEND=" - virtual/pkgconfig - >=sys-apps/sed-4" + virtual/pkgconfig" RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-nut )" @@ -80,10 +79,10 @@ NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" PATCHES=( - "${FILESDIR}/${PN}-2.7.2-no-libdummy.patch" - "${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}"/${PN}-2.7.2-no-libdummy.patch + "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch + "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch + "${FILESDIR}"/nut-openssl-1.1-support.patch ) pkg_setup() { @@ -169,7 +168,7 @@ src_install() { find "${D}" -name '*.la' -delete || die dodir /sbin - dosym ../usr/sbin/upsdrvctl /sbin/upsdrvctl + use split-usr && dosym ../usr/sbin/upsdrvctl /sbin/upsdrvctl if use cgi; then elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." -- cgit v1.2.3