powermanagement-interface-0.3.20ubuntu1/0000775000000000000000000000000011107242266015140 5ustar powermanagement-interface-0.3.20ubuntu1/pmi.acpi0000664000000000000000000000567210743243632016600 0ustar #!/bin/bash # This is the ACPI version of the shell version of PMI # calling convention: pmi command="$1" event="$2" usage () { echo "Usage: $0 query|action " >&2 echo " $0 capabilities" >&2 exit 254 } query () { [ ! -z "$1" ] && event="$1" case "$event" in suspend|sleep) if grep -q ' /host fuse' /proc/mounts; then # Disallow suspend when we're mounting / # from a loopback image on a fuse # filesystem. result=1 else pm-is-supported --suspend && result=0 || result=1 fi ;; hibernate) if grep -q ' /host fuse' /proc/mounts || \ ! swapon -s | tail -n +2 | awk '$2 == "file" { exit 1 }'; then # Disallow hibernate when we're mounting / # from a loopback image on a fuse # filesystem, or when a swap file is active. result=1 elif [ -f /var/run/do-not-hibernate ]; then result=1 else pm-is-supported --hibernate && result=0 || result=1 fi ;; *) result=1 echo "No such event found" >&2 ;; esac } run () { case "$event" in suspend|sleep) [ -f /var/lock/acpisleep ] && exit 0 dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0 ;; hibernate) [ -f /var/lock/acpisleep ] && exit 0 [ -f /var/run/do-not-hibernate ] && echo "Default kernel has been upgraded" >&2 && exit 1 dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate ;; restart) [ -f /var/lock/acpisleep ] && exit 0 shutdown -r now ;; shutdown) [ -f /var/lock/acpisleep ] && exit 0 shutdown -h now ;; esac } capabilities () { for i in "hibernate" "suspend"; do query $i [ $result -eq 0 ] && caps="$caps $i" done echo $caps } case "$command" in query) query $event exit $result ;; action) run $event ;; capabilities) capabilities ;; *) usage ;; esac exit 0 powermanagement-interface-0.3.20ubuntu1/stop-applications.sh0000664000000000000000000000053010577373066021160 0ustar #!/bin/bash # Walk a directory, assembling a list of services that need to be stopped # Returns a string . /etc/default/pmi if [ ! -d $STOPDIR ]; then echo "No such directory $STOPTDIR, exiting" >&2 exit 1 fi for file in $(find $STOPDIR -type f -print "%p "); do STOPLIST="$STOPLIST "$(<$file); done echo $STOPLIST powermanagement-interface-0.3.20ubuntu1/defaults0000664000000000000000000000024010202420171016652 0ustar # The directory for blacklisting modules BLACKLISTDIR="/var/lib/pmi/blacklist" # The directory for adding services to be stopped STOPDIR="/var/lib/pmi/stop" powermanagement-interface-0.3.20ubuntu1/pmi.pbb0000664000000000000000000000400110372153403016402 0ustar #!/bin/bash # This is the PowerPC version of PMI. # (C) 2006 Martin Pitt command="$1" event="$2" usage () { echo "Usage: $0 query|action " >&2 echo " $0 capabilities" >&2 exit 254 } query () { [ ! -z "$1" ] && event="$1" case "$event" in suspend|sleep) perl << EOF sub PMU_IOC_CAN_SLEEP { 0x40044205; } open PMU, '/dev/pmu' or die "open /dev/pmu: \$!"; \$p = pack 'l', 0; ioctl PMU, &PMU_IOC_CAN_SLEEP, \$p or die "ioctl: \$!"; (\$v) = unpack 'l', \$p; exit (\$v ? 0 : 1); EOF result=$? ;; hibernate) # no hibernation support at the moment result=1 ;; *) result=1 echo "No such event found" >&2 ;; esac } call_scripts() { if [ -x /etc/apm/apmd_proxy ]; then /etc/apm/apmd_proxy $1 $2 else run-parts --arg=$1 --arg=$2 /etc/apm/event.d if [ -d /etc/apm/$1.d ]; then run-parts --arg=$1 --arg=$2 /etc/apm/$1.d fi fi } run () { case "$1" in suspend|sleep) # call suspend scripts call_scripts suspend user # trigger sleep perl <&2 ;; *) echo "No such event found" >&2 ;; esac } capabilities () { for i in "hibernate" "suspend"; do query $i [ "$result" -eq 0 ] && caps="$caps $i" done echo $caps } case "$command" in query) query $event exit $result ;; action) run $event ;; capabilities) capabilities ;; *) usage ;; esac exit 0 powermanagement-interface-0.3.20ubuntu1/blacklist-modules.sh0000664000000000000000000000112510577373067021127 0ustar #!/bin/bash # Walk a directory, assembling a list of modules that need to be blacklisted # Then check which modules are loaded, and return those as a string . /etc/default/pmi if [ ! -d $BLACKLISTDIR ]; then echo "No such directory $BLACKLISTDIR, exiting" >&2 exit 1 fi for file in $(find $BLACKLISTDIR -type f -print "%p "); do MODSLIST="$MODSLIST "$(<$file); done MODSLOADED=$(lsmod|awk '!/Module/ {print $1}') for mod in $MODSLIST; do if echo $MODSLOADED|grep -q -w "$mod"; then BLACKLIST="$BLACKLIST $mod" fi done echo $BLACKLIST powermanagement-interface-0.3.20ubuntu1/gdm-signal/0000775000000000000000000000000012134061231017152 5ustar powermanagement-interface-0.3.20ubuntu1/gdm-signal/gdm-logout-action.h0000664000000000000000000000320010214605151022651 0ustar /* * gdm-logout-action.h: GDM logout action protocol implementation * * Copyright (C) 2005 Raffaele Sandrini * Copyright (C) 2005 Red Hat, Inc. * Copyright (C) 2002, 2003 George Lebl * Copyright (C) 2001 Queen of England, * * This program 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 program 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * Authors: * Raffaele Sandrini * George Lebl * Mark McLoughlin */ #ifndef __GDM_LOGOUT_ACTION_H__ #define __GDM_LOGOUT_ACTION_H__ #include G_BEGIN_DECLS typedef enum { GDM_LOGOUT_ACTION_NONE = 0, GDM_LOGOUT_ACTION_SHUTDOWN = 1 << 0, GDM_LOGOUT_ACTION_REBOOT = 1 << 1, GDM_LOGOUT_ACTION_SUSPEND = 1 << 2, GDM_LOGOUT_ACTION_HIBERNATE = 1 << 3 } GdmLogoutAction; gboolean gdm_supports_logout_action (GdmLogoutAction action); void gdm_set_logout_action (GdmLogoutAction action); GdmLogoutAction gdm_get_logout_action (void); G_END_DECLS #endif /* __GDM_LOGOUT_ACTION_H__ */ powermanagement-interface-0.3.20ubuntu1/gdm-signal/Makefile0000664000000000000000000000051412134061231020612 0ustar default: gdm-signal CFLAGS = -O2 `pkg-config --cflags glib-2.0` `pkg-config --cflags gtk+-2.0` LIBS = `pkg-config --libs glib-2.0` `pkg-config --libs gtk+-2.0` -lXau gdm-signal: autodown.o gdm-logout-action.o gdm-logout-action.h cc $(CFLAGS) autodown.o gdm-logout-action.o -o gdm-signal $(LIBS) clean: -rm -f *.o *~ gdm-signal powermanagement-interface-0.3.20ubuntu1/gdm-signal/gdm-logout-action.c0000664000000000000000000002737310607005336022672 0ustar /* * gdm-protocol.c: GDM logout action protocol implementation * * Copyright (C) 2005 Raffaele Sandrini * Copyright (C) 2005 Red Hat, Inc. * Copyright (C) 2002, 2003 George Lebl * Copyright (C) 2001 Queen of England, * * This program 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 program 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * Authors: * Raffaele Sandrini * George Lebl * Mark McLoughlin */ #include "gdm-logout-action.h" #include #include #include #include #include #include #include #include #define GDM_PROTOCOL_UPDATE_INTERVAL 1 /* seconds */ #define GDM_PROTOCOL_SOCKET_PATH "/var/run/gdm_socket" #define GDM_PROTOCOL_MSG_CLOSE "CLOSE" #define GDM_PROTOCOL_MSG_VERSION "VERSION" #define GDM_PROTOCOL_MSG_AUTHENTICATE "AUTH_LOCAL" #define GDM_PROTOCOL_MSG_QUERY_ACTION "QUERY_LOGOUT_ACTION" #define GDM_PROTOCOL_MSG_SET_ACTION "SET_LOGOUT_ACTION" #define GDM_PROTOCOL_MSG_SET_SUSPEND "SET_SUSPEND" #define GDM_PROTOCOL_MSG_SET_HIBERNATE "SET_HIBERNATE" #define GDM_ACTION_STR_NONE "NONE" #define GDM_ACTION_STR_SHUTDOWN "HALT" #define GDM_ACTION_STR_REBOOT "REBOOT" #define GDM_ACTION_STR_SUSPEND "SUSPEND" #define GDM_ACTION_STR_HIBERNATE "HIBERNATE" typedef struct { int fd; char *auth_cookie; GdmLogoutAction available_actions; GdmLogoutAction current_actions; time_t last_update; } GdmProtocolData; static GdmProtocolData gdm_protocol_data = { 0, GDM_LOGOUT_ACTION_NONE, GDM_LOGOUT_ACTION_NONE, 0 }; static char * gdm_send_protocol_msg (GdmProtocolData *data, const char *msg) { GString *retval; char buf[256]; char *p; int len; p = g_strconcat (msg, "\n", NULL); if (write (data->fd, p, strlen (p)) < 0) { g_free (p); g_warning ("Failed to send message to GDM: %s", g_strerror (errno)); return NULL; } g_free (p); p = NULL; retval = NULL; while ((len = read (data->fd, buf, sizeof (buf) - 1)) > 0) { buf[len] = '\0'; if (!retval) retval = g_string_new (buf); else retval = g_string_append (retval, buf); if ((p = strchr (retval->str, '\n'))) break; } if (p) *p = '\0'; return retval ? g_string_free (retval, FALSE) : NULL; } static char * get_display_number (void) { const char *display_name; char *retval; char *p; display_name = gdk_display_get_name (gdk_display_get_default ()); p = strchr (display_name, ':'); if (!p) return g_strdup ("0"); while (*p == ':') p++; retval = g_strdup (p); p = strchr (retval, '.'); if (p != NULL) *p = '\0'; return retval; } static gboolean gdm_authenticate_connection (GdmProtocolData *data) { #define GDM_MIT_MAGIC_COOKIE_LEN 16 const char *xau_path; FILE *f; Xauth *xau; char *display_number; gboolean retval; if (data->auth_cookie) { char *msg; char *response; msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s", data->auth_cookie); response = gdm_send_protocol_msg (data, msg); g_free (msg); if (response && !strcmp (response, "OK")) { g_free (response); return TRUE; } else { g_free (response); g_free (data->auth_cookie); data->auth_cookie = NULL; } } if (!(xau_path = XauFileName ())) return FALSE; if (!(f = fopen (xau_path, "r"))) return FALSE; retval = FALSE; display_number = get_display_number (); while ((xau = XauReadAuth (f))) { char buffer[40]; /* 2*16 == 32, so 40 is enough */ char *msg; char *response; int i; if (xau->family != FamilyLocal || strncmp (xau->number, display_number, xau->number_length) || strncmp (xau->name, "MIT-MAGIC-COOKIE-1", xau->name_length) || xau->data_length != GDM_MIT_MAGIC_COOKIE_LEN) { XauDisposeAuth (xau); continue; } for (i = 0; i < GDM_MIT_MAGIC_COOKIE_LEN; i++) g_snprintf (buffer + 2*i, 3, "%02x", (guint)(guchar)xau->data[i]); XauDisposeAuth (xau); msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s", buffer); response = gdm_send_protocol_msg (data, msg); g_free (msg); if (response && !strcmp (response, "OK")) { data->auth_cookie = g_strdup (buffer); g_free (response); retval = TRUE; break; } g_free (response); } g_free (display_number); fclose (f); return retval; #undef GDM_MIT_MAGIC_COOKIE_LEN } static void gdm_shutdown_protocol_connection (GdmProtocolData *data) { if (data->fd) close (data->fd); data->fd = 0; } static gboolean gdm_init_protocol_connection (GdmProtocolData *data) { struct sockaddr_un addr; char *response; g_assert (data->fd <= 0); data->fd = socket (AF_UNIX, SOCK_STREAM, 0); if (data->fd < 0) { g_warning ("Failed to create GDM socket: %s", g_strerror (errno)); gdm_shutdown_protocol_connection (data); return FALSE; } if (g_file_test(GDM_PROTOCOL_SOCKET_PATH, G_FILE_TEST_EXISTS)) strcpy (addr.sun_path, GDM_PROTOCOL_SOCKET_PATH); else strcpy (addr.sun_path, "/tmp/.gdm_socket"); addr.sun_family = AF_UNIX; if (connect (data->fd, (struct sockaddr *) &addr, sizeof (addr)) < 0) { g_warning ("Failed to establish a connection with GDM: %s", g_strerror (errno)); gdm_shutdown_protocol_connection (data); return FALSE; } response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_VERSION); if (!response || strncmp (response, "GDM ", strlen ("GDM ") != 0)) { g_free (response); g_warning ("Failed to get protocol version from GDM"); gdm_shutdown_protocol_connection (data); return FALSE; } if (!gdm_authenticate_connection (data)) { g_warning ("Failed to authenticate with GDM"); gdm_shutdown_protocol_connection (data); return FALSE; } return TRUE; } static void gdm_parse_query_response (GdmProtocolData *data, const char *response) { char **actions; int i; data->available_actions = GDM_LOGOUT_ACTION_NONE; data->current_actions = GDM_LOGOUT_ACTION_NONE; if (strncmp (response, "OK ", 3) != 0) return; response += 3; actions = g_strsplit (response, ";", -1); for (i = 0; actions[i]; i++) { GdmLogoutAction action = GDM_LOGOUT_ACTION_NONE; gboolean selected = FALSE; char *str = actions [i]; int len; len = strlen (str); if (!len) continue; if (str[len - 1] == '!') { selected = TRUE; str[len - 1] = '\0'; } if (!strcmp (str, GDM_ACTION_STR_SHUTDOWN)) action = GDM_LOGOUT_ACTION_SHUTDOWN; else if (!strcmp (str, GDM_ACTION_STR_REBOOT)) action = GDM_LOGOUT_ACTION_REBOOT; else if (!strcmp (str, GDM_ACTION_STR_SUSPEND)) action = GDM_LOGOUT_ACTION_SUSPEND; else if (!strcmp (str, GDM_ACTION_STR_HIBERNATE)) action = GDM_LOGOUT_ACTION_HIBERNATE; data->available_actions |= action; if (selected) data->current_actions |= action; } g_strfreev (actions); } static void gdm_update_logout_actions (GdmProtocolData *data) { time_t current_time; char *response; current_time = time (NULL); if (current_time <= (data->last_update + GDM_PROTOCOL_UPDATE_INTERVAL)) return; data->last_update = current_time; if (!gdm_init_protocol_connection (data)) return; if ((response = gdm_send_protocol_msg (data, GDM_PROTOCOL_MSG_QUERY_ACTION))) { gdm_parse_query_response (data, response); g_free (response); } gdm_shutdown_protocol_connection (data); } gboolean gdm_supports_logout_action (GdmLogoutAction action) { gdm_update_logout_actions (&gdm_protocol_data); return (gdm_protocol_data.available_actions & action) != 0; } GdmLogoutAction gdm_get_logout_action (void) { gdm_update_logout_actions (&gdm_protocol_data); return gdm_protocol_data.current_actions; } void gdm_set_logout_action (GdmLogoutAction action) { char *action_str = NULL; char *msg; char *response; if (!gdm_init_protocol_connection (&gdm_protocol_data)) return; switch (action) { case GDM_LOGOUT_ACTION_NONE: action_str = GDM_ACTION_STR_NONE; break; case GDM_LOGOUT_ACTION_SHUTDOWN: action_str = GDM_ACTION_STR_SHUTDOWN; break; case GDM_LOGOUT_ACTION_REBOOT: action_str = GDM_ACTION_STR_REBOOT; break; case GDM_LOGOUT_ACTION_SUSPEND: response = gdm_send_protocol_msg (&gdm_protocol_data, GDM_PROTOCOL_MSG_SET_SUSPEND); g_free (response); gdm_protocol_data.last_update = 0; gdm_shutdown_protocol_connection (&gdm_protocol_data); return; case GDM_LOGOUT_ACTION_HIBERNATE: response = gdm_send_protocol_msg (&gdm_protocol_data, GDM_PROTOCOL_MSG_SET_HIBERNATE); g_free (response); gdm_protocol_data.last_update = 0; gdm_shutdown_protocol_connection (&gdm_protocol_data); return; } msg = g_strdup_printf (GDM_PROTOCOL_MSG_SET_ACTION " %s", action_str); response = gdm_send_protocol_msg (&gdm_protocol_data, msg); g_free (msg); g_free (response); gdm_protocol_data.last_update = 0; gdm_shutdown_protocol_connection (&gdm_protocol_data); } powermanagement-interface-0.3.20ubuntu1/gdm-signal/.libs/0000775000000000000000000000000010215061555020170 5ustar powermanagement-interface-0.3.20ubuntu1/gdm-signal/autodown.c0000664000000000000000000000547011107242545021174 0ustar /* autodown.c - Allow triggering of gdm options. Written by Rob Taylor. This program 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, or (at your option) any later version. This program 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include "gdm-logout-action.h" static int do_hibernate = FALSE; static int do_suspend = FALSE; static int do_halt = FALSE; static int do_reboot = FALSE; GOptionEntry entries[] = { { "hibernate", 'z', 0, G_OPTION_ARG_NONE, &do_hibernate, "Hibernate the machine", NULL }, { "halt", 'h', 0, G_OPTION_ARG_NONE, &do_halt, "Halt the machine", NULL }, { "suspend", 's', 0, G_OPTION_ARG_NONE, &do_suspend, "Suspend the machine", NULL }, { "reboot", 'r', 0, G_OPTION_ARG_NONE, &do_reboot, "Reboot the machine", NULL }, { NULL } }; int main(int argc, char **argv) { gboolean halt_supported, suspend_supported, hibernate_supported, reboot_supported; GdmLogoutAction suspend_action; GError *error=NULL; GOptionContext* context = g_option_context_new ("- make the machine sleep in some way"); g_option_context_add_main_entries (context, entries, NULL); g_option_context_add_group (context, gtk_get_option_group (TRUE)); if (!g_option_context_parse (context, &argc, &argv, &error)) { fprintf (stderr, "gdm-signal: %s\n", error->message); g_error_free (error); return 1; } g_option_context_free(context); halt_supported = gdm_supports_logout_action (GDM_LOGOUT_ACTION_SHUTDOWN); suspend_supported = gdm_supports_logout_action (GDM_LOGOUT_ACTION_SUSPEND); hibernate_supported = gdm_supports_logout_action (GDM_LOGOUT_ACTION_HIBERNATE); reboot_supported = gdm_supports_logout_action (GDM_LOGOUT_ACTION_REBOOT); if (halt_supported && do_halt) suspend_action = GDM_LOGOUT_ACTION_SHUTDOWN; else if (suspend_supported && do_suspend) suspend_action = GDM_LOGOUT_ACTION_SUSPEND; else if (hibernate_supported && do_hibernate) suspend_action = GDM_LOGOUT_ACTION_HIBERNATE; else if (reboot_supported && do_reboot) suspend_action = GDM_LOGOUT_ACTION_REBOOT; gdm_set_logout_action (suspend_action); return 0; } powermanagement-interface-0.3.20ubuntu1/pmi.stub0000664000000000000000000000243410407437062016631 0ustar #!/bin/bash # This is the stub version of PMI # that does absolutely nothing. command="$1" event="$2" usage () { echo "Usage: $0 query|action " >&2 echo " $0 capabilities" >&2 exit 254 } query () { [ ! -z "$1" ] && event="$1" case "$event" in *) result=1 echo "No such event found" >&2 ;; esac } call_scripts() { if [ -x /etc/apm/apmd_proxy ]; then /etc/apm/apmd_proxy $1 $2 else run-parts --arg=$1 --arg=$2 /etc/apm/event.d if [ -d /etc/apm/$1.d ]; then run-parts --arg=$1 --arg=$2 /etc/apm/$1.d fi fi } run () { case "$1" in *) echo "No such event found" >&2 ;; esac } capabilities () { for i in "hibernate" "suspend"; do query $i [ "$result" -eq 0 ] && caps="$caps $i" done echo $caps } case "$command" in query) query $event exit $result ;; action) run $event ;; capabilities) capabilities ;; *) usage ;; esac exit 0 powermanagement-interface-0.3.20ubuntu1/debian/0000775000000000000000000000000012134061254016357 5ustar powermanagement-interface-0.3.20ubuntu1/debian/postinst0000664000000000000000000000020510202420042020146 0ustar #!/bin/sh case "$1" in configure) ucf /usr/share/pmi/defaults /etc/default/pmi ;; *) ;; esac #DEBHELPER# powermanagement-interface-0.3.20ubuntu1/debian/rules0000775000000000000000000000250511107237502017441 0ustar #! /usr/bin/make -f DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) # good known arches go up here ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), "i386 amd64 ia64 lpia")) TYPE := acpi pmtool-depends := -V'pmtool:Depends=acpi-support (>= 0.17)' else ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), "powerpc")) TYPE := pbb pmtool-depends := else TYPE := stub pmtool-depends := endif clean: echo "Type is $(TYPE)" echo "pmtools-depends is $(pmtool-depends)" dh_testdir dh_clean (cd gdm-signal && $(MAKE) clean) build: (cd gdm-signal && $(MAKE)) install: build dh_testdir dh_testroot dh_clean -k dh_installdirs install -m 755 pmi.$(TYPE) debian/powermanagement-interface/usr/sbin/pmi install -m 755 blacklist-modules.sh debian/powermanagement-interface/usr/share/pmi/ install -m 755 stop-applications.sh debian/powermanagement-interface/usr/share/pmi/ install -m 644 defaults debian/powermanagement-interface/usr/share/pmi/defaults install -m 755 gdm-signal/gdm-signal debian/powermanagement-interface/usr/bin/gdm-signal binary-indep: binary-arch: install dh_testdir dh_testroot dh_installdocs dh_installchangelogs dh_installinit dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol -- $(pmtool-depends) dh_md5sums dh_builddeb binary: binary-arch binary-indep powermanagement-interface-0.3.20ubuntu1/debian/compat0000664000000000000000000000000210200706467017561 0ustar 4 powermanagement-interface-0.3.20ubuntu1/debian/copyright0000664000000000000000000000036110200707023020303 0ustar This package was debianized by Thom May on Fri, 04 Feb 2005 14:56:55 +0000. Copyright: Upstream Author: Thom May License: Software licensed under the BSD license, see /usr/share/common-licenses/BSD powermanagement-interface-0.3.20ubuntu1/debian/postrm0000664000000000000000000000023110226435016017623 0ustar #!/bin/sh set -e case "$1" in purge) rm -f /etc/default/pmi ucf --purge /etc/default/pmi ;; *) ;; esac #DEBHELPER# powermanagement-interface-0.3.20ubuntu1/debian/control0000664000000000000000000000124211633155704017770 0ustar Source: powermanagement-interface Section: admin Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Thom May Build-Depends: make (>= 3.80+3.81.b3), debhelper (>=4.1.16), libglib2.0-dev, libgtk2.0-dev, libxau-dev Standards-Version: 3.6.1.0 Package: powermanagement-interface Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${pmtool:Depends}, ucf Description: platform neutral powermanagement interface Provides an abstracted layer above the platform specific power management interfaces, with a consistent API so that higher level tools can interact with those interfaces. powermanagement-interface-0.3.20ubuntu1/debian/dirs0000664000000000000000000000003710220014367017240 0ustar usr/share/pmi usr/sbin usr/bin powermanagement-interface-0.3.20ubuntu1/debian/changelog0000664000000000000000000001473512134061254020243 0ustar powermanagement-interface (0.3.20ubuntu1) raring; urgency=low * Added missing lib to link, fixing FTBFS. -- Daniel T Chen Thu, 18 Apr 2013 17:16:14 -0400 powermanagement-interface (0.3.20) oneiric; urgency=low * Fix link order to list libraries after the objects that require them (LP: #770971). -- Colin Watson Sun, 11 Sep 2011 17:03:17 +0100 powermanagement-interface (0.3.19) jaunty; urgency=low * Use pmi.stub for any architecture not explicitly listed, not just hppa and sparc. (Conditional syntax used requires make >= 3.80+3.81.b3.) * Strip gdm-signal binary. * Generate shared library dependencies for gdm-signal so that it can't be installed on a system with an unsuitable libc (LP: #182651). * Depend on ucf (LP: #149678). * Don't segfault if argument parsing fails (LP: #45680). * Make gdm-signal/Makefile quieter on clean. -- Colin Watson Fri, 14 Nov 2008 09:31:20 +0000 powermanagement-interface (0.3.18) hardy; urgency=low * pmi.acpi: Use hal for triggering suspends, and use pm-utils for determining whether a function is supported -- Matthew Garrett Tue, 15 Jan 2008 23:52:11 +0000 powermanagement-interface (0.3.17) gutsy; urgency=low * pmi.acpi: Fix inverted swap file logic (thanks, Sitsofe Wheeler; LP: #136433). Add some comments for good measure. -- Colin Watson Sat, 01 Sep 2007 16:18:16 +0100 powermanagement-interface (0.3.16) gutsy; urgency=low * pmi.acpi: Disable suspend and hibernate if /host is mounted via fuse; disable hibernate if a swap file is active. -- Colin Watson Wed, 29 Aug 2007 18:40:49 +0100 powermanagement-interface (0.3.15ubuntu1) gutsy; urgency=low * Build for lpia. * Set Ubuntu maintainer address. -- Matthias Klose Fri, 24 Aug 2007 01:39:22 +0000 powermanagement-interface (0.3.15) feisty; urgency=low * gdm-signal/gdm-logout-action.c: - use /var/run/gdm_socket then /tmp/.gdm_socket -- Sebastien Bacher Wed, 11 Apr 2007 00:08:36 +0200 powermanagement-interface (0.3.14) feisty; urgency=low * Fix two references to '/etc/defaults' that should have been '/etc/default'. (Closes: LP #93555) -- Paul Sladen Mon, 19 Mar 2007 02:33:43 +0000 powermanagement-interface (0.3.13) feisty; urgency=low * Make 'pmi.acpi' check for '/var/run/do-not-hibernate' and deny hibernation if the file exists (from an upgrade of the default kernel which would cause a failure on resume-from-hibernate). (Closes: Launchpad #14908). -- Paul Sladen Tue, 6 Mar 2007 14:58:32 +0000 powermanagement-interface (0.3.12) feisty; urgency=low * gdm-signal/gdm-logout-action.c: - look for the gdm socket to /tmp/.gdm_socket and then /var/run/gdm_socket -- Sebastien Bacher Mon, 19 Feb 2007 13:28:17 +0100 powermanagement-interface (0.3.11) dapper; urgency=low * Mangle debian/rules further to add stub support for hppa as well, and make i386/amd64/ia64 acpi support explicit, instead of implicit. -- Adam Conrad Mon, 20 Mar 2006 17:35:28 +1100 powermanagement-interface (0.3.10) dapper; urgency=low * Add pmi.stub: - Empty pmi script for all those arches that needs ubuntu-desktop installable (hello sparc!). -- Fabio M. Di Nitto Mon, 20 Mar 2006 06:39:51 +0100 powermanagement-interface (0.3.9) dapper; urgency=low * pmi.pbb: - Reimplemented to use /dev/pmu ioctl's directly instead of calling pbbcmd. - Call /etc/apm/{event,suspend,resume}.d scripts before/after sleep. * debian/rules: Drop pbbuttonsd dependency on powerpc. -- Martin Pitt Tue, 7 Feb 2006 18:46:03 +0100 powermanagement-interface (0.3.8) dapper; urgency=low * Add --reboot option to gdm-signal which informs gdm that we'd like it to reboot when the session closes. -- Scott James Remnant Wed, 11 Jan 2006 17:26:00 +0000 powermanagement-interface (0.3.7) breezy; urgency=low * Use ACPI whitelisting -- Matthew Garrett Mon, 3 Oct 2005 12:00:12 +0100 powermanagement-interface (0.3.6) breezy; urgency=low * pmi.pbb: - Fix the query semantics: Return whether the capability is present, not whether the action would be executed when closing the lid. This makes much more sense and is consistent with the ACPI counterpart. - Differ between suspend to ram and disk, and disable the latter for now since pbbuttonsd does not support STD at the moment. -- Martin Pitt Wed, 21 Sep 2005 17:31:55 +0200 powermanagement-interface (0.3.5) breezy; urgency=low * Adapt to new pbbuttonsd: - pmi.pbb: Change sleep command from "pbbcmd config TAG_GOTOSLEEP 1" to "pbbcmd sleep". (See Ubuntu #13909) - debian/rules: Bump versioned dependency. -- Martin Pitt Wed, 21 Sep 2005 13:23:11 +0200 powermanagement-interface (0.3.4) breezy; urgency=low * Add support for /var/lock/acpisleep - don't execute an event if we're in the process of waking up. -- Matthew Garrett Wed, 21 Sep 2005 01:55:06 +0100 powermanagement-interface (0.3.3) breezy; urgency=low * Add support for halt and reboot -- Matthew Garrett Tue, 30 Aug 2005 18:28:48 +0100 powermanagement-interface (0.3.2) breezy; urgency=low * Fix postrm (Adam Conrad) -- Thom May Mon, 11 Apr 2005 18:48:40 +1000 powermanagement-interface (0.3.1) hoary; urgency=low * Sigh, fix build deps -- Thom May Tue, 22 Mar 2005 22:43:40 +0000 powermanagement-interface (0.3) hoary; urgency=low * Add gdm-signal -- Thom May Tue, 22 Mar 2005 13:11:35 +0000 powermanagement-interface (0.2) hoary; urgency=low * exit 1 if we're asked for an unrecgonised event * Mention capabilities in the usage summary -- Thom May Fri, 25 Feb 2005 11:18:59 +0000 powermanagement-interface (0.1-3) hoary; urgency=low * Fix dependencies for pbbuttonsd/acpi-support -- Thom May Wed, 23 Feb 2005 13:39:05 +0000 powermanagement-interface (0.1-2) hoary; urgency=low * quell some lintian warnings -- Thom May Wed, 9 Feb 2005 14:39:42 +0000 powermanagement-interface (0.1-1) hoary; urgency=low * First upload. -- Thom May Fri, 04 Feb 2005 14:56:55 +0000