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