RPM Community Forums

Mailing List Message of <rpm-users>

Re: Attempting to compile rpm5 for RH Linux EL5

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 18 Sep 2009 - 18:41:41 CEST
Message-id: <1975ACBF-07AB-4224-B9B5-449ABAC3E5F3@mac.com>

On Sep 18, 2009, at 12:11 PM, Saravanan Shanmugham (sarvi) wrote:

> Separating the symbol files and into their own package is definitely  
> in
> the plans.
>

Well, packaging detached debugging symbols (and source code so
that line numbers can be displayed) was done in RPM like 5 years
ago and is already widely deployed.

You really should look at what is implemented.

Note that from a RPM packaging POV, the existing -debuginfo scheme
is all very feeble and hacky and horendously fragile and obscure.

So don't take my comments as criticism, I'd *LOVE* to see a better
packaging framework for detached debugging symbols in RPM.

> The question is the turnaround time between someone posting a  
> traceback
> on the web and a backend system translating the traceback with  
> symbols.
>

If end-to-end turnaround efficiency is your goal, you need to
look carefully at how traceback information can be accurately
associated with the components involved. Extracting executables/ 
libraries
from *.rpm is just a very teensy part of a much larger problem.

> One option is to have a filesystem where all the files have been
> extracted and ready for translation. But can cost additional diskspace
> which can add up in the long run.
>

That's basically what is in a -debuginfo package, files under
/usr/src/debug/* include source and detached debugging symbols.

> If the RPMs are archived, the system would need to identify the RPMS
> involved in traceback, download, extract them, do the translation,  
> then
> discard the extracted stuff.
> This could takes some time to do, specially if you have to download  
> the
> whole RPM, and if you had to uncompress/untar each RPM in its  
> entirity.
>
> From RPM, tar.gz or CPIO, this can be expenseive. As I understand it  
> you
> need to unzip and untar the file, piping it to a filter to get the
> file(s) you want.
>
> XAR format maintains an index, that allows you to go to and extract a
> specific file, and the individual files are compressed, as I  
> understand
> it, meaning the ones of interest can be extracted, which can be more
> efficient.
>

Again, speed or overhead of archive extraction is hardly an issue when  
everything
necessary for debugging is _ALREADY_ extracted into a -debuginfo  
package.

> At this point, I am just trying to understand/measure that cost
> impact/tradeoff, and was looking to try these features.
>

Look closely at tools/debugedit.c and scripts/find-debuginfo.sh. Those
two files are what is used to automate producing -debuginfo packages.

I'd suggest grabbing some -debuginfo *.rpm files and examining. This
command makes it quite easy to see what is in a -debuginfo package

	rpm -qp --yaml foo-debuginfo*.rpm

hth

73 de Jeff
> Sarvi
>
>
> -----Original Message-----
> From: rpm-users-owner@rpm5.org [mailto:rpm-users-owner@rpm5.org] On
> Behalf Of Jeff Johnson
> Sent: Friday, September 18, 2009 5:34 AM
> To: rpm-users@rpm5.org
> Subject: Re: Attempting to compile rpm5 for RH Linux EL5
>
>
> On Sep 18, 2009, at 2:04 AM, Saravanan Shanmugham (sarvi) wrote:
>
>> Thanks. I was able to get it compiled and installed.
>>
>> I am proposing the use of RPM5 for package management internally. One
>> point of interest to me in RPM5 is the use of XAR format, and more
>> specifically the option of being able to extract specific files from
>> within the XAR archive without having to untar/extracting everything.
>> Atleast that's what the xar wiki page claims.
>>
>
> You can extract specific files from any archive format, including
> cpio/tar/xar, rather easily.
>
>> We need a way to be able to extract specific executables and  
>> libraries
>
>> from a specific version of the build, from its archived RPMs, on
>> demand, to help decode a crash or traceback.
>>
>
> So you would seem to want debugging symbols. What is more commonly  
> done
> is to split the symbols from the executable/library and put into a
> separate -debuginfo package.
>
> GDB then loads the detached symbols.
>
>> So far, I haven't been able to figure out the RPM5 option or XAR
>> option that allows me to do extract a specific file or list of files.
>>
>
> For cpio payloads it starts with
> 	rpm2cpio foo*.rpm | cpio -itv
> to display the files in a payload. Then one adds logic (described in
> "man cpio") to select which files you want.
>
>> Is there such an option. If not how easy do you think it is to
>> implement such an option, if we can help.
>>
>
> Each archive format has a different selection process. But rpm2cpio is
> used to seek to the start of the payload.
>
> 73 de Jeff
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
Received on Fri Sep 18 18:42:11 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.