Difference between revisions of "Rpm-packaging/ReviewGuidelines"
(add link to renderspec docs) |
(→Head) |
||
Line 11: | Line 11: | ||
=Common rules= | =Common rules= | ||
==Head== | ==Head== | ||
− | * ''' | + | * '''Group''': |
− | + | Setting up proper group for package is a requirement.<br> | |
+ | * '''Source0''': | ||
+ | Source0 must points to existing tarball location, even if url constructed using macro.<br /> | ||
''Example:''<br /> | ''Example:''<br /> | ||
− | + | Group: Development/Libraries | |
− | + | Source0: https://pypi.python.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz | |
− | |||
− | |||
==Documentation== | ==Documentation== |
Revision as of 19:54, 13 April 2016
Contents
Purpose
The main goal to use templates instead of SPEC - flexibility and unification. Templates made in Jinja2 format.
It means that templates made in one way after processing by renderspec tool will fit all supported Linux vendors(SUSE, Fedora, CentOS).
Tool-set
openstack-macros - sub-project which allows to add or substitute required RPM macro used in SPEC template.
pymod2pkg - project used for translation of python source name aka pypi name into Linux package name.
renderspec - main tool used for transformation from SPEC template into SPEC file. documentaion
Common rules
Head
- Group:
Setting up proper group for package is a requirement.
- Source0:
Source0 must points to existing tarball location, even if url constructed using macro.
Example:
Group: Development/Libraries Source0: https://pypi.python.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
Documentation
For *-doc package should be specified additional section which describes all meta-data for doc package.
BuildRequires: - populated only with projects required for documentation build.
Please use %bcond_with docs in case of necessity!
Exmaple:
%if %{with docs} %package doc .... %endif %if %{with docs} %files doc ... %endif
Tests
Useful but not mandatory. All directives for unit tests must be set under %check section.
All required for tests projects should be specified as BuildRequires: in the top of template.
Please use %bcond_with test in case of necessity!
Exmaple:
%if %{with test} BuildRequires: required for test projects .... %endif %if %{with test} %check ... %endif
Misc but important!
Under %files section for each package in SPEC template:
- Section %doc should not include: HACKING*, CONTRIBUTING* and AUTHORS
- Section %license should be specified in case of LICENCE file availability in source code