From Fedora Project Wiki

m (Capitalize more "must not"s.)
(Restore mistakenly removed content.)
 
Line 40: Line 40:
 
* FESCo approves openssh-server to run by default on Fedora in general.
 
* FESCo approves openssh-server to run by default on Fedora in general.
 
* Workstation WG approves openssh-server to be disabled by default on the Workstation Edition.
 
* Workstation WG approves openssh-server to be disabled by default on the Workstation Edition.
 +
 +
== Current list of enabled/disabled services ==
 +
* [https://pagure.io/fedora-release/blob/master/f/90-default.preset Fedora general]
 +
* [https://pagure.io/fedora-release/blob/master/f/80-server.preset Fedora Server]
 +
* [https://pagure.io/fedora-release/blob/master/f/80-workstation.preset Fedora Workstation]
 +
 +
== How to enable a service by default ==
 +
 +
Unit files must correspond to the Fedora Packaging [[Packaging:ScriptletSnippets#Systemd|Guidelines]]. Services are enabled or disabled by default through [http://www.freedesktop.org/software/systemd/man/systemd.preset.html systemd preset files]. Preset files can be overridden by a local administrator, but a set of defaults are provided by Fedora.
 +
 +
If the service should be enabled by default, it must be added to one of the distribution presets files (see above).
 +
 +
For services which meet one of the conditions listed above, a ticket should be filed in 
 +
[https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&format=fedora-systemd-request bugzilla]. If the preset should be changed for versions other than rawhide, indicate that in the ticket.
  
 
[[Category:Packaging guidelines]]
 
[[Category:Packaging guidelines]]

Latest revision as of 22:41, 14 September 2018

What is a Service?

For the purposes of this document, a "service" is defined as one or more of:

Note that this includes processes which are not persistent. If something started by a systemd service unit runs for a short period of time and then exits, it is still a service. An example would be iptables.

Enabling Services by Default

Only services that meet all criteria below MAY be enabled by default on package installation.

Must not alter other services

Installation of the package providing the unit auto-started by this preset MUST NOT change the behavior of any other service running (or potentially running) on the system.

Must not require manual configuration to function

The service MUST NOT require configuration before it starts properly. If the end-user/administrator must make some specific configuration change before the service is able to start without error then it MUST NOT be enabled by default.

Must not fail under normal operating conditions

The service MUST NOT, under normal operating conditions, exit with an error causing systemd to mark the unit as failed. A service which is started by default is permitted to fail under exceptional conditions. For example, a service could start when appropriate hardware is present, but would still be allowed to fail if that hardware is somehow malfunctioning. Or a service could fail to start with an error if a configuration file has been locally modified to be syntactically incorrect.

Must not listen for outside connections

The service MUST NOT listen on a network socket for connections originating on a separate physical or virtual machine.

D-BUS services and hardware-activated services generally meet this requirement.

Hardware Support Services

Some hardware requires some additional service to be started in order to be useful. This may come in the form of a non-persistent setup process or in the form of a continuously-running service. If the service can be hardware activated to only start when the relevant hardware is present and do nothing when not present, and otherwise it meets the above requirements, then it SHOULD be enabled by default upon package installation.

If the service cannot be hardware activated, but it is possible to configure it such that it will exit without error and without marking the service as "failed" according to systemd, then it SHOULD be enabled by default upon package installation. This clean exit may be accomplished through systemd conditionals, by having the service (or a wrapper script) perform hardware detection and exit without indicating an error, or via other similar means.

Approved Exceptions

Some services which are permitted to be enabled by default as specific exceptions. Services that should be enabled by default throughout all of Fedora must be approved by FESCo. Services that should be enabled or disabled by default only on one or more of the Fedora Editions must be approved by those Editions' Working Groups.

Example:

  • FESCo approves openssh-server to run by default on Fedora in general.
  • Workstation WG approves openssh-server to be disabled by default on the Workstation Edition.

Current list of enabled/disabled services

How to enable a service by default

Unit files must correspond to the Fedora Packaging Guidelines. Services are enabled or disabled by default through systemd preset files. Preset files can be overridden by a local administrator, but a set of defaults are provided by Fedora.

If the service should be enabled by default, it must be added to one of the distribution presets files (see above).

For services which meet one of the conditions listed above, a ticket should be filed in bugzilla. If the preset should be changed for versions other than rawhide, indicate that in the ticket.