debuginfo/source improvements vs mass rebuild

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi packagers,

Just before the mass rebuild some debuginfo/source improvements were
enabled by default (%_debugsource_packages and %_debuginfo_subpackages).
See https://pagure.io/releng/issue/6863 and
https://fedoraproject.org/wiki/Changes/SubpackageAndSourceDebuginfo for
some background.

It didn't cause mass breakage, but there were some issues. Sorry about
that. The good news is that we now have fixes (or workarounds) for the
bugs found. So hopefully if your package did fail to rebuild you can
just resubmit it again or add a small tweak to get it building. Here is
an overview of the issues you might have seen and how it was resolved
(and a few questions on what the proper default/workaround/fix should be
in some cases).

= -debugsource generation fails with
  error: Could not open %files file

This was caused by the package changing the working directory in %
install. Fixed upstream and backported to rpm-4.13.0.1-38.
Please just rebuild your package.

= -debugsource generation fails with
  error: Empty %files file

Caused by rpm/find-debuginfo.sh/debugedit being unable to find any
source files for the generated .debug files. This could be seen as a
packaging bug. Most likely caused by missing -g in the package build
flags.

But the old non-split debuginfo/source generation would silently accept
an empty debug source list. So there is an upstream patch to just create
an empty -debugsource package in that case (and generate a warning):
http://lists.rpm.org/pipermail/rpm-maint/2017-July/006098.html

Upstream indicated they would rather not generate a -debugsource package
at all in that case (which seems hard, but maybe I didn't try hard
enough) or to just treat it as a hard error (also for the non-split
case).

= Using %excludes resulted in error after generating -debuginfo:
  error: Installed (but unpackaged) file(s) found:
    /usr/lib/debug/bin/hello3-1.0-1.x86_64.debug

Fixed upstream and backported to rpm-4.13.0.1-39
Please just rebuild your package.

= Using RemovePathPostfixes failed after generationg -debuginfo:
  error: Installed (but unpackaged) file(s) found:
    /usr/lib/debug/bin/hello.foobar-1.0-1.x86_64.debug

Fixed upstream and backported to rpm-4.13.0.1-39
Please just rebuild your package.

Note that in both of the above cases in the old situation your
-debuginfo package would contain .debug files for executables not
installed by the main package... With the fix, in case you use
split-debuginfo (the default) these aren't included anymore making the
debuginfo packages smaller.

= No .gdb_index in .debug files.

Caused by missing %_include_gdb_index macro in redhat-rpm-config
https://bugzilla.redhat.com/show_bug.cgi?id=1476722
This used to not be easily configurable. Now it is. But we got the
default wrong. If you like to have .gdb_index sections right now then
add %global _include_gdb_index 1 to your spec file. Or wait till
fedora-rpm-config has been updated.

- Putting extra files under /usr/lib/debug causes:
  error: Installed (but unpackaged) file(s) found:
   /usr/lib/debug/usr/lib64/__pycache__/libpython3.6dm.so.1.0.debug-gdb.cpython-36.opt-1.pyc
   /usr/lib/debug/usr/lib64/__pycache__/libpython3.6dm.so.1.0.debug-gdb.cpython-36.opt-2.pyc
   /usr/lib/debug/usr/lib64/__pycache__/libpython3.6dm.so.1.0.debug-gdb.cpython-36.pyc
   /usr/lib/debug/usr/lib64/__pycache__/libpython3.6m.so.1.0.debug-gdb.cpython-36.opt-1.pyc
   /usr/lib/debug/usr/lib64/__pycache__/libpython3.6m.so.1.0.debug-gdb.cpython-36.opt-2.pyc
   /usr/lib/debug/usr/lib64/__pycache__/libpython3.6m.so.1.0.debug-gdb.cpython-36.pyc
   /usr/lib/debug/usr/lib64/libpython3.6dm.so.1.0.debug-gdb.py
   /usr/lib/debug/usr/lib64/libpython3.6m.so.1.0.debug-gdb.py

https://bugzilla.redhat.com/show_bug.cgi?id=1476593

This is caused by split debuginfo checking which file corresponds to
which main/sub-package. Without split debuginfo anything found
under /usr/lib/debug is just put into the -debuginfo package, no
questions asked.

The immediate workaround is to add the following to your spec file:
%undefine _debuginfo_subpackages

This disables split debuginfo packages and just generates one big
-debuginfo packages with everything under /usr/lib/debug/ included.

But this might or might not be a packaging bug. In particular if it
contains generated pyc files those probably really shouldn't be there.

The basic issue is that we have been trying to make the debuginfo
packages self-contained and non-conflicting between versions.
So you can easily install debuginfo for different (bi)arches or
versions. But some packages assume that if they drop anything
under /usr/lib/debug it will just magically appear in the debuginfo
package (which has been historically true). But with the split
debuginfo we have to make a choice which subpackage it belongs
to. Best rpm fix would probably be to add such files to the "main"
debuginfo package.

But it would probably be better to move these files to the
python3-devel package. Maybe we should discuss with the gdb
maintainers how/where they would like to see these gdb python
extensions installed. I doubt the -debuginfo package really is
the place for them anyway.

= Packages that already create sub-debuginfo or split-debugsource
  packages by hand probably will fail with an error similar to the
  above (Installed (but unpackaged) file(s) found).

Please add either (or both) to your spec file:
%undefine _debugsource_packages
%undefine _debuginfo_subpackages

But we would like to know if that is necessary. Please file a bug report
against rpm in fedora bugzilla and we'll take a look to see if we can
help use the fedora rpm defaults in your .spec file.

Cheers,

Mark
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux