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

Re: fakeroot




On Jul 29, 2006, at 3:43 PM, Frank Cusack wrote:

On July 29, 2006 10:10:42 AM -0600 Bob Proulx <bob proulx com> wrote:
Red Hat's rpm contains a %attr(-,root,root) directive that overrides
the owners stored in the embedded cpio of the .rpm file.  Therefore
generally fakeroot is not needed with rpm.  Simply use %attr to set
the ownership as you require them to be set.  You will still see the
builder's ownership in the .rpm file (e.g. rpm2cpio) but at
installation time the ownership will be set by rpm explicitly.

Minor point (don't let it distract from the main point of the thread),
this is incorrect.  rpm alters the file data when STORING data into
the embedded .cpio, not when EXTRACTING.  rpm2cpio | cpio -itv will
reveal the %attr attributes, not the on-disk attributes at build time.


Hmmm, not per-se. None of the info in cpio headers is used by rpm (other than
the path name), so %attr() is set by rpm -Uvh when EXTRACTING.

However, I have a dim memory of generating the cpio headers from % attr rather than from the staged file in $RPM_BUILD_ROOT like 4-5 years ago in order to simplify QA to diff'in rpm -qlp against rpm2cpio ... | cpio -itv, and so that rpm2cpio would result in a largely (cpio has its own special pains) identical install.

So %attr is used both STORING and EXTRACTING iirc.

And fakeroot (or any equivalent LD_PRELOAD scheme) can be used, but is largely unnecessary.

73 de Jeff


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