The error “Installed (but unpackaged) file(s) found” in rpmbuild
typically occurs when you are building an RPM package and there are files that are installed on the system, but they are not specified in the RPM specification file (.spec
file). This means that the files will not be included in the RPM package, and when the package is installed on another system, these files will not be present. (www.ameriseed.net)
To resolve this error, you can follow these steps:
- Identify the files that are causing the error:
$ rpmbuild --define "_topdir /path/to/rpmbuild" -ba package.spec 2>&1 | grep 'Installed (but unpackaged) file(s) found'
- Add the files to the RPM specification file (
.spec
file):
In the .spec
file, you need to add a section for the files that are causing the error. You can use the %files
section to specify the files that should be included in the RPM package.
For example:
%files
/path/to/file1
/path/to/file2
- Rebuild the RPM package:
Once you have updated the .spec
file, you can rebuild the RPM package:
$ rpmbuild --define "_topdir /path/to/rpmbuild" -ba package.spec
This should resolve the “Installed (but unpackaged) file(s) found” error in rpmbuild
. If you are still encountering the error, make sure that you have specified the correct path to the files in the .spec
file.