summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd_230.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-11-28 13:26:06 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-08 10:31:29 +0000
commitf9c12adaf8b3db01a91cc1ea11369d89a3a61c41 (patch)
tree07af401695250da26f363bdc464bbc8340b22ce1 /meta/recipes-core/systemd/systemd_230.bb
parentb71f78ed6d17432aaaa389bdfc175e2d397a3f74 (diff)
downloadpoky-f9c12adaf8b3db01a91cc1ea11369d89a3a61c41.tar.gz
systemd: Upgrade to 232
* Drop support for rcS.d SysV init scripts. These are prone to cause dependency loops, and almost all packages with rcS scripts now ship a native systemd service. * Drop mount propagation patch, it only happens with libseccomp, OE doesnt enable it * kdbus option has disappeared from configure * Ignore dev-so for PN now since systemd introduced private .so see https://github.com/systemd/systemd/issues/3810 * Add libnss* to PACKAGES_DYNAMIC for libnss-resolve to work correctly * Forward port systemd-boot patches to systemd-232 (From OE-Core rev: e6c1765a05c1321f08f3d1fb521dfe6b07bc8e92) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd_230.bb')
-rw-r--r--meta/recipes-core/systemd/systemd_230.bb600
1 files changed, 0 insertions, 600 deletions
diff --git a/meta/recipes-core/systemd/systemd_230.bb b/meta/recipes-core/systemd/systemd_230.bb
deleted file mode 100644
index 77b71309bb..0000000000
--- a/meta/recipes-core/systemd/systemd_230.bb
+++ /dev/null
@@ -1,600 +0,0 @@
1require systemd.inc
2
3PROVIDES = "udev"
4
5PE = "1"
6
7DEPENDS = "kmod intltool-native gperf-native acl readline libcap libcgroup qemu-native util-linux"
8
9SECTION = "base/shell"
10
11inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion manpages
12
13SRC_URI += " \
14 file://touchscreen.rules \
15 file://00-create-volatile.conf \
16 file://init \
17 file://run-ptest \
18 file://0003-define-exp10-if-missing.patch \
19 file://0004-Use-getenv-when-secure-versions-are-not-available.patch \
20 file://0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
21 file://0006-configure-Check-for-additional-features-that-uclibc-.patch \
22 file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
23 file://0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch \
24 file://0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \
25 file://0010-implment-systemd-sysv-install-for-OE.patch \
26 file://0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch \
27 file://0012-rules-whitelist-hd-devices.patch \
28 file://0013-sysv-generator-add-support-for-executing-scripts-und.patch \
29 file://0014-Make-root-s-home-directory-configurable.patch \
30 file://0015-systemd-user-avoid-using-system-auth.patch \
31 file://0016-Revert-rules-remove-firmware-loading-rules.patch \
32 file://0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
33 file://0018-make-test-dir-configurable.patch \
34 file://0019-remove-duplicate-include-uchar.h.patch \
35 file://0020-check-for-uchar.h-in-configure.patch \
36 file://0021-include-missing.h-for-getting-secure_getenv-definiti.patch \
37 file://0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
38 file://udev-re-enable-mount-propagation-for-udevd.patch \
39 file://CVE-2016-7795.patch \
40"
41SRC_URI_append_libc-uclibc = "\
42 file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
43"
44SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
45
46PACKAGECONFIG ??= "xz \
47 ldconfig \
48 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
49 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
50 ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
51 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
52 ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'efi', '', d)} \
53 binfmt \
54 randomseed \
55 machined \
56 backlight \
57 quotacheck \
58 hostnamed \
59 ${@bb.utils.contains('TCLIBC', 'glibc', 'myhostname sysusers', '', d)} \
60 hibernate \
61 timedated \
62 timesyncd \
63 localed \
64 kdbus \
65 ima \
66 smack \
67 logind \
68 firstboot \
69 utmp \
70 polkit \
71"
72PACKAGECONFIG_remove_libc-musl = "selinux"
73PACKAGECONFIG_remove_libc-musl = "smack"
74
75# Use the upstream systemd serial-getty@.service and rely on
76# systemd-getty-generator instead of using the OE-core specific
77# systemd-serialgetty.bb - not enabled by default.
78PACKAGECONFIG[serial-getty-generator] = ""
79
80PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
81# Sign the journal for anti-tampering
82PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
83PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
84PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
85PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
86PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
87PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
88PACKAGECONFIG[machined] = "--enable-machined,--disable-machined"
89PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight"
90PACKAGECONFIG[quotacheck] = "--enable-quotacheck,--disable-quotacheck"
91PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
92PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname"
93PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill"
94PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
95PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated"
96PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd"
97PACKAGECONFIG[localed] = "--enable-localed,--disable-localed"
98PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
99PACKAGECONFIG[kdbus] = "--enable-kdbus,--disable-kdbus"
100PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
101PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
102# libseccomp is found in meta-security
103PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
104PACKAGECONFIG[logind] = "--enable-logind,--disable-logind"
105PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers"
106PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot"
107PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed"
108PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt"
109PACKAGECONFIG[utmp] = "--enable-utmp,--disable-utmp"
110PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit"
111# importd requires curl/xz/zlib/bzip2/gcrypt
112PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
113PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
114PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
115PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
116PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
117# Verify keymaps on locale change
118PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
119# Update NAT firewall rules
120PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
121PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,,"
122PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
123PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no ,valgrind"
124PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
125PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
126PACKAGECONFIG[coredump] = "--enable-coredump,--disable-coredump"
127PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
128PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
129PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
130PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
131
132CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill"
133CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
134CACHED_CONFIGUREVARS += "ac_cv_path_QUOTACHECK=${sbindir}/quotacheck"
135CACHED_CONFIGUREVARS += "ac_cv_path_QUOTAON=${sbindir}/quotaon"
136CACHED_CONFIGUREVARS += "ac_cv_path_SULOGIN=${base_sbindir}/sulogin"
137
138# Helper variables to clarify locations. This mirrors the logic in systemd's
139# build system.
140rootprefix ?= "${base_prefix}"
141rootlibdir ?= "${base_libdir}"
142rootlibexecdir = "${rootprefix}/lib"
143
144CACHED_CONFIGUREVARS_class-target = "\
145 ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
146 ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
147 ac_cv_path_KMOD=${base_bindir}/kmod \
148 ac_cv_path_KILL=${base_bindir}/kill \
149 ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
150 ac_cv_path_KEXEC=${sbindir}/kexec \
151 ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
152 ac_cv_path_QUOTAON=${sbindir}/quotaon \
153 "
154
155EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
156 --with-rootlibdir=${rootlibdir} \
157 --with-roothomedir=${ROOT_HOME} \
158 --enable-split-usr \
159 --without-python \
160 --with-sysvrcnd-path=${sysconfdir} \
161 --with-firmware-path=/lib/firmware \
162 --with-testdir=${PTEST_PATH} \
163 "
164# per the systemd README, define VALGRIND=1 to run under valgrind
165CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}"
166
167# disable problematic GCC 5.2 optimizations [YOCTO #8291]
168FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
169
170do_configure_prepend() {
171 export NM="${HOST_PREFIX}gcc-nm"
172 export AR="${HOST_PREFIX}gcc-ar"
173 export RANLIB="${HOST_PREFIX}gcc-ranlib"
174 export KMOD="${base_bindir}/kmod"
175 if [ -d ${S}/units.pre_sed ] ; then
176 cp -r ${S}/units.pre_sed ${S}/units
177 else
178 cp -r ${S}/units ${S}/units.pre_sed
179 fi
180 sed -i -e 's:-DTEST_DIR=\\\".*\\\":-DTEST_DIR=\\\"${PTEST_PATH}/tests/test\\\":' ${S}/Makefile.am
181 sed -i -e 's:-DCATALOG_DIR=\\\".*\\\":-DCATALOG_DIR=\\\"${PTEST_PATH}/tests/catalog\\\":' ${S}/Makefile.am
182}
183
184do_install() {
185 autotools_do_install
186 install -d ${D}/${base_sbindir}
187 if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
188 # Provided by a separate recipe
189 rm ${D}${systemd_unitdir}/system/serial-getty* -f
190 fi
191
192 # Provide support for initramfs
193 [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
194 [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
195
196 # Create machine-id
197 # 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
198 touch ${D}${sysconfdir}/machine-id
199
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', 'resolved', 'true', 'false', d)}; then
246 # if resolved is disabled, it won't handle the link of resolv.conf, so
247 # set it up ourselves
248 ln -s ../run/resolv.conf ${D}${sysconfdir}/resolv.conf
249 echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
250 echo 'f /run/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
251 fi
252 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
253}
254
255do_install_ptest () {
256 # install data files needed for tests
257 install -d ${D}${PTEST_PATH}/tests/test
258 cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
259 # python is disabled for systemd, thus removing these python testing scripts
260 rm ${D}${PTEST_PATH}/tests/test/*.py
261 sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
262
263 install -d ${D}${PTEST_PATH}/tests/catalog
264 install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
265
266 install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
267
268 install -d ${D}${PTEST_PATH}/tests/rules
269 install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
270
271 # This directory needs to be there for udev-test.pl to work.
272 install -d ${D}${libdir}/udev/rules.d
273
274 # install actual test binaries
275 install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
276 install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
277
278 install ${B}/Makefile ${D}${PTEST_PATH}/tests/
279}
280
281python populate_packages_prepend (){
282 systemdlibdir = d.getVar("rootlibdir", True)
283 do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
284}
285PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
286
287PACKAGES =+ "\
288 ${PN}-gui \
289 ${PN}-vconsole-setup \
290 ${PN}-initramfs \
291 ${PN}-analyze \
292 ${PN}-kernel-install \
293 ${PN}-rpm-macros \
294 ${PN}-binfmt \
295 ${PN}-pam \
296 ${PN}-zsh-completion \
297 ${PN}-xorg-xinitrc \
298 ${PN}-container \
299 ${PN}-extra-utils \
300"
301
302SUMMARY_${PN}-container = "Tools for containers and VMs"
303DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
304
305SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
306SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
307
308USERADD_PACKAGES = "${PN} ${PN}-extra-utils"
309USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
310USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
311USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
312USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
313USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
314USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
315USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
316GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
317USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"
318
319FILES_${PN}-analyze = "${bindir}/systemd-analyze"
320
321FILES_${PN}-initramfs = "/init"
322RDEPENDS_${PN}-initramfs = "${PN}"
323
324RDEPENDS_${PN}-ptest += "gawk make perl bash xz \
325 tzdata tzdata-americas tzdata-asia \
326 tzdata-europe tzdata-africa tzdata-antarctica \
327 tzdata-arctic tzdata-atlantic tzdata-australia \
328 tzdata-pacific tzdata-posix"
329
330FILES_${PN}-ptest += "${libdir}/udev/rules.d"
331
332FILES_${PN}-gui = "${bindir}/systemadm"
333
334FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
335 ${systemd_unitdir}/system/systemd-vconsole-setup.service \
336 ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
337
338RDEPENDS_${PN}-kernel-install += "bash"
339FILES_${PN}-kernel-install = "${bindir}/kernel-install \
340 ${sysconfdir}/kernel/ \
341 ${exec_prefix}/lib/kernel \
342 "
343FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
344 "
345
346FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
347
348FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
349
350FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
351 ${exec_prefix}/lib/binfmt.d \
352 ${rootlibexecdir}/systemd/systemd-binfmt \
353 ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
354 ${systemd_unitdir}/system/systemd-binfmt.service"
355RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
356
357RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
358
359FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
360 ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
361 ${base_bindir}/machinectl \
362 ${bindir}/systemd-nspawn \
363 ${nonarch_libdir}/systemd/import-pubring.gpg \
364 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
365 ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
366 ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
367 ${systemd_system_unitdir}/machine.slice \
368 ${systemd_system_unitdir}/machines.target \
369 ${systemd_system_unitdir}/org.freedesktop.import1.busname \
370 ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
371 ${systemd_system_unitdir}/systemd-importd.service \
372 ${systemd_system_unitdir}/systemd-machined.service \
373 ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
374 ${systemd_system_unitdir}/var-lib-machines.mount \
375 ${rootlibexecdir}/systemd/systemd-import \
376 ${rootlibexecdir}/systemd/systemd-importd \
377 ${rootlibexecdir}/systemd/systemd-journal-gatewayd \
378 ${rootlibexecdir}/systemd/systemd-journal-remote \
379 ${rootlibexecdir}/systemd/systemd-journal-upload \
380 ${rootlibexecdir}/systemd/systemd-machined \
381 ${rootlibexecdir}/systemd/systemd-pull \
382 ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
383 ${systemd_system_unitdir}/systemd-nspawn@.service \
384 ${libdir}/libnss_mymachines.so.2 \
385 ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
386 ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
387 ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
388 ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
389 "
390
391FILES_${PN}-extra-utils = "\
392 ${base_bindir}/systemd-escape \
393 ${base_bindir}/systemd-inhibit \
394 ${bindir}/systemd-detect-virt \
395 ${bindir}/systemd-path \
396 ${bindir}/systemd-run \
397 ${bindir}/systemd-cat \
398 ${bindir}/systemd-delta \
399 ${bindir}/systemd-cgls \
400 ${bindir}/systemd-cgtop \
401 ${bindir}/systemd-stdio-bridge \
402 ${base_bindir}/systemd-ask-password \
403 ${base_bindir}/systemd-tty-ask-password-agent \
404 ${systemd_unitdir}/system/systemd-ask-password-console.path \
405 ${systemd_unitdir}/system/systemd-ask-password-console.service \
406 ${systemd_unitdir}/system/systemd-ask-password-wall.path \
407 ${systemd_unitdir}/system/systemd-ask-password-wall.service \
408 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
409 ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
410 ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
411 ${rootlibexecdir}/systemd/systemd-resolve-host \
412 ${rootlibexecdir}/systemd/systemd-ac-power \
413 ${rootlibexecdir}/systemd/systemd-activate \
414 ${rootlibexecdir}/systemd/systemd-bus-proxyd \
415 ${systemd_unitdir}/system/systemd-bus-proxyd.service \
416 ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
417 ${rootlibexecdir}/systemd/systemd-socket-proxyd \
418 ${rootlibexecdir}/systemd/systemd-reply-password \
419 ${rootlibexecdir}/systemd/systemd-sleep \
420 ${rootlibexecdir}/systemd/system-sleep \
421 ${systemd_unitdir}/system/systemd-hibernate.service \
422 ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
423 ${systemd_unitdir}/system/systemd-suspend.service \
424 ${systemd_unitdir}/system/sleep.target \
425 ${rootlibexecdir}/systemd/systemd-initctl \
426 ${systemd_unitdir}/system/systemd-initctl.service \
427 ${systemd_unitdir}/system/systemd-initctl.socket \
428 ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
429 ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
430 ${rootlibexecdir}/systemd/systemd-cgroups-agent \
431"
432
433CONFFILES_${PN} = "${sysconfdir}/machine-id \
434 ${sysconfdir}/systemd/coredump.conf \
435 ${sysconfdir}/systemd/journald.conf \
436 ${sysconfdir}/systemd/logind.conf \
437 ${sysconfdir}/systemd/system.conf \
438 ${sysconfdir}/systemd/user.conf"
439
440FILES_${PN} = " ${base_bindir}/* \
441 ${datadir}/dbus-1/services \
442 ${datadir}/dbus-1/system-services \
443 ${datadir}/polkit-1 \
444 ${datadir}/${BPN} \
445 ${datadir}/factory \
446 ${sysconfdir}/dbus-1/ \
447 ${sysconfdir}/machine-id \
448 ${sysconfdir}/modules-load.d/ \
449 ${sysconfdir}/pam.d/ \
450 ${sysconfdir}/sysctl.d/ \
451 ${sysconfdir}/systemd/ \
452 ${sysconfdir}/tmpfiles.d/ \
453 ${sysconfdir}/xdg/ \
454 ${sysconfdir}/init.d/README \
455 ${sysconfdir}/resolv.conf \
456 ${rootlibexecdir}/systemd/* \
457 ${systemd_unitdir}/* \
458 ${base_libdir}/security/*.so \
459 ${libdir}/libnss_* \
460 /cgroup \
461 ${bindir}/systemd* \
462 ${bindir}/busctl \
463 ${bindir}/coredumpctl \
464 ${bindir}/localectl \
465 ${bindir}/hostnamectl \
466 ${bindir}/timedatectl \
467 ${bindir}/bootctl \
468 ${bindir}/kernel-install \
469 ${exec_prefix}/lib/tmpfiles.d/*.conf \
470 ${exec_prefix}/lib/systemd \
471 ${exec_prefix}/lib/modules-load.d \
472 ${exec_prefix}/lib/sysctl.d \
473 ${exec_prefix}/lib/sysusers.d \
474 ${localstatedir} \
475 ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
476 ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
477 ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
478 ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
479 "
480
481FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
482
483RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
484RDEPENDS_${PN} += "volatile-binds update-rc.d"
485
486RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)} \
487 systemd-vconsole-setup \
488 systemd-extra-utils \
489 systemd-compat-units udev-hwdb \
490 util-linux-agetty util-linux-fsck e2fsprogs-e2fsck \
491 kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
492 os-release \
493"
494
495INSANE_SKIP_${PN}-doc += " libdir"
496
497PACKAGES =+ "udev udev-hwdb"
498
499RPROVIDES_udev = "hotplug"
500
501RDEPENDS_udev-hwdb += "udev"
502
503FILES_udev += "${base_sbindir}/udevd \
504 ${rootlibexecdir}/systemd/systemd-udevd \
505 ${rootlibexecdir}/udev/accelerometer \
506 ${rootlibexecdir}/udev/ata_id \
507 ${rootlibexecdir}/udev/cdrom_id \
508 ${rootlibexecdir}/udev/collect \
509 ${rootlibexecdir}/udev/findkeyboards \
510 ${rootlibexecdir}/udev/keyboard-force-release.sh \
511 ${rootlibexecdir}/udev/keymap \
512 ${rootlibexecdir}/udev/mtd_probe \
513 ${rootlibexecdir}/udev/scsi_id \
514 ${rootlibexecdir}/udev/v4l_id \
515 ${rootlibexecdir}/udev/keymaps \
516 ${rootlibexecdir}/udev/rules.d/*.rules \
517 ${sysconfdir}/udev \
518 ${sysconfdir}/init.d/systemd-udevd \
519 ${systemd_unitdir}/system/*udev* \
520 ${systemd_unitdir}/system/*.wants/*udev* \
521 ${base_bindir}/udevadm \
522 ${datadir}/bash-completion/completions/udevadm \
523 "
524
525FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
526
527INITSCRIPT_PACKAGES = "udev"
528INITSCRIPT_NAME_udev = "systemd-udevd"
529INITSCRIPT_PARAMS_udev = "start 03 S ."
530
531python __anonymous() {
532 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
533 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
534}
535
536# TODO:
537# u-a for runlevel and telinit
538
539ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
540
541ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
542ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
543ALTERNATIVE_PRIORITY[init] ?= "300"
544
545ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
546ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
547ALTERNATIVE_PRIORITY[halt] ?= "300"
548
549ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
550ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
551ALTERNATIVE_PRIORITY[reboot] ?= "300"
552
553ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
554ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
555ALTERNATIVE_PRIORITY[shutdown] ?= "300"
556
557ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
558ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
559ALTERNATIVE_PRIORITY[poweroff] ?= "300"
560
561ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
562ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
563ALTERNATIVE_PRIORITY[runlevel] ?= "300"
564
565pkg_postinst_${PN} () {
566 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
567 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
568 -i $D${sysconfdir}/nsswitch.conf
569}
570
571pkg_prerm_${PN} () {
572 sed -e '/^hosts:/s/\s*\<myhostname\>//' \
573 -e '/^hosts:/s/\s*myhostname//' \
574 -i $D${sysconfdir}/nsswitch.conf
575}
576
577pkg_postinst_udev-hwdb () {
578 if test -n "$D"; then
579 ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
580 --root $D
581 chown root:root $D${sysconfdir}/udev/hwdb.bin
582 else
583 udevadm hwdb --update
584 fi
585}
586
587pkg_prerm_udev-hwdb () {
588 rm -f $D${sysconfdir}/udev/hwdb.bin
589}
590
591# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
592# that we don't build both udev and systemd in world builds.
593python () {
594 if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
595 raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
596
597 import re
598 if re.match('.*musl*', d.getVar('TARGET_OS', True)) != None:
599 raise bb.parse.SkipPackage("Not _yet_ supported on musl based targets")
600}