Page 1 of 1

CentOS 5 - rpmbulid installed but unpackaged file

Posted: 2019/09/19 23:28:21
by afalanga
I have a strange one. Yes, I know that CentOS 5 is EOL (perhaps meaning I'm SOL pun intended :roll:) but I'm asking anyway because these systems aren't going to be changed anytime soon and I must roll out a new package for them. So, I'm building a package to easily deploy an /sbin/ifup-local file to systems needing it.

Other than strange things like I had to manually define %{buildroot}, I've managed to get the package to build. However, when it's "Processing file(s)" I get the following error
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/eth1_network_changes/pkg/rpmbuild/BUILDROOT/eth1_network_changes-0.0.1-1.x86_64
error: Installed (but unpackaged) file(s) found:

RPM build errors:
Installed (but unpackaged) file(s) found:
My %install and %files sections
echo %{buildroot}
mkdir -p %{buildroot}/sbin
install --mode=u+rwx,go+rx %{_builddir}/%{name}-%{version}/src/ifup-local %{buildroot}/sbin

%attr(-,root,root) /sbin/ifup-local
Like I said, I had to define %{buildroot}, that's why it's echoed. I defined it according to this ... ld_process definition (which is what it is on my CentOS 6 and 7 boxes). I have tried setting _unpackaged_files_terminate_build to 0, but this did nothing for me either. What is broken in this (or what am I missing in my spec file)? Is there some sort of different magic at work in EL5? In case it matters, rpmbuild is version

Oh, you'll notice that "root" appears in the paths above. This error occurs whether root or not. The package will not be built by root when distributed. This was my testing.

Re: CentOS 5 - rpmbulid installed but unpackaged file

Posted: 2019/09/20 08:25:18
by jlehtone
I can't help on the question, but how about a different approach?

Ansible. Assuming that you can access the machines over network (you would not have ifup* otherwise),
ansible can deploy (copy a file) to EL5 devices.
(Host variable ansible_python_interpreter=/usr/bin/python2.6 is required and some ansible modules do not work on EL5, but 'copy' is trivial.)

I did use to build rpms ...