SHA256
1
0
forked from pool/acpid
OBS User unknown 2007-01-15 22:50:50 +00:00 committed by Git OBS Bridge
commit 48ebbd1a7f
17 changed files with 1216 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

13
README.SuSE Normal file
View File

@ -0,0 +1,13 @@
Dokumentation for acpid can be found in 'man acpid'.
Be aware that the acpid is only used to hand over ACPI events
(caught from /proc/acpi/events) to other services
(e.g. hal, powersaved, iald, ...).
The events are handled by those services.
Most of them are processed by the powersave daemon.
For further documentation, please have a look at:
/usr/share/doc/packages/powersave/
or
http://powersave.sourceforge.net/

3
acpi-0.09.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a08db372568d90c7a165d318b79fc364188cf50f80071b14cd8b3fb9abed4ea4
size 72815

56
acpi_0.09.dif Normal file
View File

@ -0,0 +1,56 @@
--- acpi-0.09.orig/acpi.1
+++ acpi-0.09/acpi.1
@@ -0,0 +1,52 @@
+.TH "ACPI" "1"
+.SH "NAME"
+acpi - Shows battery status information
+.SH "SYNOPSIS"
+.PP
+\fBacpi\fP [\fBoptions\fP]
+.SH "DESCRIPTION"
+.PP
+\fBacpi\fP
+Shows information from the /proc filesystem, such as battery status or
+thermal information.
+.PP
+This manual page was written for the \fBDebian\fP distribution
+because the original program does not have a manual page.
+.SH "OPTIONS"
+.IP "\fB-b | --battery\fP " 10
+show battery information
+.IP "\fB-B | --without-battery\fP " 10
+suppress battery information
+.IP "\fB-t | --thermal\fP " 10
+show thermal information
+.IP "\fB-T | --without-thermal\fP " 10
+suppress thermal information
+.IP "\fB-a | --ac-adapter\fP " 10
+show ac adapter information
+.IP "\fB-A | --without-ac-adapter\fP " 10
+suppress ac-adapter information
+.IP "\fB-V | --everything\fP " 10
+show every device, overrides above options
+.IP "\fB-s | --show-empty\fP " 10
+show non-operational devices
+.IP "\fB-S | --hide-empty\fP " 10
+hide non-operational devices
+.IP "\fB-c | --celcius\fP " 10
+use celcius as the temperature unit
+.IP "\fB-f | --fahrenheit\fP " 10
+use fahrenheit as the temperature unit
+.IP "\fB-k | --kelvin\fP " 10
+use kelvin as the temperature unit
+.IP "\fB-d | --directory <dir>\fP " 10
+path to ACPI info (/proc/acpi)
+.IP "\fB-h | --help\fP " 10
+display help and exit
+.IP "\fB-v | --version\fP " 10
+output version information and exit
+
+.SH "AUTHOR"
+.PP
+This manual page was written by Paul Telford <pxt@debian.org> for
+the \fBDebian\fP system (but may be used by others). Permission is
+granted to copy, distribute and/or modify this document under
+the terms of the GNU GPL.

View File

@ -0,0 +1,46 @@
Date: Fri, 23 Sep 2005 09:40:01 -0700
From: thockin@hockin.org
To: Stefan Seyfried <seife@suse.de>
Cc: Timo Hoenig <thoenig@suse.de>, Thomas Renninger <trenn@suse.de>
Subject: Re: acpid client disconnect fix
Message-ID: <20050923164001.GA10845@hockin.org>
References: <1127469283.13743.119.camel@f100.suse.de> <20050923162037.GA9805@hockin.org> <4334293F.9050809@suse.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4334293F.9050809@suse.de>
User-Agent: Mutt/1.4.1i
Sender: <thockin@teetot.devrandom.net>
On Fri, Sep 23, 2005 at 06:11:43PM +0200, Stefan Seyfried wrote:
> thockin@hockin.org wrote:
> > On Fri, Sep 23, 2005 at 11:54:43AM +0200, Timo Hoenig wrote:
> >> Nevertheless I'm sending you a patch to close a client's fd once it
> >> disconnects. Otherwise acpid leaks one fd for each client
> >> disconnecting.
> >
> > It also seems to leak the rule structure. Woops.
>
> If you fix it, it would be nice if you pass the patch on to me :-)
Fixed in CVS. Do you think it's worth making a new (1.5?) release?
Tim
Index: event.c
===================================================================
RCS file: /cvsroot/acpid/acpid/event.c,v
retrieving revision 1.9
diff -u -u -r1.9 event.c
--- event.c 25 Oct 2004 04:24:21 -0000 1.9
+++ event.c 23 Sep 2005 16:17:15 -0000
@@ -590,6 +590,8 @@
/* closed */
acpid_log("client has disconnected\n");
delist_rule(&client_list, rule);
+ close(rule->action.fd);
+ free_rule(rule);
return -1;
}
safe_write(client, "\n", 1);

View File

