Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937919 - app-benchmarks/stress-ng-0.18.02: fails to install in PREFIX environment
Summary: app-benchmarks/stress-ng-0.18.02: fails to install in PREFIX environment
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-14 15:30 UTC by Benjamin Block
Modified: 2025-02-20 18:17 UTC (History)
2 users (show)

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


Attachments
idea to fix the issue (fix-install-prefix-violations.patch,254 bytes, patch)
2024-08-14 15:32 UTC, Benjamin Block
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Block 2024-08-14 15:30:07 UTC
Trying to emerge app-benchmarks/stress-ng in Gentoo Prefix fails because the install step installs files outside of the PREFIX environment.

Log snipped:

    app-benchmarks/stress-ng $ ebuild stress-ng-0.18.02.ebuild install
     * stress-ng-0.18.02.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                         [ ok ]
     * checking ebuild checksums ;-) ...                                                                                                                                            [ ok ]
     * checking miscfile checksums ;-) ...                                                                                                                                          [ ok ]
     * Determining the location of the kernel source code
     * Unable to find kernel sources at /usr/src/linux
     * Please make sure that /usr/src/linux points at your running kernel,
     * (or the kernel you wish to build against).
     * Alternatively, set the KERNEL_DIR environment variable to the kernel sources location
     * Unable to calculate Linux Kernel version for build, attempting to use running version
     * Found kernel object directory:
     *     /usr/src/kernels/6.9.12-200.fc40.x86_64
     * Found sources for kernel version:
     *     6.9.12-200.fc40.x86_64
    >>> Unpacking source...
    >>> Unpacking stress-ng-0.18.02.tar.gz to /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/work
    >>> Source unpacked in /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/work
    >>> Preparing source in /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/work/stress-ng-0.18.02 ...
    >>> Source prepared.
    >>> Configuring source in /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/work/stress-ng-0.18.02 ...
    >>> Source configured.
    >>> Compiling source in /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/work/stress-ng-0.18.02 ...
    make -j33 -l16 HAVE_APPARMOR=0 HAVE_LIB_JPEG=1 HAVE_KEYUTILS_H=1 HAVE_LIB_SCTP=0 VERBOSE=1
    Generating config..
    make CC="x86_64-pc-linux-gnu-gcc" CXX="x86_64-pc-linux-gnu-g++" STATIC= -f Makefile.config
    make[1]: Entering directory '/home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/work/stress-ng-0.18.02'
    fatal: not a git repository (or any parent up to mount point /home/share)
    Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
    MK git-commit-id.h
    using -lapparmor ... no
    using -lJudy ... no
    ---8<---
    x86_64-pc-linux-gnu-g++ apparmor-data.o stress-eigen-ops.o core-affinity.o core-asm-ret.o core-cpu.o core-cpu-cache.o core-cpuidle.o core-clocksource.o core-config-check.o core-hash.o core-helper.o core-ignite-cpu.o core-interrupts.o core-io-uring.o core-io-priority.o core-job.o core-killpid.o core-klog.o core-limit.o core-lock.o core-log.o core-madvise.o core-mincore.o core-mlock.o core-mmap.o core-module.o core-mounts.o core-mwc.o core-net.o core-numa.o core-opts.o core-out-of-memory.o core-parse-opts.o core-perf.o core-processes.o core-rapl.o core-resources.o core-sched.o core-setting.o core-shared-heap.o core-shim.o core-smart.o core-sort.o core-thermal-zone.o core-time.o core-thrash.o core-ftrace.o core-try-open.o core-vmstat.o stress-ng.o core-config.o stress-access.o stress-acl.o stress-affinity.o stress-af-alg.o stress-aio.o stress-aiol.o stress-alarm.o stress-apparmor.o stress-atomic.o stress-bad-altstack.o stress-bad-ioctl.o stress-besselmath.o stress-bigheap.o stress-bind-mount.o stress-binderfs.o stress-bitonicsort.o stress-bitops.o stress-branch.o stress-brk.o stress-bsearch.o stress-cache.o stress-cacheline.o stress-cap.o stress-cgroup.o stress-chattr.o stress-chdir.o stress-chmod.o stress-chown.o stress-chroot.o stress-clock.o stress-clone.o stress-close.o stress-context.o stress-copy-file.o stress-cpu.o stress-cpu-online.o stress-crypt.o stress-cyclic.o stress-daemon.o stress-dccp.o stress-dekker.o stress-dentry.o stress-dev.o stress-dev-shm.o stress-dir.o stress-dirdeep.o stress-dirmany.o stress-dnotify.o stress-dup.o stress-dynlib.o stress-eigen.o stress-efivar.o stress-enosys.o stress-env.o stress-epoll.o stress-eventfd.o stress-exec.o stress-exit-group.o stress-expmath.o stress-factor.o stress-fallocate.o stress-fanotify.o stress-far-branch.o stress-fault.o stress-fcntl.o stress-fd-fork.o stress-fd-race.o stress-file-ioctl.o stress-fiemap.o stress-fifo.o stress-filename.o stress-flock.o stress-flushcache.o stress-fma.o stress-fork.o stress-forkheavy.o stress-fp.o stress-fp-error.o stress-fpunch.o stress-fractal.o stress-fsize.o stress-fstat.o stress-full.o stress-funccall.o stress-funcret.o stress-futex.o stress-get.o stress-getrandom.o stress-getdent.o stress-goto.o stress-gpu.o stress-handle.o stress-hash.o stress-hdd.o stress-heapsort.o stress-hrtimers.o stress-hsearch.o stress-icache.o stress-icmp-flood.o stress-idle-page.o stress-inode-flags.o stress-inotify.o stress-insertionsort.o stress-io.o stress-iomix.o stress-ioport.o stress-ioprio.o stress-io-uring.o stress-ipsec-mb.o stress-itimer.o stress-jpeg.o stress-judy.o stress-kcmp.o stress-key.o stress-kill.o stress-klog.o stress-kvm.o stress-l1cache.o stress-landlock.o stress-lease.o stress-led.o stress-link.o stress-list.o stress-llc-affinity.o stress-loadavg.o stress-lockbus.o stress-locka.o stress-lockf.o stress-lockofd.o stress-logmath.o stress-longjmp.o stress-loop.o stress-lsearch.o stress-lsm.o stress-madvise.o stress-malloc.o stress-matrix.o stress-matrix-3d.o stress-mcontend.o stress-membarrier.o stress-memcpy.o stress-memfd.o stress-memhotplug.o stress-memrate.o stress-memthrash.o stress-mergesort.o stress-metamix.o stress-mincore.o stress-min-nanosleep.o stress-misaligned.o stress-mknod.o stress-mlock.o stress-mlockmany.o stress-mmap.o stress-mmapaddr.o stress-mmapfiles.o stress-mmapfixed.o stress-mmapfork.o stress-mmaphuge.o stress-mmapmany.o stress-module.o stress-monte-carlo.o stress-mprotect.o stress-mpfr.o stress-mq.o stress-mremap.o stress-mseal.o stress-msg.o stress-msync.o stress-msyncmany.o stress-mtx.o stress-munmap.o stress-mutex.o stress-nanosleep.o stress-netdev.o stress-netlink-proc.o stress-netlink-task.o stress-nice.o stress-nop.o stress-null.o stress-numa.o stress-oom-pipe.o stress-opcode.o stress-open.o stress-pagemove.o stress-pageswap.o stress-pci.o stress-personality.o stress-peterson.o stress-physpage.o stress-pidfd.o stress-ping-sock.o stress-pipe.o stress-pipeherd.o stress-pkey.o stress-plugin.o stress-poll.o stress-powmath.o stress-prctl.o stress-prefetch.o stress-prime.o stress-prio-inv.o stress-priv-instr.o
    >>> Source compiled.
    >>> Test phase [not enabled]: app-benchmarks/stress-ng-0.18.02
    
    >>> Install app-benchmarks/stress-ng-0.18.02 into /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image
    make -j33 -l16 DESTDIR=/home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image install
    mkdir -p /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image/usr/bin
    cp stress-ng /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image/usr/bin
    mkdir -p /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image/usr/share/man/man1
    cp stress-ng.1 /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image/usr/share/man/man1
    mkdir -p /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image/usr/share/stress-ng/example-jobs
    cp -r example-jobs/*.job /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image/usr/share/stress-ng/example-jobs
    mkdir -p /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image/usr/share/bash-completion/completions
    cp bash-completion/stress-ng /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image/usr/share/bash-completion/completions
    >>> Completed installing app-benchmarks/stress-ng-0.18.02 into /home/share/gentoo/var/tmp/portage/app-benchmarks/stress-ng-0.18.02/image
    
     * Final size of build directory: 55244 KiB (53.9 MiB)
     * Final size of installed tree:  15056 KiB (14.7 MiB)
    
     * QA Notice: the following files are outside of the prefix:
     * /usr
     * /usr/bin
     * /usr/bin/stress-ng
     * /usr/share
     * /usr/share/man
     * /usr/share/man/man1
     * /usr/share/man/man1/stress-ng.1
     * /usr/share/stress-ng
     * /usr/share/stress-ng/example-jobs
     * /usr/share/stress-ng/example-jobs/cpu-cache.job
     * /usr/share/stress-ng/example-jobs/cpu.job
     * /usr/share/stress-ng/example-jobs/device.job
     * /usr/share/stress-ng/example-jobs/example.job
     * /usr/share/stress-ng/example-jobs/filesystem.job
     * /usr/share/stress-ng/example-jobs/hot-cpu.job
     * /usr/share/stress-ng/example-jobs/interrupt.job
     * /usr/share/stress-ng/example-jobs/io.job
     * /usr/share/stress-ng/example-jobs/matrix-methods.job
     * /usr/share/stress-ng/example-jobs/memory.job
     * /usr/share/stress-ng/example-jobs/network.job
     * /usr/share/stress-ng/example-jobs/pipe.job
     * /usr/share/stress-ng/example-jobs/scheduler.job
     * /usr/share/stress-ng/example-jobs/security.job
     * /usr/share/stress-ng/example-jobs/vm.job
     * /usr/share/bash-completion
     * /usr/share/bash-completion/completions
     * /usr/share/bash-completion/completions/stress-ng
     * ERROR: app-benchmarks/stress-ng-0.18.02::gentoo failed:
     *   Aborting due to QA concerns: there are files installed outside the prefix
     *
     * Call stack:
     *   misc-functions.sh, line 682:  Called install_qa_check
     *   misc-functions.sh, line 134:  Called source 'install_symlink_html_docs'
     *            05prefix, line 114:  Called install_qa_check_prefix
     *            05prefix, line  27:  Called die
     * The specific snippet of code:
     *                      die "Aborting due to QA concerns: there are files installed outside the prefix"

Reproducible: Always
Comment 1 Benjamin Block 2024-08-14 15:32:31 UTC
Created attachment 900106 [details, diff]
idea to fix the issue

After looking at how stress-ng is built, I came up with this small patch to fix the issue. Works for me, also running stress-ng afterwards works. But yeah, just an idea.
Comment 2 Benjamin Block 2025-02-11 16:59:43 UTC
@conikost@gentoo.org: any chance you could have a look here? This is still failing each version bump, but the patch I attached also keeps working (at least on my prefix setup).
Comment 3 Conrad Kostecki gentoo-dev 2025-02-14 13:35:47 UTC
Hi Benjamin, sorry, I just didn't saw that ticket here, as it wasn't assigned to me directly. Fix lgtm. Next time, please just ping me earlier, so I won't miss it! Thanks!
Comment 4 Larry the Git Cow gentoo-dev 2025-02-14 13:36:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=576d03b44faf855e7ccadf7d9158035ef36eda1c

commit 576d03b44faf855e7ccadf7d9158035ef36eda1c
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2025-02-14 13:35:03 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2025-02-14 13:36:20 +0000

    app-benchmarks/stress-ng: fix install on prefix
    
    Closes: https://bugs.gentoo.org/937919
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 .../{stress-ng-0.18.10.ebuild => stress-ng-0.18.10-r1.ebuild}        | 5 +++++
 1 file changed, 5 insertions(+)
Comment 5 Benjamin Block 2025-02-20 18:17:49 UTC
Thanks. I've updated to `0.18.10-r1`, works as expected now.