RPM homepage link
Home
Up

  

Unpackaged files message in RPM-4.1 and following


RPM version 4.1 and following demonstrate a new behaviour in the rpmbuild  process. Previously, a build process might place any number of files, say in the %install  stanza, when running the make install  part of a Makefile,  in the customary /var/tmp/%{name}-root/  BuildRoot  (the RPM_BUILD_ROOT). Once through that part of the Makefile, it can then completely ignore these files in the %files  binary packaging stanza.

This often happens when an upstream maintainer adds, or deletes items from new directory spurs in the make install , and the change might be missed during an unattended or automated rebuild. This option permits careful packagers to cross check the quality of their packaging.

So as a cross check, /usr/lib/rpm/check-files  is now enabled during the %files  stanza, to help a packager identify possibly omitted files. This obviously will disclose breakage in existing .SPEC files, but this should be a reasonably plainless transition as the specfile packager amends them to properly account for all expected files.

Obviously some maintaining packagers will take some time to complete the process for their packages; in the interim, for the causal package builder, Jeff Johnson offered this advice.

-- R P Herrold, <herrold@owlriver.com>, Editor


Date: Fri, 20 Sep 2002 18:42:44 -0400
From: Jeff Johnson <jbj@redhat.com>
Reply-To: rpm-list@redhat.com
To: rpm-list@redhat.com
Subject: rh-rpm] Re: Advised wanted on building perl module rpms

On Fri, Sep 20, 2002 at 11:34:29PM +0100, Mark C wrote:
> Hi,
>
> I'm building a perl-SDL rpm, I have successfully got it to compile and
> build as per my spec file (now I have a headache :-) as it kept wanting
> to install itself into the proper destination directory).
>
> Anyway when the build finished, it spate out a warning regarding files
> found, but not packaged, the error below:
>
> Checking for unpackaged file(s): /usr/lib/rpm/check-files
> /var/tmp/rpmbuild/perl-SDL-root
> warning: Installed (but unpackaged) file(s) found:
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/perllocal.pod
>

A pod file? That possibly should be included in the rpm, but I know as little as possible about perl :-)

Meanwhile, this is new behavior in rpm-4.1, detecting built but unpackaged files. The default behavior (if you don't have redhat-rpm-config installed), is to stop the build.

The "fix" is to either
1) include the file in a package (or equivalently do
rm -f $RPM_BUILD_ROOT/path/to/file in %install).

2) Reconfigure to warn, not stop, the build. The relevant macro(s) are (from /usr/lib/rpm/macros):

# # Script gets packaged file list on input and buildroot as first parameter. # Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged. # # Note: Disable (by commenting out) for legacy compatibility. %__check_files /usr/lib/rpm/check-files %{buildroot} # # Should unpackaged files in a build root terminate a build? # # Note: The default value should be 0 for legacy compatibility. %_unpackaged_files_terminate_build 1 # # Should missing %doc files in the build directory terminate a build? # # Note: The default value should be 0 for legacy compatibility. %_missing_doc_files_terminate_build 1
Put alternative values in /etc/rpm/macros (or ~/.rpmmacros) to taste.

HTH

73 de Jeff

--
Jeff Johnson ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC



Date: Sat, 12 Oct 2002 14:14:49 -0200
From: Andre Costa <brblueser@uol.com.br>
Reply-To: rpm-list@redhat.com
To: rpm-list@redhat.com
Subject: Re: RH 8.0 httpd-2.0.40-8.src.rpm has build problems

Hi,

I might be able to help with this one, since I was the original poster of a similar question: Jeff Johnson taught me this nice trick:

echo "%_unpackaged_files_terminate_build 0" >> /etc/rpm/macros
This will instruct RPM 4.1 not to abort due to unpackaged files.




And then this came in:

Date: Fri, 04 Jul 2003 15:02:56 +0200
From: Dr. Peter Bieringer <pb@bieringer.de>
To: Andre Costa <brblueser@uol.com.br>, Jeff Johnson <jbj@redhat.com>, herrold@owlriver.com
Subject: Unpackaged files message in RPM-4.1 and following

Hi,

just a note about:

</hintskinks/unpackaged-files/>

Instead of setting this switch globally, you can also do this per spec file (sure a better way) by adding following line on top of a spec file:

%define _unpackaged_files_terminate_build 0

Hope this helps,
Peter
--
Dr. Peter Bieringer http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D mailto: pb at bieringer dot de
Deep Space 6 Co-Founder and Core Member http://www.deepspace6.net/


Last updated: Sat, 16 Dec 2006 14:26:40 -0500

 

Back to Top page
Maintained by Owl River Company -- Comments to: rpm editor, please.