Todd McGuinness
Todd McGuinness

Reputation: 269

rpmbuild failing error: Installed (but unpackaged) file(s) found:

I looked around but none of the answers to this same error message worked in my simple package... I am building the rpm using rpmbuild on Redhat ES 6 and no matter what I have done in my spec file I get the same results. Thank you in advance for your help.

Here is my spec file:

Name:  package
Version: 3.2.5
Release: redhat
Summary: Company package gateway pos server

Group:  Engineering
License: Company LLC - owned
URL:    http://www.company.com
Source: %{name}.tar.gz

%description
The Company package gateway server provides a key component in the Company system      architecture which passes information between the clients and the API.

%prep
%setup -n %{name}

%build

%define debug_package %{nil}

%install
mkdir -p $RPM_BUILD_ROOT/srv/package/gateways/config
mkdir -p $RPM_BUILD_ROOT/srv/package/gateways/logs

install -m 700 gateway $RPM_BUILD_ROOT/srv/package/
install -m 700 gatewayclient.conf $RPM_BUILD_ROOT/srv/package/
install -m 700 gateway.conf $RPM_BUILD_ROOT/srv/package/
install -m 700 rules.conf $RPM_BUILD_ROOT/srv/package/
install -m 700 gatewaytest.conf $RPM_BUILD_ROOT/srv/package/
install -m 700 gateways/bci.exe $RPM_BUILD_ROOT/srv/package/gateways/
install -m 700 gateways/config/bci_iso8583.conf $RPM_BUILD_ROOT/srv/package/gateways/config/

%post

%clean
rm -rf %{buildroot}
rm -rf $RPM_BUILD_ROOT
rm -rf %{_tmppath/%{name}
rm -rf %{_topdir}/BUILD%{name}

%files -f %{name}.lang
%defattr(-,root,root,-)

/srv/
/srv/package/
/srv/package/gateways/
/srv/package/gateways/logs/
/srv/package/gateways/config/
/srv/package/gateway
/srv/package/gatewayclient.conf
/srv/package/gateway.conf
/srv/package/gatewaytest.conf
/srv/package/rules.conf
/srv/package/gateways/bci.exe
/srv/package/gateways/config/bci_iso8583.conf

%changelog
* Thurs May 09 2013 Owner
- 1.0 r1 First release

The error message is here:

Checking for unpackaged file(s): /usr/lib/rpm/check-files     /home/rpmbuild/rpmbuild/BUILDROOT/package-3.2.5-redhat.x86_64
error: Installed (but unpackaged) file(s) found:
   /srv/package/gateways/bci.exe
   /srv/package/gateways/config/bci_iso8583.conf
   /srv/package/gateway
   /srv/package/gateway.conf
   /srv/package/gatewayclient.conf
   /srv/package/gatewaytest.conf
   /srv/package/rules.conf


RPM build errors:
   Installed (but unpackaged) file(s) found:
   /srv/package/gateways/bci.exe
   /srv/package/gateways/config/bci_iso8583.conf
   /srv/package/gateway
   /srv/package/gateway.conf
   /srv/package/gatewayclient.conf
   /srv/package/gatewaytest.conf
   /srv/package/rules.conf

Edition - Reran with suggestions below and got these results:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/rpmbuild/rpmbuild/BUILDROOT/package-3.2.5-redhat.x86_64
error: Installed (but unpackaged) file(s) found:
   /srv/package/gateways/bci.exe
   /srv/package/gateways/config/bci_iso8583.conf
   /srv/package/gateway
   /srv/package/gateway.conf
   /srv/package/gatewayclient.conf
   /srv/package/gatewaytest.conf
   /srv/package/rules.conf


RPM build errors:
    Installed (but unpackaged) file(s) found:
   /srv/package/gateways/bci.exe
   /srv/package/gateways/config/bci_iso8583.conf
   /srv/package/gateway
   /srv/package/gateway.conf
   /srv/package/gatewayclient.conf
   /srv/package/gatewaytest.conf
   /srv/package/rules.conf

Upvotes: 4

Views: 24840

Answers (3)

Todd McGuinness
Todd McGuinness

Reputation: 269

My latest SPEC file:

Name:  package
Version: 3.2.5
Release: redhat
Summary: company package gateway pos server

Group:  Engineering
License: company LLC - owned
URL:    http://www.company.com
Source: %{name}.tar.gz

%description
The company package gateway server provides a key component in the company system architecture which passes information between the clients and the API.

%prep
%setup -n %{name}

%build

%define debug_package %{nil}

%install
mkdir -p $RPM_BUILD_ROOT/srv/package/gateways/config
mkdir -p $RPM_BUILD_ROOT/srv/package/gateways/logs

install -m 700 package $RPM_BUILD_ROOT/srv/package/
install -m 700 packageclient.conf $RPM_BUILD_ROOT/srv/package/
install -m 700 package.conf $RPM_BUILD_ROOT/srv/package/
install -m 700 rules.conf $RPM_BUILD_ROOT/srv/package/
install -m 700 packagetest.conf $RPM_BUILD_ROOT/srv/package/
install -m 700 gateways/bci.exe $RPM_BUILD_ROOT/srv/package/gateways/
install -m 700 gateways/config/bci_iso8583.conf $RPM_BUILD_ROOT/srv/package/gateways/config/

%post

%clean
rm -rf %{buildroot}
rm -rf $RPM_BUILD_ROOT
rm -rf %{_tmppath/%{name}
rm -rf %{_topdir}/BUILD%{name}

%files
%defattr(-,root,root,-)

%dir /srv/package/
%dir /srv/package/gateways/
%dir /srv/package/gateways/logs/
%dir /srv/package/gateways/config/
bci.exe
bci_iso8583.conf
package
package.conf
packageclient.conf
packagetest.conf
rules.conf

%changelog
* Thurs May 09 2013 Todd McGuinness
- 1.0 r1 First release

Upvotes: 0

Patches
Patches

Reputation: 176

You're passing the -f %{name}.lang argument to %files, but you don't appear to call %find_lang or ship any files in /usr/share/locale. If you don't call %find_lang, RPM doesn't create a %{name}.lang file with a list of translation files. The -f argument to %files just makes RPM add the contents of that file to %files at build time; it's completely unnecessary if that file doesn't exist. Unfortunately, it seems to also break RPM if that file doesn't exist.

So, just remove the -f argument from %files and it should work.

Upvotes: 1

Aaron D. Marasco
Aaron D. Marasco

Reputation: 6748

Try changing your %files section:

%defattr(-,root,root,-)
# Don't own /srv/, but own directories:
%dir /srv/package/
%dir /srv/package/gateways/
%dir /srv/package/gateways/logs/
%dir /srv/package/gateways/config/
# Everything in those directories:
# (lazy way instead of specifying each file)
/srv/package

As noted, you don't want to own "/srv/" yourself. If that doesn't work, I cannot explain why some are the same as you've listed, but the "gatewaygw*" ones need to either be included or erased from the target root by your scripts.

Upvotes: 7

Related Questions