From Fedora Project Wiki
(fix wiki syntax)
m (internal link cleaning)
 
Line 4: Line 4:
  Review Guidelines
  Review Guidelines
  -----------------
  -----------------
  URL: https://fedoraproject.org/wiki/Packaging:ReviewGuidelines
  URL: [[Packaging:ReviewGuidelines]]
  Stand: 2010-02-27
  Stand: 2010-02-27
  () - SHOULD
  () - SHOULD
Line 17: Line 17:
  [] license allowed:
  [] license allowed:
  [] license matches shortname in License: tag
  [] license matches shortname in License: tag
  https://fedoraproject.org/wiki/Licensing
  [[Licensing]]
  [] license in tarball and included in %doc:
  [] license in tarball and included in %doc:
  [] package is code or permissive content:
  [] package is code or permissive content:
  https://fedoraproject.org/wiki/Packaging/Guidelines#CodeVsContent
  [[Packaging/Guidelines#CodeVsContent]]
  {} patches sent to upstream and commented
  {} patches sent to upstream and commented
  https://fedoraproject.org/wiki/Packaging/PatchUpstreamStatus
  [[Packaging/PatchUpstreamStatus]]
  https://fedoraproject.org/wiki/Packaging/Minutes20080506
  [[Packaging/Minutes20080506]]
  [] Source0 is a working URL
  [] Source0 is a working URL
  https://fedoraproject.org/wiki/Packaging/SourceURL
  [[Packaging/SourceURL]]
  {} Sourceforge URL is Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
  {} Sourceforge URL is Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
  https://fedoraproject.org/wiki/Packaging/SourceURL#Sourceforge.net
  [[Packaging/SourceURL#Sourceforge.net]]
  <> SourceX / PatchY prefixed with %{name}
  <> SourceX / PatchY prefixed with %{name}
  [] Source0 matches Upstream:
  [] Source0 matches Upstream:
   
   
  {} Smallest compressed archive used
  {} Smallest compressed archive used
  https://fedoraproject.org/wiki/Packaging:SourceURL
  [[Packaging:SourceURL]]
   
   
  <> Latest version is packaged
  <> Latest version is packaged
Line 40: Line 40:
  [] BuildRequires are complete (mock builds)
  [] BuildRequires are complete (mock builds)
  () No file dependencies outside of /etc /bin /sbin /usr/bin /usr/sbin
  () No file dependencies outside of /etc /bin /sbin /usr/bin /usr/sbin
  https://fedoraproject.org/wiki/Packaging/Guidelines#FileDeps
  [[Packaging/Guidelines#FileDeps]]
   
   
  [] %find_lang used for locales
  [] %find_lang used for locales
  https://fedoraproject.org/wiki/Packaging/Guidelines#Handling_Locale_Files
  [[Packaging/Guidelines#Handling_Locale_Files]]
  in %install: %find_lang %{name}  
  in %install: %find_lang %{name}  
  %files -f %{name}.lang
  %files -f %{name}.lang
Line 59: Line 59:
  [] .la files (libtool) are not included
  [] .la files (libtool) are not included
  [] does not bundle copies of system libraries
  [] does not bundle copies of system libraries
  https://fedoraproject.org/wiki/Packaging:Guidelines#Duplication_of_system_libraries
  [[Packaging:Guidelines#Duplication_of_system_libraries]]
   
   
  [] Has GUI and includes %{name}.desktop
  [] Has GUI and includes %{name}.desktop
  https://fedoraproject.org/wiki/Packaging/Guidelines#desktop
  [[Packaging/Guidelines#desktop]]
  [] Follows desktop entry spec
  [] Follows desktop entry spec
  http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
  http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
Line 73: Line 73:
  [] .desktop file installed with desktop-file-install in %install
  [] .desktop file installed with desktop-file-install in %install
  [] Prefix: /usr not used (not relocatable)
  [] Prefix: /usr not used (not relocatable)
  https://fedoraproject.org/wiki/Packaging/Guidelines#Relocatable_packages
  [[Packaging/Guidelines#Relocatable_packages]]
   
   
  [] Owns all created directories
  [] Owns all created directories
Line 83: Line 83:
  [] %clean is rm -rf %{buildroot} or $RPM_BUILD_ROOT  
  [] %clean is rm -rf %{buildroot} or $RPM_BUILD_ROOT  
  [] %install starts with rm -rf %{buildroot} or $RPM_BUILD_ROOT  
  [] %install starts with rm -rf %{buildroot} or $RPM_BUILD_ROOT  
  https://fedoraproject.org/wiki/Packaging/Guidelines#PreppingBuildRootForInstall
  [[Packaging/Guidelines#PreppingBuildRootForInstall]]
  [] Consistent macro usage
  [] Consistent macro usage
  https://fedoraproject.org/wiki/Packaging/Guidelines#macros
  [[Packaging/Guidelines#macros]]
   
   
  [] large documentation is -doc subpackage
  [] large documentation is -doc subpackage
  [] %doc does not affect runtime
  [] %doc does not affect runtime
  () Contains manpage for every executable
  () Contains manpage for every executable
  https://fedoraproject.org/wiki/Packaging/Guidelines#Man_pages
  [[Packaging/Guidelines#Man_pages]]
   
   
  <> %check is present and all tests pass
  <> %check is present and all tests pass
  Packaging Guidelines
  Packaging Guidelines
  --------------------
  --------------------
  URL: https://fedoraproject.org/wiki/Packaging/Guidelines
  URL: [[Packaging/Guidelines]]
  Stand: 2009-04-13
  Stand: 2009-04-13
   
   
  {} no pre-built binaries (.a, .so*, executable)
  {} no pre-built binaries (.a, .so*, executable)
  https://fedoraproject.org/wiki/Packaging/Guidelines#No_inclusion_of_pre-built_binaries_or_libraries
  [[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
  find -print0 -type f | xargs -0 file | cut -d" " -f 2- | sed 's/^ *//' | sort -u
   
   
Line 106: Line 106:
  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  %{_tmppath}/%{name}-%{version}-%{release}-root
  %{_tmppath}/%{name}-%{version}-%{release}-root
  https://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag
  [[Packaging/Guidelines#BuildRoot_tag]]
   
   
  {} PreReq not used
  {} PreReq not used
  https://fedoraproject.org/wiki/Packaging/Guidelines#PreReq
  [[Packaging/Guidelines#PreReq]]
  {} RPM_OPT_FLAGS honoured
  {} RPM_OPT_FLAGS honoured
  https://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags
  [[Packaging/Guidelines#Compiler_flags]]
  {} Useful debuginfo generated
  {} Useful debuginfo generated
  https://fedoraproject.org/wiki/Packaging/Guidelines#Debuginfo_packages
  [[Packaging/Guidelines#Debuginfo_packages]]
  {} no duplication of system libraries
  {} no duplication of system libraries
  https://fedoraproject.org/wiki/Packaging/Guidelines#Duplication_of_system_libraries
  [[Packaging/Guidelines#Duplication_of_system_libraries]]
  {} no rpath
  {} no rpath
  https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
  [[Packaging/Guidelines#Beware_of_Rpath]]
  {} Timestamps preserved with cp and install
  {} Timestamps preserved with cp and install
  https://fedoraproject.org/wiki/Packaging/Guidelines#Timestamps
  [[Packaging/Guidelines#Timestamps]]
  {} Uses parallel make (%{?_smp_mflags})
  {} Uses parallel make (%{?_smp_mflags})
  https://fedoraproject.org/wiki/Packaging/Guidelines#Parallel_make
  [[Packaging/Guidelines#Parallel_make]]
  {} Requires(pre,post) style notation not used
  {} Requires(pre,post) style notation not used
  https://fedoraproject.org/wiki/Packaging/Guidelines#Scriptlets_requirements
  [[Packaging/Guidelines#Scriptlets_requirements]]
  {} only writes to tmp /var/tmp $TMPDIR %{_tmppath} %{_builddir} (and %{buildroot} on %install and %clean)
  {} 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
  [[Packaging/Guidelines#Scriplets_are_only_allowed_to_write_in_certain_directories]]
  {} no Conflicts
  {} no Conflicts
  https://fedoraproject.org/wiki/Packaging/Conflicts
  [[Packaging/Conflicts]]
  {} nothing installed in /srv
  {} nothing installed in /srv
  https://fedoraproject.org/wiki/Packaging/Guidelines#No_Files_or_Directories_under_.2Fsrv
  [[Packaging/Guidelines#No_Files_or_Directories_under_.2Fsrv]]
  {} Changelog in allowed format
  {} Changelog in allowed format
  https://fedoraproject.org/wiki/Packaging/Guidelines#Changelogs
  [[Packaging/Guidelines#Changelogs]]
  {} does not use Scriptlets
  {} does not use Scriptlets
  There are some rules...
  There are some rules...
Line 143: Line 143:
   
   
  {} Follows Naming Guidelines
  {} Follows Naming Guidelines
  https://fedoraproject.org/wiki/Packaging/NamingGuidelines
  [[Packaging/NamingGuidelines]]
  https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Pre-Release_packages
  [[Packaging/NamingGuidelines#Pre-Release_packages]]
   
   
  ScriptletSnippets Guidelines
  ScriptletSnippets Guidelines
  ----------------------------
  ----------------------------
  URL: https://fedoraproject.org/wiki/Packaging/ScriptletSnippets
  URL: [[Packaging/ScriptletSnippets]]
   
   
  {} shared libraries scriptlet
  {} shared libraries scriptlet
  {} %{_sysconfdir}/gconf/schemas/*.schemas - gconf handling
  {} %{_sysconfdir}/gconf/schemas/*.schemas - gconf handling
  {} %{_infodir} - texinfo handling
  {} %{_infodir} - texinfo handling
  https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Texinfo
  [[Packaging/ScriptletSnippets#Texinfo]]
  {} scrollkeeper
  {} scrollkeeper
  {} .desktop files with MimeType
  {} .desktop files with MimeType
  https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#desktop-database
  [[Packaging/ScriptletSnippets#desktop-database]]
  {} %{_datadir}/mime/packages. mimeinfo
  {} %{_datadir}/mime/packages. mimeinfo
  {} %{_datadir}/icons/hicolor GTK+ Icon Cache
  {} %{_datadir}/icons/hicolor GTK+ Icon Cache
  https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#GTK.2B_icon_cache
  [[Packaging/ScriptletSnippets#GTK.2B_icon_cache]]
  {} %{_datadir}/fonts Fonts
  {} %{_datadir}/fonts Fonts
   
   
  Debuginfo Guidelines
  Debuginfo Guidelines
  --------------------
  --------------------
  https://fedoraproject.org/wiki/Packaging/Debuginfo
  [[Packaging/Debuginfo]]
   
   
   
   
  {} follows special guidelines
  {} follows special guidelines
  Cmake
  Cmake
  https://fedoraproject.org/wiki/Packaging/cmake
  [[Packaging/cmake]]
   
   
  Eclipse  
  Eclipse  
  https://fedoraproject.org/wiki/Packaging/EclipsePlugins  
  [[Packaging/EclipsePlugins]]
   
   
  Emacs  
  Emacs  
  https://fedoraproject.org/wiki/Packaging/Emacs  
  [[Packaging/Emacs]]
   
   
  Fonts  
  Fonts  
  https://fedoraproject.org/wiki/Packaging/FontsPolicy  
  [[Packaging/FontsPolicy]]
   
   
  Java  
  Java  
  https://fedoraproject.org/wiki/Packaging/Java  
  [[Packaging/Java]]
   
   
  Mono  
  Mono  
  https://fedoraproject.org/wiki/Packaging/Mono  
  [[Packaging/Mono]]
   
   
  OCaml  
  OCaml  
  https://fedoraproject.org/wiki/Packaging/OCaml  
  [[Packaging/OCaml]]
   
   
  OpenOffice.org  
  OpenOffice.org  
  https://fedoraproject.org/wiki/Packaging/OpenOffice.orgExtensions  
  [[Packaging/OpenOffice.orgExtensions]]
   
   
  Perl  
  Perl  
  https://fedoraproject.org/wiki/Packaging/Perl  
  [[Packaging/Perl]]
   
   
  PHP  
  PHP  
  https://fedoraproject.org/wiki/Packaging/PHP  
  [[Packaging/PHP]]
   
   
  Python
  Python
  https://fedoraproject.org/wiki/Packaging:Python
  [[Packaging:Python]]
   
   
  {} Has BuildRequires: python2-devel and/or python3-devel
  {} Has BuildRequires: python2-devel and/or python3-devel
  https://fedoraproject.org/wiki/Packaging:Python#BuildRequires
  [[Packaging:Python#BuildRequires]]
   
   
  {} Defines and uses %{python_sitelib} or %{python_sitearch}:
  {} Defines and uses %{python_sitelib} or %{python_sitearch}:
Line 209: Line 209:
  %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
  %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
  %endif
  %endif
  https://fedoraproject.org/wiki/Packaging:Python#Macros
  [[Packaging:Python#Macros]]
   
   
   
   
Line 226: Line 226:
   
   
  R  
  R  
  https://fedoraproject.org/wiki/Packaging/R  
  [[Packaging/R]]
   
   
  Ruby  
  Ruby  
  https://fedoraproject.org/wiki/Packaging/Ruby  
  [[Packaging/Ruby]]
   
   
  Sugar  
  Sugar  
  https://fedoraproject.org/wiki/Packaging/SugarActivityGuidelines  
  [[Packaging/SugarActivityGuidelines]]
   
   
  Tcl/Tk  
  Tcl/Tk  
  https://fedoraproject.org/wiki/Packaging/Tcl
  [[Packaging/Tcl]]
   
   
  Haskell
  Haskell
  https://fedoraproject.org/wiki/Packaging/Haskell
  [[Packaging/Haskell]]


</code>
</code>
[[Category:Package Maintainers/Review Template]]
[[Category:Package Maintainers/Review Template]]

Latest revision as of 09:27, 18 September 2016

This is my incomplete checklist:

Review Guidelines
-----------------
URL: 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
Licensing
[] license in tarball and included in %doc:
[] package is code or permissive content:
Packaging/Guidelines#CodeVsContent
{} patches sent to upstream and commented
Packaging/PatchUpstreamStatus
Packaging/Minutes20080506
[] Source0 is a working URL
Packaging/SourceURL
{} Sourceforge URL is Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Packaging/SourceURL#Sourceforge.net
<> SourceX / PatchY prefixed with %{name}
[] Source0 matches Upstream:

{} Smallest compressed archive used
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
Packaging/Guidelines#FileDeps

[] %find_lang used for locales
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
Packaging:Guidelines#Duplication_of_system_libraries

[] Has GUI and includes %{name}.desktop
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)
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 
Packaging/Guidelines#PreppingBuildRootForInstall
[] Consistent macro usage
Packaging/Guidelines#macros

[] large documentation is -doc subpackage
[] %doc does not affect runtime
() Contains manpage for every executable
Packaging/Guidelines#Man_pages

<> %check is present and all tests pass
Packaging Guidelines
--------------------
URL: Packaging/Guidelines
Stand: 2009-04-13

{} no pre-built binaries (.a, .so*, executable)
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
Packaging/Guidelines#BuildRoot_tag

{} PreReq not used
Packaging/Guidelines#PreReq
{} RPM_OPT_FLAGS honoured
Packaging/Guidelines#Compiler_flags
{} Useful debuginfo generated
Packaging/Guidelines#Debuginfo_packages
{} no duplication of system libraries
Packaging/Guidelines#Duplication_of_system_libraries
{} no rpath
Packaging/Guidelines#Beware_of_Rpath
{} Timestamps preserved with cp and install
Packaging/Guidelines#Timestamps
{} Uses parallel make (%{?_smp_mflags})
Packaging/Guidelines#Parallel_make
{} Requires(pre,post) style notation not used
Packaging/Guidelines#Scriptlets_requirements
{} only writes to tmp /var/tmp $TMPDIR %{_tmppath} %{_builddir} (and %{buildroot} on %install and %clean)
Packaging/Guidelines#Scriplets_are_only_allowed_to_write_in_certain_directories
{} no Conflicts
Packaging/Conflicts
{} nothing installed in /srv
Packaging/Guidelines#No_Files_or_Directories_under_.2Fsrv
{} Changelog in allowed format
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
Packaging/NamingGuidelines
Packaging/NamingGuidelines#Pre-Release_packages

ScriptletSnippets Guidelines
----------------------------
URL: Packaging/ScriptletSnippets

{} shared libraries scriptlet
{} %{_sysconfdir}/gconf/schemas/*.schemas - gconf handling
{} %{_infodir} - texinfo handling
Packaging/ScriptletSnippets#Texinfo
{} scrollkeeper
{} .desktop files with MimeType
Packaging/ScriptletSnippets#desktop-database
{} %{_datadir}/mime/packages. mimeinfo
{} %{_datadir}/icons/hicolor GTK+ Icon Cache
Packaging/ScriptletSnippets#GTK.2B_icon_cache
{} %{_datadir}/fonts Fonts

Debuginfo Guidelines
--------------------
Packaging/Debuginfo


{} follows special guidelines
Cmake
Packaging/cmake

Eclipse 
Packaging/EclipsePlugins 

Emacs 
Packaging/Emacs 

Fonts 
Packaging/FontsPolicy 

Java 
Packaging/Java 

Mono 
Packaging/Mono 

OCaml 
Packaging/OCaml 

OpenOffice.org 
Packaging/OpenOffice.orgExtensions 

Perl 
Packaging/Perl 

PHP 
Packaging/PHP 

Python
Packaging:Python

{} Has BuildRequires: python2-devel and/or python3-devel
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
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 
Packaging/R 

Ruby 
Packaging/Ruby 

Sugar 
Packaging/SugarActivityGuidelines 

Tcl/Tk 
Packaging/Tcl

Haskell
Packaging/Haskell