A new release is available with a few changes. See the attached patch for a minor ebuild change.
Created attachment 229203 [details, diff] Ebuild updates for acpid-2.0.4 Ebuild updates for acpid-2.0.4: * Use old patch file since it still applies cleanly
See Bug 253764, Comment #5. It should be available in 2.0.4 now, so there might be more changes required...
(In reply to comment #2) > See Bug 253764, Comment #5. It should be available in 2.0.4 now, so there > might be more changes required... Yeah, the power button script is now included in the samples directory. I'll let someone who uses GNOME and/or KDE test it out and update the ebuild changes if they choose to.
I have bumped it locally and new script in samples seems to work fine (at least with Gnome). But there is a problem: it collides with default.sh provided by us. I mean, when I press "power" button, a dialog is shown (due new rule) but system if powered off also at the same time since files/acpid-1.0.6-default.sh also handles "power" action: case "$group" in button) case "$action" in power) /sbin/init 0 ;; # if your laptop doesnt turn on/off the display via hardware # switch and instead just generates an acpi event, you can force # X to turn off the display via dpms. note you will have to run # 'xhost +local:0' so root can access the X DISPLAY. #lid) # xset dpms force off # ;; *) log_unhandled $* ;; esac ;; ... I see two options here: 1. Let files/acpid-1.0.6-default.sh handle all signals and, then, not install powerbtn event file from samples. We should simply modify default.sh to run powerbtn.sh when "button" action is requested. 2. Install both files and modify our default.sh to not handle "power" action. Personally, I vote for the first option as it looks to me simpler and also prevents us from installing an extra file that shouldn't be needed if we (or I ;-)) modify current default.sh properly Do other people agree?
I would go with 2. because the power button script gets installed from the tarball then, and if upstream (or Debian) changes it, we get the updates without changing files in ${FILESDIR}. To avoid duplication. :) Either way, can someone please do the legwork for this and add as attachment here?
(In reply to comment #5) > I would go with 2. because the power button script gets installed from the > tarball then, and if upstream (or Debian) changes it, we get the updates > without changing files in ${FILESDIR}. The file that we would not install if we follow "1." is simply the event one, not the script that handles gnome-power-manager and related stuff, and I doubt that event file will have many updates in the futures I will attach the files
Created attachment 229237 [details] acpid-2.0.4-default.sh This is the suggested default.sh script that simply changes the following over current one, allowing us to not having to install another file to handle power button event separately: --- /etc/acpi/default.sh 2010-04-26 13:44:11.000000000 +0200 +++ /etc/acpi/._cfg0000_default.sh 2010-04-26 14:34:22.000000000 +0200 @@ -18,7 +18,7 @@ button) case "$action" in power) - /sbin/init 0 + /etc/acpi/powerbtn.sh ;; # if your laptop doesnt turn on/off the display via hardware
Created attachment 229239 [details] acpid.ebuild.diff This is the diff to apply to the ebuild. It's working fine for me here just now
+*acpid-2.0.4 (26 Apr 2010) + + 26 Apr 2010; Samuli Suominen <ssuominen@gentoo.org> +acpid-2.0.4.ebuild, + +files/acpid-2.0.4-default.sh: + Version bump wrt #317273 by Tim Harder. Install new powerbtn.sh wrt + #253764 by Pacho Ramos.