Skip to contentSkip to conversation

systemd rework

PATCH In review Andreas Müller 4 participants 36 messages Feb 23, 2012

lore
Share & tools
lore
#0 lore raw

v3 cover systemd rework

V1 -> V2:

[2]  do not check configuration variables for cross and nativesdk
[3]  rename systemd_package to systemd_generate_package_scripts
[6]  parse unit files to determine the files to pack
[7]  create warning if *-systemd package already rdepends

it's base package
added in V2:
[8]-[20] remove obsolet systemd code from recipes (these were used as
test cases)
[21] dhcp-(relay) test case for multiple systemd packages
[22] modified to start service

V2 -> V3:
(Hopefully) all suggestions and comments were incorporated / rebased

[2]  new: introduce systemd_unitdir
[3]  was [2] commit message changed (removed V1-V2 hint)
[6]  was [5] incorporated ${systemd_unitdir}
[7]  new: run code in populate_packages_prepend only if ${D} exists
[8]  was [6] rework: for *.socket add corresponding *.service and *@.service
[9]  was [7] rework: if RDEPENDS_<base-package>-systemd is set only append systemd

[10] was [8] incorporated ${systemd_unitdir}
[11] was [9] incorporated ${systemd_unitdir}
[15] was [13] keep RDEPENDS_${PN}-systemd to override systemd.bbclass's suggestion
[17] was [15] rebased
[19] was [17] incorporated ${systemd_unitdir}
[22] was [20] incorporated ${systemd_unitdir}
old [22] was remove since it is now properly handled by systemd.bbclass

Tests performed:
- with INHERIT += 'rm_work'
1. setup build system to unpatched state
2. build image
3. apply all patches of this series
4. incremental build image
5. check buildhistory diff
6. (re)build all recipes affected
7. check buildhistory results

- without INHERIT += 'rm_work'
1. apply all patches of this series
2. build image from scratch
3. check buildhistory results for recipes touched series and build by image
4. delete temp dir / retain sstate-cache
5. build image
6. check buildhistory diffs

This patch series can be pulled from:
git://gitorious.org/schnitzeltony-oe-meta/meta-openembedded-systemd.git branch systemd3

Andreas Müller (23):
systemd-systemctl-native: add multiple services support systemd.bbclass: introduce systemd_unitdir systemd.bbclass: enhance checks for SYSTEMD_PACKAGES and
SYSTEMD_SERVICE
systemd.bbclass: cosmetics
systemd.bbclass: automatically create packages set in
SYSTEMD_PACKAGES
systemd.bbclass: automatically install all *.service and *.socket
supplied in recipe's SRC_URI
systemd.bbclass: run code in populate_packages_prepend only if ${D}
exists
systemd.bbclass: automatically extend FILES_* for systemd packages systemd.bbclass: automatically extend RDEPENDS for *-systemd packages
connman: remove unneeded systemd code / use ${systemd_unitdir}
dropbear: remove unneeded systemd code / use ${systemd_unitdir}
openssh: remove unneeded systemd code
elsa: remove unneeded systemd code
cronie: remove unneeded systemd code
xserver-nodm-init: remove unneeded systemd code
atftp: remove unneeded systemd code
udisks: remove unneeded systemd code
rsyslog: remove unneeded systemd code
syslog-ng: remove unneeded systemd code / use ${systemd_unitdir}
dhcp: remove unneeded systemd code
gpsd: remove unneeded systemd code
busybox: remove unneeded systemd code / use ${systemd_unitdir}
dhcp: add native systemd support for dhcp-relay

 meta-efl/recipes-efl/efl/elsa_svn.bb               |   11 +--
 meta-oe/classes/systemd.bbclass                    |  165 +++++++++++++++++---
 .../connman/connman_0.78.bbappend                  |    9 +-
 .../recipes-connectivity/dhcp/dhcp_4.2.0.bbappend  |   18 +--
 .../dhcp/files/dhcrelay.service                    |   10 ++
 .../openssh/openssh_5.9p1.bbappend                 |   14 +--
 .../recipes-core/busybox/busybox_1.19.3.bbappend   |   15 +--
 .../dropbear/dropbear_2011.54.bbappend             |   13 +--
 .../systemd/systemd-systemctl-native/systemctl     |   75 +++++----
 meta-oe/recipes-extended/atftp/atftp_0.7.bb        |   10 +-
 .../recipes-extended/cronie/cronie_1.4.8.bbappend  |   12 +--
 meta-oe/recipes-extended/rsyslog/rsyslog.inc       |    7 +-
 .../xserver-nodm-init/xserver-nodm-init_2.0.bb     |    9 +-
 meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb       |   12 +--
 meta-oe/recipes-support/syslog-ng/syslog-ng.inc    |    9 +-
 meta-oe/recipes-support/udisks/udisks_1.0.4.bb     |    9 +-
 16 files changed, 224 insertions(+), 174 deletions(-)
 create mode 100644 meta-oe/recipes-connectivity/dhcp/files/dhcrelay.service
Signature · 1 line
1.7.6.4
#1 lore raw

PATCH v3 1/23 systemd-systemctl-native: add multiple services support

Thanks to Otavio Salvador for helping hint [1]

[1] http://lists.linuxtogo.org/pipermail/openembedded-devel/2012-February/037856.html

---
 .../systemd/systemd-systemctl-native/systemctl     |   75 +++++++++++---------
 1 files changed, 42 insertions(+), 33 deletions(-)
meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl +42 -33
index 54c1a18..72b9da3 100755
@@ -10,50 +10,59 @@ while [ $# != 0 ]; do
 		enable)
 			shift
 
-			service="$1"
+			services="$1"
+			in_enable="1"
 			shift
 			;;
 		--root=*)
 			ROOT=${opt##--root=}
+			in_enable="0"
 			shift
 			;;
 		*)
-			echo "'$opt' is an unkown option; exiting with error"
-			exit 1
+			if [ "$in_enable" = "1" ]; then
+				services="$services $opt" 
+				shift
+			else
+				echo "'$opt' is an unkown option; exiting with error"
+				exit 1
+			fi
 			;;
 	esac
 done
 
