diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd_225.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd_225.bb | 413 |
1 files changed, 413 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_225.bb b/meta/recipes-core/systemd/systemd_225.bb new file mode 100644 index 0000000000..2dc8884839 --- /dev/null +++ b/meta/recipes-core/systemd/systemd_225.bb | |||
@@ -0,0 +1,413 @@ | |||
1 | SUMMARY = "A System and service manager" | ||
2 | HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd" | ||
3 | |||
4 | DESCRIPTION = "systemd is a system and service manager for Linux, compatible with \ | ||
5 | SysV and LSB init scripts. systemd provides aggressive parallelization \ | ||
6 | capabilities, uses socket and D-Bus activation for starting services, \ | ||
7 | offers on-demand starting of daemons, keeps track of processes using \ | ||
8 | Linux cgroups, supports snapshotting and restoring of the system \ | ||
9 | state, maintains mount and automount points and implements an \ | ||
10 | elaborate transactional dependency-based service control logic. It can \ | ||
11 | work as a drop-in replacement for sysvinit." | ||
12 | |||
13 | LICENSE = "GPLv2 & LGPLv2.1" | ||
14 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ | ||
15 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" | ||
16 | |||
17 | PROVIDES = "udev" | ||
18 | |||
19 | PE = "1" | ||
20 | |||
21 | DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux" | ||
22 | |||
23 | SECTION = "base/shell" | ||
24 | |||
25 | inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext | ||
26 | |||
27 | SRCREV = "e1439a1472c5f691733b8ef10e702beac2496a63" | ||
28 | |||
29 | PV = "225+git${SRCPV}" | ||
30 | |||
31 | SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \ | ||
32 | file://0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ | ||
33 | file://0004-configure-Check-for-additional-features-that-uclibc-.patch \ | ||
34 | file://0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch \ | ||
35 | file://0006-journal-Use-posix-fallocate-only-if-available.patch \ | ||
36 | file://0007-util-Use-mkostemp-only-if-libc-supports-it.patch \ | ||
37 | file://0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \ | ||
38 | file://0009-sysv-generator-add-support-for-executing-scripts-und.patch \ | ||
39 | file://0010-Make-root-s-home-directory-configurable.patch \ | ||
40 | file://0011-systemd-user-avoid-using-system-auth.patch \ | ||
41 | file://0014-Revert-rules-remove-firmware-loading-rules.patch \ | ||
42 | file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \ | ||
43 | file://touchscreen.rules \ | ||
44 | file://00-create-volatile.conf \ | ||
45 | file://init \ | ||
46 | file://run-ptest \ | ||
47 | " | ||
48 | SRC_URI_append_qemuall = "file://qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch" | ||
49 | |||
50 | S = "${WORKDIR}/git" | ||
51 | |||
52 | SRC_URI_append_libc-uclibc = "\ | ||
53 | file://0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch \ | ||
54 | " | ||
55 | LDFLAGS_append_libc-uclibc = " -lrt" | ||
56 | |||
57 | GTKDOC_DOCDIR = "${S}/docs/" | ||
58 | |||
59 | PACKAGECONFIG ??= "xz ldconfig \ | ||
60 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ | ||
61 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ | ||
62 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ | ||
63 | " | ||
64 | |||
65 | PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl" | ||
66 | # Sign the journal for anti-tampering | ||
67 | PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" | ||
68 | # regardless of PACKAGECONFIG, libgcrypt is always required to expand | ||
69 | # the AM_PATH_LIBGCRYPT autoconf macro | ||
70 | DEPENDS += "libgcrypt" | ||
71 | # Compress the journal | ||
72 | PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz" | ||
73 | PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup" | ||
74 | PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd" | ||
75 | PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils" | ||
76 | PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" | ||
77 | PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd" | ||
78 | PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn" | ||
79 | PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit" | ||
80 | PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" | ||
81 | PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam" | ||
82 | # Verify keymaps on locale change | ||
83 | PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon" | ||
84 | # Update NAT firewall rules | ||
85 | PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables" | ||
86 | PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,," | ||
87 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" | ||
88 | 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" | ||
89 | |||
90 | CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill" | ||
91 | CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod" | ||
92 | CACHED_CONFIGUREVARS += "ac_cv_path_QUOTACHECK=${sbindir}/quotacheck" | ||
93 | CACHED_CONFIGUREVARS += "ac_cv_path_QUOTAON=${sbindir}/quotaon" | ||
94 | CACHED_CONFIGUREVARS += "ac_cv_path_SULOGIN=${base_sbindir}/sulogin" | ||
95 | |||
96 | # Helper variables to clarify locations. This mirrors the logic in systemd's | ||
97 | # build system. | ||
98 | rootprefix ?= "${base_prefix}" | ||
99 | rootlibdir ?= "${base_libdir}" | ||
100 | rootlibexecdir = "${rootprefix}/lib" | ||
101 | |||
102 | CACHED_CONFIGUREVARS_class-target = "\ | ||
103 | ac_cv_path_MOUNT_PATH=${base_bindir}/mount \ | ||
104 | ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \ | ||
105 | ac_cv_path_KMOD=${base_bindir}/kmod \ | ||
106 | ac_cv_path_KILL=${base_bindir}/kill \ | ||
107 | ac_cv_path_SULOGIN=${base_sbindir}/sulogin \ | ||
108 | ac_cv_path_KEXEC=${sbindir}/kexec \ | ||
109 | ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \ | ||
110 | ac_cv_path_QUOTAON=${sbindir}/quotaon \ | ||
111 | " | ||
112 | |||
113 | EXTRA_OECONF = " --with-rootprefix=${rootprefix} \ | ||
114 | --with-rootlibdir=${rootlibdir} \ | ||
115 | --with-roothomedir=${ROOT_HOME} \ | ||
116 | --disable-coredump \ | ||
117 | --enable-split-usr \ | ||
118 | --without-python \ | ||
119 | --with-sysvrcnd-path=${sysconfdir} \ | ||
120 | --with-firmware-path=/lib/firmware \ | ||
121 | " | ||
122 | # uclibc does not have NSS | ||
123 | EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname " | ||
124 | |||
125 | do_configure_prepend() { | ||
126 | export NM="${HOST_PREFIX}gcc-nm" | ||
127 | export AR="${HOST_PREFIX}gcc-ar" | ||
128 | export RANLIB="${HOST_PREFIX}gcc-ranlib" | ||
129 | export KMOD="${base_bindir}/kmod" | ||
130 | if [ -d ${S}/units.pre_sed ] ; then | ||
131 | cp -r ${S}/units.pre_sed ${S}/units | ||
132 | else | ||
133 | cp -r ${S}/units ${S}/units.pre_sed | ||
134 | fi | ||
135 | sed -i '/ln --relative --help/d' ${S}/configure.ac | ||
136 | sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am | ||
137 | sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am | ||
138 | } | ||
139 | |||
140 | do_install() { | ||
141 | autotools_do_install | ||
142 | install -d ${D}/${base_sbindir} | ||
143 | # Provided by a separate recipe | ||
144 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | ||
145 | |||
146 | # Provide support for initramfs | ||
147 | [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init | ||
148 | [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd | ||
149 | |||
150 | # Create machine-id | ||
151 | # 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 | ||
152 | touch ${D}${sysconfdir}/machine-id | ||
153 | |||
154 | |||
155 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
156 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
157 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ | ||
158 | |||
159 | install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
160 | |||
161 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
162 | install -d ${D}${sysconfdir}/init.d | ||
163 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd | ||
164 | sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd | ||
165 | fi | ||
166 | |||
167 | chown root:systemd-journal ${D}/${localstatedir}/log/journal | ||
168 | |||
169 | # Delete journal README, as log can be symlinked inside volatile. | ||
170 | rm -f ${D}/${localstatedir}/log/README | ||
171 | |||
172 | # Create symlinks for systemd-update-utmp-runlevel.service | ||
173 | install -d ${D}${systemd_unitdir}/system/graphical.target.wants | ||
174 | install -d ${D}${systemd_unitdir}/system/multi-user.target.wants | ||
175 | install -d ${D}${systemd_unitdir}/system/poweroff.target.wants | ||
176 | install -d ${D}${systemd_unitdir}/system/reboot.target.wants | ||
177 | install -d ${D}${systemd_unitdir}/system/rescue.target.wants | ||
178 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service | ||
179 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service | ||
180 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service | ||
181 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service | ||
182 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service | ||
183 | |||
184 | # Enable journal to forward message to syslog daemon | ||
185 | sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf | ||
186 | # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it | ||
187 | # for existence else it fails | ||
188 | if [ -s ${D}${libdir}/tmpfiles.d/systemd.conf ]; then | ||
189 | ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)} | ||
190 | fi | ||
191 | } | ||
192 | |||
193 | do_install_ptest () { | ||
194 | install -d ${D}${PTEST_PATH}/test | ||
195 | cp -rf ${S}/test/* ${D}${PTEST_PATH}/test | ||
196 | install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/ | ||
197 | install -d ${D}${PTEST_PATH}/build-aux | ||
198 | cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ | ||
199 | cp -rf ${B}/rules ${D}${PTEST_PATH}/ | ||
200 | # This directory needs to be there for udev-test.pl to work. | ||
201 | install -d ${D}${libdir}/udev/rules.d | ||
202 | cp ${B}/Makefile ${D}${PTEST_PATH}/ | ||
203 | cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test | ||
204 | sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl | ||
205 | sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile | ||
206 | sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile | ||
207 | } | ||
208 | |||
209 | python populate_packages_prepend (){ | ||
210 | systemdlibdir = d.getVar("rootlibdir", True) | ||
211 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | ||
212 | } | ||
213 | PACKAGES_DYNAMIC += "^lib(udev|systemd).*" | ||
214 | |||
215 | PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \ | ||
216 | ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh ${PN}-xorg-xinitrc" | ||
217 | |||
218 | SYSTEMD_PACKAGES = "${PN}-binfmt" | ||
219 | SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" | ||
220 | |||
221 | USERADD_PACKAGES = "${PN}" | ||
222 | USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync" | ||
223 | GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal" | ||
224 | |||
225 | FILES_${PN}-analyze = "${bindir}/systemd-analyze" | ||
226 | |||
227 | FILES_${PN}-initramfs = "/init" | ||
228 | RDEPENDS_${PN}-initramfs = "${PN}" | ||
229 | |||
230 | RDEPENDS_${PN}-ptest += "perl python bash" | ||
231 | FILES_${PN}-ptest += "${libdir}/udev/rules.d" | ||
232 | |||
233 | FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug" | ||
234 | |||
235 | FILES_${PN}-gui = "${bindir}/systemadm" | ||
236 | |||
237 | FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ | ||
238 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ | ||
239 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" | ||
240 | |||
241 | RDEPENDS_${PN}-kernel-install += "bash" | ||
242 | FILES_${PN}-kernel-install = "${bindir}/kernel-install \ | ||
243 | ${sysconfdir}/kernel/ \ | ||
244 | ${exec_prefix}/lib/kernel \ | ||
245 | " | ||
246 | FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ | ||
247 | " | ||
248 | |||
249 | FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*" | ||
250 | |||
251 | FILES_${PN}-zsh = "${datadir}/zsh/site-functions" | ||
252 | |||
253 | FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ | ||
254 | ${exec_prefix}/lib/binfmt.d \ | ||
255 | ${rootlibexecdir}/systemd/systemd-binfmt \ | ||
256 | ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \ | ||
257 | ${systemd_unitdir}/system/systemd-binfmt.service" | ||
258 | RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" | ||
259 | |||
260 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" | ||
261 | |||
262 | CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ | ||
263 | ${sysconfdir}/systemd/logind.conf \ | ||
264 | ${sysconfdir}/systemd/system.conf \ | ||
265 | ${sysconfdir}/systemd/user.conf" | ||
266 | |||
267 | FILES_${PN} = " ${base_bindir}/* \ | ||
268 | ${datadir}/bash-completion \ | ||
269 | ${datadir}/dbus-1/services \ | ||
270 | ${datadir}/dbus-1/system-services \ | ||
271 | ${datadir}/polkit-1 \ | ||
272 | ${datadir}/${BPN} \ | ||
273 | ${datadir}/factory \ | ||
274 | ${sysconfdir}/bash_completion.d/ \ | ||
275 | ${sysconfdir}/dbus-1/ \ | ||
276 | ${sysconfdir}/machine-id \ | ||
277 | ${sysconfdir}/modules-load.d/ \ | ||
278 | ${sysconfdir}/pam.d/ \ | ||
279 | ${sysconfdir}/sysctl.d/ \ | ||
280 | ${sysconfdir}/systemd/ \ | ||
281 | ${sysconfdir}/tmpfiles.d/ \ | ||
282 | ${sysconfdir}/xdg/ \ | ||
283 | ${sysconfdir}/init.d/README \ | ||
284 | ${rootlibexecdir}/systemd/* \ | ||
285 | ${systemd_unitdir}/* \ | ||
286 | ${base_libdir}/security/*.so \ | ||
287 | ${libdir}/libnss_* \ | ||
288 | /cgroup \ | ||
289 | ${bindir}/systemd* \ | ||
290 | ${bindir}/busctl \ | ||
291 | ${bindir}/localectl \ | ||
292 | ${bindir}/hostnamectl \ | ||
293 | ${bindir}/timedatectl \ | ||
294 | ${bindir}/bootctl \ | ||
295 | ${bindir}/kernel-install \ | ||
296 | ${exec_prefix}/lib/tmpfiles.d/*.conf \ | ||
297 | ${exec_prefix}/lib/systemd \ | ||
298 | ${exec_prefix}/lib/modules-load.d \ | ||
299 | ${exec_prefix}/lib/sysctl.d \ | ||
300 | ${exec_prefix}/lib/sysusers.d \ | ||
301 | ${localstatedir} \ | ||
302 | ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \ | ||
303 | ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \ | ||
304 | ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \ | ||
305 | ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \ | ||
306 | " | ||
307 | |||
308 | FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" | ||
309 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | ||
310 | |||
311 | RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})" | ||
312 | RDEPENDS_${PN} += "volatile-binds" | ||
313 | |||
314 | RRECOMMENDS_${PN} += "systemd-serialgetty systemd-vconsole-setup \ | ||
315 | systemd-compat-units udev-hwdb \ | ||
316 | util-linux-agetty util-linux-fsck e2fsprogs-e2fsck \ | ||
317 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ | ||
318 | os-release \ | ||
319 | " | ||
320 | |||
321 | PACKAGES =+ "udev-dbg udev udev-hwdb" | ||
322 | |||
323 | FILES_udev-dbg += "${nonarch_base_libdir}/udev/.debug" | ||
324 | |||
325 | RPROVIDES_udev = "hotplug" | ||
326 | |||
327 | RDEPENDS_udev-hwdb += "udev" | ||
328 | |||
329 | FILES_udev += "${base_sbindir}/udevd \ | ||
330 | ${rootlibexecdir}/systemd/systemd-udevd \ | ||
331 | ${rootlibexecdir}/udev/accelerometer \ | ||
332 | ${rootlibexecdir}/udev/ata_id \ | ||
333 | ${rootlibexecdir}/udev/cdrom_id \ | ||
334 | ${rootlibexecdir}/udev/collect \ | ||
335 | ${rootlibexecdir}/udev/findkeyboards \ | ||
336 | ${rootlibexecdir}/udev/keyboard-force-release.sh \ | ||
337 | ${rootlibexecdir}/udev/keymap \ | ||
338 | ${rootlibexecdir}/udev/mtd_probe \ | ||
339 | ${rootlibexecdir}/udev/scsi_id \ | ||
340 | ${rootlibexecdir}/udev/v4l_id \ | ||
341 | ${rootlibexecdir}/udev/keymaps \ | ||
342 | ${rootlibexecdir}/udev/rules.d/*.rules \ | ||
343 | ${sysconfdir}/udev \ | ||
344 | ${sysconfdir}/init.d/systemd-udevd \ | ||
345 | ${systemd_unitdir}/system/*udev* \ | ||
346 | ${systemd_unitdir}/system/*.wants/*udev* \ | ||
347 | ${base_bindir}/udevadm \ | ||
348 | ${datadir}/bash-completion/completions/udevadm \ | ||
349 | " | ||
350 | |||
351 | FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" | ||
352 | |||
353 | INITSCRIPT_PACKAGES = "udev" | ||
354 | INITSCRIPT_NAME_udev = "systemd-udevd" | ||
355 | INITSCRIPT_PARAMS_udev = "start 03 S ." | ||
356 | |||
357 | python __anonymous() { | ||
358 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
359 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
360 | } | ||
361 | |||
362 | # TODO: | ||
363 | # u-a for runlevel and telinit | ||
364 | |||
365 | ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel" | ||
366 | |||
367 | ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd" | ||
368 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" | ||
369 | ALTERNATIVE_PRIORITY[init] ?= "300" | ||
370 | |||
371 | ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" | ||
372 | ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" | ||
373 | ALTERNATIVE_PRIORITY[halt] ?= "300" | ||
374 | |||
375 | ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" | ||
376 | ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" | ||
377 | ALTERNATIVE_PRIORITY[reboot] ?= "300" | ||
378 | |||
379 | ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" | ||
380 | ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" | ||
381 | ALTERNATIVE_PRIORITY[shutdown] ?= "300" | ||
382 | |||
383 | ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" | ||
384 | ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" | ||
385 | ALTERNATIVE_PRIORITY[poweroff] ?= "300" | ||
386 | |||
387 | ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" | ||
388 | ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" | ||
389 | ALTERNATIVE_PRIORITY[runlevel] ?= "300" | ||
390 | |||
391 | pkg_postinst_udev-hwdb () { | ||
392 | if test -n "$D"; then | ||
393 | ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ | ||
394 | --root $D | ||
395 | else | ||
396 | udevadm hwdb --update | ||
397 | fi | ||
398 | } | ||
399 | |||
400 | pkg_prerm_udev-hwdb () { | ||
401 | if test -n "$D"; then | ||
402 | exit 1 | ||
403 | fi | ||
404 | |||
405 | rm -f ${sysconfdir}/udev/hwdb.bin | ||
406 | } | ||
407 | |||
408 | # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so | ||
409 | # that we don't build both udev and systemd in world builds. | ||
410 | python () { | ||
411 | if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): | ||
412 | raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES") | ||
413 | } | ||