Hmm no replies? I’ve got a bit further with a spec like this (ok I chopped a bit out)
BuildRoot: %{_builddir}/%{name}-buildroot %prep %setup %build ./configure --prefix=/tmp/bind9.2.3 %install make install DESTDIR=$RPM_BUILD_ROOT %files %defattr(-,root,root) /etc/logrotate.d/named /etc/rc.d/init.d/named /etc/rndc.conf /etc/rndc.key /etc/sysconfig/named
The install section runs make which goes on for quite a bit. However if finishes with a list of errors.
+ /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip + /usr/lib/rpm/brp-strip-comment-note Processing files: bind-9.2.3-1 error: File must begin with "/": error: File not found: /home/mhull/build/BUILD/bind-buildroot/etc/logrotate.d/named error: File not found: /home/mhull/build/BUILD/bind-buildroot/etc/rc.d/init.d/named error: File not found: /home/mhull/build/BUILD/bind-buildroot/etc/rndc.conf error: File not found: /home/mhull/build/BUILD/bind-buildroot/etc/rndc.key error: File not found: /home/mhull/build/BUILD/bind-buildroot/etc/sysconfig/named error: File not found: /home/mhull/build/BUILD/bind-buildroot/usr/lib/libisccc.so.0 error: File not found: /home/mhull/build/BUILD/bind-buildroot/usr/lib/libisccc.so.0.0.1 ….. (lots more)
It then repeats all these in a section titles ‘RPM Build Errors’
Any ideas?
-----Original Message-----
Folks I am trying to build my first ever RPM. I have read several online guides such as the HOWTO on rpm.org but they/re aren’t doing me much good at the moment. I am trying to build an RPM for bind-9.2.3. To install for the normal tarball I would use something like ./configure –prefix=/opt/named make
I’ve checked the %prep section of my spec file, it completes OK. The build sections just barfs.
Here’s a wee bit of my really complicated spec file!
%prep %setup %build ./configure --prefix=/tmp %install make DESTDIR=$RPM_BUILD_ROOT install
The output that this produces is
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.73431 + umask 022 + cd /home/mhull/build/BUILD + cd bind-9.2.3 + make DESTDIR=/home/mhull/build/BUILD/bind-buildroot install '. Stop. No rule to make target `install error: Bad exit status from /var/tmp/rpm-tmp.73431 (%install)
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.73431 (%install)
Note, a simpler ‘make install’ produces the same error.
If I delete everything from my build directory, run ‘rpm –bc bind.spec’ it does everything in the %prep and %build sections OK. If I cd into the BUILD/bind-9.2.3 directory and run ‘make install’ it all works. So why does %install section of my spec file fail?
I have also tried just using make instead of ‘make install’. This gives a different error + make : command not found510: make error: Bad exit status from /var/tmp/rpm-tmp.14510 (%install)
Please help if you can.
Martin Hull x4330
|