Changing the %Setup Macro

devzero2000 pinto.elia at
Thu Feb 5 15:57:57 UTC 2009

On Wed, Feb 4, 2009 at 12:24 AM, Eric Aiken <eric.aiken at> wrote:

>  I realize it is intentional that the %setup macro extracts files and then
> chown/chmod's the extracted files.  Is there a way around this?
> I need to create an rpm of files (no compile, make install,etc).  There are
> a large number of files with very disparate owner/group/perms.
> Creating a bunch of %file statements to create external file lists with
> sed's  is not my preference.  If I could only:
> tar --atime-preserve --preserve-permissions --same-owner   file.tar
> that would quick and easy.
> Could I create a macro for chown/chmod to point to echo or some other
> harmless command within the spec  file and trick rpmbuild?
When i package proprietary appl i execute this script ( for filling the manifest on every
target package directory - but it is simple to change it for use with a file
list - and in the %file section use

%file -f manifest.list.

This is imho preferable because your solution and the trick that you want
work only if you build the package as the root user - a normal user can't in
%install set file/dir ownership to other user and this in general is
required by the package. And using the root user for build is no good. But


> _______________________________________________
> Rpm-list mailing list
> Rpm-list at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Rpm-list mailing list