Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317273 - sys-power/acpid-2.0.4 version bump
Summary: sys-power/acpid-2.0.4 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-26 09:52 UTC by Tim Harder
Modified: 2012-06-02 08:25 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild updates for acpid-2.0.4 (acpid-2.0.3-r1-to-2.0.4.diff,561 bytes, patch)
2010-04-26 09:54 UTC, Tim Harder
Details | Diff
acpid-2.0.4-default.sh (acpid-2.0.4-default.sh,1.19 KB, text/plain)
2010-04-26 12:37 UTC, Pacho Ramos
Details
acpid.ebuild.diff (acpid.ebuild.diff,640 bytes, text/plain)
2010-04-26 12:39 UTC, Pacho Ramos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Harder gentoo-dev 2010-04-26 09:52:38 UTC
A new release is available with a few changes. See the attached patch for a minor ebuild change.
Comment 1 Tim Harder gentoo-dev 2010-04-26 09:54:17 UTC
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
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-04-26 09:57:59 UTC
See Bug 253764, Comment #5.  It should be available in 2.0.4 now, so there might be more changes required...
Comment 3 Tim Harder gentoo-dev 2010-04-26 10:35:24 UTC
(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.
Comment 4 Pacho Ramos gentoo-dev 2010-04-26 12:01:03 UTC
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?
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-04-26 12:08:56 UTC
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?
Comment 6 Pacho Ramos gentoo-dev 2010-04-26 12:35:22 UTC
(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
Comment 7 Pacho Ramos gentoo-dev 2010-04-26 12:37:44 UTC
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
Comment 8 Pacho Ramos gentoo-dev 2010-04-26 12:39:40 UTC
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
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2010-04-26 12:55:38 UTC
+*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.