<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 23, 2015 at 11:42 PM, Eric Griffith <span dir="ltr">&lt;<a href="mailto:egriffith92@gmail.com" target="_blank">egriffith92@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey everyone, first message to the mailing list and a new packager in<br>
general. I&#39;ve gone over the wiki and the docs but a few things are<br>
still unclear to me.<br>
<br>
1) rpmlint complains about source0 not being a valid URL, but it<br>
rpmbuild can&#39;t find the source if I have it correct... Currently it<br>
says:<br>
<br>
Source0:<br>
<a href="https://github.com/01org/thermal_daemon/archive/v%{version}.tar.gz" target="_blank">https://github.com/01org/thermal_daemon/archive/v%{version}.tar.gz</a><br>
<br>
But when I do &quot;rpmbuild -ba thermal_daemon.spec&quot; (following Fedora<br>
Documentation <a href="http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/index.html" target="_blank">http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/index.html</a><br>
) then rpmbuild complains about:<br>
<br>
error: File /home/egriffith/rpmbuild/SOURCES/v1.30.tar.gz: No such<br>
file or directory<br>
<br>
presumably because its just looking at &quot;v%{version}.tar.gz&quot;. What is<br>
the appropriate fix here? The upstream source is in fact:<br>
<br>
<a href="https://github.com/01org/thermal_daemon/archive/v%{version}.tar.gz" target="_blank">https://github.com/01org/thermal_daemon/archive/v%{version}.tar.gz</a> (in<br>
this case v1.30.tar.gz)<br>
<br>
but the download link gives you &quot;thermal_daemon-1.3.tar.gz&quot; which is<br>
in my SOURCES directory. So do I rename thermal_daemon-1.3.tar.gz to<br>
be &quot;v1.30.tar.gz&quot; or do I modify &quot;Source0&quot; to not be 100% faithful to<br>
the actual URL? Or is there an override I can use to specify that the<br>
downloaded files have a different name than the upstream source URL<br></blockquote><div><br></div><div>This part can be  meh.  So, generally you want the url path to be where someone could download the file directly, such as by using spectool (<a href="http://linuxmanpages.net/manpages/fedora21/man1/spectool.1.html">http://linuxmanpages.net/manpages/fedora21/man1/spectool.1.html</a>).<br><br></div><div>There are some recommendations about making a source url with github.<br><br>See this bug: <a href="https://fedorahosted.org/fpc/ticket/233">https://fedorahosted.org/fpc/ticket/233</a> and the page it links to. I think the bug gives great background.<br><br></div><div>Also: <a href="https://fedoraproject.org/wiki/User:Spot/GitHub_Guidelines">https://fedoraproject.org/wiki/User:Spot/GitHub_Guidelines</a><br><br></div><div>I&#39;m not a huge fan of the commit id portion, but whatever works i guess.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2) %build section. The original spec file had &#39;autoreconf&#39; the<br>
compilation instructions had ./autogen.sh. Which is the correct one to<br>
use? Current spec uses autogen.sh<br></blockquote><div>Use whatever your software needs/suggests.  If you aren&#39;t compiling anything you can even leave %build blank.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
3) Is a &quot;BuildRequires: systemd&quot; necessary or is it just redundant?<br></blockquote><div><br></div><div>I believe its necessary. Even if it currently isn&#39;t, there is a lot of discussion right now that maybe people should be explicit even if something was assumed previously.  I require it here:<br><br><a href="https://github.com/rackerlabs/plight/blob/master/plight.spec#L31-L34">https://github.com/rackerlabs/plight/blob/master/plight.spec#L31-L34</a> <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
4) Can someone link or explain the Requires(post)/(preun)/(postun),<br>
same with %post, %preun, %postun<br></blockquote><div>Basically its defining a requirement for that package/software to be available during those steps, even if its not necessarily required once the RPM is installed.  This page has some good explanations about each stage. <a href="http://fedoraproject.org/wiki/Packaging:ScriptletSnippets">http://fedoraproject.org/wiki/Packaging:ScriptletSnippets</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
5) %files does every single file need to be listed here or just<br>
&#39;important ones? I left out /usr/share/src, /usr/lib and a couple<br>
others.<br></blockquote><div>All files that are included need to be listed. That being said globbing can be effective. I&#39;d read through<br><br><a href="http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html">http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html</a><br><a href="http://fedoraproject.org/wiki/How_to_create_an_RPM_package/zh-tw#.25files_section">http://fedoraproject.org/wiki/How_to_create_an_RPM_package/zh-tw#.25files_section</a><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
6) Upstream name is &quot;thermal_daemon&quot; but I see it packaged elsewhere<br>
as &quot;thermald&quot; and the binary / .service is thermald. Preference goes<br>
to...?<br></blockquote><div><br></div><div>The packager... ? i think i&#39;d be more inclined to follow other packagers in a situation liek this where it seemed reasonable, otherwise i&#39;d default to pure upstream. <br></div></div></div></div>