Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 799260 - =sys-apps/portage-3.0.20-r6: dostrip -x prevents FEATURES=installsources from installing sources
Summary: =sys-apps/portage-3.0.20-r6: dostrip -x prevents FEATURES=installsources from...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 799017 933986
  Show dependency tree
 
Reported: 2021-06-29 17:15 UTC by Sergei Trofimovich (RETIRED)
Modified: 2024-09-27 14:45 UTC (History)
6 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 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-29 17:15:17 UTC
Initially observed on bug #799017 where glibc avoid stripping libpthread.so to allow gdb accessing it's internals.

Here is the minimal reproducer ebuild:

$ cat app-0.ebuild
EAPI=7

inherit flag-o-matic toolchain-funcs

IUSE="trigger-bug"
DEPEND=""
RDEPEND=${DEPEND}
SLOT=0

src_unpack() {
        mkdir "${S}" || die
        cat >>"${S}"/app-tool.c<<EOF
        int main() { return 0; }
EOF
}

src_compile() {
        tc-export CC
        append-flags -ggdb3
        emake app-tool
}

src_install() {
        dobin app-tool
        use trigger-bug && dostrip -x /usr/bin/app-tool
}


Here is the effect:

Good:

$ USE=-trigger-bug FEATURES='installsources' emerge -v1 app

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   /usr/bin/app-tool
installsources: rsyncing source files
 * checking 5 files for package collisions
>>> Merging app/app-0 to /
>>> /usr/bin/app-tool
>>> /usr/src/debug/app/app-0/app-0/app-tool.c

Bad:

$ USE=trigger-bug FEATURES='installsources' emerge -v1 app

>>> Merging app/app-0 to /
--- /usr/
--- /usr/bin/
>>> /usr/bin/app-tool
>>> Safely unmerging already-installed instance...
No package files given... Grabbing a set.
<<<          obj /usr/src/debug/app/app-0/app-0/app-tool.c
<<<          obj /usr/lib/debug/usr/bin/app-tool.debug
--- replaced obj /usr/bin/app-tool

Note: app-tool.c was removed from installation. Probablya side-effect of bin/estrip implementation.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-09 16:41:49 UTC
hello71, is there any chance you'd be willing to take a look?
Comment 2 Mike Gilbert gentoo-dev 2024-08-26 16:02:25 UTC
dostrip -x results in a call to estrip --ignore, which removes the .estrip file associated with the given path. That causes estrip --dequeue to skip the file entirely. We need to introduce a new state that will cause estrip --dequeue to process the file without stripping it.