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