Name: pm-utils Summary: Power management utilities and scripts for Fedora Core License: GPL Version: 0.99.3 Release: 6%{?dist}.1cubbi_suspend2 Group: System Environment/Base ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 Requires: usermode kbd pciutils >= 2.2.1 Conflicts: bluez-utils < 2.25-6 Source0: pm-utils-%{version}.tar.gz Source1: pm-suspend.pam Source2: pm-hibernate.pam Source3: pm-powersave.pam Source4: pm-suspend-hybrid.pam Source11: pm-suspend.app Source12: pm-hibernate.app Source13: pm-powersave.app Source14: pm-suspend-hybrid.app %define vbever 0.7 Source10: http://www.srcf.ucam.org/~mjg59/vbetool/vbetool_%{vbever}-1.tar.gz Source20: radeontool-1.5.tar.gz Source99: suspend2.te %ifarch i386 x86_64 Obsoletes: vbetool Provides: vbetool Obsoletes: radeontool Provides: radeontool %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: hal-devel pkgconfig pciutils-devel BuildRequires: dbus-devel >= 0.90, zlib-devel BuildRequires: checkpolicy policycoreutils kernel-headers Patch0: pm-utils-0.99.3-disable.patch #Patch1: pm-utils-0.19-vidhooks.patch Patch2: pm-utils-0.99.3-vbe-redirect.patch Patch3: pm-utils-0.99.3-selinux.patch Patch9: pm-utils-0.99.3-suspend2.patch Patch10: vbetool-0.3-fix-gcc4bug.patch Patch11: vbetool-libz.patch Patch20: radeontool-1.5.diff Patch21: radeontool-fix-option-handling.diff Patch22: radeontool-get-rid-of-lspci.diff %description The pm-utils package contains utilities and scripts for Fedora Core useful for power management. %prep %setup -q -a 10 -a 20 %patch0 -p1 -b .disable #%patch1 -p1 -b .vidhooks %patch2 -p1 -b .vbe-redirect %patch3 -p1 -b .selinux %patch9 -p1 -b .suspend2 %patch10 -p0 -b .gcc4 %patch11 -p0 -b .zlib cd radeontool-1.5 %patch20 -p0 -b .volatile %patch21 -p0 -b .options %patch22 -p0 -b .no-lspci cd .. %build cd vbetool-%{vbever} %ifarch i386 %configure make %endif %ifarch x86_64 %configure --with-x86emu make %endif cd .. %ifarch i386 x86_64 cd radeontool-1.5 %{__cc} $RPM_OPT_FLAGS -o radeontool radeontool.c -lpci -lz cd .. %endif CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ ./configure --host=%{_host} --build=%{_build} \ --target=%{_target_platform} \ --program-prefix=%{?_program_prefix} \ --prefix=%{_prefix} \ --exec-prefix=%{_exec_prefix} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} \ --includedir=%{_includedir} \ --libdir=%{_exec_prefix}/lib \ --libexecdir=%{_libexecdir} \ --localstatedir=%{_localstatedir} \ --sharedstatedir=%{_sharedstatedir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} make %install %{__rm} -rf $RPM_BUILD_ROOT %ifarch i386 x86_64 cd vbetool-%{vbever} make DESTDIR=$RPM_BUILD_ROOT install cd .. cd radeontool-1.5 mkdir -p $RPM_BUILD_ROOT/%{_sbindir} install -m 755 radeontool $RPM_BUILD_ROOT/%{_sbindir} cd .. %endif make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version} install -m 600 %{SOURCE99} $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version} pushd $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version} /usr/bin/checkmodule -M -m -o suspend2.mod suspend2.te /usr/bin/semodule_package -o suspend2.pp -m suspend2.mod popd install -m 755 -d $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d for x in %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} ; do y=$(basename ${x%%.pam}) install -T -m 644 $x $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/$y done install -m 755 -d $RPM_BUILD_ROOT/%{_sysconfdir}/security/console.apps/ for x in %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} ; do y=$(basename ${x%%.app}) install -T -m 644 $x $RPM_BUILD_ROOT/%{_sysconfdir}/security/console.apps/$y done install -m 755 -d $RPM_BUILD_ROOT/%{_bindir} pushd $RPM_BUILD_ROOT/%{_bindir} for x in pm-hibernate pm-powersave pm-restart pm-shutdown pm-suspend ; do ln -sf consolehelper $x done popd install -d -m 755 $RPM_BUILD_ROOT/var/log install -m 600 /dev/null $RPM_BUILD_ROOT/var/log/pm-suspend.log %clean %{__rm} -rf $RPM_BUILD_ROOT %pre if [ -f /etc/sysconfig/pm ]; then mkdir -p /etc/pm/config.d mv /etc/sysconfig/pm /etc/pm/config.d/01oldconfig fi %post if [ -f /etc/pm/config.rpmsave ]; then mkdir -p /etc/pm/config.d mv /etc/pm/config.rpmsave /etc/pm/config.d/02oldconfig fi if [ ! -a /var/log/pm-suspend.log ] ; then install -m 600 /dev/null /var/log/pm-suspend.log fi [ ! -x /usr/sbin/semodule ] || [ ! -x /usr/sbin/sestatus ] || [ ! -x /usr/sbin/selinuxenabled ] || ! /usr/sbin/selinuxenabled || \ /usr/sbin/semodule -i %{_docdir}/%{name}-%{version}/suspend2.pp >/dev/null 2>/dev/null #%preun #[ ! -x /usr/sbin/semodule ] || [ ! -x /usr/sbin/sestatus ] || # [ ! -x /usr/sbin/selinuxenabled ] || ! /usr/sbin/selinuxenabled || \ # /usr/sbin/semodule -r suspend2 >/dev/null 2>/dev/null %files %defattr(-,root,root) %{_sysconfdir}/pm/* %{_sysconfdir}/security/console.apps/* %{_sysconfdir}/pam.d/* %{_exec_prefix}/lib/pm-utils/bin/* %{_exec_prefix}/lib/pm-utils/defaults %{_exec_prefix}/lib/pm-utils/functions %{_exec_prefix}/lib/pm-utils/power.d/* %{_exec_prefix}/lib/pm-utils/sleep.d/* %{_bindir}/* %{_sbindir}/* %{_mandir}/man*/* %{_docdir}/%{name}-%{version}/suspend2.* %ghost %verify(not md5 size mtime) /var/log/pm-suspend.log %changelog * Tue Jun 12 2007 Matthias Hensler - 0.99.3-6.1cubbi_suspend2 - add support for mhensler.de/swsusp Suspend 2 kernels * Mon May 21 2007 Peter Jones - 0.99.3-6 - Don't remove the logfile before creating it. * Wed May 16 2007 Peter Jones - 0.99.3-5 - ... and create the directory the logfile goes in. * Wed May 16 2007 Peter Jones - 0.99.3-4 - Bump release to appease Koji. * Wed May 16 2007 Peter Jones - 0.99.3-3 - Create logfile in %%post and %%gost it. * Wed Apr 25 2007 Peter Jones - 0.99.3-2 - Get rid of bogus redirect on "vbetool post" - add zlib linkage for vbetool and radeontool * Mon Mar 26 2007 Peter Jones - 0.99.3-1 - update to 0.99.3 - configure manually in the spec to avoid %%_lib as lib64 * Tue Mar 13 2007 Peter Jones - 0.99.2-1 - update to 0.99.2 * Fri Feb 2 2007 Peter Jones - 0.99.1-1 - Fix setsysfont hook to actually hit tty0, not the pty of the current task. * Tue Jan 30 2007 Jeremy Katz - 0.19.1-6 - build so that hooks run properly on resume; fix syntax error in functions-intel (pjones) * Fri Jan 26 2007 Phil Knirsch - 0.19.1-5 - Fixed problem with changes in 10NetworkManager hook (#224556) * Wed Jan 24 2007 Phil Knirsch - 0.19.1-4 - Start/stop correct services in 10NetworkManager hook (#215253) - Fixed check for /sys/power/disk and /sys/power/state (#214407) - Added proper error messages in case /sys/power/disk or /sys/power/state are missing (#215386) - Removed service calls and module load/unload for bluetooth hook (#213387) - Added hook file to restore the sysfont after resume (#215391) - Added the possibility to disable hibernate and suspend completely via the config file (#216459) - Symlinked the config file to /etc/sysconfig/power-management (#216459) - Fixed pm-powersave permission check bug (#222819) - Small specfile cleanups * Sun Oct 1 2006 Peter Jones - 0.19.1-3 - Disable bluetooth suspend/reusme hook by default; the kernel modules seem to support this correctly these days. * Thu Sep 28 2006 Peter Jones - 0.19.1-2 - Ignore emacs backup files in config directories (#185979) * Tue Aug 8 2006 Peter Jones - 0.19.1-1 - Hopefully fix Centrino ThinkPad suspend+resume - Hopefully fix Intel Mac Mini/MacBook suspend+resume * Mon Jul 31 2006 Jeremy Katz - 0.19-3 - doing the vbestate save/restore on intel video with the modesetting intel xorg driver is broken. so don't do it. * Tue Jul 18 2006 John (J5) Palmieri - 0.19-2 - requier a newer version of D-Bus and rebuild * Wed Jul 12 2006 Jesse Keating - 0.19-1.1 - rebuild * Tue Jun 13 2006 Peter Jones - 0.19-1 - update from CVS - move pam and consolehelper stuff here. - move video hooks here since HAL isn't ready * Tue Apr 25 2006 Peter Jones - 0.18-1 - Make it work cross-distro * Mon Apr 17 2006 Peter Jones - 0.17-1 - add more helper functions - rework things that were forking an extra subshell - fix the suspend lock - work around bluetooth/usb suspend wackiness * Fri Mar 17 2006 Peter Jones - 0.16-1 - rework the difference between hibernate and suspend; get rid of PM_MODE - add 00clear script - move default_resume_kernel from "functions" to 01grub's hibernate section * Sat Mar 11 2006 Peter Jones - 0.15-1 - fix hibernate check in a way that doesn't break "sleep". * Fri Mar 10 2006 Peter Jones - 0.14-1 - fix hibernate check in /etc/pm/hooks/20video * Fri Mar 03 2006 Phil Knirsch - 0.13-1 - Revert last changes for ATI graphics chips as they seem to cause more problems than they solved. * Wed Mar 01 2006 Phil Knirsch - 0.12-1 - Use vbetool post instead of vbetool dpms on for ATI cards. * Tue Feb 28 2006 Jeremy Katz - allow building on all x86 arches (#183175) * Tue Feb 28 2006 Jeremy Katz - 0.11-1 - fix display on resume with nvidia graphics - add infrastructure to tell what pm-util is running; don't resume video on return from hibernate as the BIOS has already re-initialized it * Fri Feb 24 2006 Phil Knirsch - 0.10-1 - Added missing pciutils-devel BuildRequires (#182566) - Fixed missing vbestata save/restore calls for video suspend/resume (#182167, #169494) - Renamed hook scripts to allow local pre and post inserts (#179421) - Added support for blinking led lights on Thinkpad Laptops during suspend (#179420) - Added pm-powersave script for powersaving via HAL (#169054) - Added symlinks for pm-shutdown and pm-restart (#165953) * Fri Feb 10 2006 Jesse Keating - 0.09-1.2 - bump again for double-long bug on ppc(64) * Tue Feb 07 2006 Jesse Keating - 0.09-1.1 - rebuilt for new gcc4.1 snapshot and glibc changes * Tue Jan 24 2006 Jeremy Katz - 0.09-1 - Remove button module on suspend - Set default kernel in grub to current one when hibernating so that resume works * Thu Dec 22 2005 Peter Jones - 0.08-1 - Fix scripts for new pciutils * Fri Dec 9 2005 Dave Jones - Update to latest vbetool (0.5-1) Now also built on x86-64 too. * Fri Dec 09 2005 Jesse Keating - rebuilt * Thu Dec 01 2005 John (J5) Palmieri - 0.07-3 - rebuild for the new dbus * Wed Nov 30 2005 Peter Jones - 0.07-2 - restart ntpd in the background - switch terminals early so we don't wake the screen back up * Fri Nov 18 2005 Bill Nottingham - 0.06-3 - nix that, wait for the kernel to settle down * Wed Nov 16 2005 Bill Nottingham - 0.06-2 - fix LRMI usage in vbetool * Thu Nov 10 2005 Peter Jones - 0.06-1 - kill acpi_video_cmd calls in functions-ati - fix lcd_on in functions-ati * Fri Sep 30 2005 Bill Nottingham - 0.05-1 - check for presence of various tools/files before using them (#169560, #196562) * Fri Aug 12 2005 Jeremy Katz - 0.04-1 - add pm-hibernate * Tue Jul 05 2005 Bill Nottingham - 0.03-1 - fix path to video functions in video hook * Mon Jul 04 2005 Bill Nottingham - 0.02-1 - add a pm-suspend (#155613) * Wed Apr 13 2005 Bill Nottingham - 0.01-1 - initial version - package up vbetool, radeontool, new on_ac_power