Hello community,
here is the log from the commit of package acpid for openSUSE:Factory checked in at 2012-04-12 09:17:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/acpid (Old)
and /work/SRC/openSUSE:Factory/.acpid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "acpid", Maintainer is "hmacht@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/acpid/acpid.changes 2012-03-20 11:24:43.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.acpid.new/acpid.changes 2012-04-12 09:17:26.000000000 +0200
@@ -1,0 +2,15 @@
+Mon Apr 2 23:59:08 UTC 2012 - tabraham@novell.com
+
+- Update to acpid 2.0.16
+ + Add tests for required functions to configure.ac.
+ (configure.ac) (Ted Felix)
+ + Move fchmod() before bind() on socket. Debian bug #664705.
+ (sock.c ud_socket.c ud_socket.h) (Ted Felix)
+ + Switch back to chown() as fchown() doesn't appear to work with sockets.
+ (sock.c) (Ted Felix)
+ + Add support for headphone (and other) jack switch events.
+ (input_layer.c) (AlexanderR)
+ + Add notes on making the tarball.
+ (README) (Ted Felix)
+
+-------------------------------------------------------------------
Old:
----
acpid-2.0.15.tar.gz
New:
----
acpid-2.0.16.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ acpid.spec ++++++
--- /var/tmp/diff_new_pack.PyUMur/_old 2012-04-12 09:17:27.000000000 +0200
+++ /var/tmp/diff_new_pack.PyUMur/_new 2012-04-12 09:17:27.000000000 +0200
@@ -18,7 +18,7 @@
Name: acpid
-Version: 2.0.15
+Version: 2.0.16
Release: 0
License: GPL-2.0+
Summary: Executes Actions at ACPI Events
++++++ acpid-2.0.15.tar.gz -> acpid-2.0.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/Changelog new/acpid-2.0.16/Changelog
--- old/acpid-2.0.15/Changelog 2012-03-13 05:10:34.000000000 +0100
+++ new/acpid-2.0.16/Changelog 2012-03-29 14:34:47.000000000 +0200
@@ -1,3 +1,17 @@
+* Thu Mar 29 2012 Ted Felix http://www.tedfelix.com
+ - 2.0.16 release
+ (configure.ac) (Ted Felix)
+ - Add tests for required functions to configure.ac.
+ (configure.ac) (Ted Felix)
+ - Move fchmod() before bind() on socket. Debian bug #664705.
+ (sock.c ud_socket.c ud_socket.h) (Ted Felix)
+ - Switch back to chown() as fchown() doesn't appear to work with sockets.
+ (sock.c) (Ted Felix)
+ - Add support for headphone (and other) jack switch events.
+ (input_layer.c) (AlexanderR)
+ - Add notes on making the tarball.
+ (README) (Ted Felix)
+
* Thu Mar 15 2012 Ted Felix http://www.tedfelix.com
- 2.0.15 release
(configure.ac) (Ted Felix)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/README new/acpid-2.0.16/README
--- old/acpid-2.0.15/README 2012-03-15 14:20:45.000000000 +0100
+++ new/acpid-2.0.16/README 2012-03-29 14:34:08.000000000 +0200
@@ -46,6 +46,15 @@
You can also fork the git repo on sourceforge and submit changes that way:
http://sourceforge.net/u/tedfelix/acpid2/
+DIST NOTES
+
+To create the tarball for distribution:
+
+ $ make distclean
+ $ autoreconf --install --force
+ $ ./configure
+ $ make dist
+
--------------------------------------------------------------------
OLD README
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/TODO new/acpid-2.0.16/TODO
--- old/acpid-2.0.15/TODO 2012-02-16 21:24:42.000000000 +0100
+++ new/acpid-2.0.16/TODO 2012-03-16 14:38:02.000000000 +0100
@@ -1,17 +1,32 @@
Future Enhancements
-------------------
-systemd support
+* systemd support
- Support receiving unix sockets from systemd.
- Make daemonize() do what's right for systemd.
- Can we auto-detect systemd? Maybe the presence of the environment vars
for the unix sockets?
+ - Maintain compatibility with upstart, etc...
-Look into using libnl for netlink
- - Can this be done?
+* Look into using libnl for netlink
+ - Can this be done? Is it a good idea?
-DBUS support
-Re-add ancillary files needed for wider distribution
-Add a main config file
- - support multiple event sources (such as named pipes)
-Allow socket-connected clients to filter incoming events
+OLD IDEAS
+
+* DBUS support
+ - Do we really need DBUS support? Probably not.
+ - Tim says this would be easy to implement. He mentioned "mced" which
+ is similar to acpid and handles DBUS.
+ http://code.google.com/p/mcedaemon/
+ - Everyone seems to agree that the whole point of acpid is
+ to avoid the big desktop stuff, and therefore, this is probably
+ not a good idea.
+ - However, there are still pieces of those big desktop environments that
+ connect to acpid via sockets. DBUS should be a nicer interface.
+ - Implement with a build-time option to turn it on/off? This way users
+ can reduce the dependencies if they want. Or can we detect the presence
+ of DBUS at runtime?
+
+* Allow socket-connected clients to filter incoming events
+ - This might be useful on older laptops that used to generate a slew
+ of events. I think that on modern hardware, this is not needed.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/config.h new/acpid-2.0.16/config.h
--- old/acpid-2.0.15/config.h 2012-03-15 14:28:23.000000000 +0100
+++ new/acpid-2.0.16/config.h 2012-03-29 14:35:38.000000000 +0200
@@ -7,18 +7,30 @@
/* Define to 1 if you have the header file. */
#define HAVE_ARPA_INET_H 1
-/* Define to 1 if your system has a working `chown' function. */
-#define HAVE_CHOWN 1
+/* "Define if asprintf() exists" */
+#define HAVE_ASPRINTF 1
/* Define to 1 if you have the `dup2' function. */
#define HAVE_DUP2 1
+/* "Define if fchmod() exists" */
+#define HAVE_FCHMOD 1
+
+/* "Define if fchown() exists" */
+#define HAVE_FCHOWN 1
+
/* Define to 1 if you have the header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1
+/* "Define if fstat() exists" */
+#define HAVE_FSTAT 1
+
+/* "Define if fstatat() exists" */
+#define HAVE_FSTATAT 1
+
/* Define to 1 if you have the header file. */
#define HAVE_INTTYPES_H 1
@@ -38,6 +50,9 @@
/* Define to 1 if you have the header file. */
#define HAVE_NETINET_IN_H 1
+/* "Define if openat() exists" */
+#define HAVE_OPENAT 1
+
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#define HAVE_REALLOC 1
@@ -121,7 +136,7 @@
#define PACKAGE_NAME "acpid"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "acpid 2.0.15"
+#define PACKAGE_STRING "acpid 2.0.16"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "acpid"
@@ -130,7 +145,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "2.0.15"
+#define PACKAGE_VERSION "2.0.16"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
@@ -158,7 +173,7 @@
/* Version number of package */
-#define VERSION "2.0.15"
+#define VERSION "2.0.16"
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
@@ -176,9 +191,6 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */
-/* Define to `int' if doesn't define. */
-/* #undef gid_t */
-
/* Define to rpl_malloc if the replacement function should be used. */
/* #undef malloc */
@@ -197,8 +209,5 @@
/* Define to `int' if does not define. */
/* #undef ssize_t */
-/* Define to `int' if doesn't define. */
-/* #undef uid_t */
-
/* Define as `fork' if `vfork' does not work. */
/* #undef vfork */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/config.h.in new/acpid-2.0.16/config.h.in
--- old/acpid-2.0.15/config.h.in 2012-03-15 14:27:59.000000000 +0100
+++ new/acpid-2.0.16/config.h.in 2012-03-29 14:35:28.000000000 +0200
@@ -6,18 +6,30 @@
/* Define to 1 if you have the header file. */
#undef HAVE_ARPA_INET_H
-/* Define to 1 if your system has a working `chown' function. */
-#undef HAVE_CHOWN
+/* "Define if asprintf() exists" */
+#undef HAVE_ASPRINTF
/* Define to 1 if you have the `dup2' function. */
#undef HAVE_DUP2
+/* "Define if fchmod() exists" */
+#undef HAVE_FCHMOD
+
+/* "Define if fchown() exists" */
+#undef HAVE_FCHOWN
+
/* Define to 1 if you have the header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
+/* "Define if fstat() exists" */
+#undef HAVE_FSTAT
+
+/* "Define if fstatat() exists" */
+#undef HAVE_FSTATAT
+
/* Define to 1 if you have the header file. */
#undef HAVE_INTTYPES_H
@@ -37,6 +49,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_NETINET_IN_H
+/* "Define if openat() exists" */
+#undef HAVE_OPENAT
+
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#undef HAVE_REALLOC
@@ -175,9 +190,6 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
-/* Define to `int' if doesn't define. */
-#undef gid_t
-
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
@@ -196,8 +208,5 @@
/* Define to `int' if does not define. */
#undef ssize_t
-/* Define to `int' if doesn't define. */
-#undef uid_t
-
/* Define as `fork' if `vfork' does not work. */
#undef vfork
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/configure new/acpid-2.0.16/configure
--- old/acpid-2.0.15/configure 2012-03-15 14:27:59.000000000 +0100
+++ new/acpid-2.0.16/configure 2012-03-29 14:35:27.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for acpid 2.0.15.
+# Generated by GNU Autoconf 2.68 for acpid 2.0.16.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -557,8 +557,8 @@
# Identity of this package.
PACKAGE_NAME='acpid'
PACKAGE_TARNAME='acpid'
-PACKAGE_VERSION='2.0.15'
-PACKAGE_STRING='acpid 2.0.15'
+PACKAGE_VERSION='2.0.16'
+PACKAGE_STRING='acpid 2.0.16'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1255,7 +1255,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures acpid 2.0.15 to adapt to many kinds of systems.
+\`configure' configures acpid 2.0.16 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1325,7 +1325,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of acpid 2.0.15:";;
+ short | recursive ) echo "Configuration of acpid 2.0.16:";;
esac
cat <<\_ACEOF
@@ -1417,7 +1417,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-acpid configure 2.0.15
+acpid configure 2.0.16
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1836,7 +1836,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by acpid $as_me 2.0.15, which was
+It was created by acpid $as_me 2.0.16, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2654,7 +2654,7 @@
# Define the identity of the package.
PACKAGE='acpid'
- VERSION='2.0.15'
+ VERSION='2.0.16'
cat >>confdefs.h <<_ACEOF
@@ -5005,101 +5005,6 @@
# Checks for library functions.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1; then :
- ac_cv_type_uid_t=yes
-else
- ac_cv_type_uid_t=no
-fi
-rm -f conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
-if test $ac_cv_type_uid_t = no; then
-
-$as_echo "#define uid_t int" >>confdefs.h
-
-
-$as_echo "#define gid_t int" >>confdefs.h
-
-fi
-
-for ac_header in unistd.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
-if test "x$ac_cv_header_unistd_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_UNISTD_H 1
-_ACEOF
-
-fi
-
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
-$as_echo_n "checking for working chown... " >&6; }
-if ${ac_cv_func_chown_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_chown_works=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-#include
-
-int
-main ()
-{
- char *f = "conftest.chown";
- struct stat before, after;
-
- if (creat (f, 0600) < 0)
- return 1;
- if (stat (f, &before) < 0)
- return 1;
- if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
- return 1;
- if (stat (f, &after) < 0)
- return 1;
- return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_chown_works=yes
-else
- ac_cv_func_chown_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-rm -f conftest.chown
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
-$as_echo "$ac_cv_func_chown_works" >&6; }
-if test $ac_cv_func_chown_works = yes; then
-
-$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
-
-fi
-
for ac_header in vfork.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
@@ -5575,6 +5480,61 @@
esac
+ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
+if test "x$ac_cv_func_fchown" = xyes; then :
+
+$as_echo "#define HAVE_FCHOWN 1" >>confdefs.h
+
+else
+ as_fn_error $? "\"fchown() not found\"" "$LINENO" 5
+fi
+
+ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
+if test "x$ac_cv_func_fchmod" = xyes; then :
+
+$as_echo "#define HAVE_FCHMOD 1" >>confdefs.h
+
+else
+ as_fn_error $? "\"fchmod() not found\"" "$LINENO" 5
+fi
+
+ac_fn_c_check_func "$LINENO" "fstat" "ac_cv_func_fstat"
+if test "x$ac_cv_func_fstat" = xyes; then :
+
+$as_echo "#define HAVE_FSTAT 1" >>confdefs.h
+
+else
+ as_fn_error $? "\"fstat() not found\"" "$LINENO" 5
+fi
+
+ac_fn_c_check_func "$LINENO" "fstatat" "ac_cv_func_fstatat"
+if test "x$ac_cv_func_fstatat" = xyes; then :
+
+$as_echo "#define HAVE_FSTATAT 1" >>confdefs.h
+
+else
+ as_fn_error $? "\"fstatat() not found\"" "$LINENO" 5
+fi
+
+ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat"
+if test "x$ac_cv_func_openat" = xyes; then :
+
+$as_echo "#define HAVE_OPENAT 1" >>confdefs.h
+
+else
+ as_fn_error $? "\"openat() not found\"" "$LINENO" 5
+fi
+
+ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf"
+if test "x$ac_cv_func_asprintf" = xyes; then :
+
+$as_echo "#define HAVE_ASPRINTF 1" >>confdefs.h
+
+else
+ as_fn_error $? "\"asprintf() not found\"" "$LINENO" 5
+fi
+
+# These are actually required. Should switch to above form.
for ac_func in alarm dup2 memset regcomp select socket strcasecmp strdup strerror strrchr strtol
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -6133,7 +6093,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by acpid $as_me 2.0.15, which was
+This file was extended by acpid $as_me 2.0.16, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6199,7 +6159,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-acpid config.status 2.0.15
+acpid config.status 2.0.16
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/configure.ac new/acpid-2.0.16/configure.ac
--- old/acpid-2.0.15/configure.ac 2012-02-17 04:18:45.000000000 +0100
+++ new/acpid-2.0.16/configure.ac 2012-03-20 17:58:45.000000000 +0100
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.60])
-AC_INIT([acpid], [2.0.15])
+AC_INIT([acpid], [2.0.16])
AC_CONFIG_SRCDIR([connection_list.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
@@ -30,11 +30,17 @@
AC_TYPE_SSIZE_T
# Checks for library functions.
-AC_FUNC_CHOWN
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STRNLEN
+AC_CHECK_FUNC(fchown, AC_DEFINE(HAVE_FCHOWN, 1, "Define if fchown() exists"), AC_MSG_ERROR(["fchown() not found"]))
+AC_CHECK_FUNC(fchmod, AC_DEFINE(HAVE_FCHMOD, 1, "Define if fchmod() exists"), AC_MSG_ERROR(["fchmod() not found"]))
+AC_CHECK_FUNC(fstat, AC_DEFINE(HAVE_FSTAT, 1, "Define if fstat() exists"), AC_MSG_ERROR(["fstat() not found"]))
+AC_CHECK_FUNC(fstatat, AC_DEFINE(HAVE_FSTATAT, 1, "Define if fstatat() exists"), AC_MSG_ERROR(["fstatat() not found"]))
+AC_CHECK_FUNC(openat, AC_DEFINE(HAVE_OPENAT, 1, "Define if openat() exists"), AC_MSG_ERROR(["openat() not found"]))
+AC_CHECK_FUNC(asprintf, AC_DEFINE(HAVE_ASPRINTF, 1, "Define if asprintf() exists"), AC_MSG_ERROR(["asprintf() not found"]))
+# These are actually required. Should switch to above form.
AC_CHECK_FUNCS([alarm dup2 memset regcomp select socket strcasecmp strdup strerror strrchr strtol])
# removed for now as kacpimon was not included in dist target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/input_layer.c new/acpid-2.0.16/input_layer.c
--- old/acpid-2.0.15/input_layer.c 2012-03-04 14:50:41.000000000 +0100
+++ new/acpid-2.0.16/input_layer.c 2012-03-22 14:24:25.000000000 +0100
@@ -55,6 +55,7 @@
/* Event Table: Events we are interested in and their strings. Use
evtest.c, acpi_genl, or kacpimon to find new events to add to this
table. */
+
static struct evtab_entry evtab[] = {
{{{0,0}, EV_KEY, KEY_POWER, 1}, "button/power PBTN 00000080 00000000"},
{{{0,0}, EV_KEY, KEY_SUSPEND, 1},
@@ -103,6 +104,35 @@
{{{0,0}, EV_MSC, 4, 18}, "button/fnpgdown FNPGDOWN 00000080 00000000"},
#endif
+/* This test probably belongs in configure.ac. */
+#ifdef SW_HEADPHONE_INSERT
+ #ifndef SW_LINEIN_INSERT
+ #define SW_LINEIN_INSERT 0x0d
+ #endif
+ {{{0,0}, EV_SW, SW_HEADPHONE_INSERT, 0},
+ "jack/headphone HEADPHONE unplug"},
+ {{{0,0}, EV_SW, SW_HEADPHONE_INSERT, 1},
+ "jack/headphone HEADPHONE plug"},
+ {{{0,0}, EV_SW, SW_MICROPHONE_INSERT, 0},
+ "jack/microphone MICROPHONE unplug"},
+ {{{0,0}, EV_SW, SW_MICROPHONE_INSERT, 1},
+ "jack/microphone MICROPHONE plug"},
+ {{{0,0}, EV_SW, SW_LINEOUT_INSERT, 0},
+ "jack/lineout LINEOUT unplug"},
+ {{{0,0}, EV_SW, SW_LINEOUT_INSERT, 1},
+ "jack/lineout LINEOUT plug"},
+ {{{0,0}, EV_SW, SW_VIDEOOUT_INSERT, 0},
+ "jack/videoout VIDEOOUT unplug"},
+ {{{0,0}, EV_SW, SW_VIDEOOUT_INSERT, 1},
+ "jack/videoout VIDEOOUT plug"},
+ {{{0,0}, EV_SW, SW_LINEIN_INSERT, 0},
+ "jack/linein LINEIN unplug"},
+ {{{0,0}, EV_SW, SW_LINEIN_INSERT, 1},
+ "jack/linein LINEIN plug"},
+#else
+ #warning SW_HEADPHONE_INSERT not found in input_layer.h. Support for plug/unplug events will be disabled. Please upgrade your kernel headers to Linux-3.2 or newer.
+#endif
+
{{{0,0}, EV_KEY, KEY_ZOOM, 1}, "button/zoom ZOOM 00000080 00000000"},
/* typical events file has "video.* 00000087" */
{{{0,0}, EV_KEY, KEY_BRIGHTNESSDOWN, 1},
@@ -137,7 +167,7 @@
{{{0,0}, EV_KEY, KEY_BRIGHTNESS_ZERO, 1},
"video/brightnesszero BZRO 00000088 00000000"},
{{{0,0}, EV_KEY, KEY_DISPLAY_OFF, 1},
- "video/displayoff DOFF 00000089 00000000"}
+ "video/displayoff DOFF 00000089 00000000"}
};
/*----------------------------------------------------------------------*/
@@ -149,7 +179,9 @@
unsigned i;
/* for each entry in the event table */
- /* ??? is there a faster way? */
+ /* ??? Is there a faster way? This is triggered every time the user
+ * presses a key. Maybe a simple hash algorithm? Or a simple check
+ * for very common keys (alphanumeric) and bail before this? */
for (i = 0; i < DIM(evtab); ++i)
{
/* if this is a matching event, return its string */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/sock.c new/acpid-2.0.16/sock.c
--- old/acpid-2.0.15/sock.c 2012-02-24 23:24:04.000000000 +0100
+++ new/acpid-2.0.16/sock.c 2012-03-21 00:58:11.000000000 +0100
@@ -111,20 +111,13 @@
/* ??? Move CLOEXEC and NONBLOCK settings below up to here? */
} else {
/* create our own socket */
- fd = ud_create_socket(socketfile);
+ fd = ud_create_socket(socketfile, socketmode);
if (fd < 0) {
acpid_log(LOG_ERR, "can't open socket %s: %s",
socketfile, strerror(errno));
exit(EXIT_FAILURE);
}
- if (fchmod(fd, socketmode) < 0) {
- close(fd);
- acpid_log(LOG_ERR, "chmod() on socket %s: %s",
- socketfile, strerror(errno));
- return;
- }
-
/* if we need to change the socket's group, do so */
if (socketgroup) {
struct group *gr;
@@ -140,7 +133,11 @@
socketfile, strerror(errno));
exit(EXIT_FAILURE);
}
- if (fchown(fd, buf.st_uid, gr->gr_gid) < 0) {
+ /* ??? I've tried using fchown(), however it doesn't work here.
+ * It also doesn't work before bind(). The GNU docs seem to
+ * indicate it isn't supposed to work with sockets. */
+ /* if (fchown(fd, buf.st_uid, gr->gr_gid) < 0) { */
+ if (chown(socketfile, buf.st_uid, gr->gr_gid) < 0) {
acpid_log(LOG_ERR, "can't chown %s: %s",
socketfile, strerror(errno));
exit(EXIT_FAILURE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/ud_socket.c new/acpid-2.0.16/ud_socket.c
--- old/acpid-2.0.15/ud_socket.c 2012-03-04 14:50:41.000000000 +0100
+++ new/acpid-2.0.16/ud_socket.c 2012-03-21 00:58:19.000000000 +0100
@@ -23,7 +23,7 @@
#include "ud_socket.h"
int
-ud_create_socket(const char *name)
+ud_create_socket(const char *name, mode_t socketmode)
{
int fd;
int r;
@@ -46,6 +46,16 @@
return fd;
}
+ /* Clear the umask to guarantee predictable results from fchmod(). */
+ umask(0);
+
+ if (fchmod(fd, socketmode) < 0) {
+ close(fd);
+ acpid_log(LOG_ERR, "fchmod() on socket %s: %s",
+ name, strerror(errno));
+ return -1;
+ }
+
/* setup address struct */
memset(&uds_addr, 0, sizeof(uds_addr));
uds_addr.sun_family = AF_UNIX;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/acpid-2.0.15/ud_socket.h new/acpid-2.0.16/ud_socket.h
--- old/acpid-2.0.15/ud_socket.h 2009-04-29 16:36:29.000000000 +0200
+++ new/acpid-2.0.16/ud_socket.h 2012-03-21 00:54:18.000000000 +0100
@@ -8,7 +8,7 @@
#include
#include
-int ud_create_socket(const char *name);
+int ud_create_socket(const char *name, mode_t socketmode);
int ud_accept(int sock, struct ucred *cred);
int ud_connect(const char *name);
int ud_get_peercred(int fd, struct ucred *cred);
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org