RPM Community Forums

Mailing List Message of <rpm-users>

Re: How not to use rpm owner/group info on unpack?

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 09 Nov 2010 - 06:11:57 CET
Message-id: <A36C2F39-B5D8-43D4-9292-45F1312563CF@mac.com>

On Nov 8, 2010, at 8:49 PM, Marc MERLIN wrote:
> 
> What is the proper way to unpack an rpm without losing the user/group info 
> (i.e. without installing it and without relying on an rpmdb, just unpacking
> its files with proper perms).
> 

The likely flaw you've experienced is in cpio,
which for POSIX cpio reasons, chooses to change permissions
to 700 on directories when run as root.

rpm2cpio is most definitely doing nothing other than
seeking to the beginning of the payload, and uncompressing
everything to EOF. The result is a cpio ball written to stdout.

There is no way to "unpack" without "installing" in rpm. The
two operations are largely identical for a "package manager"

hth

73 de Jeff
Received on Tue Nov 9 06:12:40 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.