summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd_237.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd_237.bb')
-rw-r--r--meta/recipes-core/systemd/systemd_237.bb581
1 files changed, 581 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_237.bb b/meta/recipes-core/systemd/systemd_237.bb
new file mode 100644
index 0000000000..8ef1026086
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -0,0 +1,581 @@
1require systemd.inc
2
3PROVIDES = "udev"
4
5PE = "1"
6
7DEPENDS = "kmod intltool-native gperf-native acl readline libcap libcgroup 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-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
21 file://0001-Use-getenv-when-secure-versions-are-not-available.patch \
22 file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
23 file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
24 file://0004-implment-systemd-sysv-install-for-OE.patch \
25 file://0005-rules-whitelist-hd-devices.patch \
26 file://0006-Make-root-s-home-directory-configurable.patch \
27 file://0007-Revert-rules-remove-firmware-loading-rules.patch \
28 file://0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
29 file://0009-remove-duplicate-include-uchar.h.patch \
30 file://0010-check-for-uchar.h-in-meson.build.patch \
31 file://0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
32 file://0012-rules-watch-metadata-changes-in-ide-devices.patch \
33 file://0013-add-fallback-parse_printf_format-implementation.patch \
34 file://0014-src-basic-missing.h-check-for-missing-strndupa.patch \
35 file://0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
36 file://0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch \
37 file://0017-Include-netinet-if_ether.h.patch \
38 file://0018-check-for-missing-canonicalize_file_name.patch \
39 file://0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch \
40 file://0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch \
41 file://0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
42 file://0022-don-t-use-glibc-specific-qsort_r.patch \
43 file://0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
44 file://0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch \
45 file://0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch \
46 file://0026-Use-uintmax_t-for-handling-rlim_t.patch \
47 file://0027-remove-nobody-user-group-checking.patch \
48 file://0028-add-missing-FTW_-macros-for-musl.patch \
49 file://0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch \
50 file://0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
51 file://0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch \
52 "
53SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
54
55PAM_PLUGINS = " \
56 pam-plugin-unix \
57 pam-plugin-loginuid \
58 pam-plugin-keyinit \
59"
60
61PACKAGECONFIG ??= " \
62 ${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge', d)} \
63 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
64 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
65 backlight \
66 binfmt \
67 firstboot \
68 hibernate \
69 hostnamed \
70 ima \
71 localed \
72 logind \
73 machined \
74 myhostname \
75 networkd \
76 nss \
77 polkit \
78 quotacheck \
79 randomseed \
80 resolve \
81 smack \
82 sysusers \
83 timedated \
84 timesyncd \
85 utmp \
86 vconsole \
87 xz \
88"
89
90PACKAGECONFIG_remove_libc-musl = " \
91 localed \
92 myhostname \
93 nss \
94 resolve \
95 selinux \
96 smack \
97 sysusers \
98 utmp \
99"
100
101# Use the upstream systemd serial-getty@.service and rely on
102# systemd-getty-generator instead of using the OE-core specific
103# systemd-serialgetty.bb - not enabled by default.
104PACKAGECONFIG[serial-getty-generator] = ""
105
106PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit"
107PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false"
108PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false"
109PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2"
110PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false"
111PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup"
112PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus"
113PACKAGECONFIG[efi] = "-Defi=true,-Defi=false"
114PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
115PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
116# Sign the journal for anti-tampering
117PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
118PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
119PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
120PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
121# importd requires curl/xz/zlib/bzip2/gcrypt
122PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
123# Update NAT firewall rules
124PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables"
125PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl"
126PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false"
127PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn"
128PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false"
129PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false"
130PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4"
131PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false"
132PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
133PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd"
134PACKAGECONFIG[myhostname] = "-Dmyhostname=true,-Dmyhostname=false"
135PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false"
136PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false"
137PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}"
138PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false"
139PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode"
140PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false"
141PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
142PACKAGECONFIG[resolve] = "-Dresolve=true,-Dresolve=false"
143PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false"
144# libseccomp is found in meta-security
145PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp"
146PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
147PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
148PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
149PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false"
150PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false"
151PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true"
152PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false"
153PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind"
154PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup"
155# Verify keymaps on locale change
156PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon"
157PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz"
158PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib"
159
160# Helper variables to clarify locations. This mirrors the logic in systemd's
161# build system.
162rootprefix ?= "${root_prefix}"
163rootlibdir ?= "${base_libdir}"
164rootlibexecdir = "${rootprefix}/lib"
165
166EXTRA_OEMESON += "-Dnobody-user=nobody \
167 -Dnobody-group=nobody \
168 -Droothomedir=${ROOTHOME} \
169 -Drootlibdir=${rootlibdir} \
170 -Drootprefix=${rootprefix} \
171 -Dsysvrcnd-path=${sysconfdir} \
172 -Dfirmware-path=${nonarch_base_libdir}/firmware \
173 "
174
175# Hardcode target binary paths to avoid using paths from sysroot
176EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
177 -Dkill-path=${base_bindir}/kill \
178 -Dkmod-path=${base_bindir}/kmod \
179 -Dmount-path=${base_bindir}/mount \
180 -Dquotacheck-path=${sbindir}/quotacheck \
181 -Dquotaon-path=${sbindir}/quotaon \
182 -Dsulogin-path={base_sbindir}/sulogin \
183 -Dumount-path=${base_bindir}/umount"
184
185do_install() {
186 meson_do_install
187 install -d ${D}/${base_sbindir}
188 if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
189 # Provided by a separate recipe
190 rm ${D}${systemd_unitdir}/system/serial-getty* -f
191 fi
192
193 # Provide support for initramfs
194 [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
195 [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
196
197 # Create machine-id
198 # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
199 touch ${D}${sysconfdir}/machine-id
200
201 install -d ${D}${sysconfdir}/udev/rules.d/
202 install -d ${D}${sysconfdir}/tmpfiles.d
203 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
204 install -d ${D}${libdir}/pkgconfig
205 install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/
206
207 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
208
209 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
210 install -d ${D}${sysconfdir}/init.d
211 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
212 sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
213 fi
214
215 chown root:systemd-journal ${D}/${localstatedir}/log/journal
216
217 # Delete journal README, as log can be symlinked inside volatile.
218 rm -f ${D}/${localstatedir}/log/README
219
220 install -d ${D}${systemd_unitdir}/system/graphical.target.wants
221 install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
222 install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
223 install -d ${D}${systemd_unitdir}/system/reboot.target.wants
224 install -d ${D}${systemd_unitdir}/system/rescue.target.wants
225
226 # Create symlinks for systemd-update-utmp-runlevel.service
227 if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
228 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
229 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
230 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
231 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
232 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
233 fi
234
235 # Enable journal to forward message to syslog daemon
236 sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
237 # Set the maximium size of runtime journal to 64M as default
238 sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
239
240 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
241 # for existence else it fails
242 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
243 ${@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)}
244 fi
245 if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolve', 'true', 'false', d)}; then
246 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
247 echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
248 echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
249 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
250 else
251 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
252 ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
253 fi
254 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
255
256 # If polkit is setup fixup permissions and ownership
257 if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
258 if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
259 chmod 700 ${D}${datadir}/polkit-1/rules.d
260 chown polkitd:root ${D}${datadir}/polkit-1/rules.d
261 fi
262 fi
263}
264
265
266python populate_packages_prepend (){
267 systemdlibdir = d.getVar("rootlibdir")
268 do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
269}
270PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
271
272PACKAGES =+ "\
273 ${PN}-gui \
274 ${PN}-vconsole-setup \
275 ${PN}-initramfs \
276 ${PN}-analyze \
277 ${PN}-kernel-install \
278 ${PN}-rpm-macros \
279 ${PN}-binfmt \
280 ${PN}-zsh-completion \
281 ${PN}-xorg-xinitrc \
282 ${PN}-container \
283 ${PN}-extra-utils \
284"
285
286SUMMARY_${PN}-container = "Tools for containers and VMs"
287DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
288
289SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
290SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
291
292USERADD_PACKAGES = "${PN} ${PN}-extra-utils"
293USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
294USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
295USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
296USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
297USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
298USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
299USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolve', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
300USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
301GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
302USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"
303
304FILES_${PN}-analyze = "${bindir}/systemd-analyze"
305
306FILES_${PN}-initramfs = "/init"
307RDEPENDS_${PN}-initramfs = "${PN}"
308
309FILES_${PN}-gui = "${bindir}/systemadm"
310
311FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
312 ${systemd_unitdir}/system/systemd-vconsole-setup.service \
313 ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
314
315RDEPENDS_${PN}-kernel-install += "bash"
316FILES_${PN}-kernel-install = "${bindir}/kernel-install \
317 ${sysconfdir}/kernel/ \
318 ${exec_prefix}/lib/kernel \
319 "
320FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
321 "
322
323FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
324
325FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
326
327FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
328 ${exec_prefix}/lib/binfmt.d \
329 ${rootlibexecdir}/systemd/systemd-binfmt \
330 ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
331 ${systemd_unitdir}/system/systemd-binfmt.service"
332RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
333
334RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
335
336FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
337 ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
338 ${base_bindir}/machinectl \
339 ${bindir}/systemd-nspawn \
340 ${nonarch_libdir}/systemd/import-pubring.gpg \
341 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
342 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
343 ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
344 ${systemd_system_unitdir}/machine.slice \
345 ${systemd_system_unitdir}/machines.target \
346 ${systemd_system_unitdir}/org.freedesktop.import1.busname \
347 ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
348 ${systemd_system_unitdir}/systemd-importd.service \
349 ${systemd_system_unitdir}/systemd-machined.service \
350 ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
351 ${systemd_system_unitdir}/var-lib-machines.mount \
352 ${rootlibexecdir}/systemd/systemd-import \
353 ${rootlibexecdir}/systemd/systemd-importd \
354 ${rootlibexecdir}/systemd/systemd-journal-gatewayd \
355 ${rootlibexecdir}/systemd/systemd-journal-remote \
356 ${rootlibexecdir}/systemd/systemd-journal-upload \
357 ${rootlibexecdir}/systemd/systemd-machined \
358 ${rootlibexecdir}/systemd/systemd-pull \
359 ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
360 ${systemd_system_unitdir}/systemd-nspawn@.service \
361 ${libdir}/libnss_mymachines.so.2 \
362 ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
363 ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
364 ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
365 ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
366 ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
367 "
368
369FILES_${PN}-extra-utils = "\
370 ${base_bindir}/systemd-escape \
371 ${base_bindir}/systemd-inhibit \
372 ${bindir}/systemd-detect-virt \
373 ${bindir}/systemd-path \
374 ${bindir}/systemd-run \
375 ${bindir}/systemd-cat \
376 ${bindir}/systemd-delta \
377 ${bindir}/systemd-cgls \
378 ${bindir}/systemd-cgtop \
379 ${bindir}/systemd-stdio-bridge \
380 ${base_bindir}/systemd-ask-password \
381 ${base_bindir}/systemd-tty-ask-password-agent \
382 ${systemd_unitdir}/system/systemd-ask-password-console.path \
383 ${systemd_unitdir}/system/systemd-ask-password-console.service \
384 ${systemd_unitdir}/system/systemd-ask-password-wall.path \
385 ${systemd_unitdir}/system/systemd-ask-password-wall.service \
386 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
387 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
388 ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
389 ${rootlibexecdir}/systemd/systemd-resolve-host \
390 ${rootlibexecdir}/systemd/systemd-ac-power \
391 ${rootlibexecdir}/systemd/systemd-activate \
392 ${rootlibexecdir}/systemd/systemd-bus-proxyd \
393 ${systemd_unitdir}/system/systemd-bus-proxyd.service \
394 ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
395 ${rootlibexecdir}/systemd/systemd-socket-proxyd \
396 ${rootlibexecdir}/systemd/systemd-reply-password \
397 ${rootlibexecdir}/systemd/systemd-sleep \
398 ${rootlibexecdir}/systemd/system-sleep \
399 ${systemd_unitdir}/system/systemd-hibernate.service \
400 ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
401 ${systemd_unitdir}/system/systemd-suspend.service \
402 ${systemd_unitdir}/system/sleep.target \
403 ${rootlibexecdir}/systemd/systemd-initctl \
404 ${systemd_unitdir}/system/systemd-initctl.service \
405 ${systemd_unitdir}/system/systemd-initctl.socket \
406 ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
407 ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
408 ${rootlibexecdir}/systemd/systemd-cgroups-agent \
409"
410
411CONFFILES_${PN} = "${sysconfdir}/machine-id \
412 ${sysconfdir}/systemd/coredump.conf \
413 ${sysconfdir}/systemd/journald.conf \
414 ${sysconfdir}/systemd/logind.conf \
415 ${sysconfdir}/systemd/system.conf \
416 ${sysconfdir}/systemd/user.conf"
417
418FILES_${PN} = " ${base_bindir}/* \
419 ${datadir}/dbus-1/services \
420 ${datadir}/dbus-1/system-services \
421 ${datadir}/polkit-1 \
422 ${datadir}/${BPN} \
423 ${datadir}/factory \
424 ${sysconfdir}/dbus-1/ \
425 ${sysconfdir}/machine-id \
426 ${sysconfdir}/modules-load.d/ \
427 ${sysconfdir}/pam.d/ \
428 ${sysconfdir}/sysctl.d/ \
429 ${sysconfdir}/systemd/ \
430 ${sysconfdir}/tmpfiles.d/ \
431 ${sysconfdir}/xdg/ \
432 ${sysconfdir}/init.d/README \
433 ${sysconfdir}/resolv-conf.systemd \
434 ${rootlibexecdir}/systemd/* \
435 ${systemd_unitdir}/* \
436 ${base_libdir}/security/*.so \
437 /cgroup \
438 ${bindir}/systemd* \
439 ${bindir}/busctl \
440 ${bindir}/coredumpctl \
441 ${bindir}/localectl \
442 ${bindir}/hostnamectl \
443 ${bindir}/timedatectl \
444 ${bindir}/bootctl \
445 ${bindir}/kernel-install \
446 ${exec_prefix}/lib/tmpfiles.d/*.conf \
447 ${exec_prefix}/lib/systemd \
448 ${exec_prefix}/lib/modules-load.d \
449 ${exec_prefix}/lib/sysctl.d \
450 ${exec_prefix}/lib/sysusers.d \
451 ${exec_prefix}/lib/environment.d \
452 ${localstatedir} \
453 ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
454 ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
455 ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
456 ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
457 ${nonarch_base_libdir}/modprobe.d/systemd.conf \
458 ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
459 ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
460 ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
461 ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \
462 ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \
463 ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \
464 ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \
465 "
466
467FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
468
469RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV}) util-linux-agetty"
470RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
471RDEPENDS_${PN} += "volatile-binds update-rc.d"
472
473RRECOMMENDS_${PN} += "systemd-extra-utils \
474 systemd-compat-units udev-hwdb \
475 util-linux-fsck e2fsprogs-e2fsck \
476 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
477 os-release \
478"
479
480INSANE_SKIP_${PN} += "dev-so libdir"
481INSANE_SKIP_${PN}-dbg += "libdir"
482INSANE_SKIP_${PN}-doc += " libdir"
483
484PACKAGES =+ "udev udev-hwdb"
485
486RPROVIDES_udev = "hotplug"
487
488RDEPENDS_udev-hwdb += "udev"
489
490FILES_udev += "${base_sbindir}/udevd \
491 ${rootlibexecdir}/systemd/systemd-udevd \
492 ${rootlibexecdir}/udev/accelerometer \
493 ${rootlibexecdir}/udev/ata_id \
494 ${rootlibexecdir}/udev/cdrom_id \
495 ${rootlibexecdir}/udev/collect \
496 ${rootlibexecdir}/udev/findkeyboards \
497 ${rootlibexecdir}/udev/keyboard-force-release.sh \
498 ${rootlibexecdir}/udev/keymap \
499 ${rootlibexecdir}/udev/mtd_probe \
500 ${rootlibexecdir}/udev/scsi_id \
501 ${rootlibexecdir}/udev/v4l_id \
502 ${rootlibexecdir}/udev/keymaps \
503 ${rootlibexecdir}/udev/rules.d/*.rules \
504 ${sysconfdir}/udev \
505 ${sysconfdir}/init.d/systemd-udevd \
506 ${systemd_unitdir}/system/*udev* \
507 ${systemd_unitdir}/system/*.wants/*udev* \
508 ${base_bindir}/udevadm \
509 ${datadir}/bash-completion/completions/udevadm \
510 "
511
512FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
513
514INITSCRIPT_PACKAGES = "udev"
515INITSCRIPT_NAME_udev = "systemd-udevd"
516INITSCRIPT_PARAMS_udev = "start 03 S ."
517
518python __anonymous() {
519 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
520 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
521}
522
523# TODO:
524# u-a for runlevel and telinit
525
526ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
527
528ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
529ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
530ALTERNATIVE_PRIORITY[init] ?= "300"
531
532ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
533ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
534ALTERNATIVE_PRIORITY[halt] ?= "300"
535
536ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
537ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
538ALTERNATIVE_PRIORITY[reboot] ?= "300"
539
540ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
541ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
542ALTERNATIVE_PRIORITY[shutdown] ?= "300"
543
544ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
545ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
546ALTERNATIVE_PRIORITY[poweroff] ?= "300"
547
548ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
549ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
550ALTERNATIVE_PRIORITY[runlevel] ?= "300"
551
552ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
553ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
554ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
555
556pkg_postinst_${PN} () {
557 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
558 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
559 -i $D${sysconfdir}/nsswitch.conf
560}
561
562pkg_prerm_${PN} () {
563 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
564 -e '/^hosts:/s/\s*myhostname//' \
565 -i $D${sysconfdir}/nsswitch.conf
566}
567
568PACKAGE_WRITE_DEPS += "qemu-native"
569pkg_postinst_udev-hwdb () {
570 if test -n "$D"; then
571 ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
572 --root $D
573 chown root:root $D${sysconfdir}/udev/hwdb.bin
574 else
575 udevadm hwdb --update
576 fi
577}
578
579pkg_prerm_udev-hwdb () {
580 rm -f $D${sysconfdir}/udev/hwdb.bin
581}