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