File suspend.spec of Package suspend
#
# spec file for package suspend (Version 0.80.MACRO)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: suspend
BuildRequires: glib2-devel gnutls-devel pciutils-devel pkgconfig
%if 0%{?suse_version} > 1020
BuildRequires: splashy-devel
%endif
%if 0%{?mandriva_version}
BuildRequires: liblzo-devel
%else
BuildRequires: lzo-devel
%endif
%ifarch %ix86 x86_64
BuildRequires: libx86-devel
%endif
%define CVSDATE 20081103
Version: 0.80.%{CVSDATE}
Release: 1
%define tarversion 0.8.%{CVSDATE}
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-%{tarversion}.tar.bz2
Source2: configure-suspend-encryption.sh
Source3: README.scripts
Source4: mkinitrd-boot.kernel.sh
Source5: mkinitrd-boot.userspace.sh
Patch1: suspend-comment-configfile-options.diff
Patch2: suspend-susescripts.diff
Patch3: suspend-default-compress.diff
Patch4: suspend-disable-bootsplash.diff
Patch5: suspend-default-splash.diff
Patch6: suspend-0.80-dont-return-eintr-on-abort.diff
Patch7: suspend-0.80-fix-s2both-resume-hacks.diff
Patch10: suspend-0.80-keygen-new-defaults.diff
Patch11: suspend-0.80-make-whitelist-test.diff
Patch12: suspend-buildfixes.diff
Patch13: suspend-0.80-vbetool-retry-on-errors.diff
Patch16: suspend-splash-verbose-debug.diff
Patch99: suspend-0.80-opensuse.org.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ppc ppc64
%if 0%{?suse_version}
Supplements: powersave
%endif
%description
A set of tools to support suspending notebooks, working around the
specific problems each machine has.
Authors:
--------
Pavel Machek <pavel@suse.cz>
Rafael J. Wysocki <rjw@sisk.pl>
and others.
%prep
%setup -q -n suspend-%{tarversion}
%patch1 -p1
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p0
%patch6 -p1
%patch7 -p1
%patch10 -p1
%patch11 -p0
%patch12 -p0
%patch13 -p0
%patch16 -p1
%patch99 -p1
cp %{S:3} scripts/
#cp -vb --suffix=-0.5 %{S:99} whitelist.c
%build
export CFLAGS="$RPM_OPT_FLAGS"
autoreconf -fi
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-initramfsdir=/usr/sbin \
--enable-encrypt \
%if 0%{?suse_version} > 1020
--enable-splashy \
--disable-resume-static \
%endif
--enable-threads \
%if 0%{?suse_version} > 1010
--docdir=%{_docdir}/%{name} \
%else
--datadir=/usr/share \
%endif
--enable-compress
make
%install
make install DESTDIR=$RPM_BUILD_ROOT
%if 0%{?suse_version} > 1100
install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts
install -m 755 %{S:4} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-resume.kernel.sh
install -m 755 %{S:5} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-resume.userspace.sh
%endif
install -m 755 %{S:2} $RPM_BUILD_ROOT/usr/sbin/
touch $RPM_BUILD_ROOT/etc/suspend.key
%clean
rm -rf $RPM_BUILD_ROOT
%post
%if 0%{?suse_version} > 1100
if [ -x /sbin/mkinitrd_setup ] ; then
mkinitrd_setup
fi
%endif
if [ "$YAST_IS_RUNNING" != "instsys" -a \
! -e /.buildenv -a \
-x /sbin/update-bootloader -a \
-x /sbin/mkinitrd ]; then
/sbin/mkinitrd
/sbin/update-bootloader --refresh
fi
%if 0%{?suse_version} > 1100
%postun
if [ -x /sbin/mkinitrd_setup ] ; then
mkinitrd_setup
fi
%endif
%files
%defattr (-,root,root)
%config /etc/suspend.conf
%if 0%{?suse_version} > 1100
%dir /lib/mkinitrd
%dir /lib/mkinitrd/scripts
/lib/mkinitrd/scripts/boot-resume.kernel.sh
/lib/mkinitrd/scripts/boot-resume.userspace.sh
%endif
%ghost %config(noreplace) /etc/suspend.key
/usr/sbin/s2disk
/usr/sbin/s2ram
/usr/sbin/s2both
/usr/sbin/resume
/usr/sbin/suspend-keygen
/usr/sbin/swap-offset
/usr/sbin/configure-suspend-encryption.sh
%doc README README.s2ram-whitelist README.encryption HOWTO COPYING conf/suspend.conf
%if %suse_version < 1020
%doc doc/installation-on-SUSE-10.1.txt scripts/
%endif
%changelog
* Fri Nov 07 2008 seife@suse.de
- update to current CVS:
- whitelist update, add 4 HP workstations (bnc#436284)
- add missing error check to prevent a segfault when running
without sufficient privileges (bnc#439337)
* Wed Oct 22 2008 bwalle@suse.de
- Don't display an error message in initrd when a kernel without
the SUSE splash patch was used.
* Fri Oct 17 2008 seife@suse.de
- update to todays CVS (only whitelist updates)
* Tue Oct 14 2008 seife@suse.de
- add ExclusiveArch ix86 x86_64 ppc ppc64
* Mon Oct 13 2008 seife@suse.de
- fix s2both resume from RAM when quirks are needed
* Wed Sep 10 2008 seife@suse.de
- update to todays CVS which features:
- updated s2ram whitelist
- multithreaded image saving now upstream
- keyboard handling patch now upstream
- removed verbose logging, code not yet ported to new upstream
- changed defaults for suspend-keygen, added "-q" option
- added a script for easier setup of encrypted suspend called
configure-suspend-encryption.sh (fate#100243)
* Wed Sep 03 2008 hare@suse.de
- Call mkinitrd_setup during %%post and %%postun (bnc#413709)
* Wed Jul 23 2008 hare@suse.de
- Include mkinitrd scriptlets.
* Tue Jun 24 2008 seife@suse.de
- fix segfault when s2disk is invoked without parameters
* Thu Jun 12 2008 seife@suse.de
- update to current CVS
- many patches included upstream
- refactoring of image loading code, so that the image can be
verified during suspend (debugging option)
- add experimental patch for multithreaded image saving, improves
speed hugely, especially if encryption is used
- refresh most of the patches
* Tue Jun 10 2008 seife@suse.de
- fix image size calculation for the case of uncompressible data
- whitelist update for s2ram (CVS as of today)
* Wed Jun 04 2008 seife@suse.de
- add a fix from Rafael J Wysocki for a resume failure when using
encryption. See:
http://article.gmane.org/gmane.linux.kernel.suspend.devel/5393
* Mon May 26 2008 seife@suse.de
- add fixes from CVS for a possible endless loop in the new memory
allocator code and a bug in the image saving code
* Fri May 23 2008 seife@suse.de
- update to current CVS:
- whitelist update
- make resume_pause work correctly (ENTER to continue...)
- more verbose logging to stderr -> pm-utils logfile
- remove bogus "readdir(): Inappropriate ioctl for device" message
- make vbetool more verbose when retrying and sleep between retries
- add openSUSE 11.0 whitelist quirks for kernel 2.6.25 (bnc#387956)
* Tue May 20 2008 seife@suse.de
- update to current CVS:
- new memory allocator code - faster and cleaner
- various small code cleanups
- whitelist update
* Thu May 15 2008 seife@suse.de
- update to current CVS:
- the save-compressed-images-faster patch is upstream
- whitelist update for s2ram, fixing various novell bugzillas
* Tue May 06 2008 seife@suse.de
- update to current CVS:
- use the new ioctls present in kernel 2.6.25
- whitelist update
- refreshed some of the patches
- added suspend-0.80-vbetool-retry-on-errors.diff to workaround
temporary vbetool failures
- added suspend-0.80.080506-save-compressed-images-faster.diff
which greatly improves the speed of compressed s2disk
* Wed Apr 16 2008 seife@suse.de
- update to current CVS:
- huge whitelist update for s2ram
- libgcc_s fix is upstream
- minor cleanups in the build system
- specfile more buildservice-friendly
* Mon Feb 25 2008 hmacht@suse.de
- add patch suspend-build-with-gcc_s.diff:
- this makes splashy actually work again
* Tue Feb 19 2008 seife@suse.de
- update to current CVS (only s2ram whitelist updates)
* Tue Feb 05 2008 seife@suse.de
- whitelist update for s2ram
- mention http://en.opensuse.org/S2ram instead of sf.net page in
help messages
- more detailed instructions on bugreporting (from upstream cvs)
* 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
- add pkgconfig and glib2-devel to BuildRequires
* Sat Oct 06 2007 dmueller@suse.de
- remove SUSE 10.1 specific documentation for newer distros
* Thu Sep 20 2007 seife@suse.de
- fix wrong condition in %%post (still b.n.c #326234)
* Wed Sep 19 2007 seife@suse.de
- fix update case (mkinitrd returning an error, b.n.c #326234)
* Mon Sep 17 2007 seife@suse.de
- updated the s2ram whitelist:
- suspend-s2ram-LenovoX60Tablet.diff (b.n.c #265613)
- suspend-s2ram-DellXPSM1330.diff (b.n.c #325757)
* Fri Sep 14 2007 dkukawka@suse.de
- added patches to update the s2ram whitelist:
- suspend-s2ram-HPnc6320.diff (b.n.c #310179)
- suspend-s2ram-LenovoX61Tablet.diff (b.n.c #310198)
- suspend-s2ram-several_SonyVaio.diff (b.n.c #310223)
* Mon Sep 03 2007 seife@suse.de
- updated to current CVS (0.7rc, will be 0.7 soon)
- code cleanups for better maintainability
- various whitelist updates for s2ram
- use system-wide lzo library instead of private copy of liblzf
- Makefile fix merged
- in case the user aborted suspend to disk, return zero to avoid
a nasty popup from kpowersave
- speedup image writing by starting writeout earlier
* Fri Aug 03 2007 hmacht@suse.de
- add suspend-input.diff: Read keyboard events from
/dev/input/event*. DirectFB implementation uses threads which are
frozen during image writing (novell bug 293826)
- suspend-default-splash.diff: default to using splash for s2disk
* Tue Jul 31 2007 seife@suse.de
- update to current cvs:
- whitelist updates
- fix acpi_video_mode setting, was not effective before
* Tue Jul 31 2007 seife@suse.de
- correct the Aspire 1690 whitelist entry (novell bug 293662)
- fix build with old "make" (SLED10)
* Mon Jul 30 2007 seife@suse.de
- update to current cvs:
- whitelist updates
- some small changes in button handling during suspend to disk,
press "r" for reboot instead of shutdown
- suspend framebuffers during suspend to RAM, might help with some
of those NOFB entries.
* Fri Jul 20 2007 hmacht@suse.de
- build with splashy support
- enable dynamic linking for the resume binary
- suspend-disable-bootsplash.diff: Enable splashy in favour of
broken bootsplash support. Patch will get removed once upstream
gets the changes
* Thu Jul 19 2007 seife@suse.de
- update to current CVS:
- lots of whitelist updates (novell bugs 290734 and 290618)
- return an error on "--identify" if the machine is unknown or
"unsure".
- default keyfile patch included upstream
- removed "use console 63" patch, makes debugging harder and will
be unnecessary once the splash-support is included
* Tue Jun 05 2007 seife@suse.de
- update to current CVS:
- whitelist updates
- refactoring of arch-specific code
- reworked help-texts
- default to using compression for s2disk
- default RSA key file to /etc/suspend.key
* Wed Mar 28 2007 seife@suse.de
- update to current CVS:
- whitelist updates
- documentation updates
- update to vbetool-1.0 codebase:
- move to external libx86
- Makefile cleanup
- various "platform mode" fixes for s2disk/resume
- error path fixes in s2disk
- better error messages
- add libx86-devel to BuildRequires:
- remove obsolete openSUSE-Factory-README.txt
* Tue Feb 13 2007 seife@suse.de
- update to current CVS, only whitelist updates
* Mon Feb 05 2007 seife@suse.de
- update to current CVS, which has:
- lots of whitelist updates
- Makefile reworked
- loglevel mangling during boot fixed correctly
- unblank the console after resume from disk
- more space-efficient storage of encryption details in image
- various other small fixes
* Mon Jan 22 2007 seife@suse.de
- update to current CVS, which has:
- all new s2ram option pci_save for machines that need PCI state
saving of the graphics card
- lots of whitelist updates
- documentation update
- some fixes for encrypted suspend on 64bit machines
- fix "press del to abort image saving" with splash usage
- fix swap-offset on large swapfiles
* Wed Nov 15 2006 seife@suse.de
- whitelist update:
Dell D410 (bug #220865)
* Tue Nov 14 2006 seife@suse.de
- change version from 0.5 to 0.50 to avoid update problems
- whitelist update:
* HP Compaq nc6120 (bug 159688)
* MAXDATA IMPERIO4045A
* fix ThinkPad X41 Tablet entry (bug #220865)
* Mon Nov 13 2006 seife@suse.de
- update to released version 0.50:
- incorporates all our fixes
- whitelist updates
- add "swap-offset" tool for using swapfiles to suspend
(not supported yet by the kernel and our initrd)
* Thu Nov 09 2006 seife@suse.de
- fix blocker bug 219629, resume never resumed.
* Mon Nov 06 2006 seife@suse.de
- update to current CVS:
- ability to abort writing the image to disk
- do not touch on-disk inode of snapshot device after freezing
- whitelist updates
- add command line option handling to s2disk/s2both
- do not mess up the loglevel on resume (bug 218284)
- always use console 63 for suspend messages
- cleanup error path on failed suspend
* Wed Oct 18 2006 seife@suse.de
- update to current CVS:
- fix suspend to swap partitions > 2GB
- add support for swap files (needs newer kernel)
- whitelist update
- package version number restructured to make future updates to
upcoming releases smoother
* Tue Oct 17 2006 ro@suse.de
- link also against libz when linking against libpci
* Thu Oct 12 2006 seife@suse.de
- update to current CVS:
- fix platform mode
- s2ram whitelist updates
- use "maximum speed" options for liblzf
* Fri Sep 29 2006 seife@suse.de
- enable image-encryption.
* Tue Sep 26 2006 seife@suse.de
- update to current CVS which does:
- implement code for using ACPI methods to suspend ("platform
mode")
- timing for suspend and resume
- whitelist updates
- config file options are completely commented out now.
* Wed Sep 20 2006 seife@suse.de
- update to current CVS which does:
- bootsplash fixes, alternative implementation (not used)
- Makefile reworked
- whitelist updated
- updated documentation for openSUSE factory
* Tue Sep 12 2006 seife@suse.de
- update documentation for userspace swsusp for openSUSE factory
* Mon Sep 11 2006 seife@suse.de
- update to current CVS which does:
- documentation updates (how to use userspace swsusp on SuSE)
- incorporate suspend-fs.h-include-fix.diff
- whitelist updates
- fix build (compression was not enabled)
* Wed Aug 09 2006 seife@suse.de
- update to current CVS which does:
- documentation updates
- incorporate the vbetool 64bit fix
- whitelist updates
- fix build with newer glibc
* Fri Jul 28 2006 seife@suse.de
- fix segfaults in vbetool code on 64bit machines.
* Fri Jul 21 2006 seife@suse.de
- update to current CVS which does (among others):
- various whitelist updates
- upgrade vbetool code to vbetool-0.6 (should be a no-op)
- add "--vbe_mode" option to support more machines
- build the tools for userspace-suspend (s2disk, s2both, resume).
This needs a custom kernel and only unencrypted suspend is
compiled in due to license issues.
* Wed May 31 2006 seife@suse.de
- Whitelist updates:
- ASUS M6VA, V6V
- Compaq Evo N620c
- FSC W300/W600
- TOSHIBA Tecra S3
- VIA EPIA M
* Fri May 19 2006 seife@suse.de
- Whitelist update: ThinkPad R40 [#171495]
* Tue May 16 2006 seife@suse.de
- Whitelist updates:
- Dell D410
- Lenovo Thinkpads X60 / X60s
* Mon May 08 2006 seife@suse.de
- correct the homepage for error reports
- Whitelist updates:
- Dell Inspiron 8000
- Dell Latitude C600
- ThinkPads R52 and X31
* Thu Apr 06 2006 seife@suse.de
- consolidate the --force fix
- Whitelist updates:
- Acer Travelmate 3000
- Asus L2400D
- Dell D800
- ThinkPad T60p
- LG M1
* Mon Apr 03 2006 seife@suse.de
- Whitelist updates:
- Acer Travelmate 650
- Asus M2400N
- Dell e1505
- HP Presario R4100
- ThinkPad A21m
- Toshiba Satellite A30 / L10
* Sun Apr 02 2006 seife@suse.de
- fix the s2ram --force option (bug #159688)
* Mon Mar 27 2006 seife@suse.de
- Rework the various s2ram workarounds so the functions can be
used cleanly, move the supported/unsupported logic to main().
- Whitelist updates:
- Acer Aspire 1690, Ferrari 4000
- HP nx6125
- ThinkPad 30, T41p, R32, R40, G40, Z60m
- Panasonic Toughbook CF-51E
* Mon Mar 20 2006 seife@suse.de
- Rework radeontool code - no longer parse lspci output - no longer
require pciutils.
- Compile dmidecode, radeontool and vbetool object files and link
against them instead of including all the .c files.
- Various code cleanups.
- Include a NOFB flag for machines that only work when not using
a framebuffer console.
- Whitelist updates:
- ASUS M6Ne
- Dell Inspiron 5150, Latitude D600/D610
- HP nx5000, nc6000, nc6230, nx8220
- IBM ThinkPad X40, T41p, T42p
- Samsung X20
- Sony PCG-GRT995MP
- Fujitsu Siemens Stylistic ST5000
* Mon Mar 06 2006 seife@suse.de
- better identification / debug output
- Whitelist updates:
- Compaq Armada E500
- hp compaq nx5000
- ThinkPad T43 & R51
- Toshiba Satellite 4080XCDT
- Sony Vaio VGN-FS115B
* Thu Mar 02 2006 seife@suse.de
- refactoring of the whole s2ram codebase
- whitelist moved to an extra file
- fix segfault in vbetool code on x86_64
- Machines added to the whitelist:
- Acer Extensa 4150
- Acer TravelMate C300
- Fujitsu Amilo A7640
- Fujitso Stylistic ST5000
- Sharp PC-AR10
- Sony VGN-FS115B
* Fri Feb 24 2006 seife@suse.de
- add different options to skip whitelist.
* Wed Feb 22 2006 seife@suse.de
- add chvt code to switch to console 1 before suspend if needed.
- allow building on x86_64.
* Wed Feb 22 2006 seife@suse.de
- initial package submission, CVS from today.