summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd_243.2.bb
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2019-12-31 16:18:19 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-11 11:06:22 +0000
commit61d60f43369fc337b2de8483cca0e9d48150313c (patch)
tree4937b9e7db86fd36d3685d21fc36c7006ce49eed /meta/recipes-core/systemd/systemd_243.2.bb
parent5a3341083f1a6fd2b24aa9f4dea80dffae78c69b (diff)
downloadpoky-61d60f43369fc337b2de8483cca0e9d48150313c.tar.gz
systemd: Upgrade 243 -> 243.2
Bugfix-only changes on the 243 stable branch. (From OE-Core rev: fd1aa49d8a25767953e8b1beb91001d5e115f781) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd_243.2.bb')
-rw-r--r--meta/recipes-core/systemd/systemd_243.2.bb684
1 files changed, 684 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_243.2.bb b/meta/recipes-core/systemd/systemd_243.2.bb
new file mode 100644
index 0000000000..6e7f95693b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd_243.2.bb
@@ -0,0 +1,684 @@
1require systemd.inc
2
3PROVIDES = "udev"
4
5PE = "1"
6
7DEPENDS = "intltool-native gperf-native libcap util-linux"
8
9SECTION = "base/shell"
10
11inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages distro_features_check
12
13# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
14# that we don't build both udev and systemd in world builds.
15REQUIRED_DISTRO_FEATURES = "systemd"
16
17SRC_URI += "file://touchscreen.rules \
18 file://00-create-volatile.conf \
19 file://init \
20 file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
21 file://0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
22 file://0003-implment-systemd-sysv-install-for-OE.patch \
23 file://0004-rules-whitelist-hd-devices.patch \
24 file://0005-rules-watch-metadata-changes-in-ide-devices.patch \
25 file://0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch \
26 file://99-default.preset \
27 "
28
29# patches needed by musl
30SRC_URI_append_libc-musl = " ${SRC_URI_MUSL}"
31SRC_URI_MUSL = "\
32 file://0002-don-t-use-glibc-specific-qsort_r.patch \
33 file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \
34 file://0004-add-fallback-parse_printf_format-implementation.patch \
35 file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
36 file://0006-Include-netinet-if_ether.h.patch \
37 file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \
38 file://0008-add-missing-FTW_-macros-for-musl.patch \
39 file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
40 file://0011-Use-uintmax_t-for-handling-rlim_t.patch \
41 file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
42 file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
43 file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
44 file://0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \
45 file://0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \
46 file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
47 file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \
48 file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \
49 file://0024-test-json.c-define-M_PIl.patch \
50 file://0001-do-not-disable-buffer-in-writing-files.patch \
51 file://0002-src-login-brightness.c-include-sys-wait.h.patch \
52 file://0003-src-basic-copy.c-include-signal.h.patch \
53 file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \
54 "
55
56PAM_PLUGINS = " \
57 pam-plugin-unix \
58 pam-plugin-loginuid \
59 pam-plugin-keyinit \
60"
61
62PACKAGECONFIG ??= " \
63 ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge polkit', d)} \
64 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
65 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
66 acl \
67 backlight \
68 binfmt \
69 gshadow \
70 hibernate \
71 hostnamed \
72 idn \
73 ima \
74 kmod \
75 localed \
76 logind \
77 machined \
78 myhostname \
79 networkd \
80 nss \
81 nss-mymachines \
82 nss-resolve \
83 quotacheck \
84 randomseed \
85 resolved \
86 set-time-epoch \
87 smack \
88 sysusers \
89 timedated \
90 timesyncd \
91 utmp \
92 vconsole \
93 xz \
94"
95
96PACKAGECONFIG_remove_libc-musl = " \
97 gshadow \
98 idn \
99 localed \
100 myhostname \
101 nss \
102 nss-mymachines \
103 nss-resolve \
104 resolved \
105 smack \
106 sysusers \
107 utmp \
108"
109
110# Use the upstream systemd serial-getty@.service and rely on
111# systemd-getty-generator instead of using the OE-core specific
112# systemd-serialgetty.bb - not enabled by default.
113PACKAGECONFIG[serial-getty-generator] = ""
114
115PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl"
116PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit"
117PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
118PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
119PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2"
120PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid"
121PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
122PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup"
123PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
124PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
125PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi"
126PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
127PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
128# Sign the journal for anti-tampering
129PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
130PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls"
131PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
132PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
133PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
134PACKAGECONFIG[idn] = "-Didn=true,-Didn=false"
135PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
136# importd requires curl/xz/zlib/bzip2/gcrypt
137PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
138# Update NAT firewall rules
139PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
140PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
141PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod"
142PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false"
143PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn"
144PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
145PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
146PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
147PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
148PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
149PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
150PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname"
151PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
152PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
153PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false"
154PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false"
155PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl"
156PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
157PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2"
158PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
159PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false"
160PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode"
161PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
162PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
163PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false"
164PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
165# libseccomp is found in meta-security
166PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
167PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
168PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
169PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
170# When enabled use reproducble build timestamp if set as time epoch,
171# or build time if not. When disabled, time epoch is unset.
172def build_epoch(d):
173 epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1"
174 return '-Dtime-epoch=%d' % int(epoch)
175PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0"
176PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
177PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
178PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
179PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true"
180PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
181PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
182PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
183# Verify keymaps on locale change
184PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
185PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
186PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
187
188# Helper variables to clarify locations. This mirrors the logic in systemd's
189# build system.
190rootprefix ?= "${root_prefix}"
191rootlibdir ?= "${base_libdir}"
192rootlibexecdir = "${rootprefix}/lib"
193
194# This links udev statically with systemd helper library.
195# Otherwise udev package would depend on systemd package (which has the needed shared library),
196# and always pull it into images.
197EXTRA_OEMESON += "-Dlink-udev-shared=false"
198
199EXTRA_OEMESON += "-Dnobody-user=nobody \
200 -Dnobody-group=nobody \
201 -Drootlibdir=${rootlibdir} \
202 -Drootprefix=${rootprefix} \
203 -Dsysvrcnd-path=${sysconfdir} \
204 -Ddefault-locale=C \
205 "
206
207# Hardcode target binary paths to avoid using paths from sysroot
208EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
209 -Dkmod-path=${base_bindir}/kmod \
210 -Dmount-path=${base_bindir}/mount \
211 -Dquotacheck-path=${sbindir}/quotacheck \
212 -Dquotaon-path=${sbindir}/quotaon \
213 -Dsulogin-path=${base_sbindir}/sulogin \
214 -Dnologin-path=${base_sbindir}/nologin \
215 -Dumount-path=${base_bindir}/umount"
216
217do_install() {
218 meson_do_install
219 install -d ${D}/${base_sbindir}
220 if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
221 # Provided by a separate recipe
222 rm ${D}${systemd_unitdir}/system/serial-getty* -f
223 fi
224
225 # Provide support for initramfs
226 [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
227 [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
228
229 install -d ${D}${sysconfdir}/udev/rules.d/
230 install -d ${D}${sysconfdir}/tmpfiles.d
231 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
232
233 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
234
235 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
236 install -d ${D}${sysconfdir}/init.d
237 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
238 sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
239 fi
240
241 chown root:systemd-journal ${D}/${localstatedir}/log/journal
242
243 # Delete journal README, as log can be symlinked inside volatile.
244 rm -f ${D}/${localstatedir}/log/README
245
246 # journal-remote creates this at start
247 rm -rf ${D}/${localstatedir}/log/journal/remote
248
249 install -d ${D}${systemd_unitdir}/system/graphical.target.wants
250 install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
251 install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
252 install -d ${D}${systemd_unitdir}/system/reboot.target.wants
253 install -d ${D}${systemd_unitdir}/system/rescue.target.wants
254
255 # Create symlinks for systemd-update-utmp-runlevel.service
256 if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
257 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
258 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
259 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
260 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
261 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
262 fi
263
264 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
265 # for existence else it fails
266 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
267 ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
268 fi
269 if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
270 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
271 echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
272 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
273 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
274 else
275 sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
276 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
277 fi
278 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
279
280 # If polkit is setup fixup permissions and ownership
281 if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
282 if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
283 chmod 700 ${D}${datadir}/polkit-1/rules.d
284 chown polkitd:root ${D}${datadir}/polkit-1/rules.d
285 fi
286 fi
287
288 # create link for existing udev rules
289 ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm
290
291 # duplicate udevadm for postinst script
292 install -d ${D}${libexecdir}
293 ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
294
295 # install default policy for presets
296 # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
297 install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset
298
299 # We use package postinsts for the hwdb update, as the update service is
300 # easily triggered for no reason and will slow down boots.
301 find ${D} -name systemd-hwdb-update.service -delete
302}
303
304python populate_packages_prepend (){
305 systemdlibdir = d.getVar("rootlibdir")
306 do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
307}
308PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
309
310PACKAGES =+ "\
311 ${PN}-gui \
312 ${PN}-vconsole-setup \
313 ${PN}-initramfs \
314 ${PN}-analyze \
315 ${PN}-kernel-install \
316 ${PN}-rpm-macros \
317 ${PN}-binfmt \
318 ${PN}-zsh-completion \
319 ${PN}-xorg-xinitrc \
320 ${PN}-container \
321 ${PN}-journal-gatewayd \
322 ${PN}-journal-upload \
323 ${PN}-journal-remote \
324 ${PN}-extra-utils \
325"
326
327SUMMARY_${PN}-container = "Tools for containers and VMs"
328DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
329
330SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events"
331DESCRIPTION_${PN}-journal-gatewayd = "systemd-journal-gatewayd serves journal events over the network. Clients must connect using HTTP. The server listens on port 19531 by default."
332
333SUMMARY_${PN}-journal-upload = "Send journal messages over the network"
334DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL."
335
336SUMMARY_${PN}-journal-remote = "Receive journal messages over the network"
337DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files."
338
339SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \
340 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
341 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
342 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
343"
344SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
345
346USERADD_PACKAGES = "${PN} ${PN}-extra-utils \
347 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \
348 ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
349 ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
350"
351GROUPADD_PARAM_${PN} = "-r systemd-journal"
352USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
353USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
354USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
355USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
356USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
357USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin systemd-bus-proxy"
358USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin systemd-journal-gateway"
359USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin systemd-journal-remote"
360USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin systemd-journal-upload"
361
362FILES_${PN}-analyze = "${bindir}/systemd-analyze"
363
364FILES_${PN}-initramfs = "/init"
365RDEPENDS_${PN}-initramfs = "${PN}"
366
367FILES_${PN}-gui = "${bindir}/systemadm"
368
369FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
370 ${systemd_unitdir}/system/systemd-vconsole-setup.service \
371 ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
372
373RDEPENDS_${PN}-kernel-install += "bash"
374FILES_${PN}-kernel-install = "${bindir}/kernel-install \
375 ${sysconfdir}/kernel/ \
376 ${exec_prefix}/lib/kernel \
377 "
378FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
379 "
380
381FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
382
383FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
384
385FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
386 ${exec_prefix}/lib/binfmt.d \
387 ${rootlibexecdir}/systemd/systemd-binfmt \
388 ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
389 ${systemd_unitdir}/system/systemd-binfmt.service"
390RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
391
392RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
393
394
395FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \
396 ${systemd_system_unitdir}/systemd-journal-gatewayd.service \
397 ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \
398 ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \
399 ${datadir}/systemd/gatewayd/browse.html \
400 "
401SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket"
402
403FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \
404 ${systemd_system_unitdir}/systemd-journal-upload.service \
405 ${sysconfdir}/systemd/journal-upload.conf \
406 "
407SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service"
408
409FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \
410 ${sysconfdir}/systemd/journal-remote.conf \
411 ${systemd_system_unitdir}/systemd-journal-remote.service \
412 ${systemd_system_unitdir}/systemd-journal-remote.socket \
413 "
414SYSTEMD_SERVICE_${PN}-remote = "systemd-journal-remote.socket"
415
416
417FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
418 ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
419 ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \
420 ${base_bindir}/machinectl \
421 ${bindir}/systemd-nspawn \
422 ${nonarch_libdir}/systemd/import-pubring.gpg \
423 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
424 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
425 ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
426 ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \
427 ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \
428 ${systemd_system_unitdir}/machine.slice \
429 ${systemd_system_unitdir}/machines.target \
430 ${systemd_system_unitdir}/org.freedesktop.import1.busname \
431 ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
432 ${systemd_system_unitdir}/systemd-importd.service \
433 ${systemd_system_unitdir}/systemd-machined.service \
434 ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
435 ${systemd_system_unitdir}/var-lib-machines.mount \
436 ${rootlibexecdir}/systemd/systemd-import \
437 ${rootlibexecdir}/systemd/systemd-importd \
438 ${rootlibexecdir}/systemd/systemd-machined \
439 ${rootlibexecdir}/systemd/systemd-pull \
440 ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
441 ${systemd_system_unitdir}/systemd-nspawn@.service \
442 ${libdir}/libnss_mymachines.so.2 \
443 ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
444 ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
445 ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \
446 ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
447 ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
448 ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
449 "
450
451RRECOMMENDS_${PN}-container += "\
452 ${PN}-journal-upload \
453 ${PN}-journal-remote \
454 ${PN}-journal-gatewayd \
455 "
456
457FILES_${PN}-extra-utils = "\
458 ${base_bindir}/systemd-escape \
459 ${base_bindir}/systemd-inhibit \
460 ${bindir}/systemd-detect-virt \
461 ${bindir}/systemd-path \
462 ${bindir}/systemd-run \
463 ${bindir}/systemd-cat \
464 ${bindir}/systemd-delta \
465 ${bindir}/systemd-cgls \
466 ${bindir}/systemd-cgtop \
467 ${bindir}/systemd-stdio-bridge \
468 ${base_bindir}/systemd-ask-password \
469 ${base_bindir}/systemd-tty-ask-password-agent \
470 ${systemd_unitdir}/system/systemd-ask-password-console.path \
471 ${systemd_unitdir}/system/systemd-ask-password-console.service \
472 ${systemd_unitdir}/system/systemd-ask-password-wall.path \
473 ${systemd_unitdir}/system/systemd-ask-password-wall.service \
474 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
475 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
476 ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
477 ${rootlibexecdir}/systemd/systemd-resolve-host \
478 ${rootlibexecdir}/systemd/systemd-ac-power \
479 ${rootlibexecdir}/systemd/systemd-activate \
480 ${rootlibexecdir}/systemd/systemd-bus-proxyd \
481 ${systemd_unitdir}/system/systemd-bus-proxyd.service \
482 ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
483 ${rootlibexecdir}/systemd/systemd-socket-proxyd \
484 ${rootlibexecdir}/systemd/systemd-reply-password \
485 ${rootlibexecdir}/systemd/systemd-sleep \
486 ${rootlibexecdir}/systemd/system-sleep \
487 ${systemd_unitdir}/system/systemd-hibernate.service \
488 ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
489 ${systemd_unitdir}/system/systemd-suspend.service \
490 ${systemd_unitdir}/system/sleep.target \
491 ${rootlibexecdir}/systemd/systemd-initctl \
492 ${systemd_unitdir}/system/systemd-initctl.service \
493 ${systemd_unitdir}/system/systemd-initctl.socket \
494 ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
495 ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
496 ${rootlibexecdir}/systemd/systemd-cgroups-agent \
497"
498
499CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \
500 ${sysconfdir}/systemd/journald.conf \
501 ${sysconfdir}/systemd/logind.conf \
502 ${sysconfdir}/systemd/system.conf \
503 ${sysconfdir}/systemd/user.conf \
504 ${sysconfdir}/systemd/resolved.conf \
505 ${sysconfdir}/systemd/timesyncd.conf \
506"
507
508FILES_${PN} = " ${base_bindir}/* \
509 ${base_sbindir}/shutdown \
510 ${base_sbindir}/halt \
511 ${base_sbindir}/poweroff \
512 ${base_sbindir}/runlevel \
513 ${base_sbindir}/telinit \
514 ${base_sbindir}/resolvconf \
515 ${base_sbindir}/reboot \
516 ${base_sbindir}/init \
517 ${datadir}/dbus-1/services \
518 ${datadir}/dbus-1/system-services \
519 ${datadir}/polkit-1 \
520 ${datadir}/${BPN} \
521 ${datadir}/factory \
522 ${sysconfdir}/dbus-1/ \
523 ${sysconfdir}/modules-load.d/ \
524 ${sysconfdir}/pam.d/ \
525 ${sysconfdir}/sysctl.d/ \
526 ${sysconfdir}/systemd/ \
527 ${sysconfdir}/tmpfiles.d/ \
528 ${sysconfdir}/xdg/ \
529 ${sysconfdir}/init.d/README \
530 ${sysconfdir}/resolv-conf.systemd \
531 ${rootlibexecdir}/systemd/* \
532 ${systemd_unitdir}/* \
533 ${base_libdir}/security/*.so \
534 /cgroup \
535 ${bindir}/systemd* \
536 ${bindir}/busctl \
537 ${bindir}/coredumpctl \
538 ${bindir}/localectl \
539 ${bindir}/hostnamectl \
540 ${bindir}/resolvectl \
541 ${bindir}/timedatectl \
542 ${bindir}/bootctl \
543 ${bindir}/kernel-install \
544 ${exec_prefix}/lib/tmpfiles.d/*.conf \
545 ${exec_prefix}/lib/systemd \
546 ${exec_prefix}/lib/modules-load.d \
547 ${exec_prefix}/lib/sysctl.d \
548 ${exec_prefix}/lib/sysusers.d \
549 ${exec_prefix}/lib/environment.d \
550 ${localstatedir} \
551 ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
552 ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
553 ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
554 ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
555 ${nonarch_base_libdir}/modprobe.d/systemd.conf \
556 ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
557 ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
558 ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
559 ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
560 ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
561 ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
562 ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
563 ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \
564 ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \
565 "
566
567FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
568
569RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck"
570RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
571RDEPENDS_${PN} += "volatile-binds update-rc.d"
572
573RRECOMMENDS_${PN} += "systemd-extra-utils \
574 systemd-compat-units udev-hwdb \
575 e2fsprogs-e2fsck \
576 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
577 os-release \
578 systemd-conf \
579"
580
581INSANE_SKIP_${PN} += "dev-so libdir"
582INSANE_SKIP_${PN}-dbg += "libdir"
583INSANE_SKIP_${PN}-doc += " libdir"
584
585PACKAGES =+ "udev udev-hwdb"
586
587RPROVIDES_udev = "hotplug"
588
589RDEPENDS_udev-hwdb += "udev"
590
591FILES_udev += "${base_sbindir}/udevd \
592 ${rootlibexecdir}/systemd/network/99-default.link \
593 ${rootlibexecdir}/systemd/systemd-udevd \
594 ${rootlibexecdir}/udev/accelerometer \
595 ${rootlibexecdir}/udev/ata_id \
596 ${rootlibexecdir}/udev/cdrom_id \
597 ${rootlibexecdir}/udev/collect \
598 ${rootlibexecdir}/udev/findkeyboards \
599 ${rootlibexecdir}/udev/keyboard-force-release.sh \
600 ${rootlibexecdir}/udev/keymap \
601 ${rootlibexecdir}/udev/mtd_probe \
602 ${rootlibexecdir}/udev/scsi_id \
603 ${rootlibexecdir}/udev/v4l_id \
604 ${rootlibexecdir}/udev/keymaps \
605 ${rootlibexecdir}/udev/rules.d/*.rules \
606 ${sysconfdir}/udev \
607 ${sysconfdir}/init.d/systemd-udevd \
608 ${systemd_unitdir}/system/*udev* \
609 ${systemd_unitdir}/system/*.wants/*udev* \
610 ${base_bindir}/udevadm \
611 ${base_sbindir}/udevadm \
612 ${libexecdir}/${MLPREFIX}udevadm \
613 ${datadir}/bash-completion/completions/udevadm \
614 "
615
616FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
617
618RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}"
619
620INITSCRIPT_PACKAGES = "udev"
621INITSCRIPT_NAME_udev = "systemd-udevd"
622INITSCRIPT_PARAMS_udev = "start 03 S ."
623
624python __anonymous() {
625 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
626 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
627}
628
629python do_warn_musl() {
630 if d.getVar('TCLIBC') == "musl":
631 bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.")
632}
633addtask warn_musl before do_configure
634
635ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
636
637ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
638ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
639ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
640
641ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
642ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
643ALTERNATIVE_PRIORITY[halt] ?= "300"
644
645ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
646ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
647ALTERNATIVE_PRIORITY[reboot] ?= "300"
648
649ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
650ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
651ALTERNATIVE_PRIORITY[shutdown] ?= "300"
652
653ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
654ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
655ALTERNATIVE_PRIORITY[poweroff] ?= "300"
656
657ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
658ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
659ALTERNATIVE_PRIORITY[runlevel] ?= "300"
660
661pkg_postinst_${PN}_libc-glibc () {
662 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
663 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
664 -i $D${sysconfdir}/nsswitch.conf
665}
666
667pkg_prerm_${PN}_libc-glibc () {
668 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
669 -e '/^hosts:/s/\s*myhostname//' \
670 -i $D${sysconfdir}/nsswitch.conf
671}
672
673PACKAGE_WRITE_DEPS += "qemu-native"
674pkg_postinst_udev-hwdb () {
675 if test -n "$D"; then
676 $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX}
677 else
678 udevadm hwdb --update
679 fi
680}
681
682pkg_prerm_udev-hwdb () {
683 rm -f $D${sysconfdir}/udev/hwdb.bin
684}