rpmbuild Installed (but unpackaged) files source rpmbuild Installed (but unpackaged) files source linux linux

rpmbuild Installed (but unpackaged) files source


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.


One example where this may happen: Supposing in the %post section there is a %install_info and in the %postun section there is an associated %install_info_delete. This requires in the %install section an explicit removal of the intermediate directory of the info-files with a command like rm -f %{buildroot}/%{_infodir}/dir.