[oe] [meta-oe v2][for-denzil][PATCH] systemd: use system variables instead of hardcoded paths

Liu Ting-B28495 B28495 at freescale.com
Sat Sep 15 15:00:41 UTC 2012


> -----Original Message-----
> From: Koen Kooi [mailto:koen at dominion.thruhere.net]
> Sent: Friday, September 14, 2012 8:32 PM
> To: Liu Ting-B28495
> Cc: yocto at linux.freescale.net; Khem Raj; openembedded-
> devel at lists.openembedded.org
> Subject: Re: [meta-oe v2][for-denzil][PATCH] systemd: use system
> variables instead of hardcoded paths
> 
> Please do a git cherry-pick to keep author info
> 

[Liu Ting-B28495] My fault. Because recipes are moved to meta-systemd and the systemd source code has changed, the original commit can't be used directly on denzil. Moreover, the fix is part of the original commit "systemd: Upgrade to 187 tag". So I generate a new patch in the same way with original commit, include related messages, and use a more clear title. Sorry for not keeping author info.

> Op 14 sep. 2012, om 12:18 heeft <b28495 at freescale.com> het volgende
> geschreven:
> 
> > From: Ting Liu <b28495 at freescale.com>
> >
> > 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
> >
> > Signed-off-by: Khem Raj <raj.khem at gmail.com>
> > Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>
> > Signed-off-by: Ting Liu <b28495 at freescale.com>
> > ---
> > 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
> >
> > diff --git a/meta-oe/classes/systemd.bbclass
> > b/meta-oe/classes/systemd.bbclass index a2c8ddf..0d88c64 100644
> > --- a/meta-oe/classes/systemd.bbclass
> > +++ b/meta-oe/classes/systemd.bbclass
> > @@ -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:
> > diff --git a/meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch
> > b/meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch
> > new file mode 100644
> > index 0000000..26973c4
> > --- /dev/null
> > +++ b/meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch
> > @@ -0,0 +1,94 @@
> > +From 5210f67d0c637f4fbd8bb0a94e9b11da25a9c76c Mon Sep 17 00:00:00
> > +2001
> > +From: Ting Liu <b28495 at freescale.com>
> > +Date: Fri, 14 Sep 2012 16:56:30 +0800
> > +Subject: [PATCH] use rootlibdir
> > +
> > +Back port from meta-oe 980b338fb5100ff4c779335a86f3d9450ea8c54a.
> > +Below is the original message in the patch:
> > +
> > +Upstream-Status: Undecided
> > +
> > +This patch removes some of hardcoded references to /lib and /usr/lib
> > +since on some architectures it should be
> > +/lib64 and /usr/lib64 atleast in OE
> > +
> > +I am not sure about the intention of hardcoded values thats why
> > +status is undecided
> > +
> > +Signed-off-by: Khem Raj <raj.khem at gmail.com>
> > +Signed-off-by: Ting Liu <b28495 at freescale.com>
> > +---
> > + Makefile.am |   20 ++++++++++----------
> > + 1 files changed, 10 insertions(+), 10 deletions(-)
> > +
> > +diff --git a/Makefile.am b/Makefile.am index 219d8de..b96ac74 100644
> > +--- a/Makefile.am
> > ++++ b/Makefile.am
> > +@@ -50,19 +50,19 @@ bashcompletiondir=$(sysconfdir)/bash_completion.d
> > +
> > + # Our own, non-special dirs
> > + pkgsysconfdir=$(sysconfdir)/systemd
> > +-userunitdir=$(prefix)/lib/systemd/user
> > +-tmpfilesdir=$(prefix)/lib/tmpfiles.d
> > +-sysctldir=$(prefix)/lib/sysctl.d
> > ++userunitdir=$(prefix)/$(rootlibdir)/gcsystemd/user
> > ++tmpfilesdir=$(prefix)/$(rootlibdir)/gctmpfiles.d
> > ++sysctldir=$(prefix)/$(rootlibdir)/gcsysctl.d
> > + usergeneratordir=$(pkglibexecdir)/user-generators
> > + pkgincludedir=$(includedir)/systemd
> > +
> > + # And these are the special ones for /  rootprefix=@rootprefix@
> > +rootbindir=$(rootprefix)/bin
> > +-rootlibexecdir=$(rootprefix)/lib/systemd
> > ++rootlibexecdir=$(rootprefix)/$(rootlibdir)/gcsystemd
> > + systemgeneratordir=$(rootlibexecdir)/system-generators
> > + systemshutdowndir=$(rootlibexecdir)/system-shutdown
> > +-systemunitdir=$(rootprefix)/lib/systemd/system
> > ++systemunitdir=$(rootprefix)/$(rootlibdir)/gcsystemd/system
> > +
> > + CLEANFILES =
> > + EXTRA_DIST =
> > +@@ -93,7 +93,7 @@ AM_CPPFLAGS = \
> > + 	-DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-
> bridge\" \
> > + 	-DROOTPREFIX=\"$(rootprefix)\" \
> > + 	-DRUNTIME_DIR=\"/run\" \
> > +-	-DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
> > ++	-DRANDOM_SEED=\"$(localstatedir)/$(rootlibdir)/gcrandom-seed\" \
> > + 	-DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\"
> \
> > + 	-DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
> > + 	-DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \ @@ -1408,7 +1408,7
> > +@@ nodist_systemunit_DATA += \
> > +
> > + binfmt-install-data-hook:
> > + 	$(MKDIR_P) -m 0755 \
> > +-		$(DESTDIR)$(prefix)/lib/binfmt.d \
> > ++		$(DESTDIR)$(prefix)/$(rootlibdir)/gcbinfmt.d \
> > + 		$(DESTDIR)$(sysconfdir)/binfmt.d \
> > + 		$(DESTDIR)$(systemunitdir)/sysinit.target.wants
> > + 	( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \ @@
> > +-1940,7 +1940,7 @@ polkitpolicy_in_files += \
> > + logind-install-data-hook:
> > + 	$(MKDIR_P) -m 0755 \
> > + 		$(DESTDIR)$(systemunitdir)/multi-user.target.wants \
> > +-                $(DESTDIR)$(localstatedir)/lib/systemd
> > ++                $(DESTDIR)$(localstatedir)/$(rootlibdir)/gcsystemd
> > + 	( cd $(DESTDIR)$(systemunitdir) && \
> > + 		rm -f dbus-org.freedesktop.login1.service && \
> > + 		$(LN_S) systemd-logind.service
> > +dbus-org.freedesktop.login1.service)
> > +@@ -2196,9 +2196,9 @@ systemd-install-data-hook:
> > + 	$(MKDIR_P) -m 0755 \
> > + 		$(DESTDIR)$(tmpfilesdir) \
> > + 		$(DESTDIR)$(sysconfdir)/tmpfiles.d \
> > +-		$(DESTDIR)$(prefix)/lib/modules-load.d \
> > ++		$(DESTDIR)$(prefix)/$(rootlibdir)/gcmodules-load.d \
> > + 		$(DESTDIR)$(sysconfdir)/modules-load.d \
> > +-		$(DESTDIR)$(prefix)/lib/sysctl.d \
> > ++		$(DESTDIR)$(prefix)/$(rootlibdir)/gcsysctl.d \
> > + 		$(DESTDIR)$(sysconfdir)/sysctl.d \
> > + 		$(DESTDIR)$(systemshutdowndir) \
> > + 		$(DESTDIR)$(systemgeneratordir) \
> > +--
> > +1.7.5
> > +
> > diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb
> > b/meta-oe/recipes-core/systemd/systemd_git.bb
> > index b9c8a19..21a6326 100644
> > --- a/meta-oe/recipes-core/systemd/systemd_git.bb
> > +++ b/meta-oe/recipes-core/systemd/systemd_git.bb
> > @@ -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 \
> >           "
> > --
> > 1.7.5
> >
> >
> 






More information about the Openembedded-devel mailing list