From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3249D15803E for ; Mon, 1 Jan 2024 00:12:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F17EB2BC038; Mon, 1 Jan 2024 00:12:32 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CC1772BC038 for ; Mon, 1 Jan 2024 00:12:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CA5E933D3C2 for ; Mon, 1 Jan 2024 00:12:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1249811DB for ; Mon, 1 Jan 2024 00:12:30 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1704067933.53b5eaaeadda10e7c5591a9ff9452e9dde21af78.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/nut/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-power/nut/nut-2.8.0-r3.ebuild sys-power/nut/nut-9999.ebuild X-VCS-Directories: sys-power/nut/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 53b5eaaeadda10e7c5591a9ff9452e9dde21af78 X-VCS-Branch: master Date: Mon, 1 Jan 2024 00:12:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 47a4a643-226e-4579-9776-626c3f50386b X-Archives-Hash: 67966d3bf233cb90d3b1f806633ae7c4 commit: 53b5eaaeadda10e7c5591a9ff9452e9dde21af78 Author: Eli Schwartz gmail com> AuthorDate: Sun Dec 31 18:48:50 2023 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jan 1 00:12:13 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53b5eaae sys-power/nut: fix confusing split-usr handling Almost a decade ago, upstream moved their binary from libdir to sbindir. Historically, Gentoo symlinked the binary into sbindir to make up for this -- and when upstream moved to follow the Gentoo layout, the Gentoo symlink overwrote the actual binary. For some reason, at the time, the solution used was to add a USE=split-usr and install extra symlinks for /sbin -> /usr/sbin even though this didn't actually do something meaningful. The split-usr USE flag has issues and using it unnecessarily should be avoided if possible. Drop the USE flag, and the symlink, and stick with /usr/sbin as upstream intends. This should be 100% fine in all cases. The /sbin directory is only needed for users who both have /usr on a different partition, *and* don't use an initramfs. In such a case, it is nonsensical to provide a symlink in /sbin that is a broken symlink to an un-mounted partition. Bug: https://bugs.gentoo.org/517954 Signed-off-by: Eli Schwartz gmail.com> Signed-off-by: Sam James gentoo.org> .../nut/{nut-9999.ebuild => nut-2.8.0-r3.ebuild} | 65 ++++------------------ sys-power/nut/nut-9999.ebuild | 3 +- 2 files changed, 12 insertions(+), 56 deletions(-) diff --git a/sys-power/nut/nut-9999.ebuild b/sys-power/nut/nut-2.8.0-r3.ebuild similarity index 73% copy from sys-power/nut/nut-9999.ebuild copy to sys-power/nut/nut-2.8.0-r3.ebuild index a56635519b2d..20eea7107c63 100644 --- a/sys-power/nut/nut-9999.ebuild +++ b/sys-power/nut/nut-2.8.0-r3.ebuild @@ -3,9 +3,8 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) -inherit bash-completion-r1 desktop flag-o-matic linux-info optfeature -inherit python-single-r1 systemd tmpfiles toolchain-funcs udev wrapper xdg +inherit bash-completion-r1 flag-o-matic linux-info optfeature systemd +inherit tmpfiles toolchain-funcs udev MY_P=${P/_/-} @@ -17,37 +16,27 @@ if [[ ${PV} == *9999 ]] ; then inherit git-r3 else SRC_URI="https://networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" - KEYWORDS="~amd64 ~arm64 ~x86" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" fi S="${WORKDIR}/${MY_P}" LICENSE="GPL-2" SLOT="0" -IUSE="gpio cgi doc ipmi serial i2c +man snmp +usb modbus selinux split-usr ssl tcpd test xml zeroconf python monitor systemd" +IUSE="cgi doc ipmi serial i2c +man snmp +usb modbus selinux ssl tcpd test xml zeroconf" RESTRICT="!test? ( test )" -REQUIRED_USE=" - monitor? ( python ) - python? ( ${PYTHON_REQUIRED_USE} ) - snmp? ( python ) -" - -# sys-apps/systemd-253 required for Type=notify-reload DEPEND=" acct-group/nut acct-user/nut dev-libs/libltdl virtual/udev cgi? ( >=media-libs/gd-2[png] ) - gpio? ( dev-libs/libgpiod ) i2c? ( sys-apps/i2c-tools ) ipmi? ( sys-libs/freeipmi ) modbus? ( dev-libs/libmodbus ) - python? ( ${PYTHON_DEPS} ) snmp? ( net-analyzer/net-snmp:= ) ssl? ( >=dev-libs/openssl-1:= ) - systemd? ( >=sys-apps/systemd-253 ) tcpd? ( sys-apps/tcp-wrappers ) usb? ( virtual/libusb:1 ) xml? ( >=net-libs/neon-0.25.0:= ) @@ -60,16 +49,11 @@ BDEPEND=" " RDEPEND=" ${DEPEND} - monitor? ( $(python_gen_cond_dep ' - dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] - ') - ) selinux? ( sec-policy/selinux-nut ) " PATCHES=( "${FILESDIR}/${PN}-2.6.2-lowspeed-buffer-size.patch" - "${FILESDIR}/systemd_notify.path" ) pkg_pretend() { @@ -82,10 +66,6 @@ pkg_pretend() { ERROR_HIDRAW="HIDRAW is needed to support USB UPSes" ERROR_I2C_CHARDEV="USB_HIDDEV is needed to support USB UPSes" fi - if use gpio; then - CONFIG_CHECK="~GPIO_CDEV_V1" - ERROR_GPIO_CDEV_V1="GPIO_CDEV_V1 is needed to support GPIO UPSes" - fi if use serial; then CONFIG_CHECK="~SERIAL_8250" ERROR_SERIAL_8250="SERIAL_8250 is needed to support Serial UPSes" @@ -95,18 +75,12 @@ pkg_pretend() { check_extra_config } -pkg_setup() { - use python && python-single-r1_pkg_setup -} - src_prepare() { default if [[ ${PV} == *9999 ]] ; then ./autogen.sh || die fi - - xdg_environment_reset } src_configure() { @@ -130,19 +104,17 @@ src_configure() { --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 gpio) $(use_with i2c linux_i2c) $(use_with ipmi freeipmi) $(use_with ipmi) - $(use_with monitor nut_monitor) - $(use_with python pynut) $(use_with serial) $(use_with snmp) $(use_with ssl) - $(use_with systemd libsystemd) $(use_with tcpd wrap) $(use_with usb) $(use_with xml neon) @@ -155,7 +127,6 @@ src_configure() { use cgi && myeconfargs+=( --with-cgipath=/usr/share/nut/cgi ) use man && myeconfargs+=( --with-doc=man ) - use python && myeconfargs+=( --with-python3="${PYTHON}" ) || myeconfargs+=( --without-python3 ) export bashcompdir="$(get_bashcompdir)" @@ -170,7 +141,6 @@ src_install() { 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." @@ -187,11 +157,11 @@ src_install() { mv "${i}" "${i/.sample/}" || die done - local DOCS=( AUTHORS MAINTAINERS NEWS.adoc README.adoc TODO.adoc UPGRADING.adoc ) + local DOCS=( AUTHORS MAINTAINERS NEWS README TODO UPGRADING ) einstalldocs if use doc; then - newdoc lib/README.adoc + newdoc lib/README README.lib dodoc docs/*.txt docinto cables dodoc docs/cables/* @@ -211,21 +181,10 @@ src_install() { doins scripts/avahi/nut.service fi - if use monitor; then - make_wrapper NUT-Monitor-py3qt5 /usr/share/nut/nut-monitor/app/NUT-Monitor-py3qt5 /usr/share/nut/nut-monitor/app - - # Install desktop shortcut - newmenu scripts/python/app/nut-monitor-py3qt5.desktop nut-monitor.desktop - - # Installing Application icons - local res - for res in 48 64 256; do - doicon -s ${res} scripts/python/app/icons/${res}x${res}/nut-monitor.png - done - doicon -s scalable scripts/python/app/icons/scalable/nut-monitor.svg - fi + mv "${ED}"/usr/lib/tmpfiles.d/nut-common.tmpfiles "${ED}"/usr/lib/tmpfiles.d/nut-common-tmpfiles.conf || die - use python && python_optimize + # Fix double directory + sed -i -e 's:/nut/nut:/nut:g' "${ED}"/usr/lib/tmpfiles.d/nut-common-tmpfiles.conf || die } pkg_postinst() { @@ -254,10 +213,8 @@ pkg_postinst() { udev_reload tmpfiles_process nut-common-tmpfiles.conf - xdg_pkg_postinst } pkg_postrm() { udev_reload - xdg_pkg_postrm } diff --git a/sys-power/nut/nut-9999.ebuild b/sys-power/nut/nut-9999.ebuild index a56635519b2d..22a0e6bc597a 100644 --- a/sys-power/nut/nut-9999.ebuild +++ b/sys-power/nut/nut-9999.ebuild @@ -24,7 +24,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="GPL-2" SLOT="0" -IUSE="gpio cgi doc ipmi serial i2c +man snmp +usb modbus selinux split-usr ssl tcpd test xml zeroconf python monitor systemd" +IUSE="gpio cgi doc ipmi serial i2c +man snmp +usb modbus selinux ssl tcpd test xml zeroconf python monitor systemd" RESTRICT="!test? ( test )" REQUIRED_USE=" @@ -170,7 +170,6 @@ src_install() { 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."