summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <mpitt@debian.org>2016-07-26 10:25:00 +0100
committerMartin Pitt <mpitt@debian.org>2016-07-26 10:25:00 +0100
commit5aa0213e7727efbe73210f15f843fd8618df5456 (patch)
treed00c545ce0693d74822cc91251182aa07ad403d8
Import systemd-shim_10-2.debian.tar.xz
[dgit import tarball systemd-shim 10-2 systemd-shim_10-2.debian.tar.xz]
-rw-r--r--changelog220
-rw-r--r--compat1
-rw-r--r--control20
-rw-r--r--copyright32
-rwxr-xr-xrules17
-rw-r--r--source/format1
-rw-r--r--systemd-shim.maintscript2
-rw-r--r--systemd-shim.postrm11
-rw-r--r--systemd-shim.preinst9
-rw-r--r--tests/control7
-rwxr-xr-xtests/lifecycle40
-rwxr-xr-xtests/power141
-rw-r--r--watch3
13 files changed, 504 insertions, 0 deletions
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..01d22d2
--- /dev/null
+++ b/changelog
@@ -0,0 +1,220 @@
+systemd-shim (10-2) unstable; urgency=medium
+
+ * debian/copyright: Update Source: field.
+ * Orphan package. (See #832508)
+
+ -- Martin Pitt <mpitt@debian.org> Tue, 26 Jul 2016 11:25:00 +0200
+
+systemd-shim (10-1) unstable; urgency=medium
+
+ [ Martin Pitt ]
+ * New upstream release:
+ - Use the ntp support for 'systemd-timesyncd.service' too.
+ - Don't override an existing release agent.
+ * autopkgtests: The tests won't work when running under systemd; in that
+ case, try to install upstart and reboot, and skip if that's not available.
+ * Bump Standards-Version to 3.9.8 (no changes necessary).
+ * debian/control: Drop obsolete XS-Testsuite: tag.
+ * debian/tests/control: Modernize syntax.
+ * debian/tests/*: Install sysvinit-core instead of upstart, as the latter is
+ gone from Debian, and upstart-sysv is gone from Ubuntu.
+ * debian/watch: Adjust for new upstream location, directly using github
+ tarballs.
+
+ [ Iain Lane ]
+ * autopkgtests: umount /sys/power/state instead of the source
+
+ -- Martin Pitt <mpitt@debian.org> Wed, 08 Jun 2016 15:14:20 +0200
+
+systemd-shim (9-1) unstable; urgency=medium
+
+ * New upstream release.
+ - Add org.freedesktop.systemd1.Manager Version property (Closes: #766237)
+ - Clean up closing logind sessions (Closes: #756076)
+ * Add myself to Uploaders: with Steve's consent.
+ * Bump Standards-Version to 3.9.5 (no changes necessary).
+
+ -- Martin Pitt <mpitt@debian.org> Wed, 05 Nov 2014 21:55:33 +0100
+
+systemd-shim (8-4) unstable; urgency=medium
+
+ * Drop the dbus policy entirely from this package, as discussed in bug
+ #765101; since the security policy should always be in sync with
+ systemd's, and since the systemd package ships both logind (the consumer
+ of systemd-shim) and this dbus policy, there's no reason to ship this
+ separately rather than relying on the systemd copy.
+
+ -- Steve Langasek <vorlon@debian.org> Wed, 22 Oct 2014 04:29:44 +0000
+
+systemd-shim (8-3) unstable; urgency=medium
+
+ * debian/patches/dbus-policy-v215.patch: update our dbus policy to match
+ that from systemd 215. Closes: #765101.
+
+ -- Steve Langasek <vorlon@debian.org> Tue, 14 Oct 2014 04:54:09 +0000
+
+systemd-shim (8-2) unstable; urgency=medium
+
+ * No-change rebuild against systemd 215.
+
+ -- Martin Pitt <mpitt@debian.org> Tue, 16 Sep 2014 07:02:23 +0200
+
+systemd-shim (8-1) unstable; urgency=medium
+
+ * Update watch file.
+ * New upstream release.
+ - Drop patches cherry-picked from upstream.
+ * Add versioned dependency on cgmanager (>= 0.32) for new APIs.
+
+ -- Steve Langasek <vorlon@debian.org> Wed, 10 Sep 2014 15:51:34 +0000
+
+systemd-shim (7-3) unstable; urgency=medium
+
+ * debian/patches/0001-cgmanager-stop-doing-async-calls.patch:
+ cgmanager: stop doing async calls; fixes a race condition on login.
+ Thanks to Ryan Lortie <desrt@desrt.ca>. Closes LP: #1365095.
+
+ -- Steve Langasek <vorlon@debian.org> Fri, 05 Sep 2014 15:49:39 -0700
+
+systemd-shim (7-2) unstable; urgency=medium
+
+ * Fix Start TransientUnit signature for systemd >= 209. Check systemd
+ version during package build. Patch from upstream git. (LP: #1351815)
+ * Add systemd build dep for above configure check to work.
+ * Generate Breaks: to systemd >= or << 209, depending on which version we
+ build against.
+
+ -- Martin Pitt <mpitt@debian.org> Wed, 03 Sep 2014 08:07:00 +0200
+
+systemd-shim (7-1) unstable; urgency=medium
+
+ * New upstream release:
+ - Provide cgmanager integration to work with logind >= 205.
+ - Use "shutdown -h" instead of "poweroff" to respect /etc/default/halt
+ (LP: #1193944)
+ - Add stubs for Subscribe and Unsubscribe (LP: #1348039)
+ * Drop all patches, included upstream.
+ * debian/tests/lifecycle: Stop assuming that the shim isn't running
+ initially, as it's now often activated during login, upgrade, etc.
+ Instead, kill it manually to re-test D-BUS activation. Fixes autopkgtest
+ regression.
+ * debian/tests/power: Adjust to poweroff → shutdown upstream change.
+
+ -- Martin Pitt <mpitt@debian.org> Wed, 20 Aug 2014 08:22:08 +0200
+
+systemd-shim (6-5) unstable; urgency=medium
+
+ * Mark systemd-shim as Linux-only, since it now requires cgmanager which
+ is also Linux-only.
+
+ -- Steve Langasek <vorlon@debian.org> Sun, 10 Aug 2014 22:30:43 -0700
+
+systemd-shim (6-4) unstable; urgency=medium
+
+ * Merge cgmanager support from Ubuntu; thanks to Serge Hallyn and
+ Martin Pitt. Closes: #752939.
+ * Fix wrong path used in the .maintscript file. Closes: #748791.
+
+ -- Steve Langasek <vorlon@debian.org> Fri, 25 Jul 2014 16:48:09 +0000
+
+systemd-shim (6-3) unstable; urgency=medium
+
+ [ Martin Pitt ]
+ * Mark autopkgtest with "isolation-machine" as this test can't run in
+ schroot or LXC.
+
+ [ Steve Langasek ]
+ * Sync /etc/dbus-1/system.d/org.freedesktop.systemd-shim.conf with
+ /etc/dbus-1/system.d/org.freedesktop.systemd1.conf; since this only
+ governs the security policy there's no reason for it to be different
+ between the two implementations even though some of the declared
+ interfaces will not be available on systemd-shim. Closes: #746242.
+
+ -- Steve Langasek <vorlon@debian.org> Tue, 29 Apr 2014 07:49:10 +0000
+
+systemd-shim (6-2) unstable; urgency=medium
+
+ * Add diversions for the systemd package, and move the systemd-shim dbus
+ file to a different filename under /etc/dbus-1 so that we can drop the
+ Conflicts with systemd.
+
+ -- Steve Langasek <vorlon@debian.org> Wed, 01 Jan 2014 10:11:19 +0000
+
+systemd-shim (6-1) unstable; urgency=medium
+
+ * Initial upload to Debian.
+
+ -- Steve Langasek <vorlon@debian.org> Sat, 28 Dec 2013 21:05:01 +0000
+
+systemd-shim (6-0ubuntu1) trusty; urgency=low
+
+ * New upstream release:
+ - Flush the right bus (system, not session), to address another case of
+ "PrepareForSleep signal is missing" which breaks networking after
+ resuming. (LP: #1252121)
+
+ -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 10 Dec 2013 10:54:18 +0100
+
+systemd-shim (5-0ubuntu2) trusty; urgency=low
+
+ * Bump Standards-Version to 3.9.5, no changes necessary.
+ * Add autopkgtests for lifecycle management and power unit API handling.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 20 Nov 2013 15:06:23 +0100
+
+systemd-shim (5-0ubuntu1) trusty; urgency=low
+
+ * New upstream release:
+ - Write a sendsigs.omit.d file to prevent upstart from killing us during
+ shutdown. That's the other half of preventing suspends during shutdown.
+ (LP: #1211514)
+ * Update debian/copyright and debian/watch for new upstream address.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 14 Nov 2013 18:44:47 +0100
+
+systemd-shim (4-0ubuntu1) trusty; urgency=low
+
+ * New upstream release:
+ - Flush bus before exiting on idle to avoid a race where a message is
+ queued up but not yet sent. (LP: #1184262, part 1)
+ - Adjust the definition of "inactivity" to be 10 seconds after done
+ processing the last request instead of 10 seconds after we started.
+ This matters for long-running tasks like suspend. (LP: #1184262, part 2)
+ - Don't exit-on-idle while shutting down to avoid losing the flag that
+ tells us we are in the middle of a shutdown. (Necessary, but not
+ sufficient for LP #1211514)
+
+ -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 12 Nov 2013 09:31:19 +0100
+
+systemd-shim (3+real-0ubuntu1) saucy; urgency=low
+
+ * Upload the real version 3 tarball this time, fixing poweroff.target.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 02 May 2013 11:14:19 -0700
+
+systemd-shim (3-0ubuntu1) saucy; urgency=low
+
+ * New upstream release
+ * Add a watch file.
+ * Suggest pm-utils.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 02 May 2013 09:56:31 -0700
+
+systemd-shim (2-0ubuntu1) raring; urgency=low
+
+ * New upstream version: Install a ntp-units.d file so that never versions
+ of timedated don't assume that NTP is impossible.
+
+ -- Sebastien Bacher <seb128@ubuntu.com> Wed, 27 Mar 2013 19:43:26 +0100
+
+systemd-shim (1-0ubuntu1) raring; urgency=low
+
+ * New upstream version
+
+ -- Sebastien Bacher <seb128@ubuntu.com> Tue, 26 Mar 2013 17:12:18 +0100
+
+systemd-shim (0.0-0ubuntu1) raring; urgency=low
+
+ * Initial release to Ubuntu
+
+ -- Sebastien Bacher <seb128@ubuntu.com> Fri, 01 Mar 2013 11:42:18 +0100
diff --git a/compat b/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/compat
@@ -0,0 +1 @@
+9
diff --git a/control b/control
new file mode 100644
index 0000000..c687529
--- /dev/null
+++ b/control
@@ -0,0 +1,20 @@
+Source: systemd-shim
+Section: admin
+Priority: extra
+Maintainer: Debian QA Group <packages@qa.debian.org>
+Uploaders: Steve Langasek <vorlon@debian.org>, Martin Pitt <mpitt@debian.org>
+Build-Depends: debhelper (>= 9), dh-autoreconf, libglib2.0-dev, systemd
+Standards-Version: 3.9.8
+Vcs-Bzr: nosmart+http://bzr.debian.org/bzr/collab-maint/systemd-shim/trunk/
+Vcs-Browser: http://anonscm.debian.org/loggerhead/collab-maint/systemd-shim/trunk/
+
+Package: systemd-shim
+Architecture: linux-any
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ cgmanager (>= 0.32)
+Suggests: pm-utils
+Breaks: ${systemd:Breaks}
+Description: shim for systemd
+ This package emulates the systemd function that are required to run
+ the systemd helpers without using the init service
diff --git a/copyright b/copyright
new file mode 100644
index 0000000..6db2e69
--- /dev/null
+++ b/copyright
@@ -0,0 +1,32 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: systemd-shim
+Source: https://github.com/desrt/systemd-shim/tags
+
+Files: *
+Copyright: Copyright: 2010 Lennart Poettering
+ Copyright: 2011 Lennart Poettering
+ Copyright: 2011 Bastien Nocera <hadess@hadess.net> / 2007 David Zeuthen <david@fubar.dk> / 2013 Canonical Limited
+ Copyright: 2013 Canonical Limited
+License: GPL-2+
+
+Files: debian/*
+Copyright: 2013 Sebastien Bacher <seb128@ubuntu.com>
+License: GPL-2+
+
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
diff --git a/rules b/rules
new file mode 100755
index 0000000..9b77d71
--- /dev/null
+++ b/rules
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+%:
+ dh $@ --with autoreconf
+
+override_dh_install:
+ dh_install
+ rm -rf debian/systemd-shim/etc
+
+# StartTransientUnit D-BUS API change in 209
+override_dh_gencontrol:
+ if [ `pkg-config --modversion systemd` -ge 209 ]; then \
+ dh_gencontrol -- -Vsystemd:Breaks='systemd (<< 209)'; \
+ else \
+ dh_gencontrol -- -Vsystemd:Breaks='systemd (>= 209)'; \
+ fi
diff --git a/source/format b/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/systemd-shim.maintscript b/systemd-shim.maintscript
new file mode 100644
index 0000000..5e5a20e
--- /dev/null
+++ b/systemd-shim.maintscript
@@ -0,0 +1,2 @@
+rm_conffile /etc/dbus-1/system.d/org.freedesktop.systemd1.conf 6-2 systemd-shim
+rm_conffile /etc/dbus-1/system.d/org.freedesktop.systemd-shim.conf 8-4 systemd-shim
diff --git a/systemd-shim.postrm b/systemd-shim.postrm
new file mode 100644
index 0000000..c24949a
--- /dev/null
+++ b/systemd-shim.postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = remove -o "$1" = purge ]; then
+ dpkg-divert --package systemd-shim --remove --rename --divert \
+ /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd \
+ /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service
+fi
+
+#DEBHELPER#
diff --git a/systemd-shim.preinst b/systemd-shim.preinst
new file mode 100644
index 0000000..95c1383
--- /dev/null
+++ b/systemd-shim.preinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+dpkg-divert --package systemd-shim --add --rename --divert \
+ /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd \
+ /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service
+
+#DEBHELPER#
diff --git a/tests/control b/tests/control
new file mode 100644
index 0000000..021a81e
--- /dev/null
+++ b/tests/control
@@ -0,0 +1,7 @@
+Tests: lifecycle
+Depends: @, libglib2.0-bin
+Restrictions: needs-root, allow-stderr, isolation-machine
+
+Tests: power
+Depends: @, libglib2.0-bin, pm-utils
+Restrictions: needs-root, isolation-machine
diff --git a/tests/lifecycle b/tests/lifecycle
new file mode 100755
index 0000000..e0b44dd
--- /dev/null
+++ b/tests/lifecycle
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Check D-BUS activation and 10 s inactivity timeout
+# Author: Martin Pitt <martin.pitt@ubuntu.com>
+set -eux
+
+if [ -d /run/systemd/system ]; then
+ if [ ! -x /tmp/autopkgtest-reboot ]; then
+ echo "SKIP: testbed does not support reboot"
+ exit 0
+ fi
+ if [ -n "${ADT_REBOOT_MARK:-}" ]; then
+ echo "SKIP: Reboot with sysvinit-core still runs systemd; using init= ?"
+ exit 0
+ fi
+ echo "Installing sysvinit-core..."
+ apt-get install -y sysvinit-core
+ echo "Rebooting into SysV init..."
+ /tmp/autopkgtest-reboot b1
+fi
+
+CALL_MGR="gdbus call -y -d org.freedesktop.systemd1 -o /org/freedesktop/systemd1 -m org.freedesktop.systemd1.Manager"
+
+# ensure it is not running
+killall systemd-shim || true
+
+# activate it
+${CALL_MGR}.Reload
+
+# should be running now
+PID=`pidof systemd-shim`
+[ -n "$PID" ]
+
+# should still be running with the same pid after 5 s
+sleep 5
+[ "`pidof systemd-shim`" = "$PID" ]
+
+# should time out after 10 s, so wait another 7
+sleep 7
+pidof systemd-shim && { echo "FAIL: not timing out after 10s"; exit 1; }
+true
diff --git a/tests/power b/tests/power
new file mode 100755
index 0000000..97db33c
--- /dev/null
+++ b/tests/power
@@ -0,0 +1,141 @@
+#!/bin/sh
+# Check power unit
+# Author: Martin Pitt <martin.pitt@ubuntu.com>
+set -eu
+
+if [ -d /run/systemd/system ]; then
+ if [ ! -x /tmp/autopkgtest-reboot ]; then
+ echo "SKIP: testbed does not support reboot"
+ exit 0
+ fi
+ if [ -n "${ADT_REBOOT_MARK:-}" ]; then
+ echo "SKIP: Reboot with sysvinit-core still runs systemd; using init= ?"
+ exit 0
+ fi
+ echo "Installing sysvinit-core..."
+ apt-get install -y sysvinit-core
+ echo "Rebooting into SysV init..."
+ /tmp/autopkgtest-reboot b1
+fi
+
+CALL_MGR="gdbus call -y -d org.freedesktop.systemd1 -o /org/freedesktop/systemd1 -m org.freedesktop.systemd1.Manager"
+
+# install ephemeral stubs for power management commands
+WRAPPED_CMDS="/usr/sbin/pm-suspend /usr/sbin/pm-hibernate /sbin/shutdown /sbin/reboot"
+WORKDIR=`mktemp -d`
+/bin/echo -e '#!/bin/sh\necho "$0 $@" >> '$WORKDIR'/log' > $WORKDIR/stub
+chmod 755 $WORKDIR/stub
+for cmd in $WRAPPED_CMDS; do
+ mount -o bind $WORKDIR/stub $cmd
+done
+FAKE_SYS_STATE="$WORKDIR/sys_power_state"
+touch $FAKE_SYS_STATE
+mount -o bind $FAKE_SYS_STATE /sys/power/state
+
+# clean up mounts and temp dir on exit
+cleanup() {
+ echo 'Cleanup...'
+ set +e
+ for c in $WRAPPED_CMDS; do umount $c; done
+ umount /sys/power/state
+ rm -r $WORKDIR
+}
+trap cleanup EXIT HUP INT QUIT ABRT PIPE TERM
+
+# flush log and return it in $LOG
+flush_log() {
+ sync
+ LOG=`cat $WORKDIR/log 2>/dev/null` || LOG=''
+ rm -f $WORKDIR/log
+}
+
+# flush /sys/power/state and return it in $LOG
+flush_sys() {
+ sync
+ LOG=`cat $FAKE_SYS_STATE 2>/dev/null` || LOG=''
+ echo > $FAKE_SYS_STATE
+}
+
+assert_eq() {
+ if [ "$1" != "$2" ]; then
+ echo "FAIL: '$1' not equal to '$2'" >&2
+ exit 1
+ fi
+}
+
+reset() {
+ pkill -e -f /usr/lib/*/systemd-shim || true
+}
+
+
+# make sure we start with a clean slate
+reset
+
+#
+# Tests start here
+#
+
+echo "suspend"
+${CALL_MGR}.StartUnit 'suspend.target' ''
+flush_log
+assert_eq "$LOG" "/usr/sbin/pm-suspend "
+
+echo "hibernate"
+${CALL_MGR}.StartUnit 'hibernate.target' ''
+flush_log
+assert_eq "$LOG" "/usr/sbin/pm-hibernate "
+
+echo "shutdown"
+${CALL_MGR}.StartUnit 'shutdown.target' ''
+flush_log
+assert_eq "$LOG" "/sbin/shutdown -h now"
+
+echo "no inactivity timeout after poweroff"
+PID=`pidof systemd-shim`
+sleep 12
+assert_eq "`pidof systemd-shim`" "$PID"
+
+echo "suspend while poweroff is in progress"
+${CALL_MGR}.StartUnit 'suspend.target' ''
+flush_log
+assert_eq "$LOG" ""
+reset
+
+echo "reboot"
+${CALL_MGR}.StartUnit 'reboot.target' ''
+flush_log
+assert_eq "$LOG" "/sbin/reboot "
+
+echo "unknown unit"
+if ${CALL_MGR}.StartUnit 'unknown.target' '' 2>&1; then
+ echo "unknown.target unexpectedly succeeded"
+ exit 1
+fi
+
+echo "two suspends in quick succession are just counted once"
+reset
+${CALL_MGR}.StartUnit 'suspend.target' ''
+sleep 0.5
+${CALL_MGR}.StartUnit 'suspend.target' ''
+flush_log
+assert_eq "$LOG" "/usr/sbin/pm-suspend "
+
+echo "suspend falls back to writing /sys if pm-utils is not available"
+reset
+chmod 0 /usr/sbin/pm-suspend
+${CALL_MGR}.StartUnit 'suspend.target' ''
+flush_log
+assert_eq "$LOG" ""
+flush_sys
+assert_eq "$LOG" "mem"
+
+echo "hibernate falls back to writing /sys if pm-utils is not available"
+reset
+chmod 0 /usr/sbin/pm-hibernate
+${CALL_MGR}.StartUnit 'hibernate.target' ''
+flush_log
+assert_eq "$LOG" ""
+flush_sys
+assert_eq "$LOG" "disk"
+
+echo "all tests passed"
diff --git a/watch b/watch
new file mode 100644
index 0000000..1356617
--- /dev/null
+++ b/watch
@@ -0,0 +1,3 @@
+version=3
+opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/systemd-shim-$1\.tar\.gz/ \
+ https://github.com/desrt/systemd-shim/tags .*/v?(\d\S*)\.tar\.gz