=== modified file 'Changelog' --- Changelog 2010-02-15 16:25:13 +0000 +++ Changelog 2010-02-14 19:20:34 +0000 @@ -1,14 +1,4 @@ %changelog -* Mon Feb 15 2010 Ted Felix - - 2.0.2 release - - Increased MAX_CONNECTIONS to 20. (connection_list.c) - - Recalculate highestfd in delete_connection(). (connection_list.c) - (Willi Mann) - - Removed old naming convention code for configuration files. (event.c) - - Fixed unescaped dashes in manpage. (acpid.8) (Michael Meskes) - - Added fix for mandb issue. (Makefile) (Robby Workman) - - Moved README-NETLINK into README. (README-NETLINK README) - * Fri Jan 15 2010 Ted Felix - 2.0.1 release - Makefile improvements for packagers. (Makefile) (Robby Workman) === modified file 'Makefile' --- Makefile 2010-02-15 16:25:13 +0000 +++ Makefile 2010-02-14 19:20:34 +0000 @@ -1,7 +1,7 @@ # Makefile for ACPI daemon # update these numbers for new releases -VERSION = 2.0.2 +VERSION = 2.0.1 OPT = -O2 @@ -29,7 +29,7 @@ MAN8 = acpid.8 acpi_listen.8 MAN8GZ = $(MAN8:.8=.8.gz) -DOCS = COPYING Changelog README TESTPLAN TODO +DOCS = COPYING Changelog README README-NETLINK TESTPLAN TODO CFLAGS = -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE $(OPT) \ -fno-strict-aliasing -g $(DEFS) @@ -56,8 +56,10 @@ install -m 0755 acpi_listen $(DESTDIR)/$(BINDIR) mkdir -p $(DESTDIR)/$(MANDIR)/man8 install -m 0644 $(MAN8GZ) $(DESTDIR)/$(MANDIR)/man8 - # If DESTDIR is empty and mandb exists, run it - [ -z "$(DESTDIR)" ] && which mandb 1>/dev/null 2>&1 && mandb -q +# FIXME +# mandb isn't available on all systems. How to handle? +# Is it needed? +# mandb -q DISTTMP=/tmp DISTNAME=acpid-$(VERSION) === modified file 'README' --- README 2010-02-15 16:25:13 +0000 +++ README 2010-02-14 19:20:03 +0000 @@ -1,15 +1,3 @@ -acpid for netlink - -This is Ted Felix's branch of the acpid project -which includes support for netlink and the input layer. - -/proc/acpi/event is a deprecated kernel interface for ACPI events. Newer -kernels rely on netlink and the input layer to send ACPI-related events. -This branch of acpid uses these new interfaces. - -Any comments or patches for this branch should be sent to Ted Felix: -http://www.tedfelix.com - *********************************************************** * README for acpid * * * === added file 'README-NETLINK' --- README-NETLINK 1970-01-01 00:00:00 +0000 +++ README-NETLINK 2010-02-14 19:20:34 +0000 @@ -0,0 +1,12 @@ +acpid for netlink + +This is Ted Felix's branch of the acpid project +which includes support for netlink and the input layer. + +/proc/acpi/event is a deprecated kernel interface for ACPI events. Newer +kernels rely on netlink and the input layer to send ACPI-related events. +This branch of acpid uses these new interfaces. + +Any comments or patches for this branch should be sent to Ted Felix: + +http://www.tedfelix.com === modified file 'connection_list.c' --- connection_list.c 2010-02-15 16:25:13 +0000 +++ connection_list.c 2010-02-14 19:20:34 +0000 @@ -92,14 +92,15 @@ break; } } + + /* prepare for recalculation of highestfd */ + highestfd = -2; - /* prepare for recalculation of highestfd */ - highestfd = -2; - - /* recalculate highestfd */ - for (i = 0; i < nconnections; ++i) { - highestfd = max(highestfd, connection_list[i].fd); - } + /* recalculate highestfd */ + for (i = 0; i < nconnections; ++i) { + highestfd = max(highestfd, connection_list[i].fd); + } + } /*---------------------------------------------------------------*/ === modified file 'debian/acpid.install' --- debian/acpid.install 2009-02-17 11:10:42 +0000 +++ debian/acpid.install 2010-02-14 19:20:03 +0000 @@ -1,5 +1,4 @@ -debian/powerbtn usr/share/doc/acpid/examples/ -debian/powerbtn.sh usr/share/doc/acpid/examples/ +debian/powerbtn etc/acpi/events/ debian/examples/default usr/share/doc/acpid/examples/ debian/examples/default.sh usr/share/doc/acpid/examples/ debian/examples/ac usr/share/doc/acpid/examples/ === modified file 'debian/acpid.preinst' --- debian/acpid.preinst 2009-04-20 14:04:32 +0000 +++ debian/acpid.preinst 2010-02-14 19:20:03 +0000 @@ -16,26 +16,14 @@ echo "Saving as $CONFFILE.dpkg-bak ..." mv -f "$CONFFILE" "$CONFFILE".dpkg-bak else - if [ "$CONFFILE" = "/etc/acpi/events/powerbtn" -a -e /etc/acpi/powerbtn.sh.dpkg-bak ]; then - # we need some special logic for /etc/acpi/events/powerbtn because it might - # be kept because it was changed itself or because /etc/acpi/powerbtn.sh was changed - echo "Obsolete conffile $CONFFILE saved as $CONFFILE.dpkg-bak ..." - sed -e 's#/etc/acpi/powerbtn.sh#/etc/acpi/powerbtn.sh.dpkg-bak#' < "$CONFFILE" > "$CONFFILE".dpkg-bak - else - echo "Removing obsolete conffile $CONFFILE ..." - fi - rm -f "$CONFFILE" + echo "Removing obsolete conffile $CONFFILE ..." + rm -f "$CONFFILE" fi fi } - case "$1" in install|upgrade) - if dpkg --compare-versions "$2" lt 1.0.8-7; then - rm_conffile acpid /etc/logrotate.d/acpid - rm_conffile acpid /etc/acpi/powerbtn.sh - rm_conffile acpid /etc/acpi/events/powerbtn - fi + rm_conffile acpid /etc/logrotate.d/acpid ;; esac === added file 'debian/acpid.upstart' --- debian/acpid.upstart 1970-01-01 00:00:00 +0000 +++ debian/acpid.upstart 2010-02-14 19:20:03 +0000 @@ -0,0 +1,14 @@ +# acpid - ACPI daemon +# +# The ACPI daemon provides a socket for other daemons to multiplex kernel +# ACPI events from, and a framework for reacting to those events. + +description "ACPI daemon" + +start on runlevel [2345] +stop on runlevel [!2345] + +expect fork +respawn + +exec acpid -c /etc/acpi/events -s /var/run/acpid.socket === modified file 'debian/changelog' --- debian/changelog 2010-02-15 16:25:13 +0000 +++ debian/changelog 2010-03-07 01:56:04 +0000 @@ -1,9 +1,17 @@ -acpid (1:2.0.2-1) unstable; urgency=low - - * New upstream version. - * Bumped Standards-Version to 3.8.4, no changes needed. - - -- Michael Meskes Mon, 15 Feb 2010 16:25:13 +0100 +acpid (1:2.0.1-2ubuntu1) lucid; urgency=low + + * Merging from Debian Testing. Remaining changes: + - debian/control: + - Updating module-init-tools version (>> 3.1-rel-2) + - Bump build-dependency on debhelper for Upstart-aware dh_installinit + - debian/preinst, debian/acpid.install, debian/control, debian/rules: + continue installing /etc/acpi/events/powerbtn and /etc/acpi/powerbtn.sh, + deferring the migration to acpi-support-base; and drop the Recommends: + on acpi-support-base for the same reason. + - Added an upstart job for ACPI daemon + - Source /usr/share/acpi-support/power-funcs in powerbtn.sh + + -- Vikram Dhillon Sun, 14 Feb 2010 14:25:54 -0500 acpid (1:2.0.1-2) unstable; urgency=low @@ -44,6 +52,27 @@ -- Michael Meskes Mon, 21 Dec 2009 13:03:48 +0100 +acpid (1.0.10-5ubuntu2) lucid; urgency=low + + * Source /usr/share/acpi-support/power-funcs in powerbtn.sh (LP: #508073) + + -- Jonathan Thomas Fri, 15 Jan 2010 19:59:47 -0500 + +acpid (1.0.10-5ubuntu1) lucid; urgency=low + + * Merge from Debian testing. Remaining changes: + - Replace init script with Upstart job. + - This does not load modules, unlike the init script, since these are + all loaded by ACPI:* modaliases now (and thus by udev) + - debian/control: + - Bump build-dependency on debhelper for Upstart-aware dh_installinit + - debian/preinst, debian/acpid.install, debian/control, debian/rules: + continue installing /etc/acpi/events/powerbtn and /etc/acpi/powerbtn.sh, + deferring the migration to acpi-support-base; and drop the Recommends: + on acpi-support-base for the same reason. + + -- Steve Langasek Wed, 23 Dec 2009 00:32:09 +0000 + acpid (1.0.10-5) unstable; urgency=high * Correct permissions that were incorrectly set by very old acpid versions. @@ -51,6 +80,38 @@ -- Michael Meskes Tue, 15 Dec 2009 13:11:29 +0100 +acpid (1.0.10-4ubuntu1) lucid; urgency=low + + * Merge from Debian testing. Remaining changes: + - Replace init script with Upstart job. + - This does not load modules, unlike the init script, since these are + all loaded by ACPI:* modaliases now (and thus by udev) + - debian/control: + - Bump build-dependency on debhelper for Upstart-aware dh_installinit + * Dropped changes, integrated upstream: + - build with -D_GNU_SOURCE to make "struct ucred" available + - acpid.*, event.c, ud_socket.*: limit the number of non-root clients, + correctly close dead connections. + - Remove the logrotate file on upgrade + - Bump Standards-Version to 3.8.0 + - debian/powerbtn.sh: + - Update for KDE 4 + - Add dalston-power-applet to list of handlers for power + button events + - add xfce4-power-manager to the list of handlers as well. + * Dropped changes, superseded by upstart conversion: + - debian/acpid.init.d: add the 'status' action + - Replace "multiuser" deprecated init mode in debian/rules with manual + arguments. Adapt the corresponding change in LSB init script header + and runtime dependency in debian/control + - depend on sysv-rc + * debian/preinst, debian/acpid.install, debian/control, debian/rules: + continue installing /etc/acpi/events/powerbtn and /etc/acpi/powerbtn.sh, + deferring the migration to acpi-support-base; and drop the Recommends: + on acpi-support-base for the same reason. + + -- Steve Langasek Fri, 18 Dec 2009 07:44:04 +0000 + acpid (1.0.10-4) unstable; urgency=low * Updated netlink patch to version 6. @@ -297,6 +358,100 @@ -- Michael Meskes Fri, 20 Jun 2008 14:21:14 +0200 +acpid (1.0.6-9ubuntu8) karmic; urgency=low + + * debian/powerbtn.sh: add xfce4-power-manager to the list of handlers as + well. LP: #425155 + + -- Lionel Le Folgoc Wed, 23 Sep 2009 14:53:01 +0200 + +acpid (1.0.6-9ubuntu7) karmic; urgency=low + + * debian/powerbtn.sh: + - Add dalston-power-applet to list of handlers for power + button events (part of fix for LP: #432578). + + -- Gary Lasker Fri, 18 Sep 2009 12:25:33 -0400 + +acpid (1.0.6-9ubuntu6) karmic; urgency=low + + FFE LP: #427356. + + * Replace init script with Upstart job. + - This does not load modules, unlike the init script, since these are + all loaded by ACPI:* modaliases now (and thus by udev) + * debian/control: + - Bump build-dependency on debhelper for Upstart-aware dh_installinit + + -- Scott James Remnant Tue, 15 Sep 2009 03:34:49 +0100 + +acpid (1.0.6-9ubuntu5) karmic; urgency=low + + * Upload jaunty changes to karmic + + -- Jonathan Riddell Tue, 28 Apr 2009 11:07:28 +0100 + +acpid (1.0.6-9ubuntu4.9.04.3) jaunty-proposed; urgency=low + + * Update /etc/acpi/powerbtn.sh for KDE 4 + Closes LP: #368497 + + -- Jonathan Riddell Tue, 28 Apr 2009 11:01:13 +0100 + +acpid (1.0.6-9ubuntu4.9.04.2) jaunty-security; urgency=low + + * SECURITY UPDATE: denial of service via too many open files + - acpid.*, event.c, ud_socket.*: limit the number of non-root clients, + correctly close dead connections. + - CVE-2009-0798 + + -- Marc Deslauriers Wed, 22 Apr 2009 15:09:59 -0400 + +acpid (1.0.6-9ubuntu4) intrepid; urgency=low + + * Remove the logrotate file on upgrade, as the previous one that was + installed did a "kill -USR1" on the acpid process to cause it to reload + its logfiles. As the new acpid doesn't use a log file it doesn't catch + this signal, which means that once a week acpid is killed. As it doesn't + have a logfile the logrotate file is not needed, and so is no longer + installed, but as it was a conffile it is not removed on upgrades. + Thanks to Loic Minier for his help with the fix. (LP: #263888) + - ad81211857dabeb88538e0f90c922b7c787b34c5 in Debian's pkg-acpi git repo. + + -- James Westby Wed, 24 Sep 2008 15:19:14 +0100 + +acpid (1.0.6-9ubuntu3) intrepid; urgency=low + + * Replace "multiuser" deprecated init mode in debian/rules with manual + arguments. Adapt the corresponding change in LSB init script header and + runtime dependency in debian/control (LP: #254249) + + -- Didier Roche Wed, 13 Aug 2008 19:50:50 +0200 + +acpid (1.0.6-9ubuntu2) intrepid; urgency=low + + * debian/control + - Depend on lsb-base >= 3.2-14, providing status_of_proc() + - Bump Standards-Version to 3.8.0 + * debian/acpid.init.d + - Add the 'status' action (LP: #251681) + + -- Nathan Handler Thu, 24 Jul 2008 21:03:02 -0500 + +acpid (1.0.6-9ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - init script starts earlier + - depend on sysv-rc + * removed ubuntu specific -G (lockfilegroup) options, it does + no longer apply because acpid now uses syslog by default + * disable debian update-rc.d call to make acpid run earlier on + upgrade, out packages already run early + * build with -D_GNU_SOURCE to make "struct ucred" available + (see also http://sourceware.org/bugzilla/show_bug.cgi?id=6545) + + -- Michael Vogt Mon, 02 Jun 2008 09:58:14 +0200 + acpid (1.0.6-9) unstable; urgency=low * Don't depend on sysv-rc; closes: #481912 === modified file 'debian/control' --- debian/control 2010-02-15 16:25:13 +0000 +++ debian/control 2010-03-07 01:53:34 +0000 @@ -1,10 +1,12 @@ Source: acpid Section: admin Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Debian Acpi Team Maintainer: Debian Acpi Team Uploaders: Michael Meskes , Loic Minier -Standards-Version: 3.8.4 +Standards-Version: 3.8.3 Build-Depends: debhelper (>= 5) Vcs-Git: git://git.debian.org/git/pkg-acpi/acpid.git Vcs-Browser: http://git.debian.org/?p=pkg-acpi/acpid.git === modified file 'debian/powerbtn.sh' --- debian/powerbtn.sh 2009-11-09 14:46:15 +0000 +++ debian/powerbtn.sh 2010-02-14 19:20:03 +0000 @@ -3,6 +3,8 @@ # Initiates a shutdown when the power putton has been # pressed. +. /usr/share/acpi-support/power-funcs + # getXuser gets the X user belonging to the display in $displaynum. # If you want the foreground X user, use getXconsole! getXuser() { === modified file 'debian/rules' --- debian/rules 2010-01-16 11:35:14 +0000 +++ debian/rules 2010-02-14 19:20:34 +0000 @@ -19,6 +19,8 @@ dh_testroot dh_clean dh_installdirs + # Install powerbtn.sh script and make it executable + install -m 755 -D debian/powerbtn.sh debian/acpid/etc/acpi/powerbtn.sh binary: binary-arch binary-indep === modified file 'event.c' --- event.c 2010-02-15 16:25:13 +0000 +++ event.c 2010-02-14 19:20:34 +0000 @@ -39,6 +39,11 @@ #include "sock.h" #include "ud_socket.h" +/* run-parts(8) naming convention for configuration files. */ +/* The old code is deprecated and will be removed in the */ +/* next release (2.0.2). */ +#define RUN_PARTS 1 + /* * What is a rule? It's polymorphic, pretty much. */ @@ -93,8 +98,10 @@ struct dirent *dirent; char *file = NULL; int nrules = 0; +#if RUN_PARTS regex_t preg; int rc = 0; +#endif lock_rules(); @@ -106,6 +113,7 @@ return -1; } +#if RUN_PARTS /* Compile the regular expression. This is based on run-parts(8). */ rc = regcomp(&preg, "^[a-zA-Z0-9_-]+$", RULE_REGEX_FLAGS); if (rc) { @@ -113,6 +121,7 @@ unlock_rules(); return -1; } +#endif /* scan all the files */ while ((dirent = readdir(dir))) { @@ -122,12 +131,21 @@ len = strlen(dirent->d_name); +#if RUN_PARTS /* skip any files that don't match the run-parts convention */ if (regexec(&preg, dirent->d_name, 0, NULL, 0) != 0) { acpid_log(LOG_DEBUG, "skipping conf file %s/%s\n", confdir, dirent->d_name); continue; } +#else +/* ??? This approach will be removed in the next release. */ + if (dirent->d_name[0] == '.') + continue; /* skip dotfiles */ + if (dirent->d_name[len - 1] == '~') { + continue; /* skip editor backup files */ + } +#endif /* Compute the length of the full path name adding one for */ /* the slash and one more for the NULL. */