systemd / initmanager rework
cover systemd / initmanager rework
The RFC series is intended to
* reduce efforts/pitfalls when implementing native systemd support
* enable a global configuration for selecting of systemd/syvinit (sysvinit needs further efforts)
The whole series' can be found at (branches 'systemd'
meta-oe: git://gitorious.org/schnitzeltony-oe-meta/meta-openembedded-systemd.git
meta-angstrom: git://gitorious.org/schnitzeltony-oe-meta/meta-angstrom-systemd.git
Notes:
* These are my first python experiences - suggestions welcome.
* In local.conf (or in distro) the configuration variable INIT_MANAGER selects the initmanager to be build into an image. When changing the selection, a build from scratch is required. INIT_MANAGER currently defaults to systemd (see image.bbclass and initmanager.bbclass)
* In systemd.bbclass debug messages were left in to have a better overview what's going on.
* An additional patch series goes out for meta-angstrom.
* This is a huge RFC which might cause serious impacts. What I have already detected after a build from scatch is that /var/lib/opkg is missing in the image (although it can be found in libopkg.ipk). I will spend the next days with my new friend buildhistory (thanks for this!!).
Comments welcome
Andreas Müller (27):
systemd.bbclass: rework
initmanager.bbclass: inital add
image.bbclass: inherit initmanager.bbclass and set default value for
IMAGE_INIT_MANAGER
elsa: remove unneeded systemd code
connman: remove unneeded systemd code
openssh: remove unneeded systemd code
gateone: remove unneeded systemd code
cronie: remove unneeded systemd code
xserver-nodm-init: remove unneeded systemd code
busybox: remove unneeded systemd code
atftp: remove unneeded systemd code
gpsd: remove unneeded systemd code
gdm: inherit systemd / remove unneeded systemd code
dropbear: remove unneeded systemd code
cloud9: pack systemd support in ${PN}-systemd / remove unneeded
systemd code
slim: inherit systemd / remove unneeded systemd code
udisks: conditional DEPENDS systemd / remove unneeded systemd code
rsyslog: conditional DEPENDS systemd / remove unneeded systemd code
polkit: conditional DEPEND systemd
syslog-ng: conditional --enable-systemd --with-systemdsystemunitdir /
remove unneeded systemd code
lighthttpd: inherit systemd / added systemd native support / remove
unneeded systemd code
cherokee: inherit systemd / added systemd native support / remove
unneeded systemd code
networkmanager: inherit systemd / added
NetworkManager-wait-online.service / remove unneeded systemd code
ntp: add native systemd support for ntpdate / remove unneeded systemd
code
dhcp: add native support for dhcp-relay / remove unneeded systemd
code
task-basic: replace systemd specific packets by common ones /
conditionally RDEPENDS avahi(-systemd) systemd-compat-units
task-x11: replace systemd specific packets by common ones
meta-efl/recipes-efl/efl/elsa_svn.bb | 11 +- meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb | 32 +-- meta-oe/classes/image.bbclass | 382 ++++++++++++++++++++ meta-oe/classes/initmanager.bbclass | 10 + meta-oe/classes/systemd.bbclass | 173 ++++++++-- meta-oe/recipes-connectivity/cherokee/cherokee.inc | 11 +- .../connman/connman_0.78.bbappend | 7 +- .../recipes-connectivity/dhcp/dhcp_4.2.0.bbappend | 16 +- .../dhcp/files/dhcrelay.service | 10 + .../recipes-connectivity/gateone/gateone_git.bb | 7 +- .../networkmanager/networkmanager_0.9.2.0.bb | 26 +- .../openssh/openssh_5.9p1.bbappend | 14 +- .../recipes-core/busybox/busybox_1.19.3.bbappend | 6 - .../dropbear/dropbear_2011.54.bbappend | 10 +- meta-oe/recipes-core/tasks/task-basic.bb | 10 +- meta-oe/recipes-core/tasks/task-x11_1.0.bb | 4 +- meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb | 10 +- meta-oe/recipes-extended/atftp/atftp_0.7.bb | 10 +- .../recipes-extended/cronie/cronie_1.4.8.bbappend | 12 +- .../lighttpd/lighttpd_1.4.30.bbappend | 14 +- .../recipes-extended/polkit/polkit_0.104.bbappend | 5 + meta-oe/recipes-extended/rsyslog/rsyslog.inc | 9 +- meta-oe/recipes-graphics/slim/slim_1.3.2.bb | 9 +- .../xserver-nodm-init/xserver-nodm-init_2.0.bb | 10 +- meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb | 12 +- meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb | 14 +- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 10 +- meta-oe/recipes-support/udisks/udisks_1.0.4.bb | 11 +- 28 files changed, 620 insertions(+), 235 deletions(-) create mode 100644 meta-oe/classes/image.bbclass create mode 100644 meta-oe/classes/initmanager.bbclass create mode 100644 meta-oe/recipes-connectivity/dhcp/files/dhcrelay.service create mode 100644 meta-oe/recipes-extended/polkit/polkit_0.104.bbappend
Signature · 1 line
1.7.6.4
RFC 1/27 systemd.bbclass: rework
let systemd.bbclass do more for us and prepare support images without systemd
* introduce a global variable INIT_MANAGER. For images using systemd, this must contain 'systemd'. This varibale can e.g be set to default in local.conf and then overridden by distro.
* handle multiple entries in SYSTEMD_SERVICE. Currenly there are no use cases but networkmanager has potential requirements
* handle multiple entries in SYSTEMD_PACKAGES. Possible use cases are dhcp/dhcp-relay and ntp/ntpdate
* enhance the checks for SYSTEMD_PACKAGES and SYSTEMD_SERVICE. For package names only <name-of-an-existing-package>-systemd or ${PN} are allowed. In case of using ${PN} a warning is spitted. This was introduced to force recipe maintainers to separate out systemd to own package.
* all systemd packages are automatically created based on SYSTEMD_PACKAGES
* for systemd packets and their base packages RDEPENDS/RRECOMMENDS are automatically extended. Hereby it is ensured that all packets for proper systemd operation find their way into the image. Nice side effect:
if in all tasks/images the base packets are include insted of *-systemd it is only a matter of INIT_MANAGER if systemd-packets are imaged.
* all *.socket and *.service files included by SRC_URI are automatically installed from WORKDIR.
* remove systemd from DEPENDS. Recipes requiring systemd at buildtime, should take care themselves.
--- meta-oe/classes/systemd.bbclass | 173 +++++++++++++++++++++++++++++++++----- 1 files changed, 150 insertions(+), 23 deletions(-)
meta-oe/classes/systemd.bbclass +150 -23
@@ -1,5 +1,6 @@ -DEPENDS_append = " systemd systemd-systemctl-native" +DEPENDS_append = " systemd-systemctl-native" +# pre/post-inst/rm for each entry in SYSTEMD_SERVICE systemd_postinst() { OPTS=""
@@ -7,34 +8,95 @@ if [ -n "$D" ]; then OPTS="--root=$D" fi -systemctl $OPTS enable ${SYSTEMD_SERVICE} +for service in ${SYSTEMD_SERVICE} ; do + systemctl $OPTS enable $service +done if [ -z "$D" ]; then - systemctl start ${SYSTEMD_SERVICE} + for service in ${SYSTEMD_SERVICE} ; do + systemctl start $service + done fi } systemd_prerm() { if [ -z "$D" ]; then - systemctl stop ${SYSTEMD_SERVICE} + for service in ${SYSTEMD_SERVICE} ; do + systemctl stop $service + done fi } systemd_postrm() { -systemctl disable ${SYSTEMD_SERVICE} +for service in ${SYSTEMD_SERVICE} ; do + systemctl disable $service +done } 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(): + # not for native / only at parse time + if d.getVar('BPN', 1) + "-native" != d.getVar('PN', 1) and d.getVar('BB_WORKERCONTEXT', True) is None: + 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 <base-package-using-systemd>-systemd or ${PN} (deprecated)" % + (bb_filename, pkg_systemd)) + else: + bb.warn("%s: it is recommended to set SYSTEMD_PACKAGES as <base-package-using-systemd>-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 <base-package-using-systemd>-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) + + # prepend 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() + systemd_pkgs = d.getVar('SYSTEMD_PACKAGES', 1) + for pkg_systemd in systemd_pkgs.split(): + systemd_create_package(pkg_systemd) + python __anonymous() { - systemd_after_parse(d) + systemd_after_parse(d) +} + +# automatically install all *.service and *.socket supplied in SRC_URI +do_install_append() { + install -d ${D}${base_libdir}/systemd/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}${base_libdir}/systemd/system + fi + done } python populate_packages_prepend () { - def systemd_package(pkg): + def systemd_prepost_instrm(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)
@@ -45,7 +107,7 @@ python populate_packages_prepend () { systemd postinst is appended here because pkg_postinst may require to execute on the target. Not doing so may cause systemd postinst invoked twice to cause unwanted warnings. - """ + """ postinst = bb.data.getVar('pkg_postinst', localdata, 1) if not postinst: postinst = '#!/bin/sh\n'
@@ -58,23 +120,88 @@ 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 "") rdepends.append("systemd") bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d) + """ Setup rdepends / rrecommmends as: + + ----------------------------- + | pkg_systemd_base: 'foo' | + ----------------------------- + | ^ + | | -------------- + rrecommends | | rdepends | 'systemd' | + | | ->-------------- + V | / rdepends + ------------------------------/ + | pkg_systemd: 'foo-systemd' | + ------------------------------ + """ + def systemd_rdepend_rrecommends(pkg_systemd): + pn_pkg = d.getVar('PN', 1) + # RDEPENDS_${pkg_systemd} += pkg_systemd_base systemd + rdepends = explode_deps(d.getVar('RDEPENDS_' + pkg_systemd, 1) or "") + if not 'systemd' in rdepends: + rdepends.append('systemd') + pkg_systemd_base = pkg_systemd.replace('-systemd', '') + # not rdepending myself / avoid double entries + if pkg_systemd != pn_pkg and not pkg_systemd_base in rdepends: + rdepends.append(pkg_systemd_base) + d.setVar('RDEPENDS_' + pkg_systemd, " " + " ".join(rdepends)) + # default: just a suggestion - to be discussed? + initmanager = d.getVar('INIT_MANAGER', 1) or 'systemd' + # RRECOMMENDS_${pkg_systemd_base} += pkg_systemd systemd + if initmanager == 'systemd': + rrecommends = explode_deps(d.getVar('RRECOMMENDS_' + pkg_systemd_base, 1) or "") + # not rrecommending myself / avoid double entries + if pkg_systemd != pn_pkg and not pkg_systemd in rrecommends: + rrecommends.append(pkg_systemd) + d.setVar('RRECOMMENDS_' + pkg_systemd_base, " " + " ".join(rrecommends)) + + # append systemd files to FILES_*-systemd + def systemd_files(pkg_systemd): + systemd_services = d.getVar('SYSTEMD_SERVICE' + "_" + pkg_systemd, 1) or d.getVar('SYSTEMD_SERVICE', 1) + files_append = "" + if len(systemd_pkgs.split()) == 1: + # distribute complete ${base_libdir}/systemd/system/ to ${SYSTEMD_PACKAGES} + files_append = '${base_libdir}/systemd/system/' + else: + # distribute files set in SYSTEMD_SERVICE to ${SYSTEMD_PACKAGES} + for service in systemd_services.split(): + files_append += " ${base_libdir}/systemd/system/" + service + + var_name = "FILES_" + pkg_systemd + files = d.getVar(var_name, 0) or "" + d.setVar(var_name, "%s %s" % (files, files_append)) + + + systemd_pkgs = d.getVar('SYSTEMD_PACKAGES', 1) + for pkg_systemd in systemd_pkgs.split(): + systemd_prepost_instrm(pkg_systemd) + systemd_rdepend_rrecommends(pkg_systemd) + systemd_files(pkg_systemd) - 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) + # temporary debug output found in do_package.log + pn_pkg = d.getVar('PN', 1) + print 'base-package info:' + print 'DEPENDS: %s' % d.getVar('DEPENDS', 1) + print 'PACKAGES: %s' % d.getVar('PACKAGES', 1) + print 'RDEPENDS_%s: %s' % (pn_pkg, d.getVar('RDEPENDS_' + pn_pkg, 1)) + print 'RRECOMMENDS_%s: %s' % (pn_pkg, d.getVar('RRECOMMENDS_' + pn_pkg, 1)) + print 'systemd-(base-)-packages info:' + for pkg_systemd in systemd_pkgs.split(): + pkg_systemd_base = pkg_systemd.replace('-systemd', '') + print 'RDEPENDS_%s: %s' % (pkg_systemd_base, d.getVar('RDEPENDS_' + pkg_systemd_base, 1)) + print 'RDEPENDS_%s: %s' % (pkg_systemd, d.getVar('RDEPENDS_' + pkg_systemd, 1)) + print 'RRECOMMENDS_%s: %s' % (pkg_systemd_base, d.getVar('RRECOMMENDS_' + pkg_systemd_base, 1)) + print 'RRECOMMENDS_%s: %s' % (pkg_systemd, d.getVar('RRECOMMENDS_' + pkg_systemd, 1)) + print 'FILES_%s: %s' % (pkg_systemd_base, d.getVar('FILES_' + pkg_systemd_base, 1)) + print 'FILES_%s: %s' % (pkg_systemd, d.getVar('FILES_' + pkg_systemd, 1)) }
Signature · 1 line
1.7.6.4
Re: [meta-oe][RFC 01/27] systemd.bbclass: rework
On Tue, Feb 7, 2012 at 4:12 PM, Andreas Müller <[email protected]> wrote:
Apart from the NAKed distro setting and automatic DEPENDS - are there comments on the other:
let systemd.bbclass do more for us
Quoted 10 lines
* handle multiple entries in
SYSTEMD_SERVICE. Currenly there are no use cases but networkmanager has potential requirements
* handle multiple entries inSYSTEMD_PACKAGES. Possible use cases are dhcp/dhcp-relay and ntp/ntpdate
* enhance the checks forSYSTEMD_PACKAGESandSYSTEMD_SERVICE. For package names only <name-of-an-existing-package>-systemd or ${PN} are allowed. In case of using ${PN} a warning is spitted. This was introduced to force recipe maintainers to separate out systemd to own package.
* all systemd packages are automatically created based onSYSTEMD_PACKAGES
* for systemd packets automatically add RDEPENDS to base packages
Quoted 2 lines
* all *.socket and *.service files included by
SRC_URIare automatically installed from WORKDIR.
would it make sense to split this up and resend?
Andreas
Re: [meta-oe][RFC 01/27] systemd.bbclass: rework
Quoted 1 line · Andreas Müller
would it make sense to split this up and resend?
I'd love if you could split the changes so we can get those merged one by one.
Specially about the multiple service support, the right place to fix it is in the systemd-systemctl-native script adding support for it to deal with one more service at time, as is supported by the real tool.
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
RFC 2/27 initmanager.bbclass: inital add
In reply to Andreas Müllerinitmanager_packets(d): returns the required initmanager-packets. The result is based upon INIT_MANAGER. Currently the values 'systemd' and 'sysvinit' are supported for INIT_MANAGER.
--- meta-oe/classes/initmanager.bbclass | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) create mode 100644 meta-oe/classes/initmanager.bbclass
meta-oe/classes/initmanager.bbclass new file +10 -0
@@ -0,0 +1,10 @@ +# returns the packets initmanager requires in image +def initmanager_packets(d): + init_manager = d.getVar('INIT_MANAGER', 0) or "" + # default: just a suggestion - to be discussed? + pks_initmanager = 'systemd' + if init_manager == 'systemd': + pks_initmanager = 'systemd' + elif init_manager == 'sysvinit': + pks_initmanager = 'sysvinit sysvinit-pidof' + return pks_initmanager
Signature · 1 line
1.7.6.4
Re: [meta-oe][RFC 02/27] initmanager.bbclass: inital add
Quoted 16 lines · On Tuesday 07 February 2012 16:12:28 Andreas Müller wrote:
initmanager_packets(d): returns the required initmanager-packets. The result is based uponINIT_MANAGER. Currently the values 'systemd' and 'sysvinit' are supported forINIT_MANAGER.Signed-off-by Andreas Müller <[email protected]>--- meta-oe/classes/initmanager.bbclass | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) create mode 100644 meta-oe/classes/initmanager.bbclass(quoted diff) +0
-0b/meta-oe/classes/initmanager.bbclass new file mode 100644 index 0000000..2f8e2ce
meta-oe/classes/initmanager.bbclass line 10
Quoted 10 lines
meta-oe/classes/initmanager.bbclass new file +10
-0@@ -0,0 +1,10 @@ +# returns the packets initmanager requires in image +def initmanager_packets(d): + init_manager = d.getVar('INIT_MANAGER', 0) or "" + # default: just a suggestion - to be discussed? + pks_initmanager = 'systemd' + if init_manager == 'systemd': + pks_initmanager = 'systemd' + elif init_manager == 'sysvinit': + pks_initmanager = 'sysvinit sysvinit-pidof' + return pks_initmanager
Would it be possible to turn this on its head and merge systemd.bbclass/update-rc.d.bbclass into one so that it does the appropriate thing for whatever INIT_MANAGER is set to for every recipe that uses it?
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [meta-oe][RFC 02/27] initmanager.bbclass: inital add
Quoted 5 lines · Paul Eggleton
Would it be possible to turn this on its head and merge systemd.bbclass/update-rc.d.bbclass into one so that it does the appropriate
thing for whateverINIT_MANAGERis set to for every recipe that uses it?
I'd say initmanager.bbclass ought to inherit both and handle the packaging for both. As Koen said, I'd prefer to have it as an image decision not an distro decision. We might not build one, if distro drops the feature but by default both ought to be build IMO.
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
Re: [meta-oe][RFC 02/27] initmanager.bbclass: inital add
Quoted 9 lines · Otavio Salvador
Quoted 5 lines · Paul Eggleton
Would it be possible to turn this on its head and merge systemd.bbclass/update-rc.d.bbclass into one so that it does the appropriate
thing for whateverINIT_MANAGERis set to for every recipe that uses it?
Quoted 4 lines
I'd say initmanager.bbclass ought to inherit both and handle the packaging for both. As Koen said, I'd prefer to have it as an image decision not an distro decision. We might not build one, if distro drops the feature but by default both ought to be build IMO.
some of packages depend on availability of one or another e.g. systemd if present some recipes compile one way otherwise not
so a distro using same tmpdir to spit out two images with two different init managers can be a challage
RFC 3/27 image.bbclass: inherit initmanager.bbclass and set default value for IMAGE_INIT_MANAGER
In reply to Andreas MüllerThis is a copy of image.bbclass with only a few lines added. These are marked.
--- meta-oe/classes/image.bbclass | 382 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 382 insertions(+), 0 deletions(-) create mode 100644 meta-oe/classes/image.bbclass
meta-oe/classes/image.bbclass new file +382 -0
@@ -0,0 +1,382 @@ +inherit rootfs_${IMAGE_PKGTYPE} + +IMAGETEST ?= "dummy" +inherit imagetest-${IMAGETEST} + +# systemd / sysvinit change start +############################################################################### +inherit initmanager +IMAGE_INIT_MANAGER ?= "${@initmanager_packets(d)}" +############################################################################### +# systemd / sysvinit change end + +LICENSE = "MIT" +PACKAGES = "" +RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${NORMAL_FEATURE_INSTALL}" +RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}" + +INHIBIT_DEFAULT_DEPS = "1" + +# IMAGE_FEATURES may contain any available package group +IMAGE_FEATURES ?= "" +IMAGE_FEATURES[type] = "list" + +# packages to install from features +FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" +FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" + +# packages to install from features, excluding dev/dbg/doc +NORMAL_FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(normal_groups(d), d))}" +NORMAL_FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(normal_groups(d), d))}" + +def normal_groups(d): + """Return all the IMAGE_FEATURES, with the exception of our special package groups""" + extras = set(['dev-pkgs', 'doc-pkgs', 'dbg-pkgs']) + features = set(oe.data.typed_value('IMAGE_FEATURES', d)) + return features.difference(extras) + +def normal_pkgs_to_install(d): + import oe.packagedata + + to_install = oe.data.typed_value('IMAGE_INSTALL', d) + features = normal_groups(d) + required = list(oe.packagegroup.required_packages(features, d)) + optional = list(oe.packagegroup.optional_packages(features, d)) + all_packages = to_install + required + optional + + recipes = filter(None, [oe.packagedata.recipename(pkg, d) for pkg in all_packages]) + + return all_packages + recipes + +PACKAGE_GROUP_dbg-pkgs = "${@' '.join('%s-dbg' % pkg for pkg in normal_pkgs_to_install(d))}" +PACKAGE_GROUP_dbg-pkgs[optional] = "1" +PACKAGE_GROUP_dev-pkgs = "${@' '.join('%s-dev' % pkg for pkg in normal_pkgs_to_install(d))}" +PACKAGE_GROUP_dev-pkgs[optional] = "1" +PACKAGE_GROUP_doc-pkgs = "${@' '.join('%s-doc' % pkg for pkg in normal_pkgs_to_install(d))}" +PACKAGE_GROUP_doc-pkgs[optional] = "1" + +# "export IMAGE_BASENAME" not supported at this time +IMAGE_INSTALL ?= "" +IMAGE_INSTALL[type] = "list" +IMAGE_BASENAME[export] = "1" +export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${FEATURE_INSTALL}" +PACKAGE_INSTALL_ATTEMPTONLY ?= "${FEATURE_INSTALL_OPTIONAL}" + +# Images are generally built explicitly, do not need to be part of world. +EXCLUDE_FROM_WORLD = "1" + +USE_DEVFS ?= "0" + +PID = "${@os.getpid()}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +LDCONFIGDEPEND ?= "ldconfig-native:do_populate_sysroot" +LDCONFIGDEPEND_libc-uclibc = "" + +do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot ${LDCONFIGDEPEND}" +do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot" + +IMAGE_TYPE = ${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)} +inherit image-${IMAGE_TYPE} + +python () { + deps = d.getVarFlag('do_rootfs', 'depends') or "" + for type in (d.getVar('IMAGE_FSTYPES', True) or "").split(): + for dep in ((d.getVar('IMAGE_DEPENDS_%s' % type) or "").split() or []): + deps += " %s:do_populate_sysroot" % dep + for dep in (d.getVar('EXTRA_IMAGEDEPENDS', True) or "").split(): + deps += " %s:do_populate_sysroot" % dep + d.setVarFlag('do_rootfs', 'depends', deps) + + # If we don't do this we try and run the mapping hooks while parsing which is slow + # bitbake should really provide something to let us know this... + if d.getVar('BB_WORKERCONTEXT', True) is not None: + runtime_mapping_rename("PACKAGE_INSTALL", d) + runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", d) +} + +# +# Get a list of files containing device tables to create. +# * IMAGE_DEVICE_TABLE is the old name to an absolute path to a device table file +# * IMAGE_DEVICE_TABLES is a new name for a file, or list of files, seached +# for in the BBPATH +# If neither are specified then the default name of files/device_table-minimal.txt +# is searched for in the BBPATH (same as the old version.) +# +def get_devtable_list(d): + devtable = d.getVar('IMAGE_DEVICE_TABLE', 1) + if devtable != None: + return devtable + str = "" + devtables = d.getVar('IMAGE_DEVICE_TABLES', 1) + if devtables == None: + devtables = 'files/device_table-minimal.txt' + for devtable in devtables.split(): + str += " %s" % bb.which(d.getVar('BBPATH', 1), devtable) + return str + +IMAGE_CLASSES ?= "image_types" +inherit ${IMAGE_CLASSES} + +IMAGE_POSTPROCESS_COMMAND ?= "" +MACHINE_POSTPROCESS_COMMAND ?= "" +ROOTFS_POSTPROCESS_COMMAND ?= "" + +# some default locales +IMAGE_LINGUAS ?= "de-de fr-fr en-gb" + +LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS', 1).split()))}" + +PSEUDO_PASSWD = "${IMAGE_ROOTFS}" + +do_rootfs[nostamp] = "1" +do_rootfs[dirs] = "${TOPDIR}" +do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock" +do_build[nostamp] = "1" + +# Must call real_do_rootfs() from inside here, rather than as a separate +# task, so that we have a single fakeroot context for the whole process. +do_rootfs[umask] = 022 + +fakeroot do_rootfs () { + #set -x + # When use the rpm incremental image generation, don't remove the rootfs + if [ "${INC_RPM_IMAGE_GEN}" != "1" -o "${IMAGE_PKGTYPE}" != "rpm" ]; then + rm -rf ${IMAGE_ROOTFS} + fi + rm -rf ${MULTILIB_TEMP_ROOTFS} + mkdir -p ${IMAGE_ROOTFS} + mkdir -p ${DEPLOY_DIR_IMAGE} + + cp ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOY_DIR_IMAGE}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt + + # If "${IMAGE_ROOTFS}/dev" exists, then the device had been made by + # the previous build + if [ "${USE_DEVFS}" != "1" -a ! -r "${IMAGE_ROOTFS}/dev" ]; then + for devtable in ${@get_devtable_list(d)}; do + # Always return ture since there maybe already one when use the + # incremental image generation + makedevs -r ${IMAGE_ROOTFS} -D $devtable + done + fi + + rootfs_${IMAGE_PKGTYPE}_do_rootfs + + insert_feed_uris + + if [ "x${LDCONFIGDEPEND}" != "x" ]; then + # Run ldconfig on the image to create a valid cache + # (new format for cross arch compatibility) + echo executing: ldconfig -r ${IMAGE_ROOTFS} -c new -v + ldconfig -r ${IMAGE_ROOTFS} -c new -v + fi + + # (re)create kernel modules dependencies + # This part is done by kernel-module-* postinstall scripts but if image do + # not contains modules at all there are few moments in boot sequence with + # "unable to open modules.dep" message. + if [ -e ${STAGING_KERNEL_DIR}/kernel-abiversion ]; then + KERNEL_VERSION=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion` + + mkdir -p ${IMAGE_ROOTFS}/lib/modules/$KERNEL_VERSION + ${TARGET_PREFIX}depmod -a -b ${IMAGE_ROOTFS} -F ${STAGING_KERNEL_DIR}/System.map-$KERNEL_VERSION $KERNEL_VERSION + fi + + ${IMAGE_PREPROCESS_COMMAND} + + ${@get_imagecmds(d)} + + ${IMAGE_POSTPROCESS_COMMAND} + + ${MACHINE_POSTPROCESS_COMMAND} +} + +insert_feed_uris () { + + echo "Building feeds for [${DISTRO}].." + + for line in ${FEED_URIS} + do + # strip leading and trailing spaces/tabs, then split into name and uri + line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`" + feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`" + feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`" + + echo "Added $feed_name feed with URL $feed_uri" + + # insert new feed-sources + echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/opkg/${feed_name}-feed.conf + done +} + +log_check() { + for target in $* + do + lf_path="${WORKDIR}/temp/log.do_$target.${PID}" + + echo "log_check: Using $lf_path as logfile" + + if test -e "$lf_path" + then + ${IMAGE_PKGTYPE}_log_check $target $lf_path + else + echo "Cannot find logfile [$lf_path]" + fi + echo "Logfile is clean" + done +} + +MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|" +MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" +MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" + +multilib_generate_python_file() { + cat >${MULTILIB_CHECK_FILE} <<EOF +import sys, os, os.path +import re,filecmp + +allow_rep=re.compile(re.sub("\|$","","${MULTILIBRE_ALLOW_REP}")) +error_promt="Multilib check error:" + +files={} +dirs=raw_input() +for dir in dirs.split(): + for root, subfolers, subfiles in os.walk(dir): + for file in subfiles: + item=os.path.join(root,file) + key=str(os.path.join("/",os.path.relpath(item,dir))) + + valid=True; + if files.has_key(key): + #check whether the file is allow to replace + if allow_rep.match(key): + valid=True + else: + if not filecmp.cmp(files[key],item): + valid=False + print("%s duplicate files %s %s is not the same\n" % (error_promt, item, files[key])) + sys.exit(1) + + #pass the check, add to list + if valid: + files[key]=item +EOF +} + +multilib_sanity_check() { + multilib_generate_python_file + echo $@ | python ${MULTILIB_CHECK_FILE} +} + +get_split_linguas() { + for translation in ${IMAGE_LINGUAS}; do + translation_split=$(echo ${translation} | awk -F '-' '{print $1}') + echo ${translation} + echo ${translation_split} + done | sort | uniq +} + +rootfs_install_all_locales() { + # Generate list of installed packages for which additional locale packages might be available + INSTALLED_PACKAGES=`list_installed_packages | egrep -v -- "(-locale-|^locale-base-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` + + # Generate a list of locale packages that exist + SPLIT_LINGUAS=`get_split_linguas` + PACKAGES_TO_INSTALL="" + for lang in $SPLIT_LINGUAS; do + for pkg in $INSTALLED_PACKAGES; do + existing_pkg=`rootfs_check_package_exists $pkg-locale-$lang` + if [ "$existing_pkg" != "" ]; then + PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL $existing_pkg" + fi + done + done + + # Install the packages, if any + if [ "$PACKAGES_TO_INSTALL" != "" ]; then + rootfs_install_packages $PACKAGES_TO_INSTALL + fi + + # Workaround for broken shell function dependencies + if false ; then + get_split_linguas + list_installed_packages + rootfs_check_package_exists + fi +} + +# set '*' as the root password so the images +# can decide if they want it or not +zap_root_password () { + sed 's%^root:[^:]*:%root:*:%' < ${IMAGE_ROOTFS}/etc/passwd >${IMAGE_ROOTFS}/etc/passwd.new + mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd +} + +# Turn any symbolic /sbin/init link into a file +remove_init_link () { + if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then + LINKFILE=${IMAGE_ROOTFS}`readlink ${IMAGE_ROOTFS}/sbin/init` + rm ${IMAGE_ROOTFS}/sbin/init + cp $LINKFILE ${IMAGE_ROOTFS}/sbin/init + fi +} + +make_zimage_symlink_relative () { + if [ -L ${IMAGE_ROOTFS}/boot/zImage ]; then + (cd ${IMAGE_ROOTFS}/boot/ && for i in `ls zImage-* | sort`; do ln -sf $i zImage; done) + fi +} + +write_image_manifest () { + rootfs_${IMAGE_PKGTYPE}_write_manifest + + rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.manifest + ln -s ${IMAGE_NAME}.rootfs.manifest ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.manifest +} + +# Make login manager(s) enable automatic login. +# Useful for devices where we do not want to log in at all (e.g. phones) +set_image_autologin () { + sed -i 's%^AUTOLOGIN=\"false"%AUTOLOGIN="true"%g' ${IMAGE_ROOTFS}/etc/sysconfig/gpelogin +} + +# Can be use to create /etc/timestamp during image construction to give a reasonably +# sane default time setting +rootfs_update_timestamp () { + date -u +%2m%2d%2H%2M%4Y >${IMAGE_ROOTFS}/etc/timestamp +} + +# Prevent X from being started +rootfs_no_x_startup () { + if [ -f ${IMAGE_ROOTFS}/etc/init.d/xserver-nodm ]; then + chmod a-x ${IMAGE_ROOTFS}/etc/init.d/xserver-nodm + fi +} + +rootfs_trim_schemas () { + for schema in ${IMAGE_ROOTFS}/etc/gconf/schemas/*.schemas + do + # Need this in case no files exist + if [ -e $schema ]; then + oe-trim-schemas $schema > $schema.new + mv $schema.new $schema + fi + done +} + +EXPORT_FUNCTIONS zap_root_password remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp rootfs_no_x_startup + +do_fetch[noexec] = "1" +do_unpack[noexec] = "1" +do_patch[noexec] = "1" +do_configure[noexec] = "1" +do_compile[noexec] = "1" +do_install[noexec] = "1" +do_populate_sysroot[noexec] = "1" +do_package[noexec] = "1" +do_package_write_ipk[noexec] = "1" +do_package_write_deb[noexec] = "1" +do_package_write_rpm[noexec] = "1" + +addtask rootfs before do_build
Signature · 1 line
1.7.6.4
Re: [meta-oe][RFC 03/27] image.bbclass: inherit initmanager.bbclass and set default value for IMAGE_INIT_MANAGER
Quoted 2 lines · On Tuesday 07 February 2012 16:12:29 Andreas Müller wrote:
This is a copy of image.bbclass with only a few lines added. These are marked.
I appreciate it's additonal work but can we avoid adding more overlayed classes in meta-oe? We really want to be reducing the number of these.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Re: [meta-oe][RFC 03/27] image.bbclass: inherit initmanager.bbclass and set default value for IMAGE_INIT_MANAGER
Quoted 7 lines · Paul Eggleton
Quoted 2 lines · On Tuesday 07 February 2012 16:12:29 Andreas Müller wrote:
This is a copy of image.bbclass with only a few lines added. These are marked.
I appreciate it's additonal work but can we avoid adding more overlayed classes in meta-oe? We really want to be reducing the number of these.
I'd also prefer it to be done on an OE-core branch and posted together.
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
RFC 4/27 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
@@ -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
RFC 5/27 connman: remove unneeded systemd code
In reply to Andreas Müller--- .../connman/connman_0.78.bbappend | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-)
meta-oe/recipes-connectivity/connman/connman_0.78.bbappend +1 -6
@@ -2,12 +2,7 @@ inherit systemd EXTRA_OECONF += "--with-systemdunitdir=${base_libdir}/systemd/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
RFC 6/27 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
@@ -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
RFC 7/27 gateone: remove unneeded systemd code
In reply to Andreas Müller--- .../recipes-connectivity/gateone/gateone_git.bb | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)
meta-oe/recipes-connectivity/gateone/gateone_git.bb +2 -5
@@ -2,7 +2,7 @@ DESCRIPTION = "HTML5 (plugin-free) web-based terminal emulator and SSH client" LICENSE = "AGPLv3" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=07d5a2790569bd3e3b422b69ccd43bec" -PR = "r15" +PR = "r16" PV = "0.9" SRCREV = "a68444610efa2892842893dae828a28527e64a6e"
@@ -20,14 +20,11 @@ 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}${sysconfdir}/avahi/services/ install -m 0644 ${WORKDIR}/gateone-avahi.service ${D}${sysconfdir}/avahi/services/ } -SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_PACKAGES = "${PN}-systemd" SYSTEMD_SERVICE = "gateone.service" FILES_${PN} = "${localstatedir}/lib ${localstatedir}/log ${base_libdir} ${sysconfdir}"
Signature · 1 line
1.7.6.4
RFC 8/27 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
@@ -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
RFC 9/27 xserver-nodm-init: remove unneeded systemd code
In reply to Andreas Müller--- .../xserver-nodm-init/xserver-nodm-init_2.0.bb | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)
meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb +1 -9
@@ -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,6 @@ 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
RFC 10/27 busybox: remove unneeded systemd code
In reply to Andreas Müller--- .../recipes-core/busybox/busybox_1.19.3.bbappend | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
meta-oe/recipes-core/busybox/busybox_1.19.3.bbappend +0 -6
@@ -15,7 +15,6 @@ SYSTEMD_SERVICE_${PN}-syslog-systemd = "busybox-syslog.service" do_install_append() { 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 sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
@@ -23,8 +22,3 @@ do_install_append() { ln -sf /dev/null ${D}${base_libdir}/systemd/system/syslog.service } - -PACKAGES += "${PN}-syslog-systemd" - -RDEPENDS_${PN}-syslog-systemd += "${PN}-syslog" -FILES_${PN}-syslog-systemd = "${base_libdir}/systemd"
Signature · 1 line
1.7.6.4
RFC 11/27 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
@@ -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
RFC 12/27 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
@@ -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
RFC 13/27 gdm: inherit systemd / remove unneeded systemd code
In reply to Andreas Müller--- meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb | 32 ++++----------------------- 1 files changed, 5 insertions(+), 27 deletions(-)
meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb +5 -27
@@ -4,9 +4,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "xinput gnome-panel tcp-wrappers libcanberra libxklavier grep consolekit libpam gnome-doc-utils gtk+ xrdb" -PR = "r5" +PR = "r6" -inherit gnome update-rc.d +inherit gnome update-rc.d systemd SRC_URI += " \ file://cross-xdetection.diff \
@@ -45,31 +45,6 @@ do_install_append() { install -d ${D}/${sysconfdir}/gdm/Init install -m 0755 ${WORKDIR}/Default ${D}/${sysconfdir}/gdm/Init - - install -d ${D}${base_libdir}/systemd/system - install -m 0644 ${WORKDIR}/gdm.service ${D}${base_libdir}/systemd/system/ -} - -PACKAGES =+ "gdm-systemd" -FILES_gdm-systemd = "${base_libdir}/systemd" -RDEPENDS_gdm-systemd = "gdm" - -pkg_postinst_gdm-systemd() { - # can't do this offline - if [ "x$D" != "x" ]; then - exit 1 - fi - - systemctl enable gdm.service -} - -pkg_postrm_gdm-systemd() { - # can't do this offline - if [ "x$D" != "x" ]; then - exit 1 - fi - - systemctl disable gdm.service } FILES_${PN} += "${datadir}/icon* \
@@ -84,6 +59,9 @@ RRECOMMENDS_${PN} += "openssh-misc desktop-file-utils glib-2.0-utils metacity gn INITSCRIPT_NAME = "gdm" INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." +SYSTEMD_PACKAGES = "${PN}-systemd" +SYSTEMD_SERVICE = "gdm.service" + pkg_postinst_${PN} () { # can't do this offline if [ "x$D" != "x" ]; then
Signature · 1 line
1.7.6.4
RFC 14/27 dropbear: remove unneeded systemd code
In reply to Andreas Müller--- .../dropbear/dropbear_2011.54.bbappend | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)
meta-oe/recipes-core/dropbear/dropbear_2011.54.bbappend +1 -9
@@ -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,6 @@ 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 } -PACKAGES += "${PN}-systemd" - -RDEPENDS_${PN}-systemd += "dropbear" -FILES_${PN}-systemd = "${base_libdir}/systemd"
Signature · 1 line
1.7.6.4
RFC 15/27 cloud9: pack systemd support in ${PN}-systemd / remove unneeded systemd code
In reply to Andreas Müller--- meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-)
meta-oe/recipes-devtools/cloud9/cloud9_0.5.1.bb +3 -7
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4784c3bcff601fd8f9515f52a11e7018" DEPENDS = "libxml2 nodejs-native" -PR = "r13" +PR = "r14" SRC_URI = "git://github.com/ajaxorg/cloud9.git;name=cloud9ide \ git://github.com/ajaxorg/o3;destsuffix=o3;name=o3 \
@@ -98,9 +98,6 @@ 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}${sysconfdir}/avahi/services/ install -m 0644 ${WORKDIR}/cloud9-avahi.service ${D}${sysconfdir}/avahi/services/ }
@@ -109,10 +106,9 @@ 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" RDEPENDS_${PN} = "nodejs gzip" inherit systemd -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = "cloud9.service" +SYSTEMD_PACKAGES = "${PN}-systemd" +SYSTEMD_SERVICE_${PN}-systemd = "cloud9.service"
Signature · 1 line
1.7.6.4
RFC 16/27 slim: inherit systemd / remove unneeded systemd code
In reply to Andreas Müller--- meta-oe/recipes-graphics/slim/slim_1.3.2.bb | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
meta-oe/recipes-graphics/slim/slim_1.3.2.bb +4 -5
@@ -3,7 +3,7 @@ HOMEPAGE="http://slim.berlios.de" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" -PR = "r1" +PR = "r2" DEPENDS = "virtual/libx11 libxmu libpng jpeg freetype sessreg ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
@@ -26,6 +26,9 @@ SRC_URI = " \ SRC_URI[md5sum] = "ca1ae6120e6f4b4969f2d6cf94f47b42" SRC_URI[sha256sum] = "f1560125005f253b9b88220598fed7a9575ef405716862c6ca3fcc72dbd482b8" +inherit systemd +SYSTEMD_PACKAGES = "${PN}-systemd" +SYSTEMD_SERVICE = "slim.service" EXTRA_OEMAKE += " \ USE_PAM=${@base_contains('DISTRO_FEATURES', 'pam', '1', '0', d)} \
@@ -58,14 +61,11 @@ do_install() { RDEPENDS_${PN} = "perl xauth freetype sessreg " -FILES_${PN} += "${base_libdir}/systemd/system/" pkg_postinst_${PN} () { if test "x$D" != "x"; then exit 1 fi -systemctl enable slim.service - # Register SLiM as default DM mkdir -p ${sysconfdir}/X11/ echo "${bindir}/slim" > ${sysconfdir}/X11/default-display-manager
@@ -75,7 +75,6 @@ pkg_postrm_${PN} () { if test "x$D" != "x"; then exit 1 fi -systemctl disable slim.service sed -i /slim/d $D${sysconfdir}/X11/default-display-manager || true }
Signature · 1 line
1.7.6.4
RFC 17/27 udisks: conditional DEPENDS systemd / remove unneeded systemd code
In reply to Andreas Müller--- meta-oe/recipes-support/udisks/udisks_1.0.4.bb | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-)
meta-oe/recipes-support/udisks/udisks_1.0.4.bb +2 -9
@@ -2,7 +2,7 @@ DESCRIPTION = "A storage daemon that implements well-defined D-Bus interfaces th LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=73d83aebe7e4b62346afde80e0e94273" -DEPENDS = "libatasmart sg3-utils polkit udev dbus-glib glib-2.0" +DEPENDS = "libatasmart sg3-utils polkit udev dbus-glib glib-2.0 ${@base_conditional('INIT_MANAGER', 'systemd', 'systemd', '', d)}" # optional dependencies: device-mapper parted SRC_URI = "http://hal.freedesktop.org/releases/${BPN}-${PV}.tar.gz;name=${BPN} \
@@ -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 = "r2" +PR = "r3" 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
RFC 18/27 rsyslog: conditional DEPENDS systemd / remove unneeded systemd code
In reply to Andreas Müller--- meta-oe/recipes-extended/rsyslog/rsyslog.inc | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-)
meta-oe/recipes-extended/rsyslog/rsyslog.inc +2 -7
@@ -1,10 +1,10 @@ DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd" -DEPENDS = "zlib systemd" +DEPENDS = "zlib ${@base_conditional('INIT_MANAGER', 'systemd', 'systemd', '', d)}" 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
RFC 19/27 polkit: conditional DEPEND systemd
In reply to Andreas Müller--- .../recipes-extended/polkit/polkit_0.104.bbappend | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) create mode 100644 meta-oe/recipes-extended/polkit/polkit_0.104.bbappend
meta-oe/recipes-extended/polkit/polkit_0.104.bbappend new file +5 -0
@@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +DEPENDS += "${@base_conditional('INIT_MANAGER', 'systemd', 'systemd', '', d)}" + +PRINC = "1"
Signature · 1 line
1.7.6.4
Re: [meta-oe][RFC 19/27] polkit: conditional DEPEND systemd
Quoted 13 lines · Andreas Müller
Signed-off-by Andreas Müller <[email protected]>--- .../recipes-extended/polkit/polkit_0.104.bbappend | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) create mode 100644 meta-oe/recipes-extended/polkit/polkit_0.104.bbappendmeta-oe/recipes-extended/polkit/polkit_0.104.bbappend new file +0
-0
meta-oe/recipes-extended/polkit/polkit_0.104.bbappend line 3
Quoted 3 lines
meta-oe/recipes-extended/polkit/polkit_0.104.bbappend new file +3
-0@@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +DEPENDS += "${@base_conditional('INIT_MANAGER', 'systemd', 'systemd', '', d)}"
With this please force systemd support enabled/disabledEXTRA_OECONF += " ${@base_conditional('INIT_MANAGER', 'systemd', '--enable-systemd', '--disable-systemd', d)}"
Or even better use PACKAGECONFIG and initialize it wrt INIT_MANAGER.
Cheers,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [meta-oe][RFC 19/27] polkit: conditional DEPEND systemd
In reply to Andreas MüllerQuoted 1 line · On Tuesday 07 February 2012 16:12:45 Andreas Müller wrote:
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
Technically you don't need this line as you aren't adding any references to files in the layer.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
RFC 20/27 syslog-ng: conditional --enable-systemd --with-systemdsystemunitdir / remove unneeded systemd code
In reply to Andreas Müller--- meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-)
meta-oe/recipes-support/syslog-ng/syslog-ng.inc +2 -8
@@ -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
@@ -25,8 +25,7 @@ EXTRA_OECONF = " \ --disable-linux-caps \ --disable-pcre \ --disable-sql \ - --enable-systemd \ - --with-systemdsystemunitdir=${base_libdir}/systemd/system \ + ${@base_conditional('INIT_MANAGER', 'systemd', '--enable-systemd --with-systemdsystemunitdir=${base_libdir}/systemd/system', '', d)} \ " do_configure_prepend() {
@@ -47,11 +46,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
RFC 21/27 lighthttpd: inherit systemd / added systemd native support / remove unneeded systemd code
In reply to Andreas Müller--- .../lighttpd/lighttpd_1.4.30.bbappend | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-)
meta-oe/recipes-extended/lighttpd/lighttpd_1.4.30.bbappend +6 -8
@@ -1,16 +1,14 @@ FILESEXTRAPATHS := "${THISDIR}/${PN}" - -PRINC = "1" +PRINC = "2" SRC_URI += "file://lighttpd.service" -do_install_append() { - install -d ${D}${base_libdir}/systemd/systemd/ - install -m 0644 ${WORKDIR}/lighttpd.service ${D}${base_libdir}/systemd/systemd/ +inherit systemd + +SYSTEMD_PACKAGES = "${PN}-systemd" +SYSTEMD_SERVICE_${PN}-systemd = "lighttpd.service" +do_install_append() { install -d ${D}${base_libdir}/systemd/systemd/multi-user.target.wants ln -sf ../lighttpd.service ${D}${base_libdir}/systemd/systemd/multi-user.target.wants } - -FILES_${PN} += "${base_libdir}/systemd" -
Signature · 1 line
1.7.6.4
RFC 22/27 cherokee: inherit systemd / added systemd native support / remove unneeded systemd code
In reply to Andreas Müller--- meta-oe/recipes-connectivity/cherokee/cherokee.inc | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
meta-oe/recipes-connectivity/cherokee/cherokee.inc +5 -6
@@ -5,7 +5,7 @@ SECTION = "network" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -INC_PR = "r0" +INC_PR = "r1" DEPENDS = "libpcre openssl ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
@@ -14,7 +14,7 @@ SRC_URI = "http://www.cherokee-project.com/download/1.2/${PV}/cherokee-${PV}.tar file://cherokee.service" -inherit autotools pkgconfig binconfig update-rc.d +inherit autotools pkgconfig binconfig update-rc.d systemd EXTRA_OECONF = "--disable-static \ --disable-nls \
@@ -25,9 +25,6 @@ do_install_append () { install -m 0755 -d ${D}${sysconfdir}/init.d install -m 755 ${WORKDIR}/cherokee.init ${D}${sysconfdir}/init.d/cherokee - install -d ${D}${base_libdir}/systemd/system - install -m 0644 ${WORKDIR}/*.service ${D}${base_libdir}/systemd/system/ - # clean up .la files for plugins rm -f ${D}${libdir}/cherokee/*.la }
@@ -35,7 +32,6 @@ do_install_append () { # Put -dev near the front so we can move the .la files into it with a wildcard PACKAGES =+ "libcherokee-server libcherokee-client libcherokee-base cget" -FILES_${PN} += "${base_libdir}/systemd" FILES_cget = "${bindir}/cget" FILES_libcherokee-server = "${libdir}/libcherokee-server${SOLIBS}" FILES_libcherokee-client = "${libdir}/libcherokee-client${SOLIBS}"
@@ -48,3 +44,6 @@ CONFFILES_${PN} = " \ INITSCRIPT_NAME = "cherokee" INITSCRIPT_PARAMS = "defaults 91 91" + +SYSTEMD_PACKAGES = "${PN}-systemd" +SYSTEMD_SERVICE = "cherokee.service"
Signature · 1 line
1.7.6.4
RFC 23/27 networkmanager: inherit systemd / added NetworkManager-wait-online.service / remove unneeded systemd code
In reply to Andreas Müller--- .../networkmanager/networkmanager_0.9.2.0.bb | 26 ++++--------------- 1 files changed, 6 insertions(+), 20 deletions(-)
meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb +6 -20
@@ -4,10 +4,10 @@ SECTION = "net/misc" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b" -PR = "r2" +PR = "r3" -DEPENDS = "systemd libnl dbus dbus-glib udev wireless-tools polkit gnutls util-linux ppp" -inherit gnome gettext +DEPENDS = "libnl dbus dbus-glib udev wireless-tools polkit gnutls util-linux ppp ${@base_conditional('INIT_MANAGER', 'systemd', 'systemd', '', d)}" +inherit gnome gettext systemd SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.bz2 \ file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \
@@ -27,6 +27,9 @@ EXTRA_OECONF = " \ --with-iptables=${sbindir}/iptables \ " +SYSTEMD_PACKAGES = "${PN}-systemd" +SYSTEMD_SERVICE_${PN}-systemd = "NetworkManager.service NetworkManager-wait-online.service" + do_configure_prepend() { cp ${WORKDIR}/gtk-doc.make ${S}/ echo "EXTRA_DIST = version.xml" > gnome-doc-utils.make
@@ -70,7 +73,6 @@ FILES_${PN} += " \ ${datadir}/polkit-1 \ ${datadir}/dbus-1 \ ${base_libdir}/udev/* \ - ${base_libdir}/systemd \ " RRECOMMENDS_${PN} += "iptables"
@@ -96,20 +98,4 @@ FILES_${PN}-tests = "${bindir}/nm-tool \ ${bindir}/nm-testdevices" -pkg_postinst_${PN}() { - # can't do this offline - if [ "x$D" != "x" ]; then - exit 1 - fi - - systemctl enable NetworkManager.service -} - -pkg_prerm_${PN}() { - # can't do this offline - if [ "x$D" != "x" ]; then - exit 1 - fi - systemctl disable NetworkManager.service -}
Signature · 1 line
1.7.6.4
RFC 24/27 ntp: add native systemd support for ntpdate / remove unneeded systemd code
In reply to Andreas Müller--- meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-)
meta-oe/recipes-support/ntp/ntp_4.2.6p3.bb +3 -11
@@ -1,11 +1,12 @@ require ntp.inc -PR = "r4" +PR = "r5" inherit systemd -SYSTEMD_PACKAGES = "${PN}-systemd" +SYSTEMD_PACKAGES = "${PN}-systemd ntpdate-systemd" SYSTEMD_SERVICE_${PN}-systemd = "ntpd.service" +SYSTEMD_SERVICE_ntpdate-systemd = "ntpdate.service" SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${P}.tar.gz \ file://tickadj.c.patch \
@@ -28,17 +29,8 @@ do_install_append() { install -m 755 ${WORKDIR}/ntpd ${D}/${sysconfdir}/init.d 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/ } -PACKAGES =+ "${PN}-systemd" - -FILES_${PN}-systemd = "${base_libdir}/systemd/system/" -RDEPENDS_${PN}-systemd = "${PN}" - FILES_${PN}-bin = "${bindir}/ntp-wait ${bindir}/ntpdc ${bindir}/ntpq ${bindir}/ntptime ${bindir}/ntptrace" FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd" FILES_${PN}-tickadj = "${bindir}/tickadj"
Signature · 1 line
1.7.6.4
RFC 25/27 dhcp: add native support for dhcp-relay / remove unneeded systemd code
In reply to Andreas Müller--- .../recipes-connectivity/dhcp/dhcp_4.2.0.bbappend | 16 +++++----------- .../dhcp/files/dhcrelay.service | 10 ++++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 meta-oe/recipes-connectivity/dhcp/files/dhcrelay.service
meta-oe/recipes-connectivity/dhcp/dhcp_4.2.0.bbappend +5 -11
@@ -1,19 +1,13 @@ # look for files in the layer first FILESEXTRAPATHS := "${THISDIR}/files" +PRINC = "1" + inherit systemd SYSTEMD_PACKAGES = "dhcp-server-systemd" SYSTEMD_SERVICE_dhcp-server-systemd = "dhcpd.service" +SYSTEMD_SERVICE_dhcp-relay-systemd = "dhcrelay.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" +SRC_URI += "file://dhcpd.service \ + file://dhcrelay.service"
meta-oe/recipes-connectivity/dhcp/files/dhcrelay.service new file +10 -0
@@ -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
RFC 26/27 task-basic: replace systemd specific packets by common ones / conditionally RDEPENDS avahi(-systemd) systemd-compat-units
In reply to Andreas Müller--- meta-oe/recipes-core/tasks/task-basic.bb | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
meta-oe/recipes-core/tasks/task-basic.bb +6 -4
@@ -5,7 +5,7 @@ DESCRIPTION = "Basic task to get a device online" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" -PR = "r8" +PR = "r9" inherit task
@@ -21,7 +21,7 @@ MACHINE_EXTRA_RRECOMMENDS ?= "" # Select between dropbear and openssh # Set TASK_BASIC_SSHDAEMON = "openssh-sshd openssh-sftp openssh-sftp-server" in your DISTRO config to get openssh(d) # -TASK_BASIC_SSHDAEMON ?= "dropbear-systemd openssh-sftp openssh-sftp-server" +TASK_BASIC_SSHDAEMON ?= "dropbear openssh-sftp openssh-sftp-server" # # The section below is designed to match with task-boot, but doesn't depend on it to allow for more freedom
@@ -31,10 +31,12 @@ TASK_BASIC_SSHDAEMON ?= "dropbear-systemd openssh-sftp openssh-sftp-server" # # Util-linux (u)mount is included because the busybox one can't handle /etc/mtab being symlinked to /proc/mounts # +# avahi is in oe-core but oe-core does not yet have systemd.bbclass so we must decide here which packet we need!! +# If systemd.bbclass should reach oe-core, we can simply rdepend avahi. RDEPENDS_${PN} = "\ ${TASK_BASIC_SSHDAEMON} \ - avahi-daemon avahi-utils avahi-systemd \ - systemd-compat-units \ + avahi-daemon avahi-utils ${@base_conditional('INIT_MANAGER', 'systemd', 'avahi-systemd', 'avahi', d)} \ + ${@base_conditional('INIT_MANAGER', 'systemd', 'systemd-compat-units', '', d)} \ " #
Signature · 1 line
1.7.6.4
RFC 27/27 task-x11: replace systemd specific packets by common ones
In reply to Andreas Müller--- meta-oe/recipes-core/tasks/task-x11_1.0.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-core/tasks/task-x11_1.0.bb +2 -2
@@ -16,8 +16,8 @@ RRECOMMENDS_${PN} = "\ # xserver-common, x11-common VIRTUAL-RUNTIME_xserver_common ?= "xserver-common" -# elsa, xserver-nodm-init or xserver-nodm-init-systemd -VIRTUAL-RUNTIME_graphical_init_manager ?= "xserver-nodm-init-systemd" +# elsa, xserver-nodm-init +VIRTUAL-RUNTIME_graphical_init_manager ?= "xserver-nodm-init" RDEPENDS_${PN}-utils = "\ ${VIRTUAL-RUNTIME_xserver_common} \
Signature · 1 line
1.7.6.4
Re: [meta-oe][RFC 27/27] task-x11: replace systemd specific packets by common ones
Quoted 11 lines · Andreas Müller
Signed-off-by Andreas Müller <[email protected]>--- meta-oe/recipes-core/tasks/task-x11_1.0.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)meta-oe/recipes-core/tasks/task-x11_1.0.bb +0
-0
meta-oe/recipes-core/tasks/task-x11_1.0.bb RRECOMMENDS_${PN} = "\ · line 20
Quoted 7 lines
meta-oe/recipes-core/tasks/task-x11_1.0.bb +2
-2@@ -16,8 +16,8 @@ RRECOMMENDS_${PN} = "\ # xserver-common, x11-common VIRTUAL-RUNTIME_xserver_common ?= "xserver-common" -# elsa, xserver-nodm-init or xserver-nodm-init-systemd -VIRTUAL-RUNTIME_graphical_init_manager ?= "xserver-nodm-init-systemd" +# elsa, xserver-nodm-init +VIRTUAL-RUNTIME_graphical_init_manager ?= "xserver-nodm-init"
Shouldn't this be
${@base_conditional('INIT_MANAGER', 'systemd', 'xserver-nodm-init-systemd', 'xserver-nodm-init')} ?
Or did I overlook where xserver-nodm-init-systemd is pulled to image?
Cheers,
Quoted 10 lines
meta-oe/recipes-core/tasks/task-x11_1.0.bb +0
-0RDEPENDS_${PN}-utils = "\ ${VIRTUAL-RUNTIME_xserver_common} \Signature · 7 lines
1.7.6.4 _______________________________________________ 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]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 07-02-12 16:12, Andreas Müller schreef:
Quoted 11 lines
The RFC series is intended to
* reduce efforts/pitfalls when implementing native systemd support * enable a global configuration for selecting of systemd/syvinit (sysvinit needs further efforts)
The whole series' can be found at (branches 'systemd' meta-oe:
git://gitorious.org/schnitzeltony-oe-meta/meta-openembedded-systemd.git
meta-angstrom:git://gitorious.org/schnitzeltony-oe-meta/meta-angstrom-systemd.git
Quoted 5 lines
Notes: * These are my first python experiences - suggestions welcome. * In local.conf (or in distro) the configuration variable
INIT_MANAGERselects the initmanager to be build into an image. When changing the selection, a build from scratch is required.INIT_MANAGERcurrently defaults to systemd (see image.bbclass and initmanager.bbclass)
NAK! The initmanager decision is up the image, not the distro. The distro can use blacklist.bbclass to blacklist the initmanagers it doesn't support if needed.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAk8xSMMACgkQMkyGM64RGpGDXwCdEcF3nvp+R1KdPAP1ohy5UBHD CQgAoJUS0t+iaLza+HA7Ckd9xQbZrI4N
=so2j
-----END PGP SIGNATURE-----
Quoted 21 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Op 07-02-12 16:12, Andreas Müller schreef:
Quoted 11 lines
The RFC series is intended to
* reduce efforts/pitfalls when implementing native systemd support * enable a global configuration for selecting of systemd/syvinit (sysvinit needs further efforts)
The whole series' can be found at (branches 'systemd' meta-oe:
git://gitorious.org/schnitzeltony-oe-meta/meta-openembedded-systemd.git
meta-angstrom:git://gitorious.org/schnitzeltony-oe-meta/meta-angstrom-systemd.gitQuoted 5 lines
Notes: * These are my first python experiences - suggestions welcome. * In local.conf (or in distro) the configuration variable
INIT_MANAGERselects the initmanager to be build into an image. When changing the selection, a build from scratch is required.INIT_MANAGERcurrently defaults to systemd (see image.bbclass and initmanager.bbclass)
Quoted 3 lines
NAK! The initmanager decision is up the image, not the distro. The distro can use blacklist.bbclass to blacklist the initmanagers it doesn't support if needed.
It's not possible to let the image decide - e.g for polkit/udisks we would need 2 versions: one configured/linked against systemd and one without.
Quoted 4 lines
regards,
Koen
regards
Andreas
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 07-02-12 17:24, Andreas Müller schreef:
Quoted 7 lines
Quoted 5 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Op 07-02-12 16:12, Andreas Müller schreef:
Quoted 2 lines
The RFC series is intended to
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
* reduce efforts/pitfalls when implementing native systemd support * enable a global configuration for selecting of systemd/syvinit (sysvinit needs further efforts)
The whole series' can be found at (branches 'systemd' meta-oe:
git://gitorious.org/schnitzeltony-oe-meta/meta-openembedded-systemd.git
meta-angstrom:
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
git://gitorious.org/schnitzeltony-oe-meta/meta-angstrom-systemd.gitNotes: * These are my first python experiences - suggestions welcome.
* In local.conf (or in distro) the configuration variableINIT_MANAGERselects the initmanager to be build into an image. When changing the selection, a build from scratch is required.INIT_MANAGERcurrently defaults to systemd (see image.bbclass and initmanager.bbclass)
Quoted 6 lines
Quoted 3 lines
NAK! The initmanager decision is up the image, not the distro. The distro can use blacklist.bbclass to blacklist the initmanagers it doesn't support if needed.
It's not possible to let the image decide - e.g for polkit/udisks we would need 2 versions: one configured/linked against systemd and one without.
So split out the libs from systemd ${PN} and voila! -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAk8xW+cACgkQMkyGM64RGpHdFwCfU8ahaM69kF2Okw+Cf2zQPIno lwUAn108J2q5Uu8lYX+P9IsrJ6+3oU2n
=EXi9
-----END PGP SIGNATURE-----
Quoted 29 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Op 07-02-12 17:24, Andreas Müller schreef:
Quoted 7 lines
Quoted 5 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Op 07-02-12 16:12, Andreas Müller schreef:
Quoted 2 lines
The RFC series is intended to
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
* reduce efforts/pitfalls when implementing native systemd support * enable a global configuration for selecting of systemd/syvinit (sysvinit needs further efforts)
The whole series' can be found at (branches 'systemd' meta-oe:
git://gitorious.org/schnitzeltony-oe-meta/meta-openembedded-systemd.gitmeta-angstrom:
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
git://gitorious.org/schnitzeltony-oe-meta/meta-angstrom-systemd.gitNotes: * These are my first python experiences - suggestions welcome.
* In local.conf (or in distro) the configuration variableINIT_MANAGERselects the initmanager to be build into an image. When changing the selection, a build from scratch is required.INIT_MANAGERcurrently defaults to systemd (see image.bbclass and initmanager.bbclass)
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
NAK! The initmanager decision is up the image, not the distro. The distro can use blacklist.bbclass to blacklist the initmanagers it doesn't support if needed.
It's not possible to let the image decide - e.g for polkit/udisks we would need 2 versions: one configured/linked against systemd and one without.
So split out the libs from systemd ${PN} and voila!
OK - I think you are more involved on systemd. Good luck on finding out what others might need on systemd-less images...
Another question: any good idea saving us from plastering *-systemd all over?
Andreas
Quoted 6 lines · Andreas Müller
* These are my first python experiences - suggestions welcome.
* In local.conf (or in distro) the configuration variableINIT_MANAGERselects
the initmanager to be build into an image. When changing the selection, a build from scratch is required.INIT_MANAGERcurrently defaults to
systemd
Quoted 9 lines
(see image.bbclass and initmanager.bbclass)
* In systemd.bbclass debug messages were left in to have a better overview what's going on.
* An additional patch series goes out for meta-angstrom.
* This is a huge RFC which might cause serious impacts. What I have already detected after a build from scatch is that/var/lib/opkgis missing in the image (although it can be found in libopkg.ipk). I will spend the next days with my new friend buildhistory (thanks for this!!).
I've looked at your changes and they does seem to be a good base for further work:
* The init system ought to be a DISTRO_FEATURE (as sysvinit ought to be too IMO)
* I'd like to see sysvinit packages splitted onto ${PN}-sysvinit as well
* I'd use rootfs generation to install ${PN}-${INIT_SYSTEM} packages for packages being installed
Thoughts?
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
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 07-02-12 16:55, Otavio Salvador schreef:
Quoted 17 lines
Quoted 4 lines · Andreas Müller
* These are my first python experiences - suggestions welcome. * In local.conf (or in distro) the configuration variable
INIT_MANAGERselects the initmanager to be build into an image. When changing the selection, a build from scratch is required.INIT_MANAGERcurrentlyQuoted 9 lines
defaults to systemd (see image.bbclass and initmanager.bbclass) * In systemd.bbclass debug messages were left in to have a better overview what's going on. * An additional patch series goes out for meta-angstrom. * This is a huge RFC which might cause serious impacts. What I have already detected after a build from scatch is that
/var/lib/opkgis missing in the image (although it can be found in libopkg.ipk). I will spend the next days with my new friend buildhistory (thanks for this!!).
Quoted 6 lines
I've looked at your changes and they does seem to be a good base for further work:
* The init system ought to be a
DISTRO_FEATURE(as sysvinit ought to be too IMO) * I'd use rootfs generation to install ${PN}-${INIT_SYSTEM} packages for packages being installed
Those are really good suggestions!
Quoted 1 line
* I'd like to see sysvinit packages splitted onto ${PN}-sysvinit as well
This would require extra logic to install -sysvinit if -systemd is missing.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAk8xSx8ACgkQMkyGM64RGpGsZwCeN/ZmCXRJ1frrajkUyuYTaZjV R9MAniJVOkSvJKdriTWW+K4oJdGZOyZ0
=jPg1
-----END PGP SIGNATURE-----
Quoted 3 lines · Koen Kooi
Quoted 1 line
* I'd like to see sysvinit packages splitted onto ${PN}-sysvinit as well
This would require extra logic to install -sysvinit if -systemd is missing.
And if there's any sysvinit package, it ought to install compat-units too.
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
Quoted 19 lines · Otavio Salvador
Quoted 6 lines · Andreas Müller
* These are my first python experiences - suggestions welcome.
* In local.conf (or in distro) the configuration variableINIT_MANAGERselects
the initmanager to be build into an image. When changing the selection, a build from scratch is required.INIT_MANAGERcurrently defaults to
systemdQuoted 9 lines
(see image.bbclass and initmanager.bbclass)
* In systemd.bbclass debug messages were left in to have a better overview what's going on.
* An additional patch series goes out for meta-angstrom.
* This is a huge RFC which might cause serious impacts. What I have already detected after a build from scatch is that/var/lib/opkgis missing in the image (although it can be found in libopkg.ipk). I will spend the next days with my new friend buildhistory (thanks for this!!).
Quoted 2 lines
I've looked at your changes and they does seem to be a good base for further work:
I agree, good job!
Quoted 2 lines
* The init system ought to be a
DISTRO_FEATURE(as sysvinit ought to be too IMO)
I know there's some disagreement with the suggestion that the init system ought to be a DISTRO_FEATURE but my (admittedly uninformed) opinion is that I can't see how we can avoid it.
It looks like systemd provides various interfaces and API's that packages may or may not use and as more packages adopt these we're going to need to be able to enable/disable more than just some unit files/scripts for init support.
Quoted 1 line
* I'd like to see sysvinit packages splitted onto ${PN}-sysvinit as well
Agreed. Do we need to think about the case where a systemd based system might *need* an initscript (no units available) vs. when the -sysvinit and -systemd packages both provide similar functionality?
Would it be desirable for the rootfs generation logic to be able to fall back to an alternative "initscript" provider?
Quoted 4 lines
* I'd use rootfs generation to install ${PN}-${INIT_SYSTEM} packages for packages being installed
Thoughts?
Cheers,
Joshua
Signature · 3 lines
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 08-02-12 01:39, Joshua Lock schreef:
Quoted 26 lines · Otavio Salvador
Quoted 17 lines
Quoted 4 lines · Andreas Müller
* These are my first python experiences - suggestions welcome. * In local.conf (or in distro) the configuration variable
INIT_MANAGERselects the initmanager to be build into an image. When changing the selection, a build from scratch is required.INIT_MANAGERcurrentlyQuoted 9 lines
defaults to systemd (see image.bbclass and initmanager.bbclass) * In systemd.bbclass debug messages were left in to have a better overview what's going on. * An additional patch series goes out for meta-angstrom. * This is a huge RFC which might cause serious impacts. What I have already detected after a build from scatch is that
/var/lib/opkgis missing in the image (although it can be found in libopkg.ipk). I will spend the next days with my new friend buildhistory (thanks for this!!).Quoted 2 lines
I've looked at your changes and they does seem to be a good base for further work:
I agree, good job!
Quoted 2 lines
* The init system ought to be a
DISTRO_FEATURE(as sysvinit ought to be too IMO)
Quoted 8 lines
I know there's some disagreement with the suggestion that the init system ought to be a
DISTRO_FEATUREbut my (admittedly uninformed) opinion is that I can't see how we can avoid it.It looks like systemd provides various interfaces and API's that packages may or may not use and as more packages adopt these we're going to need to be able to enable/disable more than just some unit files/scripts for init support.
Most (if not all) of those APIs are designed to be used with or without systemd as initmanager, that is why there are seperate shared libraries. I need to double check, but polkit might be the only exception to that in that it needs to have systemd actuall running. But multi-seat is broken anyway currently, so not much difference for the end user either way :)
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAk8yL+UACgkQMkyGM64RGpGzNgCfc5P0yfHki4nm47iNNQhAIPs9 xnMAnidOD1px6uM6stwY47LP7oA+4O29
=zO5G
-----END PGP SIGNATURE-----
Quoted 9 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Op 08-02-12 01:39, Joshua Lock schreef:
Quoted 4 lines
It looks like systemd provides various interfaces and API's that packages may or may not use and as more packages adopt these we're going to need to be able to enable/disable more than just some unit files/scripts for init support.
Quoted 7 lines
Most (if not all) of those APIs are designed to be used with or without systemd as initmanager, that is why there are seperate shared libraries. I need to double check, but polkit might be the only exception to that in that
it needs to have systemd actuall running. But multi-seat is broken anyway currently, so not much difference for the end user either way :)
Well, it being broken or not doesn't change that it explicitly depends on systemd. We also ought to have a design that will work when this works and it seems, up to now, that distro feature is the only solution for now. I'd love to have it as an image feature but it seems it won't be easily doable.
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
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 08-02-12 12:00, Otavio Salvador schreef:
Quoted 19 lines
Quoted 8 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Op 08-02-12 01:39, Joshua Lock schreef:
Quoted 4 lines
It looks like systemd provides various interfaces and API's that packages may or may not use and as more packages adopt these we're going to need to be able to enable/disable more than just some unit files/scripts for init support.
Quoted 7 lines
Most (if not all) of those APIs are designed to be used with or without systemd as initmanager, that is why there are seperate shared libraries. I need to double check, but polkit might be the only exception to that in that it needs to have systemd actuall running. But multi-seat is broken anyway currently, so not much difference for the end user either way :)
Quoted 4 lines
Well, it being broken or not doesn't change that it explicitly depends on systemd. We also ought to have a design that will work when this works and it seems, up to now, that distro feature is the only solution for now.
If it's just polkit and udisks and image feature works well enough. Perfect is the enemy of good and all that.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAk8yV1kACgkQMkyGM64RGpHTRgCgqs4wQxV8nk2WOdAeEEtPU++f l0cAn3vGyEwLSwLX82cZpmAHwB51LoP0
=/BQ0
-----END PGP SIGNATURE-----
Quoted 2 lines · Koen Kooi
If it's just polkit and udisks and image feature works well enough. Perfect is the enemy of good and all that.
How I'd generate an image with polkit with systemd support?
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
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 08-02-12 12:12, Otavio Salvador schreef:
Quoted 8 lines
Quoted 2 lines · Koen Kooi
If it's just polkit and udisks and image feature works well enough. Perfect is the enemy of good and all that.
How I'd generate an image with polkit with systemd support?
In this case:
1) split out systemd libs from systemd PNif('systemd' in IMAGE_FEATURES) {
2) use bbappend to enable systemd support in polkit
}
Images with sysvinit will be working the same as before, just with libsystemd-logind.so.X being installed. Images with systemd get working session tracking.
Have a look at
http://cgit.openembedded.org/openembedded-core/log/meta/recipes-support/consolekit
to see that consolekit had been broken in oe-core for a long, long time and noone cared.
That is why I want to make an exception for polkit and udisks to keep initmanager selection an IMAGE_FEATURE combined with DISTRO_FEATURE. A distro maintainer can then choose to support one or more initmanagers and in the case for multiple it can be set per image.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAk8yZyEACgkQMkyGM64RGpEPDgCfZc2zCQZcAUKqAcU1L1I0riw6 r0YAoIF8daCi0J2sp4jcGItiQlgCNsyi
=kUuc
-----END PGP SIGNATURE-----
Quoted 2 lines · On Wednesday 08 February 2012 13:14:27 Koen Kooi wrote:
Images with sysvinit will be working the same as before, just with libsystemd-logind.so.X being installed.
Just out of interest, how large is that file?
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Op 8 feb. 2012, om 13:18 heeft Paul Eggleton het volgende geschreven:
Quoted 5 lines · On Wednesday 08 February 2012 13:14:27 Koen Kooi wrote:
Quoted 2 lines
Images with sysvinit will be working the same as before, just with libsystemd-logind.so.X being installed.
Just out of interest, how large is that file?
On my ext4 fs:
root@beagleboneA3-0457:~# du /lib/libsystemd-login.so.0.1.1 -hs 34K /lib/libsystemd-login.so.0.1.1
regards,
Koen
Op 8 feb. 2012, om 13:18 heeft Paul Eggleton het volgende geschreven:
Quoted 5 lines · On Wednesday 08 February 2012 13:14:27 Koen Kooi wrote:
Quoted 2 lines
Images with sysvinit will be working the same as before, just with libsystemd-logind.so.X being installed.
Just out of interest, how large is that file?
A complete overview:
koen@dominion:/OE/tentacle/build/tmp-angstrom_2010_x-eglibc/work$ du ../deploy/ipk/armv7a/*v40-r16* -hs 8.0K ../deploy/ipk/armv7a/libsystemd-daemon0_v40-r16_armv7a.ipk 12K ../deploy/ipk/armv7a/libsystemd-id128-0_v40-r16_armv7a.ipk 32K ../deploy/ipk/armv7a/libsystemd-journal0_v40-r16_armv7a.ipk 20K ../deploy/ipk/armv7a/libsystemd-login0_v40-r16_armv7a.ipk 4.0K ../deploy/ipk/armv7a/systemd-analyze_v40-r16_armv7a.ipk 5.4M ../deploy/ipk/armv7a/systemd-dbg_v40-r16_armv7a.ipk 16K ../deploy/ipk/armv7a/systemd-dev_v40-r16_armv7a.ipk 16K ../deploy/ipk/armv7a/systemd-doc_v40-r16_armv7a.ipk 4.0K ../deploy/ipk/armv7a/systemd-initramfs_v40-r16_armv7a.ipk 1.1M ../deploy/ipk/armv7a/systemd_v40-r16_armv7a.ipk 20K ../deploy/ipk/armv7a/systemd-vconsole-setup_v40-r16_armv7a.ipk
regards,
Koen
Quoted 4 lines · Koen Kooi
Images with sysvinit will be working the same as before, just with libsystemd-logind.so.X being installed. Images with systemd get working session tracking.
AFAIK polkit uses consolekit or systemd. In case you build it with systemd you break consolekit support.
However a stronger point IMO is that some changes, for one or another init system, might involve specific compilation options and thus making their runtime incompatible as it's the case of polkit. Usually people will want one or another init system and I see no gain in have both available.
Forcing user to use a bbappend to have one working well is the wrong way.
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
Quoted 10 lines · Otavio Salvador
Quoted 4 lines · Koen Kooi
Images with sysvinit will be working the same as before, just with libsystemd-logind.so.X being installed. Images with systemd get working session tracking.
AFAIK polkit uses consolekit or systemd. In case you build it with systemd you break consolekit support.
Quoted 6 lines
However a stronger point IMO is that some changes, for one or another init system, might involve specific compilation options and thus making their runtime incompatible as it's the case of polkit. Usually people will want one or another init system and I see no gain in have both available.
Forcing user to use a bbappend to have one working well is the wrong way.
I think that only usable alternative _if it works_ is to build polkit linked always to libsystemd-logind.so.X and force users of sysvinit to use small part of systemd (libsystemd-logind.so.X packaged in systemd-logind).
Then we could keep add --enable-systemd to polkit etc., but if this breaks stuff which worked with consolekit, then distro policy would be better.
Cheers,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 08-02-12 13:43, Martin Jansa schreef:
Quoted 21 lines · Otavio Salvador
Quoted 11 lines
Quoted 4 lines · Koen Kooi
Images with sysvinit will be working the same as before, just with libsystemd-logind.so.X being installed. Images with systemd get working session tracking.
AFAIK polkit uses consolekit or systemd. In case you build it with systemd you break consolekit support.
Quoted 8 lines
However a stronger point IMO is that some changes, for one or another init system, might involve specific compilation options and thus making their runtime incompatible as it's the case of polkit. Usually people will want one or another init system and I see no gain in have both available.
Forcing user to use a bbappend to have one working well is the wrong way.
Quoted 8 lines
I think that only usable alternative
_ifitworks_is to build polkit linked always to libsystemd-logind.so.X and force users of sysvinit to use small part of systemd (libsystemd-logind.so.X packaged in systemd-logind).Then we could keep add --enable-systemd to polkit etc., but if this breaks stuff which worked with consolekit, then distro policy would be better.
This is not really directed at Martin, but at the wider audience:
For the past 6 months I have been trying to make consolekit work:
And right now it still isn't working properly. Look real close at the first commit; oe-core developers made a serious effort to make it non-functional[1], only linking needed to succeeded. So please stop saying CK will break, it already is broken.
Now back to the original discussion: support setting multiple init managers in DISTRO_FEATURES and keep the final choice an IMAGE_FEATURE. The end
result: the integrator keeps the same freedoms and when having only a single init manager in DISTRO_FEATURES things will slightly improve.
regards,
Koen
[1] To be fair, that was not their goal, but it was the end result. No malice there, I verified :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAk8ycxMACgkQMkyGM64RGpF/MwCfdLEnjLDnZDtN5VhPt0mDZRzi LbcAn2aYuUZXcPkMRY2qfMYK2dgmSTC5
=sX7J
-----END PGP SIGNATURE-----
Quoted 8 lines · Koen Kooi
That is why I want to make an exception for polkit and udisks to keep initmanager selection an
IMAGE_FEATUREcombined withDISTRO_FEATURE. A distro maintainer can then choose to support one or more initmanagers and in the case for multiple it can be set per image.regards,
Koen
I haven't the point: why do we need such quirks to keep initmager an image feature? Could you please help me out here?
FYI one of my tests was to build the image I usually work with configured as
INIT_MANAGER = "sysvinit"
and systemd isn't build at all - so no need to take care at specific
recipes: They will configure for what I (or the distro) want them.
Please see INIT_MANAGER as distro feature. I did not add it to the collection of DISTRO_FEATURES to avoid setting multiple initmanages.
Andreas
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 08-02-12 13:51, Andreas Müller schreef:
Quoted 16 lines
Quoted 8 lines · Koen Kooi
That is why I want to make an exception for polkit and udisks to keep initmanager selection an
IMAGE_FEATUREcombined withDISTRO_FEATURE. A distro maintainer can then choose to support one or more initmanagers and in the case for multiple it can be set per image.regards,
Koen
I haven't the point: why do we need such quirks to keep initmager an image feature? Could you please help me out here?
FYI one of my tests was to build the image I usually work with configured as
Quoted 6 lines
INIT_MANAGER= "sysvinit"and systemd isn't build at all - so no need to take care at specific
recipes: They will configure for what I (or the distro) want them.Please see
INIT_MANAGERas distro feature.
It is first and foremost and IMAGE_FEATURE. With your reasoning we need to include sysvinit in every initramfs images as well.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAk8ycHwACgkQMkyGM64RGpE9ngCfd3FXoKJnk/9oFHiVKBELeHov m5kAn1B/YA/IugTnjF5FqGs5RVA7ueWJ
=Adx3
-----END PGP SIGNATURE-----
Quoted 14 lines · Andreas Müller
Quoted 8 lines · Koen Kooi
That is why I want to make an exception for polkit and udisks to keep initmanager selection an
IMAGE_FEATUREcombined withDISTRO_FEATURE. A distro maintainer can then choose to support one or more initmanagers and in the case for multiple it can be set per image.regards,
Koen
I haven't the point: why do we need such quirks to keep initmager an image feature? Could you please help me out here?
FYI one of my tests was to build the image I usually work with configured as
Quoted 7 lines
INIT_MANAGER= "sysvinit"and systemd isn't build at all - so no need to take care at specific
recipes: They will configure for what I (or the distro) want them.Please see
INIT_MANAGERas distro feature. I did not add it to the collection ofDISTRO_FEATURESto avoid setting multiple initmanages.
For me it would allow to support palmpre* devices just by slightly different image even when it has too old kernel for systemd.
If it's distro feature then we'll have to drop support or find some devs still interested enough in palmpre* to port all patches to newer kernel and support it.
Cheers,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 4 lines · Koen Kooi
That is why I want to make an exception for polkit and udisks to keep initmanager selection an
IMAGE_FEATUREcombined withDISTRO_FEATURE. A distro maintainer can then choose to support one or more initmanagers and in the case for multiple it can be set per image.
I think having multiple recipes e.g. polkit and polkit-systemd might be one ugly way to do it
Quoted 9 lines · Khem Raj
Quoted 3 lines · Koen Kooi
That is why I want to make an exception for polkit and udisks to keep initmanager selection an
IMAGE_FEATUREcombined withDISTRO_FEATURE. A distro maintainer can then choose to support one or more initmanagersand in
Quoted 1 line
the case for multiple it can be set per image.
I think having multiple recipes e.g. polkit and polkit-systemd might be one ugly way to do it
Yes, agreed.
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
Quoted 23 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Op 08-02-12 12:00, Otavio Salvador schreef:
Quoted 19 lines
Quoted 15 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Op 08-02-12 01:39, Joshua Lock schreef:
Quoted 4 lines
It looks like systemd provides various interfaces and API's that packages may or may not use and as more packages adopt these we're going to need to be able to enable/disable more than just some unit files/scripts for init support.
Most (if not all) of those APIs are designed to be used with or without systemd as initmanager, that is why there are seperate shared libraries. I need to double check, but polkit might be the only exception to that in that it needs to have systemd actuall running. But multi-seat is broken anyway currently, so not much difference for the end user either way :)
Quoted 7 lines
Quoted 4 lines
Well, it being broken or not doesn't change that it explicitly depends on systemd. We also ought to have a design that will work when this works and it seems, up to now, that distro feature is the only solution for now.
If it's just polkit and udisks and image feature works well enough. Perfect is the enemy of good and all that.
It started with udisks followed by polkit. Which is next to take care?
Andreas
Quoted 6 lines · Joshua Lock
* The init system ought to be a
DISTRO_FEATURE(as sysvinit ought to beQuoted 3 lines
too
IMO)
Quoted 8 lines
I know there's some disagreement with the suggestion that the init system ought to be a
DISTRO_FEATUREbut my (admittedly uninformed) opinion is that I can't see how we can avoid it.It looks like systemd provides various interfaces and API's that packages may or may not use and as more packages adopt these we're going to need to be able to enable/disable more than just some unit files/scripts for init support.
After looking more closely to the polkit issue it seems it is not easy to avoid, indeed.
Quoted 9 lines
* I'd like to see sysvinit packages splitted onto ${PN}-sysvinit as well
Quoted 1 line
Agreed. Do we need to think about the case where a systemd based system might *need* an initscript (no units available) vs. when the -sysvinit and -systemd packages both provide similar functionality?
Would it be desirable for the rootfs generation logic to be able to fall back to an alternative "initscript" provider?
Yes for both. sysvinit, for now, ought to be the fallback and in case we have any sysvinit we need compat-units too.
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
Quoted 3 lines · Andreas Müller
What I have already
detected after a build from scatch is that/var/lib/opkgis missing in the image (although it can be found in libopkg.ipk).
Hmm Last night I had a build from scratch without these patches and have the same - this seems a different issue...
Andreas
Quoted 8 lines · Andreas Müller
Quoted 2 lines · Andreas Müller
What I have already
detected after a build from scatch is that/var/lib/opkgis missing inthe
Quoted 1 line
image (although it can be found in libopkg.ipk).
Hmm Last night I had a build from scratch without these patches and have the same - this seems a different issue...
You need to add package-management onto IMAGE_FEATURES or it will be dropped if all postinst has runned fine in rootfs generation.
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