RE: Files in build root but not in the file list now a fatal error. Why?

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

 



> > I already noticed that RH8 with rpmbuild 4.2.something 
> > issued warnings about files in the build root but not 
> > in the %files list.
> > 
> > So some developer in my shop got Fedora core 2 which comes 
> > with rpmbuild 4.3.something, and that warning became a fatal error.
> > 
> > Is there any way to provide a list or a pattern of files 
> > which are OK to have in the build root but not in the 
> > %files list? In particular, I have one file which I don't
> > really want to put elsewhere and which I need to
> > leave around to suit rpm: the file containing the file list.

> Any file is not OK, but what you may be able to do is add 
> said missing  files to %files list as an %exclude, like:
> 
> 	%exclude /some/file/in/build/you/don't/want
> 
> and then, from what I have seen in the source they get 
> ignored.  I have not tested this though, so YMMV.  
> Alternatively, you can delete said files in your %install
> section, so that when it goes to package up the files, the 
> unwanted files will not be there.   Look on www.rpm.org, and
> I think there is a section on this problem that lists other
alternatives.

So this is a "feature" I find irritating, but it's a matter
of the different constituencies rpm tries to serve.

You can disable the fatal-error-on-unpackaged-files behavior
by adding this to your .rpmmacros:

%_unpackaged_files_terminate_build 0

When you're packaging for an operating system from a collection
of base packages, you want to know what's changing as those
base packages evolve, and so this feature makes a nice flag
if there's some stuff you're not including in %files that
the package is now creating.  It's also an interesting flag
if builds on different machines produce different results.

In /my/ situation I build a number of test packages that are
subsets of what is built from a source tarball, and I actually
want %files to be my way to pick-and-choose which bits I
want to go into my package, I think it's a horrid kludge to
make, install, and then at the tail end of install, go
remove a bunch of stuff that just got installed.  I'll have
to go experiment with %exclude, I've heard it mentioned but not
seen it documented.

But as I said, rpm serves different constituencies and the
default behavior is never going to be ideal for everyone....


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux