From 6e9fa3a4a14685a33fc9182895e5529c293bae2e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 9 Aug 2023 09:29:40 +0100 Subject: gentoo auto-resync : 09:08:2023 - 09:29:39 --- sys-power/nut/Manifest | 4 +- sys-power/nut/nut-2.8.0-r1.ebuild | 220 ------------------------------------- sys-power/nut/nut-2.8.0-r2.ebuild | 221 ++++++++++++++++++++++++++++++++++++++ sys-power/nut/nut-9999.ebuild | 1 + 4 files changed, 224 insertions(+), 222 deletions(-) delete mode 100644 sys-power/nut/nut-2.8.0-r1.ebuild create mode 100644 sys-power/nut/nut-2.8.0-r2.ebuild (limited to 'sys-power/nut') diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest index 93b643a57522..6b9cb269a621 100644 --- a/sys-power/nut/Manifest +++ b/sys-power/nut/Manifest @@ -15,6 +15,6 @@ AUX systemd_notify.path 1753 BLAKE2B a44167bf491b393474b94ee4c375013cd23d1e11513 DIST nut-2.7.4.tar.gz 2509831 BLAKE2B 367c687efd739150898a14c700d5fddbe22bf926522923e1842011ec49b67d6638620500c4eda50291feb474cc6eef39fff63764cb3e0fad5898abee981f8308 SHA512 320c4aff85d8a370c5eff77d33924fdfc3caf6a250620693cdd5bf3336b3a80d8a207488eee841bcf8b72fbad68fda4c074e63b99c56e7886716fc934122d11a DIST nut-2.8.0.tar.gz 3287640 BLAKE2B 6ad87e9c90920d45846d9c1311e8feeb3c36bfa506d62d938940c00d2fc7f7b30632d079a8ee969db624824ae4fd3e14e41e8acd1eda296e26a3aa340f186b94 SHA512 3c413ae54088045a713eb80cf1bdda474f41bb3b67c7c0248aa7a0c4d441dce1ff42627a2735273d7e36892d1f2eeb895220cf28af63fec2fa0c7a267f82d577 EBUILD nut-2.7.4-r8.ebuild 8839 BLAKE2B df9cfb0d44952cf6847964a15721153a57f4effd146ef9f9ffcff29c87a09038167ff74009a086132d21a06ae72a16a6c39758eb2cbe59e6eb1b4a660ccb3e7a SHA512 8cae8d96ad22e44ba3594ee09e399dee5a566e5e16b140a5fd707d2f4efc794655fa6cf83602ba4c3a7667cb304294a7b3898ed28812a0ec56dad01e26312fd0 -EBUILD nut-2.8.0-r1.ebuild 5794 BLAKE2B a018e446a9437072aa7cde9491bdea61cb3a996f866183a7e0d6235844ecfdbbf3146971162ecadd1fa586f6c4abdebed1cb87182d0d16bf0d70756a5e18f806 SHA512 f2a0ecb0f1c99318537bb202fd6d0cac4dc7fb59ed6037c50a47bfb03e5333a2e7038420eecc5d9f13af4fc01bc1df7560a5c5086eddd5ec9613a862e8b15bea -EBUILD nut-9999.ebuild 6921 BLAKE2B 4b9436e707fd4806968b500e49b7b535b953e538936e3ecc2584b59f1dd4c79db173cc54f87bc66a902a40c659144bce70f5366dba6c9ed9b1efaca9c78bb9e8 SHA512 430d445736f9bad1c3866edc1d7f16656f0d278fcc914cfacf2884d6b89da027fe65cc4205c2d719a60fe88cf617ccbcd2291ef58c41ce465823f94be4c261f8 +EBUILD nut-2.8.0-r2.ebuild 5812 BLAKE2B 61f9efdd7b08e973d5e50b38ab54c5930784c00ce4deee9fea509a757fb2fa5c23fa10be14aca42a435d45c96c294077ad0c05e73f1d424625dafa09d5e15225 SHA512 60fb42063f433a606cfc25674bbb762c9aed188b9627be6954ec1792a533c19f71e0ffc72edc0a333e4a7946ab9b0a1f67042200eb8ffd8cb5c07101a8fb45f5 +EBUILD nut-9999.ebuild 6939 BLAKE2B b549455023f79afd727447cd2f08b918cda147ad2cd33402e2202f98f7f677ee7d66a656fbfdf54cc039d6b39b74a1f5acb37b3645172aa7be62f77298ba48c6 SHA512 a07dc21acf875173b291641af10e2b9ba479d0c2a8416d2e328748a40682fd75714f9cd1d5c117c25d1282665980eb446836f920e6741b54b109ab736734eb42 MISC metadata.xml 6068 BLAKE2B 499dd975b0364733e71175eb061d935f754343d32d6eba547a26659438a0488a25509e907516b73d7bfd9714be28bc2159dd8688d2578611c9b9fca419881446 SHA512 cc42c7645c78516a2b2e82ec09098c88c1f7fbcc68f5685906811b9182dd4869c31c4eb865c5deab8cc105cf24e32161cf7db746fe793e6bea08fbf12f561e79 diff --git a/sys-power/nut/nut-2.8.0-r1.ebuild b/sys-power/nut/nut-2.8.0-r1.ebuild deleted file mode 100644 index a7497d227ba4..000000000000 --- a/sys-power/nut/nut-2.8.0-r1.ebuild +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit bash-completion-r1 flag-o-matic linux-info optfeature systemd -inherit tmpfiles toolchain-funcs udev - -MY_P=${P/_/-} - -DESCRIPTION="Network-UPS Tools" -HOMEPAGE="https://networkupstools.org/" - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/networkupstools/${PN}.git" - inherit git-r3 -else - SRC_URI="https://networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" -fi - -S="${WORKDIR}/${MY_P}" - -LICENSE="GPL-2" -SLOT="0" -IUSE="cgi doc ipmi serial i2c +man snmp +usb modbus selinux split-usr ssl tcpd test xml zeroconf" -RESTRICT="!test? ( test )" - -DEPEND=" - acct-group/nut - acct-user/nut - dev-libs/libltdl - virtual/udev - cgi? ( >=media-libs/gd-2[png] ) - i2c? ( sys-apps/i2c-tools ) - ipmi? ( sys-libs/freeipmi ) - modbus? ( dev-libs/libmodbus ) - snmp? ( net-analyzer/net-snmp:= ) - ssl? ( >=dev-libs/openssl-1:= ) - tcpd? ( sys-apps/tcp-wrappers ) - usb? ( virtual/libusb:1 ) - xml? ( >=net-libs/neon-0.25.0:= ) - zeroconf? ( net-dns/avahi ) -" -BDEPEND=" - virtual/pkgconfig - man? ( app-text/asciidoc ) - test? ( dev-util/cppunit ) -" -RDEPEND=" - ${DEPEND} - selinux? ( sec-policy/selinux-nut ) -" - -PATCHES=( - "${FILESDIR}/${PN}-2.6.2-lowspeed-buffer-size.patch" -) - -pkg_pretend() { - if use i2c; then - CONFIG_CHECK="~I2C_CHARDEV" - ERROR_I2C_CHARDEV="You must enable I2C_CHARDEV in your kernel to continue" - fi - if use usb; then - CONFIG_CHECK+=" ~HIDRAW ~USB_HIDDEV" - ERROR_HIDRAW="HIDRAW is needed to support USB UPSes" - ERROR_I2C_CHARDEV="USB_HIDDEV is needed to support USB UPSes" - fi - if use serial; then - CONFIG_CHECK="~SERIAL_8250" - ERROR_SERIAL_8250="SERIAL_8250 is needed to support Serial UPSes" - fi - - # Now do the actual checks setup above - check_extra_config -} - -src_prepare() { - default - - if [[ ${PV} == *9999 ]] ; then - ./autogen.sh || die - fi -} - -src_configure() { - local myeconfargs=( - --datadir=/usr/share/nut - --datarootdir=/usr/share/nut - --disable-static - --disable-strip - --disable-Werror - --sysconfdir=/etc/nut - --with-dev - --with-drvpath="/$(get_libdir)/nut" - --with-group=nut - --with-htmlpath=/usr/share/nut/html - --with-logfacility=LOG_DAEMON - --with-statepath=/var/lib/nut - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" - --with-systemdtmpfilesdir="/usr/lib/tmpfiles.d" - --with-udev-dir="$(get_udevdir)" - --with-user=nut - --without-powerman - --without-python - --without-python2 - --without-python3 - --with-altpidpath=/run/nut - --with-pidpath=/run/nut - $(use_enable test cppunit) - $(use_with i2c linux_i2c) - $(use_with ipmi freeipmi) - $(use_with ipmi) - $(use_with serial) - $(use_with snmp) - $(use_with ssl) - $(use_with tcpd wrap) - $(use_with usb) - $(use_with xml neon) - $(use_with zeroconf avahi) - ) - - filter-lto - append-flags -fno-lto - tc-export CC CXX AR - - use cgi && myeconfargs+=( --with-cgipath=/usr/share/nut/cgi ) - use man && myeconfargs+=( --with-doc=man ) - - export bashcompdir="$(get_bashcompdir)" - - econf "${myeconfargs[@]}" -} - -src_install() { - default - - rm -rf "${ED}/etc/hotplug" || die - - find "${ED}" -name '*.la' -delete || die - - dodir /sbin - use split-usr && dosym ../usr/sbin/upsdrvctl /sbin/upsdrvctl - - if use cgi; then - elog "CGI monitoring scripts are installed in ${EPREFIX}/usr/share/nut/cgi." - 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." - elog - elog "Use script aliases according to the web server you use (apache, nginx, lighttpd, etc...)" - fi - - # This must be done after all of the install phases - local i - for i in "${ED}"/etc/nut/*.sample ; do - mv "${i}" "${i/.sample/}" || die - done - - local DOCS=( AUTHORS MAINTAINERS NEWS README TODO UPGRADING ) - einstalldocs - - if use doc; then - newdoc lib/README README.lib - dodoc docs/*.txt - docinto cables - dodoc docs/cables/* - fi - - newinitd "${FILESDIR}"/nut-2.8.0-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 - - newbashcomp "${S}"/scripts/misc/nut.bash_completion upsc - bashcomp_alias upsc upscmd upsd upsdrvctl upsmon upsrw - - if use zeroconf; then - insinto /etc/avahi/services - doins scripts/avahi/nut.service - fi - - mv "${ED}"/usr/lib/tmpfiles.d/nut-common.tmpfiles "${ED}"/usr/lib/tmpfiles.d/nut-common-tmpfiles.conf || die - - # Fix double directory - sed -i -e 's:/nut/nut:/nut:g' "${ED}"/usr/lib/tmpfiles.d/nut-common-tmpfiles.conf || die -} - -pkg_postinst() { - elog "Please note that NUT now runs under the 'nut' user." - elog "NUT is in the uucp group for access to RS-232 UPS." - elog "However if you use a USB UPS you may need to look at the udev or" - elog "hotplug rules that are installed, and alter them suitably." - elog - elog "You are strongly advised to read the UPGRADING file provided by upstream." - elog - elog "Please note that upsdrv is NOT automatically started by upsd anymore." - elog "If you have multiple UPS units, you can use their NUT names to" - elog "have a service per UPS:" - elog "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" - elog - elog 'If you want apcupsd to power off your UPS when it' - elog 'shuts down your system in a power failure, you must' - elog 'add nut.powerfail to your shutdown runlevel:' - elog - elog 'rc-update add nut.powerfail shutdown' - elog - - optfeature "all notify events generate a global message (wall) to all users, plus they are logged via the syslog" \ - sys-apps/util-linux[logger,tty-helpers] - - udev_reload - - tmpfiles_process nut-common-tmpfiles.conf -} - -pkg_postrm() { - udev_reload -} diff --git a/sys-power/nut/nut-2.8.0-r2.ebuild b/sys-power/nut/nut-2.8.0-r2.ebuild new file mode 100644 index 000000000000..be431f111c9e --- /dev/null +++ b/sys-power/nut/nut-2.8.0-r2.ebuild @@ -0,0 +1,221 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 flag-o-matic linux-info optfeature systemd +inherit tmpfiles toolchain-funcs udev + +MY_P=${P/_/-} + +DESCRIPTION="Network-UPS Tools" +HOMEPAGE="https://networkupstools.org/" + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/networkupstools/${PN}.git" + inherit git-r3 +else + SRC_URI="https://networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +fi + +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +IUSE="cgi doc ipmi serial i2c +man snmp +usb modbus selinux split-usr ssl tcpd test xml zeroconf" +RESTRICT="!test? ( test )" + +DEPEND=" + acct-group/nut + acct-user/nut + dev-libs/libltdl + virtual/udev + cgi? ( >=media-libs/gd-2[png] ) + i2c? ( sys-apps/i2c-tools ) + ipmi? ( sys-libs/freeipmi ) + modbus? ( dev-libs/libmodbus ) + snmp? ( net-analyzer/net-snmp:= ) + ssl? ( >=dev-libs/openssl-1:= ) + tcpd? ( sys-apps/tcp-wrappers ) + usb? ( virtual/libusb:1 ) + xml? ( >=net-libs/neon-0.25.0:= ) + zeroconf? ( net-dns/avahi ) +" +BDEPEND=" + virtual/pkgconfig + man? ( app-text/asciidoc ) + test? ( dev-util/cppunit ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-nut ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2.6.2-lowspeed-buffer-size.patch" +) + +pkg_pretend() { + if use i2c; then + CONFIG_CHECK="~I2C_CHARDEV" + ERROR_I2C_CHARDEV="You must enable I2C_CHARDEV in your kernel to continue" + fi + if use usb; then + CONFIG_CHECK+=" ~HIDRAW ~USB_HIDDEV" + ERROR_HIDRAW="HIDRAW is needed to support USB UPSes" + ERROR_I2C_CHARDEV="USB_HIDDEV is needed to support USB UPSes" + fi + if use serial; then + CONFIG_CHECK="~SERIAL_8250" + ERROR_SERIAL_8250="SERIAL_8250 is needed to support Serial UPSes" + fi + + # Now do the actual checks setup above + check_extra_config +} + +src_prepare() { + default + + if [[ ${PV} == *9999 ]] ; then + ./autogen.sh || die + fi +} + +src_configure() { + local myeconfargs=( + --datadir=/usr/share/nut + --datarootdir=/usr/share/nut + --disable-static + --disable-strip + --disable-Werror + --sysconfdir=/etc/nut + --with-dev + --with-drvpath="/$(get_libdir)/nut" + --with-group=nut + --with-htmlpath=/usr/share/nut/html + --with-logfacility=LOG_DAEMON + --with-statepath=/var/lib/nut + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + --with-systemdtmpfilesdir="/usr/lib/tmpfiles.d" + --with-udev-dir="$(get_udevdir)" + --with-user=nut + --without-powerman + --without-python + --without-python2 + --without-python3 + --with-altpidpath=/run/nut + --with-pidpath=/run/nut + $(use_enable test cppunit) + $(use_with cgi) + $(use_with i2c linux_i2c) + $(use_with ipmi freeipmi) + $(use_with ipmi) + $(use_with serial) + $(use_with snmp) + $(use_with ssl) + $(use_with tcpd wrap) + $(use_with usb) + $(use_with xml neon) + $(use_with zeroconf avahi) + ) + + filter-lto + append-flags -fno-lto + tc-export CC CXX AR + + use cgi && myeconfargs+=( --with-cgipath=/usr/share/nut/cgi ) + use man && myeconfargs+=( --with-doc=man ) + + export bashcompdir="$(get_bashcompdir)" + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + rm -rf "${ED}/etc/hotplug" || die + + find "${ED}" -name '*.la' -delete || die + + dodir /sbin + use split-usr && dosym ../usr/sbin/upsdrvctl /sbin/upsdrvctl + + if use cgi; then + elog "CGI monitoring scripts are installed in ${EPREFIX}/usr/share/nut/cgi." + 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." + elog + elog "Use script aliases according to the web server you use (apache, nginx, lighttpd, etc...)" + fi + + # This must be done after all of the install phases + local i + for i in "${ED}"/etc/nut/*.sample ; do + mv "${i}" "${i/.sample/}" || die + done + + local DOCS=( AUTHORS MAINTAINERS NEWS README TODO UPGRADING ) + einstalldocs + + if use doc; then + newdoc lib/README README.lib + dodoc docs/*.txt + docinto cables + dodoc docs/cables/* + fi + + newinitd "${FILESDIR}"/nut-2.8.0-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 + + newbashcomp "${S}"/scripts/misc/nut.bash_completion upsc + bashcomp_alias upsc upscmd upsd upsdrvctl upsmon upsrw + + if use zeroconf; then + insinto /etc/avahi/services + doins scripts/avahi/nut.service + fi + + mv "${ED}"/usr/lib/tmpfiles.d/nut-common.tmpfiles "${ED}"/usr/lib/tmpfiles.d/nut-common-tmpfiles.conf || die + + # Fix double directory + sed -i -e 's:/nut/nut:/nut:g' "${ED}"/usr/lib/tmpfiles.d/nut-common-tmpfiles.conf || die +} + +pkg_postinst() { + elog "Please note that NUT now runs under the 'nut' user." + elog "NUT is in the uucp group for access to RS-232 UPS." + elog "However if you use a USB UPS you may need to look at the udev or" + elog "hotplug rules that are installed, and alter them suitably." + elog + elog "You are strongly advised to read the UPGRADING file provided by upstream." + elog + elog "Please note that upsdrv is NOT automatically started by upsd anymore." + elog "If you have multiple UPS units, you can use their NUT names to" + elog "have a service per UPS:" + elog "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" + elog + elog 'If you want apcupsd to power off your UPS when it' + elog 'shuts down your system in a power failure, you must' + elog 'add nut.powerfail to your shutdown runlevel:' + elog + elog 'rc-update add nut.powerfail shutdown' + elog + + optfeature "all notify events generate a global message (wall) to all users, plus they are logged via the syslog" \ + sys-apps/util-linux[logger,tty-helpers] + + udev_reload + + tmpfiles_process nut-common-tmpfiles.conf +} + +pkg_postrm() { + udev_reload +} diff --git a/sys-power/nut/nut-9999.ebuild b/sys-power/nut/nut-9999.ebuild index 1a18e915356e..1d0b5e50edae 100644 --- a/sys-power/nut/nut-9999.ebuild +++ b/sys-power/nut/nut-9999.ebuild @@ -132,6 +132,7 @@ src_configure() { --without-python2 --with-altpidpath=/run/nut --with-pidpath=/run/nut + $(use_with cgi) $(use_with gpio) $(use_with i2c linux_i2c) $(use_with ipmi freeipmi) -- cgit v1.2.3