summaryrefslogtreecommitdiff
path: root/sys-power
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-11-03 08:36:22 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-11-03 08:36:22 +0000
commitf65628136faa35d0c4d3b5e7332275c7b35fcd96 (patch)
tree021998302365c5652e37824b6c26d4d969a62055 /sys-power
parent70b82ae359a5538711e103b0e8dfb92654296644 (diff)
gentoo resync : 03.11.2018
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/Manifest.gzbin5218 -> 5215 bytes
-rw-r--r--sys-power/nut/Manifest21
-rw-r--r--sys-power/nut/files/NUT-Monitor-1.3-paths.patch48
-rw-r--r--sys-power/nut/files/nut-2.4.1-no-libdummy.patch18
-rw-r--r--sys-power/nut/files/nut-2.6.2-lowspeed-buffer-size.patch6
-rw-r--r--sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch21
-rw-r--r--sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch448
-rw-r--r--sys-power/nut/files/nut-2.7.1-fix-scanning.patch72
-rw-r--r--sys-power/nut/files/nut-2.7.2-no-libdummy.patch (renamed from sys-power/nut/files/nut-2.7.2/nut-2.7.2-no-libdummy.patch)0
-rw-r--r--sys-power/nut/metadata.xml1
-rw-r--r--sys-power/nut/nut-2.6.5-r1.ebuild231
-rw-r--r--sys-power/nut/nut-2.7.2-r2.ebuild274
-rw-r--r--sys-power/nut/nut-2.7.3.ebuild269
-rw-r--r--sys-power/nut/nut-2.7.4-r1.ebuild7
-rw-r--r--sys-power/nut/nut-2.7.4-r2.ebuild (renamed from sys-power/nut/nut-2.7.4.ebuild)122
-rw-r--r--sys-power/upower/Manifest2
-rw-r--r--sys-power/upower/upower-0.99.8-r1.ebuild2
17 files changed, 136 insertions, 1406 deletions
diff --git a/sys-power/Manifest.gz b/sys-power/Manifest.gz
index 964ccf3d07ac..de465e3b0215 100644
--- a/sys-power/Manifest.gz
+++ b/sys-power/Manifest.gz
Binary files differ
diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest
index 84b6a952192e..d5f7d7a800dd 100644
--- a/sys-power/nut/Manifest
+++ b/sys-power/nut/Manifest
@@ -1,23 +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.4.1-no-libdummy.patch 791 BLAKE2B 70af3acc0d778c343a6dbb8cbe1a6757e2bfb09e06d0be79298c1fb121616cfc88df164c85cfe9e16d2552b45a895d04b36541e9b57cbdad0d5aa5af87b87ba1 SHA512 7dff9d2601fb400bc27fd49b18a2b5b4a8e8ab33af84c4a78b7091ac929eb3dc53550aaa88bd2eb5227c13b0e191dda137f5ddd71606748652505f89d540b84a
-AUX nut-2.6.2-lowspeed-buffer-size.patch 534 BLAKE2B 2d4ec621f091186473721f488737feebdc6a4b40d710e1a55ad8ce03f6d974e94b309a5ebfc4dd66617f507cbb1c39efa44a803427e8956fb6086e41be709895 SHA512 783a754871b55b40d745161c71bca851b5c6c8a72622d0b9ce17ef523e243ed41ff7bfbac33f19d8732b7a361b494fbf9f21669bac3816fe5f71a583e882a385
-AUX nut-2.6.3-CVE-2012-2944.patch 736 BLAKE2B 7f1add529a9f9af075d487f29f8fc68e55df282962c273cc044a55ebb33f75df2fee499bb2217e9893a7ef6d6e6e09b3cb214a51c685417623f5d761547252f5 SHA512 00ff1cfd5fd60cf671df45f28da0adbfba2d9c2e48f05481abaff70d4a442196e75b8becc8d787cbd6710e7d5df3e09f1894a40cf70e4a1d3f41f32afefdfd3b
-AUX nut-2.6.5-freeipmi_fru.patch 17326 BLAKE2B 631902a8301395087171d3c29f3332335c3a9bc28ffcda6ddf023af0793493d81811718fb651dcd6aece515427b9c846078b3e174862c3b3b380509ff61fee29 SHA512 d24fb32a47585ef55aa2e8e4a301c9f5c6af6182d7c106965b7071b2a34a33c9805c63e43907fb77972c122391d22ee5eda9e8f9000eda6b7ad972415b254820
+AUX nut-2.6.2-lowspeed-buffer-size.patch 519 BLAKE2B 916879ef2ddeb236a16e8f9a5ca0dcf13c611e5f64cd572f50f8a74a502a4882e0092a22f3b76bd0a9adc9cf61c907c71a3951241f6220fd3b58b8d54fcb3eb2 SHA512 396dd55fb5ff7a90deed86bd091fa6924c713ce51cb3b0972bc0f72ebcd7efdcea6698d16e675bfb121218160a0d370c13e353c381d85d61e0fad05e247ca625
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-fix-scanning.patch 2311 BLAKE2B 82e3da5146d31c2d6531de83822bd40f72d049b4d4d4a00c9f0e2eef5b60f715ae784bae941159f2293702fb52cb43cdf6990c9b4315b50002be27310190ecca SHA512 9695b77af0e2bfbec62f6b2686c6d2c65211a369d671907fcb191e0da7d9765f50587cf193a4fc0fbd12c6d8f4d5beb900dc4bb8dc04133bb1b01f078561de50
AUX nut-2.7.1-snmpusb-order.patch 1417 BLAKE2B 20c3150559d3810c8bf15a9560ccf950ad1bb26bd58b4f2bcf3736871f4599bc3ad948e5f008b1549184f78d0fa3b417bbc8728660fbb110f4537fce83231bad SHA512 df3701821bc4ef45a5089e4d4439c3367fb23cefce7d06168bd422a8c32a1b373ae9fb3456bd5f90a51a672edf9ce29254a08c2045efe210a11b82399793ec19
-AUX nut-2.7.2/nut-2.7.2-no-libdummy.patch 535 BLAKE2B f18f65ca92e834b5e085358a09c7363cf156b4a156c6c99d4f7cc34a17d25cf1518f342c072791eb37db613a6dafc32aeed364b88063c4d92d20e21e34a5d807 SHA512 a402a70a4cfc922d31203560627ace87f82795aef072d333cb1bfb91a6b67fbc10769e5d68a8d2741ca512b81b5754e9141b68dcb197dbe558ed5556e2de37a1
+AUX nut-2.7.2-no-libdummy.patch 535 BLAKE2B f18f65ca92e834b5e085358a09c7363cf156b4a156c6c99d4f7cc34a17d25cf1518f342c072791eb37db613a6dafc32aeed364b88063c4d92d20e21e34a5d807 SHA512 a402a70a4cfc922d31203560627ace87f82795aef072d333cb1bfb91a6b67fbc10769e5d68a8d2741ca512b81b5754e9141b68dcb197dbe558ed5556e2de37a1
AUX nut.powerfail.initd 1306 BLAKE2B 9e9c6eb40c6a313ad625136523de730a75b811841331ae5f7dd42b71b65f591c4ab5b8da6e954ceab42da89f4a20e8655cae57354aec6ab796cec80f60ebb419 SHA512 b9aaab526d0996b36a7a6d76a3ee63c1452b0a1bed358e23f6f7f5534e0da7751281428091efc7dba2004706996850ec18318809fdacb94cd8d73ea22bda52ee
-DIST nut-2.6.5.tar.gz 2038832 BLAKE2B 8d3c4be46809030bc98bbfd662c61ca71434b89d49455b17f226ba0902f9f240914bc276af1e809a55a0165b40e74a73dbf2df84696219a50dac8e65d35a4a8e SHA512 f1c76e6280057dc558d53451e7de2bdc7f37a0f175b1c52c27e7dcb83deeb78f6885007ad188a7a3a19e411eba87e03eb2246310bd7a5a5bb6fa3ad2bebd49d8
-DIST nut-2.7.2.tar.gz 2223307 BLAKE2B be19cefecab3f9324251f8b52dbb3c3ec94a05e2458f037baac07b648d8eee46fd84fb8fd1cba3ff26c0aa702cfc5582135f69a5e8a33e181cce7a08e61416f3 SHA512 7d6b44e8f2d03544d9825274f4f3039911e335eb51620ded3dc08d51aeb096281c2ec848831815c54eecd4f2a25bdb1e6e5f479422e5291f03c3055da7ba52e6
-DIST nut-2.7.3.tar.gz 2317478 BLAKE2B 1a795e1c545894e14c5b0d3ac49a82d399af1c3e82cda60d74f855609dcc71f4970c087be5759ee5d25e6c756b6dd2b4a8d80ee28c0f84feb358a1df08648dab SHA512 3dd978712dc0fabe7e194dbf6d7bb442c456aa4d45bfc63ede8a3acae23c66811cbcf2705b55a6739129b5f120e6f5865bcb9d19eb9080507a85e2624d5663d6
DIST nut-2.7.4.tar.gz 2509831 BLAKE2B 367c687efd739150898a14c700d5fddbe22bf926522923e1842011ec49b67d6638620500c4eda50291feb474cc6eef39fff63764cb3e0fad5898abee981f8308 SHA512 320c4aff85d8a370c5eff77d33924fdfc3caf6a250620693cdd5bf3336b3a80d8a207488eee841bcf8b72fbad68fda4c074e63b99c56e7886716fc934122d11a
-EBUILD nut-2.6.5-r1.ebuild 7233 BLAKE2B 6f3faa9fbdebcd82f778c4f025566b36cb400ca5b3b4fa8e567bd9280fe11d44e08057987264fbbd72eea68f306dd41063deb8b3374187a9397d32ac29d29518 SHA512 fc7ef6a8c701374a1e98fb61b2064bddbfb0b9195d7d54ba9a408d76c862b207d0f72f03fd1775e84c3a41ac513a780e0a97420c813b98e541842e55712203ef
-EBUILD nut-2.7.2-r2.ebuild 9349 BLAKE2B 08ce8ef7adca39dab86e2f75e21a408700dab50719d6749f8dd06ec4424ad2f3686fe4f1e248c41cd2e3fd9a70037b145b67fe63bf8882b33f81b205cd991caf SHA512 143239b51ff5db0c74b6ee7bb619c9c5c96b9c5bfa2a7883e8d004dbc5fb302462c9304f3131650b7d06fa7a10317881feba15f6279299f963a6e99d6ec81d10
-EBUILD nut-2.7.3.ebuild 9138 BLAKE2B 12c7ff977c3d28b42b42071efbf5f452a25033ce0b246564cd9ca58fae88c115bfdc6690fe1d05a8ac2487e5635cf7dcf80371b7ad6351e234a3768ca34d30cf SHA512 3123230597b9fd6ddaf25094409a20628adfb7c2ce704e32a7f082e137c3da37e28009f81d90983f759ea741eadd5672166dff7661cb432ad6ecf26303a3c4ea
-EBUILD nut-2.7.4-r1.ebuild 9157 BLAKE2B 8e3c1fdb0ed7a34910e9858a914e7c43a3dfece82fa81c8af91f1fb049565361e35ae6ae93ca275ec18a60767d0b4c6427663fe7ede4c73bcce12dfd877aa3c6 SHA512 01c414e4089bd2330303f6d0f6f6d849af7c930dae82d08e52ce6f092b1bc4a6d1dd924d739ce5011e146f7c2a3e02885ce46e9f821f66f14c54e10b1304a1e3
-EBUILD nut-2.7.4.ebuild 9144 BLAKE2B 844ee3f8c0e8195a0f7b376c7d4df34de6afdcef910bca724ec0859e8586a913750cd2cf329a78b0daed1886bd5c6881a97d33ef2e0c3827cee91b84f0d44474 SHA512 21c6738218cf0160693a3459b9ae62becc6119a9b0cb87bd21eb46094b2feb135bda479acefe250abd6dfc79faa2508101e1113c86fa6ef66ce8d522d26ee924
-MISC metadata.xml 5121 BLAKE2B 480860ed22af0a86686b53a9a901e19564a6dfcb0f7f600fede42366fb10de29a53a13a5b57d70acd7f2d2af6d9887f76bb89bdbf85a54ca00075556aecce926 SHA512 3cbce8da4c3117afd38fe28f7050a82552222a120e69a22b3ed1754bd6e71091b4bb45c6232fb2767f884afc24f5cdfcd9b0c59a8d8bccaf68b12e7fb08aee80
+EBUILD nut-2.7.4-r1.ebuild 8981 BLAKE2B 1b7cea654736fc61445370d2fed43e94816676fc2907ed49ebb066321860e2346c1afabaa3947441e03a18946ecaf13440696c5c3ccea3ac5329143f6e870053 SHA512 3c651aeef4926b8430f280a7c3fd0d64247928d125d46a540717ebacbb90d662908b0c5d33ef62725d50a07d03fc53046c355bc5fc3303bc871e08957f6b7c1d
+EBUILD nut-2.7.4-r2.ebuild 9694 BLAKE2B e1c00afe6bdca99f4772f9944e1d2c2f514a5b7a5b614699770abf31ad9f6494ab45719c0a45ced2cf849b5716b9e3653fd6579dee30be3394b9a46c8be77c74 SHA512 e13bc6073361a4d9603ef4f79f56c32c1c88b5cd51f02b80fde96e4dae0645269441e471e101f938a0ad3ed1cb26c752ceb460f79051e6eb1c29b5d002b87b5c
+MISC metadata.xml 5178 BLAKE2B 4fd7fd1ac52507faf24113bd583784bb1c14b37e6b68cd9b670580262e05d82992cb87ce3d5b9573ffed35ada17fe0399cc1437ad503b7c1d49cd781be01bad9 SHA512 d94f262b166977866e94b7a81b8c625fc78bbd0861ef04de4dc8124773c5f2374999d9cdbc1c82b7fa258548b6b2d9a5f4db1647cf3e106a09ce7049f510b3b0
diff --git a/sys-power/nut/files/NUT-Monitor-1.3-paths.patch b/sys-power/nut/files/NUT-Monitor-1.3-paths.patch
new file mode 100644
index 000000000000..17bedaead727
--- /dev/null
+++ b/sys-power/nut/files/NUT-Monitor-1.3-paths.patch
@@ -0,0 +1,48 @@
+--- a/scripts/python/app/NUT-Monitor
++++ b/scripts/python/app/NUT-Monitor
+@@ -70,7 +70,7 @@
+ ( cmd_opts, args ) = opt_parser.parse_args()
+
+
+- self.__glade_file = os.path.join( os.path.dirname( sys.argv[0] ), "gui-1.3.glade" )
++ self.__glade_file = '/usr/share/nut/gui-1.3.glade'
+
+ self.__widgets["interface"] = gtk.glade.XML( self.__glade_file, "window1", APP )
+ self.__widgets["main_window"] = self.__widgets["interface"].get_widget("window1")
+@@ -103,11 +103,11 @@
+
+ # Create the tray icon and connect it to the show/hide method...
+ self.__widgets["status_icon"] = gtk.StatusIcon()
+- self.__widgets["status_icon"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "on_line.png" ) )
++ self.__widgets["status_icon"].set_from_file( "/usr/share/nut/pixmaps/on_line.png" )
+ self.__widgets["status_icon"].set_visible( True )
+ self.__widgets["status_icon"].connect( "activate", self.tray_activated )
+
+- self.__widgets["ups_status_image"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "on_line.png" ) )
++ self.__widgets["ups_status_image"].set_from_file( "/usr/share/nut/pixmaps/on_line.png" )
+
+ # Define interface callbacks actions
+ self.__callbacks = { "on_window1_destroy" : self.quit,
+@@ -265,8 +265,8 @@
+ #-------------------------------------------------------------------
+ # Change the status icon and tray icon
+ def change_status_icon( self, icon="on_line", blink=False ) :
+- self.__widgets["status_icon"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "%s.png" % icon ) )
+- self.__widgets["ups_status_image"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "%s.png" % icon ) )
++ self.__widgets["status_icon"].set_from_file( "/usr/share/nut/pixmaps/%s.png" % icon )
++ self.__widgets["ups_status_image"].set_from_file( "/usr/share/nut/pixmaps/%s.png" % icon )
+ self.__widgets["status_icon"].set_blinking( blink )
+
+ #-------------------------------------------------------------------
+@@ -719,9 +719,9 @@
+
+ for k,v in vars.iteritems() :
+ if ( rwvars.has_key( k ) ) :
+- icon_file = os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "var-rw.png" )
++ icon_file = "/usr/share/nut/pixmaps/var-rw.png"
+ else :
+- icon_file = os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "var-ro.png" )
++ icon_file = "/usr/share/nut/pixmaps/var-ro.png"
+
+ icon = gtk.gdk.pixbuf_new_from_file( icon_file )
+ self.__widgets["ups_vars_tree_store"].append( [ icon, k, v ] )
diff --git a/sys-power/nut/files/nut-2.4.1-no-libdummy.patch b/sys-power/nut/files/nut-2.4.1-no-libdummy.patch
deleted file mode 100644
index 31a8e73e54f1..000000000000
--- a/sys-power/nut/files/nut-2.4.1-no-libdummy.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -Nuar nut-2.4.1.orig/drivers/Makefile.am nut-2.4.1/drivers/Makefile.am
---- nut-2.4.1.orig/drivers/Makefile.am 2008-07-04 20:12:38.201211819 -0700
-+++ nut-2.4.1/drivers/Makefile.am 2008-07-04 20:12:59.829462787 -0700
-@@ -211,10 +211,12 @@
- upscode2.h victronups.h powerpanel.h powerp-bin.h powerp-txt.h \
- upshandler.h netxml-ups.h mge-xml.h
-
-+EXTRA_LIBRARIES =
-+
- # 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_LIBRARIES += libdummy.a
-+#libdummy_a_SOURCES = main.c dstate.c serial.c
-
- # the nuthalmain library combines the code for main-hal.c and
- # dstate-hal.c. It is necessary for Automake-technical reasons,
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 9806d07e53ba..1e6617316fb9 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
@@ -3,10 +3,10 @@ http://boxster.ghz.cc/projects/nut/changeset/2407
Respun from nut-2.4.3-lowspeed-buffer-size.patch
-Index: /trunk/drivers/libhid.c
+Index: a/drivers/libhid.c
===================================================================
---- /trunk/drivers/libhid.c (revision 2336)
-+++ /trunk/drivers/libhid.c (revision 2407)
+--- a/drivers/libhid.c (revision 2336)
++++ a/drivers/libhid.c (revision 2407)
@@ -142,5 +142,5 @@
int id = pData->ReportID;
int r;
diff --git a/sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch b/sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch
deleted file mode 100644
index 9debd3b9da3f..000000000000
--- a/sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Origin: http://trac.networkupstools.org/projects/nut/changeset/3633
-Description: Fix CVE-2012-2944: upsd can be remotely crashed
-
-Index: nut-2.6.3/common/parseconf.c
-===================================================================
---- nut-2.6.3.orig/common/parseconf.c 2011-10-04 02:06:25.000000000 -0500
-+++ nut-2.6.3/common/parseconf.c 2012-05-30 13:29:41.000000000 -0500
-@@ -171,6 +171,13 @@
-
- wbuflen = strlen(ctx->wordbuf);
-
-+ /* CVE-2012-2944: only allow the subset Ascii charset from Space to ~ */
-+ if ((ctx->ch < 0x20) || (ctx->ch > 0x7f)) {
-+ fprintf(stderr, "addchar: discarding invalid character (0x%02x)!\n",
-+ ctx->ch);
-+ return;
-+ }
-+
- if (ctx->wordlen_limit != 0) {
- if (wbuflen >= ctx->wordlen_limit) {
-
diff --git a/sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch b/sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch
deleted file mode 100644
index 96ac91d0a48c..000000000000
--- a/sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch
+++ /dev/null
@@ -1,448 +0,0 @@
-Update to 1.2.x ipmi_fru declarations.
-
-Starting with the 1.2.1 release, all of the ipmi_fru_parse* declarations (both
-lowercase & uppercase) were renamed to ipmi_fru*. This is a simple search &
-replace of all instances. Upstream should probably have a backwards compatible
-version that supports both variants of the names.
-
-Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-
-diff -Nuar nut-2.6.5.orig/drivers/nut-libfreeipmi.c nut-2.6.5/drivers/nut-libfreeipmi.c
---- nut-2.6.5.orig/drivers/nut-libfreeipmi.c 2012-07-31 17:38:59.000000000 +0000
-+++ nut-2.6.5/drivers/nut-libfreeipmi.c 2013-08-12 17:55:03.132363518 +0000
-@@ -57,7 +57,7 @@
-
- /* FreeIPMI contexts and configuration*/
- ipmi_ctx_t ipmi_ctx = NULL;
--ipmi_fru_parse_ctx_t fru_parse_ctx = NULL;
-+ipmi_fru_ctx_t fru_parse_ctx = NULL;
- ipmi_monitoring_ctx_t mon_ctx = NULL;
- struct ipmi_monitoring_ipmi_config ipmi_config;
- /* SDR management API has changed with 1.1.X and later */
-@@ -78,7 +78,7 @@
-
- /* Support functions */
- static const char* libfreeipmi_getfield (uint8_t language_code,
-- ipmi_fru_parse_field_t *field);
-+ ipmi_fru_field_t *field);
-
- static void libfreeipmi_cleanup();
-
-@@ -97,7 +97,7 @@
- int nut_ipmi_open(int ipmi_id, IPMIDevice_t *ipmi_dev)
- {
- int ret = -1;
-- uint8_t areabuf[IPMI_FRU_PARSE_AREA_SIZE_MAX+1];
-+ uint8_t areabuf[IPMI_FRU_AREA_SIZE_MAX+1];
- unsigned int area_type = 0;
- unsigned int area_length = 0;
-
-@@ -134,26 +134,26 @@
- upsdebugx(1, "FreeIPMI initialized...");
-
- /* Parse FRU information */
-- if (!(fru_parse_ctx = ipmi_fru_parse_ctx_create (ipmi_ctx)))
-+ if (!(fru_parse_ctx = ipmi_fru_ctx_create (ipmi_ctx)))
- {
- libfreeipmi_cleanup();
-- fatal_with_errno(EXIT_FAILURE, "ipmi_fru_parse_ctx_create()");
-+ fatal_with_errno(EXIT_FAILURE, "ipmi_fru_ctx_create()");
- }
-
- /* lots of motherboards calculate checksums incorrectly */
-- if (ipmi_fru_parse_ctx_set_flags (fru_parse_ctx, IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS) < 0)
-+ if (ipmi_fru_ctx_set_flags (fru_parse_ctx, IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS) < 0)
- {
- libfreeipmi_cleanup();
-- fatalx(EXIT_FAILURE, "ipmi_fru_parse_ctx_set_flags: %s\n",
-- ipmi_fru_parse_ctx_strerror (ipmi_fru_parse_ctx_errnum (fru_parse_ctx)));
-+ fatalx(EXIT_FAILURE, "ipmi_fru_ctx_set_flags: %s\n",
-+ ipmi_fru_ctx_strerror (ipmi_fru_ctx_errnum (fru_parse_ctx)));
- }
-
- /* Now open the requested (local) PSU */
-- if (ipmi_fru_parse_open_device_id (fru_parse_ctx, ipmi_id) < 0)
-+ if (ipmi_fru_open_device_id (fru_parse_ctx, ipmi_id) < 0)
- {
- libfreeipmi_cleanup();
-- fatalx(EXIT_FAILURE, "ipmi_fru_parse_open_device_id: %s\n",
-- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
-+ fatalx(EXIT_FAILURE, "ipmi_fru_open_device_id: %s\n",
-+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
- }
-
- /* Set IPMI identifier */
-@@ -164,19 +164,19 @@
- /* clear fields */
- area_type = 0;
- area_length = 0;
-- memset (areabuf, '\0', IPMI_FRU_PARSE_AREA_SIZE_MAX + 1);
-+ memset (areabuf, '\0', IPMI_FRU_AREA_SIZE_MAX + 1);
-
- /* parse FRU buffer */
-- if (ipmi_fru_parse_read_data_area (fru_parse_ctx,
-+ if (ipmi_fru_read_data_area (fru_parse_ctx,
- &area_type,
- &area_length,
- areabuf,
-- IPMI_FRU_PARSE_AREA_SIZE_MAX) < 0)
-+ IPMI_FRU_AREA_SIZE_MAX) < 0)
- {
- libfreeipmi_cleanup();
- fatal_with_errno(EXIT_FAILURE,
-- "ipmi_fru_parse_open_device_id: %s\n",
-- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
-+ "ipmi_fru_open_device_id: %s\n",
-+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
- }
-
- if (area_length)
-@@ -184,7 +184,7 @@
- switch (area_type)
- {
- /* get generic board information */
-- case IPMI_FRU_PARSE_AREA_TYPE_BOARD_INFO_AREA:
-+ case IPMI_FRU_AREA_TYPE_BOARD_INFO_AREA:
-
- if(libfreeipmi_get_board_info (areabuf, area_length,
- ipmi_dev) < 0)
-@@ -193,7 +193,7 @@
- }
- break;
- /* get specific PSU information */
-- case IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION:
-+ case IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION:
-
- if(libfreeipmi_get_psu_info (areabuf, area_length, ipmi_dev) < 0)
- {
-@@ -205,13 +205,13 @@
- break;
- }
- }
-- } while ((ret = ipmi_fru_parse_next (fru_parse_ctx)) == 1);
-+ } while ((ret = ipmi_fru_next (fru_parse_ctx)) == 1);
-
- /* check for errors */
- if (ret < 0) {
- libfreeipmi_cleanup();
-- fatal_with_errno(EXIT_FAILURE, "ipmi_fru_parse_next: %s",
-- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
-+ fatal_with_errno(EXIT_FAILURE, "ipmi_fru_next: %s",
-+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
- }
- else {
- /* Get all related sensors information */
-@@ -232,25 +232,25 @@
- }
-
- static const char* libfreeipmi_getfield (uint8_t language_code,
-- ipmi_fru_parse_field_t *field)
-+ ipmi_fru_field_t *field)
- {
-- static char strbuf[IPMI_FRU_PARSE_AREA_STRING_MAX + 1];
-- unsigned int strbuflen = IPMI_FRU_PARSE_AREA_STRING_MAX;
-+ static char strbuf[IPMI_FRU_AREA_STRING_MAX + 1];
-+ unsigned int strbuflen = IPMI_FRU_AREA_STRING_MAX;
-
- if (!field->type_length_field_length)
- return NULL;
-
-- memset (strbuf, '\0', IPMI_FRU_PARSE_AREA_STRING_MAX + 1);
-+ memset (strbuf, '\0', IPMI_FRU_AREA_STRING_MAX + 1);
-
-- if (ipmi_fru_parse_type_length_field_to_string (fru_parse_ctx,
-+ if (ipmi_fru_type_length_field_to_string (fru_parse_ctx,
- field->type_length_field,
- field->type_length_field_length,
- language_code,
- strbuf,
- &strbuflen) < 0)
- {
-- upsdebugx (2, "ipmi_fru_parse_type_length_field_to_string: %s",
-- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
-+ upsdebugx (2, "ipmi_fru_type_length_field_to_string: %s",
-+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
- return NULL;
- }
-
-@@ -280,8 +280,8 @@
- {
- /* cleanup */
- if (fru_parse_ctx) {
-- ipmi_fru_parse_close_device_id (fru_parse_ctx);
-- ipmi_fru_parse_ctx_destroy (fru_parse_ctx);
-+ ipmi_fru_close_device_id (fru_parse_ctx);
-+ ipmi_fru_ctx_destroy (fru_parse_ctx);
- }
-
- #ifdef HAVE_FREEIPMI_11X_12X
-@@ -342,7 +342,7 @@
-
- upsdebugx(1, "entering libfreeipmi_get_psu_info()");
-
-- if (ipmi_fru_parse_multirecord_power_supply_information (fru_parse_ctx,
-+ if (ipmi_fru_multirecord_power_supply_information (fru_parse_ctx,
- areabuf,
- area_length,
- &overall_capacity,
-@@ -368,8 +368,8 @@
- &total_combined_wattage,
- &predictive_fail_tachometer_lower_threshold) < 0)
- {
-- fatalx(EXIT_FAILURE, "ipmi_fru_parse_multirecord_power_supply_information: %s",
-- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
-+ fatalx(EXIT_FAILURE, "ipmi_fru_multirecord_power_supply_information: %s",
-+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
- }
-
- ipmi_dev->overall_capacity = overall_capacity;
-@@ -392,12 +392,12 @@
- {
- uint8_t language_code;
- uint32_t mfg_date_time;
-- ipmi_fru_parse_field_t board_manufacturer;
-- ipmi_fru_parse_field_t board_product_name;
-- ipmi_fru_parse_field_t board_serial_number;
-- ipmi_fru_parse_field_t board_part_number;
-- ipmi_fru_parse_field_t board_fru_file_id;
-- ipmi_fru_parse_field_t board_custom_fields[IPMI_FRU_CUSTOM_FIELDS];
-+ ipmi_fru_field_t board_manufacturer;
-+ ipmi_fru_field_t board_product_name;
-+ ipmi_fru_field_t board_serial_number;
-+ ipmi_fru_field_t board_part_number;
-+ ipmi_fru_field_t board_fru_file_id;
-+ ipmi_fru_field_t board_custom_fields[IPMI_FRU_CUSTOM_FIELDS];
- const char *string = NULL;
- time_t timetmp;
- struct tm mfg_date_time_tm;
-@@ -406,15 +406,15 @@
- upsdebugx(1, "entering libfreeipmi_get_board_info()");
-
- /* clear fields */
-- memset (&board_manufacturer, '\0', sizeof (ipmi_fru_parse_field_t));
-- memset (&board_product_name, '\0', sizeof (ipmi_fru_parse_field_t));
-- memset (&board_serial_number, '\0', sizeof (ipmi_fru_parse_field_t));
-- memset (&board_fru_file_id, '\0', sizeof (ipmi_fru_parse_field_t));
-+ memset (&board_manufacturer, '\0', sizeof (ipmi_fru_field_t));
-+ memset (&board_product_name, '\0', sizeof (ipmi_fru_field_t));
-+ memset (&board_serial_number, '\0', sizeof (ipmi_fru_field_t));
-+ memset (&board_fru_file_id, '\0', sizeof (ipmi_fru_field_t));
- memset (&board_custom_fields[0], '\0',
-- sizeof (ipmi_fru_parse_field_t) * IPMI_FRU_CUSTOM_FIELDS);
-+ sizeof (ipmi_fru_field_t) * IPMI_FRU_CUSTOM_FIELDS);
-
- /* parse FRU buffer */
-- if (ipmi_fru_parse_board_info_area (fru_parse_ctx,
-+ if (ipmi_fru_board_info_area (fru_parse_ctx,
- areabuf,
- area_length,
- &language_code,
-@@ -428,8 +428,8 @@
- IPMI_FRU_CUSTOM_FIELDS) < 0)
- {
- libfreeipmi_cleanup();
-- fatalx(EXIT_FAILURE, "ipmi_fru_parse_board_info_area: %s",
-- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
-+ fatalx(EXIT_FAILURE, "ipmi_fru_board_info_area: %s",
-+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
- }
-
-
-diff -Nuar nut-2.6.5.orig/m4/nut_check_libfreeipmi.m4 nut-2.6.5/m4/nut_check_libfreeipmi.m4
---- nut-2.6.5.orig/m4/nut_check_libfreeipmi.m4 2012-07-31 17:38:56.000000000 +0000
-+++ nut-2.6.5/m4/nut_check_libfreeipmi.m4 2013-08-12 17:55:03.132363518 +0000
-@@ -66,7 +66,7 @@
- dnl when version cannot be tested (prior to 1.0.5, with no pkg-config)
- dnl we have to check for some specific functions
- AC_SEARCH_LIBS([ipmi_ctx_find_inband], [freeipmi], [], [nut_have_freeipmi=no])
-- AC_SEARCH_LIBS([ipmi_fru_parse_ctx_create], [freeipmi], [], [nut_have_freeipmi=no])
-+ AC_SEARCH_LIBS([ipmi_fru_ctx_create], [freeipmi], [], [nut_have_freeipmi=no])
-
- AC_SEARCH_LIBS([ipmi_monitoring_init], [ipmimonitoring], [nut_have_freeipmi_monitoring=yes], [nut_have_freeipmi_monitoring=no])
- AC_SEARCH_LIBS([ipmi_monitoring_sensor_read_record_id], [ipmimonitoring], [], [nut_have_freeipmi_monitoring=no])
-diff -Nuar nut-2.6.5.orig/tools/nut-scanner/scan_ipmi.c nut-2.6.5/tools/nut-scanner/scan_ipmi.c
---- nut-2.6.5.orig/tools/nut-scanner/scan_ipmi.c 2012-07-31 17:38:58.000000000 +0000
-+++ nut-2.6.5/tools/nut-scanner/scan_ipmi.c 2013-08-12 17:55:03.132363518 +0000
-@@ -34,24 +34,24 @@
- static lt_dlhandle dl_handle = NULL;
- static const char *dl_error = NULL;
-
--static int (*nut_ipmi_fru_parse_close_device_id) (ipmi_fru_parse_ctx_t ctx);
--static void (*nut_ipmi_fru_parse_ctx_destroy) (ipmi_fru_parse_ctx_t ctx);
-+static int (*nut_ipmi_fru_close_device_id) (ipmi_fru_ctx_t ctx);
-+static void (*nut_ipmi_fru_ctx_destroy) (ipmi_fru_ctx_t ctx);
- #ifdef HAVE_FREEIPMI_11X_12X
- static void (*nut_ipmi_sdr_ctx_destroy) (ipmi_sdr_ctx_t ctx);
- #else /* HAVE_FREEIPMI_11X_12X */
- static void (*nut_ipmi_sdr_cache_ctx_destroy) (ipmi_sdr_cache_ctx_t ctx);
- static void (*nut_ipmi_sdr_parse_ctx_destroy) (ipmi_sdr_parse_ctx_t ctx);
- #endif /* HAVE_FREEIPMI_11X_12X */
--static ipmi_fru_parse_ctx_t (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx_t ipmi_ctx);
--static int (*nut_ipmi_fru_parse_ctx_set_flags) (ipmi_fru_parse_ctx_t ctx, unsigned int flags);
--static int (*nut_ipmi_fru_parse_open_device_id) (ipmi_fru_parse_ctx_t ctx, uint8_t fru_device_id);
--static char * (*nut_ipmi_fru_parse_ctx_errormsg) (ipmi_fru_parse_ctx_t ctx);
--static int (*nut_ipmi_fru_parse_read_data_area) (ipmi_fru_parse_ctx_t ctx,
-+static ipmi_fru_ctx_t (*nut_ipmi_fru_ctx_create) (ipmi_ctx_t ipmi_ctx);
-+static int (*nut_ipmi_fru_ctx_set_flags) (ipmi_fru_ctx_t ctx, unsigned int flags);
-+static int (*nut_ipmi_fru_open_device_id) (ipmi_fru_ctx_t ctx, uint8_t fru_device_id);
-+static char * (*nut_ipmi_fru_ctx_errormsg) (ipmi_fru_ctx_t ctx);
-+static int (*nut_ipmi_fru_read_data_area) (ipmi_fru_ctx_t ctx,
- unsigned int *area_type,
- unsigned int *area_length,
- void *areabuf,
- unsigned int areabuflen);
--static int (*nut_ipmi_fru_parse_next) (ipmi_fru_parse_ctx_t ctx);
-+static int (*nut_ipmi_fru_next) (ipmi_fru_ctx_t ctx);
- static ipmi_ctx_t (*nut_ipmi_ctx_create) (void);
- static int (*nut_ipmi_ctx_find_inband) (ipmi_ctx_t ctx,
- ipmi_driver_type_t *driver_type,
-@@ -92,12 +92,12 @@
- /* Clear any existing error */
- lt_dlerror();
-
-- *(void **) (&nut_ipmi_fru_parse_close_device_id) = lt_dlsym(dl_handle, "ipmi_fru_parse_close_device_id");
-+ *(void **) (&nut_ipmi_fru_close_device_id) = lt_dlsym(dl_handle, "ipmi_fru_close_device_id");
- if ((dl_error = lt_dlerror()) != NULL) {
- goto err;
- }
-
-- *(void **) (&nut_ipmi_fru_parse_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_destroy");
-+ *(void **) (&nut_ipmi_fru_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_fru_ctx_destroy");
- if ((dl_error = lt_dlerror()) != NULL) {
- goto err;
- }
-@@ -122,32 +122,32 @@
- }
- #endif /* HAVE_FREEIPMI_11X_12X */
-
-- *(void **) (&nut_ipmi_fru_parse_ctx_create) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_create");
-+ *(void **) (&nut_ipmi_fru_ctx_create) = lt_dlsym(dl_handle, "ipmi_fru_ctx_create");
- if ((dl_error = lt_dlerror()) != NULL) {
- goto err;
- }
-
-- *(void **) (&nut_ipmi_fru_parse_ctx_set_flags) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_set_flags");
-+ *(void **) (&nut_ipmi_fru_ctx_set_flags) = lt_dlsym(dl_handle, "ipmi_fru_ctx_set_flags");
- if ((dl_error = lt_dlerror()) != NULL) {
- goto err;
- }
-
-- *(void **) (&nut_ipmi_fru_parse_open_device_id) = lt_dlsym(dl_handle, "ipmi_fru_parse_open_device_id");
-+ *(void **) (&nut_ipmi_fru_open_device_id) = lt_dlsym(dl_handle, "ipmi_fru_open_device_id");
- if ((dl_error = lt_dlerror()) != NULL) {
- goto err;
- }
-
-- *(void **) (&nut_ipmi_fru_parse_ctx_errormsg) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_errormsg");
-+ *(void **) (&nut_ipmi_fru_ctx_errormsg) = lt_dlsym(dl_handle, "ipmi_fru_ctx_errormsg");
- if ((dl_error = lt_dlerror()) != NULL) {
- goto err;
- }
-
-- *(void **) (&nut_ipmi_fru_parse_read_data_area) = lt_dlsym(dl_handle, "ipmi_fru_parse_read_data_area");
-+ *(void **) (&nut_ipmi_fru_read_data_area) = lt_dlsym(dl_handle, "ipmi_fru_read_data_area");
- if ((dl_error = lt_dlerror()) != NULL) {
- goto err;
- }
-
-- *(void **) (&nut_ipmi_fru_parse_next) = lt_dlsym(dl_handle, "ipmi_fru_parse_next");
-+ *(void **) (&nut_ipmi_fru_next) = lt_dlsym(dl_handle, "ipmi_fru_next");
- if ((dl_error = lt_dlerror()) != NULL) {
- goto err;
- }
-@@ -188,17 +188,17 @@
-
- /* Cleanup IPMI contexts */
- #ifdef HAVE_FREEIPMI_11X_12X
--static void nut_freeipmi_cleanup(ipmi_fru_parse_ctx_t fru_parse_ctx,
-+static void nut_freeipmi_cleanup(ipmi_fru_ctx_t fru_parse_ctx,
- ipmi_sdr_ctx_t sdr_ctx)
- #else /* HAVE_FREEIPMI_11X_12X */
--static void nut_freeipmi_cleanup(ipmi_fru_parse_ctx_t fru_parse_ctx,
-+static void nut_freeipmi_cleanup(ipmi_fru_ctx_t fru_parse_ctx,
- ipmi_sdr_cache_ctx_t sdr_cache_ctx,
- ipmi_sdr_parse_ctx_t sdr_parse_ctx)
- #endif /* HAVE_FREEIPMI_11X_12X */
- {
- if (fru_parse_ctx) {
-- (*nut_ipmi_fru_parse_close_device_id) (fru_parse_ctx);
-- (*nut_ipmi_fru_parse_ctx_destroy) (fru_parse_ctx);
-+ (*nut_ipmi_fru_close_device_id) (fru_parse_ctx);
-+ (*nut_ipmi_fru_ctx_destroy) (fru_parse_ctx);
- }
-
- #ifdef HAVE_FREEIPMI_11X_12X
-@@ -226,8 +226,8 @@
- int ret = -1;
- unsigned int area_type = 0;
- unsigned int area_length = 0;
-- uint8_t areabuf[IPMI_FRU_PARSE_AREA_SIZE_MAX+1];
-- ipmi_fru_parse_ctx_t fru_parse_ctx = NULL;
-+ uint8_t areabuf[IPMI_FRU_AREA_SIZE_MAX+1];
-+ ipmi_fru_ctx_t fru_parse_ctx = NULL;
- #ifdef HAVE_FREEIPMI_11X_12X
- ipmi_sdr_ctx_t sdr_ctx = NULL;
- #else /* HAVE_FREEIPMI_11X_12X */
-@@ -236,14 +236,14 @@
- #endif /* HAVE_FREEIPMI_11X_12X */
-
- /* Parse FRU information */
-- if (!(fru_parse_ctx = (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx)))
-+ if (!(fru_parse_ctx = (*nut_ipmi_fru_ctx_create) (ipmi_ctx)))
- {
-- fprintf(stderr, "ipmi_fru_parse_ctx_create()\n");
-+ fprintf(stderr, "ipmi_fru_ctx_create()\n");
- return 0;
- }
-
- /* lots of motherboards calculate checksums incorrectly */
-- if ((*nut_ipmi_fru_parse_ctx_set_flags) (fru_parse_ctx, IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS) < 0)
-+ if ((*nut_ipmi_fru_ctx_set_flags) (fru_parse_ctx, IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS) < 0)
- {
- #ifdef HAVE_FREEIPMI_11X_12X
- nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx);
-@@ -253,7 +253,7 @@
- return 0;
- }
-
-- if ((*nut_ipmi_fru_parse_open_device_id) (fru_parse_ctx, ipmi_id) < 0)
-+ if ((*nut_ipmi_fru_open_device_id) (fru_parse_ctx, ipmi_id) < 0)
- {
- #ifdef HAVE_FREEIPMI_11X_12X
- nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx);
-@@ -268,14 +268,14 @@
- /* clear fields */
- area_type = 0;
- area_length = 0;
-- memset (areabuf, '\0', IPMI_FRU_PARSE_AREA_SIZE_MAX + 1);
-+ memset (areabuf, '\0', IPMI_FRU_AREA_SIZE_MAX + 1);
-
- /* parse FRU buffer */
-- if ((*nut_ipmi_fru_parse_read_data_area) (fru_parse_ctx,
-+ if ((*nut_ipmi_fru_read_data_area) (fru_parse_ctx,
- &area_type,
- &area_length,
- areabuf,
-- IPMI_FRU_PARSE_AREA_SIZE_MAX) < 0)
-+ IPMI_FRU_AREA_SIZE_MAX) < 0)
- {
- #ifdef HAVE_FREEIPMI_11X_12X
- nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx);
-@@ -287,7 +287,7 @@
-
- if (area_length)
- {
-- if (area_type == IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION)
-+ if (area_type == IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION)
- {
- /* Found a POWER_SUPPLY record */
- #ifdef HAVE_FREEIPMI_11X_12X
-@@ -298,7 +298,7 @@
- return 1;
- }
- }
-- } while ((ret = (*nut_ipmi_fru_parse_next) (fru_parse_ctx)) == 1);
-+ } while ((ret = (*nut_ipmi_fru_next) (fru_parse_ctx)) == 1);
-
- /* No need for further errors checking */
- #ifdef HAVE_FREEIPMI_11X_12X
diff --git a/sys-power/nut/files/nut-2.7.1-fix-scanning.patch b/sys-power/nut/files/nut-2.7.1-fix-scanning.patch
deleted file mode 100644
index 6ef5e681ba96..000000000000
--- a/sys-power/nut/files/nut-2.7.1-fix-scanning.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Search for correct libusb in testing.
-
-There may be many libusb libraries on a system, and we need to iterate until we
-find the correct one.
-
-Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-
-diff -Nuar --exclude .libs --exclude '*.o' --exclude core nut-2.7.1.orig/tools/nut-scanner/scan_usb.c nut-2.7.1/tools/nut-scanner/scan_usb.c
---- nut-2.7.1.orig/tools/nut-scanner/scan_usb.c 2014-01-04 18:38:22.496816444 -0800
-+++ nut-2.7.1/tools/nut-scanner/scan_usb.c 2014-01-04 19:05:04.598647935 -0800
-@@ -28,7 +28,7 @@
- #include <ltdl.h>
-
- /* dynamic link library stuff */
--static char * libname = "libusb";
-+static char * libname = "libusb-0.1";
- static lt_dlhandle dl_handle = NULL;
- static const char *dl_error = NULL;
- static int (*nut_usb_close)(usb_dev_handle *dev);
-@@ -41,6 +41,8 @@
- static usb_dev_handle * (*nut_usb_open)(struct usb_device *dev);
- static int (*nut_usb_find_devices)(void);
-
-+int nutscan_test_usb_library(const char*,void*);
-+
- /* return 0 on error */
- int nutscan_load_usb_library()
- {
-@@ -58,6 +60,22 @@
- return 0;
- }
-
-+ int ret = lt_dlforeachfile(NULL, nutscan_test_usb_library, libname);
-+ if(ret == 0) {
-+ dl_handle = (void *)1;
-+ lt_dlexit();
-+ }
-+
-+ return ret;
-+}
-+
-+int nutscan_test_usb_library(const char *filename, void* data) {
-+ char prefix[64];
-+ char *libname = (char*) data;
-+ sprintf(prefix, "/%s", libname);
-+ if(strstr(filename, prefix) == NULL)
-+ return 0;
-+
-- dl_handle = lt_dlopenext(libname);
-+ dl_handle = lt_dlopenext(filename);
- if (!dl_handle) {
- dl_error = lt_dlerror();
- goto err;
-@@ -100,16 +118,15 @@
- goto err;
- }
-
- *(void **)(&nut_usb_find_devices) = lt_dlsym(dl_handle,"usb_find_devices");
- if ((dl_error = lt_dlerror()) != NULL) {
- goto err;
- }
-
-+ fprintf(stderr, "Loaded USB library (%s from %s) : USB search enabled.\n", libname, filename);
- return 1;
- err:
-- fprintf(stderr, "Cannot load USB library (%s) : %s. USB search disabled.\n", libname, dl_error);
-- dl_handle = (void *)1;
-- lt_dlexit();
-+ fprintf(stderr, "Cannot load USB library (%s from %s) : %s. USB search disabled.\n", libname, filename, dl_error);
- return 0;
- }
- /* end of dynamic link library stuff */
diff --git a/sys-power/nut/files/nut-2.7.2/nut-2.7.2-no-libdummy.patch b/sys-power/nut/files/nut-2.7.2-no-libdummy.patch
index ca0d8be028f5..ca0d8be028f5 100644
--- a/sys-power/nut/files/nut-2.7.2/nut-2.7.2-no-libdummy.patch
+++ b/sys-power/nut/files/nut-2.7.2-no-libdummy.patch
diff --git a/sys-power/nut/metadata.xml b/sys-power/nut/metadata.xml
index d9ab89aeb368..85d0b12815ae 100644
--- a/sys-power/nut/metadata.xml
+++ b/sys-power/nut/metadata.xml
@@ -9,6 +9,7 @@
<email>prometheanfire@gentoo.org</email>
</maintainer>
<use>
+ <flag name="gui">Install NUT-Monitor python gui</flag>
<flag name="ipmi">Support IPMI-based UPSes.</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>
diff --git a/sys-power/nut/nut-2.6.5-r1.ebuild b/sys-power/nut/nut-2.6.5-r1.ebuild
deleted file mode 100644
index 02735da8d6b6..000000000000
--- a/sys-power/nut/nut-2.6.5-r1.ebuild
+++ /dev/null
@@ -1,231 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd
-
-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 ~x86-fbsd"
-IUSE="avahi cgi ipmi snmp usb selinux ssl tcpd xml"
-
-CDEPEND="avahi? ( net-dns/avahi )
- 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 )
- virtual/udev"
-DEPEND="$CDEPEND
- >=sys-apps/sed-4
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-nut )
-"
-
-S=${WORKDIR}/${MY_P}
-
-# 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}"/${PN}-2.4.1-no-libdummy.patch
- epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
- #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
- epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
-
- sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
- -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \
- -i configure.in || 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
-
- if [ -n "${NUT_DRIVERS}" ]; then
- myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}"
- fi
-
- 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-hal \
- --without-powerman \
- $(use_with avahi) \
- $(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) \
- $(systemd_with_unitdir) \
- ${myconf}
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
-
- find "${D}" -name '*.la' -exec rm -f {} +
-
- dodir /sbin
- dosym /$(get_libdir)/nut/upsdrvctl /sbin/upsdrvctl
- # This needs to exist for the scripts
- dosym /$(get_libdir)/nut/upsdrvctl /usr/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 || die
-
- newdoc lib/README README.lib || die
- newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die
-
- docinto cables
- dodoc docs/cables/* || die
-
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die
- newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die
-
- 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.2-r2.ebuild b/sys-power/nut/nut-2.7.2-r2.ebuild
deleted file mode 100644
index 8f9e94b92e46..000000000000
--- a/sys-power/nut/nut-2.7.2-r2.ebuild
+++ /dev/null
@@ -1,274 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# 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 ~x86-fbsd"
-
-IUSE="avahi cgi ipmi snmp +usb selinux ssl tcpd xml"
-CDEPEND="avahi? ( net-dns/avahi )
- 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 )
- 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/nut-2.7.2-no-libdummy.patch"
- epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
- #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
- #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
- epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.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
-
- # This file appears twice in the install list, and if both install rules
- # trigger simultaneously during parallel-make, it fails.
- sed -i \
- -e '/nodist_sysconf_DATA/s,upsmon.conf.sample,,g' \
- conf/Makefile.am || die
-
- 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 avahi) \
- $(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) \
- $(systemd_with_unitdir) \
- ${myconf}
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
-
- 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 || die
-
- newdoc lib/README README.lib || die
- newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die
-
- docinto cables
- dodoc docs/cables/* || die
-
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die
- newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die
-
- 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.3.ebuild b/sys-power/nut/nut-2.7.3.ebuild
deleted file mode 100644
index 55dd831f344f..000000000000
--- a/sys-power/nut/nut-2.7.3.ebuild
+++ /dev/null
@@ -1,269 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# 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 ~x86-fbsd"
-
-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 )
- 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/nut-2.7.2-no-libdummy.patch"
- epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
- #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
- #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
- epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.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 || die
-
- 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 || die
-
- newdoc lib/README README.lib || die
- newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die
-
- docinto cables
- dodoc docs/cables/* || die
-
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die
- newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die
-
- 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-r1.ebuild b/sys-power/nut/nut-2.7.4-r1.ebuild
index ddbe49986a35..ebebb9ba3453 100644
--- a/sys-power/nut/nut-2.7.4-r1.ebuild
+++ b/sys-power/nut/nut-2.7.4-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -88,11 +88,8 @@ pkg_setup() {
src_prepare() {
#ht_fix_file configure.in
- epatch "${FILESDIR}/nut-2.7.2/nut-2.7.2-no-libdummy.patch"
+ epatch "${FILESDIR}"/nut-2.7.2-no-libdummy.patch
epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
- #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
- #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
- #epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.patch
epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch
sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
diff --git a/sys-power/nut/nut-2.7.4.ebuild b/sys-power/nut/nut-2.7.4-r2.ebuild
index a767415e64b7..f33d974e4949 100644
--- a/sys-power/nut/nut-2.7.4.ebuild
+++ b/sys-power/nut/nut-2.7.4-r2.ebuild
@@ -1,40 +1,44 @@
-# Copyright 1999-2016 Gentoo Foundation
+# 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
+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="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"
-
+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 ~x86-fbsd"
-IUSE="cgi ipmi snmp +usb selinux ssl tcpd xml zeroconf"
-CDEPEND="
+IUSE="cgi gui ipmi snmp +usb selinux ssl tcpd xml zeroconf"
+REQUIRED_USE="gui? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ dev-libs/libltdl:*
+ virtual/udev
cgi? ( >=media-libs/gd-2[png] )
+ gui? ( dev-python/pygtk[${PYTHON_USEDEP}] )
+ ipmi? ( sys-libs/freeipmi )
snmp? ( net-analyzer/net-snmp )
- usb? ( virtual/libusb:0 )
ssl? ( >=dev-libs/openssl-1 )
tcpd? ( sys-apps/tcp-wrappers )
+ usb? ( virtual/libusb:0= )
xml? ( >=net-libs/neon-0.25.0 )
- ipmi? ( sys-libs/freeipmi )
- zeroconf? ( net-dns/avahi )
- virtual/udev"
-DEPEND="$CDEPEND
- >=sys-apps/sed-4
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-nut )
-"
+ zeroconf? ( net-dns/avahi )"
+
+BDEPEND="
+ virtual/pkgconfig
+ >=sys-apps/sed-4"
-S=${WORKDIR}/${MY_P}
+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"
@@ -73,6 +77,12 @@ 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
@@ -82,17 +92,11 @@ pkg_setup() {
# 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() {
- #ht_fix_file configure.in
-
- epatch "${FILESDIR}/nut-2.7.2/nut-2.7.2-no-libdummy.patch"
- epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
- #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
- #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
- #epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.patch
- epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch
+ default
sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
-e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \
@@ -101,11 +105,12 @@ src_prepare() {
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
+ rm ltmain.sh m4/lt* m4/libtool.m4 || die
+
+ sed -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \
+ -i lib/libupsclient{.pc,-config}.in || die #361685
- sed -i \
- -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \
- lib/libupsclient{.pc,-config}.in || die #361685
+ use gui && eapply "${FILESDIR}"/NUT-Monitor-1.3-paths.patch
eautoreconf
}
@@ -141,6 +146,7 @@ src_configure() {
--with-logfacility=LOG_DAEMON \
--with-dev \
--with-serial \
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
--without-powerman \
$(use_with cgi) \
$(use_with ipmi) \
@@ -151,17 +157,16 @@ src_configure() {
$(use_with usb) \
$(use_with xml neon) \
$(use_with zeroconf avahi) \
- $(systemd_with_unitdir) \
${myconf}
}
src_install() {
- emake DESTDIR="${D}" install || die
+ emake DESTDIR="${D}" install
- find "${D}" -name '*.la' -exec rm -f {} +
+ find "${D}" -name '*.la' -delete || die
dodir /sbin
- dosym /usr/sbin/upsdrvctl /sbin/upsdrvctl
+ dosym ../usr/sbin/upsdrvctl /sbin/upsdrvctl
if use cgi; then
elog "CGI monitoring scripts are installed in /usr/share/nut/cgi."
@@ -170,24 +175,44 @@ src_install() {
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/}"
+ mv "${i}" "${i/.sample/}" || die
done
- dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die
+ local DOCS=( AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING )
+ einstalldocs
- newdoc lib/README README.lib || die
- newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die
+ newdoc lib/README README.lib
+ newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf
docinto cables
- dodoc docs/cables/* || die
+ dodoc docs/cables/*
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die
- newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die
+ 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
@@ -217,7 +242,8 @@ src_install() {
doins scripts/hotplug/nut-usbups.hotplug
fi
- dobashcomp "${S}"/scripts/misc/nut.bash_completion
+ newbashcomp "${S}"/scripts/misc/nut.bash_completion upsc
+ bashcomp_alias upsc upscmd upsd upsdrvctl upsmon upsrw
}
pkg_postinst() {
diff --git a/sys-power/upower/Manifest b/sys-power/upower/Manifest
index 2d69c3357735..f818c0aac7eb 100644
--- a/sys-power/upower/Manifest
+++ b/sys-power/upower/Manifest
@@ -3,6 +3,6 @@ AUX upower-0.99.8-udev-events.patch 915 BLAKE2B 8f951b607bbe0237d71bec20d55310c2
DIST upower-0.99.5.tar.xz 432344 BLAKE2B 048471cee61e57ee673e2ba2e2f826ef1770291ca5b7a02adcce11acd78f96a3aa443b5f66abc595ce6578ca59a15a940b0c4924b443babc798fa54f4f629564 SHA512 2fb06bea69455f538146576665e36c5b91eb18b119fa77e29d383fcb2a86ea58650b82e258f157d03c40147ecb12ea545997199580f0e24847ac6ea04d46e5ea
DIST upower-0.99.8.tar.xz 448664 BLAKE2B e101e7d1b2aede77c1ed2da1fd23b87a95ccac8d901bd8d1f8bebcd5de7052a66f1840cf578a48453538e166aae56ef4bc6d3a2b85f7ba148ecac5cc0a486809 SHA512 dfd2960cae382195dfc7a703a02af298d9de55bc626cde2a1f97e7983842191ba9d99eb2044190214e792539e7d6c9d8e00b5aed17e5e86b04544e9ab90278b1
EBUILD upower-0.99.5.ebuild 1978 BLAKE2B 9c989aba064d6208a66d283acac361e5d64965b76838f13709e3d4fad815e9d7170393965b0438cd0a8d7da1813da4d3016d0f2544f380cb90a96c375d16fe4c SHA512 e3d30dd8aa51bf408510d2809f984e74940c4ebb1658b66ff75ca5e25cc3459589a64ea7faf263fd39012304f5a0793d6a75df79f75fb013e0fd1610c74dbf7c
-EBUILD upower-0.99.8-r1.ebuild 2373 BLAKE2B d96df72161a3c2735728aa3d3275d6f8dba95ad4519fea3fcc988fff7fbf402c004b040956b5fdc696c042e9274222bc5da1a9264066981435e9f8375fd88d7c SHA512 63e349f2f93205892b8b5fb6f2003181d00ab01d3801475ac43a6806770d44f0c6eb5286bd842ec4be29b121c2aec2bc05ced85cba42898d1db87b9f83f575f3
+EBUILD upower-0.99.8-r1.ebuild 2372 BLAKE2B 05870dca284b3a0288fbd8bdaf1509fb7c099d56a6f5c55adf60046c1c80645e3e3aa08534fdb89ed5d3c480b61bac7291dff487fe5a8d831634b5c3053c878a SHA512 8997f794ece5ccd9ec617e8ba1747abecfa5d0273fb9a6c3dd82c357a12a545e6239c0fa1d6bd8f0a0936f0e9f9664ea4e97ac0162ca9209716f3763a6edecad
EBUILD upower-0.99.8.ebuild 2170 BLAKE2B d6ef2e7c688f16893ed08a6897ad659d83630e8986731a0265a284acdecb23d9d73b3c83e2c3c41919c395eb9ad55ea3c811ba8cb0d4bdae84fc8e8578caf32b SHA512 aef6c980937ef5ea1ceb872066415529abeed577680faf970f7dd36753185cfe588792751b8b1c198035036393029b7774521bd406dc7c859548b3e27aaba0f9
MISC metadata.xml 228 BLAKE2B 6b6559027915d8578c02e363cc855e812c338acf7716fe4108a8b85c09152a086cb578e7361f4613a44e8b550d7e205ff43aea39dd9488951fa18c6e15042278 SHA512 4f5e63f918a0f8790db49c5b12173c673f86935f00796a04acfed573f618379b73b05b1869941e11f881fe69d4958f5287ce815fd710eadb6ac9f2680894caae
diff --git a/sys-power/upower/upower-0.99.8-r1.ebuild b/sys-power/upower/upower-0.99.8-r1.ebuild
index be82b5b6047a..21fa3ae93623 100644
--- a/sys-power/upower/upower-0.99.8-r1.ebuild
+++ b/sys-power/upower/upower-0.99.8-r1.ebuild
@@ -14,7 +14,7 @@ SRC_URI="https://gitlab.freedesktop.org/upower/upower/uploads/${COMMIT}/${P}.tar
LICENSE="GPL-2"
SLOT="0/3" # based on SONAME of libupower-glib.so
-KEYWORDS="alpha amd64 arm ~arm64 ia64 ~mips ppc ppc64 ~sparc x86 ~x86-fbsd"
+KEYWORDS="alpha amd64 arm ~arm64 ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
# gtk-doc files are not available as prebuilt in the tarball
IUSE="doc +introspection ios kernel_FreeBSD kernel_linux selinux"