RPM packaging (was: Last set of changes for 1.1.3)

Nicolas Baradakis nbk at sitadelle.com
Tue Aug 29 11:01:29 CEST 2006

Sandworm wrote:

> On Friday, 25 August 2006 8:17 PM Nicolas Baradakis wrote:
> > Is it impossible to force rpmbuild to package the files installed by
> > the Makefile in /usr/share/doc/... with a line the %files section?
> >
> >   %files
> >   ...
> >   %{_datadir}/doc/%{name}-%{version}/*/*
> I don't know what this is supposed to do, but having it generates
> an error:
> RPM build errors:
>     create archive failed on file /var/tmp/freeradius-
> root/usr/share/doc/freeradius-1.1.3/examples/iplanet.ldif: cpio:
> open failed - Bad file descriptor

The line is supposed to pull the files to be found in
$RPM_BUILD_ROOT/usr/share/doc/freeradius-1.1.3/ into the

The files should be there: they're installed during the "make install".
No idea why there's a "Bad file descriptor" error.

> > I've seen something similar in suse/freeradius.spec, but I think
> > this is a violation of the packaging rules: files in the *source*
> > directory should not be deleted while building a package.
> I don't know if this deletion is so much of a problem. While
> building via rpmbuild, the source tarball is (normally) in
> /usr/src/redhat/SOURCES, the tarball is expanded into
> /usr/src/redhat/BUILD, and the (temporary) build root (which is
> what the spec variable $RPM_BUILD_ROOT points to) is in
> /var/tmp/freeradius-root. The deletion happens in this directory,
> which is supposed to be deleted anyway after the build. The
> *source* directory then does not get affected by the packaging.

Thanks for the explanation: I never used rpmbuild myself, so I didn't
know the detailed mechanisms. Then it appears deletion is not really
a problem. The only thing that is strange, is that you redo with
rpmbuild what the Makefile has already done.

Nicolas Baradakis

More information about the Freeradius-Devel mailing list