[Fedora-packaging] Few questions regarding spec file standard

Eric Griffith egriffith92 at gmail.com
Tue Feb 24 05:42:03 UTC 2015


Hey everyone, first message to the mailing list and a new packager in
general. I've gone over the wiki and the docs but a few things are
still unclear to me.

1) rpmlint complains about source0 not being a valid URL, but it
rpmbuild can't find the source if I have it correct... Currently it
says:

Source0:
https://github.com/01org/thermal_daemon/archive/v%{version}.tar.gz

But when I do "rpmbuild -ba thermal_daemon.spec" (following Fedora
Documentation http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/index.html
) then rpmbuild complains about:

error: File /home/egriffith/rpmbuild/SOURCES/v1.30.tar.gz: No such
file or directory

presumably because its just looking at "v%{version}.tar.gz". What is
the appropriate fix here? The upstream source is in fact:

https://github.com/01org/thermal_daemon/archive/v%{version}.tar.gz (in
this case v1.30.tar.gz)

but the download link gives you "thermal_daemon-1.3.tar.gz" which is
in my SOURCES directory. So do I rename thermal_daemon-1.3.tar.gz to
be "v1.30.tar.gz" or do I modify "Source0" to not be 100% faithful to
the actual URL? Or is there an override I can use to specify that the
downloaded files have a different name than the upstream source URL?

2) %build section. The original spec file had 'autoreconf' the
compilation instructions had ./autogen.sh. Which is the correct one to
use? Current spec uses autogen.sh

3) Is a "BuildRequires: systemd" necessary or is it just redundant?

4) Can someone link or explain the Requires(post)/(preun)/(postun),
same with %post, %preun, %postun

5) %files does every single file need to be listed here or just
'important ones? I left out /usr/share/src, /usr/lib and a couple
others.

6) Upstream name is "thermal_daemon" but I see it packaged elsewhere
as "thermald" and the binary / .service is thermald. Preference goes
to...?


More information about the packaging mailing list