public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH V3] systemd.bbclass: Dont use libdir and base_libdir for units
@ 2013-02-14  4:02 Khem Raj
  2013-02-14  4:02 ` [PATCH] util-linux: Remove -systemd package Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2013-02-14  4:02 UTC (permalink / raw)
  To: openembedded-core

systemd always uses /lib and /usr/lib to store unit files
so using libdir and base_libdir is incorrect. It will work
where libdir is usr/lib and base_libdir is /lib but wont work
when say its /lib64

Add a check to make sure that SYSTEMD_PACKAGES are part of PACKAGES
too, otherwise error out

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/classes/systemd.bbclass |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/meta/classes/systemd.bbclass b/meta/classes/systemd.bbclass
index 8b55813..066cc22 100644
--- a/meta/classes/systemd.bbclass
+++ b/meta/classes/systemd.bbclass
@@ -49,6 +49,12 @@ python systemd_populate_packages() {
             val = (d.getVar(var, True) or "").strip()
         return val
 
+    # Check if systemd-packages already included in PACKAGES
+    def systemd_check_package(pkg_systemd):
+        packages = d.getVar('PACKAGES', True)
+        if not pkg_systemd in packages.split():
+            bb.error('%s does not appear in package list, please add it', " " + pkg_systemd)
+
 
     # Add a runtime dependency on systemd to pkg
     def systemd_add_rdepends(pkg):
@@ -118,11 +124,9 @@ python systemd_populate_packages() {
 
     # Check service-files and call systemd_add_files_and_parse for each entry
     def systemd_check_services():
-        base_libdir = d.getVar('base_libdir', True)
         searchpaths = [oe.path.join(d.getVar("sysconfdir", True), "systemd", "system"),]
-        searchpaths.append(oe.path.join(d.getVar("base_libdir", True), "systemd", "system"))
-        searchpaths.append(oe.path.join(d.getVar("libdir", True), "systemd", "system"))
-        searchpaths.append(oe.path.join(d.getVar("libdir", True), "systemd", "user"))
+	searchpaths.append(oe.path.join(d.getVar("nonarch_base_libdir", True), "systemd", "system"))
+	searchpaths.append(oe.path.join(d.getVar("exec_prefix", True), d.getVar("nonarch_base_libdir", True), "systemd", "system"))
         systemd_packages = d.getVar('SYSTEMD_PACKAGES', True)
         has_exactly_one_service = len(systemd_packages.split()) == 1
         if has_exactly_one_service:
@@ -149,6 +153,7 @@ python systemd_populate_packages() {
     # Run all modifications once when creating package
     if os.path.exists(d.getVar("D", True)):
         for pkg in d.getVar('SYSTEMD_PACKAGES', True).split():
+            systemd_check_package(pkg)
             if d.getVar('SYSTEMD_SERVICE_' + pkg, True):
                 systemd_generate_package_scripts(pkg)
                 systemd_add_rdepends(pkg)
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] util-linux: Remove -systemd package
  2013-02-14  4:02 [PATCH V3] systemd.bbclass: Dont use libdir and base_libdir for units Khem Raj
@ 2013-02-14  4:02 ` Khem Raj
  2013-02-15 15:25   ` Enrico Scholz
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2013-02-14  4:02 UTC (permalink / raw)
  To: openembedded-core

unit files are added to util-linux itself when selected

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-core/util-linux/util-linux.inc |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 667232c..10439c0 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -33,7 +33,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
              util-linux-mount util-linux-readprofile util-linux-libblkid \
              util-linux-libblkid-dev util-linux-libuuid util-linux-libuuid-dev \
              util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \
-             util-linux-mkfs util-linux-mcookie util-linux-systemd util-linux-reset"
+             util-linux-mkfs util-linux-mcookie util-linux-reset"
 
 EXTRA_OECONF = "--libdir=${base_libdir} --disable-use-tty-group \
                 --disable-makeinstall-chown --enable-elvtune --enable-init \
@@ -79,8 +79,6 @@ RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
 # reset calls 'tput'
 RDEPENDS_util-linux-reset += "ncurses"
 
-FILES_${PN}-systemd = "${systemd_unitdir}/system/"
-
 RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup"
 RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs "
 
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] util-linux: Remove -systemd package
  2013-02-14  4:02 ` [PATCH] util-linux: Remove -systemd package Khem Raj
@ 2013-02-15 15:25   ` Enrico Scholz
  0 siblings, 0 replies; 3+ messages in thread
From: Enrico Scholz @ 2013-02-15 15:25 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

Khem Raj <raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> unit files are added to util-linux itself when selected

Having these files in main package causes

| [FAILED] Failed to listen on UUID daemon activation socket.

on every boot.  Although this is caused by a packaging issue (/var/uuidd
does either not exist and/or should be below /var/volatile), the uuidd
systemd files and daemon should be either moved into an own -uuidd, or
the service/socket should not be auto activated.



Enrico



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-15 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-14  4:02 [PATCH V3] systemd.bbclass: Dont use libdir and base_libdir for units Khem Raj
2013-02-14  4:02 ` [PATCH] util-linux: Remove -systemd package Khem Raj
2013-02-15 15:25   ` Enrico Scholz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox