RPM Community Forums

Mailing List Message of <rpm-users>

Re: Does %files support -foo ?

From: Jeff Johnson <n3npq.jbj@gmail.com>
Date: Fri 05 Nov 2010 - 23:23:08 CET
Message-Id: <AB21C337-2B87-4290-98B8-8A1E4A2EBA62@mac.com>
(replied privately already, duped here too)

On Nov 5, 2010, at 5:37 PM, Marc MERLIN wrote:

> I couldn't find this in the docs.
> If I have 
> %files
> /*
> Can I do something like:
> %files                                                                                                                      
> /*
> %dir 
> -/etc/init.d
> What I'm trying to do is to package all the file and directories, including 
> /etc/init.d/foo
> but I do not want the RPM to contain /etc/init.d since the target system has
> /etc/init.d as a symlink and trying to create a directory on top of it would
> be bad.
> Is that possible without listing all the directories separately and not
> using
> %files
> /* 
> anymore?

There is a %exclude option that does "everything but this ..." filtering.

   %exclude has some minor issues in various versions of RPM.

In my experience, its just as simple to switch to a manifest using
	%files -f manifest

Generate the manifest at end of %install, and filter paths however you
wish with sed/grep/cut/awk/whatever.


73 de Jeff
> Thanks,
> Marc
> -- 
> "A mouse is a device used to point at the xterm you want to type in" - A.S.R.
> Microsoft is to operating systems & security ....
>                                      .... what McDonalds is to gourmet cooking
> Home page: http://marc.merlins.org/  
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
Received on Fri Nov 5 23:23:28 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.