public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-power/nut/, sys-power/nut/files/
@ 2016-11-08 18:33 Robin H. Johnson
  0 siblings, 0 replies; 5+ messages in thread
From: Robin H. Johnson @ 2016-11-08 18:33 UTC (permalink / raw
  To: gentoo-commits

commit:     9614752644c90e4b7765a31f75020142b09ce03e
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  8 18:33:17 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Nov  8 18:33:32 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96147526

sys-power/nut: bump.

Package-Manager: portage-2.3.2

 sys-power/nut/Manifest                      |   1 +
 sys-power/nut/files/nut-2.2.2-init.d-upsd   |   4 +-
 sys-power/nut/files/nut-2.2.2-init.d-upsdrv |   4 +-
 sys-power/nut/files/nut-2.6.5-init.d-upsd   |   4 +-
 sys-power/nut/nut-2.7.4.ebuild              | 270 ++++++++++++++++++++++++++++
 5 files changed, 277 insertions(+), 6 deletions(-)

diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest
index fcf9751..104a2ea 100644
--- a/sys-power/nut/Manifest
+++ b/sys-power/nut/Manifest
@@ -1,3 +1,4 @@
 DIST nut-2.6.5.tar.gz 2038832 SHA256 618df71cf1ca6e3700d1d3c282773a2dec85f9f20324c0d3234c824e97feb93f SHA512 f1c76e6280057dc558d53451e7de2bdc7f37a0f175b1c52c27e7dcb83deeb78f6885007ad188a7a3a19e411eba87e03eb2246310bd7a5a5bb6fa3ad2bebd49d8 WHIRLPOOL 2b189f77d18d26303c60f2c084796075b0a50b8aa9cbefc3ba9a83f037450ffc3ecdb289367435e784a6bbe8569f768a97130a1ccdf123e53f13e0cf8813fb9a
 DIST nut-2.7.2.tar.gz 2223307 SHA256 4d5365359b059d96dfcb77458f361a114d26c84f1297ffcd0c6c166f7200376d SHA512 7d6b44e8f2d03544d9825274f4f3039911e335eb51620ded3dc08d51aeb096281c2ec848831815c54eecd4f2a25bdb1e6e5f479422e5291f03c3055da7ba52e6 WHIRLPOOL 6e7c45ef09fc2e86f0b79787043a9bf9954b5ef57fb16f9d453734680ff947abd8fb6665c5da4dac09850f5ab6a414039aa067803ecdeb2efd8537b8909f1ff9
 DIST nut-2.7.3.tar.gz 2317478 SHA256 ff44d95d06a51559a0a018eef7f8d17911c1002b6352a7d7580ff75acb12126b SHA512 3dd978712dc0fabe7e194dbf6d7bb442c456aa4d45bfc63ede8a3acae23c66811cbcf2705b55a6739129b5f120e6f5865bcb9d19eb9080507a85e2624d5663d6 WHIRLPOOL d9fe0c6545808a7daa25c45bd4f43fba1071cec0fd668d66b7926b6cd7af55e0d8c937bcdbb41e693f977c960c4e2ea95ff40d35b5f68695da5a7d1fc8da7265
+DIST nut-2.7.4.tar.gz 2509831 SHA256 980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7 SHA512 320c4aff85d8a370c5eff77d33924fdfc3caf6a250620693cdd5bf3336b3a80d8a207488eee841bcf8b72fbad68fda4c074e63b99c56e7886716fc934122d11a WHIRLPOOL 79b2ad8d2bc1211ba67bb24fec77b61e93b62d3854d5fd908083ff061bcc247abbda8dbf27259d1c38fb6fbeeaf8db65c620b8b3fc4029f14c03b12855925178

diff --git a/sys-power/nut/files/nut-2.2.2-init.d-upsd b/sys-power/nut/files/nut-2.2.2-init.d-upsd
index 9697f9b..56f524a 100644
--- a/sys-power/nut/files/nut-2.2.2-init.d-upsd
+++ b/sys-power/nut/files/nut-2.2.2-init.d-upsd
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -18,7 +18,7 @@ start() {
 	ebegin "Starting upsd"
 	# clean up first
 	pkill -u root,nut -x ${bin}
-	sleep 1s
+	sleep 1
 	rm -f ${pidfile}
 	# now start up
 	start-stop-daemon --start --quiet --exec ${bin}

diff --git a/sys-power/nut/files/nut-2.2.2-init.d-upsdrv b/sys-power/nut/files/nut-2.2.2-init.d-upsdrv
index 3c03b5a..d142716 100644
--- a/sys-power/nut/files/nut-2.2.2-init.d-upsdrv
+++ b/sys-power/nut/files/nut-2.2.2-init.d-upsdrv
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -7,7 +7,7 @@ extra_commands="stopall startall"
 
 UPSNAME=${SVCNAME#*.}
 msgtext="drivers"
-[ "${UPSNAME}" == "${SVCNAME}" ] && UPSNAME=''
+[ "${UPSNAME}" = "${SVCNAME}" ] && UPSNAME=''
 [ -n "$UPSNAME" ] && msgtext="driver for $UPSNAME"
 
 depend() {

diff --git a/sys-power/nut/files/nut-2.6.5-init.d-upsd b/sys-power/nut/files/nut-2.6.5-init.d-upsd
index d522d3b..9809639 100644
--- a/sys-power/nut/files/nut-2.6.5-init.d-upsd
+++ b/sys-power/nut/files/nut-2.6.5-init.d-upsd
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -18,7 +18,7 @@ start() {
 	ebegin "Starting upsd"
 	# clean up first
 	pkill -u root,nut -x ${bin}
-	sleep 1s
+	sleep 1
 	rm -f ${pidfile}
 	# now start up
 	start-stop-daemon --start --quiet --exec ${bin}

diff --git a/sys-power/nut/nut-2.7.4.ebuild b/sys-power/nut/nut-2.7.4.ebuild
new file mode 100644
index 00000000..9f42ba7
--- /dev/null
+++ b/sys-power/nut/nut-2.7.4.ebuild
@@ -0,0 +1,270 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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} ''
+
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-power/nut/, sys-power/nut/files/
@ 2018-10-27 19:02 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2018-10-27 19:02 UTC (permalink / raw
  To: gentoo-commits

commit:     fc55913e410cc8ab04e91fa21e8ce5cf119668b7
Author:     Michael Perlov <perlovka <AT> gmail <DOT> com>
AuthorDate: Mon Jun 25 15:18:24 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Oct 27 19:02:37 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc55913e

sys-power/nut: EAPI-6 bump, fix repoman warnings

- Use https
- Drop http://random.networkupstools.org, domain does not exist anymore
- Add missing || die
- Drop superfluous || die

Closes: https://github.com/gentoo/gentoo/pull/9200
Acked-by: Matthew Thode <prometheanfire <AT> gentoo.org>
Signed-off-by: Michael Perlov <perlovka <AT> gmail.com>
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 .../nut/files/nut-2.6.2-lowspeed-buffer-size.patch |   6 +-
 sys-power/nut/nut-2.7.4-r2.ebuild                  | 270 +++++++++++++++++++++
 2 files changed, 273 insertions(+), 3 deletions(-)

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 9806d07e53b..1e6617316fb 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/nut-2.7.4-r2.ebuild b/sys-power/nut/nut-2.7.4-r2.ebuild
new file mode 100644
index 00000000000..5045bf0a37c
--- /dev/null
+++ b/sys-power/nut/nut-2.7.4-r2.ebuild
@@ -0,0 +1,270 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools bash-completion-r1 fixheadtails user systemd flag-o-matic toolchain-funcs
+
+MY_P=${P/_/-}
+
+DESCRIPTION="Network-UPS Tools"
+HOMEPAGE="https://www.networkupstools.org/"
+SRC_URI="https://networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
+
+IUSE="cgi ipmi snmp +usb selinux ssl tcpd xml zeroconf"
+
+COMMON_DEPEND="dev-libs/libltdl:*
+	virtual/udev
+	cgi? ( >=media-libs/gd-2[png] )
+	ipmi? ( sys-libs/freeipmi )
+	snmp? ( net-analyzer/net-snmp )
+	ssl? ( >=dev-libs/openssl-1 )
+	tcpd? ( sys-apps/tcp-wrappers )
+	usb? ( virtual/libusb:0= )
+	xml? ( >=net-libs/neon-0.25.0 )
+	zeroconf? ( net-dns/avahi )"
+
+DEPEND="${COMMON_DEPEND}
+	virtual/pkgconfig
+	>=sys-apps/sed-4"
+
+RDEPEND="${COMMON_DEPEND}
+	selinux? ( sec-policy/selinux-nut )"
+
+S="${WORKDIR}/${MY_P}"
+
+# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package
+SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx"
+SNMP_DRIVERLIST="snmp-ups"
+USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx"
+USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST}
+#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx"
+NEONXML_DRIVERLIST="netxml-ups"
+IPMI_DRIVERLIST="nut-ipmipsu"
+# Now we build from it:
+for name in ${SERIAL_DRIVERLIST} ; do
+	IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
+done
+for name in ${USB_DRIVERLIST} ; do
+	IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
+	REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )"
+done
+for name in ${NEONXML_DRIVERLIST}; do
+	IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
+	REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )"
+done
+for name in ${SNMP_DRIVERLIST} ; do
+	IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
+	REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )"
+done
+for name in ${IPMI_DRIVERLIST} ; do
+	IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
+	REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )"
+done
+IUSE="${IUSE} ${IUSE_UPS_DRIVERS}"
+
+# public files should be 644 root:root
+NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf"
+# private files should be 640 root:nut - readable by nut, writeable by root,
+NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
+# public files should be 644 root:root, only installed if USE=cgi
+NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}"
+
+PATCHES=(
+	"${FILESDIR}/nut-2.7.2/nut-2.7.2-no-libdummy.patch"
+	"${FILESDIR}/${PN}-2.7.1-snmpusb-order.patch"
+	"${FILESDIR}/${PN}-2.6.2-lowspeed-buffer-size.patch"
+)
+
+pkg_setup() {
+	enewgroup nut 84
+	enewuser nut 84 -1 /var/lib/nut nut,uucp
+	# As of udev-104, NUT must be in uucp and NOT in tty.
+	gpasswd -d nut tty 2>/dev/null
+	gpasswd -a nut uucp 2>/dev/null
+	# in some cases on old systems it wasn't in the nut group either!
+	gpasswd -a nut nut 2>/dev/null
+	warningmsg ewarn
+}
+
+src_prepare() {
+	default
+
+	sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
+		-e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \
+		-i configure.ac || die
+
+	sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
+		-i scripts/udev/Makefile.am || die
+
+	rm -f ltmain.sh m4/lt* m4/libtool.m4 || die
+
+	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 \
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+		--without-powerman \
+		$(use_with cgi) \
+		$(use_with ipmi) \
+		$(use_with ipmi freeipmi) \
+		$(use_with snmp) \
+		$(use_with ssl) \
+		$(use_with tcpd wrap) \
+		$(use_with usb) \
+		$(use_with xml neon) \
+		$(use_with zeroconf avahi) \
+		${myconf}
+}
+
+src_install() {
+	emake DESTDIR="${D}" install || die
+
+	find "${D}" -name '*.la' -delete || die
+
+	dodir /sbin
+	dosym /usr/sbin/upsdrvctl /sbin/upsdrvctl
+
+	if use cgi; then
+		elog "CGI monitoring scripts are installed in /usr/share/nut/cgi."
+		elog "copy them to your web server's ScriptPath to activate (this is a"
+		elog "change from the old location)."
+		elog "If you use lighttpd, see lighttpd_nut.conf in the documentation."
+	fi
+
+	# this must be done after all of the install phases
+	for i in "${D}"/etc/nut/*.sample ; do
+		mv "${i}" "${i/.sample/}" || die
+	done
+
+	local DOCS=( AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING )
+	einstalldocs
+
+	newdoc lib/README README.lib
+	newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf
+
+	docinto cables
+	dodoc docs/cables/*
+
+	newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd
+	newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv
+	newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon
+	newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog
+	newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail
+
+	keepdir /var/lib/nut
+
+	einfo "Setting up permissions on files and directories"
+	fperms 0700 /var/lib/nut
+	fowners nut:nut /var/lib/nut
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	eval fperms 0640 ${NUT_PRIVATE_FILES}
+	eval fowners root:nut ${NUT_PRIVATE_FILES}
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	eval fperms 0644 ${NUT_PUBLIC_FILES}
+	eval fowners root:root ${NUT_PUBLIC_FILES}
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	if use cgi; then
+		eval fperms 0644 ${NUT_CGI_FILES}
+		eval fowners root:root ${NUT_CGI_FILES}
+	fi
+
+	# this is installed for 2.4 and fbsd guys
+	if ! has_version virtual/udev; then
+		einfo "Installing non-udev hotplug support"
+		insinto /etc/hotplug/usb
+		insopts -m 755
+		doins scripts/hotplug/nut-usbups.hotplug
+	fi
+
+	newbashcomp "${S}"/scripts/misc/nut.bash_completion upsc
+	bashcomp_alias upsc upscmd upsd upsdrvctl upsmon upsrw
+}
+
+pkg_postinst() {
+	# this is to ensure that everybody that installed old versions still has
+	# correct permissions
+
+	chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null
+	chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
+	eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
+	eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	if use cgi; then
+		eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
+		eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
+	fi
+
+	warningmsg elog
+}
+
+warningmsg() {
+	msgfunc="$1"
+	[ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!"
+	${msgfunc} "Please note that NUT now runs under the 'nut' user."
+	${msgfunc} "NUT is in the uucp group for access to RS-232 UPS."
+	${msgfunc} "However if you use a USB UPS you may need to look at the udev or"
+	${msgfunc} "hotplug rules that are installed, and alter them suitably."
+	${msgfunc} ''
+	${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream."
+	${msgfunc} ''
+	${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore."
+	${msgfunc} "If you have multiple UPS units, you can use their NUT names to"
+	${msgfunc} "have a service per UPS:"
+	${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME"
+	${msgfunc} ''
+	${msgfunc} 'If you want apcupsd to power off your UPS when it'
+	${msgfunc} 'shuts down your system in a power failure, you must'
+	${msgfunc} 'add nut.powerfail to your shutdown runlevel:'
+	${msgfunc} ''
+	${msgfunc} 'rc-update add nut.powerfail shutdown'
+	${msgfunc} ''
+
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-power/nut/, sys-power/nut/files/
@ 2018-10-27 22:10 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2018-10-27 22:10 UTC (permalink / raw
  To: gentoo-commits

commit:     b3f86ee8839870abdb3a0973e02ecaf0efac8033
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 27 22:06:58 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Oct 27 22:06:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3f86ee8

sys-power/nut: Drop old

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 sys-power/nut/Manifest                            |   3 -
 sys-power/nut/files/nut-2.4.1-no-libdummy.patch   |  18 -
 sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch |  21 -
 sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch  | 448 ----------------------
 sys-power/nut/files/nut-2.7.1-fix-scanning.patch  |  72 ----
 sys-power/nut/nut-2.6.5-r1.ebuild                 | 231 -----------
 sys-power/nut/nut-2.7.2-r2.ebuild                 | 274 -------------
 sys-power/nut/nut-2.7.3.ebuild                    | 269 -------------
 sys-power/nut/nut-2.7.4-r1.ebuild                 |   3 -
 sys-power/nut/nut-2.7.4.ebuild                    | 269 -------------
 10 files changed, 1608 deletions(-)

diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest
index 43fa488aacc..898249c21a8 100644
--- a/sys-power/nut/Manifest
+++ b/sys-power/nut/Manifest
@@ -1,4 +1 @@
-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

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 31a8e73e54f..00000000000
--- 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.3-CVE-2012-2944.patch b/sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch
deleted file mode 100644
index 9debd3b9da3..00000000000
--- 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 96ac91d0a48..00000000000
--- 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 6ef5e681ba9..00000000000
--- 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/nut-2.6.5-r1.ebuild b/sys-power/nut/nut-2.6.5-r1.ebuild
deleted file mode 100644
index 02735da8d6b..00000000000
--- 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 f787827f293..00000000000
--- a/sys-power/nut/nut-2.7.2-r2.ebuild
+++ /dev/null
@@ -1,274 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs
-
-MY_P=${P/_/-}
-
-DESCRIPTION="Network-UPS Tools"
-HOMEPAGE="http://www.networkupstools.org/"
-# Nut mirrors are presently broken
-SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz
-	 http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~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-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 efe9d9f33f9..00000000000
--- a/sys-power/nut/nut-2.7.3.ebuild
+++ /dev/null
@@ -1,269 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs
-
-MY_P=${P/_/-}
-
-DESCRIPTION="Network-UPS Tools"
-HOMEPAGE="http://www.networkupstools.org/"
-# Nut mirrors are presently broken
-SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz
-	 http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm ppc ppc64 x86 ~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-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 3d3d49eec6f..ebebb9ba345 100644
--- a/sys-power/nut/nut-2.7.4-r1.ebuild
+++ b/sys-power/nut/nut-2.7.4-r1.ebuild
@@ -90,9 +90,6 @@ src_prepare() {
 
 	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.ebuild
deleted file mode 100644
index 236c60cfcba..00000000000
--- a/sys-power/nut/nut-2.7.4.ebuild
+++ /dev/null
@@ -1,269 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs
-
-MY_P=${P/_/-}
-
-DESCRIPTION="Network-UPS Tools"
-HOMEPAGE="http://www.networkupstools.org/"
-# Nut mirrors are presently broken
-SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz
-	 http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~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-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} ''
-
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-power/nut/, sys-power/nut/files/
@ 2020-08-04 21:23 Matthew Thode
  0 siblings, 0 replies; 5+ messages in thread
From: Matthew Thode @ 2020-08-04 21:23 UTC (permalink / raw
  To: gentoo-commits

commit:     dcb1d36204c9aafa865f80a7ae1374cad1aa4529
Author:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  4 21:22:36 2020 +0000
Commit:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Tue Aug  4 21:22:54 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcb1d362

sys-power/nut: 2.7.4-r6 add py3 compat

Closes: https://bugs.gentoo.org/735498
Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>

 sys-power/nut/files/nut-2.7.4-py3.patch |  56 +++++++
 sys-power/nut/nut-2.7.4-r6.ebuild       | 272 ++++++++++++++++++++++++++++++++
 2 files changed, 328 insertions(+)

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

diff --git a/sys-power/nut/nut-2.7.4-r6.ebuild b/sys-power/nut/nut-2.7.4-r6.ebuild
new file mode 100644
index 00000000000..c87a595fd37
--- /dev/null
+++ b/sys-power/nut/nut-2.7.4-r6.ebuild
@@ -0,0 +1,272 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools bash-completion-r1 desktop fixheadtails flag-o-matic systemd toolchain-funcs user
+
+MY_P=${P/_/-}
+
+DESCRIPTION="Network-UPS Tools"
+HOMEPAGE="https://www.networkupstools.org/"
+SRC_URI="https://networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+
+IUSE="cgi ipmi snmp +usb selinux split-usr ssl tcpd xml zeroconf"
+
+DEPEND="
+	dev-libs/libltdl:*
+	net-libs/libnsl
+	virtual/udev
+	cgi? ( >=media-libs/gd-2[png] )
+	ipmi? ( sys-libs/freeipmi )
+	snmp? ( net-analyzer/net-snmp )
+	ssl? ( >=dev-libs/openssl-1:= )
+	tcpd? ( sys-apps/tcp-wrappers )
+	usb? ( virtual/libusb:0= )
+	xml? ( >=net-libs/neon-0.25.0 )
+	zeroconf? ( net-dns/avahi )"
+
+BDEPEND="
+	virtual/pkgconfig"
+
+RDEPEND="${DEPEND}
+	selinux? ( sec-policy/selinux-nut )"
+
+S="${WORKDIR}/${MY_P}"
+
+# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package
+SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx"
+SNMP_DRIVERLIST="snmp-ups"
+USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx"
+USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST}
+#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx"
+NEONXML_DRIVERLIST="netxml-ups"
+IPMI_DRIVERLIST="nut-ipmipsu"
+# Now we build from it:
+for name in ${SERIAL_DRIVERLIST} ; do
+	IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
+done
+for name in ${USB_DRIVERLIST} ; do
+	IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
+	REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )"
+done
+for name in ${NEONXML_DRIVERLIST}; do
+	IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
+	REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )"
+done
+for name in ${SNMP_DRIVERLIST} ; do
+	IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
+	REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )"
+done
+for name in ${IPMI_DRIVERLIST} ; do
+	IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
+	REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )"
+done
+IUSE="${IUSE} ${IUSE_UPS_DRIVERS}"
+
+# public files should be 644 root:root
+NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf"
+# private files should be 640 root:nut - readable by nut, writeable by root,
+NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
+# public files should be 644 root:root, only installed if USE=cgi
+NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.7.2-no-libdummy.patch
+	"${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch
+	"${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
+	"${FILESDIR}"/nut-openssl-1.1-support.patch
+	"${FILESDIR}"/nut-2.7.4-py3.patch
+)
+
+pkg_setup() {
+	enewgroup nut 84
+	enewuser nut 84 -1 /var/lib/nut nut,uucp
+	# As of udev-104, NUT must be in uucp and NOT in tty.
+	gpasswd -d nut tty 2>/dev/null
+	gpasswd -a nut uucp 2>/dev/null
+	# in some cases on old systems it wasn't in the nut group either!
+	gpasswd -a nut nut 2>/dev/null
+	warningmsg ewarn
+}
+
+src_prepare() {
+	default
+
+	sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
+		-e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \
+		-i configure.ac || die
+
+	sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
+		-i scripts/udev/Makefile.am || die
+
+	rm ltmain.sh m4/lt* m4/libtool.m4 || die
+
+	sed -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \
+		-i lib/libupsclient{.pc,-config}.in || die #361685
+
+	eautoreconf
+}
+
+src_configure() {
+	local myconf
+	append-flags -fno-lto
+	tc-export CC
+	tc-export CXX
+	tc-export AR
+
+	local UPS_DRIVERS=""
+	for u in $USE ; do
+		u2=${u#ups_drivers_}
+		[[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}"
+	done
+	UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }"
+	myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}"
+
+	use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi"
+
+	# TODO: USE flag for sys-power/powerman
+	econf \
+		--sysconfdir=/etc/nut \
+		--datarootdir=/usr/share/nut \
+		--datadir=/usr/share/nut \
+		--disable-static \
+		--with-statepath=/var/lib/nut \
+		--with-drvpath=/$(get_libdir)/nut \
+		--with-htmlpath=/usr/share/nut/html \
+		--with-user=nut \
+		--with-group=nut \
+		--with-logfacility=LOG_DAEMON \
+		--with-dev \
+		--with-serial \
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+		--without-powerman \
+		$(use_with cgi) \
+		$(use_with ipmi) \
+		$(use_with ipmi freeipmi) \
+		$(use_with snmp) \
+		$(use_with ssl) \
+		$(use_with tcpd wrap) \
+		$(use_with usb) \
+		$(use_with xml neon) \
+		$(use_with zeroconf avahi) \
+		${myconf}
+}
+
+src_install() {
+	emake DESTDIR="${D}" install
+
+	find "${D}" -name '*.la' -delete || die
+
+	dodir /sbin
+	use split-usr && dosym ../usr/sbin/upsdrvctl /sbin/upsdrvctl
+
+	if use cgi; then
+		elog "CGI monitoring scripts are installed in /usr/share/nut/cgi."
+		elog "copy them to your web server's ScriptPath to activate (this is a"
+		elog "change from the old location)."
+		elog "If you use lighttpd, see lighttpd_nut.conf in the documentation."
+	fi
+
+	# this must be done after all of the install phases
+	for i in "${D}"/etc/nut/*.sample ; do
+		mv "${i}" "${i/.sample/}" || die
+	done
+
+	local DOCS=( AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING )
+	einstalldocs
+
+	newdoc lib/README README.lib
+	newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf
+
+	docinto cables
+	dodoc docs/cables/*
+
+	newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd
+	newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv
+	newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon
+	newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog
+	newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail
+
+	keepdir /var/lib/nut
+
+	einfo "Setting up permissions on files and directories"
+	fperms 0700 /var/lib/nut
+	fowners nut:nut /var/lib/nut
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	eval fperms 0640 ${NUT_PRIVATE_FILES}
+	eval fowners root:nut ${NUT_PRIVATE_FILES}
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	eval fperms 0644 ${NUT_PUBLIC_FILES}
+	eval fowners root:root ${NUT_PUBLIC_FILES}
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	if use cgi; then
+		eval fperms 0644 ${NUT_CGI_FILES}
+		eval fowners root:root ${NUT_CGI_FILES}
+	fi
+
+	# this is installed for 2.4 and fbsd guys
+	if ! has_version virtual/udev; then
+		einfo "Installing non-udev hotplug support"
+		insinto /etc/hotplug/usb
+		insopts -m 755
+		doins scripts/hotplug/nut-usbups.hotplug
+	fi
+
+	newbashcomp "${S}"/scripts/misc/nut.bash_completion upsc
+	bashcomp_alias upsc upscmd upsd upsdrvctl upsmon upsrw
+}
+
+pkg_postinst() {
+	# this is to ensure that everybody that installed old versions still has
+	# correct permissions
+
+	chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null
+	chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
+	eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
+	eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
+
+	# Do not remove eval here, because the variables contain shell expansions.
+	if use cgi; then
+		eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
+		eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
+	fi
+
+	warningmsg elog
+}
+
+warningmsg() {
+	msgfunc="$1"
+	[ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!"
+	${msgfunc} "Please note that NUT now runs under the 'nut' user."
+	${msgfunc} "NUT is in the uucp group for access to RS-232 UPS."
+	${msgfunc} "However if you use a USB UPS you may need to look at the udev or"
+	${msgfunc} "hotplug rules that are installed, and alter them suitably."
+	${msgfunc} ''
+	${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream."
+	${msgfunc} ''
+	${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore."
+	${msgfunc} "If you have multiple UPS units, you can use their NUT names to"
+	${msgfunc} "have a service per UPS:"
+	${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME"
+	${msgfunc} ''
+	${msgfunc} 'If you want apcupsd to power off your UPS when it'
+	${msgfunc} 'shuts down your system in a power failure, you must'
+	${msgfunc} 'add nut.powerfail to your shutdown runlevel:'
+	${msgfunc} ''
+	${msgfunc} 'rc-update add nut.powerfail shutdown'
+	${msgfunc} ''
+
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-power/nut/, sys-power/nut/files/
@ 2021-08-04 23:17 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2021-08-04 23:17 UTC (permalink / raw
  To: gentoo-commits

commit:     a56c59f4e9869ff686227c848b4402a281974fb9
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue May  4 14:16:41 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug  4 23:17:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a56c59f4

sys-power/nut: Fix for slibtool

Thanks-to: orbea <orbea <AT> riseup.net>
Upstream: https://github.com/networkupstools/nut/commit/5d98d55
Upstream: https://github.com/networkupstools/nut/commit/a0328e3
Closes: https://bugs.gentoo.org/778584
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/20689
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-power/nut/files/nut-2.7.2-no-libdummy.patch | 13 ------
 sys-power/nut/files/nut-2.7.4-nut-scanner.patch | 35 ++++++++++++++
 sys-power/nut/files/nut-2.7.4-slibtool.patch    | 61 +++++++++++++++++++++++++
 sys-power/nut/nut-2.7.4-r7.ebuild               |  3 +-
 4 files changed, 98 insertions(+), 14 deletions(-)

diff --git a/sys-power/nut/files/nut-2.7.2-no-libdummy.patch b/sys-power/nut/files/nut-2.7.2-no-libdummy.patch
deleted file mode 100644
index ca0d8be028f..00000000000
--- a/sys-power/nut/files/nut-2.7.2-no-libdummy.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/drivers/Makefile.am b/drivers/Makefile.am
-index 99614ca..42b3611 100644
---- a/drivers/Makefile.am
-+++ b/drivers/Makefile.am
-@@ -267,5 +267,6 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h    \
-
- # Define a dummy library so that Automake builds rules for the
- # corresponding object files.  This library is not actually built,
--EXTRA_LIBRARIES = libdummy.a
--libdummy_a_SOURCES = main.c dstate.c serial.c
-+EXTRA_LIBRARIES =
-+#EXTRA_LIBRARIES = libdummy.a
-+#libdummy_a_SOURCES = main.c dstate.c serial.c

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

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

diff --git a/sys-power/nut/nut-2.7.4-r7.ebuild b/sys-power/nut/nut-2.7.4-r7.ebuild
index fe89715a5ff..d1fe21dbae5 100644
--- a/sys-power/nut/nut-2.7.4-r7.ebuild
+++ b/sys-power/nut/nut-2.7.4-r7.ebuild
@@ -83,11 +83,12 @@ NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
 NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}"
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-2.7.2-no-libdummy.patch
 	"${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch
 	"${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
 	"${FILESDIR}"/nut-openssl-1.1-support.patch
 	"${FILESDIR}"/nut-2.7.4-py3.patch
+	"${FILESDIR}"/nut-2.7.4-nut-scanner.patch
+	"${FILESDIR}"/nut-2.7.4-slibtool.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-04 23:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-04 23:17 [gentoo-commits] repo/gentoo:master commit in: sys-power/nut/, sys-power/nut/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2020-08-04 21:23 Matthew Thode
2018-10-27 22:10 Andreas Sturmlechner
2018-10-27 19:02 Andreas Sturmlechner
2016-11-08 18:33 Robin H. Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox