Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

Report information
The Basics
Id: 19030
Status: resolved
Priority: 0/
Queue: PAR

People
Owner: smueller [...] cpan.org
Requestors: smcbrien [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problem slurping perl binaries into an RPM
Date: Tue, 02 May 2006 10:39:19 -0400
To: bug-par [...] rt.cpan.org
From: Scott McBrien <smcbrien [...] redhat.com>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm trying to compile a perl program with pp and then pull it into an RPM so I can distribute it to target machines. The problem is that the compiled file in my RPM somehow changes?!? So I run pp -o target source.pl as part of my RPM build, and I get complaints during the build stage about the target file's dependencies changing. When I try to install my RPM: error: unpacking of archive failed on file /usr/sbin/target;44576ed1: cpio: MD5 sum mismatch Also, I notice that each time I use pp to compile the perl program, I get a different MD5 sum from it. Can you provide any insight? Thanks! - -Scott -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org iD8DBQFEV28Xq72KniBtXAURAoxAAJ9Hwp4TfIiwVL+ikwMm1I0TsTCQewCgq/81 xA94PBrHrTScqiZ9KzYO8XQ= =gsfD -----END PGP SIGNATURE-----
Subject: Re: [rt.cpan.org #19030] AutoReply: Problem slurping perl binaries into an RPM
Date: Tue, 02 May 2006 15:56:33 -0400
To: bug-PAR [...] rt.cpan.org
From: Scott McBrien <smcbrien [...] redhat.com>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Also, some additional information: According to the RPM folks, the error I'm getting may have something to do with the prelinking in this pp compiled file. I'm not a dev, just a lowly sysadmin looking for some help, so please pardon my ignorance. - -Scott -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org iD8DBQFEV7lwq72KniBtXAURAlUCAJ9E3fXXcRjKtPBowLD0Hrz39iSHsQCghsxi T+FRyjiu2FBb97aDe6sbpbM= =xS3k -----END PGP SIGNATURE-----
Show quoted text
> According to the RPM folks, the error I'm getting may have something > to do with the prelinking in this pp compiled file. I'm not a dev,
Just a hunch (because - as a Debianista - I know next to nothing about RPM packaging): does the RPM packaging strip (or otherwise mung) executables? Stripping a pp'ed executable will effectively render it unusable. That's because the executable file is the amalgamation of a genuine executable (as produced by the linker) with some other stuff (e.g. a zip file). This additional stuff is simply appended (and _not_ registered as an ELF section or something). But strip (or objcopy) looks at the ELF header to determine what to keep - anything not mentioned there will simply be dropped from its output file. Cheers, Roderich
Subject: Re: [rt.cpan.org #19030] Problem slurping perl binaries into an RPM
Date: Wed, 03 May 2006 15:15:43 -0400
To: bug-PAR [...] rt.cpan.org
From: Scott McBrien <smcbrien [...] redhat.com>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 via RT wrote: Show quoted text
><URL: http://rt.cpan.org/Ticket/Display.html?id=19030 > >
>>According to the RPM folks, the error I'm getting may have something >>to do with the prelinking in this pp compiled file. I'm not a dev,
> > >Just a hunch (because - as a Debianista - I know next to nothing about >RPM packaging): does the RPM packaging strip (or otherwise mung) >executables? Stripping a pp'ed executable will effectively >render it unusable. That's because the executable file is the >amalgamation of a genuine executable (as produced by the linker) with >some other stuff (e.g. a zip file). This additional stuff is simply >appended (and _not_ registered as an ELF section or something). >But strip (or objcopy) looks at the ELF header to determine what >to keep - anything not mentioned there will simply be dropped from its >output file. > >Cheers, Roderich > >
Roderich and Steffen, Thanks for your help! So it is an RPM thing, combined with the prelink program. This is a note out of /usr/lib/rpm/macros: # rpm-4.1 verifies prelinked libraries using a prelink undo helper. # Normally this macro is defined in /etc/rpm/macros.prelink, installed # with the prelink package. If the macro is undefined, then prelinked # shared libraries contents are MD5 digest verified (as usual), rather # than MD5 verifying the output of the prelink undo helper. # # Note: The 2nd token is used as argv[0] and "library" is a # placeholder that will be deleted and replaced with the appropriate # library file path. So it appears that the RPM archive that is generated gets a list of the MD5 sums for components of the executable file calculated by prelink. By disabling prelink, it fixed the problem; in my RPM .spec file: %define __prelink_undo_cmd %{nil} In case you all ever get the question again. Thanks again! Scott -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org iD8DBQFEWQFcq72KniBtXAURAvNxAJ0W+Dyp9t2l4aofuoHMpL+05da8UwCfaCUj HvwoMfs21Vlizvxssmv1Uy4= =k30I -----END PGP SIGNATURE-----