]> git.ipfire.org Git - thirdparty/systemd.git/blame - docs/DISTRO_PORTING.md
Always explicitly discard popped stream type from __fsetlocking
[thirdparty/systemd.git] / docs / DISTRO_PORTING.md
CommitLineData
1d1cb168
FB
1# Porting systemd To New Distributions
2
3## HOWTO
4
5You need to make the follow changes to adapt systemd to your
6distribution:
7
81. Find the right configure parameters for:
9
10 * `-Drootprefix=`
11 * `-Dsysvinit-path=`
12 * `-Dsysvrcnd-path=`
13 * `-Drc-local=`
14 * `-Dhalt-local=`
15 * `-Dloadkeys-path=`
16 * `-Dsetfont-path=`
17 * `-Dtty-gid=`
18 * `-Dntp-servers=`
19 * `-Ddns-servers=`
20 * `-Dsupport-url=`
21
222. Try it out.
23
24 Play around (as an ordinary user) with
25 `/usr/lib/systemd/systemd --test --system` for a test run
26 of systemd without booting. This will read the unit files and
27 print the initial transaction it would execute during boot-up.
28 This will also inform you about ordering loops and suchlike.
29
30## NTP Pool
31
32By default, systemd-timesyncd uses the Google Public NTP servers
33`time[1-4].google.com`, if no other NTP configuration is available.
34They serve time that uses a
35[leap second smear](https://developers.google.com/time/smear)
36and can be up to .5s off from servers that use stepped leap seconds.
37
38If you prefer to use leap second steps, please register your own
39vendor pool at ntp.org and make it the built-in default by
40passing `-Dntp-servers=` to meson. Registering vendor
41pools is [free](http://www.pool.ntp.org/en/vendors.html).
42
43Use `-Dntp-servers=` to direct systemd-timesyncd to different fallback
44NTP servers.
45
46## DNS Servers
47
48By default, systemd-resolved uses the Google Public DNS servers
49`8.8.8.8`, `8.8.4.4`, `2001:4860:4860::8888`, `2001:4860:4860::8844`
50as fallback, if no other DNS configuration is available.
51
52Use `-Ddns-servers=` to direct systemd-resolved to different fallback
53DNS servers.
54
55## PAM
56
57The default PAM config shipped by systemd is really bare bones.
58It does not include many modules your distro might want to enable
59to provide a more seamless experience. For example, limits set in
60`/etc/security/limits.conf` will not be read unless you load `pam_limits`.
61Make sure you add modules your distro expects from user services.
62
63Pass `-Dpamconfdir=no` to meson to avoid installing this file and
64instead install your own.
65
66## Contributing Upstream
67
68We generally do no longer accept distribution-specific patches to
69systemd upstream. If you have to make changes to systemd's source code
70to make it work on your distribution, unless your code is generic
71enough to be generally useful, we are unlikely to merge it. Please
72always consider adopting the upstream defaults. If that is not
73possible, please maintain the relevant patches downstream.
74
75Thank you for understanding.