Skip to contentSkip to conversation

systemd: use system variables instead of hardcoded paths

PATCH New [email protected] 1 participant 1 message Sep 14, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 systemd: use system variables instead of hardcoded paths

From: Ting Liu <[email protected]>

Back port commit 980b338fb5100ff4c779335a86f3d9450ea8c54a Below is the original commit message:

Fix build for ppc64

Consider /lib64 and /usr/lib64

Some 64bit architectures chose lib64 instead of lib for default library dirnames. So we dig this from metadata vars base_libdir and libdir instead of hardcoding 'lib'

ppc64 in OE uses lib64 for default libdir
and this leaves lot of udev/systemd
files unpackaged since 'lib' was hardcoded

---
 meta-oe/classes/systemd.bbclass                    |    5 +-
 .../systemd/systemd/use-rootlibdir.patch           |   94 ++++++++++++++++++++
 meta-oe/recipes-core/systemd/systemd_git.bb        |    3 +-
 3 files changed, 100 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch
meta-oe/classes/systemd.bbclass +4 -1
index a2c8ddf..0d88c64 100644
@@ -154,7 +154,10 @@ python populate_packages_prepend () {
 
 	# check service-files and call systemd_add_files_and_parse for each entry
 	def systemd_check_services():
-		searchpaths = '/etc/systemd/system/ /lib/systemd/system/ /usr/lib/systemd/system/'
+		base_libdir = d.getVar('base_libdir', 1)
+		searchpaths = '/etc/systemd/system/' + ' '
+		searchpaths += d.getVar('base_libdir', 1) + '/systemd/system/' + ' '
+		searchpaths += d.getVar('libdir', 1) + '/systemd/system/' + ' '
 		systemd_packages = d.getVar('SYSTEMD_PACKAGES', 1)
 		has_exactly_one_service = len(systemd_packages.split()) == 1
 		if has_exactly_one_service:
meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch new file +94 -0

94 lines not on this page · raw message

meta-oe/recipes-core/systemd/systemd_git.bb +2 -1
index b9c8a19..21a6326 100644
@@ -14,13 +14,14 @@ inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r28"
+PR = "r29"
 
 inherit useradd pkgconfig autotools vala perlnative
 
 SRCREV = "3eff4208ffecedd778fec260f0d4b18e94dab443"
 
 SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \
+           file://use-rootlibdir.patch \
            ${UCLIBCPATCHES} \
            file://var-run.conf \
           "
Signature · 1 line
1.7.5