aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/systemd.bbclass
AgeCommit message (Collapse)Author
2014-09-29update-rc.d/systemd: Remove OVERRIDES dependencySteffen Sledz
Taking run-postinsts and building for two machines which have different OVERRIDES leads to two different sets of stamps for an allarch package. We don't need to depend on OVERRIDES in these classes, the end resulting variables are good enough. We can therefore exclude the dependency and allow a single package to be generated for run-postinsts. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18systemd: pass --root in prerm if running on hostRoss Burton
If a systemd image is built without a package manager then packages will be removed from an image during rootfs generation, but without passing --root the systemctl will look on the *host* system. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05classes/recipes: More optimal DISTRO_FEATURES referencesRichard Purdie
Using the contains function results in more optimal sstate checksums resulting in better cache reuse as we as more consistent code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14systemd: fix commentsPaul Eggleton
It's DISTRO_FEATURES; DISTRO_FEATURE is invalid. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04systemd: Track postinst/prerm in task checksumRichard Purdie
When these functions change, the package should rebuild but currently it does not. We need to add the dependencies manually as the dependency code can't track dynamically created variables. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-10systemd.bbclass: get the correct /lib directorySaul Wold
By using os.path.dirname(systemd_unitdir) we get the correct /lib directory instead of dealing with possibly multilib directories. This address a QA Error for shipped/not installed /lib with multilib and x32. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-10systemd: Remove base_libdir if installed only for systemd_unitdirMuhammad Shakeel
If a recipe installs systemd_unitdir and it is a non-systemd build than systemd.bbclass deletes systemd_unitdir (/lib/systemd/) but not base_libdir (/lib). In this case if base_libdir is empty than following QA Issue is reported. ERROR: QA Issue: openssh: Files/directories were installed but not shipped /lib If base_libdir was installed due to systemd_unitdir installation than for non-systemd build it should also be removed. Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-30systemd: Remove init.d dir if systemd unit file is present and sysvinit not ↵Muhammad Shakeel
a distro feature If systemd is supported DISTRO_FEATURE and sysvinit is not and also if systemd_unitdir contains anything then no need to keep init.d scripts for sysvinit compatibility. Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-23systemd: Remove systemd_unitdir if systemd is not in distro featuresMuhammad Shakeel
If systemd is not supported DISTRO_FEATURE than there is no need to package related service files. Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09systemd: Don't enable systemd services when native.Randy Witt
It shouldn't be desired that systemd enable services when using class native. Blanking out the SYSTEMD_PACKAGES when native seems like the most straightforward way to fix this problem. Signed-off-by: Randy Witt <rewitt@declaratino.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-09classes: Use modern exception raising syntaxRichard Purdie
Modern expection rasing syntax is function call format, convert to this to keep python 3 happy and model correct coding style in the core. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09systemd.bbclass: restart service in postinst, not startRoss Burton
When upgrading packages it's possible that the service is already running because opkg doesn't actually execute the prerm hooks on upgrades, which is where the service should be stopped. Handle this case by restarting in postinst instead of starting. If the service isn't already running then this doesn't make a difference, but if it is running then the service will be restarted. [ YOCTO #4213 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02update-rc.d, systemd: redirect also stderr from typeMartin Jansa
* different shells different behavior? bash prints 'type: update-rc.d: not found' on stderr busybox's sh on stdout Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26update-rc.d/systemd: change communication variable nameRoss Burton
Rename SYSTEMD_BBCLASS_ENABLED to INHIBIT_UPDATERCD_BBCLASS to reflect the action, for clarity. Signed-off-by: Ross Burton <ross.burton@intel.com>
2013-03-26systemd: check for systemctl first, and don't force systemd to be installed.Ross Burton
With both sysvinit and systemd features enabled these postinsts may actually run on a target without systemd, so check that systemctl is present before using it. Signed-off-by: Ross Burton <ross.burton@intel.com>
2013-03-01systemd.bbclass: fix bb.errorMartin Jansa
NOTE: recipe avahi-ui-0.6.31-r7.0: task do_package: Started ERROR: %s does not appear in package list, please add it avahi-ui-daemon ERROR: %s does not appear in package list, please add it avahi-ui-dnsconfd Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-15systemd.bbclass: Dont use libdir and base_libdir for unitsKhem Raj
systemd always uses /lib and /usr/lib to store unit files so using libdir and base_libdir is incorrect. It will work where libdir is usr/lib and base_libdir is /lib but wont work when say its /lib64 Add a check to make sure that SYSTEMD_PACKAGES are part of PACKAGES too, otherwise error out Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11systemd.bbclass: use PACKAGESPLITFUNCS instead of populate_packages_prependRoss Burton
This is cleaner and leads to more accurate profiles. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11systemd.bbclass: helper class for recipes with systemd unitsRoss Burton
This class adds postinst/prerm scripts to start/stop/enable/disable the services as relevant, and some magic to ensure the service files are installed. Based on (but not the same as) the systemd.bbclass in meta-systemd, so thanks to the following for their work there: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Khem Raj <raj.khem@gmail.com> Martin Jansa <Martin.Jansa@gmail.com> Andreas Müller <schnitzeltony@googlemail.com> Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>