diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-03-31 19:41:36 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-03-31 19:42:18 +0300 |
commit | 6873fc1af55d2f1190e110b930f2ea1ce302c847 (patch) | |
tree | 5e218928d3b341792782b1fdb2689c25d65bad07 | |
parent | 62d9146406bb028a9d84ad2a5b1076ff1209564b (diff) | |
download | lightdm-6873fc1af55d2f1190e110b930f2ea1ce302c847.tar.gz |
Use SMF on Dyson
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/lightdm.smf/manifest/system/lightdm.xml | 47 | ||||
-rwxr-xr-x | debian/lightdm.smf/method/lightdm | 23 | ||||
-rwxr-xr-x | debian/rules | 15 |
5 files changed, 85 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index 65481dc..8ac8610 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ lightdm (1.10.3-3+dyson1) UNRELEASED; urgency=medium triggers * debian/rules: disable compiling of tests: FTBFS on Dyson and are not used anyway + * Added SMF service for Dyson -- Igor Pashev <pashev.igor@gmail.com> Tue, 31 Mar 2015 19:05:08 +0300 diff --git a/debian/control b/debian/control index a5daf73..f837b50 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 9), intltool, pkg-config, libglib2.0-dev, libgtk-3-dev, libck-connector-dev, gnome-doc-utils, libqt4-dev, valac, gobject-introspection, dpkg-dev (>= 1.16.1), gtk-doc-tools, itstool, libgcrypt11-dev, libgirepository1.0-dev, - dh-systemd (>= 1.14) + dh-systemd (>= 1.14) [linux-any], dh-smf [illumos-any], Standards-Version: 3.9.6 Homepage: https://launchpad.net/lightdm Vcs-Svn: svn://anonscm.debian.org/pkg-xfce/goodies/trunk/lightdm diff --git a/debian/lightdm.smf/manifest/system/lightdm.xml b/debian/lightdm.smf/manifest/system/lightdm.xml new file mode 100644 index 0000000..58430d8 --- /dev/null +++ b/debian/lightdm.smf/manifest/system/lightdm.xml @@ -0,0 +1,47 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/xml/schema/smf/service_bundle.dtd.1"> +<service_bundle type="manifest" name="lightdm"> + <service name="system/graphical-login" type="service" version="1"> + <instance name="lightdm" enabled="true"> + <dependency name="filesystem" grouping="require_all" restart_on="none" type="service"> + <service_fmri value="svc:/system/filesystem/local"/> + </dependency> + <dependency name="lightdm_conf" grouping="require_all" restart_on="restart" type="path"> + <service_fmri value="file://localhost/etc/lightdm/lightdm.conf"/> + </dependency> + <dependency name="users_conf" grouping="require_all" restart_on="restart" type="path"> + <service_fmri value="file://localhost/etc/lightdm/users.conf"/> + </dependency> + <dependency name="keys_conf" grouping="require_all" restart_on="restart" type="path"> + <service_fmri value="file://localhost/etc/lightdm/keys.conf"/> + </dependency> + <dependency name="multi-user" grouping="require_all" restart_on="error" type="service"> + <service_fmri value="svc:/milestone/multi-user:default"/> + </dependency> + <dependency name="dbus" type="service" grouping="require_all" restart_on="none"> + <service_fmri value="svc:/system/dbus"/> + </dependency> + <exec_method type="method" name="start" exec="/lib/svc/method/lightdm start" timeout_seconds="60"/> + <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/> + <exec_method type="method" name="refresh" exec=":true" timeout_seconds="10"/> + <property_group name="package" type="framework"> + <propval name="upgrade" type="astring" value="refresh"/> + </property_group> + <property_group name="startd" type="framework"> + <propval name="duration" type="astring" value="child"/> + </property_group> + <template> + <common_name> + <loctext xml:lang="C"> + simple display manager + </loctext> + </common_name> + <documentation> + <manpage title="lightdm" section="1"/> + <manpage title="lightdm-set-defaults" section="1"/> + </documentation> + </template> + </instance> + <stability value="Unstable"/> + </service> +</service_bundle> diff --git a/debian/lightdm.smf/method/lightdm b/debian/lightdm.smf/method/lightdm new file mode 100755 index 0000000..d357e9b --- /dev/null +++ b/debian/lightdm.smf/method/lightdm @@ -0,0 +1,23 @@ +#! /bin/sh +set -e + +DAEMON=/usr/sbin/lightdm + +if [ -r /etc/default/locale ]; then + . /etc/default/locale + export LANG LANGUAGE +fi + +start() { + exec $DAEMON +} + + +case "$1" in + start) + start;; + # Stop via KILL, refresh via USR1 +esac + +exit 0 + diff --git a/debian/rules b/debian/rules index fdd5fa7..a7f3e02 100755 --- a/debian/rules +++ b/debian/rules @@ -27,10 +27,21 @@ override_dh_install: find debian/tmp/etc/apparmor.d -type f -exec chmod 0644 '{}' \; dh_install --fail-missing -X etc/init/lightdm.conf -X etc/apparmor.d/lightdm-guest-session -%: - dh $@ --with systemd --parallel override_dh_auto_test: +with := + +ifeq (linux,$(DEB_HOST_ARCH_OS)) +with += systemd + override_dh_systemd_start: dh_systemd_start -plightdm --no-start -r lightdm.service +endif + +ifeq (illumos,$(DEB_HOST_ARCH_OS)) +with += smf +endif + +%: + dh $@ $(with:%=--with %) --parallel |