debian/0000775000000000000000000000000012310034035007157 5ustar debian/watch0000664000000000000000000000011112310033565010210 0ustar version=3 http://people.gnome.org/~desrt/systemd-shim-([0-9.]+)\.tar\.xz debian/systemd-shim.preinst0000664000000000000000000000035712310033565013227 0ustar #!/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# debian/systemd-shim.postrm0000664000000000000000000000044312310033565013063 0ustar #!/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# debian/systemd-shim.maintscript0000664000000000000000000000025512310033565014075 0ustar mv_conffile debian/systemd-shim/etc/dbus-1/system.d/org.freedesktop.systemd1.conf debian/systemd-shim/etc/dbus-1/system.d/org.freedesktop.systemd-shim.conf 6-2 systemd-shim debian/rules0000775000000000000000000000040012310033565010240 0ustar #!/usr/bin/make -f # -*- makefile -*- %: dh $@ --with autoreconf override_dh_install: dh_install mv debian/systemd-shim/etc/dbus-1/system.d/org.freedesktop.systemd1.conf \ debian/systemd-shim/etc/dbus-1/system.d/org.freedesktop.systemd-shim.conf debian/copyright0000664000000000000000000000242012310033565011117 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: systemd-shim Source: http://people.gnome.org/~desrt/ Files: * Copyright: Copyright: 2010 Lennart Poettering Copyright: 2011 Lennart Poettering Copyright: 2011 Bastien Nocera / 2007 David Zeuthen / 2013 Canonical Limited Copyright: 2013 Canonical Limited License: GPL-2+ Files: debian/* Copyright: 2013 Sebastien Bacher 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 . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/control0000664000000000000000000000117512310033565010575 0ustar Source: systemd-shim Section: admin Priority: extra Maintainer: Steve Langasek Build-Depends: debhelper (>= 9), dh-autoreconf, libglib2.0-dev Standards-Version: 3.9.5 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/ XS-Testsuite: autopkgtest Package: systemd-shim Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: pm-utils Description: shim for systemd This package emulates the systemd function that are required to run the systemd helpers without using the init service debian/compat0000664000000000000000000000000212310033565010364 0ustar 9 debian/changelog0000664000000000000000000000641612310034027011041 0ustar systemd-shim (6-2bzr1) trusty; urgency=medium Upload current Debian packaging bzr, no remaining Ubuntu changes. * Mark autopkgtest with "isolation-machine" as this test can't run in schroot or LXC. -- Martin Pitt Wed, 12 Mar 2014 11:33:28 +0100 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 Wed, 01 Jan 2014 10:11:19 +0000 systemd-shim (6-1) unstable; urgency=medium * Initial upload to Debian. -- Steve Langasek 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 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 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 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 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 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 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 Wed, 27 Mar 2013 19:43:26 +0100 systemd-shim (1-0ubuntu1) raring; urgency=low * New upstream version -- Sebastien Bacher Tue, 26 Mar 2013 17:12:18 +0100 systemd-shim (0.0-0ubuntu1) raring; urgency=low * Initial release to Ubuntu -- Sebastien Bacher Fri, 01 Mar 2013 11:42:18 +0100 debian/tests/0000775000000000000000000000000012310034034010320 5ustar debian/tests/power0000775000000000000000000000550712310033565011421 0ustar #!/bin/sh # Check power unit # Author: Martin Pitt set -eu 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/poweroff /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 $FAKE_SYS_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 "poweroff" ${CALL_MGR}.StartUnit 'shutdown.target' '' flush_log assert_eq "$LOG" "/sbin/poweroff " 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" debian/tests/lifecycle0000775000000000000000000000123112310033565012212 0ustar #!/bin/sh # Check D-BUS activation and 10 s inactivity timeout # Author: Martin Pitt set -eux CALL_MGR="gdbus call -y -d org.freedesktop.systemd1 -o /org/freedesktop/systemd1 -m org.freedesktop.systemd1.Manager" # should not run by default pidof systemd-shim && { echo "FAIL: found running PID"; exit 1; } # 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 debian/tests/control0000664000000000000000000000030212310033662011724 0ustar 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 debian/source/0000775000000000000000000000000012310034034010456 5ustar debian/source/format0000664000000000000000000000001412310033565011674 0ustar 3.0 (quilt)