summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Durand <baptiste.durand@open.eurogiciel.org>2015-05-06 10:00:44 +0200
committerBaptiste DURAND <baptiste.durand@gmail.com>2015-05-06 14:51:07 +0200
commit59d584df8284521aad80fc52969af1e0791e155a (patch)
treeef97984d7eda02ccfd2eec8ae0982b9d662224b2
parent8c51b0387d28fd5a60ae5f6ad7fbf9fcb5019d8b (diff)
downloadmeta-tizen-59d584df8284521aad80fc52969af1e0791e155a.tar.gz
meta-tizen-59d584df8284521aad80fc52969af1e0791e155a.tar.bz2
meta-tizen-59d584df8284521aad80fc52969af1e0791e155a.zip
systemd : Sync systemd recipes with the openembedded ones.
This permits to provide udedv feature correctly Signed-off-by: Baptiste Durand <baptiste.durand@open.eurogiciel.org>
-rw-r--r--meta-tizen-common-base/recipes-core/systemd/systemd-extraconf.inc70
-rw-r--r--meta-tizen-common-base/recipes-core/systemd/systemd.inc608
-rw-r--r--meta-tizen-common-base/recipes-core/systemd/systemd_git.bb370
3 files changed, 365 insertions, 683 deletions
diff --git a/meta-tizen-common-base/recipes-core/systemd/systemd-extraconf.inc b/meta-tizen-common-base/recipes-core/systemd/systemd-extraconf.inc
deleted file mode 100644
index e7eab4fd..00000000
--- a/meta-tizen-common-base/recipes-core/systemd/systemd-extraconf.inc
+++ /dev/null
@@ -1,70 +0,0 @@
-SRC_URI += "file://systemd-user"
-
-inherit useradd
-
-RDEPENDS_${PN}_remove_class-native = "gawk-native glibc-native"
-DEPENDS_remove_class-native = "usbutils-native"
-DEPENDS_remove_class-native = "pciutils-native"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} += "--system -g 11 cdrom;"
-GROUPADD_PARAM_${PN} += "--system -g 33 tape;"
-GROUPADD_PARAM_${PN} += "--system -g 18 dialout;"
-GROUPADD_PARAM_${PN} += "--system -g 19 floppy"
-
-EXTRA_OECONF += "--disable-manpages"
-EXTRA_OECONF += "--without-python"
-EXTRA_OECONF += "--disable-libcurl"
-
-GTKDOC_DOCDIR = "${S}/docs/"
-
-do_configure_prepend() {
- rm -f ${S}/docs/gtk-doc.make
- echo 'EXTRA_DIST =' > ${S}/docs/gtk-doc.make
-
- sed -i 's!@MKDIR_P@!/bin/mkdir -p!g' ${S}/units/kmod-static-nodes.service.in
- sed -i 's!@KMOD@!/bin/kmod!g' ${S}/units/kmod-static-nodes.service.in
- sed -i 's!@KILL@!/bin/kill!g' ${S}/units/user/systemd-exit.service.in
-}
-
-do_install_append() {
- rm -fr ${D}${prefix}/share/factory
- rm -fr ${D}/lib/systemd/network/80-container-ve.network
- rm -fr ${D}/lib/systemd/network/80-container-host0.network
- rm -fr ${D}/lib/systemd/system-preset/90-systemd.preset
-
- rm -fr ${D}${sysconfdir}/hostname
- rm -fr ${D}${sysconfdir}/timezone
-
- install -m 0644 ${WORKDIR}/systemd-user ${D}${sysconfdir}/pam.d
-}
-
-pkg_preinst_${PN}() {
- #!/bin/sh -e
-
- # Rename configuration files that changed their names
- mv -n $D${sysconfdir}/systemd/systemd-logind.conf $D${sysconfdir}/systemd/logind.conf >/dev/null 2>&1 || :
- mv -n $D${sysconfdir}/systemd/systemd-journald.conf $D${sysconfdir}/systemd/journald.conf >/dev/null 2>&1 || :
-}
-
-
-
-systemd-dbg_files += "/lib/systemd/.debug"
-systemd-dbg_files += "/lib/security/.debug"
-systemd-dbg_files += "/lib/systemd/system-generators/.debug"
-systemd-dbg_files += "/lib/udev/.debug"
-
-FILES_${PN}-dbg += "${systemd-dbg_files}"
-
-
-FILES_${PN}-locale-fr += "${prefix}/lib/systemd/catalog/systemd.fr.catalog"
-FILES_${PN}-locale-it += "${prefix}/lib/systemd/catalog/systemd.it.catalog"
-FILES_${PN}-locale-ru += "${prefix}/lib/systemd/catalog/systemd.ru.catalog"
-FILES_${PN}-locale += "${prefix}/lib/systemd/catalog/systemd.catalog"
-
-
-systemd_files += "${prefix}/lib/systemd/network"
-systemd_files += "${sysconfdir}/machine-id"
-systemd_files += "${sysconfdir}/vconsole.conf"
-systemd_files += "${sysconfdir}/locale.conf"
-systemd_files += "${sysconfdir}/machine-info"
diff --git a/meta-tizen-common-base/recipes-core/systemd/systemd.inc b/meta-tizen-common-base/recipes-core/systemd/systemd.inc
deleted file mode 100644
index 5ddd22d5..00000000
--- a/meta-tizen-common-base/recipes-core/systemd/systemd.inc
+++ /dev/null
@@ -1,608 +0,0 @@
-DESCRIPTION = "A System and Service Manager"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
-SECTION = "Base/Startup"
-LICENSE = "LGPL-2.0+ and MIT and GPL-2.0+"
-PV = "216"
-
-SRC_URI = ""
-
-S = "${WORKDIR}/git"
-
-inherit manifest autotools-brokensep
-
-BBCLASSEXTEND = ""
-PROVIDES = ""
-
-#PROVIDES by libsystemd
-PROVIDES += "libsystemd"
-
-
-#PROVIDES by systemd
-# the PROVIDES rules is ignore "SysVinit = 2.86-24"
-PROVIDES += "SysVinit"
-RPROVIDES_systemd += "SysVinit"
-# the PROVIDES rules is ignore "sysvinit = 2.86-24"
-PROVIDES += "sysvinit"
-RPROVIDES_systemd += "sysvinit"
-# the PROVIDES rules is ignore "/bin/systemctl "
-PROVIDES += "/bin/systemctl"
-RPROVIDES_systemd += "/bin/systemctl"
-# the PROVIDES rules is ignore "/sbin/shutdown "
-PROVIDES += "/sbin/shutdown"
-RPROVIDES_systemd += "/sbin/shutdown"
-# the PROVIDES rules is ignore "udev = 216"
-PROVIDES += "udev"
-RPROVIDES_systemd += "udev"
-
-
-#PROVIDES by libgudev-dev
-PROVIDES += "libgudev-dev"
-
-
-#PROVIDES by systemd-dev
-PROVIDES += "systemd-dev"
-# the PROVIDES rules is ignore "libudev-dev = 216"
-PROVIDES += "libudev-dev"
-RPROVIDES_systemd-dev += "libudev-dev"
-
-
-#PROVIDES by libgudev
-PROVIDES += "libgudev"
-
-
-#PROVIDES by systemd-docs
-PROVIDES += "systemd-docs "
-
-
-#PROVIDES by systemd-analyze
-PROVIDES += "systemd-analyze"
-
-
-RDEPENDS = ""
-#RDEPENDS of systemd (${PN})
-RDEPENDS_${PN} += "hwdata"
-RDEPENDS_${PN} += "dbus"
-RDEPENDS_${PN} += "gawk"
-RDEPENDS_${PN} += "coreutils"
-RDEPENDS_${PN} += "shadow"
-RDEPENDS_${PN} += "glibc"
-
-#RDEPENDS of libgudev-dev (libgudev-dev)
-RDEPENDS_libgudev-dev += "libgudev"
-
-#RDEPENDS of systemd-dev (${PN}-dev)
-RDEPENDS_${PN}-dev += "libsystemd"
-RDEPENDS_${PN}-dev += "systemd"
-
-#RDEPENDS of libgudev (libgudev)
-RDEPENDS_libgudev += "systemd"
-
-#RDEPENDS of systemd-analyze (${PN}-analyze)
-RDEPENDS_${PN}-analyze += "systemd"
-
-
-DEPENDS = ""
-#DEPENDS of systemd
-DEPENDS += "kmod"
-DEPENDS_append_class-native = " intltool-native"
-DEPENDS_append_class-target = " intltool-native"
-DEPENDS += "gperf"
-DEPENDS += "hwdata"
-DEPENDS += "dbus"
-DEPENDS += "usbutils"
-inherit pkgconfig
-DEPENDS += "acl"
-DEPENDS += "docbook-xsl-stylesheets"
-DEPENDS += "glib-2.0"
-DEPENDS += "libxslt"
-DEPENDS += "pciutils"
-DEPENDS += "libcap"
-DEPENDS += "util-linux"
-DEPENDS += "libgcrypt"
-DEPENDS += "xz"
-DEPENDS += "libpam"
-
-do_prep() {
- cd ${S}
- chmod -Rf a+rX,u+w,g-w,o-w ${S}
- #setup -q
- cp ${S}/packaging/systemd.manifest .
-
-
-}
-do_patch_append() {
- bb.build.exec_func('do_prep', d)
-}
-
-do_configure() {
-}
-
-do_compile() {
- cd ${S}
- LANG=C
- export LANG
- unset DISPLAY
- LD_AS_NEEDED=1; export LD_AS_NEEDED ;
-
- if which gtkdocize >/dev/null 2>/dev/null; then
- gtkdocize --docdir docs/ --flavour no-tmpl
- gtkdocargs=--enable-gtk-doc
- else
- echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
- rm -f docs/gtk-doc.make
- echo 'EXTRA_DIST =' > docs/gtk-doc.make
- fi
-
- intltoolize --force --automake
-
- autotools_do_configure
-
- oe_runmake ${PARALLEL_MAKE}
-
-
-
-}
-EXTRA_OECONF += " --disable-kdbus --enable-compat-libs --enable-bootchart --disable-sysusers --disable-firstboot --disable-timesyncd --disable-resolved --disable-networkd --libexecdir=${prefix}/lib --docdir=${prefix}/share/doc/packages/systemd --disable-static --disable-libcurl --with-sysvinit-path= --with-sysvrcnd-path= --with-smack-run-label=System --with-rootprefix=/ --with-rootlibdir=/lib cc_cv_CFLAGS__flto=no"
-
-do_install() {
- export RPM_BUILD_ROOT=${D}
- cd ${S}
- LANG=C
- export LANG
- unset DISPLAY
- rm -rf ${D}
- mkdir -p ${D}
-
-
- oe_runmake \
- DESTDIR=${D} \
- INSTALL_ROOT=${D} \
- BINDIR=${prefix}/bin \
- install
- rm -f ${D}${infodir}/dir
- find ${D} -regex ".*\.la$" | xargs rm -f --
- find ${D} -regex ".*\.a$" | xargs rm -f --
-
- #find_lang systemd
- cat <<EOF >> systemd.lang
- %lang(fr) ${prefix}/lib/systemd/catalog/systemd.fr.catalog
- %lang(it) ${prefix}/lib/systemd/catalog/systemd.it.catalog
- %lang(ru) ${prefix}/lib/systemd/catalog/systemd.ru.catalog
-EOF
-
- # udev links
- mkdir -p ${D}${prefix}/sbin
- ln -sf ../bin/udevadm ${D}${prefix}/sbin/udevadm
- mkdir -p ${D}${prefix}/lib/firmware/updates
-
- # Create SysV compatibility symlinks. systemctl/systemd are smart
- # enough to detect in which way they are called.
- ln -sf /lib/systemd/systemd ${D}${prefix}/sbin/init
- ln -sf /lib/systemd/systemd ${D}${prefix}/bin/systemd
- ln -sf ../bin/systemctl ${D}${prefix}/sbin/reboot
- ln -sf ../bin/systemctl ${D}${prefix}/sbin/halt
- ln -sf ../bin/systemctl ${D}${prefix}/sbin/poweroff
- ln -sf ../bin/systemctl ${D}${prefix}/sbin/shutdown
- ln -sf ../bin/systemctl ${D}${prefix}/sbin/telinit
- ln -sf ../bin/systemctl ${D}${prefix}/sbin/runlevel
-
- # legacy links
- ln -sf loginctl ${D}${prefix}/bin/systemd-loginctl
-
- # We create all wants links manually at installation time to make sure
- # they are not owned and hence overriden by rpm after the used deleted
- # them.
- rm -rf ${D}${sysconfdir}/systemd/system/*.target.wants
-
- # Make sure the ghost-ing below works
- touch ${D}${sysconfdir}/systemd/system/runlevel2.target
- touch ${D}${sysconfdir}/systemd/system/runlevel3.target
- touch ${D}${sysconfdir}/systemd/system/runlevel4.target
- touch ${D}${sysconfdir}/systemd/system/runlevel5.target
-
- # Make sure these directories are properly owned
- mkdir -p ${D}${systemd_unitdir}/system/basic.target.wants
- mkdir -p ${D}${systemd_unitdir}/system/default.target.wants
- mkdir -p ${D}${systemd_unitdir}/system/dbus.target.wants
- mkdir -p ${D}${systemd_unitdir}/system/syslog.target.wants
-
- # Make sure the user generators dir exists too
- mkdir -p ${D}/lib/systemd/system-generators
- mkdir -p ${D}${prefix}/lib/systemd/user-generators
-
- # Create new-style configuration files so that we can ghost-own them
- touch ${D}${sysconfdir}/hostname
- touch ${D}${sysconfdir}/vconsole.conf
- touch ${D}${sysconfdir}/locale.conf
- touch ${D}${sysconfdir}/machine-id
- touch ${D}${sysconfdir}/machine-info
- touch ${D}${sysconfdir}/timezone
-
- mkdir -p ${D}/lib/systemd/system-preset/
- mkdir -p ${D}/lib/systemd/user-preset/
-
- # Make sure the shutdown/sleep drop-in dirs exist
- mkdir -p ${D}/lib/systemd/system-shutdown/
- mkdir -p ${D}/lib/systemd/system-sleep/
-
- # Make sure the NTP units dir exists
- mkdir -p ${D}${prefix}/lib/systemd/ntp-units.d/
-
- # Install modprobe fragment
- mkdir -p ${D}${sysconfdir}/modprobe.d/
-
- # Fix the dangling /var/lock -> /run/lock symlink
- install -Dm644 tmpfiles.d/legacy.conf ${D}${prefix}/lib/tmpfiles.d/legacy.conf
-
- install -m644 ${S}/packaging/pamconsole-tmp.conf ${D}${prefix}/lib/tmpfiles.d/
-
- rm -rf ${D}${systemd_unitdir}/system/default.target
- install -m 755 -d ${D}${systemd_unitdir}/system
- install -m 644 ${S}/packaging/default.target ${D}${systemd_unitdir}/system/
-
- rm -rf ${D}${prefix}/share/doc/packages/systemd
-
- # Disable some useless services in Tizen
- rm -rf ${D}${prefix}/lib/systemd/user/sysinit.target.wants/dev-hugepages.mount
- rm -rf ${D}${prefix}/lib/systemd/user/sysinit.target.wants/sys-fs-fuse-connections.mount
- rm -rf ${D}${prefix}/lib/systemd/user/sysinit.target.wants/systemd-binfmt.service
- rm -rf ${D}${prefix}/lib/systemd/user/sysinit.target.wants/systemd-modules-load.service
- rm -rf ${D}${prefix}/lib/systemd/user/sysinit.target.wants/systemd-ask-password-console.path
- rm -rf ${D}${prefix}/lib/systemd/user/multi-user.target.wants/systemd-ask-password-wall.path
-
- # Move macros to the proper location for Tizen
- mkdir -p ${D}${sysconfdir}/rpm
- install -m644 src/core/macros.systemd ${D}${sysconfdir}/rpm/macros.systemd
-
- rm -fr ${D}${prefix}/lib/rpm
- rm -fr ${D}${sysconfdir}/kernel
- rm -fr ${D}${sysconfdir}/modprobe.d
- rm -fr ${D}${localstatedir}
-
- # Exclude ELF binaries
- rm -f ${D}/lib/systemd/system-generators/systemd-debug-generator
- rm -f ${D}${prefix}/lib/systemd/system-generators/systemd-hibernate-resume-generator
-
- # end of install
-
-
-}
-
-pkg_preinst_${PN}() {
- #!/bin/sh -e
-
- getent group cdrom >/dev/null 2>&1 || groupadd -r -g 11 cdrom >/dev/null 2>&1 || :
- getent group tape >/dev/null 2>&1 || groupadd -r -g 33 tape >/dev/null 2>&1 || :
- getent group dialout >/dev/null 2>&1 || groupadd -r -g 18 dialout >/dev/null 2>&1 || :
- getent group floppy >/dev/null 2>&1 || groupadd -r -g 19 floppy >/dev/null 2>&1 || :
- systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service >/dev/null 2>&1 || :
- # Rename configuration files that changed their names
- mv -n $D${sysconfdir}/systemd/systemd-logind.conf $D${sysconfdir}/systemd/logind.conf >/dev/null 2>&1 || :
- mv -n $D${sysconfdir}/systemd/systemd-journald.conf $D${sysconfdir}/systemd/journald.conf >/dev/null 2>&1 || :
-
-}
-
-pkg_postinst_${PN}() {
- #!/bin/sh -e
-
- systemd-machine-id-setup > /dev/null 2>&1 || :
- systemd-random-seed save > /dev/null 2>&1 || :
- systemctl daemon-reexec > /dev/null 2>&1 || :
- systemctl start systemd-udevd.service >/dev/null 2>&1 || :
-
-}
-
-pkg_postinst_libgudev() {
- #!/bin/sh -e
-
- [ "x$D" == "x" ] && ldconfig
-}
-
-pkg_postinst_libsystemd() {
- #!/bin/sh -e
-
- [ "x$D" == "x" ] && ldconfig
-}
-
-pkg_prerm_${PN}() {
- #!/bin/sh -e
-
- if [ $1 -eq 0 ] ; then
- systemctl disable \
- getty@.service \
- remote-fs.target \
- systemd-readahead-replay.service \
- systemd-readahead-collect.service >/dev/null 2>&1 || :
- fi
-
-}
-
-pkg_postrm_libgudev() {
- #!/bin/sh -e
-
- [ "x$D" == "x" ] && ldconfig
-}
-
-pkg_postrm_libsystemd() {
- #!/bin/sh -e
-
- [ "x$D" == "x" ] && ldconfig
-}
-
-pkg_postrm_${PN}() {
- #!/bin/sh -e
-
- if [ $1 -ge 1 ] ; then
- systemctl daemon-reload > /dev/null 2>&1 || :
- systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
- fi
-
-}
-
-PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
-PACKAGES += " libsystemd "
-PACKAGES += " systemd "
-PACKAGES += " libgudev-dev "
-PACKAGES += " systemd-dev "
-PACKAGES += " systemd-docs "
-PACKAGES += " libgudev "
-PACKAGES += " systemd-analyze "
-
-libsystemd_files = ""
-libsystemd_files += "/lib/security/pam_systemd.so"
-libsystemd_files += "/lib/libsystemd.so.*"
-libsystemd_files += "/lib/libudev.so.*"
-libsystemd_files += "/lib/libsystemd-daemon.so.*"
-libsystemd_files += "/lib/libsystemd-id128.so.*"
-libsystemd_files += "/lib/libsystemd-journal.so.*"
-libsystemd_files += "/lib/libsystemd-login.so.*"
-libsystemd_files += "${prefix}/lib/libnss_myhostname.so.2"
-libsystemd_files += "${prefix}/lib/libnss_mymachines.so.2"
-MANIFESTFILES_lib${PN} = "systemd.manifest"
-
-systemd_files = ""
-systemd_files += "${sysconfdir}/pam.d/systemd-user"
-systemd_files += "${prefix}/bin/bootctl"
-systemd_files += "${prefix}/bin/busctl"
-systemd_files += "${prefix}/bin/kernel-install"
-systemd_files += "/bin/machinectl"
-systemd_files += "${prefix}/bin/systemd-run"
-systemd_files += "${prefix}/lib/kernel"
-systemd_files += "${prefix}/lib/kernel/install.d"
-systemd_files += "${prefix}/lib/kernel/install.d/50-depmod.install"
-systemd_files += "${prefix}/lib/kernel/install.d/90-loaderentry.install"
-systemd_files += "${prefix}/bin/hostnamectl"
-systemd_files += "${prefix}/bin/localectl"
-systemd_files += "${prefix}/bin/coredumpctl"
-systemd_files += "${prefix}/bin/timedatectl"
-systemd_files += "${sysconfdir}/systemd"
-systemd_files += "${sysconfdir}/systemd/system"
-systemd_files += "${sysconfdir}/systemd/user"
-systemd_files += "${sysconfdir}/tmpfiles.d"
-systemd_files += "${sysconfdir}/sysctl.d"
-systemd_files += "${sysconfdir}/modules-load.d"
-systemd_files += "${sysconfdir}/binfmt.d"
-systemd_files += "${prefix}/share/bash-completion/*"
-systemd_files += "${prefix}/share/zsh/site-functions"
-systemd_files += "${prefix}/share/zsh/site-functions/*"
-systemd_files += "${sysconfdir}/udev"
-systemd_files += "${sysconfdir}/udev/rules.d"
-systemd_files += "/lib/systemd"
-systemd_files += "${systemd_unitdir}/system"
-systemd_files += "/lib/systemd/system-generators"
-systemd_files += "${prefix}/lib/systemd/user-generators"
-systemd_files += "/lib/systemd/system-preset"
-systemd_files += "/lib/systemd/user-preset"
-systemd_files += "/lib/systemd/system-shutdown"
-systemd_files += "/lib/systemd/system-sleep"
-systemd_files += "${prefix}/lib/tmpfiles.d"
-systemd_files += "${prefix}/lib/sysctl.d"
-systemd_files += "${prefix}/lib/modules-load.d"
-systemd_files += "${prefix}/lib/binfmt.d"
-systemd_files += "${prefix}/lib/firmware"
-systemd_files += "${prefix}/lib/firmware/updates"
-systemd_files += "${prefix}/share/systemd"
-systemd_files += "${prefix}/lib/systemd/ntp-units.d"
-systemd_files += "${sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf"
-systemd_files += "${sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf"
-systemd_files += "${sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf"
-systemd_files += "${sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf"
-systemd_files += "${sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf"
-systemd_files += "${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf"
-systemd_files += "${sysconfdir}/systemd/bootchart.conf"
-systemd_files += "${sysconfdir}/systemd/coredump.conf"
-systemd_files += "${sysconfdir}/systemd/system.conf"
-systemd_files += "${sysconfdir}/systemd/user.conf"
-systemd_files += "${sysconfdir}/systemd/logind.conf"
-systemd_files += "${sysconfdir}/systemd/journald.conf"
-systemd_files += "${sysconfdir}/udev/udev.conf"
-systemd_files += "${sysconfdir}/xdg/systemd"
-systemd_files += "${prefix}/bin/systemd"
-systemd_files += "/bin/systemctl"
-systemd_files += "/bin/systemd-notify"
-systemd_files += "/bin/systemd-ask-password"
-systemd_files += "/bin/systemd-tty-ask-password-agent"
-systemd_files += "/bin/systemd-machine-id-setup"
-systemd_files += "/bin/loginctl"
-systemd_files += "${prefix}/bin/systemd-loginctl"
-systemd_files += "/bin/journalctl"
-systemd_files += "/bin/systemd-tmpfiles"
-systemd_files += "${prefix}/bin/systemd-nspawn"
-systemd_files += "${prefix}/bin/systemd-stdio-bridge"
-systemd_files += "${prefix}/bin/systemd-cat"
-systemd_files += "${prefix}/bin/systemd-cgls"
-systemd_files += "${prefix}/bin/systemd-cgtop"
-systemd_files += "${prefix}/bin/systemd-delta"
-systemd_files += "${prefix}/bin/systemd-detect-virt"
-systemd_files += "/bin/systemd-inhibit"
-systemd_files += "/bin/udevadm"
-systemd_files += "/bin/systemd-escape"
-systemd_files += "${prefix}/bin/systemd-path"
-systemd_files += "${prefix}/lib/sysctl.d/*.conf"
-systemd_files += "/lib/systemd/systemd"
-systemd_files += "${systemd_unitdir}/system"
-systemd_files += "${systemd_unitdir}/system/basic.target.wants"
-systemd_files += "${prefix}/lib/systemd/user"
-systemd_files += "/lib/systemd/network"
-systemd_files += "${prefix}/lib/systemd/user/basic.target"
-systemd_files += "${prefix}/lib/systemd/user/bluetooth.target"
-systemd_files += "${prefix}/lib/systemd/user/exit.target"
-systemd_files += "${prefix}/lib/systemd/user/printer.target"
-systemd_files += "${prefix}/lib/systemd/user/shutdown.target"
-systemd_files += "${prefix}/lib/systemd/user/sockets.target"
-systemd_files += "${prefix}/lib/systemd/user/sound.target"
-systemd_files += "${prefix}/lib/systemd/user/systemd-exit.service"
-systemd_files += "${prefix}/lib/systemd/user/paths.target"
-systemd_files += "${prefix}/lib/systemd/user/smartcard.target"
-systemd_files += "${prefix}/lib/systemd/user/timers.target"
-systemd_files += "${prefix}/lib/systemd/user/busnames.target"
-systemd_files += "${prefix}/lib/systemd/user/default.target"
-systemd_files += "/lib/systemd/network/99-default.link"
-systemd_files += "/lib/systemd/systemd-*"
-systemd_files += "${prefix}/lib/systemd/catalog"
-systemd_files += "${prefix}/lib/systemd/catalog/systemd.catalog"
-systemd_files += "/lib/udev"
-systemd_files += "/lib/systemd/system-generators/systemd-efi-boot-generator"
-systemd_files += "/lib/systemd/system-generators/systemd-getty-generator"
-systemd_files += "/lib/systemd/system-generators/systemd-fstab-generator"
-systemd_files += "/lib/systemd/system-generators/systemd-system-update-generator"
-systemd_files += "/lib/systemd/system-generators/systemd-gpt-auto-generator"
-systemd_files += "${prefix}/lib/tmpfiles.d/systemd.conf"
-systemd_files += "${prefix}/lib/tmpfiles.d/x11.conf"
-systemd_files += "${prefix}/lib/tmpfiles.d/tmp.conf"
-systemd_files += "${prefix}/lib/tmpfiles.d/legacy.conf"
-systemd_files += "${prefix}/lib/tmpfiles.d/pamconsole-tmp.conf"
-systemd_files += "${prefix}/lib/tmpfiles.d/systemd-nologin.conf"
-systemd_files += "${prefix}/lib/tmpfiles.d/etc.conf"
-systemd_files += "${prefix}/lib/tmpfiles.d/var.conf"
-systemd_files += "${prefix}/sbin/init"
-systemd_files += "${prefix}/sbin/reboot"
-systemd_files += "${prefix}/sbin/halt"
-systemd_files += "${prefix}/sbin/poweroff"
-systemd_files += "${prefix}/sbin/shutdown"
-systemd_files += "${prefix}/sbin/telinit"
-systemd_files += "${prefix}/sbin/runlevel"
-systemd_files += "${prefix}/sbin/udevadm"
-systemd_files += "${prefix}/share/systemd/kbd-model-map"
-systemd_files += "${prefix}/share/dbus-1/services/org.freedesktop.systemd1.service"
-systemd_files += "${prefix}/share/dbus-1/system-services/org.freedesktop.systemd1.service"
-systemd_files += "${prefix}/share/dbus-1/system-services/org.freedesktop.hostname1.service"
-systemd_files += "${prefix}/share/dbus-1/system-services/org.freedesktop.login1.service"
-systemd_files += "${prefix}/share/dbus-1/system-services/org.freedesktop.locale1.service"
-systemd_files += "${prefix}/share/dbus-1/system-services/org.freedesktop.timedate1.service"
-systemd_files += "${prefix}/share/dbus-1/system-services/org.freedesktop.machine1.service"
-systemd_files += "${prefix}/share/polkit-1"
-systemd_files += "${prefix}/share/polkit-1/actions"
-systemd_files += "${prefix}/share/polkit-1/actions/org.freedesktop.systemd1.policy"
-systemd_files += "${prefix}/share/polkit-1/actions/org.freedesktop.hostname1.policy"
-systemd_files += "${prefix}/share/polkit-1/actions/org.freedesktop.login1.policy"
-systemd_files += "${prefix}/share/polkit-1/actions/org.freedesktop.locale1.policy"
-systemd_files += "${prefix}/share/polkit-1/actions/org.freedesktop.timedate1.policy"
-CONFFILES_${PN} = ""
-CONFFILES_${PN} += "${sysconfdir}/pam.d/systemd-user"
-MANIFESTFILES_${PN} = "systemd.manifest"
-DIRFILES_${PN} = ""
-DIRFILES_${PN} += "${prefix}/lib/kernel"
-DIRFILES_${PN} += "${prefix}/lib/kernel/install.d"
-DIRFILES_${PN} += "${sysconfdir}/systemd"
-DIRFILES_${PN} += "${sysconfdir}/systemd/system"
-DIRFILES_${PN} += "${sysconfdir}/systemd/user"
-DIRFILES_${PN} += "${sysconfdir}/tmpfiles.d"
-DIRFILES_${PN} += "${sysconfdir}/sysctl.d"
-DIRFILES_${PN} += "${sysconfdir}/modules-load.d"
-DIRFILES_${PN} += "${sysconfdir}/binfmt.d"
-DIRFILES_${PN} += "${prefix}/share/zsh/site-functions"
-DIRFILES_${PN} += "${sysconfdir}/udev"
-DIRFILES_${PN} += "${sysconfdir}/udev/rules.d"
-DIRFILES_${PN} += "/lib/systemd"
-DIRFILES_${PN} += "${systemd_unitdir}/system"
-DIRFILES_${PN} += "/lib/systemd/system-generators"
-DIRFILES_${PN} += "${prefix}/lib/systemd/user-generators"
-DIRFILES_${PN} += "/lib/systemd/system-preset"
-DIRFILES_${PN} += "/lib/systemd/user-preset"
-DIRFILES_${PN} += "/lib/systemd/system-shutdown"
-DIRFILES_${PN} += "/lib/systemd/system-sleep"
-DIRFILES_${PN} += "${prefix}/lib/tmpfiles.d"
-DIRFILES_${PN} += "${prefix}/lib/sysctl.d"
-DIRFILES_${PN} += "${prefix}/lib/modules-load.d"
-DIRFILES_${PN} += "${prefix}/lib/binfmt.d"
-DIRFILES_${PN} += "${prefix}/lib/firmware"
-DIRFILES_${PN} += "${prefix}/lib/firmware/updates"
-DIRFILES_${PN} += "${prefix}/share/systemd"
-DIRFILES_${PN} += "${prefix}/lib/systemd/ntp-units.d"
-DIRFILES_${PN} += "${systemd_unitdir}/system/basic.target.wants"
-DIRFILES_${PN} += "${prefix}/lib/systemd/user"
-DIRFILES_${PN} += "/lib/systemd/network"
-DIRFILES_${PN} += "${prefix}/lib/systemd/catalog"
-DIRFILES_${PN} += "${prefix}/share/polkit-1"
-DIRFILES_${PN} += "${prefix}/share/polkit-1/actions"
-
-libgudev-dev_files = ""
-libgudev-dev_files += "${prefix}/lib/libgudev-1.0.so"
-libgudev-dev_files += "${prefix}/include/gudev-1.0"
-libgudev-dev_files += "${prefix}/include/gudev-1.0/gudev"
-libgudev-dev_files += "${prefix}/include/gudev-1.0/gudev/*.h"
-libgudev-dev_files += "${prefix}/lib/pkgconfig/gudev-1.0*"
-MANIFESTFILES_libgudev-dev = "systemd.manifest"
-DIRFILES_libgudev-dev = ""
-DIRFILES_libgudev-dev += "${prefix}/include/gudev-1.0"
-DIRFILES_libgudev-dev += "${prefix}/include/gudev-1.0/gudev"
-
-systemd-dev_files = ""
-systemd-dev_files += "${prefix}/lib/libudev.so"
-systemd-dev_files += "${prefix}/lib/libsystemd.so"
-systemd-dev_files += "${prefix}/lib/libsystemd-daemon.so"
-systemd-dev_files += "${prefix}/lib/libsystemd-id128.so"
-systemd-dev_files += "${prefix}/lib/libsystemd-journal.so"
-systemd-dev_files += "${prefix}/lib/libsystemd-login.so"
-systemd-dev_files += "${prefix}/include/systemd"
-systemd-dev_files += "${prefix}/include/systemd/_sd-common.h"
-systemd-dev_files += "${prefix}/include/systemd/sd-daemon.h"
-systemd-dev_files += "${prefix}/include/systemd/sd-id128.h"
-systemd-dev_files += "${prefix}/include/systemd/sd-journal.h"
-systemd-dev_files += "${prefix}/include/systemd/sd-login.h"
-systemd-dev_files += "${prefix}/include/systemd/sd-messages.h"
-systemd-dev_files += "${prefix}/include/libudev.h"
-systemd-dev_files += "${prefix}/lib/pkgconfig/libudev.pc"
-systemd-dev_files += "${prefix}/lib/pkgconfig/libsystemd.pc"
-systemd-dev_files += "${prefix}/lib/pkgconfig/libsystemd-daemon.pc"
-systemd-dev_files += "${prefix}/lib/pkgconfig/libsystemd-id128.pc"
-systemd-dev_files += "${prefix}/lib/pkgconfig/libsystemd-journal.pc"
-systemd-dev_files += "${prefix}/lib/pkgconfig/libsystemd-login.pc"
-systemd-dev_files += "${prefix}/share/pkgconfig/systemd.pc"
-systemd-dev_files += "${prefix}/share/pkgconfig/udev.pc"
-systemd-dev_files += "${sysconfdir}/rpm/macros.systemd"
-CONFFILES_${PN}-dev = ""
-CONFFILES_${PN}-dev += "${sysconfdir}/rpm/macros.systemd"
-MANIFESTFILES_${PN}-dev = "systemd.manifest"
-DIRFILES_${PN}-dev = ""
-DIRFILES_${PN}-dev += "${prefix}/include/systemd"
-
-systemd-docs_files = ""
-
-libgudev_files = ""
-libgudev_files += "${prefix}/lib/libgudev-1.0.so.*"
-MANIFESTFILES_libgudev = "systemd.manifest"
-
-systemd-analyze_files = ""
-systemd-analyze_files += "${prefix}/bin/systemd-analyze"
-MANIFESTFILES_${PN}-analyze = "systemd.manifest"
-
-FILES_lib${PN} = "${libsystemd_files}"
-FILES_${PN} = "${systemd_files}"
-FILES_libgudev-dev = "${libgudev-dev_files}"
-FILES_${PN}-dev = "${systemd-dev_files}"
-FILES_${PN}-docs = "${systemd-docs_files}"
-FILES_libgudev = "${libgudev_files}"
-FILES_${PN}-analyze = "${systemd-analyze_files}"
-
-PKG_libsystemd= "libsystemd"
-PKG_systemd= "systemd"
-PKG_libgudev-dev= "libgudev-dev"
-PKG_systemd-dev= "systemd-dev"
-PKG_systemd-docs= "systemd-docs"
-PKG_libgudev= "libgudev"
-PKG_systemd-analyze= "systemd-analyze"
-
-require systemd-extraconf.inc
-
diff --git a/meta-tizen-common-base/recipes-core/systemd/systemd_git.bb b/meta-tizen-common-base/recipes-core/systemd/systemd_git.bb
index bf20d775..0247fa38 100644
--- a/meta-tizen-common-base/recipes-core/systemd/systemd_git.bb
+++ b/meta-tizen-common-base/recipes-core/systemd/systemd_git.bb
@@ -1,10 +1,370 @@
-require systemd.inc
+SUMMARY = "System and service manager for Linux, replacing SysVinit"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
-PRIORITY = "10"
+LICENSE = "GPLv2 & LGPLv2.1 & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
+ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
+ file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed"
-LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+PROVIDES = "udev"
-SRC_URI += "git://review.tizen.org/platform/upstream/systemd;tag=1c6d7a3b259467df3c02c1fb0bb4c57d70192d15;nobranch=1"
+PE = "1"
-BBCLASSEXTEND += " native "
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+SECTION = "base/shell"
+
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
+
+SRCREV = "1c6d7a3b259467df3c02c1fb0bb4c57d70192d15"
+
+PV = "216+git${SRCPV}"
+
+SRC_URI = "git://review.tizen.org/platform/upstream/systemd;protocol=git;tag=1c6d7a3b259467df3c02c1fb0bb4c57d70192d15;nobranch=1 \
+ file://touchscreen.rules \
+ file://00-create-volatile.conf \
+ file://init \
+ file://run-ptest \
+ "
+
+S = "${WORKDIR}/git"
+
+SRC_URI_append_libc-uclibc = "\
+ file://systemd-pam-fix-getty-unit.patch \
+ "
+LDFLAGS_append_libc-uclibc = " -lrt"
+
+GTKDOC_DOCDIR = "${S}/docs/"
+
+PACKAGECONFIG ??= "xz"
+PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
+# Sign the journal for anti-tampering
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
+# regardless of PACKAGECONFIG, libgcrypt is always required to expand
+# the AM_PATH_LIBGCRYPT autoconf macro
+DEPENDS += "libgcrypt"
+# Compress the journal
+PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
+PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
+PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
+PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
+PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
+PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
+
+CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill"
+
+# Helper variables to clarify locations. This mirrors the logic in systemd's
+# build system.
+rootprefix ?= "${base_prefix}"
+rootlibdir ?= "${base_libdir}"
+rootlibexecdir = "${rootprefix}/lib"
+
+# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
+EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
+ --with-rootlibdir=${rootlibdir} \
+ --with-roothomedir=${ROOT_HOME} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
+ --disable-manpages \
+ --disable-coredump \
+ --disable-introspection \
+ --disable-kdbus \
+ --enable-split-usr \
+ --without-python \
+ --with-sysvrcnd-path=${sysconfdir} \
+ --with-firmware-path=/lib/firmware \
+ --enable-compat-libs \
+ ac_cv_path_KILL=${base_bindir}/kill \
+ "
+# uclibc does not have NSS
+EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
+
+do_configure_prepend() {
+ export CPP="${HOST_PREFIX}cpp ${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}"
+ export NM="${HOST_PREFIX}gcc-nm"
+ export AR="${HOST_PREFIX}gcc-ar"
+ export RANLIB="${HOST_PREFIX}gcc-ranlib"
+ export KMOD="${base_bindir}/kmod"
+ if [ -d ${S}/units.pre_sed ] ; then
+ cp -r ${S}/units.pre_sed ${S}/units
+ else
+ cp -r ${S}/units ${S}/units.pre_sed
+ fi
+ sed -i '/ln --relative --help/d' ${S}/configure.ac
+ sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am
+ sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am
+}
+
+do_install() {
+ autotools_do_install
+ install -d ${D}/${base_sbindir}
+ # Provided by a separate recipe
+ rm ${D}${systemd_unitdir}/system/serial-getty* -f
+
+ # Provide support for initramfs
+ [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
+ [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
+
+ # Create machine-id
+ # 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
+ touch ${D}${sysconfdir}/machine-id
+
+ install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
+
+ install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
+ sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
+ fi
+
+ # Move libgudev back to ${rootlibdir} to keep backward compatibility
+ [ ${rootlibdir} != ${libdir} ] && mv -t ${D}${rootlibdir} ${D}${libdir}/libgudev*
+
+ # Delete journal README, as log can be symlinked inside volatile.
+ rm -f ${D}/${localstatedir}/log/README
+ rm -rf ${D}/${localstatedir}/log
+
+
+ # Create symlinks for systemd-update-utmp-runlevel.service
+ install -d ${D}${systemd_unitdir}/system/graphical.target.wants
+ install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
+ install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
+ install -d ${D}${systemd_unitdir}/system/reboot.target.wants
+ install -d ${D}${systemd_unitdir}/system/rescue.target.wants
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
+
+ # Enable journal to forward message to syslog daemon
+ sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
+}
+
+do_install_ptest () {
+ install -d ${D}${PTEST_PATH}/test
+ cp -rf ${S}/test/* ${D}${PTEST_PATH}/test
+ install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/
+ install -d ${D}${PTEST_PATH}/build-aux
+ cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
+ cp -rf ${B}/rules ${D}${PTEST_PATH}/
+ # This directory needs to be there for udev-test.pl to work.
+ install -d ${D}${libdir}/udev/rules.d
+ cp ${B}/Makefile ${D}${PTEST_PATH}/
+ cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test
+ sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
+ sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
+ sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
+}
+
+python populate_packages_prepend (){
+ systemdlibdir = d.getVar("rootlibdir", True)
+ do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+}
+PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
+
+PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
+ ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh"
+
+SYSTEMD_PACKAGES = "${PN}-binfmt"
+SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} += "--system systemd-journal-gateway"
+GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+
+FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+# The test cases need perl and bash to run correctly.
+RDEPENDS_${PN}-ptest += "perl bash"
+FILES_${PN}-ptest += "${libdir}/udev/rules.d"
+
+FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug"
+
+FILES_${PN}-gui = "${bindir}/systemadm"
+
+FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
+ ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+
+FILES_${PN}-kernel-install = "${bindir}/kernel-install \
+ ${sysconfdir}/kernel/ \
+ ${exec_prefix}/lib/kernel \
+ "
+FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
+ "
+
+FILES_${PN}-zsh = "${datadir}/zsh/site-functions"
+
+FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
+ ${exec_prefix}/lib/binfmt.d \
+ ${rootlibexecdir}/systemd/systemd-binfmt \
+ ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
+ ${systemd_unitdir}/system/systemd-binfmt.service"
+RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
+
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
+
+CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
+ ${sysconfdir}/systemd/logind.conf \
+ ${sysconfdir}/systemd/system.conf \
+ ${sysconfdir}/systemd/user.conf"
+
+FILES_${PN} = " ${base_bindir}/* \
+ ${datadir}/bash-completion \
+ ${datadir}/dbus-1/services \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/polkit-1 \
+ ${datadir}/${BPN} \
+ ${datadir}/factory \
+ ${sysconfdir}/bash_completion.d/ \
+ ${sysconfdir}/dbus-1/ \
+ ${sysconfdir}/machine-id \
+ ${sysconfdir}/modules-load.d/ \
+ ${sysconfdir}/sysctl.d/ \
+ ${sysconfdir}/systemd/ \
+ ${sysconfdir}/tmpfiles.d/ \
+ ${sysconfdir}/xdg/ \
+ ${sysconfdir}/init.d/README \
+ ${rootlibexecdir}/systemd/* \
+ ${systemd_unitdir}/* \
+ ${base_libdir}/security/*.so \
+ ${libdir}/libnss_* \
+ /cgroup \
+ ${bindir}/systemd* \
+ ${bindir}/busctl \
+ ${bindir}/localectl \
+ ${bindir}/hostnamectl \
+ ${bindir}/timedatectl \
+ ${bindir}/bootctl \
+ ${bindir}/kernel-install \
+ ${exec_prefix}/lib/tmpfiles.d/*.conf \
+ ${exec_prefix}/lib/systemd \
+ ${exec_prefix}/lib/modules-load.d \
+ ${exec_prefix}/lib/sysctl.d \
+ ${exec_prefix}/lib/sysusers.d \
+ ${localstatedir} \
+ /lib/udev/rules.d/70-uaccess.rules \
+ /lib/udev/rules.d/71-seat.rules \
+ /lib/udev/rules.d/73-seat-late.rules \
+ /lib/udev/rules.d/99-systemd.rules \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d', '', d)} \
+ "
+
+FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
+
+RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
+RDEPENDS_${PN} += "volatile-binds"
+
+RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\
+ util-linux-agetty \
+ util-linux-fsck e2fsprogs-e2fsck \
+ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \
+"
+
+PACKAGES =+ "udev-dbg udev udev-hwdb"
+
+FILES_udev-dbg += "/lib/udev/.debug"
+
+RPROVIDES_udev = "hotplug"
+
+RDEPENDS_udev-hwdb += "udev"
+
+FILES_udev += "${base_sbindir}/udevd \
+ ${rootlibexecdir}/systemd/systemd-udevd \
+ ${rootlibexecdir}/udev/accelerometer \
+ ${rootlibexecdir}/udev/ata_id \
+ ${rootlibexecdir}/udev/cdrom_id \
+ ${rootlibexecdir}/udev/collect \
+ ${rootlibexecdir}/udev/findkeyboards \
+ ${rootlibexecdir}/udev/keyboard-force-release.sh \
+ ${rootlibexecdir}/udev/keymap \
+ ${rootlibexecdir}/udev/mtd_probe \
+ ${rootlibexecdir}/udev/scsi_id \
+ ${rootlibexecdir}/udev/v4l_id \
+ ${rootlibexecdir}/udev/keymaps \
+ ${rootlibexecdir}/udev/rules.d/4*.rules \
+ ${rootlibexecdir}/udev/rules.d/5*.rules \
+ ${rootlibexecdir}/udev/rules.d/6*.rules \
+ ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
+ ${rootlibexecdir}/udev/rules.d/75*.rules \
+ ${rootlibexecdir}/udev/rules.d/78*.rules \
+ ${rootlibexecdir}/udev/rules.d/8*.rules \
+ ${rootlibexecdir}/udev/rules.d/95*.rules \
+ ${sysconfdir}/udev \
+ ${sysconfdir}/init.d/systemd-udevd \
+ ${systemd_unitdir}/system/*udev* \
+ ${systemd_unitdir}/system/*.wants/*udev* \
+ ${base_bindir}/udevadm \
+ ${datadir}/bash-completion/completions/udevadm \
+ "
+
+FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+# TODO:
+# u-a for runlevel and telinit
+
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
+
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
+pkg_postinst_udev-hwdb () {
+ if test -n "$D"; then
+ ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
+ --root $D
+ else
+ udevadm hwdb --update
+ fi
+}
+
+pkg_prerm_udev-hwdb () {
+ if test -n "$D"; then
+ exit 1
+ fi
+
+ rm -f ${sysconfdir}/udev/hwdb.bin
+}
+
+# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
+# that we don't build both udev and systemd in world builds.
+python () {
+ if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+ raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
+}