diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-02-24 18:07:26 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-24 23:32:48 +0000 |
commit | 9e9d6dfbd26742ea59383e268c7a4e9eb18456bf (patch) | |
tree | 2de8a6c5838e350511d25647e5cb543c20871410 /meta/recipes-core/systemd/systemd_218.bb | |
parent | 28618e46480f6fa0f099e050747a385acea57006 (diff) | |
download | poky-9e9d6dfbd26742ea59383e268c7a4e9eb18456bf.tar.gz |
systemd: Upgrade 216 -> 218
Remove upstreamed patches as well as patches which arent needed anymore
since features are dropped from systemd e.g. userspace firmware download
Tested on qemux86
Change-Id: Ic53aaad198998de146c3a7702ef17de871de9de6
(From OE-Core rev: c8a9d74ee78266893497a6b60329f6ae79c0394d)
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_218.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd_218.bb | 384 |
1 files changed, 384 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_218.bb b/meta/recipes-core/systemd/systemd_218.bb new file mode 100644 index 0000000000..221c2cc75a --- /dev/null +++ b/meta/recipes-core/systemd/systemd_218.bb | |||
@@ -0,0 +1,384 @@ | |||
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 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
24 | |||
25 | SECTION = "base/shell" | ||
26 | |||
27 | inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext | ||
28 | |||
29 | SRCREV = "820aced6f6067a6b7c57b7d36e44f64378870cbf" | ||
30 | |||
31 | PV = "218+git${SRCPV}" | ||
32 | |||
33 | SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \ | ||
34 | file://binfmt-install.patch \ | ||
35 | file://systemd-pam-configure-check-uclibc.patch \ | ||
36 | file://systemd-pam-fix-execvpe.patch \ | ||
37 | file://systemd-pam-fix-fallocate.patch \ | ||
38 | file://systemd-pam-fix-mkostemp.patch \ | ||
39 | file://optional_secure_getenv.patch \ | ||
40 | file://uclibc-get-physmem.patch \ | ||
41 | file://0001-add-support-for-executing-scripts-under-etc-rcS.d.patch \ | ||
42 | file://0001-Make-root-s-home-directory-configurable.patch \ | ||
43 | file://0001-systemd-user-avoid-using-system-auth.patch \ | ||
44 | file://touchscreen.rules \ | ||
45 | file://00-create-volatile.conf \ | ||
46 | file://init \ | ||
47 | file://run-ptest \ | ||
48 | " | ||
49 | |||
50 | S = "${WORKDIR}/git" | ||
51 | |||
52 | SRC_URI_append_libc-uclibc = "\ | ||
53 | file://systemd-pam-fix-getty-unit.patch \ | ||
54 | " | ||
55 | LDFLAGS_append_libc-uclibc = " -lrt" | ||
56 | |||
57 | GTKDOC_DOCDIR = "${S}/docs/" | ||
58 | |||
59 | PACKAGECONFIG ??= "xz" | ||
60 | PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl" | ||
61 | # Sign the journal for anti-tampering | ||
62 | PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" | ||
63 | # regardless of PACKAGECONFIG, libgcrypt is always required to expand | ||
64 | # the AM_PATH_LIBGCRYPT autoconf macro | ||
65 | DEPENDS += "libgcrypt" | ||
66 | # Compress the journal | ||
67 | PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz" | ||
68 | PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup" | ||
69 | PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd" | ||
70 | PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils" | ||
71 | PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" | ||
72 | PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd" | ||
73 | PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn" | ||
74 | PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit" | ||
75 | PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" | ||
76 | |||
77 | CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill" | ||
78 | |||
79 | # Helper variables to clarify locations. This mirrors the logic in systemd's | ||
80 | # build system. | ||
81 | rootprefix ?= "${base_prefix}" | ||
82 | rootlibdir ?= "${base_libdir}" | ||
83 | rootlibexecdir = "${rootprefix}/lib" | ||
84 | |||
85 | # The gtk+ tools should get built as a separate recipe e.g. systemd-tools | ||
86 | EXTRA_OECONF = " --with-rootprefix=${rootprefix} \ | ||
87 | --with-rootlibdir=${rootlibdir} \ | ||
88 | --with-roothomedir=${ROOT_HOME} \ | ||
89 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \ | ||
90 | --disable-coredump \ | ||
91 | --disable-introspection \ | ||
92 | --disable-kdbus \ | ||
93 | --enable-split-usr \ | ||
94 | --without-python \ | ||
95 | --with-sysvrcnd-path=${sysconfdir} \ | ||
96 | " | ||
97 | # uclibc does not have NSS | ||
98 | EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname " | ||
99 | |||
100 | do_configure_prepend() { | ||
101 | export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}" | ||
102 | export NM="${HOST_PREFIX}gcc-nm" | ||
103 | export AR="${HOST_PREFIX}gcc-ar" | ||
104 | export RANLIB="${HOST_PREFIX}gcc-ranlib" | ||
105 | export KMOD="${base_bindir}/kmod" | ||
106 | if [ -d ${S}/units.pre_sed ] ; then | ||
107 | cp -r ${S}/units.pre_sed ${S}/units | ||
108 | else | ||
109 | cp -r ${S}/units ${S}/units.pre_sed | ||
110 | fi | ||
111 | sed -i '/ln --relative --help/d' ${S}/configure.ac | ||
112 | sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am | ||
113 | sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am | ||
114 | } | ||
115 | |||
116 | do_install() { | ||
117 | autotools_do_install | ||
118 | install -d ${D}/${base_sbindir} | ||
119 | # Provided by a separate recipe | ||
120 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | ||
121 | |||
122 | # Provide support for initramfs | ||
123 | [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init | ||
124 | [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd | ||
125 | |||
126 | # Create machine-id | ||
127 | # 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 | ||
128 | touch ${D}${sysconfdir}/machine-id | ||
129 | |||
130 | install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ | ||
131 | |||
132 | install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ | ||
133 | |||
134 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
135 | install -d ${D}${sysconfdir}/init.d | ||
136 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd | ||
137 | sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd | ||
138 | fi | ||
139 | |||
140 | # Delete journal README, as log can be symlinked inside volatile. | ||
141 | rm -f ${D}/${localstatedir}/log/README | ||
142 | |||
143 | # Create symlinks for systemd-update-utmp-runlevel.service | ||
144 | install -d ${D}${systemd_unitdir}/system/graphical.target.wants | ||
145 | install -d ${D}${systemd_unitdir}/system/multi-user.target.wants | ||
146 | install -d ${D}${systemd_unitdir}/system/poweroff.target.wants | ||
147 | install -d ${D}${systemd_unitdir}/system/reboot.target.wants | ||
148 | install -d ${D}${systemd_unitdir}/system/rescue.target.wants | ||
149 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service | ||
150 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service | ||
151 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service | ||
152 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service | ||
153 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service | ||
154 | |||
155 | # Enable journal to forward message to syslog daemon | ||
156 | sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf | ||
157 | # its needed in 216 upstream has fixed it with 919699ec301ea507edce4a619141ed22e789ac0d | ||
158 | # don't order journal flushing afte remote-fs.target | ||
159 | sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service | ||
160 | # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it | ||
161 | # for existence else it fails | ||
162 | ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)} | ||
163 | } | ||
164 | |||
165 | do_install_ptest () { | ||
166 | install -d ${D}${PTEST_PATH}/test | ||
167 | cp -rf ${S}/test/* ${D}${PTEST_PATH}/test | ||
168 | install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/ | ||
169 | install -d ${D}${PTEST_PATH}/build-aux | ||
170 | cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ | ||
171 | cp -rf ${B}/rules ${D}${PTEST_PATH}/ | ||
172 | # This directory needs to be there for udev-test.pl to work. | ||
173 | install -d ${D}${libdir}/udev/rules.d | ||
174 | cp ${B}/Makefile ${D}${PTEST_PATH}/ | ||
175 | cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test | ||
176 | sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl | ||
177 | sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile | ||
178 | sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile | ||
179 | } | ||
180 | |||
181 | python populate_packages_prepend (){ | ||
182 | systemdlibdir = d.getVar("rootlibdir", True) | ||
183 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | ||
184 | } | ||
185 | PACKAGES_DYNAMIC += "^lib(udev|systemd).*" | ||
186 | |||
187 | PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \ | ||
188 | ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh libgudev" | ||
189 | |||
190 | SYSTEMD_PACKAGES = "${PN}-binfmt" | ||
191 | SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" | ||
192 | |||
193 | USERADD_PACKAGES = "${PN}" | ||
194 | USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync" | ||
195 | GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal" | ||
196 | |||
197 | FILES_${PN}-analyze = "${bindir}/systemd-analyze" | ||
198 | |||
199 | FILES_${PN}-initramfs = "/init" | ||
200 | RDEPENDS_${PN}-initramfs = "${PN}" | ||
201 | |||
202 | FILES_libgudev = "${libdir}/libgudev*${SOLIBS}" | ||
203 | |||
204 | RDEPENDS_${PN}-ptest += "perl python bash" | ||
205 | FILES_${PN}-ptest += "${libdir}/udev/rules.d" | ||
206 | |||
207 | FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug" | ||
208 | |||
209 | FILES_${PN}-gui = "${bindir}/systemadm" | ||
210 | |||
211 | FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ | ||
212 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ | ||
213 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" | ||
214 | |||
215 | RDEPENDS_${PN}-kernel-install += "bash" | ||
216 | FILES_${PN}-kernel-install = "${bindir}/kernel-install \ | ||
217 | ${sysconfdir}/kernel/ \ | ||
218 | ${exec_prefix}/lib/kernel \ | ||
219 | " | ||
220 | FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ | ||
221 | " | ||
222 | |||
223 | FILES_${PN}-zsh = "${datadir}/zsh/site-functions" | ||
224 | |||
225 | FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ | ||
226 | ${exec_prefix}/lib/binfmt.d \ | ||
227 | ${rootlibexecdir}/systemd/systemd-binfmt \ | ||
228 | ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \ | ||
229 | ${systemd_unitdir}/system/systemd-binfmt.service" | ||
230 | RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" | ||
231 | |||
232 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" | ||
233 | |||
234 | CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ | ||
235 | ${sysconfdir}/systemd/logind.conf \ | ||
236 | ${sysconfdir}/systemd/system.conf \ | ||
237 | ${sysconfdir}/systemd/user.conf" | ||
238 | |||
239 | FILES_${PN} = " ${base_bindir}/* \ | ||
240 | ${datadir}/bash-completion \ | ||
241 | ${datadir}/dbus-1/services \ | ||
242 | ${datadir}/dbus-1/system-services \ | ||
243 | ${datadir}/polkit-1 \ | ||
244 | ${datadir}/${BPN} \ | ||
245 | ${datadir}/factory \ | ||
246 | ${sysconfdir}/bash_completion.d/ \ | ||
247 | ${sysconfdir}/dbus-1/ \ | ||
248 | ${sysconfdir}/machine-id \ | ||
249 | ${sysconfdir}/modules-load.d/ \ | ||
250 | ${sysconfdir}/sysctl.d/ \ | ||
251 | ${sysconfdir}/systemd/ \ | ||
252 | ${sysconfdir}/tmpfiles.d/ \ | ||
253 | ${sysconfdir}/xdg/ \ | ||
254 | ${sysconfdir}/init.d/README \ | ||
255 | ${rootlibexecdir}/systemd/* \ | ||
256 | ${systemd_unitdir}/* \ | ||
257 | ${base_libdir}/security/*.so \ | ||
258 | ${libdir}/libnss_* \ | ||
259 | /cgroup \ | ||
260 | ${bindir}/systemd* \ | ||
261 | ${bindir}/busctl \ | ||
262 | ${bindir}/localectl \ | ||
263 | ${bindir}/hostnamectl \ | ||
264 | ${bindir}/timedatectl \ | ||
265 | ${bindir}/bootctl \ | ||
266 | ${bindir}/kernel-install \ | ||
267 | ${exec_prefix}/lib/tmpfiles.d/*.conf \ | ||
268 | ${exec_prefix}/lib/systemd \ | ||
269 | ${exec_prefix}/lib/modules-load.d \ | ||
270 | ${exec_prefix}/lib/sysctl.d \ | ||
271 | ${exec_prefix}/lib/sysusers.d \ | ||
272 | ${localstatedir} \ | ||
273 | /lib/udev/rules.d/70-uaccess.rules \ | ||
274 | /lib/udev/rules.d/71-seat.rules \ | ||
275 | /lib/udev/rules.d/73-seat-late.rules \ | ||
276 | /lib/udev/rules.d/99-systemd.rules \ | ||
277 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d', '', d)} \ | ||
278 | " | ||
279 | |||
280 | FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" | ||
281 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" | ||
282 | |||
283 | RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})" | ||
284 | RDEPENDS_${PN} += "volatile-binds" | ||
285 | |||
286 | RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\ | ||
287 | util-linux-agetty \ | ||
288 | util-linux-fsck e2fsprogs-e2fsck \ | ||
289 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \ | ||
290 | " | ||
291 | |||
292 | PACKAGES =+ "udev-dbg udev udev-hwdb" | ||
293 | |||
294 | FILES_udev-dbg += "/lib/udev/.debug" | ||
295 | |||
296 | RPROVIDES_udev = "hotplug" | ||
297 | |||
298 | RDEPENDS_udev-hwdb += "udev" | ||
299 | |||
300 | FILES_udev += "${base_sbindir}/udevd \ | ||
301 | ${rootlibexecdir}/systemd/systemd-udevd \ | ||
302 | ${rootlibexecdir}/udev/accelerometer \ | ||
303 | ${rootlibexecdir}/udev/ata_id \ | ||
304 | ${rootlibexecdir}/udev/cdrom_id \ | ||
305 | ${rootlibexecdir}/udev/collect \ | ||
306 | ${rootlibexecdir}/udev/findkeyboards \ | ||
307 | ${rootlibexecdir}/udev/keyboard-force-release.sh \ | ||
308 | ${rootlibexecdir}/udev/keymap \ | ||
309 | ${rootlibexecdir}/udev/mtd_probe \ | ||
310 | ${rootlibexecdir}/udev/scsi_id \ | ||
311 | ${rootlibexecdir}/udev/v4l_id \ | ||
312 | ${rootlibexecdir}/udev/keymaps \ | ||
313 | ${rootlibexecdir}/udev/rules.d/*.rules \ | ||
314 | ${sysconfdir}/udev \ | ||
315 | ${sysconfdir}/init.d/systemd-udevd \ | ||
316 | ${systemd_unitdir}/system/*udev* \ | ||
317 | ${systemd_unitdir}/system/*.wants/*udev* \ | ||
318 | ${base_bindir}/udevadm \ | ||
319 | ${datadir}/bash-completion/completions/udevadm \ | ||
320 | " | ||
321 | |||
322 | FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d" | ||
323 | |||
324 | INITSCRIPT_PACKAGES = "udev" | ||
325 | INITSCRIPT_NAME_udev = "systemd-udevd" | ||
326 | INITSCRIPT_PARAMS_udev = "start 03 S ." | ||
327 | |||
328 | python __anonymous() { | ||
329 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
330 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
331 | } | ||
332 | |||
333 | # TODO: | ||
334 | # u-a for runlevel and telinit | ||
335 | |||
336 | ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel" | ||
337 | |||
338 | ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd" | ||
339 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" | ||
340 | ALTERNATIVE_PRIORITY[init] ?= "300" | ||
341 | |||
342 | ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" | ||
343 | ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" | ||
344 | ALTERNATIVE_PRIORITY[halt] ?= "300" | ||
345 | |||
346 | ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" | ||
347 | ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" | ||
348 | ALTERNATIVE_PRIORITY[reboot] ?= "300" | ||
349 | |||
350 | ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" | ||
351 | ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" | ||
352 | ALTERNATIVE_PRIORITY[shutdown] ?= "300" | ||
353 | |||
354 | ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" | ||
355 | ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" | ||
356 | ALTERNATIVE_PRIORITY[poweroff] ?= "300" | ||
357 | |||
358 | ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" | ||
359 | ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" | ||
360 | ALTERNATIVE_PRIORITY[runlevel] ?= "300" | ||
361 | |||
362 | pkg_postinst_udev-hwdb () { | ||
363 | if test -n "$D"; then | ||
364 | ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ | ||
365 | --root $D | ||
366 | else | ||
367 | udevadm hwdb --update | ||
368 | fi | ||
369 | } | ||
370 | |||
371 | pkg_prerm_udev-hwdb () { | ||
372 | if test -n "$D"; then | ||
373 | exit 1 | ||
374 | fi | ||
375 | |||
376 | rm -f ${sysconfdir}/udev/hwdb.bin | ||
377 | } | ||
378 | |||
379 | # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so | ||
380 | # that we don't build both udev and systemd in world builds. | ||
381 | python () { | ||
382 | if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): | ||
383 | raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES") | ||
384 | } | ||