Thanks for the quick response, spot. See below...
On 6/29/10 5:25 PM, Tom "spot" Callaway wrote:
On 06/29/2010 08:12 PM, Jay Hankinson wrote:
> Hello Fedora Devs,
> I'm currently going through the pre-review process for adding Ingres to
> the Fedora distribution
). I'm getting some
> conflicting information for a couple of issues and I was hoping for some
> Firstly, "%defattr()". The standard says it should be
> "%defattr(-.root,root-)" unless there is a good reason for it not to be.
> The vast majority of the files included in the Ingres packages are owned
> by the user 'ingres', which seems (IMHO) to be a good reason to use
> "%defattr(-,ingres,ingres,-)". One reviewer disagreed, one agreed this
> was probably OK but that I should check. What's the consensus here?
If there is a valid reason for the ingres user to own those files, then
it is correct to do so as a defattr. Just be careful. :)
Thanks, I will. :-)
> Next, use of -f in the %files section. There are over 1700 files
> the 4 RPMs and the ownership and permission for each file is maintained
> by one of the build tools. The file lists are generated as part of the
> build process, not stored statically in the source. In order to add the
> file lists to the SPEC files, I would need to do full build of the exact
> same source outside of RPM, generate the files list, add them to SPEC
> file and then run the RPM build. This is a fairly large over head for
> each update and makes maintenance a much larger task and much more
> susceptible to human error. By using the -f flag, I can generate the
> lists at build time using the existing manifest and they will always be
> correct. %files -f is also used by PostgreSQL so it's not completely
> outlawed. Am I OK to use it?
%files -f is permitted. You might find that things end up being more
complicated, especially if you have config files or locale files, as
your file list won't handle those properly.
Indeed and I've had to add a
few exceptions by hand. For most of the
files though, it's actually much easier for me to use the lists
generated from the existing (non-rpm) packaging info.
I tend to be of the opinion that the file lists in the spec are
to change radically for most packages, except for major revision
changes, and the fact that you can leverage tricks like:
# This entry in the %%files list causes your package to own
# /usr/share/ingres/ and all of the files and directories below it
# as found in the buildroot.
Not to mention * being valid in %files lists. If it were me, I'd try not
to use %files -f unless I absolutely had to.
Unfortunately, it not really possible
to split files along directory or
wildcard lines. They pretty much all install into the same locations.