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