Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517954 - sys-power/nut-2.7.2 should install upsdrvctl binary
Summary: sys-power/nut-2.7.2 should install upsdrvctl binary
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-24 11:02 UTC by Guillaume Castagnino
Modified: 2024-01-01 00:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Castagnino 2014-07-24 11:02:00 UTC
Hi,


It seems that upsdrvctl has been moved by upstream. It’s no more installed in /$(get_libdir)/nut like in 2.7.1 but in /usr/sbin

The current ebuild create a symlink in /usr/bin, so it nukes the compiled binary. The fix is simple:

--- /usr/portage/sys-power/nut/nut-2.7.2.ebuild 2014-07-24 06:42:46.000000000 +0200
+++ nut-2.7.2.ebuild    2014-07-24 12:55:59.484887673 +0200
@@ -165,9 +165,8 @@
        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
+       dosym /usr/sbin/upsdrvctl /sbin/upsdrvctl

        if use cgi; then
                elog "CGI monitoring scripts are installed in /usr/share/nut/cgi."


For the record:
Portage 2.2.10 (hardened/linux/amd64/no-multilib, gcc-4.8.3, glibc-2.19-r1, 3.15.5-hardened-r2 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.15.5-hardened-r2-x86_64-Intel-R-_Atom-TM-_CPU_D510_@_1.66GHz-with-gentoo-2.2
KiB Mem:     2030484 total,    305708 free
KiB Swap:    1048704 total,   1047600 free
Timestamp of tree: Thu, 24 Jul 2014 07:30:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p47
dev-lang/python:          2.7.7, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.15 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo gcpan xwing local_portage
Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -mtune=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildsyspkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://dagobah.xwing.info/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/     http://mirror.ovh.net/gentoo-distfiles/ http://gentoo.tiscali.nl/"
LANG="fr_FR.utf8"
LC_ALL="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/gcpan-portage /usr/local/portage/portage /usr/local/portage/local-portage"
SYNC="rsync://dagobah.xwing.info/gentoo-portage"
USE="acl acpi adobe-cff amd64 bash-completion bashlogger bzip2 caps cli cracklib crypt cxx dri fontconfig fpm hardened iconv idn inotify iproute2 ipv6 ithreads jpeg justify mmx ncurses nls nptl openldap openmp openssl pam pax_kernel pcre png readline sasl session sieve sse sse2 sse3 ssl ssse3 tcpd threads tiff unicode urandom vim-pager vim-syntax xattr xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi gzip headers_more limit_req limit_conn map proxy realip referer rewrite stub_status upstream_ip_hash userid" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="3.4"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-power/nut-2.7.2 was built with the following:
USE="ssl tcpd ups_drivers_al175 ups_drivers_apcsmart ups_drivers_apcsmart-old ups_drivers_apcupsd-ups ups_drivers_bcmxcp ups_drivers_bcmxcp_usb ups_drivers_belkin ups_drivers_belkinunv ups_drivers_bestfcom ups_drivers_bestfortress ups_drivers_bestuferrups ups_drivers_bestups ups_drivers_blazer_ser ups_drivers_blazer_usb ups_drivers_clone ups_drivers_clone-outlet ups_drivers_dummy-ups ups_drivers_etapro ups_drivers_everups ups_drivers_gamatronic ups_drivers_genericups ups_drivers_isbmex ups_drivers_ivtscd ups_drivers_liebert ups_drivers_liebert-esp2 ups_drivers_masterguard ups_drivers_metasys ups_drivers_mge-shut ups_drivers_mge-utalk ups_drivers_microdowell ups_drivers_nutdrv_qx ups_drivers_oldmge-shut ups_drivers_oneac ups_drivers_optiups ups_drivers_powercom ups_drivers_powerpanel ups_drivers_rhino ups_drivers_richcomm_usb ups_drivers_riello_ser ups_drivers_riello_usb ups_drivers_safenet ups_drivers_solis ups_drivers_tripplite ups_drivers_tripplite_usb ups_drivers_tripplitesu ups_drivers_upscode2 ups_drivers_usbhid-ups ups_drivers_victronups usb -avahi -cgi -ipmi (-selinux) -snmp -ups_drivers_netxml-ups -ups_drivers_nut-ipmipsu -ups_drivers_snmp-ups -xml"
CFLAGS="-march=native -O2 -mtune=native -pipe -fno-lto"
CXXFLAGS="-march=native -O2 -mtune=native -pipe -fno-lto"
Comment 1 Alexey Sychev 2014-07-27 10:33:47 UTC
I can confirm this bug.
Comment 2 alpir 2014-07-29 05:52:34 UTC
I confirm that.
Comment 3 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-07-30 05:35:28 UTC
fixed in 2.7.2-r1 :D
Comment 4 Larry the Git Cow gentoo-dev 2024-01-01 00:12:28 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53b5eaaeadda10e7c5591a9ff9452e9dde21af78

commit 53b5eaaeadda10e7c5591a9ff9452e9dde21af78
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2023-12-31 18:48:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-01 00:12:13 +0000

    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 <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-power/nut/nut-2.8.0-r3.ebuild | 220 ++++++++++++++++++++++++++++++++++++++
 sys-power/nut/nut-9999.ebuild     |   3 +-
 2 files changed, 221 insertions(+), 2 deletions(-)