From Fedora Project Wiki
(some updates based on other templates) |
(fix wiki syntax) |
||
Line 2: | Line 2: | ||
<code> | <code> | ||
Review Guidelines | Review Guidelines | ||
----------------- | ----------------- | ||
URL: https://fedoraproject.org/wiki/Packaging:ReviewGuidelines | URL: https://fedoraproject.org/wiki/Packaging:ReviewGuidelines | ||
Stand: 2010-02-27 | Stand: 2010-02-27 | ||
() - SHOULD | () - SHOULD | ||
[] - MUST | [] - MUST | ||
{} - external Guidelines | {} - external Guidelines | ||
<> - Optional / common sense | <> - Optional / common sense | ||
[] rpmlint output: | |||
[] Spec in %{name}.spec format | |||
[] license allowed: | |||
[] license matches shortname in License: tag | |||
https://fedoraproject.org/wiki/Licensing | |||
[] license in tarball and included in %doc: | |||
[] package is code or permissive content: | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#CodeVsContent | |||
{} patches sent to upstream and commented | |||
https://fedoraproject.org/wiki/Packaging/PatchUpstreamStatus | |||
https://fedoraproject.org/wiki/Packaging/Minutes20080506 | |||
[] Source0 is a working URL | |||
https://fedoraproject.org/wiki/Packaging/SourceURL | |||
{} Sourceforge URL is Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz | |||
https://fedoraproject.org/wiki/Packaging/SourceURL#Sourceforge.net | |||
<> SourceX / PatchY prefixed with %{name} | |||
[] Source0 matches Upstream: | |||
{} Smallest compressed archive used | |||
https://fedoraproject.org/wiki/Packaging:SourceURL | |||
<> Latest version is packaged | |||
[] Package builds on all primary architectures: | |||
[] ExcludeArch bugs are filed and commented: | |||
[] BuildRequires are complete (mock builds) | |||
() No file dependencies outside of /etc /bin /sbin /usr/bin /usr/sbin | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#FileDeps | |||
[] %find_lang used for locales | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Handling_Locale_Files | |||
in %install: %find_lang %{name} | |||
%files -f %{name}.lang | |||
Maybe: BuildRequires: gettext | |||
[] Every (sub)package containing libraries runs ldconfig | |||
%post -p /sbin/ldconfig | |||
%postun -p /sbin/ldconfig | |||
[] .h (header) files are in -devel subpackage | |||
[] .a (static libraries) are in -static subpackage | |||
[] contains .pc (pkgconfig) files and has Requires: pkgconfig | |||
() .pc files are in -devel subpackage | |||
[] contains .so.X(.Y) files and .so is in -devel | |||
[] -devel subpackage has Requires: %{name} = %{version}-%{release} | |||
[] .la files (libtool) are not included | |||
[] does not bundle copies of system libraries | |||
https://fedoraproject.org/wiki/Packaging:Guidelines#Duplication_of_system_libraries | |||
[] Has GUI and includes %{name}.desktop | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#desktop | |||
[] Follows desktop entry spec | |||
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html | |||
[] Valid .desktop Name | |||
[] Valid .desktop GenericName | |||
[] Valid .desktop Categories | |||
http://standards.freedesktop.org/menu-spec/latest/apa.html | |||
[] Valid .desktop StartupNotify | |||
http://www.freedesktop.org/wiki/Specifications/startup-notification-spec?action=show&redirect=Standards%2Fstartup-notification-spec | |||
[] .desktop file installed with desktop-file-install in %install | |||
[] Prefix: /usr not used (not relocatable) | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Relocatable_packages | |||
[] Owns all created directories | |||
[] no duplicates in %files | |||
[] %defattr(-,root,root,-) is in every %files section | |||
[] Does not own files or dirs from other packages | |||
[] included filenames are in UTF-8 | |||
[] %clean is rm -rf %{buildroot} or $RPM_BUILD_ROOT | |||
[] %install starts with rm -rf %{buildroot} or $RPM_BUILD_ROOT | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#PreppingBuildRootForInstall | |||
[] Consistent macro usage | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#macros | |||
[] large documentation is -doc subpackage | |||
[] %doc does not affect runtime | |||
() Contains manpage for every executable | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Man_pages | |||
<> %check is present and all tests pass | |||
Packaging Guidelines | |||
-------------------- | |||
URL: https://fedoraproject.org/wiki/Packaging/Guidelines | |||
Stand: 2009-04-13 | |||
{} no pre-built binaries (.a, .so*, executable) | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#No_inclusion_of_pre-built_binaries_or_libraries | |||
find -print0 -type f | xargs -0 file | cut -d" " -f 2- | sed 's/^ *//' | sort -u | |||
{} well known BuildRoot | |||
%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |||
%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |||
%{_tmppath}/%{name}-%{version}-%{release}-root | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag | |||
{} PreReq not used | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#PreReq | |||
{} RPM_OPT_FLAGS honoured | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags | |||
{} Useful debuginfo generated | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Debuginfo_packages | |||
{} no duplication of system libraries | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Duplication_of_system_libraries | |||
{} no rpath | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath | |||
{} Timestamps preserved with cp and install | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Timestamps | |||
{} Uses parallel make (%{?_smp_mflags}) | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Parallel_make | |||
{} Requires(pre,post) style notation not used | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Scriptlets_requirements | |||
{} only writes to tmp /var/tmp $TMPDIR %{_tmppath} %{_builddir} (and %{buildroot} on %install and %clean) | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Scriplets_are_only_allowed_to_write_in_certain_directories | |||
{} no Conflicts | |||
https://fedoraproject.org/wiki/Packaging/Conflicts | |||
{} nothing installed in /srv | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#No_Files_or_Directories_under_.2Fsrv | |||
{} Changelog in allowed format | |||
https://fedoraproject.org/wiki/Packaging/Guidelines#Changelogs | |||
{} does not use Scriptlets | |||
There are some rules... | |||
<> Architecture independent packages have: BuildArch: noarch | |||
<> Sane Provides: and Requires: | |||
Naming Guidelines | |||
----------------- | |||
URL: http://fedoraproject.org/wiki/Packaging/NamingGuidelines | |||
{} Follows Naming Guidelines | |||
https://fedoraproject.org/wiki/Packaging/NamingGuidelines | |||
https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Pre-Release_packages | |||
ScriptletSnippets Guidelines | |||
---------------------------- | |||
URL: https://fedoraproject.org/wiki/Packaging/ScriptletSnippets | |||
{} shared libraries scriptlet | |||
{} %{_sysconfdir}/gconf/schemas/*.schemas - gconf handling | |||
{} %{_infodir} - texinfo handling | |||
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Texinfo | |||
{} scrollkeeper | |||
{} .desktop files with MimeType | |||
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#desktop-database | |||
{} %{_datadir}/mime/packages. mimeinfo | |||
{} %{_datadir}/icons/hicolor GTK+ Icon Cache | |||
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#GTK.2B_icon_cache | |||
{} %{_datadir}/fonts Fonts | |||
Debuginfo Guidelines | |||
-------------------- | |||
https://fedoraproject.org/wiki/Packaging/Debuginfo | |||
{} follows special guidelines | |||
Cmake | |||
https://fedoraproject.org/wiki/Packaging/cmake | |||
Eclipse | |||
https://fedoraproject.org/wiki/Packaging/EclipsePlugins | |||
Emacs | |||
https://fedoraproject.org/wiki/Packaging/Emacs | |||
Fonts | |||
https://fedoraproject.org/wiki/Packaging/FontsPolicy | |||
Java | |||
https://fedoraproject.org/wiki/Packaging/Java | |||
Mono | |||
https://fedoraproject.org/wiki/Packaging/Mono | |||
OCaml | |||
https://fedoraproject.org/wiki/Packaging/OCaml | |||
OpenOffice.org | |||
https://fedoraproject.org/wiki/Packaging/OpenOffice.orgExtensions | |||
Perl | |||
https://fedoraproject.org/wiki/Packaging/Perl | |||
PHP | |||
https://fedoraproject.org/wiki/Packaging/PHP | |||
Python | |||
https://fedoraproject.org/wiki/Packaging:Python | |||
{} Has BuildRequires: python2-devel and/or python3-devel | |||
https://fedoraproject.org/wiki/Packaging:Python#BuildRequires | |||
{} Defines and uses %{python_sitelib} or %{python_sitearch}: | |||
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) | |||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} | |||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} | |||
%endif | |||
https://fedoraproject.org/wiki/Packaging:Python#Macros | |||
{} Has BuildRequires: python-setuptools-devel | |||
[] Python eggs must be built from source. They cannot simply drop an egg from upstream into the proper directory. | |||
[] Python eggs must not download any dependencies during the build process. | |||
[] If egg-info files are generated by the modules build scripts they must be included in the package. | |||
[] When building a compat package, it must install using easy_install -m so it won't conflict with the main package. | |||
[] When building multiple versions (for a compat package) one of the packages must contain a default version that is usable via "import MODULE" with no prior setup. | |||
() A package which is used by another package via an egg interface should provide egg info. | |||
{} Egg install: | |||
%install | |||
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT | |||
R | |||
https://fedoraproject.org/wiki/Packaging/R | |||
Ruby | |||
https://fedoraproject.org/wiki/Packaging/Ruby | |||
Sugar | |||
https://fedoraproject.org/wiki/Packaging/SugarActivityGuidelines | |||
Tcl/Tk | |||
https://fedoraproject.org/wiki/Packaging/Tcl | |||
Haskell | |||
https://fedoraproject.org/wiki/Packaging/Haskell | |||
</code> | </code> | ||
[[Category:Package Maintainers/Review Template]] | [[Category:Package Maintainers/Review Template]] |
Revision as of 20:16, 2 November 2010
This is my incomplete checklist:
Review Guidelines
-----------------
URL: https://fedoraproject.org/wiki/Packaging:ReviewGuidelines
Stand: 2010-02-27
() - SHOULD
[] - MUST
{} - external Guidelines
<> - Optional / common sense
[] rpmlint output:
[] Spec in %{name}.spec format
[] license allowed:
[] license matches shortname in License: tag
https://fedoraproject.org/wiki/Licensing
[] license in tarball and included in %doc:
[] package is code or permissive content:
https://fedoraproject.org/wiki/Packaging/Guidelines#CodeVsContent
{} patches sent to upstream and commented
https://fedoraproject.org/wiki/Packaging/PatchUpstreamStatus
https://fedoraproject.org/wiki/Packaging/Minutes20080506
[] Source0 is a working URL
https://fedoraproject.org/wiki/Packaging/SourceURL
{} Sourceforge URL is Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
https://fedoraproject.org/wiki/Packaging/SourceURL#Sourceforge.net
<> SourceX / PatchY prefixed with %{name}
[] Source0 matches Upstream:
{} Smallest compressed archive used
https://fedoraproject.org/wiki/Packaging:SourceURL
<> Latest version is packaged
[] Package builds on all primary architectures:
[] ExcludeArch bugs are filed and commented:
[] BuildRequires are complete (mock builds)
() No file dependencies outside of /etc /bin /sbin /usr/bin /usr/sbin
https://fedoraproject.org/wiki/Packaging/Guidelines#FileDeps
[] %find_lang used for locales
https://fedoraproject.org/wiki/Packaging/Guidelines#Handling_Locale_Files
in %install: %find_lang %{name}
%files -f %{name}.lang
Maybe: BuildRequires: gettext
[] Every (sub)package containing libraries runs ldconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
[] .h (header) files are in -devel subpackage
[] .a (static libraries) are in -static subpackage
[] contains .pc (pkgconfig) files and has Requires: pkgconfig
() .pc files are in -devel subpackage
[] contains .so.X(.Y) files and .so is in -devel
[] -devel subpackage has Requires: %{name} = %{version}-%{release}
[] .la files (libtool) are not included
[] does not bundle copies of system libraries
https://fedoraproject.org/wiki/Packaging:Guidelines#Duplication_of_system_libraries
[] Has GUI and includes %{name}.desktop
https://fedoraproject.org/wiki/Packaging/Guidelines#desktop
[] Follows desktop entry spec
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
[] Valid .desktop Name
[] Valid .desktop GenericName
[] Valid .desktop Categories
http://standards.freedesktop.org/menu-spec/latest/apa.html
[] Valid .desktop StartupNotify
http://www.freedesktop.org/wiki/Specifications/startup-notification-spec?action=show&redirect=Standards%2Fstartup-notification-spec
[] .desktop file installed with desktop-file-install in %install
[] Prefix: /usr not used (not relocatable)
https://fedoraproject.org/wiki/Packaging/Guidelines#Relocatable_packages
[] Owns all created directories
[] no duplicates in %files
[] %defattr(-,root,root,-) is in every %files section
[] Does not own files or dirs from other packages
[] included filenames are in UTF-8
[] %clean is rm -rf %{buildroot} or $RPM_BUILD_ROOT
[] %install starts with rm -rf %{buildroot} or $RPM_BUILD_ROOT
https://fedoraproject.org/wiki/Packaging/Guidelines#PreppingBuildRootForInstall
[] Consistent macro usage
https://fedoraproject.org/wiki/Packaging/Guidelines#macros
[] large documentation is -doc subpackage
[] %doc does not affect runtime
() Contains manpage for every executable
https://fedoraproject.org/wiki/Packaging/Guidelines#Man_pages
<> %check is present and all tests pass
Packaging Guidelines
--------------------
URL: https://fedoraproject.org/wiki/Packaging/Guidelines
Stand: 2009-04-13
{} no pre-built binaries (.a, .so*, executable)
https://fedoraproject.org/wiki/Packaging/Guidelines#No_inclusion_of_pre-built_binaries_or_libraries
find -print0 -type f | xargs -0 file | cut -d" " -f 2- | sed 's/^ *//' | sort -u
{} well known BuildRoot
%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%{_tmppath}/%{name}-%{version}-%{release}-root
https://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag
{} PreReq not used
https://fedoraproject.org/wiki/Packaging/Guidelines#PreReq
{} RPM_OPT_FLAGS honoured
https://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags
{} Useful debuginfo generated
https://fedoraproject.org/wiki/Packaging/Guidelines#Debuginfo_packages
{} no duplication of system libraries
https://fedoraproject.org/wiki/Packaging/Guidelines#Duplication_of_system_libraries
{} no rpath
https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
{} Timestamps preserved with cp and install
https://fedoraproject.org/wiki/Packaging/Guidelines#Timestamps
{} Uses parallel make (%{?_smp_mflags})
https://fedoraproject.org/wiki/Packaging/Guidelines#Parallel_make
{} Requires(pre,post) style notation not used
https://fedoraproject.org/wiki/Packaging/Guidelines#Scriptlets_requirements
{} only writes to tmp /var/tmp $TMPDIR %{_tmppath} %{_builddir} (and %{buildroot} on %install and %clean)
https://fedoraproject.org/wiki/Packaging/Guidelines#Scriplets_are_only_allowed_to_write_in_certain_directories
{} no Conflicts
https://fedoraproject.org/wiki/Packaging/Conflicts
{} nothing installed in /srv
https://fedoraproject.org/wiki/Packaging/Guidelines#No_Files_or_Directories_under_.2Fsrv
{} Changelog in allowed format
https://fedoraproject.org/wiki/Packaging/Guidelines#Changelogs
{} does not use Scriptlets
There are some rules...
<> Architecture independent packages have: BuildArch: noarch
<> Sane Provides: and Requires:
Naming Guidelines
-----------------
URL: http://fedoraproject.org/wiki/Packaging/NamingGuidelines
{} Follows Naming Guidelines
https://fedoraproject.org/wiki/Packaging/NamingGuidelines
https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Pre-Release_packages
ScriptletSnippets Guidelines
----------------------------
URL: https://fedoraproject.org/wiki/Packaging/ScriptletSnippets
{} shared libraries scriptlet
{} %{_sysconfdir}/gconf/schemas/*.schemas - gconf handling
{} %{_infodir} - texinfo handling
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Texinfo
{} scrollkeeper
{} .desktop files with MimeType
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#desktop-database
{} %{_datadir}/mime/packages. mimeinfo
{} %{_datadir}/icons/hicolor GTK+ Icon Cache
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#GTK.2B_icon_cache
{} %{_datadir}/fonts Fonts
Debuginfo Guidelines
--------------------
https://fedoraproject.org/wiki/Packaging/Debuginfo
{} follows special guidelines
Cmake
https://fedoraproject.org/wiki/Packaging/cmake
Eclipse
https://fedoraproject.org/wiki/Packaging/EclipsePlugins
Emacs
https://fedoraproject.org/wiki/Packaging/Emacs
Fonts
https://fedoraproject.org/wiki/Packaging/FontsPolicy
Java
https://fedoraproject.org/wiki/Packaging/Java
Mono
https://fedoraproject.org/wiki/Packaging/Mono
OCaml
https://fedoraproject.org/wiki/Packaging/OCaml
OpenOffice.org
https://fedoraproject.org/wiki/Packaging/OpenOffice.orgExtensions
Perl
https://fedoraproject.org/wiki/Packaging/Perl
PHP
https://fedoraproject.org/wiki/Packaging/PHP
Python
https://fedoraproject.org/wiki/Packaging:Python
{} Has BuildRequires: python2-devel and/or python3-devel
https://fedoraproject.org/wiki/Packaging:Python#BuildRequires
{} Defines and uses %{python_sitelib} or %{python_sitearch}:
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
https://fedoraproject.org/wiki/Packaging:Python#Macros
{} Has BuildRequires: python-setuptools-devel
[] Python eggs must be built from source. They cannot simply drop an egg from upstream into the proper directory.
[] Python eggs must not download any dependencies during the build process.
[] If egg-info files are generated by the modules build scripts they must be included in the package.
[] When building a compat package, it must install using easy_install -m so it won't conflict with the main package.
[] When building multiple versions (for a compat package) one of the packages must contain a default version that is usable via "import MODULE" with no prior setup.
() A package which is used by another package via an egg interface should provide egg info.
{} Egg install:
%install
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
R
https://fedoraproject.org/wiki/Packaging/R
Ruby
https://fedoraproject.org/wiki/Packaging/Ruby
Sugar
https://fedoraproject.org/wiki/Packaging/SugarActivityGuidelines
Tcl/Tk
https://fedoraproject.org/wiki/Packaging/Tcl
Haskell
https://fedoraproject.org/wiki/Packaging/Haskell