diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-11-28 13:26:06 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-08 10:31:29 +0000 |
commit | f9c12adaf8b3db01a91cc1ea11369d89a3a61c41 (patch) | |
tree | 07af401695250da26f363bdc464bbc8340b22ce1 /meta/recipes-core/systemd/systemd_230.bb | |
parent | b71f78ed6d17432aaaa389bdfc175e2d397a3f74 (diff) | |
download | poky-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.bb | 600 |
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 @@ | |||
1 | require systemd.inc | ||
2 | |||
3 | PROVIDES = "udev" | ||
4 | |||
5 | PE = "1" | ||
6 | |||
7 | DEPENDS = "kmod intltool-native gperf-native acl readline libcap libcgroup qemu-native util-linux" | ||
8 | |||
9 | SECTION = "base/shell" | ||
10 | |||
11 | inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion manpages | ||
12 | |||
13 | SRC_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 | " | ||
41 | SRC_URI_append_libc-uclibc = "\ | ||
42 | file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \ | ||
43 | " | ||
44 | SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch" | ||
45 | |||
46 | PACKAGECONFIG ??= "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 | " | ||
72 | PACKAGECONFIG_remove_libc-musl = "selinux" | ||
73 | PACKAGECONFIG_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. | ||
78 | PACKAGECONFIG[serial-getty-generator] = "" | ||
79 | |||
80 | PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl" | ||
81 | # Sign the journal for anti-tampering | ||
82 | PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" | ||
83 | PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup" | ||
84 | PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd" | ||
85 | PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils" | ||
86 | PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" | ||
87 | PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd" | ||
88 | PACKAGECONFIG[machined] = "--enable-machined,--disable-machined" | ||
89 | PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight" | ||
90 | PACKAGECONFIG[quotacheck] = "--enable-quotacheck,--disable-quotacheck" | ||
91 | PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed" | ||
92 | PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname" | ||
93 | PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill" | ||
94 | PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate" | ||
95 | PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated" | ||
96 | PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd" | ||
97 | PACKAGECONFIG[localed] = "--enable-localed,--disable-localed" | ||
98 | PACKAGECONFIG[efi] = "--enable-efi,--disable-efi" | ||
99 | PACKAGECONFIG[kdbus] = "--enable-kdbus,--disable-kdbus" | ||
100 | PACKAGECONFIG[ima] = "--enable-ima,--disable-ima" | ||
101 | PACKAGECONFIG[smack] = "--enable-smack,--disable-smack" | ||
102 | # libseccomp is found in meta-security | ||
103 | PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" | ||
104 | PACKAGECONFIG[logind] = "--enable-logind,--disable-logind" | ||
105 | PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers" | ||
106 | PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot" | ||
107 | PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed" | ||
108 | PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt" | ||
109 | PACKAGECONFIG[utmp] = "--enable-utmp,--disable-utmp" | ||
110 | PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit" | ||
111 | # importd requires curl/xz/zlib/bzip2/gcrypt | ||
112 | PACKAGECONFIG[importd] = "--enable-importd,--disable-importd" | ||
113 | PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn" | ||
114 | PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit" | ||
115 | PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" | ||
116 | PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam" | ||
117 | # Verify keymaps on locale change | ||
118 | PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon" | ||
119 | # Update NAT firewall rules | ||
120 | PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables" | ||
121 | PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,," | ||
122 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" | ||
123 | PACKAGECONFIG[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" | ||
124 | PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode" | ||
125 | PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" | ||
126 | PACKAGECONFIG[coredump] = "--enable-coredump,--disable-coredump" | ||
127 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" | ||
128 | PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4" | ||
129 | PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz" | ||
130 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" | ||
131 | |||
132 | CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill" | ||
133 | CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod" | ||
134 | CACHED_CONFIGUREVARS += "ac_cv_path_QUOTACHECK=${sbindir}/quotacheck" | ||
135 | CACHED_CONFIGUREVARS += "ac_cv_path_QUOTAON=${sbindir}/quotaon" | ||
136 | CACHED_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. | ||
140 | rootprefix ?= "${base_prefix}" | ||
141 | rootlibdir ?= "${base_libdir}" | ||
142 | rootlibexecdir = "${rootprefix}/lib" | ||
143 | |||
144 | CACHED_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 | |||
155 | EXTRA_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 | ||
165 | CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}" | ||
166 | |||
167 | # disable problematic GCC 5.2 optimizations [YOCTO #8291] | ||
168 | FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2" | ||
169 | |||
170 | do_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 | |||
184 | do_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 | |||
255 | do_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 | |||
281 | python 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 | } | ||
285 | PACKAGES_DYNAMIC += "^lib(udev|systemd).*" | ||
286 | |||
287 | PACKAGES =+ "\ | ||
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 | |||
302 | SUMMARY_${PN}-container = "Tools for containers and VMs" | ||
303 | DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines." | ||
304 | |||
305 | SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}" | ||
306 | SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" | ||
307 | |||
308 | USERADD_PACKAGES = "${PN} ${PN}-extra-utils" | ||
309 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}" | ||
310 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}" | ||
311 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}" | ||
312 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}" | ||
313 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}" | ||
314 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}" | ||
315 | USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}" | ||
316 | GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal" | ||
317 | USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;" | ||
318 | |||
319 | FILES_${PN}-analyze = "${bindir}/systemd-analyze" | ||
320 | |||
321 | FILES_${PN}-initramfs = "/init" | ||
322 | RDEPENDS_${PN}-initramfs = "${PN}" | ||
323 | |||
324 | RDEPENDS_${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 | |||
330 | FILES_${PN}-ptest += "${libdir}/udev/rules.d" | ||
331 | |||
332 | FILES_${PN}-gui = "${bindir}/systemadm" | ||
333 | |||
334 | FILES_${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 | |||
338 | RDEPENDS_${PN}-kernel-install += "bash" | ||
339 | FILES_${PN}-kernel-install = "${bindir}/kernel-install \ | ||
340 | ${sysconfdir}/kernel/ \ | ||
341 | ${exec_prefix}/lib/kernel \ | ||
342 | " | ||
343 | FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ | ||
344 | " | ||
345 | |||
346 | FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*" | ||
347 | |||
348 | FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions" | ||
349 | |||
350 | FILES_${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" | ||
355 | RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" | ||
356 | |||
357 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" | ||
358 | |||
359 | FILES_${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 | |||
391 | FILES_${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 | |||
433 | CONFFILES_${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 | |||
440 | FILES_${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 | |||
481 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | ||
482 | |||
483 | RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})" | ||
484 | RDEPENDS_${PN} += "volatile-binds update-rc.d" | ||
485 | |||
486 | RRECOMMENDS_${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 | |||
495 | INSANE_SKIP_${PN}-doc += " libdir" | ||
496 | |||
497 | PACKAGES =+ "udev udev-hwdb" | ||
498 | |||
499 | RPROVIDES_udev = "hotplug" | ||
500 | |||
501 | RDEPENDS_udev-hwdb += "udev" | ||
502 | |||
503 | FILES_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 | |||
525 | FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" | ||
526 | |||
527 | INITSCRIPT_PACKAGES = "udev" | ||
528 | INITSCRIPT_NAME_udev = "systemd-udevd" | ||
529 | INITSCRIPT_PARAMS_udev = "start 03 S ." | ||
530 | |||
531 | python __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 | |||
539 | ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel" | ||
540 | |||
541 | ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd" | ||
542 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" | ||
543 | ALTERNATIVE_PRIORITY[init] ?= "300" | ||
544 | |||
545 | ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" | ||
546 | ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" | ||
547 | ALTERNATIVE_PRIORITY[halt] ?= "300" | ||
548 | |||
549 | ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" | ||
550 | ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" | ||
551 | ALTERNATIVE_PRIORITY[reboot] ?= "300" | ||
552 | |||
553 | ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" | ||
554 | ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" | ||
555 | ALTERNATIVE_PRIORITY[shutdown] ?= "300" | ||
556 | |||
557 | ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" | ||
558 | ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" | ||
559 | ALTERNATIVE_PRIORITY[poweroff] ?= "300" | ||
560 | |||
561 | ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" | ||
562 | ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" | ||
563 | ALTERNATIVE_PRIORITY[runlevel] ?= "300" | ||
564 | |||
565 | pkg_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 | |||
571 | pkg_prerm_${PN} () { | ||
572 | sed -e '/^hosts:/s/\s*\<myhostname\>//' \ | ||
573 | -e '/^hosts:/s/\s*myhostname//' \ | ||
574 | -i $D${sysconfdir}/nsswitch.conf | ||
575 | } | ||
576 | |||
577 | pkg_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 | |||
587 | pkg_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. | ||
593 | python () { | ||
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 | } | ||