Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 706174 - sys-devel/llvm-9.0.1 : /etc/env.d/XXllvm-XXXX should lexicologically follow /etc/env.d/50baselayout so that local PATHs are tried first
Summary: sys-devel/llvm-9.0.1 : /etc/env.d/XXllvm-XXXX should lexicologically follow ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-23 17:31 UTC by Nikos Chantziaras
Modified: 2020-01-27 13:10 UTC (History)
1 user (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 Nikos Chantziaras 2020-01-23 17:31:22 UTC
/usr/local/sbin and /usr/local/bin are expected to come first in PATH so that binaries placed there override package-manager installed binaries. However, with sys-devel/llvm this is not the case. It installs /etc/env.d/10llvm-9990 and the end result is /usr/lib/llvm/9/bin appearing first:

$ echo $PATH
/usr/lib/llvm/9/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/opt/nvidia-cg-toolkit/bin:/opt/vmware/bin
Comment 1 Nikos Chantziaras 2020-01-23 17:31:56 UTC
$ emerge --info sys-devel/llvm
Portage 2.3.85 (python 3.8.1-final-0, default/linux/amd64/17.0/desktop/plasma/systemd, gcc-9.2.0, glibc-2.29-r7, 4.19.97-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.97-gentoo-x86_64-Intel-R-_Core-TM-_i5-2500K_CPU_@_3.30GHz-with-glibc2.4
KiB Mem:    16392400 total,  10701428 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Thu, 23 Jan 2020 09:46:37 +0000
Head commit of repository gentoo: b054744114ca2bef322db42aefed269a5e3f4848

Head commit of repository flatpak-overlay: c9991ea665dd52e4dc60912027da5a1c736ecd85

sh bash 5.0_p11
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
app-shells/bash:          5.0_p11::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.1::gentoo
dev-util/cmake:           3.16.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.2.0-r3::gentoo
sys-devel/gcc-config:     2.2::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo
Repositories:

gentoo
    location: /mnt/Data/gentoo/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: true

flatpak-overlay
    location: /usr/local/flatpak-overlay
    sync-type: git
    sync-uri: https://github.com/fosero/flatpak-overlay.git
    masters: gentoo
    priority: 50

interactive-fiction
    location: /var/lib/layman/interactive-fiction
    masters: gentoo
    priority: 50

seden
    location: /var/lib/layman/seden
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

vapoursynth
    location: /var/lib/layman/vapoursynth
    masters: gentoo
    priority: 50

local
    location: /usr/local/portage
    masters: gentoo
    priority: 9999999

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/vmware-installer"
CXXFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
DISTDIR="/mnt/Data/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--backtrack=200"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-pipe -O2 -mtune=native -march=native -ftree-vectorize"
GENTOO_MIRRORS="http://ftp.ntua.gr/pub/linux/gentoo http://gentoo.mirrors.ovh.net/gentoo-distfiles http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="-j4"
PKGDIR="/mnt/Data/gentoo/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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac accessibility acl acpi activities amd64 berkdb bzip2 cairo cli crypt cxx dbus declarative dri dts dvd dvdr emboss encode exif flac fortran gdbm gif gpm gtk iconv icu ipv6 jpeg kde kipi kwallet lcms libnotify libtirpc linguas_en linguas_en_US lto mad mng mp3 mp4 mpeg multilib ncurses nptl nvidia offensive ogg opengl openmp pam pango pcre pdf pgo phonon plasma png policykit ppds pulseaudio qml qt5 readline seccomp spell split-usr ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vdpau vorbis vulkan wayland widgets wxwidgets xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en-US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_7 python3_8" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="nvidia" 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

sys-devel/llvm-9.0.1::gentoo was built with the following:
USE="gold libffi ncurses xml -debug -doc -exegesis -libedit -test -xar -z3" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -WebAssembly -XCore"
FEATURES="sign usersandbox binpkg-docompress ebuild-locks usersync multilib-strict network-sandbox merge-sync unmerge-orphans sfperms distlocks news unmerge-logs pid-sandbox xattr strict sandbox config-protect-if-modified unknown-features-warn ipc-sandbox preserve-libs fixlafiles binpkg-dostrip userfetch binpkg-logs assume-digests userpriv protect-owned parallel-fetch"
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-01-24 17:25:18 UTC
I think those files actually predate 50baselayout (everything was added implicitly before).  Have you verified that moving it later doesn't break anything?
Comment 3 Nikos Chantziaras 2020-01-27 12:48:13 UTC
I renamed the file to 51llvm-9990 a few days ago and did env-update and reboot so I now have:

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/9/bin:/opt/nvidia-cg-toolkit/bin:/opt/vmware/bin

Haven't seen any ill effects yet.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-01-27 13:04:15 UTC
Thanks.  I think this isn't a major issue for the majority of our users (esp. compared to the cost of rebuilding), so I'll change it in place.
Comment 5 Larry the Git Cow gentoo-dev 2020-01-27 13:10:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b09efa7415e6b5666c75fcd536f570731abb550

commit 0b09efa7415e6b5666c75fcd536f570731abb550
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2020-01-27 13:10:04 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2020-01-27 13:10:04 +0000

    sys-devel/llvm: Move env.d after baselayout
    
    Closes: https://bugs.gentoo.org/706174
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-devel/llvm/llvm-10.0.0.9999.ebuild | 2 +-
 sys-devel/llvm/llvm-11.0.0.9999.ebuild | 2 +-
 sys-devel/llvm/llvm-7.1.0.ebuild       | 2 +-
 sys-devel/llvm/llvm-8.0.1.ebuild       | 2 +-
 sys-devel/llvm/llvm-9.0.1.ebuild       | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)