diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2010-05-19 08:58:23 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:43:05 +0200 |
commit | b76270bf9e6dd375e495fec92140a79a79415d27 (patch) | |
tree | 3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/ap/pm-utils | |
parent | 5a12e7c134274dba706667107d10d231517d3e05 (diff) | |
download | current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz |
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010
Slackware 13.1 x86_64 stable is released!
Lots of thanks are due -- see the RELEASE_NOTES and the rest of the
ChangeLog for credits. The ISOs are on their way to replication,
a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We are taking pre-orders now at store.slackware.com, and offering
a discount if you sign up for a subscription. Consider picking up
a copy to help support the project. Thanks again to the Slackware
community for testing, contributing, and generally holding us to a
high level of quality. :-)
Enjoy!
Diffstat (limited to 'source/ap/pm-utils')
-rw-r--r-- | source/ap/pm-utils/README.SLACKWARE | 42 | ||||
-rwxr-xr-x | source/ap/pm-utils/pm-utils.SlackBuild | 65 |
2 files changed, 68 insertions, 39 deletions
diff --git a/source/ap/pm-utils/README.SLACKWARE b/source/ap/pm-utils/README.SLACKWARE index 07162439..26ff48d8 100644 --- a/source/ap/pm-utils/README.SLACKWARE +++ b/source/ap/pm-utils/README.SLACKWARE @@ -1,5 +1,5 @@ README.SLACKWARE -20090414 - rworkman@slackware.com +20100319 - rworkman@slackware.com =============================================================================== PLEASE READ THIS ENTIRE FILE BEFORE REPORTING PROBLEMS OR ASKING FOR HELP! @@ -29,21 +29,21 @@ it works at all. Here's the short version of using suspend to disk: Stanza in /etc/lilo.conf should look something like this: - image = /boot/vmlinuz-generic-smp-2.6.29.1-smp + image = /boot/vmlinuz-generic-smp-2.6.33.1-smp initrd = /boot/initrd.gz - append = "resume=/dev/hda2" - root = /dev/hda1 - label = Slackware + append = "resume=/dev/sda2" + root = /dev/sda1 + label = genericsmp.s read-only /etc/mkinitrd.conf should look something like this: MODULE_LIST="jfs" - ROOTDEV="/dev/hda1" + ROOTDEV="/dev/sda1" ROOTFS="jfs" - RESUMEDEV="/dev/hda2" + RESUMEDEV="/dev/sda2" mkinitrd command invocation would be this: - mkinitrd -c -k 2.6.29.1-smp -F + mkinitrd -c -k 2.6.33.1-smp -F All of the above assumes at least a cursory understanding of what those commands and parameters do. If it's not clear, don't attempt it on a @@ -51,14 +51,17 @@ system that you can't easily reinstall without concern. ============================================================================== -If it works for you, and/or you want to automate it a bit, you'll find -some sample acpi event declarations and scripts here: - http://rlworkman.net/conf/acpi/ -A better option is to use the power manager daemon included with your choice -of desktop environment (both kde and xfce have one). +Once you confirm that a suspend and resume cycle works as expected, you might +automate the process with some acpi magic, but a better option is to use the +power manager daemon included with your choice of desktop environment (both +kde and xfce have one). ============================================================================== +/* TODO: these links are now dead. That's mostly okay, because the vast + majority of the hardware out there these days doesn't require any quirks + at all any more. Hopefully you won't be in the minority :-) */ + If it doesn't work by default for you, consider having a look at http://people.freedesktop.org/~hughsient/quirk/quirk-suspend-index.html for some debugging hints. Pay particular attention to this page: @@ -76,14 +79,14 @@ needed to add for successful suspend/resume to rworkman@slackware.com If you need the system to do certain operations before going to sleep and then undo them (or perhaps do something new) when waking back up, pm-utils supports something called "hooks." The hooks installed by packages (not only -pm-utils itself) should be in /usr/lib/pm-utils/sleep.d/, while any hooks +pm-utils itself) should be in /usr/lib(64)/pm-utils/sleep.d/, while any hooks installed by the local system administrator (e.g. things that are only an issue on that one machine) should be in /etc/pm/sleep.d/. Looking at some of the existing hooks should give you a decent idea of their capabilities; as a head start, the functions used in the hooks are declared -in /usr/lib/pm-utils/functions, which is inherited elsewhere by -/usr/lib/pm-utils/pm-functions. Note that an error exit code on any hook +in /usr/lib(64)/pm-utils/functions, which is inherited elsewhere by +/usr/lib(64)/pm-utils/pm-functions. Note that an error exit code on any hook will cause the sleep operation to fail, so if you don't care whether your hook executes successfully, be sure to return an exit code of 0 (success) if you don't want the suspend operation to fail. Some other exit codes are @@ -101,15 +104,18 @@ ship its own hook. KNOWN ISSUES +/* TODO: remove? I've gotten *zero* mails about either of these since + we've been shipping pm-utils */ + **** If you encounter either of these, mail rworkman@slackware.com **** If your alsa drivers don't correctly save and restore state across a sleep / resume cycle (due to a buggy driver), then you will need to add the drivers to a custom file named /etc/pm/config.d/defaults (create the file if it does not exist already) in a variable named "SUSPEND_MODULES" - see the file at -/usr/lib/pm-utils/defaults for proper format. +/usr/lib(64)/pm-utils/defaults for proper format. -The /usr/lib/pm-utils/sleep.d/90clock does not run by default. It added +The /usr/lib(64)/pm-utils/sleep.d/90clock does not run by default. It added over a second to suspend, and the vast majority of hardware does not need it to keep the clocks in sync. If you need this hook, you can set the NEED_CLOCK_SYNC environment variable in a custom /etc/pm/config.d/defaults diff --git a/source/ap/pm-utils/pm-utils.SlackBuild b/source/ap/pm-utils/pm-utils.SlackBuild index 26e60714..0b9eacd1 100755 --- a/source/ap/pm-utils/pm-utils.SlackBuild +++ b/source/ap/pm-utils/pm-utils.SlackBuild @@ -2,8 +2,8 @@ # Slackware build script for pm-utils -# Copyright 2008, 2009 Robby Workman, Northport, Alabama, USA -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010 Robby Workman, Northport, Alabama, USA +# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,16 +23,27 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -PRGNAM=pm-utils -VERSION=1.2.5 -ARCH=${ARCH:-x86_64} +PKGNAM=pm-utils +VERSION=$(echo ${PKGNAM}-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev) BUILD=${BUILD:-1} +QUIRKS=20100316 # Version of the quirks database + NUMJOBS=${NUMJOBS:-" -j7 "} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp} -PKG=$TMP/package-$PRGNAM +PKG=$TMP/package-$PKGNAM if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -43,14 +54,17 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1 -cd $PRGNAM-$VERSION || exit 1 +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1 +cd $PKGNAM-$VERSION || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -63,19 +77,21 @@ CFLAGS="$SLKCFLAGS" \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ + --docdir=/usr/doc/$PKGNAM-$VERSION \ --mandir=/usr/man \ --build=$ARCH-slackware-linux make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null -) +# Now let's add the video quirks +PM_UTILS_LIBDIR="/usr/lib${LIBDIRSUFFIX}/pm-utils" +mkdir -p $PKG/$PM_UTILS_LIBDIR/video-quirks +tar xf $CWD/pm-quirks-$QUIRKS.tar.xz -C $PKG/$PM_UTILS_LIBDIR/video-quirks +chown -R root:root $PKG/$PM_UTILS_LIBDIR/video-quirks + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null if [ -d $PKG/usr/man ]; then ( cd $PKG/usr/man @@ -91,15 +107,22 @@ if [ -d $PKG/usr/man ]; then ) fi -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ AUTHORS COPYING INSTALL NEWS README* TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE + $PKG/usr/doc/$PKGNAM-$VERSION +cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PKGNAM-$VERSION/README.SLACKWARE + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txz - +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz |