PDA

View Full Version : rpmbuild warning



Falconus
25th August 2009, 04:41 PM
I am trying to learn how to assemble an RPM from source, and in so doing am trying to figure out how to make a spec file.

This website gave a suggestion on how to find the files to include in the %files section: http://forums.fedoraforum.org/showthread.php?t=178924

I tried that, and rather than listing the files that I need, it just gives me the following message:

"warning: Could not canonicalize hostname: hostname.withheld"

It seems to have built without any specified files, which makes me more than a little bit suspicious that the package is broken. I found some people who had that error some years ago, but other than confirming that it was a known problem, that didn't really help me, as the solutions were sparse if any.

I have a FC11 x86_64, and I am running RPM version 4.7.1.

Thanks much!

Hlingler
25th August 2009, 04:52 PM
The warning about "Could not canonicalize hostname" can be safely ignored.

The (possible) absence of files cannot. Detailed info: http://docs.fedoraproject.org/drafts/rpm-guide-en/
It seems to have built without any specified files, which makes me more than a little bit suspicious that the package is broken.Look at the resultant RPM package(s) that was built, and see what files (if any) are imbedded:
rpm -qpl <insert-PATH-to-new-RPM>

Near the end of the rpmbuild, you should see the list of RPMs that were built, and the PATH where they were written to.

V

Falconus
25th August 2009, 05:16 PM
For some reason it renamed it to glib-debuginfo (glib is the source package I'm experimenting with).

rpm -qpl glib-debuginfo-2.20.3-2.fc11.x86_64.rpm
(contains no files)

I looked at the site, and am not entirely sure what I am doing wrong... It did mention that I need to tell it to unpack the source file before running ./configure, though that made no difference whatsoever...

Thanks,

Falconus

Hlingler
25th August 2009, 05:34 PM
http://docs.fedoraproject.org/drafts/rpm-guide-en/ch09s05.html
Unfortunately, this is not very helpful with respect to your question: how to know/find a list of files to be included.

The rpmbuild did not rename the resultant package, it automatically output a matching debugging package. If no base glib package was created, there was some error (or you missed that RPM in the list of resultant RPMs that were created).

Without reviewing your spec file in detail, I don't know what steps are being used/omited.

There are two ways that I've used to get a file list:
> Review the original spec file. Even if from another distro, this can shed light on what files to include.
> Run checkinstall (which can be problematic in itself), and see what files it wants to install. Not recommended, but can be useful.

Both of these are then checked by rpmbuild against the "all files in the $RPM_BUILD_ROOT directory", looking for built but unpackaged files.

V

Falconus
25th August 2009, 07:58 PM
Thanks... If it's not warning me which files weren't included that should have been, how do I verify that I didn't miss any? Or do I just have to cross my fingers?

Thanks,

Falconus

Hlingler
25th August 2009, 10:58 PM
If there is no resultant RPM, or if it's empty of files (not the auto-built *-debuginfo and/or *-devel, but rather the base/target package), that's a good sign that you made some mistake.

There is of course the "acid test": install and use the software. I frequently cross my fingers. :)

V

Falconus
26th August 2009, 03:54 AM
Ah, alright. That makes sense. Thanks.

Falconus