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