From 78c529a878c4d0b6ce97651bd9af064d41b6569f Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Tue, 17 Jun 2014 14:47:50 +0200 Subject: [PATCH] Fix systemd service path Change-Id: Icc3e0aa0ce47752dc985da42dc67f5ad2ea18159 Signed-off-by: Ronan Le Martret --- recipes-tizen/systemd/systemd-extraconf.inc | 1 + recipes-tizen/systemd/systemd.inc | 113 +++++++++++----------------- 2 files changed, 47 insertions(+), 67 deletions(-) diff --git a/recipes-tizen/systemd/systemd-extraconf.inc b/recipes-tizen/systemd/systemd-extraconf.inc index 2b0adb8..622e064 100644 --- a/recipes-tizen/systemd/systemd-extraconf.inc +++ b/recipes-tizen/systemd/systemd-extraconf.inc @@ -54,6 +54,7 @@ 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 } diff --git a/recipes-tizen/systemd/systemd.inc b/recipes-tizen/systemd/systemd.inc index 3ffb49b..b480ec0 100644 --- a/recipes-tizen/systemd/systemd.inc +++ b/recipes-tizen/systemd/systemd.inc @@ -12,10 +12,10 @@ inherit autotools-brokensep BBCLASSEXTEND = "" PROVIDES = "" -#PROVIDES by libsystemd +#PROVIDES by libsystemd -#PROVIDES by systemd +#PROVIDES by systemd # the PROVIDES rules is ignore "SysVinit = 2.86-24" PROVIDES += "SysVinit" RPROVIDES_systemd += "SysVinit" @@ -33,19 +33,19 @@ PROVIDES += "udev" RPROVIDES_systemd += "udev" -#PROVIDES by libgudev-dev +#PROVIDES by libgudev-dev -#PROVIDES by systemd-dev +#PROVIDES by systemd-dev # the PROVIDES rules is ignore "libudev-dev = 208" PROVIDES += "libudev-dev" RPROVIDES_systemd-dev += "libudev-dev" -#PROVIDES by libgudev +#PROVIDES by libgudev -#PROVIDES by systemd-analyze +#PROVIDES by systemd-analyze RDEPENDS = "" @@ -71,7 +71,7 @@ RDEPENDS_${PN}-analyze += "systemd" DEPENDS = "" -#DEPENDS of systemd +#DEPENDS of systemd DEPENDS += "kmod" DEPENDS_append_class-native = " intltool-native" DEPENDS_append_class-target = " intltool-native" @@ -97,8 +97,8 @@ do_prep() { 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) @@ -112,35 +112,14 @@ do_compile() { LANG=C export LANG unset DISPLAY - CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; - CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; - FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; - LD_AS_NEEDED=1; export LD_AS_NEEDED ; - + CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; + CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; + FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; + LD_AS_NEEDED=1; export LD_AS_NEEDED ; - CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; - CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; - FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; - ./autogen.sh --build=${TARGET_SYS} --host=${HOST_SYS} \ - --target=x86_64-tizen-linux \ - --program-prefix= \ - --prefix=${prefix} \ - --exec-prefix=${prefix} \ - --bindir=${prefix}/bin \ - --sbindir=${prefix}/sbin \ - --sysconfdir=${sysconfdir} \ - --datadir=${prefix}/share \ - --includedir=${prefix}/include \ - --libdir=${prefix}/lib \ - --libexecdir=${prefix}/libexec \ - --localstatedir=${localstatedir} \ - --sharedstatedir=${prefix}/com \ - --mandir=${mandir} \ - --infodir=${infodir} - - CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; - CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; - FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; + CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; + CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; + FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \ --target=x86_64-tizen-linux \ --program-prefix= \ @@ -167,9 +146,9 @@ do_compile() { make -j16 \ systemunitdir=/lib/systemd/system \ userunitdir=/lib/systemd/user - - - + + + } do_install() { @@ -178,24 +157,24 @@ do_install() { LANG=C export LANG unset DISPLAY - rm -rf ${D} - mkdir -p ${D} - - + 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 -- + install + rm -f ${D}${infodir}/dir + find ${D} -regex ".*\.la$" | xargs rm -f -- find ${D} -regex ".*\.a$" | xargs rm -f -- - + # udev links /usr/bin/mkdir -p ${D}/${prefix}/sbin /usr/bin/ln -sf ../bin/udevadm ${D}${prefix}/sbin/udevadm /usr/bin/mkdir -p ${D}${prefix}/lib/firmware/updates - + # Create SysV compatibility symlinks. systemctl/systemd are smart # enough to detect in which way they are called. /usr/bin/ln -s ../lib/systemd/systemd ${D}${prefix}/sbin/init @@ -206,31 +185,31 @@ do_install() { /usr/bin/ln -s ../bin/systemctl ${D}${prefix}/sbin/shutdown /usr/bin/ln -s ../bin/systemctl ${D}${prefix}/sbin/telinit /usr/bin/ln -s ../bin/systemctl ${D}${prefix}/sbin/runlevel - + # legacy links /usr/bin/ln -s 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. /usr/bin/rm -r ${D}${sysconfdir}/systemd/system/*.target.wants - + # Make sure the ghost-ing below works /usr/bin/touch ${D}${sysconfdir}/systemd/system/runlevel2.target /usr/bin/touch ${D}${sysconfdir}/systemd/system/runlevel3.target /usr/bin/touch ${D}${sysconfdir}/systemd/system/runlevel4.target /usr/bin/touch ${D}${sysconfdir}/systemd/system/runlevel5.target - + # Make sure these directories are properly owned /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/system/basic.target.wants /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/system/default.target.wants /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/system/dbus.target.wants /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/system/syslog.target.wants - + # Make sure the user generators dir exists too /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/system-generators /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/user-generators - + # Create new-style configuration files so that we can ghost-own them /usr/bin/touch ${D}${sysconfdir}/hostname /usr/bin/touch ${D}${sysconfdir}/vconsole.conf @@ -240,39 +219,39 @@ do_install() { /usr/bin/touch ${D}${sysconfdir}/timezone #/usr/bin/mkdir -p ${D}${sysconfdir}/X11/xorg.conf.d #/usr/bin/touch ${D}${sysconfdir}/X11/xorg.conf.d/00-keyboard.conf - + /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/system-preset/ /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/user-preset/ - + # Make sure the shutdown/sleep drop-in dirs exist /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/system-shutdown/ /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/system-sleep/ - + # Make sure the NTP units dir exists /usr/bin/mkdir -p ${D}${prefix}/lib/systemd/ntp-units.d/ - + # Install modprobe fragment /usr/bin/mkdir -p ${D}${sysconfdir}/modprobe.d/ - + # Enable readahead services /usr/bin/ln -s ../systemd-readahead-collect.service ${D}${prefix}/lib/systemd/system/default.target.wants/ /usr/bin/ln -s ../systemd-readahead-replay.service ${D}${prefix}/lib/systemd/system/default.target.wants/ - + # 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}/${prefix}/lib/systemd/user/default.target - + rm -rf ${D}/${prefix}/share/doc/packages/systemd - + # 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 -f ${D}${prefix}/lib/rpm/macros.d/macros.systemd - - + + } pkg_preinst_${PN}() { -- 2.7.4