Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rpmbuild Installed (but unpackaged) files source

I'm trying to build an RPM from binaries on a REDHAT 6 system. I have all the files included in the %files section (find /path/to/fake/install -type f >> specfile)

When I run rpmbuild -bb specfile --target x86_64 I get

Checking for unpackaged file(s): /usr/lib/rpm/check-files /path/to/rpmbuild/BUILDROOT/Package-1.0.0-1.el6.x86_64
error: Installed (but unpackaged) file(s) found:

RPM build errors:
    Installed (but unpackaged) file(s) found:

Note that no files are listed in the error message. I'm not sure what's wrong, any ideas?

like image 937
Trevor Avatar asked Nov 15 '12 16:11

Trevor


2 Answers

You can ignore these kind of errors by using

%define _unpackaged_files_terminate_build 0

See also

like image 118
Like Avatar answered Oct 30 '22 21:10

Like


I would guess your /path/to/fake/install is not correct.

The path in the %files section must be the path where the files will eventually be installed, e.g. /usr/local/bin/myprog. During the rpm build, in the %build section you need to make sure you put the files to the very same place you specify in the %files section, or you use the buildroot option of rpmbuild and use $RPM_BUILD_ROOT variable in your spec file with a sub-path matching the %files list, in this example $RPM_BUILD_ROOT/usr/local/bin/myprog. See http://www.rpm.org/max-rpm-snapshot/ch-rpm-anywhere.html for details.

like image 11
Bernhard Avatar answered Oct 30 '22 21:10

Bernhard