Packaging

From openSUSE

Contents

Packaging

Standards

File locations, Filesystem Hierarchy Standard

The directory structure of openSUSE must adhere to the Linux Filesystem Hierarchy Standard (FHS). You can find it under http://www.pathname.com/fhs/ .

Linux Standard Base, LSB

The goal of the LSB is to develop and promote a set of standards that will increase compatibility between Linux distributions. The LSB is important for ISVs to define a runtime environment that they can rely on for cross distribution building. Further details can be found at http://www.linuxbase.org/ .

Patches

Patches need to be marked in the .spec files with a well-known format to be able to run automatic tools on them, in order to generate reports, patch counts and other interesting information. They also need to be named consistently. Further details can be found under Patch standards

Policies

This is a collection of Policies which are recommended for packaging for openSUSE.

Common Packaging Guidelines

This is the guide how to build openSUSE packages:

Additional guidelines:

Additional information about detailed can be found here:

RPM Lint

It is useful to check openSUSE packages with the rpmlint package from openSUSE Factory to get hints where the packaging could be improved. Note that rpmlint hasn't been invented for openSUSE originally, there might be still cases left where it complains about something that doesn't comply to common openSUSE packaging. The openSUSE rpmlint maintainer is very responsive to bugreports, so please enter a bugreport if you think that the behavior could be improved in any way.

RPM Lint checks with badness in openSUSE Factory build

Packaging Guidelines

This is imported content of Fedora Packaging Guidelines. As was announced on opensuse-packaging mailing list, the current openSUSE documentation is not well-arranged. We decided to use a Fedora docs as a base for openSUSE, but this is work in progress. We have to merge existing openSUSE documentation with a Fedora Guidelines, so please do not use it yet! You are welcome to help adapting it to openSUSE - see Import Status for more information


Packaging Utilities

Packaging Utilities

SUSE PAM guidelines

When using PAM for authentication in your package, please follow the PAM guidelines.

Background

The default solution with one config file per application has the drawback that any change in configuration requires several files to be changed, some of them may not even be installed at that time.

RedHat was using a "pam_stack" module, which is basically a pam-as-a-pam_module (a recursive invocation of pam), which has other issues, for example it does not work with kerberos. Debian are using "include" statements in their pam-config files.

The upstream Linux-PAM project has now implemented a slightly different version of the "include-files" solution. Some services will however still require a separate configuration like "ssh" and "login".

Default (wrong) PAM config

A default /etc/pam.d/ entry might look like this:

# Sample PAM Configuration for Foo
auth       required     pam_unix.so
account    required     pam_unix.so
password   required     pam_unix.so
session    required     pam_unix.so

This is not SuSE standard. Please include common-* files. E.g.

SUSE PAM config

The SUSE PAM config recommendation is to include common-* files

# Sample PAM Configuration (SUSE style)
auth       include      common-auth
account    include      common-account
password   include      common-password
session    include      common-session


External Links