-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi All,
In follow up to this thread[1], I have managed to create a RPM for menumaker[2].
The rpm and the spec file can be found here[3].
If anyone is interested, couple of harmless commands to try out: $mmaker fluxbox -c|less $info mmaker (the source doesn't a provide a man page)
This being my *first ever* rpm package, I don't expect it to be 100% correct. I would gladly welcome feedback.
[1] http://www.mail-archive.com/fedora-india@redhat.com/msg01432.html [2] http://menumaker.sourceforge.net [3] http://gsreekantan.fedorapeople.org/
Note: works fine on F10. On F11, some of the commands throw harmless(IMHO) python deprecation warnings. I suspect these are due to the move to python 2.6.
- -- Gireesh Sreekantan
Hi,
--- On Mon, Jun 1, 2009 at 1:06 AM, Gireesh Sreekantan sgireeshmail@gmail.com wrote: | This being my *first ever* rpm package, --
Congratulations! The first step is always the toughest.
--- | I don't expect it to be 100% | correct. I would gladly welcome feedback. --
#01 Source0 should point to a URL from the project page so anyone could download it from the source and verify it. For example:
Source0: http://downloads.sourceforge.net/%%7Bname%7D/%%7Bname%7D-%%7Bversion%7D.tar....
#02 "BuildRequires: gcc" need not be mentioned because it is included by default. See: http://fedoraproject.org/wiki/Packaging:Guidelines#Exceptions_2
#03 You need to put your e-mail address in the %changelog, along with the version number. You have two %changelog entries! Put the %changelog at the end. For example:
%changelog * Fri May 15 2009 Gireesh <sgireeshmail [AT] gmail DOT com> - 0.99-1 - updated spec file - bumped version minor number
0.99 is the Version and 1 is the .spec file version. Since you have already publicized your .spec, and if you make further changes to your .spec file, please increment the .spec file version number.
#04 In %files section, I am not sure if you want to put all under /usr/bin/*, and /usr/lib/*. Just choose the files that are to be packaged and use the macros -- %{_bindir}, %{_sbindir}. The same applies to %doc /usr/share/info/mmaker.info.gz.
#05 You also need to run rpmlint on .spec, and the built .src.rpm, and .rpm.
I see there are some warnings and errors for the .spec file. Please fix them.
$ rpmlint menumaker.spec menumaker.spec:6: W: non-standard-group Applications/Utilities menumaker.spec:42: E: hardcoded-library-path in /usr/lib/* menumaker.spec: W: more-than-one-%changelog-section 0 packages and 1 specfiles checked; 1 errors, 2 warnings.
#06 Because it is Python interpreted code, you also need to put "BuildArch: noarch" (say, after BuildRoot) in the .spec file.
#07 Also checkout Python RPM guildelines on howto package Python modules. https://fedoraproject.org/wiki/Packaging/Python https://fedoraproject.org/wiki/Packaging/Python/Eggs
I have actually updated Packaging-RPM with these minor details. Please use the latest 1.5 version, if you using it for reference. http://shakthimaan.com/downloads/glv/presentations/packaging-red-hot-paneer-...
Regards,
SK
On 06/01/2009 01:06 AM, Gireesh Sreekantan wrote:
[1] http://www.mail-archive.com/fedora-india@redhat.com/msg01432.html [2] http://menumaker.sourceforge.net [3] http://gsreekantan.fedorapeople.org/
I haven't tested the software yet but just looking the spec file, I can spot some issues with the packaging:
---
Version should be upstream version (ie) 0.99.7 and Release should be just 1 since it indicates your first build of the package.
Source0 should be a link to the upstream source. Reviewers need to know the software is what you claim it is.
GCC needn't be specified as a BuildRequires
https://fedoraproject.org/wiki/Packaging:Guidelines#Exceptions_2
Description shouldn't be over 80 characters in a single line. Run rpmlint on the spec file
You can drop the -n argument to setup if you give the version number correctly as indicated above.
Changelog should be at the bottom and follow
https://fedoraproject.org/wiki/Packaging/Guidelines#Changelogs
You cannot simply own everything under /usr/bin and /usr/lib but only own files that is actually part of the package. RPM would then remove them during uninstallation.
You have specified %changelog twice.
Also refer
https://fedoraproject.org/wiki/Packaging/Guidelines#Python
---
Rahul
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Thanks to some awesome feedback from Shakthi and Rahul, I have cleaned up the spec file and built a saner rpm.
http://gsreekantan.fedorapeople.org/
- -- Gireesh Sreekantan
Hi,
--- On Mon, Jun 1, 2009 at 1:59 PM, Gireesh Sreekantan sgireeshmail@gmail.com wrote: | I have cleaned | up the spec file and built a saner rpm. --
Before you re-post your changes, always double check the previous suggestions that were made, and make sure that they have been fixed.
#01 URL should be the link to the project URL, and not the source! Source0 should be the pointer to the source. They should be the following:
URL: http://menumaker.sourceforge.net/ Source0: http://downloads.sourceforge.net/%%7Bname%7D/%%7Bname%7D-%%7Bversion%7D.tar....
I think it is best to avoid giving a direct mirror URL in Source0. Also see: https://fedoraproject.org/wiki/Packaging/SourceURL
#03 You incremented the Release number but not in the changelog :)
%changelog * Mon Jun 1 2009 <sgireeshmail AT gmail DOT com> - 0.99.7-1 <=== - menumaker is now noarch - gcc is now an implicit BuildRequires - updated spec file
* Fri May 15 2009 <sgireeshmail AT gmail DOT com> - 0.99.7-1 - updated spec file - bumped version minor number
It must be: * Mon Jun 1 2009 <sgireeshmail AT gmail DOT com> - 0.99.7-2
#05: There are still rpmlint errors on the .spec file, generated .rpm and .src.rpm files. $ rpmlint menubar.spec $ rpmlint menumaker-0.99.7-2.noarch.rpm $ rpmlint menumaker-0.99.7-2.src.rpm
Please fix those. Also refer: https://fedoraproject.org/wiki/Common_Rpmlint_issues
#08: There is no group called "Applications/Other". The list of groups are available in /usr/share/doc/rpm-*/GROUPS.
#09: As the INSTALL file in the source package and http://menumaker.sf.net say, you don't need to build it to use menumaker. You can simply copy the pure Python files. But, byte-compiled ones run faster than code. As mentioned in the previous posts on Python packaging, please go through them.
#10: %description line is too long! Please break it with newlines.
SK