diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2014-01-05 20:37:57 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2014-01-05 20:37:57 +0000 |
commit | b4d779351b847570e01684223ea96cf584966be0 (patch) | |
tree | e6e87ff4ef148966067d2e5a1f3358cb88cc8fa6 /sys-power/nut | |
parent | Marked ~x{86,64}-macos since oracle-jdk-bin now works (diff) | |
download | historical-b4d779351b847570e01684223ea96cf584966be0.tar.gz historical-b4d779351b847570e01684223ea96cf584966be0.tar.bz2 historical-b4d779351b847570e01684223ea96cf584966be0.zip |
Bug #493814: version bump; Bug #480664: NUT_DRIVERS hidden variable converted to UPS_DRIVERS local use family; Bug #485568: Respect AR. Bug #486640: partial fix.
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Diffstat (limited to 'sys-power/nut')
-rw-r--r-- | sys-power/nut/ChangeLog | 13 | ||||
-rw-r--r-- | sys-power/nut/Manifest | 30 | ||||
-rw-r--r-- | sys-power/nut/files/nut-2.7.1-fix-scanning.patch | 72 | ||||
-rw-r--r-- | sys-power/nut/files/nut-2.7.1-snmpusb-order.patch | 37 | ||||
-rw-r--r-- | sys-power/nut/files/nut.powerfail.initd | 6 | ||||
-rw-r--r-- | sys-power/nut/metadata.xml | 52 | ||||
-rw-r--r-- | sys-power/nut/nut-2.7.1.ebuild | 280 |
7 files changed, 462 insertions, 28 deletions
diff --git a/sys-power/nut/ChangeLog b/sys-power/nut/ChangeLog index 9efa6afc86c3..8c3f04ed0833 100644 --- a/sys-power/nut/ChangeLog +++ b/sys-power/nut/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-power/nut -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.112 2013/11/03 06:09:26 prometheanfire Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.113 2014/01/05 20:37:52 robbat2 Exp $ + +*nut-2.7.1 (05 Jan 2014) + + 05 Jan 2014; Robin H. Johnson <robbat2@gentoo.org> + +files/nut-2.7.1-fix-scanning.patch, +files/nut-2.7.1-snmpusb-order.patch, + +nut-2.7.1.ebuild, files/nut.powerfail.initd, metadata.xml: + Bug #493814: version bump; Bug #480664: NUT_DRIVERS hidden variable converted + to UPS_DRIVERS local use family; Bug #485568: Respect AR. Bug #486640: partial + fix. 03 Nov 2013; Matthew Thode <prometheanfire@gentoo.org> metadata.xml: adding myself to the list of maintainers diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest index 3168cb3185f0..55d691905ef6 100644 --- a/sys-power/nut/Manifest +++ b/sys-power/nut/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - AUX lighttpd_nut.conf-2.2.0 971 SHA256 f0b1b3e574766557dbf92704eb4cf81b166bb4db68ddecee581cb8b0b6638f65 SHA512 011ed0bc5fc66f7e7bb3d307cc3a548d6c424ce38a76cfe73b593e5be5a03e94e977b1539e5a96317f35662c41171528c98dd7bdab3cebc2a82cab804437ba26 WHIRLPOOL d221a8e6e64bcb578873d86b3ea1c6a6028649918799a5953e5175c141503f9d00aeeb4546820cd74af76fe99ce29070106621279abc711f2e8fd58aa659fc18 AUX nut-2.2.2-init.d-upsd 790 SHA256 81b0b82850d528d682544b452599159510dd93ba43e2c6133d0c9aab0b4c0210 SHA512 fcc15f6c272842711bce1bf6af46cb9371722479da944a3c191be2ad36327f4d8b74d8f05b2a06dabc1de04817c61d9eb0842618d43e4501c5800d778fc9bd9d WHIRLPOOL 6a52d222d9f2f5347ad568d5a4ccef7cbee1c23c76ad7aadef252ca9b6f9f5d8cdfa991c915f7a2f1335a3f8fc38d50961854158824625fedcbce5930535192c AUX nut-2.2.2-init.d-upsdrv 979 SHA256 72f41864cef57aea0617f75cc6478c1c8cffc979e0e4136d179dcf665915fa0d SHA512 89b59ac77466cd52a30307c43aea099a90e96886edf8647dcc0e3bd37e1bf57297e14ce1564270ffb4c39e549e8f1338f3260e5c4bd6339dc0bb6b3b47184684 WHIRLPOOL 2abe2c1b7703bf6ef5333776aa4d7cc21b85af1a1ca0746b529e796492c54cac0c6680968027c51b316e96eb691c06c470f6f7ae1275ff469fa8708dd289c236 @@ -13,32 +10,19 @@ AUX nut-2.6.5-freeipmi_fru.patch 17326 SHA256 a3907d5d02d097ab0f054fa4082d3472fd AUX nut-2.6.5-init.d-upsd 788 SHA256 08227f441d2f5c1a78e3ae567ddd36254775e72d2b0f18ea755f4dbc92419e2d SHA512 c4df416e27b368b25d8858d6c591efedaa72bb0fb6989bb5b3388c07221681d0e818269bc89f938c29237edbb6695cd7c1cbb49a3fb9ba5aaeb1481cb50ac659 WHIRLPOOL be8aad6b2d1fdcb9e465cb1792fa7df5db7e523b42215b19211fcdf6fcc4b46ad35913b9ad5fedd14c32898c1669fadacdb93bfb401a12989d1e80e503f02347 AUX nut-2.6.5-init.d-upslog 691 SHA256 c9412210a3606a0d9ce0b88a8db59307a1c699a10c7d71392a29b50f1bf6b7e3 SHA512 d4207be179c52cce1b42eca3f834989c95cfbfa19bfb7c42d7f8fb84fd80ed1a554cff5283b73fabb89c8d075858af84aa6eec920c8b99c823176b0c9421ab07 WHIRLPOOL 694718cca15c1fdcf8a0de438ebc55210bac32bcfaf4674806ea9ddd3927dd1b503a1baa42bc4d456934655c2d4b3fb4c32d124ef2508ee42cffac89f5824e1c AUX nut-2.6.5-init.d-upsmon 675 SHA256 654b74fce8e63e98abcab3c7e0b1903a39bd8672dcd5cf740b10209859b1d012 SHA512 4f797f8c72679410c9897d41bbccd4b842d08984e31e8a4729e823636970919854680162a88180cb73d3467db09d3c586d4c0e964bc0ddb5895cd32a88db7504 WHIRLPOOL 587435910808e3eac012b4d8af705aee631aeaedaceaf08598bb384a433aafe3f54b3dd254ee9654dfc85d73b9b53656d6b97674c5edb1ef580fc36134584553 -AUX nut.powerfail.initd 1395 SHA256 3ef933724169dbe08645fed19674a1576ced5f54a88985b5b32baf2a9c178ae7 SHA512 2c7bdb0f4ada8014a09bc21205cafa49496950c49f3bfed6b21fe7e400b818024e5fbd402c0bccca5bc4624606cb52b10f87b0074a4d7372e1b67976d5ca68f9 WHIRLPOOL 7163a0b0203b9d96e4317468bd2f2f7af41fb755a7312afdbe58dadce9cb8fc78b716ca35a19fc8160159fc5376d0bb779c4d3a31d1e72abf5026ddef749c4d1 +AUX nut-2.7.1-fix-scanning.patch 2311 SHA256 32f375e084b8250bbcbbd402517ca720040e1bf5302e0f242c3ea6e0ad62665d SHA512 9695b77af0e2bfbec62f6b2686c6d2c65211a369d671907fcb191e0da7d9765f50587cf193a4fc0fbd12c6d8f4d5beb900dc4bb8dc04133bb1b01f078561de50 WHIRLPOOL 2aef54dd8b0b442f3e1e68b1b3018ea2431042e667e66450c2d737fc60c73de0600a221ac91489533b7758968087264af05ef41d1edda374bbb95aa6b31207fa +AUX nut-2.7.1-snmpusb-order.patch 1417 SHA256 1f2d8bd74cebf61c711130046a8fee99d29fa482d2b1a235816c6348a16acd49 SHA512 df3701821bc4ef45a5089e4d4439c3367fb23cefce7d06168bd422a8c32a1b373ae9fb3456bd5f90a51a672edf9ce29254a08c2045efe210a11b82399793ec19 WHIRLPOOL 0904f346748d16336c57cfb10741aba6a2d0e76f988925e7479dc8ae742b5fcfdd09dce531e5d5743009593fd61e9810b505b24db2f15d8d37c0bebd912abfdb +AUX nut.powerfail.initd 1420 SHA256 502001e6fea35c18c6869b492aea7ea584cde7cfd983fe78ca9ca454ac591b26 SHA512 5921fbff0fa079a362c1de67783724382f5bcbd0c75aa179641c77bc31c44562d61e027f05218022151ed0aa446b813cd2fb110baa945cbfa732d741ea9fc6d4 WHIRLPOOL ce099ce9cf57e710958446e1fb9aa6c6c837d2eb964928549e78bac2e7ef36f77d16baab33cc85afeba18b801fa4cdf9b2199391b449f3ff1ed8e730e5887510 DIST nut-2.6.0.tar.gz 1703273 SHA256 febaa230b6b5f0ad27d780851047527d36c8c7a34e557b3832d6d55174d7a0d5 SHA512 82bf03ef01931c819d550babed48806a45411083bc0a79d1e10e44ec798fb07032e0f8eda409ddd591faf4506955bd98656afc97bc6d357276de70d0ce15b775 WHIRLPOOL e7da975a7c1eafd3b9d7e90456b6924ded74e9576746a91e3692b9e58dfa24878567596fa850776a88542673a35098cc0b22ca79ec3c597dccf03ee2119c001c DIST nut-2.6.2.tar.gz 1897691 SHA256 343554add0713348f8b09bca8d83eee2eb2ae8bad9cdad9a39e0f0e2d0f5d375 SHA512 848dfb9e1aebdab47a9892e4f2c5cba7afb87f422b7edcf5d4c8843dda917edf86d8f747ff655b2026635eb803d09c4d393b212279907e371308d3efe7bd8145 WHIRLPOOL 8beb421f168f546bfa1a763db411074dbd5ab8da8638d33c9ee0106f9102332c8ac5c8beeda0f71d5dfe89e09e0f651a4bc8d3a49e2f2177fb4c935d23bb8e68 DIST nut-2.6.3.tar.gz 1952115 SHA256 34913b729d2032faaf6f31e800a400bcd874f1f4daacae6fe0d388bd235b633a SHA512 8f6fede6c8891e9f4844cb8a82301334a33b31e832effec7f83ed756e1b263e103503f5a0178a588b29df5bc2a6eb6b6d42121cfb839c16f082ffd901788fdd4 WHIRLPOOL a6e96419b604027aa89b67d2a13dd4690185dc16cc378383a66e7a1ee72b6d35f192d39b0f71c20e284ccd449729410667c485bf0e8f5b8dc9a1e0eb83c22e78 DIST nut-2.6.5.tar.gz 2038832 SHA256 618df71cf1ca6e3700d1d3c282773a2dec85f9f20324c0d3234c824e97feb93f SHA512 f1c76e6280057dc558d53451e7de2bdc7f37a0f175b1c52c27e7dcb83deeb78f6885007ad188a7a3a19e411eba87e03eb2246310bd7a5a5bb6fa3ad2bebd49d8 WHIRLPOOL 2b189f77d18d26303c60f2c084796075b0a50b8aa9cbefc3ba9a83f037450ffc3ecdb289367435e784a6bbe8569f768a97130a1ccdf123e53f13e0cf8813fb9a +DIST nut-2.7.1.tar.gz 2259721 SHA256 71a6d73ad6d910808126ba7f217ec1142a0c6709c63a22a099e7338960b2c798 SHA512 087c63b12f44c1b0caf8ffb2c5fda213a1b2060bdc284bd7fdff38a58f190c513790438388a4ceda8772938ae56ac84ca8635666ad89f067bec4d818252158ae WHIRLPOOL 576c05ffb3feeb8bc54130493ee32b0012844edbd90ea0011c2086636f92e18fabbf55f243d192e4d588d69ee5774c11db52996abd86dd4b7ed41e39849d43ad EBUILD nut-2.6.0-r1.ebuild 6850 SHA256 631a5a8351d8d3ac3eb9c25aa4a1a51a91eb142fc52d4b08d5610df48d9dab1e SHA512 433a8895d990c7b4c526074182a163ecebc318979a34bd38cae69bbdfa6b26e5300038f19f38ea472bb4c78b8e83e3c6dd563680fa1edbbaaf19e3a76aa69a34 WHIRLPOOL d5cc9028b62ea88ac540867879dc288db1e7631b33c3362a7dc5e9f7ab02ffc4276b5f92e9ef6b918e57114d0ccf5653140b28fe61dcb2e427f2b806b4a3eac5 EBUILD nut-2.6.2.ebuild 6851 SHA256 9b08a7b7c0aebcf83d7b5fbbaffab61f03e0624a32e08f431d52c13c49b85ce1 SHA512 762b239fb932219df2e208c5041ce76148c38b182ccca06f8dd68424ce3bf0bb62046716228cb33104d5e0d5f7b9375bee62d2678cc53811aacbcc0ac843ef29 WHIRLPOOL 046de3ae8d6f39c2e516dfef58e4495ebc0c5a48cce8b92d342d95c5e919c56f9a69b118b0837d60195c11f91d1a48f813b9845bd53809479f102ef0505b991f EBUILD nut-2.6.3.ebuild 6960 SHA256 4c4a1d0fe132a96070c85e547a700a066034014d8a57c8dbcfc22ea27a32c1c4 SHA512 a39b9e4b642027e7fe633e828d3eb56c2c66267fef211a2bd2f0eee5dc86eb7d48018e0f4d0f08d0ad11c5ce7712e14410beec3429155f2aa9bcdc703e56bd26 WHIRLPOOL e83365c8231b15e9b8f42f3e0835efce90340ef662e64c89b1c6ee70c6919703191a5ffea63ea1500345357e7097d0db3eaf0f695220c2e620c60c70b1dac1d6 EBUILD nut-2.6.5-r1.ebuild 7271 SHA256 30dc0be20142e63a90c7c39e8a248dddeb745c06d2b3a6d57c08ed8815042155 SHA512 c61e0fa60c66b7ea673bbbcdd62a6cb85c43ab570f073ad9f63c7de2c3e9b41c8ae061c559a36e3413b0aa8ed505edb272d14e4b57e44684cb228ae35be25418 WHIRLPOOL a59701a0cf4a1b8d43acae163bfd2cf2c0961cfa214f4fc47055fc5de5db418137452afcb8416ca3dd31ebf88a7db9b383742e850564b63d867ed10fcb3aacc1 EBUILD nut-2.6.5.ebuild 6965 SHA256 dfe83c82a951c0abbaa2b6f74178bba4c9c2286df7cfa011c86adffd639e98b4 SHA512 5c0699443346fcafb49de4dae553021fbb6d6487eace3f912a2841b9775c5220caa4db308c9c5199b3145030180a48d685bfc840201e2a3e5c598d639a420340 WHIRLPOOL 318e34e854abb251cab9749664584f2a3f4086c7d50b0a6a1360dad356068b37fe7b87ceb7cf613720d5802c40db9a219d812467b73045dea60083d25a7e1fda -MISC ChangeLog 23369 SHA256 218de5329a368610e2ce9d7f79bb24478e2380a42988755a42704dcc8fb4e8ce SHA512 e226a8df65d5a4fe40eddc570509f327716ff07c992cbf845d51e2e86f88e90325f66786c6dcd7961e3c538287cbad1b447ce2da5781cdf20c23d2cd69e824ea WHIRLPOOL 42725293223ca6c8943e2ac92527977cf47be611032ebb00c7e77ee83cedecce8af1ef447046c37849c804c8d9f5fb899396990a205d52e3632f3bf92965bde8 -MISC metadata.xml 386 SHA256 dff1331f4286ce66be5447a67a106373a29b576420d76272391062bc18a3efbf SHA512 b5e5129f29aff51088587db8d523e94284fc1554923c2a929672d7e1058b5aa2912f229698f1600854643448ecfdd2a91c1916a19c589c2abbb5cc561e3d7d84 WHIRLPOOL 825b8190ac765d6f93e20af6d67c4836aa8181c8a26d5796e6a47fe2d2e369a3a3db3d58cb589c5e861477f805790e00d5d891e12f6711244e8d6734388ac2c9 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.22 (GNU/Linux) - -iQIcBAEBCAAGBQJSdekbAAoJECRx6z5ArFrD8bMP/1ZkEztTAVEJwzg/UfCtsLFk -y7F/53rEjeCeKrS+znCJYMCXeLHR2jgyW7rhy2GzUkA6q0X5gswC8P66D8TZiA7K -VQg8KQBpe1M7Jdn5UWc+Fg1+GzQ7Q4PmPJrU2L1iX2wd+ravvAiNQOy51nlRnPf1 -ZGIaF2VIWavDN8DERfnpYazXGDklLSD/RHSblNNSF+fcbc5fd6QOBy+nxfy+7n8J -o8zflcEWg8fbpJMaOUQAvBGdtPhrrCvdaZpYvXZlSSB/HXRrH9Du4pvqytq2O5vA -OXqQCV8oAy3yh6Od7lgolcz6bou/+6Pe2VurAcbQqgRTBIRQyrUtJAGb4I+uQdO6 -g62vsTuawovE0agCWgNtXeUO2offf3HW2sVFplF80xLaCLcqN7ARtc6p/KrZkT0I -dB9u3GTyOaw3YI3toEti9XjrO9X5df3hxT8rWSRk8nJSzTxEkzwX4gsoZxoVnrZW -sNDMiUmWf13Cz2t0JnjtmthMBkkyXL6/ueBrKq754qYWBJFxE/zyXzFsCNOxdufs -tMTVY0dkaCIpMCB9pNXdo8umyj6JNcThTTnN+E/bffHHrCUvVxqo71NkH+D9IKv/ -W9vJjqAGXFHVWRJ5J9/QEG+QGWCVuA24y2pS3YP87UUEXw9L68VZXr9ffNEe6Jv5 -CJ5Uw+hlzCFXns0pGRg5 -=LLH8 ------END PGP SIGNATURE----- +EBUILD nut-2.7.1.ebuild 9697 SHA256 a32aa60f0b092c760901e3a3a6b92440afa3ece6559827b9a3fbf2af3c0b959f SHA512 effdf45aa971bfb2822f466217384612518d04d5379ecf8edb86701644b58abac46f40f9635ed0f8dde270ef79b262581a27e4d9642b8b2e78588ee4f71799f0 WHIRLPOOL 8c3c59abfa8c0dcd2e909d4a339e18a4344dd384d0a18877774cf2f79ed92cbd12e5cce830610d8edd6294ed21600b41a97d7f3401fe1c77c132c628680fa3d2 +MISC ChangeLog 23749 SHA256 eb4034e069fb32b3c75ea23eedc3234d7cd9df7cc807f9a3d3256a3bac5b8bc2 SHA512 072b1f05feb55238d402a341db1b50179dbcf2ad54e6a2708386943750cebbd579048807ced8fa2578c828cb59cd2b26f5275d92982419f6dbd5e8c19c904c91 WHIRLPOOL 63f05a6dc89603829b72e14a6e38a5847f9fe7888517523023b96c86ce9b6307936c4ac92ca74b76fea8b9066788c5c9e8b1a651f756e53e6c0e254c4b43fc61 +MISC metadata.xml 5153 SHA256 09e74956c734541540fdd23ca7cecc7915b3919e249d716a7728c97f4040275f SHA512 9eafcc590b4624cf96a88f192b1f4bf58cc99719d0859bb2b911d162379502d40aa31c1d24c2f7dd3862f9b7ec9878a7e41de5dee99542b47fa2c28c981b91d6 WHIRLPOOL 9238c15e4163ebe94234e2d78030af7b37f09ebeb9729610c8d8fc1adab4e0af05de45f7e498d041ee1052937fd517cdbc52144ffee9f0bd582fb8b9078b13ad 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 new file mode 100644 index 000000000000..6ef5e681ba96 --- /dev/null +++ b/sys-power/nut/files/nut-2.7.1-fix-scanning.patch @@ -0,0 +1,72 @@ +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.1-snmpusb-order.patch b/sys-power/nut/files/nut-2.7.1-snmpusb-order.patch new file mode 100644 index 000000000000..e62b6571d2ce --- /dev/null +++ b/sys-power/nut/files/nut-2.7.1-snmpusb-order.patch @@ -0,0 +1,37 @@ +The code that generates the SNMP and USB headers to compile against does not +have a deterministic order, leading to different results at times. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar --exclude .libs --exclude '*.o' --exclude core nut-2.7.1.orig/tools/nut-snmpinfo.py nut-2.7.1/tools/nut-snmpinfo.py +--- nut-2.7.1.orig/tools/nut-snmpinfo.py 2014-01-04 19:08:19.117150636 -0800 ++++ nut-2.7.1/tools/nut-snmpinfo.py 2013-07-26 12:41:11.000000000 -0700 +@@ -78,7 +78,9 @@ + output_file.write( "/* SNMP IDs device table */\n" ) + output_file.write( "static snmp_device_id_t snmp_device_table[] = {\n" ) + +-for filename in glob.glob('../drivers/*-mib.c'): ++mibs = glob.glob('../drivers/*-mib.c') ++mibs.sort() ++for filename in mibs: + list_of_line = open(filename,'r').read().split(';') + for line in list_of_line: + if "mib2nut_info_t" in line: +diff -Nuar --exclude .libs --exclude '*.o' --exclude core nut-2.7.1.orig/tools/nut-usbinfo.pl nut-2.7.1/tools/nut-usbinfo.pl +--- nut-2.7.1.orig/tools/nut-usbinfo.pl 2014-01-04 19:12:45.595949760 -0800 ++++ nut-2.7.1/tools/nut-usbinfo.pl 2013-11-17 11:27:38.000000000 -0800 +@@ -75,7 +75,12 @@ + + ################# MAIN ################# + +-find(\&find_usbdevs,$scanPath); ++find({ ++ wanted => \&find_usbdevs, ++ follow => 1, ++ preprocess => sub { return sort @_ }, ++ }, ++ $scanPath); + &gen_usb_files; + + ################# SUB METHOD ################# + diff --git a/sys-power/nut/files/nut.powerfail.initd b/sys-power/nut/files/nut.powerfail.initd index 2765c46023eb..d5dcd4a57970 100644 --- a/sys-power/nut/files/nut.powerfail.initd +++ b/sys-power/nut/files/nut.powerfail.initd @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/nut.powerfail.initd,v 1.3 2010/06/25 17:21:03 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/nut.powerfail.initd,v 1.4 2014/01/05 20:37:52 robbat2 Exp $ description='Signal the UPS to kill power in a power failure condition' @@ -21,7 +21,7 @@ start() { fi local UPS_CTL UPS_POWERDOWN - if [ -f /etc/killpower ]; then + if [ -f /etc/killpower -o -f /etc/nut/killpower ]; then UPS_CTL=/sbin/upsdrvctl UPS_POWERDOWN="${UPS_CTL} shutdown" elif [ -f /etc/apcupsd/powerfail ]; then diff --git a/sys-power/nut/metadata.xml b/sys-power/nut/metadata.xml index a15d85a13011..25533caa4df4 100644 --- a/sys-power/nut/metadata.xml +++ b/sys-power/nut/metadata.xml @@ -10,5 +10,57 @@ </maintainer> <use> <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> + <flag name="ups_drivers_belkin">Driver for Belkin serial UPS equipment</flag> + <flag name="ups_drivers_belkinunv">Driver for Belkin "Universal UPS" and compatible</flag> + <flag name="ups_drivers_bestfcom">Driver for Best Power Fortress/Ferrups</flag> + <flag name="ups_drivers_bestfortress">Driver for old Best Fortress UPS equipment</flag> + <flag name="ups_drivers_bestuferrups">Driver for Best Power Micro-Ferrups</flag> + <flag name="ups_drivers_bestups">Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment</flag> + <flag name="ups_drivers_dummy-ups">Driver for multi-purpose UPS emulation</flag> + <flag name="ups_drivers_etapro">Driver for ETA UPS equipment</flag> + <flag name="ups_drivers_everups">Driver for Ever UPS models</flag> + <flag name="ups_drivers_gamatronic">Driver for Gamatronic UPS equipment</flag> + <flag name="ups_drivers_genericups">Driver for contact-closure UPS equipment</flag> + <flag name="ups_drivers_isbmex">Driver for ISBMEX UPS equipment</flag> + <flag name="ups_drivers_liebert">Driver for Liebert contact-closure UPS equipment</flag> + <flag name="ups_drivers_liebert-esp2">Driver for Liebert UPS, using the ESP-II serial protocol</flag> + <flag name="ups_drivers_masterguard">Driver for Masterguard UPS equipment</flag> + <flag name="ups_drivers_metasys">Driver for Meta System UPS equipment</flag> + <flag name="ups_drivers_mge-utalk">Driver for MGE UPS SYSTEMS UTalk protocol equipment</flag> + <flag name="ups_drivers_microdowell">Driver for Microdowell Enterprise UPS series</flag> + <flag name="ups_drivers_mge-shut">Driver for SHUT Protocol UPS equipment</flag> + <flag name="ups_drivers_oldmge-shut">Driver for SHUT Protocol UPS equipment (older implementation)</flag> + <flag name="ups_drivers_oneac">Driver for Oneac UPS equipment</flag> + <flag name="ups_drivers_optiups">Driver for Opti-UPS (Viewsonic) UPS and Zinto D (ONLINE-USV) equipment</flag> + <flag name="ups_drivers_powercom">UPS driver for serial Powercom/Trust/Advice UPS equipment</flag> + <flag name="ups_drivers_rhino">Driver for Brazilian Microsol RHINO UPS equipment</flag> + <flag name="ups_drivers_safenet">Driver for SafeNet compatible UPS equipment</flag> + <flag name="ups_drivers_solis">Driver for Brazilian Microsol SOLIS UPS equipment</flag> + <flag name="ups_drivers_tripplite">Driver for Tripp-Lite SmartPro UPS equipment</flag> + <flag name="ups_drivers_tripplitesu">Driver for Tripp-Lite SmartOnline (SU) UPS equipment</flag> + <flag name="ups_drivers_upscode2">Driver for UPScode II compatible UPS equipment</flag> + <flag name="ups_drivers_victronups">Driver for IMV/Victron UPS unit Match, Match Lite, NetUps</flag> + <flag name="ups_drivers_powerpanel">Driver for PowerPanel Plus compatible UPS equipment</flag> + <flag name="ups_drivers_blazer_ser">Driver for Megatec/Q1 protocol serial based UPS equipment</flag> + <flag name="ups_drivers_clone">Fake driver to clone outlets for device grouping</flag> + <flag name="ups_drivers_clone-outlet">Fake driver to clone outlets for device grouping</flag> + <flag name="ups_drivers_ivtscd">driver for the IVT Solar Controller Device</flag> + <flag name="ups_drivers_apcsmart">Driver for American Power Conversion Smart Protocol UPS equipment</flag> + <flag name="ups_drivers_apcsmart-old">Driver for American Power Conversion Smart Protocol UPS equipment</flag> + <flag name="ups_drivers_apcupsd-ups">Driver for apcupsd client access</flag> + <flag name="ups_drivers_riello_ser">Driver for Riello UPS Protocol UPS equipment</flag> + <flag name="ups_drivers_nutdrv_qx">Driver for Q* protocol serial and USB based UPS equipment</flag> + <flag name="ups_drivers_usbhid-ups">Driver for USB/HID UPS equipment</flag> + <flag name="ups_drivers_bcmxcp_usb">Experimental driver for UPSes supporting the BCM/XCP protocol over USB</flag> + <flag name="ups_drivers_tripplite_usb">Driver for older Tripp Lite USB UPSes (not PDC HID)</flag> + <flag name="ups_drivers_blazer_usb">Driver for Megatec/Q1 protocol USB based UPS equipment</flag> + <flag name="ups_drivers_richcomm_usb">Driver UPS equipment using Richcomm dry-contact to USB solution</flag> + <flag name="ups_drivers_riello_usb">Driver for Riello UPS Protocol UPS equipment via USB</flag> + <flag name="ups_drivers_nutdrv_qx">Driver for Q* protocol serial and USB based UPS equipment</flag> + <flag name="ups_drivers_netxml-ups">Driver for Eaton / MGE Network Management Card / Proxy (XML/HTTP Protocol) equipment</flag> + <flag name="ups_drivers_snmp-ups">Multi-MIB Driver for SNMP UPS equipment</flag> + <flag name="ups_drivers_nut-ipmipsu">Driver for IPMI Power Supply Units (PSU)</flag> </use> </pkgmetadata> diff --git a/sys-power/nut/nut-2.7.1.ebuild b/sys-power/nut/nut-2.7.1.ebuild new file mode 100644 index 000000000000..50d8898a1c47 --- /dev/null +++ b/sys-power/nut/nut-2.7.1.ebuild @@ -0,0 +1,280 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.7.1.ebuild,v 1.1 2014/01/05 20:37:52 robbat2 Exp $ + +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 ssl tcpd xml" +RDEPEND="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="$RDEPEND + >=sys-apps/sed-4 + virtual/pkgconfig" + +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 ${USB_DRIVERLIST} ; do +# name="hald-addon-${name}" +# IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" +# REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( hal )" +#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}"/${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 + 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.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 + + # 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-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} '' + +} |