Bug#665987: [Pkg-acpi-devel] Bug#665987: acpi-supoort: Please make consolekit optional
On Tue, Jun 26, 2012 at 05:52:45PM +0200, Guillem Jover wrote: Also consolekit upstream is not even maintained anymore and it's considered deprecated (which seems like a trend with all that plumbing *kit stuff)... I didn't even know that to be honest. Well for the cases I listed above, ck-list-session will just not return anything, so calling it or not calling it has the same effect. Not calling it if it's not available has the advantage of not requiring it at run-time and making it an optional dependency, like a Recommends. Sorry, I don't really understand what you're refering to here. If you make consolekit optional the way I see it in your patch, acpi-support will be activated even if a different power management is running in the gui. We've had our share of problems with that before this logic was implemented. To prevent the standard user from falling into that trap consolekit has to be installed per default together with acpi-support, which is exactly what you want to get rid of. If using the old approach with pinky this would only hold for people using lightdm who I gather are more experienced user to begin with. Exactly, and that's precisely why consolekit is in principle optional, because the code will fallback to something else, but that requires consolekit to not be required. When I referred to “when the system is not running an X session” I meant when the system does not have any X server running, and it's just running on the system console. In addition Recommends are installed by default, so that should cover the majority of the users, but allow others to choose not to install those if they so desire. This is a good point, but I still think having a fallback for an active X would even be better. Unfortunately there is no way to force installation of consolekit if and only if X is installed, too. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org Jabber: michael.meskes at googlemail dot com VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#665987: [Pkg-acpi-devel] Bug#665987: acpi-supoort: Please make consolekit optional
reopen 665987 thanks Hi! On Wed, 2012-03-28 at 17:26:06 +0200, Michael Meskes wrote: On Wed, Mar 28, 2012 at 04:45:06PM +0200, Guillem Jover wrote: From this reply it's not really clear why, so maybe the attached patch can change your mind? consolekit it not usable anyway with things like Well, you didn't give any reason for why it should be demoted so I didn't feel like giving one either. :) Sorry, I assumed that given that it was not being used before, and it started to get used now, the possibility to demote it was not outrageous, or if it was you'd be aware of it right away. Also consolekit upstream is not even maintained anymore and it's considered deprecated (which seems like a trend with all that plumbing *kit stuff)... startx or when the system is not running an X session, for example. Now that is a serious problem IMO and definitely needs attention. Upstream changed to ck-list-sessions because it seems to be the only tool working with lightdm: https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626 ++if which ck-list-sessions /dev/null; then ++ LISTSESSIONS=ck-list-sessions ++else ++ LISTSESSIONS=: ++fi This won't work well I think. But how about falling back to the old way of using pinky if ck-list-sessions is not available? Well for the cases I listed above, ck-list-session will just not return anything, so calling it or not calling it has the same effect. Not calling it if it's not available has the advantage of not requiring it at run-time and making it an optional dependency, like a Recommends. On Sun, 2012-04-01 at 12:35:03 +0200, Michael Meskes wrote: On Wed, Mar 28, 2012 at 04:45:06PM +0200, Guillem Jover wrote: can change your mind? consolekit it not usable anyway with things like startx or when the system is not running an X session, for example. · I just tried getXuser() and getXconsole() from acpi-support's power-funcs and both work without any problem if the X session was started with startx. There is is special logic in there to cope with this case. Also I don't really understand what you mean with when the system is not running an X session. What does not work then? I thought you were talking about some acpi-support failures but cannot find any, so please give details. It does not matter whether or not consolekit works then because it is only used to find the X user. Exactly, and that's precisely why consolekit is in principle optional, because the code will fallback to something else, but that requires consolekit to not be required. When I referred to “when the system is not running an X session” I meant when the system does not have any X server running, and it's just running on the system console. In addition Recommends are installed by default, so that should cover the majority of the users, but allow others to choose not to install those if they so desire. thanks, guillem -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#665987: [Pkg-acpi-devel] Bug#665987: acpi-supoort: Please make consolekit optional
On Wed, Mar 28, 2012 at 04:45:06PM +0200, Guillem Jover wrote: can change your mind? consolekit it not usable anyway with things like startx or when the system is not running an X session, for example. I just tried getXuser() and getXconsole() from acpi-support's power-funcs and both work without any problem if the X session was started with startx. There is is special logic in there to cope with this case. Also I don't really understand what you mean with when the system is not running an X session. What does not work then? I thought you were talking about some acpi-support failures but cannot find any, so please give details. It does not matter whether or not consolekit works then because it is only used to find the X user. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org Jabber: michael.meskes at googlemail dot com VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#665987: [Pkg-acpi-devel] Bug#665987: acpi-supoort: Please make consolekit optional
tag 665987 patch thanks On Wed, 2012-03-28 at 09:43:49 +0200, Michael Meskes wrote: On Tue, Mar 27, 2012 at 06:08:22PM +0200, Guillem Jover wrote: The latest version got a new dependency on consolekit, would it be possible to demote it to a Recommends? No. From this reply it's not really clear why, so maybe the attached patch can change your mind? consolekit it not usable anyway with things like startx or when the system is not running an X session, for example. thanks, guillem diff --git a/debian/changelog b/debian/changelog index f78aa73..41f6aba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +acpi-support (0.140-1local1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Demote consolekit to a recommends, by only using ck-list-sessions when +available, it does not work for startx sessions anyway. + + -- Guillem Jover guil...@debian.org Wed, 28 Mar 2012 15:58:58 +0200 + acpi-support (0.140-1) unstable; urgency=low * Imported new Upstream version 0.140 diff --git a/debian/control b/debian/control index 9d521b8..160ba9e 100644 --- a/debian/control +++ b/debian/control @@ -11,9 +11,9 @@ Package: acpi-support Architecture: all Depends: acpi-support-base (= 0.109-1), x11-xserver-utils, acpid (= 1.0.4), - lsb-base (= 1.3-9), pm-utils, acpi-fakekey, consolekit, ${arch:Depends}, + lsb-base (= 1.3-9), pm-utils, acpi-fakekey, ${arch:Depends}, ${misc:Depends} -Recommends: dbus, vbetool, xscreensaver|gnome-screensaver, radeontool +Recommends: dbus, vbetool, consolekit, xscreensaver|gnome-screensaver, radeontool Suggests: rfkill, xinput, ${arch:Suggests} Breaks: uswsusp (= 0.2) Description: scripts for handling many ACPI events diff --git a/debian/patches/power-funcs.diff b/debian/patches/power-funcs.diff index 2831c3a..5dcb7fd 100644 --- a/debian/patches/power-funcs.diff +++ b/debian/patches/power-funcs.diff @@ -1,6 +1,21 @@ acpi-support-0.139/lib/power-funcs -+++ acpi-support-0.139/lib/power-funcs -@@ -10,24 +10,40 @@ +--- + lib/power-funcs | 53 ++--- + 1 file changed, 42 insertions(+), 11 deletions(-) + +--- a/lib/power-funcs b/lib/power-funcs +@@ -5,29 +5,50 @@ + PATH=$PATH:/usr/bin/X11 + POWERSTATE=/var/lib/acpi-support/powerstate + ++if which ck-list-sessions /dev/null; then ++ LISTSESSIONS=ck-list-sessions ++else ++ LISTSESSIONS=: ++fi ++ + # getXuser: get the user for the specified X display, or if none is + # specified, then the user for whatever X display we find. # input: $displaynum: the X display to query # output: $XAUTHORITY: the path to the xauth data used for connecting to the # detected X display. @@ -15,8 +30,8 @@ else display=:$displaynum fi -+ - uid=$(ck-list-sessions | awk 'BEGIN { unix_user = ; } /^Session/ { unix_user = ; } /unix-user =/ { gsub(/'\''/,,$3); unix_user = $3; } /x11-display = '\'$display\''/ { print unix_user; exit (0); }') +- uid=$(ck-list-sessions | awk 'BEGIN { unix_user = ; } /^Session/ { unix_user = ; } /unix-user =/ { gsub(/'\''/,,$3); unix_user = $3; } /x11-display = '\'$display\''/ { print unix_user; exit (0); }') ++ uid=$($LISTSESSIONS | awk 'BEGIN { unix_user = ; } /^Session/ { unix_user = ; } /unix-user =/ { gsub(/'\''/,,$3); unix_user = $3; } /x11-display = '\'$display\''/ { print unix_user; exit (0); }') if [ -n $uid ]; then user=$(getent passwd $uid | cut -d: -f1) @@ -46,7 +61,7 @@ } # getXconsole: get the information for the active X console, if any. -@@ -36,7 +52,7 @@ +@@ -36,11 +57,11 @@ # output: $XAUTHORITY: the path to the xauth data used for connecting to the # detected X display. # $DISPLAY: the X display @@ -55,7 +70,12 @@ getXconsole() { local displaynum -@@ -48,6 +64,7 @@ +- displaynum=$(ck-list-sessions | awk 'BEGIN { active = 0; } /^Session/ { active = 0; } /active = TRUE/ { active = 1; } active /x11-display = '\':.+\''/ { gsub(/'\':*'/,,$3); print $3; exit (0); }') ++ displaynum=$($LISTSESSIONS | awk 'BEGIN { active = 0; } /^Session/ { active = 0; } /active = TRUE/ { active = 1; } active /x11-display = '\':.+\''/ { gsub(/'\':*'/,,$3); print $3; exit (0); }') + + if [ -n $displaynum ]; then + export DISPLAY=:$displaynum +@@ -48,6 +69,7 @@ fi } @@ -63,7 +83,7 @@ getState() { /usr/bin/on_ac_power if [ $? -eq 1 ]; then -@@ -56,25 +73,34 @@ +@@ -56,25 +78,34 @@ STATE=AC fi }
Bug#665987: [Pkg-acpi-devel] Bug#665987: acpi-supoort: Please make consolekit optional
On Wed, Mar 28, 2012 at 04:45:06PM +0200, Guillem Jover wrote: From this reply it's not really clear why, so maybe the attached patch can change your mind? consolekit it not usable anyway with things like Well, you didn't give any reason for why it should be demoted so I didn't feel like giving one either. :) startx or when the system is not running an X session, for example. Now that is a serious problem IMO and definitely needs attention. Upstream changed to ck-list-sessions because it seems to be the only tool working with lightdm: https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626 ++if which ck-list-sessions /dev/null; then ++LISTSESSIONS=ck-list-sessions ++else ++LISTSESSIONS=: ++fi This won't work well I think. But how about falling back to the old way of using pinky if ck-list-sessions is not available? Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org Jabber: michael.meskes at googlemail dot com VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org