rpmbuild environment CentOS5 vs CentOS6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On CentOS5 I was used to create a simple spec file where at the end I'll
declare files and directories I wan't to package:

--< Snip >--
%files
%dir /opt/myapp
%dir /opt/myapp/bin
%dir /opt/myapp/etc
/opt/myapp/bin/exec01
/opt/myapp/etc/myapp.conf
----

I'll copy the file in /usr/src/redhat/SPECS and run "rpmbuild -bb
myapp.spec".

On CentOS6 rpm-build package no longer creates the /usr/src/redhat/...
directory tree. I followed the CentOS6 Wiki instructions to setup my
rpmbuild environment for a regular user.

When I try to build the package on CentOS6 I'm getting this error for every
single file and directory:

File not found:
/home/peter/rpmbuild/BUILDROOT/myapp-5.2-1el6.x86_64/opt/myapp/bin/exec01

I tried to override buildroot:

  rpmbuild -bb --define="buildroot /" myapp.spec
  error: %{buildroot} can not be "/"

As a workaround I can manually create
  /home/peter/rpmbuild/BUILDROOT/myapp-5.2-1el6.x86_64/
  and copy all my file in there but that's a lot of extra work.

Is there a way to get the same functionality on CentOS6 where rpmbuild will
collect the files from the main / directory and build the rpm package?

Thank you,

-- Peter
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux