Hello community,
here is the log from the commit of package suspend
checked in at Wed Jan 23 23:50:45 CET 2008.
--------
--- arch/i386/suspend/suspend.changes 2008-01-15 19:53:02.000000000 +0100
+++ /mounts/work_src_done/STABLE/suspend/suspend.changes 2008-01-21 21:02:37.000000000 +0100
@@ -1,0 +2,8 @@
+Mon Jan 21 21:01:43 CET 2008 - seife@suse.de
+
+- update to suspend-0.80
+ - buildsystem conversion to autoconf
+ - huge whitelist update for s2ram
+ - ppc support
+
+-------------------------------------------------------------------
Old:
----
suspend-0.69.9-glib.diff
suspend-0.69.9.tar.bz2
suspend-0.70-speedup-image-writing.diff
suspend-input.diff
suspend-s2ram-DellXPSM1330.diff
suspend-s2ram-HPnc6320.diff
suspend-s2ram-LenovoX60Tablet.diff
suspend-s2ram-LenovoX61Tablet.diff
suspend-s2ram-several_SonyVaio.diff
suspend-s2ram-suspend-fbcon.diff
New:
----
suspend-0.80-glib-linkeropts.diff
suspend-0.80-input.diff
suspend-0.80-splashy-configurefix.diff
suspend-0.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ suspend.spec ++++++
--- /var/tmp/diff_new_pack.Dv6146/_old 2008-01-23 23:41:14.000000000 +0100
+++ /var/tmp/diff_new_pack.Dv6146/_new 2008-01-23 23:41:14.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package suspend (Version 0.69.9)
+# spec file for package suspend (Version 0.80)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,30 +11,27 @@
# norootforbuild
Name: suspend
-BuildRequires: glib2-devel gnutls-devel libx86-devel lzo-devel pciutils-devel pkgconfig splashy-devel
-Version: 0.69.9
-Release: 53
+BuildRequires: glib2-devel gnutls-devel lzo-devel pciutils-devel pkgconfig splashy-devel
+%ifarch %ix86 x86_64
+BuildRequires: libx86-devel
+%endif
+Version: 0.80
+Release: 1
Summary: A Set Of Tools To Support Sleep Modes
License: GPL v2 or later
Url: http://sourceforge.net/projects/suspend
Group: System/Console
-Source: %name-%version.tar.bz2
+Source: %name-0.8.tar.bz2
Source3: README.scripts
Patch1: suspend-comment-configfile-options.diff
Patch2: suspend-susescripts.diff
Patch3: suspend-default-compress.diff
Patch4: suspend-disable-bootsplash.diff
-Patch5: suspend-s2ram-suspend-fbcon.diff
+Patch5: suspend-default-splash.diff
Patch6: suspend-0.70-dont-return-eintr-on-abort.diff
-Patch7: suspend-input.diff
-Patch8: suspend-default-splash.diff
-Patch9: suspend-0.70-speedup-image-writing.diff
-Patch10: suspend-s2ram-HPnc6320.diff
-Patch11: suspend-s2ram-LenovoX61Tablet.diff
-Patch12: suspend-s2ram-several_SonyVaio.diff
-Patch13: suspend-s2ram-LenovoX60Tablet.diff
-Patch14: suspend-s2ram-DellXPSM1330.diff
-Patch15: suspend-0.69.9-glib.diff
+Patch10: suspend-0.80-input.diff
+Patch11: suspend-0.80-splashy-configurefix.diff
+Patch12: suspend-0.80-glib-linkeropts.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
Supplements: powersave
@@ -53,46 +50,34 @@
and others.
%prep
-%setup -q
+%setup -q -n suspend-0.8
%patch1 -p0
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p0
%patch6 -p0
-%patch7 -p2
-%patch8 -p0
-%patch9 -p1
-%patch10 -p0
+%patch10 -p2
%patch11 -p0
%patch12 -p0
-%patch13 -p0
-%patch14 -p0
-%patch15 -p0
cp %{S:3} scripts/
#cp -vb --suffix=-0.5 %{S:99} whitelist.c
%build
-make ARCH=x86 \
- SUSPEND_DIR=/usr/sbin \
- RESUME_DIR=/usr/sbin \
- CFLAGS="$RPM_OPT_FLAGS" \
- CONFIG_COMPRESS=yes \
- CONFIG_ENCRYPT=yes \
- CONFIG_UDEV=yes \
- CONFIG_SPLASHY=yes \
- CONFIG_RESUME_DYN=yes
+export CFLAGS="$RPM_OPT_FLAGS"
+# autoreconf -fi
+./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --docdir=/usr/share/doc/packages/suspend \
+ --with-initramfsdir=/usr/sbin \
+ --enable-compress \
+ --enable-encrypt \
+ --enable-splashy \
+ --disable-resume-static
+make
%install
-make install ARCH=%_arch \
- DESTDIR=$RPM_BUILD_ROOT \
- SUSPEND_DIR=/usr/sbin \
- RESUME_DIR=/usr/sbin \
- CONFIG_COMPRESS=yes \
- CONFIG_ENCRYPT=yes \
- CONFIG_UDEV=yes \
- CONFIG_SPLASHY=yes \
- CONFIG_RESUME_DYN=yes
+make install DESTDIR=$RPM_BUILD_ROOT
touch $RPM_BUILD_ROOT/etc/suspend.key
%clean
@@ -123,6 +108,11 @@
%endif
%changelog
+* Mon Jan 21 2008 seife@suse.de
+- update to suspend-0.80
+ - buildsystem conversion to autoconf
+ - huge whitelist update for s2ram
+ - ppc support
* Tue Jan 15 2008 hmacht@suse.de
- Changes needed because of splashy update:
- add suspend-0.69.9-glib.diff
++++++ suspend-0.80-glib-linkeropts.diff ++++++
--- Makefile.am
+++ Makefile.am
@@ -69,7 +69,7 @@
if ENABLE_SPLASHY
AM_CFLAGS+=\
- ${SPLASHY_CFLAGS}
+ ${SPLASHY_CFLAGS} $(shell pkg-config --cflags glib-2.0)
common_s2disk_libs+=\
${SPLASHY_LIBS}
endif
++++++ suspend-0.80-input.diff ++++++
--- BUILD/suspend-0.8/splash.c
+++ BUILD/suspend-0.8/splash.c
@@ -14,6 +14,15 @@
#include
#include
#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include "splash.h"
#include "bootsplash.h"
@@ -21,6 +30,14 @@
#include "fbsplash_funcs.h"
#include "encrypt.h"
+#define INPUT_PATH "/dev/input/by-path"
+#define MAX_INPUT_FD 8
+static struct {
+ int fds[MAX_INPUT_FD];
+ int count;
+ int highest;
+} input_fds;
+
/**
* dummy functions in case if no splash system was found or
* bootsplashing is disabled
@@ -56,11 +73,42 @@
static char key_pressed(void)
{
- char c;
- if (read(0, &c, 1) == 0)
+ int err, i, active;
+ struct input_event ev;
+ struct timeval timeout = {0, 0};
+ fd_set fds;
+
+ if (!input_fds.count)
+ return 0;
+
+ active = -1; /* GCC STFU */
+ FD_ZERO(&fds);
+ for (i = 0; i < input_fds.count; i++)
+ FD_SET(input_fds.fds[i], &fds);
+
+ err = select(input_fds.highest + 1, &fds, NULL, NULL, &timeout);
+ if (err < 0) {
+ perror("select()");
+ return 0;
+ }
+ if (err == 0)
return 0;
- return c;
+ /* Get only the fist active fd */
+ for (i = 0; i < input_fds.count; i++) {
+ if (FD_ISSET(input_fds.fds[i], &fds)) {
+ active = input_fds.fds[i];
+ break;
+ }
+ }
+
+ while ((err = read(active, &ev, sizeof(struct input_event))) != -1) {
+ /* we only need key release events */
+ if (ev.type == EV_KEY && ev.value == 0)
+ return ev.code;
+ }
+
+ return 0;
}
static void restore_abort(struct termios *oldtrm)
@@ -68,6 +116,49 @@
tcsetattr(0, TCSANOW, oldtrm);
}
+static int open_input_fd(void)
+{
+ int fd, i;
+ struct dirent *it;
+ DIR *dir;
+ char input_dev[PATH_MAX];
+ int err = 0;
+
+ if (!(dir = opendir(INPUT_PATH))) {
+ perror("Cannot open input directory");
+ return -1;
+ }
+
+ i = 0;
+ while ((it = readdir(dir))) {
+ if (i == MAX_INPUT_FD)
+ break;
+
+ if (!strstr(it->d_name, "-event-kbd"))
+ continue;
+
+ sprintf(input_dev, "%s/%s", INPUT_PATH, it->d_name);
+
+ fd = open(input_dev, O_RDONLY|O_NONBLOCK);
+ if (fd == -1) {
+ perror("opening input fd");
+ continue;
+ }
+ input_fds.fds[i++] = fd;
+ input_fds.count++;
+ if (fd > input_fds.highest)
+ input_fds.highest = fd;
+ }
+
+ if (!it && errno) {
+ perror("readdir()");
+ err = -errno;
+ }
+ closedir(dir);
+
+ return err;
+}
+
/* Tries to find a splash system and initializes interface functions */
void splash_prepare(struct splash *splash, int mode)
{
@@ -84,6 +175,10 @@
splash->restore_abort = restore_abort;
splash->key_pressed = key_pressed;
splash->set_caption = splash_dummy_set_caption;
+
+ if (open_input_fd())
+ fprintf(stderr, "Could not open keyboard input device\n");
+
if (!mode)
return;
--- BUILD/suspend-0.8/suspend.c
+++ BUILD/suspend-0.8/suspend.c
@@ -489,7 +489,7 @@
unsigned int nr_pages)
{
unsigned int m, writeout_rate;
- int ret, abort_possible;
+ int ret, abort_possible, key;
struct termios newtrm, savedtrm;
int error = 0;
char message[SPLASH_GENERIC_MESSAGE_SIZE];
@@ -530,7 +530,8 @@
printf("\b\b\b\b%3d%%", nr_pages / m);
splash.progress(20 + (nr_pages / m) * 0.75);
- switch (splash.key_pressed()) {
+ while ((key = splash.key_pressed()) > 0) {
+ switch (key) {
case ABORT_KEY_CODE:
if (abort_possible) {
printf(" aborted!\n");
@@ -545,6 +546,7 @@
shutdown_method =
SHUTDOWN_METHOD_REBOOT;
break;
+ }
}
}
--- BUILD/suspend-0.8/swsusp.h
+++ BUILD/suspend-0.8/swsusp.h
@@ -198,7 +198,7 @@
#define SUSPEND_SWAPPINESS 100
-#define ABORT_KEY_CODE 127
+#define ABORT_KEY_CODE 14
#define ABORT_KEY_NAME "backspace"
-#define REBOOT_KEY_CODE 'r'
+#define REBOOT_KEY_CODE 19
#define REBOOT_KEY_NAME "r"
++++++ suspend-0.80-splashy-configurefix.diff ++++++
--- configure
+++ configure
@@ -20826,9 +20826,9 @@
if test -z "${SPLASHY_LIBS}"; then
- { echo "$as_me:$LINENO: checking for splashy_open in -lsplashy" >&5
-echo $ECHO_N "checking for splashy_open in -lsplashy... $ECHO_C" >&6; }
-if test "${ac_cv_lib_splashy_splashy_open+set}" = set; then
+ { echo "$as_me:$LINENO: checking for splashy_init in -lsplashy" >&5
+echo $ECHO_N "checking for splashy_init in -lsplashy... $ECHO_C" >&6; }
+if test "${ac_cv_lib_splashy_splashy_init+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -20846,11 +20846,11 @@
#ifdef __cplusplus
extern "C"
#endif
-char splashy_open ();
+char splashy_init ();
int
main ()
{
-return splashy_open ();
+return splashy_init ();
;
return 0;
}
@@ -20873,21 +20873,21 @@
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
- ac_cv_lib_splashy_splashy_open=yes
+ ac_cv_lib_splashy_splashy_init=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_splashy_splashy_open=no
+ ac_cv_lib_splashy_splashy_init=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_splashy_splashy_open" >&5
-echo "${ECHO_T}$ac_cv_lib_splashy_splashy_open" >&6; }
-if test $ac_cv_lib_splashy_splashy_open = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_splashy_splashy_init" >&5
+echo "${ECHO_T}$ac_cv_lib_splashy_splashy_init" >&6; }
+if test $ac_cv_lib_splashy_splashy_init = yes; then
SPLASHY_LIBS="-lsplashy"
else
{ { echo "$as_me:$LINENO: error: Required libsplashy was not found" >&5
--- configure.ac
+++ configure.ac
@@ -220,7 +220,7 @@
AC_ARG_VAR([SPLASHY_LIBS], [linker flags for libsplashy])
AC_CHECK_LIB(
[splashy],
- [splashy_open],
+ [splashy_init],
[SPLASHY_LIBS="-lsplashy"],
[AC_MSG_ERROR([Required libsplashy was not found])]
)
++++++ suspend-0.69.9.tar.bz2 -> suspend-0.8.tar.bz2 ++++++
++++ 49574 lines of diff (skipped)
++++++ suspend-default-splash.diff ++++++
--- /var/tmp/diff_new_pack.Dv6146/_old 2008-01-23 23:41:15.000000000 +0100
+++ /var/tmp/diff_new_pack.Dv6146/_new 2008-01-23 23:41:15.000000000 +0100
@@ -1,6 +1,6 @@
--- resume.c
+++ resume.c
-@@ -851,10 +851,10 @@
+@@ -882,10 +882,10 @@
if (error)
return -error;
@@ -16,7 +16,7 @@
buffer_size = BUFFER_PAGES * page_size;
--- suspend.c
+++ suspend.c
-@@ -1389,10 +1391,10 @@
+@@ -1423,10 +1423,10 @@
if (do_encrypt != 'y' && do_encrypt != 'Y')
do_encrypt = 0;
#endif
@@ -30,4 +30,3 @@
if (early_writeout != 'n' && early_writeout != 'N')
early_writeout = 1;
-
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org