Jan Engelhardt (jengelh@inai.de) wrote:
On Monday 2013-09-02 22:01, Adam Spiers wrote:
Adam Spiers (aspiers@suse.com) wrote:
http://en.opensuse.org/openSUSE:Packaging_guidelines#Debuginfo implies that package builds automatically result in -debuginfo packages and that you have to explicitly disable them if you don't want them, but it fails to mention:
1. how -debuginfo packages are automatically built, and
If debuginfo is active, bs-worker will trickle this down to build (some env var?) and /usr/bin/build calls rpm with --define '_build_create_debug 1'.
/home/abuild/.rpmmacros is populated with the definition for _build_create_debug, and will cause an expansion of ungodly macro magic, among that %debug_package. %debug_package is then a standardized RPM part and marks the end of BS-specific logic.
2. how to disable them.
<debuginfo><disable /></build> or <disable repository="blah" /> or <disable arch="blah" /> in your pkgmeta/prjmeta.
This is great info - many thanks for the quick and comprehensive reply! However, the info would help a much wider audience if you put it in the wiki instead of on the list ;-)
Also, I found that unless I have BuildRequires: glibc-devel in my .spec file, I get:
[ 14s] + /usr/lib/rpm/find-debuginfo.sh /home/abuild/rpmbuild/BUILD/xwrits-2.26 [ 14s] extracting debug info from /home/abuild/rpmbuild/BUILDROOT/xwrits-2.26-1.x86_64/usr/X11R6/bi n/xwrits [ 14s] cpio: glibc-2.17/csu: Cannot stat: No such file or directory [ 14s] cpio: glibc-2.17/csu/elf-init.c: Cannot stat: No such file or directory [ 14s] cpio: glibc-2.17/csu/init.c: Cannot stat: No such file or directory [ 14s] cpio: glibc-2.17/sysdeps/x86_64/crti.S: Cannot stat: No such file or directory [ 14s] cpio: glibc-2.17/sysdeps/x86_64/crtn.S: Cannot stat: No such file or directory [ 14s] cpio: glibc-2.17/sysdeps/x86_64/start.S: Cannot stat: No such file or directory
I would suspect that find-debuginfo has no way of knowing what in a program file belongs to the actual project and what belongs to static objects and/or static libraries.
Sorry - I'm not sure what led me to think that this was related to the presence / absence of BuildRequires: glibc-devel, but it's nothing to do with that.
and
[ 14s] error: Installed (but unpackaged) file(s) found: [ 14s] /usr/X11R6/share/man/man1/xwrits.1 [ 14s] /usr/lib/debug/.build-id/a6/6020909506c53dc47d90c81341daf8b1ae9376 [ 14s] /usr/lib/debug/.build-id/a6/6020909506c53dc47d90c81341daf8b1ae9376.debug [ 14s] /usr/lib/debug/usr/X11R6/bin/xwrits.debug [ 14s] /usr/src/debug/xwrits-2.26/clock.c [ 14s] /usr/src/debug/xwrits-2.26/colorpic.c [ 14s] /usr/src/debug/xwrits-2.26/config.h
This is a classic: If 1. a file listed in %files does not exist in %buildroot or 2. a file in %buildroot is not listed in %files,
processing of the %files list aborts without looking at any other files, which is why they will show up as unhandled too.
Ahah! That must be what confused me - I guess I fixed the xwrits.1 problem at the same time as adding the BuildRequires: header, and incorrectly inferred a correlation between BuildRequires: and the unpackaged debuginfo files vanishing.
If debuginfo generation is automatically enabled, shouldn't glibc-devel be automatically required to avoid this?
To *generate* debug info, glibc-devel is not needed, because the debug info is in your program, not glibc-devel.
Right. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org