@ -0,0 +1,16 @@
Subject: Fix gcc4.1 compiler warnings/errors in ud_socket.c
From: Philipp Thomas <pth@suse.de>
Signed-off-by: Stefan Seyfried <seife@suse.de>
--- ud_socket.c 2005/04/04 14:47:18 1.1
+++ ud_socket.c 2005/04/04 14:47:30
@@ -58,7 +58,7 @@
while (1) {
int newsock = 0;
struct sockaddr_un cliaddr;
- int len = sizeof(struct sockaddr_un);
+ socklen_t len = sizeof(struct sockaddr_un);
newsock = accept(listenfd, (struct sockaddr *)&cliaddr, &len);
if (newsock < 0) {

View File

@ -0,0 +1,20 @@
Ignore files ending in '~' when searching for event config files.
Fixes https://sourceforge.net/tracker/index.php?func=detail&aid=1530974&group_id=33140&atid=407341
From: Stefan Seyfried <seife@suse.de>
--- event.c
+++ event.c
@@ -121,7 +121,11 @@
if (dirent->d_name[0] == '.')
continue; /* skip dotfiles */
- len = strlen(dirent->d_name) + strlen(confdir) + 2;
+ len = strlen(dirent->d_name);
+ if (len > 0 && dirent->d_name[len - 1] == '~')
+ continue; /* skip editor backup files */
+
+ len += strlen(confdir) + 2;
file = (char *)malloc(len);
if (!file) {
acpid_log("ERR: malloc(): %s\n", strerror(errno));

View File

@ -0,0 +1,63 @@
Make acpid use syslog instead of its own logfile-writing mechanism.
From: Stefan Seyfried <seife@suse.de>
diff -ruN acpid-1.0.4~/acpid.c acpid-1.0.4/acpid.c
--- acpid-1.0.4~/acpid.c 2005-10-12 21:14:07.000000000 +0200
+++ acpid-1.0.4/acpid.c 2005-10-12 22:09:58.000000000 +0200
@@ -32,6 +32,7 @@
#include <time.h>
#include <sys/poll.h>
#include <grp.h>
+#include <sys/syslog.h>
#include "acpid.h"
#include "ud_socket.h"
@@ -405,13 +406,17 @@
"/dev/null", strerror(errno));
return -1;
}
+#ifdef USE_SYSLOG
+ openlog("[acpid]", LOG_CONS, LOG_DAEMON);
+ logfd = nullfd;
+#else
logfd = open(logfile, O_WRONLY|O_CREAT|O_APPEND);
if (logfd < 0) {
fprintf(stderr, "%s: can't open %s: %s\n", progname,
logfile, strerror(errno));
return -1;
}
-
+#endif
if (dup2(nullfd, STDIN_FILENO) != STDIN_FILENO) {
fprintf(stderr, "%s: dup2: %s\n", progname, strerror(errno));
return -1;
@@ -447,6 +452,20 @@
acpid_read_conf(confdir);
}
+#ifdef USE_SYSLOG
+int
+acpid_log(const char *fmt, ...)
+{
+ va_list args;
+
+ va_start(args, fmt);
+ vsyslog(LOG_INFO, fmt, args);
+ va_end(args);
+
+ return 0;
+}
+
+#else
int
acpid_log(const char *fmt, ...)
{
@@ -465,6 +484,7 @@
return 0;
}
+#endif
/*
* This depends on fixes in linux ACPI after 2.4.8

40
acpid-1.0.4.dif Normal file
View File

@ -0,0 +1,40 @@
--- acpid.c.orig 2004-10-18 00:33:51.000000000 +0200
+++ acpid.c 2005-08-02 19:22:04.000000000 +0200
@@ -61,7 +61,7 @@
main(int argc, char **argv)
{
int event_fd;
- int sock_fd;
+ int sock_fd = 0;
/* learn who we really are */
progname = (const char *)strrchr(argv[0], '/');
@@ -386,7 +386,8 @@
umask(0);
/* get outta the way */
- chdir("/");
+ if(chdir("/") < 0)
+ fprintf(stderr, "%s: chdir: %s\n", progname, strerror(errno));
return 0;
}
--- Makefile.orig 2004-10-18 00:54:28.000000000 +0200
+++ Makefile 2005-08-02 19:22:04.000000000 +0200
@@ -21,7 +21,7 @@
MAN8 = acpid.8 acpi_listen.8
MAN8GZ = $(MAN8:.8=.8.gz)
-CFLAGS = -Wall -Werror -g $(DEFS)
+CFLAGS = -Wall -Werror -g $(DEFS) $(EXTRA_CFLAGS)
DEFS = -DVERSION="\"$(VERSION)\""
all: $(PROGS)
@@ -36,6 +36,7 @@
install: $(PROGS) man
mkdir -p $(SBINDIR)
install -m 750 acpid $(SBINDIR)
+ mkdir -p $(BINDIR)
install -m 755 acpi_listen $(BINDIR)
mkdir -p $(MAN8DIR)
install -m 644 $(MAN8GZ) $(MAN8DIR)

3
acpid-1.0.4.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:032a95967f8dd8a227ee1771de4a2646becc4d0f1123568faeca931006ec8f5f
size 23416

375
acpid.changes Normal file
View File

