Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does find-debuginfo.sh in rpmbuild do? how can I get rid of it?

Tags:

rpm

rpmbuild

I have two boxes that I'm using to build a source rpm. One of them runs:

/usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/name-of-package

which adds three name.debug files to the RPM_BUID_ROOT.

the other build box does not run find-debuginfo.sh and does not generate these files.

  • What does find-debuginfo.sh do?
  • what causes it to run?
  • how can I make it not run?
like image 592
Arthur Ulfeldt Avatar asked Nov 11 '10 19:11

Arthur Ulfeldt


People also ask

What is Debuginfo?

debuginfo-install is a program which installs the RPMs needed to debug the specified package. The package argument can be a wildcard, but will only match installed packages. debuginfo- install will then enable any debuginfo repositories, and install the relevant debuginfo rpm.

What is debuginfo package?

A useful debuginfo package contains stripped symbols from ELF binaries ( *. debug in /usr/lib/debug ) as well as the source code related to them (in /usr/src/debug ). The script that generates the packages is /usr/lib/rpm/find-debuginfo.sh , read it through to get a basic understanding of how they're generated.


2 Answers

Use rpm macro magic to disable building of the debug package (place this somewhere in the spec file):

%define  debug_package %{nil}

I don't know why one of your boxes builds it and the other does not.

like image 104
user318904 Avatar answered Sep 28 '22 21:09

user318904


find-debuginfo.sh separates the dwarf debuginfo from main binaries/libraries into separate files, which can be packaged into separate FOO-debuginfo subrpms. That way, a user not interested in debugging doesn't have to install the -debuginfo and thus save disk space.

like image 43
fche Avatar answered Sep 28 '22 22:09

fche