-# find service file
-for p in $ROOT/etc/systemd/system \
-         $ROOT/lib/systemd/system \
-         $ROOT/usr/lib/systemd/system; do
-	if [ -e $p/$service ]; then
-		service_file=$p/$service
-		service_file=${service_file##$ROOT}
+for service in "$services"; do
+	# find service file
+	for p in $ROOT/etc/systemd/system \
+		 $ROOT/lib/systemd/system \
+		 $ROOT/usr/lib/systemd/system; do
+		if [ -e $p/$service ]; then
+			service_file=$p/$service
+			service_file=${service_file##$ROOT}
+		fi
+	done
+	if [ -z "$service_file" ]; then
+		echo "'$service' couldn't be found; exiting with error"
+		exit 1
 	fi
-done
-if [ -z "$service_file" ]; then
-	echo "'$service' couldn't be found; exiting with error"
-	exit 1
-fi
-
-# create the required symbolic links
-wanted_by=$(grep WantedBy $ROOT/$service_file \
-                | sed 's,WantedBy=,,g' \
-                | tr ',' '\n' \
-                | grep '\.target$')
-
-for r in $wanted_by; do
-	mkdir -p $ROOT/etc/systemd/system/$r.wants
-	ln -s $service_file $ROOT/etc/systemd/system/$r.wants
-	echo "Enabled $service for $wanted_by."
-done
 
-# call us for the other required scripts
-also=$(grep Also $ROOT/$service_file \
-           | sed 's,Also=,,g' \
-           | tr ',' '\n')
-for a in $also; do
-	$0 --root=$ROOT enable $a
+	# create the required symbolic links
+	wanted_by=$(grep WantedBy $ROOT/$service_file \
+		        | sed 's,WantedBy=,,g' \
+		        | tr ',' '\n' \
+		        | grep '\.target$')
+
+	for r in $wanted_by; do
+		mkdir -p $ROOT/etc/systemd/system/$r.wants
+		ln -s $service_file $ROOT/etc/systemd/system/$r.wants
+		echo "Enabled $service for $wanted_by."
+	done
+
+	# call us for the other required scripts
+	also=$(grep Also $ROOT/$service_file \
+		   | sed 's,Also=,,g' \
+		   | tr ',' '\n')
+	for a in $also; do
+		$0 --root=$ROOT enable $a
+	done
 done
Signature · 1 line
1.7.6.4
#2 lore raw

PATCH v3 2/23 systemd.bbclass: introduce systemd_unitdir

In reply to Andreas Müller

Follow suggestion in [1]

[1] http://lists.linuxtogo.org/pipermail/openembedded-devel/2012-February/038018.html

---
 meta-oe/classes/systemd.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta-oe/classes/systemd.bbclass +2 -0
index 2ca7bfc..91faab9 100644
@@ -1,5 +1,7 @@
 DEPENDS_append = " systemd-systemctl-native"
 
+systemd_unitdir = "${base_libdir}/systemd"
+
 systemd_postinst() {
 OPTS=""
 
Signature · 1 line
1.7.6.4
#3 lore raw

PATCH v3 3/23 systemd.bbclass: enhance checks for SYSTEMD_PACKAGES and SYSTEMD_SERVICE

In reply to Andreas Müller

after recipe parsing the following plausibilities are checked:
* ERROR if empty SYSTEMD_PACKAGES
* ERROR if SYSTEMD_PACKAGES entry does not contain '-systemd' AND package_name != ${PN}
* ERROR if SYSTEMD_PACKAGES entry contains '-systemd' but entry without '-systemd' (base pkg) does not exist
* WARNING if SYSTEMD_PACKAGES containing ${PN} to force package maintainers to split out systemd-specific files into *-systemd
* error if SYSTEMD_SERVICE(_<systemd-package>) is empty for one or more entries in SYSTEMD_PACKAGES

The code in populate_packages_prepend to set SYSTEMD_PACKAGES to ${PN} as default was removed.

---
 meta-oe/classes/systemd.bbclass |   47 ++++++++++++++++++++++++++++++++------
 1 files changed, 39 insertions(+), 8 deletions(-)
meta-oe/classes/systemd.bbclass +39 -8
index 91faab9..a99036c 100644
@@ -27,9 +27,45 @@ systemctl disable ${SYSTEMD_SERVICE}
 }
 
 def systemd_after_parse(d):
-    if bb.data.getVar('SYSTEMD_PACKAGES', d) == None:
-        if bb.data.getVar('SYSTEMD_SERVICE', d) == None:
-            raise bb.build.FuncFailed, "%s inherits systemd but doesn't set SYSTEMD_SERVICE" % bb.data.getVar('FILE', d)
+	def systemd_check_vars():
+		bpn = d.getVar('BPN', 1)
+		# not for native / only at parse time
+		if d.getVar('BB_WORKERCONTEXT', True) is None and \
+		bpn + "-native" != d.getVar('PN', 1) and \
+		bpn + "-cross" != d.getVar('PN', 1) and \
+		bpn + "-nativesdk" != d.getVar('PN', 1):
+			bb_filename = d.getVar('FILE')
+			packages = d.getVar('PACKAGES', 1)
+
+			# check SYSTEMD_PACKAGES
+			systemd_pkgs = d.getVar('SYSTEMD_PACKAGES', 1) or ""
+			if systemd_pkgs == "":
+				raise bb.build.FuncFailed, "\n\n%s inherits systemd but doesn't set SYSTEMD_PACKAGES" % bb_filename
+			for pkg_systemd in systemd_pkgs.split():
+				if pkg_systemd.find("-systemd") == -1:
+					if pkg_systemd != d.getVar('PN', 1):
+						raise bb.build.FuncFailed, \
+							"\n\n%s: %s in SYSTEMD_PACKAGES does not match <existing-package>-systemd or ${PN} (deprecated)" % \
+							(bb_filename, pkg_systemd)
+					else:
+						bb.warn("%s: it is recommended to set SYSTEMD_PACKAGES as <existing-package>-systemd" % bb_filename)
+				else:
+					pkg_systemd_base = pkg_systemd.replace('-systemd', '')
+					if pkg_systemd_base not in packages:
+						raise bb.build.FuncFailed, \
+							"\n\n%s: %s in SYSTEMD_PACKAGES does not match <existing-package>-systemd or ${PN} (deprecated)" % \
+							( bb_filename, pkg_systemd)
+
+			# check SYSTEMD_SERVICE
+			for pkg_systemd in systemd_pkgs.split():
+				service_pkg = 'SYSTEMD_SERVICE' + "_" + pkg_systemd
+				systemd_services = d.getVar(service_pkg, 1) or d.getVar('SYSTEMD_SERVICE', 1) or ""
+				if systemd_services == "":
+					raise bb.build.FuncFailed, "\n\n%s inherits systemd but doesn't set SYSTEMD_SERVICE / %s" % (bb_filename, service_pkg)
+
+
+	systemd_check_vars()
+
 
 python __anonymous() {
     systemd_after_parse(d)
@@ -72,11 +108,6 @@ python populate_packages_prepend () {
 
 
 	pkgs = bb.data.getVar('SYSTEMD_PACKAGES', d, 1)
-	if pkgs == None:
-		pkgs = bb.data.getVar('PN', d, 1)
-		packages = (bb.data.getVar('PACKAGES', d, 1) or "").split()
-		if not pkgs in packages and packages != []:
-			pkgs = packages[0]
 	for pkg in pkgs.split():
 		systemd_package(pkg)
 }
Signature · 1 line
1.7.6.4
#4 lore raw

PATCH v3 4/23 systemd.bbclass: cosmetics

In reply to Andreas Müller
---
 meta-oe/classes/systemd.bbclass |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
meta-oe/classes/systemd.bbclass +7 -8
index a99036c..6517357 100644
@@ -72,7 +72,7 @@ python __anonymous() {
 }
 
 python populate_packages_prepend () {
-	def systemd_package(pkg):
+	def systemd_generate_package_scripts(pkg):
 		bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
 		localdata = bb.data.createCopy(d)
 		overrides = bb.data.getVar("OVERRIDES", localdata, 1)
@@ -96,10 +96,10 @@ python populate_packages_prepend () {
 		prerm += bb.data.getVar('systemd_prerm', localdata, 1)
 		bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d)
 
-	        postrm = bb.data.getVar('pkg_postrm', localdata, 1)
-	        if not postrm:
-	                postrm = '#!/bin/sh\n'
-                postrm += bb.data.getVar('systemd_postrm', localdata, 1)
+		postrm = bb.data.getVar('pkg_postrm', localdata, 1)
+		if not postrm:
+			postrm = '#!/bin/sh\n'
+		postrm += bb.data.getVar('systemd_postrm', localdata, 1)
 		bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
 
 		rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
@@ -107,7 +107,6 @@ python populate_packages_prepend () {
 		bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
 
 
-	pkgs = bb.data.getVar('SYSTEMD_PACKAGES', d, 1)
-	for pkg in pkgs.split():
-		systemd_package(pkg)
+	for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
+		systemd_generate_package_scripts(pkg_systemd)
 }
Signature · 1 line
1.7.6.4
#5 lore raw

PATCH v3 5/23 systemd.bbclass: automatically create packages set in SYSTEMD_PACKAGES

In reply to Andreas Müller
---
 meta-oe/classes/systemd.bbclass |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
meta-oe/classes/systemd.bbclass +9 -0
index 6517357..e779bef 100644
@@ -63,8 +63,17 @@ def systemd_after_parse(d):
 				if systemd_services == "":
 					raise bb.build.FuncFailed, "\n\n%s inherits systemd but doesn't set SYSTEMD_SERVICE / %s" % (bb_filename, service_pkg)
 
+	# prepend systemd-packages not already included
+	def systemd_create_package(pkg_systemd):
+		packages = d.getVar('PACKAGES', 1)
+		if not pkg_systemd in packages:
+			packages = "%s %s" % (pkg_systemd, packages)
+			d.setVar('PACKAGES', packages)
+
 
 	systemd_check_vars()
+	for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
+		systemd_create_package(pkg_systemd)
 
 
 python __anonymous() {
Signature · 1 line
1.7.6.4
#6 lore raw

PATCH v3 6/23 systemd.bbclass: automatically install all *.service and *.socket supplied in recipe's SRC_URI

In reply to Andreas Müller
---
 meta-oe/classes/systemd.bbclass |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
meta-oe/classes/systemd.bbclass +11 -0
index e779bef..b2d4191 100644
@@ -80,6 +80,17 @@ python __anonymous() {
     systemd_after_parse(d)
 }
 
+# automatically install all *.service and *.socket supplied in recipe's SRC_URI
+do_install_append() {
+    install -d ${D}${systemd_unitdir}/system
+    for service in `find ${WORKDIR} -maxdepth 1 -name '*.service' -o -name '*.socket'` ; do
+	# ensure installing systemd-files only (e.g not avahi *.service)
+	if grep -q '\[Unit\]' $service ; then
+	        install -m 644 $service ${D}${systemd_unitdir}/system
+	fi
+    done
+}
+
 python populate_packages_prepend () {
 	def systemd_generate_package_scripts(pkg):
 		bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
Signature · 1 line
1.7.6.4
#7 lore raw

PATCH v3 7/23 systemd.bbclass: run code in populate_packages_prepend only if ${D} exists

In reply to Andreas Müller

All further manipulations need to be performed only once. This modication avoids unwanted behaviour when inheriting rm_work.bbclass [1]

[1] http://lists.linuxtogo.org/pipermail/openembedded-devel/2012-February/038067.html

---
 meta-oe/classes/systemd.bbclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
meta-oe/classes/systemd.bbclass +4 -2
index b2d4191..e13f09d 100644
@@ -127,6 +127,8 @@ python populate_packages_prepend () {
 		bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
 
 
-	for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
-		systemd_generate_package_scripts(pkg_systemd)
+	# run all modifications once when creating package
+	if os.path.exists('${D}'):
+		for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
+			systemd_generate_package_scripts(pkg_systemd)
 }
Signature · 1 line
1.7.6.4
#8 lore raw

PATCH v3 8/23 systemd.bbclass: automatically extend FILES_* for systemd packages

In reply to Andreas Müller

* Add files found in SYSTEMD_SERVICE and add service files referenced by 'Also=' (and 'Conflicts=' in case of one service for links to /dev/null) recursively.
* For *.socket files the corresponding '*.service' and '*@.service are packed
* In case a file set in SYSTEMD_SERVICE does not exist, build is aborted with an error message.

---
 meta-oe/classes/systemd.bbclass |   60 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)
meta-oe/classes/systemd.bbclass +60 -0
index e13f09d..c712e17 100644
@@ -126,9 +126,69 @@ python populate_packages_prepend () {
 		rdepends.append("systemd")
 		bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
 
+	# add files to FILES_*-systemd if existent and not already done
+	def systemd_append_file(pkg_systemd, file_append):
+		appended = False
+		if os.path.exists('${D}' + file_append):
+			var_name = "FILES_" + pkg_systemd
+			files = d.getVar(var_name, 0) or ""
+			if file_append not in files.split():
+				d.setVar(var_name, "%s %s" % (files, file_append))
+				appended = True
+		return appended
+
+	# add systemd files to FILES_*-systemd, parse for Also= and follow recursive
+	def systemd_add_files_and_parse(pkg_systemd, path, service, keys):
+		# avoid infinite recursion
+		if systemd_append_file(pkg_systemd, path + service):
+			fullpath = '${D}' + path + service
+			if service.find('.socket') != -1:
+				# for *.socket add *.service and *@.service
+				service_base = service.replace('.socket', '')
+				systemd_add_files_and_parse(pkg_systemd, path, service_base + '.service', keys)
+				systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service', keys)
+			for key in keys.split():
+				# recurse all dependencies found in keys ('Also';'Conflicts';..) and add to files
+				cmd = "grep %s %s | sed 's,%s=,,g' | tr ',' '\\n'" % (key, fullpath, key)
+				pipe = os.popen(cmd, 'r')
+				line = pipe.readline()
+				while line:
+					line = line.replace('\n', '')
+					systemd_add_files_and_parse(pkg_systemd, path, line, keys)
+					line = pipe.readline()
+				pipe.close()
+
+	# 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/'
+		systemd_packages = d.getVar('SYSTEMD_PACKAGES', 1)
+		has_exactly_one_service = len(systemd_packages.split()) == 1
+		if has_exactly_one_service:
+			systemd_services = d.getVar('SYSTEMD_SERVICE' + "_" + systemd_packages, 1) or d.getVar('SYSTEMD_SERVICE', 1)
+			has_exactly_one_service = len(systemd_services.split()) == 1
+
+		keys = 'Also' # Conflicts??
+		if has_exactly_one_service:
+			# single service gets also the /dev/null dummies
+			keys = 'Also Conflicts'
+		# scan for all in SYSTEMD_SERVICE[]
+		for pkg_systemd in systemd_packages.split():
+			systemd_services = d.getVar('SYSTEMD_SERVICE' + "_" + pkg_systemd, 1) or d.getVar('SYSTEMD_SERVICE', 1)
+			for service in systemd_services.split():
+				path_found = ''
+				for path in searchpaths.split():
+					if os.path.exists('${D}' + path + service):
+						path_found = path
+				if path_found != '':
+					systemd_add_files_and_parse(pkg_systemd, path_found, service, keys)
+				else:
+					raise bb.build.FuncFailed, "\n\nFor package %s SYSTEMD_SERVICE-entry %s does not exist" % \
+						(pkg_systemd, service)
+
 
 	# run all modifications once when creating package
 	if os.path.exists('${D}'):
 		for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
 			systemd_generate_package_scripts(pkg_systemd)
+		systemd_check_services()
 }
Signature · 1 line
1.7.6.4
#9 lore raw

PATCH v3 9/23 systemd.bbclass: automatically extend RDEPENDS for *-systemd packages

In reply to Andreas Müller

* append systemd functionalty moved into systemd_add_rdepends
* append base-pgk in case receipe does not set RDEPENDS for *-systemd package

---
 meta-oe/classes/systemd.bbclass |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)
meta-oe/classes/systemd.bbclass +17 -4
index c712e17..dd423b5 100644
@@ -122,10 +122,6 @@ python populate_packages_prepend () {
 		postrm += bb.data.getVar('systemd_postrm', localdata, 1)
 		bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
 
-		rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
-		rdepends.append("systemd")
-		bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
-
 	# add files to FILES_*-systemd if existent and not already done
 	def systemd_append_file(pkg_systemd, file_append):
 		appended = False
@@ -185,10 +181,27 @@ python populate_packages_prepend () {
 					raise bb.build.FuncFailed, "\n\nFor package %s SYSTEMD_SERVICE-entry %s does not exist" % \
 						(pkg_systemd, service)
 
+	# *-systemd packages get RDEPENDS to systemd and their base package
+	def systemd_add_rdepends(pkg_systemd):
+		# RDEPENDS_${pkg_systemd} += pkg_systemd_base systemd
+		rdepends = d.getVar('RDEPENDS_' + pkg_systemd, 1) or ""
+		rdepends_arr = rdepends.split()
+		if not 'systemd' in rdepends_arr:
+			rdepends = '%s %s' % (rdepends, 'systemd')
+		pkg_systemd_base = pkg_systemd.replace('-systemd', '')
+		# no automatism for:
+		# recipes setting rdepends themselves AND
+		# not rdepending myself AND
+		# avoid double entries
+		if len(rdepends_arr) == 0 and pkg_systemd != '${PN}' and not pkg_systemd_base in rdepends:
+			rdepends = '%s %s' % (rdepends, pkg_systemd_base)
+		d.setVar('RDEPENDS_' + pkg_systemd, rdepends)
+
 
 	# run all modifications once when creating package
 	if os.path.exists('${D}'):
 		for pkg_systemd in d.getVar('SYSTEMD_PACKAGES', 1).split():
 			systemd_generate_package_scripts(pkg_systemd)
+			systemd_add_rdepends(pkg_systemd)
 		systemd_check_services()
 }
Signature · 1 line
1.7.6.4
#10 lore raw

PATCH v3 10/23 connman: remove unneeded systemd code / use ${systemd_unitdir}

In reply to Andreas Müller
---
 .../connman/connman_0.78.bbappend                  |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
meta-oe/recipes-connectivity/connman/connman_0.78.bbappend +2 -7
index d6f756c..f1b05aa 100644
@@ -1,13 +1,8 @@
 inherit systemd
 
-EXTRA_OECONF += "--with-systemdunitdir=${base_libdir}/systemd/system/"
+EXTRA_OECONF += "--with-systemdunitdir=${systemd_unitdir}/system/"
 
-PRINC := "${@int(PRINC) + 1}"
+PRINC := "${@int(PRINC) + 2}"
 
 SYSTEMD_PACKAGES = "${PN}-systemd"
 SYSTEMD_SERVICE_${PN}-systemd = "connman.service"
-
-# systemd files
-PACKAGES =+ "${PN}-systemd"
-FILES_${PN}-systemd += "${base_libdir}/systemd"
-RDEPENDS_${PN}-systemd += "${PN}"
Signature · 1 line
1.7.6.4
#11 lore raw

PATCH v3 11/23 dropbear: remove unneeded systemd code / use ${systemd_unitdir}

In reply to Andreas Müller
---
 .../dropbear/dropbear_2011.54.bbappend             |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)
meta-oe/recipes-core/dropbear/dropbear_2011.54.bbappend +2 -11
index 899e1fc..fc5d047 100644
@@ -1,6 +1,6 @@
 inherit systemd
 
-PRINC := "${@int(PRINC) + 1}"
+PRINC := "${@int(PRINC) + 2}"
 
 # look for files in the layer first
 FILESEXTRAPATHS := "${THISDIR}/${PN}"
@@ -13,14 +13,5 @@ SYSTEMD_PACKAGES = "${PN}-systemd"
 SYSTEMD_SERVICE_${PN}-systemd = "dropbear.socket"
 
 do_install_append() {
-	install -d ${D}${base_libdir}/systemd/system
-	install -m 0644 ${WORKDIR}/dropbearkey.service ${D}${base_libdir}/systemd/system/
-	install -m 0644 ${WORKDIR}/[email protected] ${D}${base_libdir}/systemd/system/
-	install -m 0644 ${WORKDIR}/dropbear.socket ${D}${base_libdir}/systemd/system/
-	ln -sf /dev/null ${D}${base_libdir}/systemd/system/dropbear.service
+	ln -sf /dev/null ${D}${systemd_unitdir}/system/dropbear.service
 }
-
-PACKAGES += "${PN}-systemd"
-
-RDEPENDS_${PN}-systemd += "dropbear"
-FILES_${PN}-systemd = "${base_libdir}/systemd"
Signature · 1 line
1.7.6.4
#12 lore raw

PATCH v3 12/23 openssh: remove unneeded systemd code

In reply to Andreas Müller
---
 .../openssh/openssh_5.9p1.bbappend                 |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)
meta-oe/recipes-connectivity/openssh/openssh_5.9p1.bbappend +1 -13
index 3f68e09..de7668f 100644
@@ -1,6 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-PRINC := "${@int(PRINC) + 1}"
+PRINC := "${@int(PRINC) + 2}"
 
 SYSTEMD_PACKAGES = "openssh-sshd-systemd"
 SYSTEMD_SERVICE = "sshd.socket"
@@ -8,15 +8,3 @@ SYSTEMD_SERVICE = "sshd.socket"
 inherit systemd
 
 SRC_URI += "file://sshd.socket file://[email protected] file://sshdgenkeys.service"
-
-do_install_append() {
-       install -d ${D}${base_libdir}/systemd/system
-       install -m 644 ${WORKDIR}/sshd.socket ${D}${base_libdir}/systemd/system
-       install -m 644 ${WORKDIR}/[email protected] ${D}${base_libdir}/systemd/system
-       install -m 644 ${WORKDIR}/sshdgenkeys.service ${D}${base_libdir}/systemd/system
-}
-
-PACKAGES =+ "openssh-sshd-systemd"
-
-FILES_openssh-sshd-systemd += "${base_libdir}/systemd"
-RDEPENDS_openssh-sshd-systemd += "openssh-sshd"
Signature · 1 line
1.7.6.4
#13 lore raw

PATCH v3 13/23 elsa: remove unneeded systemd code

In reply to Andreas Müller
---
 meta-efl/recipes-efl/efl/elsa_svn.bb |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
meta-efl/recipes-efl/efl/elsa_svn.bb +1 -10
index a079ec0..70b56bd 100644
@@ -13,23 +13,14 @@ S = "${WORKDIR}/${SRCNAME}"
 
 EXTRA_OECONF = "--with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc ${@base_contains('DISTRO_FEATURES', 'pam', '', '--disable-pam', d)}"
 
-PR = "r4"
+PR = "r5"
 PV = "0.0.4+svnr${SRCPV}"
 SRCREV = "${EFL_SRCREV}"
 
-do_install_append() {
-        install -d ${D}${base_libdir}/systemd/system/
-        install -m 0644 ${WORKDIR}/xserver-nodm.service ${D}${base_libdir}/systemd/system/xserver-nodm.service
-}
-
 inherit systemd
 SYSTEMD_PACKAGES = "${PN}-systemd"
 SYSTEMD_SERVICE = "xserver-nodm.service"
 
-PACKAGES =+ "${PN}-systemd"
-FILES_${PN}-systemd += "${base_libdir}/systemd"
-RDEPENDS_${PN}-systemd += "${PN}"
-
 RDEPENDS_${PN} += "${PN}-themes sessreg xauth"
 CONFFILES_${PN} += "${sysconfdir}/elsa.conf"
 RCONFLICTS_${PN} += "xserver-nodm-init"
Signature · 1 line
1.7.6.4
#14 lore raw

PATCH v3 14/23 cronie: remove unneeded systemd code

In reply to Andreas Müller
---
 .../recipes-extended/cronie/cronie_1.4.8.bbappend  |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
meta-oe/recipes-extended/cronie/cronie_1.4.8.bbappend +1 -11
index e0b9fb9..5aedb21 100644
@@ -1,7 +1,7 @@
 # look for files in the layer first
 FILESEXTRAPATHS := "${THISDIR}/${PN}"
 
-PRINC = "1"
+PRINC = "2"
 
 inherit systemd
 
@@ -9,13 +9,3 @@ SYSTEMD_PACKAGES = "${PN}-systemd"
 SYSTEMD_SERVICE_${PN}-systemd = "crond.service"
 
 SRC_URI += "file://crond.service"
-
-do_install_append() {
-    install -d ${D}${base_libdir}/systemd/system
-    install -m 644 ${WORKDIR}/crond.service ${D}${base_libdir}/systemd/system
-}
-
-PACKAGES =+ "${PN}-systemd"
-
-FILES_${PN}-systemd += "${base_libdir}/systemd"
-RDEPENDS_${PN}-systemd = "${PN}"
Signature · 1 line
1.7.6.4
#15 lore raw

PATCH v3 15/23 xserver-nodm-init: remove unneeded systemd code

In reply to Andreas Müller
---
 .../xserver-nodm-init/xserver-nodm-init_2.0.bb     |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb +1 -8
index 2132eab..99edf21 100644
@@ -3,7 +3,7 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 SECTION = "x11"
 
-PR = "r12"
+PR = "r13"
 
 SRC_URI = "file://xserver-nodm \
            file://xserver-nodm.service \
@@ -25,14 +25,7 @@ SYSTEMD_SERVICE_${PN}-systemd = "xserver-nodm.service"
 do_install() {
 	install -d ${D}${sysconfdir}/init.d
 	install xserver-nodm ${D}${sysconfdir}/init.d
-
-	install -d ${D}${base_libdir}/systemd/system
-	install -m 0644 xserver-nodm.service ${D}${base_libdir}/systemd/system/
 }
 
-PACKAGES += "${PN}-systemd"
-
 RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit"
-
-FILES_${PN}-systemd += "${base_libdir}/systemd/system/"
 RDEPENDS_${PN}-systemd += "xserver-common (>= 1.30) xinit"
Signature · 1 line
1.7.6.4
#16 lore raw

PATCH v3 16/23 atftp: remove unneeded systemd code

In reply to Andreas Müller
---
 meta-oe/recipes-extended/atftp/atftp_0.7.bb |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
meta-oe/recipes-extended/atftp/atftp_0.7.bb +2 -8
index ab14a28..6bd44a0 100644
@@ -3,7 +3,7 @@ SECTION = "network"
 HOMEPAGE = "http://packages.debian.org/atftp"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/a/atftp/atftp_${PV}.dfsg.orig.tar.gz;name=archive \
            ${DEBIAN_MIRROR}/main/a/atftp/atftp_${PV}.dfsg-11.diff.gz;name=patch \
@@ -29,23 +29,17 @@ do_install_append() {
     install -d ${D}${sysconfdir}/init.d
     install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd
 
-    install -d ${D}${base_libdir}/systemd/system
-    install -m 644 ${WORKDIR}/atftpd.service ${D}${base_libdir}/systemd/system
-
     install -d ${D}/srv/tftp
 
     rm ${D}${sbindir}/in.tftpd
 }
 
-PACKAGES =+ "atftpd-systemd atftpd"
+PACKAGES =+ "atftpd"
 
 FILES_${PN} = "${bindir}/*"
 
 FILES_${PN}d = "${sbindir}/* ${sysconfdir}/init.d/* /srv/tftp"
 
-FILES_atftpd-systemd += "${base_libdir}/systemd"
-RDEPENDS_atftpd-systemd += "atftpd"
-
 SRC_URI[archive.md5sum] = "aa269044a6f992eca78fee2f6119643c"
 SRC_URI[archive.sha256sum] = "18815f5b67290fac087c6b9da28dfa5e0feb722096f5c5de52e59b46026da559"
 SRC_URI[patch.md5sum] = "1636f199bf32c754a7bf34a5c647d138"
Signature · 1 line
1.7.6.4
#17 lore raw

PATCH v3 17/23 udisks: remove unneeded systemd code

In reply to Andreas Müller
---
 meta-oe/recipes-support/udisks/udisks_1.0.4.bb |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
meta-oe/recipes-support/udisks/udisks_1.0.4.bb +1 -8
index 9ffaca5..0018a5f 100644
@@ -12,7 +12,7 @@ SRC_URI = "http://hal.freedesktop.org/releases/${BPN}-${PV}.tar.gz;name=${BPN} \
 SRC_URI[udisks.md5sum] = "86c63b2b5484f2060499a052b5b6256b"
 SRC_URI[udisks.sha256sum] = "854b89368733b9c3a577101b761ad5397ae75a05110c8698ac5b29de9a8bf8f5"
 
-PR = "r3"
+PR = "r4"
 
 inherit autotools systemd
 
@@ -21,11 +21,6 @@ SYSTEMD_SERVICE_${PN}-systemd = "udisks-daemon.service"
 
 EXTRA_OECONF = "--disable-man-pages"
 
-PACKAGES =+ "${PN}-systemd"
-
-FILES_${PN}-systemd = "${base_libdir}/systemd/system/"
-RDEPENDS_${PN}-systemd = "${PN}"
-
 FILES_${PN} += "${libdir}/polkit-1/extensions/*.so \
                 ${datadir}/dbus-1/ \
                 ${datadir}/polkit-1 \
@@ -33,5 +28,3 @@ FILES_${PN} += "${libdir}/polkit-1/extensions/*.so \
 "
 
 FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
-
-
Signature · 1 line
1.7.6.4
#18 lore raw

PATCH v3 18/23 rsyslog: remove unneeded systemd code

In reply to Andreas Müller
---
 meta-oe/recipes-extended/rsyslog/rsyslog.inc |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
meta-oe/recipes-extended/rsyslog/rsyslog.inc +1 -6
index ea7fa22..d4552cf 100644
@@ -4,7 +4,7 @@ HOMEPAGE = "http://www.rsyslog.com/"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973"
 
-INC_PR = "r2"
+INC_PR = "r3"
 
 SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${PN}-${PV}.tar.gz \
            file://rsyslog.conf"
@@ -20,9 +20,4 @@ do_install_append() {
         install ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
 }
 
-PACKAGES =+ "${PN}-systemd"
-
 CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
-
-FILES_${PN}-systemd += "${base_libdir}/systemd"
-RDEPENDS_${PN}-systemd += "${PN}"
Signature · 1 line
1.7.6.4
#19 lore raw

PATCH v3 19/23 syslog-ng: remove unneeded systemd code / use ${systemd_unitdir}

In reply to Andreas Müller
---
 meta-oe/recipes-support/syslog-ng/syslog-ng.inc |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +2 -7
index 3bbebec..3489ac5 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7ec1bcc46f28b11f4722e20d9b7dd4d5"
 # update-rc.d and update-alternatives is important
 RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
 
-INC_PR = "r6"
+INC_PR = "r7"
 
 inherit autotools systemd
 
@@ -26,7 +26,7 @@ EXTRA_OECONF = " \
   --disable-pcre \
   --disable-sql \
   --enable-systemd \
-  --with-systemdsystemunitdir=${base_libdir}/systemd/system \
+  --with-systemdsystemunitdir=${systemd_unitdir}/system \
 "
 
 do_configure_prepend() {
@@ -47,11 +47,6 @@ do_install_append() {
 SYSTEMD_PACKAGES = "${PN}-systemd"
 SYSTEMD_SERVICE = "${PN}.service"
 
-PACKAGES =+ "${PN}-systemd"
-
-FILES_${PN}-systemd += "${base_libdir}/systemd"
-RDEPENDS_${PN}-systemd += "${PN}"
-
 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
             ${sysconfdir} ${sharedstatedir} ${localstatedir} \
             ${base_bindir}/* ${base_sbindir}/* \
Signature · 1 line
1.7.6.4
#20 lore raw

PATCH v3 20/23 dhcp: remove unneeded systemd code

In reply to Andreas Müller
---
 .../recipes-connectivity/dhcp/dhcp_4.2.0.bbappend  |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend +1 -11
index 4344eaa..829ad3c 100644
@@ -3,19 +3,9 @@ FILESEXTRAPATHS := "${THISDIR}/files"
 
 inherit systemd
 
-PRINC := "${@int(PRINC) + 1}"
+PRINC := "${@int(PRINC) + 2}"
 
 SYSTEMD_PACKAGES = "dhcp-server-systemd"
 SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service"
 
 SRC_URI += "file://dhcpd.service"
-
-do_install_append() {
-    install -d ${D}${base_libdir}/systemd/system
-    install -m 644 ${WORKDIR}/dhcpd.service ${D}${base_libdir}/systemd/system
-}
-
-PACKAGES =+ "dhcp-server-systemd"
-
-FILES_dhcp-server-systemd += "${base_libdir}/systemd"
-RDEPENDS_dhcp-server-systemd += "dhcp-server"
Signature · 1 line
1.7.6.4
#21 lore raw

PATCH v3 21/23 gpsd: remove unneeded systemd code

In reply to Andreas Müller
---
 meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb +2 -10
index ce2ab02..927107a 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
 DEPENDS = "dbus-glib ncurses python libusb1"
 PROVIDES = "virtual/gpsd"
 
-PR = "r1"
+PR = "r2"
 
 EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \
                 --x-libraries=${STAGING_LIBDIR} \
@@ -68,11 +68,6 @@ do_install_append() {
     install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
     install -d ${D}${base_libdir}/udev/
     install -m 0755 ${S}/gpsd.hotplug.wrapper ${D}${base_libdir}/udev/
-
-    #support for systemd
-    install -d ${D}${base_libdir}/systemd/system
-    install -m 644 ${WORKDIR}/${PN}.socket ${D}${base_libdir}/systemd/system
-    install -m 644 ${WORKDIR}/${PN}.service ${D}${base_libdir}/systemd/system
 }
 
 pkg_postinst_${PN}-conf() {
@@ -83,7 +78,7 @@ pkg_postrm_${PN}-conf() {
 	update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default	
 }
 
-PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils ${PN}-systemd"
+PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
 
 FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug"
 
@@ -113,6 +108,3 @@ RDEPENDS_gps-utils = "python-pygps"
 DESCRIPTION_python-pygps = "Python bindings to gpsd"
 FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*"
 RDEPENDS_python-pygps = "python-core python-curses gpsd python-json"
-
-FILES_${PN}-systemd += "${base_libdir}/systemd"
-RDEPENDS_${PN}-systemd += "${PN}"
Signature · 1 line
1.7.6.4
#22 lore raw

PATCH v3 22/23 busybox: remove unneeded systemd code / use ${systemd_unitdir}

In reply to Andreas Müller
---
 .../recipes-core/busybox/busybox_1.19.3.bbappend   |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)
meta-oe/recipes-core/busybox/busybox_1.19.3.bbappend +5 -10
index 98b959f..2c73732 100644
@@ -1,6 +1,6 @@
 inherit systemd
 
-PRINC := "${@int(PRINC) + 2}"
+PRINC := "${@int(PRINC) + 3}"
 
 # look for files in the layer first
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -16,16 +16,11 @@ do_install_append() {
 	install -d ${D}${sysconfdir}/default
 	install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
 
-	install -d ${D}${base_libdir}/systemd/system
 	sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
-	     > ${D}${base_libdir}/systemd/system/busybox-syslog.service
+	     > ${D}${systemd_unitdir}/system/busybox-syslog.service
 	sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
-	     > ${D}${base_libdir}/systemd/system/busybox-klogd.service
+	     > ${D}${systemd_unitdir}/system/busybox-klogd.service
 
-	ln -sf /dev/null ${D}${base_libdir}/systemd/system/syslog.service
+	ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
 }
-
-PACKAGES += "${PN}-syslog-systemd"
-
-RDEPENDS_${PN}-syslog-systemd += "${PN}-syslog"
-FILES_${PN}-syslog-systemd = "${base_libdir}/systemd"
+FILES_${PN}-syslog-systemd = "${systemd_unitdir}/system/syslog.service"
Signature · 1 line
1.7.6.4
#23 lore raw

PATCH v3 23/23 dhcp: add native systemd support for dhcp-relay

In reply to Andreas Müller
---
 .../recipes-connectivity/dhcp/dhcp_4.2.0.bbappend  |    8 +++++---
 .../dhcp/files/dhcrelay.service                    |   10 ++++++++++
 2 files changed, 15 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-connectivity/dhcp/files/dhcrelay.service
meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend +5 -3
index 829ad3c..6d1e3df 100644
@@ -3,9 +3,11 @@ FILESEXTRAPATHS := "${THISDIR}/files"
 
 inherit systemd
 
-PRINC := "${@int(PRINC) + 2}"
+PRINC := "${@int(PRINC) + 3}"
 
-SYSTEMD_PACKAGES = "dhcp-server-systemd"
+SYSTEMD_PACKAGES = "dhcp-server-systemd dhcp-relay-systemd"
 SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service"
+SYSTEMD_SERVICE_dhcp-relay-systemd = "dhcrelay.service"
 
-SRC_URI += "file://dhcpd.service"
+SRC_URI += "file://dhcpd.service \
+            file://dhcrelay.service"
meta-oe/recipes-connectivity/dhcp/files/dhcrelay.service new file +10 -0
new file mode 100644
index 0000000..f68f468
@@ -0,0 +1,10 @@
+[Unit]
+Description=DHCP Relay Agent Daemon
+After=syslog.target network.target
+
+[Service]
+EnvironmentFile=/etc/default/dhcp-relay
+ExecStart=/usr/sbin/dhcrelay -d $DHCRELAYARGS
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
1.7.6.4
#24 lore raw
In reply to Andreas Müller
Quoted 2 lines · Andreas Müller

V2 -> V3:
(Hopefully) all suggestions and comments were incorporated  / rebased

This patchset is ready for merging IMO.

Checking remaining recipes that might be change to use ${systemd_unitdir} I found:

meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb meta-oe/recipes-connectivity/cherokee/cherokee.inc meta-oe/recipes-connectivity/gateone/gateone_git.bb meta-oe/recipes-core/systemd/systemd-compat-units.bb meta-oe/recipes-core/systemd/systemd-serialgetty.bb meta-oe/recipes-core/systemd/systemd_git.bb meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb meta-oe/recipes-extended/lighttpd/lighttpd_1.4.30.bbappend meta-oe/recipes-graphics/dietsplash/dietsplash_git.bb meta-oe/recipes-graphics/slim/slim_1.3.2.bb meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb

I dropped udev ones as I am working on them :-)

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#25 lore raw
Quoted 6 lines · Otavio Salvador
Quoted 2 lines · Andreas Müller

V2 -> V3:
(Hopefully) all suggestions and comments were incorporated  / rebased

This patchset is ready for merging IMO.

Agreed, just tested in my build and looks good.

Great work Andreas!

Quoted 2 lines

Checking remaining recipes that might be change to use ${systemd_unitdir} I found:

I have patch for few:

Quoted 3 lines

meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb meta-oe/recipes-connectivity/gateone/gateone_git.bb meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb

and networkmanager

but the rest doesn't inherit systemd (yet), so we should update it when changing them to use systemd.bbclass.

Quoted 20 lines

meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb meta-oe/recipes-connectivity/cherokee/cherokee.inc meta-oe/recipes-core/systemd/systemd-compat-units.bb meta-oe/recipes-core/systemd/systemd-serialgetty.bb meta-oe/recipes-core/systemd/systemd_git.bb meta-oe/recipes-extended/lighttpd/lighttpd_1.4.30.bbappend meta-oe/recipes-graphics/dietsplash/dietsplash_git.bb meta-oe/recipes-graphics/slim/slim_1.3.2.bb

I dropped udev ones as I am working on them :-)

Signature · 8 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#26 lore raw
Quoted 5 lines · Martin Jansa

I have patch for few:

Quoted 3 lines

meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb meta-oe/recipes-connectivity/gateone/gateone_git.bb meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb

and networkmanager

Please send them above this patchset so we can get them pulled altogether if does fine. :-D

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#27 lore raw

PATCH 1/1 gateone, networkmanager, cloud9, ntp: use systemd_unitdir variable

In reply to Otavio Salvador

* maybe we should move systemd_unitdir definition outside systemd.bbclass because it's used in few more recipes which doesn't inherit systemd

---
 .../recipes-connectivity/gateone/gateone_git.bb    |    4 ++--
 .../networkmanager/networkmanager_0.9.2.0.bb       |    2 +-
 meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb    |    6 +++---
 meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb         |    8 ++++----
 4 files changed, 10 insertions(+), 10 deletions(-)
meta-oe/recipes-connectivity/gateone/gateone_git.bb +2 -2
index 4f9684c..84da893 100644
@@ -20,8 +20,8 @@ export prefix = "${localstatedir}/lib"
 do_install_append() {
 	install -d ${D}${localstatedir}/log/${BPN}
 
-	install -m 0755 -d ${D}${base_libdir}/systemd/system
-	install -m 0644 ${WORKDIR}/gateone.service ${D}${base_libdir}/systemd/system/
+	install -m 0755 -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/gateone.service ${D}${systemd_unitdir}/system/
 
 	install -m 0755 -d ${D}${sysconfdir}/avahi/services/
 	install -m 0644 ${WORKDIR}/gateone-avahi.service ${D}${sysconfdir}/avahi/services/
meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb +1 -1
index 1dcc3cf..df269e0 100644
@@ -70,7 +70,7 @@ FILES_${PN} += " \
 		${datadir}/polkit-1 \
 		${datadir}/dbus-1 \
 		${base_libdir}/udev/* \
-        ${base_libdir}/systemd \
+        ${systemd_unitdir} \
 "
 
 RRECOMMENDS_${PN} += "iptables"
meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb +3 -3
index 4e95075..bef2f36 100644
@@ -98,8 +98,8 @@ do_install () {
  install -m 0644 ${WORKDIR}/o3/modules/o3.js ${D}${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/o3.js
  install -m 0755 ${WORKDIR}/o3/o3.node ${D}${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/o3.node
 
- install -m 0755 -d ${D}${base_libdir}/systemd/system
- install -m 0644 ${WORKDIR}/cloud9.service ${D}${base_libdir}/systemd/system/
+ install -m 0755 -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cloud9.service ${D}${systemd_unitdir}/system/
 
   install -m 0755 -d ${D}${sysconfdir}/avahi/services/
   install -m 0644 ${WORKDIR}/cloud9-avahi.service ${D}${sysconfdir}/avahi/services/
@@ -109,7 +109,7 @@ FILES_${PN}-dbg += "${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/o
                     ${datadir}/cloud9/support/jsdav/support/node-o3-xml-v4/lib/.debug \
                    "
 
-FILES_${PN} += "${base_libdir}/systemd/system"
+FILES_${PN} += "${systemd_unitdir}/system"
 RDEPENDS_${PN} = "nodejs gzip"
 
 inherit systemd
meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb +4 -4
index 063d82a..292a1f6 100644
@@ -29,14 +29,14 @@ do_install_append() {
 	install -d ${D}/${sysconfdir}/network/if-up.d
 	install -m 755 ${WORKDIR}/ntpdate ${D}/${sysconfdir}/network/if-up.d
 
-	install -d ${D}${base_libdir}/systemd/system
-	install -m 0644 ${WORKDIR}/ntpdate.service ${D}${base_libdir}/systemd/system/
-	install -m 0644 ${WORKDIR}/ntpd.service ${D}${base_libdir}/systemd/system/
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
+	install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
 }
 
 PACKAGES =+ "${PN}-systemd"
 
-FILES_${PN}-systemd = "${base_libdir}/systemd/system/"
+FILES_${PN}-systemd = "${systemd_unitdir}/system/"
 RDEPENDS_${PN}-systemd = "${PN}"
 
 FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace"
Signature · 1 line
1.7.8.4
#28 lore raw

Re: [meta-oe][PATCH] gateone, networkmanager, cloud9, ntp: use systemd_unitdir variable

Quoted 2 lines · Martin Jansa

* maybe we should move systemd_unitdir definition outside systemd.bbclass because it's used in few more recipes which doesn't inherit systemd

Please split this patch and do PR bump so we get them rebuild.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#29 lore raw

Re: [meta-oe][PATCH] gateone, networkmanager, cloud9, ntp: use systemd_unitdir variable

Quoted 5 lines · Otavio Salvador
Quoted 2 lines · Martin Jansa

* maybe we should move systemd_unitdir definition outside systemd.bbclass because it's used in few more recipes which doesn't inherit systemd

Please split this patch and do PR bump so we get them rebuild.

why? the output is 100% the same.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#30 lore raw

Re: [meta-oe][PATCH] gateone, networkmanager, cloud9, ntp: use systemd_unitdir variable

Quoted 8 lines · Martin Jansa
Quoted 5 lines · Otavio Salvador
Quoted 2 lines · Martin Jansa

* maybe we should move systemd_unitdir definition outside systemd.bbclass because it's used in few more recipes which doesn't inherit systemd

Please split this patch and do PR bump so we get them rebuild.

why? the output is 100% the same.

Well; from previous experience any change can have strange results so I'd prefer to build them again.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#31 lore raw

Re: [meta-oe][PATCH] gateone, networkmanager, cloud9, ntp: use systemd_unitdir variable

Quoted 6 lines · Otavio Salvador
Quoted 5 lines · Martin Jansa
Quoted 4 lines · Otavio Salvador
Quoted 2 lines · Martin Jansa

* maybe we should move systemd_unitdir definition outside systemd.bbclass because it's used in few more recipes which doesn't inherit systemd

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Please split this patch and do PR bump so we get them rebuild.

why? the output is 100% the same.

Well; from previous experience any change can have strange results so I'd prefer to build them again.

splitted and with PR bumps in contrib/jansa/pull

Cheers,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#32 lore raw

Re: [meta-oe][PATCH] gateone, networkmanager, cloud9, ntp: use systemd_unitdir variable

Quoted 1 line · Martin Jansa

splitted and with PR bumps in contrib/jansa/pull

I think Koen would prefer if you resend them so he can get them from patchwork. Not sure though...

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#33 lore raw

Re: [meta-oe][PATCH] gateone, networkmanager, cloud9, ntp: use systemd_unitdir variable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 23-02-12 15:58, Otavio Salvador schreef:

Quoted 6 lines
Quoted 1 line · Martin Jansa

splitted and with PR bumps in contrib/jansa/pull

I think Koen would prefer if you resend them so he can get them from patchwork. Not sure though...

I'm fine with jansa/pull as well. As a rule of thumb: resending allows more people to review them again.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAk9GXtkACgkQMkyGM64RGpHLXACgqZNixEjxlA2vC4/8dy264qoz 36sAoLi9mt5kyUTIPjIPDHP5Do7ZHbCE
=mlVt
-----END PGP SIGNATURE-----

#34 lore raw

Re: [meta-oe][PATCH] gateone, networkmanager, cloud9, ntp: use systemd_unitdir variable

Quoted 6 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 23-02-12 15:58, Otavio Salvador schreef:

Quoted 2 lines

On Thu, Feb 23, 2012 at 12:53, Martin Jansa <[email protected]> wrote:

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

splitted and with PR bumps in contrib/jansa/pull

I think Koen would prefer if you resend them so he can get them from patchwork. Not sure though...

I'm fine with jansa/pull as well. As a rule of thumb: resending allows more people to review them again.

OK, will resend

will remove not changed patches from pull-* so they are not resent by send-pull-request (probably easiest way to send new patches in same branch without spamming ML with patches which weren't changed at all)

Cheers,

Quoted 14 lines

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAk9GXtkACgkQMkyGM64RGpHLXACgqZNixEjxlA2vC4/8dy264qoz 36sAoLi9mt5kyUTIPjIPDHP5Do7ZHbCE
=mlVt
-----END PGP SIGNATURE-----

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#35 lore raw
In reply to Otavio Salvador
Quoted 22 lines · Otavio Salvador
Quoted 2 lines · Andreas Müller

V2 -> V3:
(Hopefully) all suggestions and comments were incorporated  / rebased

This patchset is ready for merging IMO.

Checking remaining recipes that might be change to use ${systemd_unitdir} I found:

meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb meta-oe/recipes-connectivity/cherokee/cherokee.inc meta-oe/recipes-connectivity/gateone/gateone_git.bb meta-oe/recipes-core/systemd/systemd-compat-units.bb meta-oe/recipes-core/systemd/systemd-serialgetty.bb meta-oe/recipes-core/systemd/systemd_git.bb meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb meta-oe/recipes-extended/lighttpd/lighttpd_1.4.30.bbappend meta-oe/recipes-graphics/dietsplash/dietsplash_git.bb meta-oe/recipes-graphics/slim/slim_1.3.2.bb meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb

Quoted 2 lines

I dropped udev ones as I am working on them :-)

I had these in my first RFC series - most of them can be taken without modification - I think. But as mentioned, I left them out here because I wanted to wait for a solution for ?-FEATURE to avoid modifying tons of tasks/images spreaded on different layers. Is there a solution on scratch?

Andreas