1

I try to build rpm from source by running

rpmbuild -ta cups-1.7.0-source.tar.gz  --without dbus

but get

Processing files: cups-1.7.0-1.x86_64
error: File not found: /root/rpmbuild/BUILDROOT/cups-1.7.0-1.x86_64/usr/share/cups/usb
error: File not found by glob: /root/rpmbuild/BUILDROOT/cups-1.7.0-1.x86_64/usr/share/cups/usb/*

What should I do? What package is it? I found nothing in google.

ThatsMe
  • 767

1 Answers1

1

I would attempt to take the source RPM (SRPM) from Fedora and simply rebuild that instead of trying to rebuild it from the source tarball file. I'm not sure that the CUPS tarball comes with a usable .spec file for instructing rpmbuild on how to package it.

Example

You can download the F21 version of the SRPM here.

$ wget http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/source/SRPMS/c/cups-1.7.0-6.fc21.src.rpm

Then build it like so:

$ rpmbuild --rebuild cups-1.7.0-6.fc21.src.rpm

If you've never built an RPM before you'll likely want to install the rpmdevtools package which provides tools for facilitating package building.

$ sudo yum install rpmdevtools

You can then use the included command to setup your own workspace for building packages. Any user can build packages, so you generally shouldn't ever do this using root.

$ rpmdev-setuptree

Once you've run this, you can run the rpmbuild --rebuild ... command I provided above which should produce a .rpm file in the appropriate directory under $HOME/rpmbuild/RPMS/.

If you need further help I'd check out my extensive tutorials on the entire topic of dealing with RPMS. There's a 4 part series on my blog.

References

slm
  • 369,824