Discussion:
Didactic spec file suggestions?
Adrián Márques
2008-09-24 18:54:28 UTC
Permalink
Hi all,

I'm just starting with RPM packaging. I've been reading around a lot and
everyone recommends learning from working spec files of other projects.
I've also read comments about how it is not uncommon to find 'bad rpm
practices' in some of these.
Right now I'm checking out spec files at random from JPackage (I have to
package a java app).

Do any of you have suggestions on what freely-available spec files are
worth checking out for a newcomer? The most valuable for me would be
those that illustrate how to do key elements of packaging 'the right
way'. Right now I'm particularly interested in how to list files and
what logic (not)to put in the %pre, %post, %preun, and %postun scripts,
but I'm sure other things will come up soon enough.

I'd highly appreciate any suggestions; even more so if you could also
mention why you deem those spec files to be important or which aspects
of them are relevant in particular.

Thank you all.

Adrián
G***@aotx.uscourts.gov
2008-09-24 21:44:29 UTC
Permalink
Post by Adrián Márques
I'm just starting with RPM packaging. I've been reading around a lot and
everyone recommends learning from working spec files of other projects.
I've also read comments about how it is not uncommon to find 'bad rpm
practices' in some of these.
Right now I'm checking out spec files at random from JPackage (I have to
package a java app).
Do any of you have suggestions on what freely-available spec files are
worth checking out for a newcomer? The most valuable for me would be
those that illustrate how to do key elements of packaging 'the right
way'. Right now I'm particularly interested in how to list files and
what logic (not)to put in the %pre, %post, %preun, and %postun scripts,
but I'm sure other things will come up soon enough.
I'd highly appreciate any suggestions; even more so if you could also
mention why you deem those spec files to be important or which aspects
of them are relevant in particular.
I strongly recommend checking out a few documents:

http://fedoraproject.org/wiki/Packaging/Guidelines
https://fedoraproject.org/wiki/Packaging/Java
https://fedoraproject.org/wiki/Packaging/JPackagePolicy
https://fedoraproject.org/wiki/PackagingTricks
https://fedoraproject.org/wiki/Packaging/FrequentlyMadeMistakes


You might check out this one for Java, but they is just a draft and I
haven't checked it out:
https://fedoraproject.org/wiki/PackagingDrafts/JavaPackageNaming

Another one that is very good to read is the presentation that Tom Callaway
gives at the RH Summit.

http://www.redhat.com/promo/summit/2008/downloads/pdf/Wednesday_130pm_Tom_Callaway_OSS.pdf

-greg
Michael A. Peters
2008-09-27 19:50:20 UTC
Permalink
Post by Adrián Márques
Hi all,
I'm just starting with RPM packaging. I've been reading around a lot and
everyone recommends learning from working spec files of other projects.
I've also read comments about how it is not uncommon to find 'bad rpm
practices' in some of these.
Right now I'm checking out spec files at random from JPackage (I have to
package a java app).
Do any of you have suggestions on what freely-available spec files are
worth checking out for a newcomer?
Take a look at the Fedora project packaging guidelines.
Install rpmlint and use it to check your src.rpm and compiled rpms.

Be aware - not all errors or warnings rpmlint finds are valid, but very
often they are.

Loading...