These are distilled from the Fedora wiki. Those documents always take precedence over this one. MUST: http://fedoraproject.org/wiki/Packaging/NamingGuidelines * package is named appropriately - match upstream tarball or project name - try to match previous incarnations in other distributions/packagers for consistency - specfile should be %{name}.spec - non-numeric characters should only be used in Release (ie. cvs or something) - for non-numerics (pre-release, CVS snapshots, etc.), see http://fedoraproject.org/wiki/Packaging/NamingGuidelines#PackageRelease - if case sensitivity is requested by upstream or you feel it should be not just lowercase, do so; otherwise, use all lower case for the name - don't use non-Latin, non-numeric, non-"-,.,_,+" characters in the name http://fedoraproject.org/wiki/Packaging/Guidelines * is it legal for Fedora to distribute this? - OSI-approved - not a kernel module - not shareware - is it covered by patents? - it *probably* shouldn't be an emulator - no binary firmware * license field matches the actual license. * no pre-built binaries (except for bootstrapping) * license is open source-compatible. - use acronyms for licences where common * specfile name matches %{name} * verify source and patches (md5sum matches upstream, know what the patches do) - if upstream doesn't release source drops, put *clear* instructions on how to generate the the source drop; ie. # svn export blah/tag blah # tar cjf blah-version-src.tar.bz2 blah * skim the summary and description for typos, etc. * correct buildroot - MUST be below %{_tmppath}/ and MUST contain at least %{name}, %{version} and %{release} - should be (in descending order of preference: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %{_tmppath}/%{name}-%{version}-%{release}-root * if %{?dist} is used, it should be in that form (note the ? and % locations) * license text included in package and marked with %doc * keep old changelog entries; use judgement when removing (too old? useless?) * packages meets FHS (http://www.pathname.com/fhs/) * rpmlint on .srpm gives no output - justify warnings if you think they shouldn't be there * changelog should be in one of these formats: * Fri Jun 23 2006 Jesse Keating - 0.6-4 - And fix the link syntax. * Fri Jun 23 2006 Jesse Keating 0.6-4 - And fix the link syntax. * Fri Jun 23 2006 Jesse Keating - 0.6-4 - And fix the link syntax. * Packager tag should not be used * Vendor tag should not be used * Distribution tag should not be used * use License and not Copyright * Summary tag should not end in a period * if possible, replace PreReq with Requires(pre) and/or Requires(post) * specfile is legible - this is largely subjective; use your judgement * package successfully compiles and builds on at least x86 * BuildRequires are proper - builds in mock will flush out problems here - the following packages don't need to be listed in BuildRequires: bash bzip2 coreutils cpio diffutils fedora-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux-ng which * summary should be a short and concise description of the package * description expands upon summary (don't include installation instructions) * make sure lines are <= 80 characters * specfile written in American English * make a -doc sub-package if necessary - see http://fedoraproject.org/wiki/Packaging/Guidelines#head-9bbfa57478f0460c6160947a6bf795249488182b * packages including libraries should exclude static libraries if possible * don't use rpath * config files should usually be marked with %config(noreplace) * GUI apps should contain .desktop files * should the package contain a -devel sub-package? * use macros appropriately and consistently - ie. %{buildroot} and %{optflags} vs. $RPM_BUILD_ROOT and $RPM_OPT_FLAGS * don't use %makeinstall * install section must begin with rm -rf $RPM_BUILD_ROOT or %{buildroot} * locale data handling correct (find_lang) - if translations included, add BR: gettext and use %find_lang %{name} at the end of %install * consider using cp -p to preserve timestamps * split Requires(pre,post) into two separate lines * package should probably not be relocatable * package contains code - see http://fedoraproject.org/wiki/Packaging/Guidelines#CodeVsContent - in general, there should be no offensive content * package should own all directories and files * there should be no %files duplicates * file permissions should be okay; %defattrs should be present * %clean should be present * %doc files should not affect runtime * if it is a web app, it should be in /usr/share/%{name} and *not* /var/www * no files can be under /srv * verify the final provides and requires of the binary RPMs * run rpmlint on the binary RPMs SHOULD: * package should include license text in the package and mark it with %doc * package should build on i386 * package should build in mock