@ -0,0 +1,375 @@
-------------------------------------------------------------------
Fri Nov 17 17:10:18 CET 2006 - hmacht@suse.de
- remove CPUFreq modules loading, acpid is not available on all
architectures. Move handling to proper place --> HAL init script
(novell bug 220682)
-------------------------------------------------------------------
Mon Nov 13 11:12:49 CET 2006 - hmacht@suse.de
- do not "fail" if there is no CPUFreq support, print descriptive
message instead (novell bug 219757)
-------------------------------------------------------------------
Wed Oct 18 13:13:09 CEST 2006 - seife@suse.de
- unload asus_acpi on unsupported machines.
- load cpufreq_acpi after speedstep-smi module.
- load the cpufreq_conservative governor (bug 163767).
- ignore editor backup files for the event configuration.
- package the provided action script samples under documentation.
- cleanup the specfile %prep section.
-------------------------------------------------------------------
Tue Oct 17 22:54:01 CEST 2006 - hmacht@suse.de
- load CPUFreq modules before acpi modules, otherwise we would
exit without acpi support
-------------------------------------------------------------------
Tue Sep 12 16:45:17 CEST 2006 - hmacht@suse.de
- load CPUFreq modules in acpid for now because they have to be
already loaded when HAL starts
-------------------------------------------------------------------
Thu Jun 1 16:33:13 CEST 2006 - thoenig@suse.de
- rcacpid: do not probe unsupported modules if
LOAD_UNSUPPORTED_MODULES_AUTOMATICALLY is set to yes
(b.n.c #180654)
- rcacpid: be verbose about which modules are being probed or
loaded.
-------------------------------------------------------------------
Tue Feb 21 12:53:52 CET 2006 - rw@suse.de
- never try laptop modules on ia64 (bug #146291)
-------------------------------------------------------------------
Wed Feb 15 12:52:36 CET 2006 - thoenig@suse.de
- revert hotkey mask for IBM ACPI back to 0xffff (bug #150357)
- add documentation hints for IBM ACPI driver
-------------------------------------------------------------------
Thu Feb 9 23:30:31 CET 2006 - seife@suse.de
- do not try the hotkey modules on ia64 (bug #146291)
-------------------------------------------------------------------
Mon Feb 6 16:25:19 CET 2006 - seife@suse.de
- do not load ac and battery modules on ia64 (bug #140249)
- untangle the "suse-files.tar" packaging mess
- after a kernel update, rescan the laptop modules
-------------------------------------------------------------------
Wed Jan 25 21:34:06 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Thu Nov 24 17:23:00 CET 2005 - seife@suse.de
- move daemon from /usr/sbin to /sbin to remove the $remote_fs
dependency and start sooner
- log via syslog instead of using the own logfile mechanism
-------------------------------------------------------------------
Tue Oct 25 14:24:14 CEST 2005 - thoenig@suse.de
- changed hotkey mask for ibm_acpi from 0xffff to 0xffef so that
the driver does not block Fn-F5 (switch Bluetooh on/off) on IBM
ThinkPads (closes #128088)
-------------------------------------------------------------------
Wed Oct 5 12:06:21 CEST 2005 - dmueller@suse.de
- add norootforbuild
-------------------------------------------------------------------
Sat Sep 24 18:09:25 CEST 2005 - seife@suse.de
- rework last patch, fix a memleak in addition to the fd leak.
-------------------------------------------------------------------
Fri Sep 23 12:31:33 CEST 2005 - seife@suse.de
- fix filedescriptor leak on client disconnect (bug #117884)
-------------------------------------------------------------------
Thu Sep 8 14:06:43 CEST 2005 - thoenig@suse.de
- fixed probing of laptop modules (closes #115819)
-------------------------------------------------------------------
Wed Sep 7 14:27:03 CEST 2005 - thoenig@suse.de
- changed modprobe.d/ibm_acpi to be even more verbose (more Fn-Fxx
will be reported (see #115127 and closes re-opened #113625)
-------------------------------------------------------------------
Wed Aug 31 13:47:21 CEST 2005 - ro@suse.de
- removed config-dist.sh (ExclusiveArch is already there)
-------------------------------------------------------------------
Tue Aug 30 09:08:13 CEST 2005 - thoenig@suse.de
- added sony_acpi and pcc_acpi to be probed on first run (SUSE
feature request r6125)
-------------------------------------------------------------------
Mon Aug 29 12:38:02 CEST 2005 - thoenig@suse.de
- fixed probe function of rcacpid
-------------------------------------------------------------------
Mon Aug 29 11:36:50 CEST 2005 - thoenig@suse.de
- added install parameter for ibm_acpi to enable verbose output
of hotkey (#113625)
-------------------------------------------------------------------
Thu Aug 25 15:28:40 CEST 2005 - thoenig@suse.de
- rcacpid now probes laptop modules once and will only
load those modules at a later point if modprobe succeeded.
-------------------------------------------------------------------
Wed Aug 10 12:15:05 CEST 2005 - thoenig@suse.de
- added three modules to DEFAULT_ACPI_MODULES:
* asus_acpi
* ibm_acpi
* toshiba_acpi
- added $SYSCONFDIR/modprobe.d/ibm_acpi for ibm_acpi to load the
module with "experimental=1"
-------------------------------------------------------------------
Fri Aug 5 22:15:27 CEST 2005 - seife@suse.de
- load ACPI modules in /etc/init.d/acpid.
-------------------------------------------------------------------
Fri Aug 5 11:47:17 CEST 2005 - trenn@suse.de
- Activate acpid by default again (use -Y to force, was disabled
in old setups, but we need it urgently now)
- Deleted suse stuff (acpid_proxy,...), only use acpid to forward
acpi events to other apps/services.
- updated acpid (1.0.3 -> 1.0.4) acpi (0.07 -> 0.09)
- changed config to not process acpi events, just forward them
-------------------------------------------------------------------
Mon May 2 08:45:09 CEST 2005 - mmj@suse.de
- Fix warning about chdir return value not being caught
-------------------------------------------------------------------
Mon Apr 4 16:55:26 CEST 2005 - pth@suse.de
- Fix signed/unsigned warnings
-------------------------------------------------------------------
Thu Nov 25 09:37:57 CET 2004 - zoz@suse.de
- rcacpid status now reports service acpid as unused if acpid was
started from rcpowersaved (Bug 48432)
-------------------------------------------------------------------
Thu Nov 11 11:01:03 CET 2004 - zoz@suse.de
- added /var/lib/acpi with proper permissions to filelist. Further
acpid_proxy won't create that dir if missing. (Bug 47729)
-------------------------------------------------------------------
Mon Sep 6 12:31:43 CEST 2004 - seife@suse.de
- clean up config file for sysconfig editor
-------------------------------------------------------------------
Thu Aug 26 13:18:18 CEST 2004 - trenn@suse.de
- deleted debian stuff
-------------------------------------------------------------------
Fri Aug 13 14:22:50 CEST 2004 - trenn@suse.de
- updated to acpid from 1.0.1 to version 1.0.3 and
acpi Version from 0.06 to 0.07
-------------------------------------------------------------------
Fri May 14 13:17:37 CEST 2004 - trenn@suse.de
- P4 Hyperthreading patch from pth@suse (#39017)
-------------------------------------------------------------------
Tue Apr 6 19:09:37 CEST 2004 - trenn@suse.de
- rcacpid stop does not return skipped anymore on none acpi systems
this prevented acpid to uninstall on these systems (#38508)
-------------------------------------------------------------------
Thu Mar 18 20:38:53 CET 2004 - seife@suse.de
- updated README.SuSE and default config (#36208)
-------------------------------------------------------------------
Wed Mar 3 10:26:14 CET 2004 - trenn@suse.de
- add %restart_on_update and %stop_on_removal in .spec file
-------------------------------------------------------------------
Tue Feb 24 16:01:48 CET 2004 - trenn@suse.de
- deleted ac_on_power, is now in powersave package
-------------------------------------------------------------------
Mon Feb 23 17:51:20 CET 2004 - trenn@suse.de
- deleted -y parameter in inserv, to not start by default
powersave gets confused otherwise, only one daemon is allowed
to access /proc/acpi/event
-------------------------------------------------------------------
Wed Nov 5 13:05:06 CET 2003 - olh@suse.de
- do not start the build if not required
-------------------------------------------------------------------
Mon Sep 22 11:16:15 CEST 2003 - zoz@suse.de
- fixed naming of actions in acpid_proxy (Bug 31357)
- fixed metadata and description of actions in sysconfig template
(Bug 31357)
- fixed startscript to unload modules if requested (Bug 31357)
- set default action for lid closure to 'ignore', because 'throttle'
breaks some laptops (Bug 31529)
-------------------------------------------------------------------
Sun Sep 21 01:48:10 CEST 2003 - ro@suse.de
- fix typo in sysconfig-file
-------------------------------------------------------------------
Thu Sep 18 16:50:33 CEST 2003 - trenn@suse.de
- bug 30913 and 31265
lid state is now read out correctly (CLOSE->CLOSED)
corrected parts for throttling
action kde_term fixed (determine kde user)
action kde_logout additionally added
-------------------------------------------------------------------
Tue Sep 16 17:52:31 CEST 2003 - trenn@suse.de
- bug 30399 -> lid read out of /proc/acpi/lid/... now
and changed frequency scaling from deprecated /acpi/processor
to cpufreqd
-------------------------------------------------------------------
Wed Sep 10 11:53:37 CEST 2003 - kukuk@suse.de
- rcacpid: Fix return codes, fix try-restart, fix probe (don't
compare with non existing FOO config file), fix restart (restart
should honor modified sysconfig file).
-------------------------------------------------------------------
Tue Sep 2 21:52:26 CEST 2003 - trenn@suse.de
- on_ac_adapter: more stable and
check for desktop
start acpid by default
-------------------------------------------------------------------
Thu Aug 28 15:22:11 CEST 2003 - trenn@suse.de
- fixed bug in sysconfig.acpi template
-------------------------------------------------------------------
Thu Aug 28 12:56:00 CEST 2003 - trenn@suse.de
- added on_ac_power
-------------------------------------------------------------------
Tue Aug 26 14:17:21 CEST 2003 - trenn@suse.de
- added action tags for sysconfig file
-------------------------------------------------------------------
Thu Aug 14 13:40:28 CEST 2003 - ro@suse.de
- added exclusivearch line to specfile
-------------------------------------------------------------------
Sun Jul 20 16:50:22 CEST 2003 - zoz@suse.de
- Removed ACPI_MODULES_NOT_TO_LOAD from /etc/init.d/acpid and
/etc/sysconfig/powermanagement. now we use ACPI_MODULES instead.
This works also with 2.5/6 kernels and you may add one of the
modules asus_acpi or toshiba_acpi to this variable.
-------------------------------------------------------------------
Sat Mar 1 16:02:05 CET 2003 - zoz@suse.de
- fixed acpid: Did not call acpid_proxy with event information
- splitted ACPI_BUTTON_LID into ACPI_BUTTON_LID_OPEN and
ACPI_BUTTON_LID_CLOSE
- added some actions for button events to acpid_proxy
+ kde_term (terminate all KDE sessions)
+ wmaker_term (terminate all wmaker sessions)
+ standby (switches to S1. This may crash the system. Test it before!)
+ suspend (switches to S3 if kernel is 2.5 or newer)
+ hibernate (switches to S4 if kernel is 2.5 or newer
+ throttle (reduce processor performance, enable maximum processor throttlin
put disk into sleep state)
+ dethrottle (restore settings like before throttle)
- for proper throttling added ACPI_THROTTLED_DISK_TIMEOUT and
ACPI_THROTTLED_KUPDATED_INTERVAL
- provided some usefull information in README.SuSE
-------------------------------------------------------------------
Mon Feb 24 11:37:47 CET 2003 - zoz@suse.de
- enhanced sysconfig metadata and descriptions
- added ACPI_MODULES_NOT_TO_UNLOAD, because there are modules which
oops when unloaded
- added ACPI_BUTTON_SLEEP
- added some more actions for button events
-------------------------------------------------------------------
Sat Feb 22 00:17:01 CET 2003 - mmj@suse.de
- Add sysconfig metadata [#22676]
-------------------------------------------------------------------
Sat Feb 8 09:51:20 CET 2003 - zoz@suse.de
- added 'acpi': a tool providing battery and thermal information
(like apm in package apmd)
-------------------------------------------------------------------
Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de
- removed bogus self-provides
-------------------------------------------------------------------
Fri Sep 6 06:45:55 CEST 2002 - zoz@suse.de
- added comments to sysconfig variables (Bug 18654)
- fixed specfile to fillup /etc/sysconfig/powermanagement properly
-------------------------------------------------------------------
Tue Aug 13 13:08:37 CEST 2002 - zoz@suse.de
- added PreReq insserv_prereq fillup_prereq
-------------------------------------------------------------------
Tue Aug 6 14:52:03 CEST 2002 - zoz@suse.de
- initial package: version 1.0.1
- added init script which loads acpi modules as well
- provided acpid_proxy (apmd like) which cares about all events

316
acpid.spec Normal file
View File

@ -0,0 +1,316 @@
#
# spec file for package acpid (Version 1.0.4)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: acpid
URL: http://acpid.sourceforge.net/
Version: 1.0.4
Release: 51
%define acpi_version 0.09
License: GNU General Public License (GPL)
Group: System/Daemons
Autoreqprov: on
PreReq: %insserv_prereq %fillup_prereq
Summary: Executes Actions at ACPI Events
Source: %{name}-%{version}.tar.gz
Patch: %{name}-%{version}.dif
Source1: acpi-%{acpi_version}.tar.bz2
Source2: rcacpid
Source3: README.SuSE
Source4: ibm_acpi.modprobe
Source5: events.default
Patch1: acpi_%{acpi_version}.dif
Patch2: acpid-1.0.4-signedness.diff
Patch3: acpid-1.0.4-close-fd-on-client-disconnect.diff
Patch4: acpid-1.0.4-use-syslog.diff
Patch5: acpid-1.0.4-skip-editor-backup-files.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ia64
%description
ACPID is a completely flexible, totally extensible daemon for
delivering ACPI events. It listens to a file (/proc/acpi/event) and,
when an event occurs, executes programs to handle the event. The start
script loads all needed modules.
Configure it in /etc/sysconfig/powermanagement.
Authors:
--------
Andrew Grover <andrew.grover@intel.com>
Tim Hockin <thockin@sun.com>
Cajus Pollmeier <pollmeier@gonicus.de>
%prep
%setup -b 0 -a 1
%patch
%patch1
pushd acpi-%{acpi_version}
popd
%patch2
%patch3
%patch4 -p1
%patch5
cp %{S:2} %{S:3} %{S:4} %{S:5} .
%build
make EXTRA_CFLAGS="$RPM_OPT_FLAGS -DUSE_SYSLOG"
pushd acpi-%{acpi_version}
ln -sf /usr/share/automake*/install-sh install-sh
./configure
make EXTRA_CFLAGS="$RPM_OPT_FLAGS"
popd
%install
[ "%{buildroot}" != "/" ] && [ -d %{buildroot} ] && rm -rf %{buildroot}
make install INSTPREFIX=%{buildroot} SBINDIR=%{buildroot}/sbin
install -Dm 744 rcacpid %{buildroot}/etc/init.d/acpid
install -Dm 644 ibm_acpi.modprobe %{buildroot}/etc/modprobe.d/ibm_acpi
mkdir -p %{buildroot}/usr/sbin
ln -sf ../../etc/init.d/acpid %{buildroot}/usr/sbin/rcacpid
install -Dm 644 events.default %{buildroot}/etc/acpi/events/default
pushd acpi-%{acpi_version}
ln -sf /usr/share/automake*/mkinstalldirs mkinstalldirs
make prefix=%{buildroot}/usr install
install -Dm 644 acpi.1 %{buildroot}/%{_mandir}/man1/acpi.1
popd
mkdir -p %{buildroot}/var/lib/acpi
%post
%{fillup_and_insserv -Y -f acpid}
rm -f -- var/lib/acpi/*
%postun
%restart_on_update acpid
%{insserv_cleanup}
%preun
%stop_on_removal acpid
%files
%defattr(-,root,root)
%dir /etc/acpi
%dir /etc/acpi/events
/etc/acpi/events/default
/etc/init.d/acpid
/etc/modprobe.d/ibm_acpi
/usr/sbin/rcacpid
/sbin/acpid
/usr/bin/acpi_listen
%doc README.SuSE README Changelog samples
/usr/share/man/man8/acpid.8.gz
/usr/share/man/man8/acpi_listen.8.gz
/usr/bin/acpi
/usr/share/man/man1/acpi.1.gz
%dir %attr(0750, root, root) /var/lib/acpi
%changelog -n acpid
* Fri Nov 17 2006 - hmacht@suse.de
- remove CPUFreq modules loading, acpid is not available on all
architectures. Move handling to proper place --> HAL init script
(novell bug 220682)
* Mon Nov 13 2006 - hmacht@suse.de
- do not "fail" if there is no CPUFreq support, print descriptive
message instead (novell bug 219757)
* Wed Oct 18 2006 - seife@suse.de
- unload asus_acpi on unsupported machines.
- load cpufreq_acpi after speedstep-smi module.
- load the cpufreq_conservative governor (bug 163767).
- ignore editor backup files for the event configuration.
- package the provided action script samples under documentation.
- cleanup the specfile %%prep section.
* Tue Oct 17 2006 - hmacht@suse.de
- load CPUFreq modules before acpi modules, otherwise we would
exit without acpi support
* Tue Sep 12 2006 - hmacht@suse.de
- load CPUFreq modules in acpid for now because they have to be
already loaded when HAL starts
* Thu Jun 01 2006 - thoenig@suse.de
- rcacpid: do not probe unsupported modules if
LOAD_UNSUPPORTED_MODULES_AUTOMATICALLY is set to yes
(b.n.c #180654)
- rcacpid: be verbose about which modules are being probed or
loaded.
* Tue Feb 21 2006 - rw@suse.de
- never try laptop modules on ia64 (bug #146291)
* Wed Feb 15 2006 - thoenig@suse.de
- revert hotkey mask for IBM ACPI back to 0xffff (bug #150357)
- add documentation hints for IBM ACPI driver
* Thu Feb 09 2006 - seife@suse.de
- do not try the hotkey modules on ia64 (bug #146291)
* Mon Feb 06 2006 - seife@suse.de
- do not load ac and battery modules on ia64 (bug #140249)
- untangle the "suse-files.tar" packaging mess
- after a kernel update, rescan the laptop modules
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Nov 24 2005 - seife@suse.de
- move daemon from /usr/sbin to /sbin to remove the $remote_fs
dependency and start sooner
- log via syslog instead of using the own logfile mechanism
* Tue Oct 25 2005 - thoenig@suse.de
- changed hotkey mask for ibm_acpi from 0xffff to 0xffef so that
the driver does not block Fn-F5 (switch Bluetooh on/off) on IBM
ThinkPads (closes #128088)
* Wed Oct 05 2005 - dmueller@suse.de
- add norootforbuild
* Sat Sep 24 2005 - seife@suse.de
- rework last patch, fix a memleak in addition to the fd leak.
* Fri Sep 23 2005 - seife@suse.de
- fix filedescriptor leak on client disconnect (bug #117884)
* Thu Sep 08 2005 - thoenig@suse.de
- fixed probing of laptop modules (closes #115819)
* Wed Sep 07 2005 - thoenig@suse.de
- changed modprobe.d/ibm_acpi to be even more verbose (more Fn-Fxx
will be reported (see #115127 and closes re-opened #113625)
* Wed Aug 31 2005 - ro@suse.de
- removed config-dist.sh (ExclusiveArch is already there)
* Tue Aug 30 2005 - thoenig@suse.de
- added sony_acpi and pcc_acpi to be probed on first run (SUSE
feature request r6125)
* Mon Aug 29 2005 - thoenig@suse.de
- fixed probe function of rcacpid
* Mon Aug 29 2005 - thoenig@suse.de
- added install parameter for ibm_acpi to enable verbose output
of hotkey (#113625)
* Thu Aug 25 2005 - thoenig@suse.de
- rcacpid now probes laptop modules once and will only
load those modules at a later point if modprobe succeeded.
* Wed Aug 10 2005 - thoenig@suse.de
- added three modules to DEFAULT_ACPI_MODULES:
* asus_acpi
* ibm_acpi
* toshiba_acpi
- added $SYSCONFDIR/modprobe.d/ibm_acpi for ibm_acpi to load the
module with "experimental=1"
* Fri Aug 05 2005 - seife@suse.de
- load ACPI modules in /etc/init.d/acpid.
* Fri Aug 05 2005 - trenn@suse.de
- Activate acpid by default again (use -Y to force, was disabled
in old setups, but we need it urgently now)
- Deleted suse stuff (acpid_proxy,...), only use acpid to forward
acpi events to other apps/services.
- updated acpid (1.0.3 -> 1.0.4) acpi (0.07 -> 0.09)
- changed config to not process acpi events, just forward them
* Mon May 02 2005 - mmj@suse.de
- Fix warning about chdir return value not being caught
* Mon Apr 04 2005 - pth@suse.de
- Fix signed/unsigned warnings
* Thu Nov 25 2004 - zoz@suse.de
- rcacpid status now reports service acpid as unused if acpid was
started from rcpowersaved (Bug 48432)
* Thu Nov 11 2004 - zoz@suse.de
- added /var/lib/acpi with proper permissions to filelist. Further
acpid_proxy won't create that dir if missing. (Bug 47729)
* Mon Sep 06 2004 - seife@suse.de
- clean up config file for sysconfig editor
* Thu Aug 26 2004 - trenn@suse.de
- deleted debian stuff
* Fri Aug 13 2004 - trenn@suse.de
- updated to acpid from 1.0.1 to version 1.0.3 and
acpi Version from 0.06 to 0.07
* Fri May 14 2004 - trenn@suse.de
- P4 Hyperthreading patch from pth@suse (#39017)
* Tue Apr 06 2004 - trenn@suse.de
- rcacpid stop does not return skipped anymore on none acpi systems
this prevented acpid to uninstall on these systems (#38508)
* Thu Mar 18 2004 - seife@suse.de
- updated README.SuSE and default config (#36208)
* Wed Mar 03 2004 - trenn@suse.de
- add %%restart_on_update and %%stop_on_removal in .spec file
* Tue Feb 24 2004 - trenn@suse.de
- deleted ac_on_power, is now in powersave package
* Mon Feb 23 2004 - trenn@suse.de
- deleted -y parameter in inserv, to not start by default
powersave gets confused otherwise, only one daemon is allowed
to access /proc/acpi/event
* Wed Nov 05 2003 - olh@suse.de
- do not start the build if not required
* Mon Sep 22 2003 - zoz@suse.de
- fixed naming of actions in acpid_proxy (Bug 31357)
- fixed metadata and description of actions in sysconfig template
(Bug 31357)
- fixed startscript to unload modules if requested (Bug 31357)
- set default action for lid closure to 'ignore', because 'throttle'
breaks some laptops (Bug 31529)
* Sun Sep 21 2003 - ro@suse.de
- fix typo in sysconfig-file
* Thu Sep 18 2003 - trenn@suse.de
- bug 30913 and 31265
lid state is now read out correctly (CLOSE->CLOSED)
corrected parts for throttling
action kde_term fixed (determine kde user)
action kde_logout additionally added
* Tue Sep 16 2003 - trenn@suse.de
- bug 30399 -> lid read out of /proc/acpi/lid/... now
and changed frequency scaling from deprecated /acpi/processor
to cpufreqd
* Wed Sep 10 2003 - kukuk@suse.de
- rcacpid: Fix return codes, fix try-restart, fix probe (don't
compare with non existing FOO config file), fix restart (restart
should honor modified sysconfig file).
* Tue Sep 02 2003 - trenn@suse.de
- on_ac_adapter: more stable and
check for desktop
start acpid by default
* Thu Aug 28 2003 - trenn@suse.de
- fixed bug in sysconfig.acpi template
* Thu Aug 28 2003 - trenn@suse.de
- added on_ac_power
* Tue Aug 26 2003 - trenn@suse.de
- added action tags for sysconfig file
* Thu Aug 14 2003 - ro@suse.de
- added exclusivearch line to specfile
* Sun Jul 20 2003 - zoz@suse.de
- Removed ACPI_MODULES_NOT_TO_LOAD from /etc/init.d/acpid and
/etc/sysconfig/powermanagement. now we use ACPI_MODULES instead.
This works also with 2.5/6 kernels and you may add one of the
modules asus_acpi or toshiba_acpi to this variable.
* Sat Mar 01 2003 - zoz@suse.de
- fixed acpid: Did not call acpid_proxy with event information
- splitted ACPI_BUTTON_LID into ACPI_BUTTON_LID_OPEN and
ACPI_BUTTON_LID_CLOSE
- added some actions for button events to acpid_proxy
+ kde_term (terminate all KDE sessions)
+ wmaker_term (terminate all wmaker sessions)
+ standby (switches to S1. This may crash the system. Test it before!)
+ suspend (switches to S3 if kernel is 2.5 or newer)
+ hibernate (switches to S4 if kernel is 2.5 or newer
+ throttle (reduce processor performance, enable maximum processor throttlin
put disk into sleep state)
+ dethrottle (restore settings like before throttle)
- for proper throttling added ACPI_THROTTLED_DISK_TIMEOUT and
ACPI_THROTTLED_KUPDATED_INTERVAL
- provided some usefull information in README.SuSE
* Mon Feb 24 2003 - zoz@suse.de
- enhanced sysconfig metadata and descriptions
- added ACPI_MODULES_NOT_TO_UNLOAD, because there are modules which
oops when unloaded
- added ACPI_BUTTON_SLEEP
- added some more actions for button events
* Sat Feb 22 2003 - mmj@suse.de
- Add sysconfig metadata [#22676]
* Sat Feb 08 2003 - zoz@suse.de
- added 'acpi': a tool providing battery and thermal information
(like apm in package apmd)
* Tue Sep 17 2002 - ro@suse.de
- removed bogus self-provides
* Fri Sep 06 2002 - zoz@suse.de
- added comments to sysconfig variables (Bug 18654)
- fixed specfile to fillup /etc/sysconfig/powermanagement properly
* Tue Aug 13 2002 - zoz@suse.de
- added PreReq insserv_prereq fillup_prereq
* Tue Aug 06 2002 - zoz@suse.de
- initial package: version 1.0.1
- added init script which loads acpi modules as well
- provided acpid_proxy (apmd like) which cares about all events

9
events.default Normal file
View File

@ -0,0 +1,9 @@
# This is a dummy config file to avoid
# that acpid processes any ACPI events.
#
# This should be the default configuration
# as the acpid should only serve to forward
# ACPI events.
# Other programs such as powersaved or special key
# handler programs should process ACPI events

12
ibm_acpi.modprobe Normal file
View File

@ -0,0 +1,12 @@
#
# IBM ACPI driver options
#
# A detailed description of the parameters for the IBM ACPI driver can be found
# in /usr/src/linux/Documentation/ibm-acpi.txt which is part of the package
# 'kernel-source'.
#
# If you encounter problems with the hotkey mask please file a bug on
# http://bugzilla.novell.com/
#
options ibm_acpi hotkey=enabled,0xffff experimental=1

220
rcacpid Normal file
View File

@ -0,0 +1,220 @@
#! /bin/bash
# Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Authors: Christian Zoz <zoz@suse.de>
# Timo Hoenig <thoenig@suse.de>
#
# /etc/init.d/acpid
# and its symbolic link
# /usr/sbin/rcacpid
#
# LSB compliant service control script; see http://www.linuxbase.org/spec/
#
### BEGIN INIT INFO
# Provides: acpid
# Required-Start:
# X-UnitedLinux-Should-Start:
# Required-Stop:
# X-UnitedLinux-Should-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Listen and dispatch ACPI events from the kernel
# Description: acpid reads events from /proc/acpi/event and dispatches
# them (by SuSE default) to other "users" like powersaved, HAL and IAL.
# Actions for those events are (by SUSE default) configured in the
# powersaved configuration.
# Additionally this start script loads all needed modules.
### END INIT INFO
# Check for missing binaries (stale symlinks should not happen)
ACPID_BIN=/sbin/acpid
test -x $ACPID_BIN || exit 5
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_status -s display "skipped" and exit with status 3
# rc_status -u display "unused" and exit with status 3
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
# rc_active checks whether a service is activated by symlinks
# rc_splash arg sets the boot splash screen to arg (if active)
. /etc/rc.status
# Reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.
ACPI_MODULES=""
DEFAULT_ACPI_MODULES="ac battery button fan processor thermal"
ACPI_LAPTOP_MODULES_PROBE="asus_acpi ibm_acpi toshiba_acpi sony_acpi pcc_acpi"
ACPI_LAPTOP_MODULES_FILE="/var/lib/acpi/laptop_modules"
ARCH=`uname -i`
case $ARCH in
ia64) DEFAULT_ACPI_MODULES="button fan processor thermal"
ACPI_LAPTOP_MODULES_PROBE=""
# avoid even occassional probing of laptop modules!
ACPI_LAPTOP_MODULES_USER="NONE"
;;
esac
[ -f /etc/sysconfig/powersave/common ] && . /etc/sysconfig/powersave/common
[ -f /etc/sysconfig/acpi ] && . /etc/sysconfig/acpi
[ -f /etc/sysconfig/hardware/config ] && . /etc/sysconfig/hardware/config
[ -f /etc/sysconfig/powersave/cpufreq ] && . /etc/sysconfig/powersave/cpufreq
case "$1" in
start)
if [ ! -d /proc/acpi ] ; then
echo -n "acpid: no ACPI support in kernel"
rc_status -s
rc_exit
fi
echo -n "acpid: loading ACPI modules ( "
if [ "$ACPI_MODULES" != "NONE" ]; then
# load ACPI modules
for m in ${ACPI_MODULES:-$DEFAULT_ACPI_MODULES}; do
grep -wq $m /proc/modules || { modprobe -s $m && echo -n "$m " || rc_status; }
done
fi
echo -n ") "
rc_status -v
if [ -n "$ACPI_LAPTOP_MODULES_USER" ]; then
if [ "$ACPI_LAPTOP_MODULES_USER" != "NONE" ]; then
echo -n "acpid: loading ACPI laptop modules ( "
# Load modules defined by user
for m in ${ACPI_LAPTOP_MODULES_USER}; do
grep -wq $m /proc/modules || { modprobe -s $m && echo -n "$m " || rc_status; }
done
echo -n ") "
rc_status -v
fi
else
if [ "$LOAD_UNSUPPORTED_MODULES_AUTOMATICALLY" != yes ] ; then
echo "acpid: will skip unsupported modules"
MODPROBE_OPTS=--skip-unsupported
else
echo "acpid: will not skip unsupported modules"
fi
if [ /boot/vmlinuz -ot "$ACPI_LAPTOP_MODULES_FILE" ]; then
# We do respect LOAD_UNSUPPORTED_MODULES_AUTOMATICALLY for probed modules.
echo -n "acpid: loading ACPI laptop modules ( "
# Load modules defined by system probe
while read m; do
grep -wq $m /proc/modules || { modprobe $MODPROBE_OPTS -s $m && echo -n "$m " || rc_status; }
done < $ACPI_LAPTOP_MODULES_FILE
echo -n ") "
rc_status -v
else
# First run, or kernel has been updated. We have to probe which
# modules load successfully. For this, we do respect
# LOAD_UNSUPPORTED_MODULES_AUTOMATICALLY.
echo "acpid: probing laptop ACPI modules "
touch "$ACPI_LAPTOP_MODULES_FILE"
for m in $ACPI_LAPTOP_MODULES_PROBE; do
if modprobe $MODPROBE_OPTS -s $m; then
# pcc_acpi and sony_acpi can always be loaded.
# remove them if the system does not support them.
case $m in
sony_acpi)
if [ ! -r /proc/acpi/sony/brightness ] ; then
grep -wq $m /proc/modules && rmmod sony_acpi;
continue
fi ;;
pcc_acpi)
if [ ! -r /proc/acpi/panasonic ] ; then
grep -wq $m /proc/modules && rmmod pcc_acpi;
continue
fi ;;
asus_acpi)
if [ ! -r /proc/acpi/asus ] ; then
grep -wq $m /proc/modules && rmmod asus_acpi;
continue
fi ;;
esac
echo $m >> $ACPI_LAPTOP_MODULES_FILE
fi
done
echo -n "acpid: added "
while read m; do
echo -n "$m "
done < $ACPI_LAPTOP_MODULES_FILE
echo -n "to $ACPI_LAPTOP_MODULES_FILE"
rc_status -v;
fi
fi
echo -n "Starting acpid "
startproc $ACPID_BIN
rc_status -v
;;
stop)
echo -n "Shutting down acpid "
killproc -TERM $ACPID_BIN
rc_status -v
;;
try-restart)
$0 status
if test $? = 0; then
$0 restart
else
rc_reset # Not running is not a failure.
fi
rc_status
;;
restart)
$0 stop
$0 start
rc_status
;;
force-reload|reload)
echo -n "Reload service acpid "
killproc -HUP $ACPID_BIN
rc_status -v
;;
status)
echo -n "Checking for service acpid "
PID=`checkproc -v $ACPID_BIN`
if rc_status ; then
case `cat /proc/$PID/cmdline` in *events.ignore) rc_failed 3; esac
fi
rc_status -v
;;
probe)
test $ACPID_CONFIG -nt /var/run/acpid.pid && echo restart
;;
*)
echo "Usage: $0" \
"{start|stop|status|try-restart|restart|force-reload|reload|probe}"
exit 1
;;
esac
rc_exit

0
ready Normal file
View File