systemd: move into /usr
authorPatrick Ohly <patrick.ohly@intel.com>
Tue, 3 Feb 2015 15:22:02 +0000 (07:22 -0800)
committerPatrick Ohly <patrick.ohly@intel.com>
Tue, 3 Feb 2015 15:22:50 +0000 (07:22 -0800)
This changes systemd so that it installs files as on Tizen. The
advantage is that one can do diffs between Tizen and "Tizen
on Yocto" without running into path differences.

Change-Id: Iddc17f5a55ab4bb1e9fc6e154fae87f5a9cd6337

meta-tizen-common-base/conf/distro/tizen.conf
meta-tizen-common-base/recipes-core/systemd/systemd-extraconf.inc
meta-tizen-common-base/recipes-core/systemd/systemd.inc

index d8ea93c..04aa4e5 100644 (file)
@@ -78,3 +78,5 @@ SYSTEMD_DEFAULT_TARGET="graphical.target"
 # The extra space at the end is a workaround for recipes which lack a
 # space in their own _append.
 SRC_URI_append = " file://${META_TIZEN_COMMON_BASE}/conf/distro/tizen-default.manifest "
+
+systemd_unitdir="/usr/lib/systemd"
index 060c581..ad1d2dc 100644 (file)
@@ -55,22 +55,34 @@ pkg_preinst_${PN}() {
 
 
 
-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"
-
+systemd-dbg_files += " \
+${libdir}/systemd/.debug \
+${libdir}/security/.debug \
+${libdir}/systemd/system-generators/.debug \
+${libdir}/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"
+
+# Pretty sweeping file pattern: we don't have to be precise, as
+# long as we don't match dev and dbg files.
+systemd_files += " \
+${bindir} \
+${sbindir} \
+${libdir}/systemd \
+${base_libdir}/systemd \
+${libdir}/security \
+${libdir}/udev \
+${libdir}/libudev*.so.* \
+${libdir}/libsystemd*.so.* \
+"
index 9685e69..f856a96 100644 (file)
@@ -142,8 +142,15 @@ do_compile() {
   
   
 }
+
 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"
 
+# Use same file layout as in Tizen, to avoid issues with other recipes
+# which are not prepared for the default /lib vs. /usr/lib split that
+# Yocto normally uses. Relies on systemd_unitdir="${libdir}/systemd" in
+# tizen.conf.
+EXTRA_OECONF += "--with-rootprefix=${prefix} --with-rootlibdir=${libdir} --sysconfdir=${sysconfdir} --enable-split-usr"
+
 do_install() {
  export RPM_BUILD_ROOT=${D}
  cd ${S}
@@ -177,8 +184,8 @@ EOF
  
  # 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 ${libdir}/systemd/systemd ${D}${prefix}/sbin/init
+ ln -sf ${libdir}/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
@@ -207,7 +214,7 @@ EOF
  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}${libdir}/systemd/system-generators
  mkdir -p ${D}${prefix}/lib/systemd/user-generators
  
  # Create new-style configuration files so that we can ghost-own them
@@ -218,12 +225,12 @@ EOF
  touch ${D}${sysconfdir}/machine-info
  touch ${D}${sysconfdir}/timezone
  
- mkdir -p ${D}/lib/systemd/system-preset/
- mkdir -p ${D}/lib/systemd/user-preset/
+ mkdir -p ${D}${libdir}/systemd/system-preset/
+ mkdir -p ${D}${libdir}/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/
+ mkdir -p ${D}${libdir}/systemd/system-shutdown/
+ mkdir -p ${D}${libdir}/systemd/system-sleep/
  
  # Make sure the NTP units dir exists
  mkdir -p ${D}${prefix}/lib/systemd/ntp-units.d/