diff options
Diffstat (limited to 'source/ap')
-rwxr-xr-x | source/ap/cgmanager/cgmanager.SlackBuild | 171 | ||||
-rw-r--r-- | source/ap/cgmanager/cgmanager.url | 1 | ||||
-rw-r--r-- | source/ap/cgmanager/config/rc.cgmanager | 56 | ||||
-rw-r--r-- | source/ap/cgmanager/config/rc.cgproxy | 58 | ||||
-rw-r--r-- | source/ap/cgmanager/doinst.sh | 27 | ||||
-rw-r--r-- | source/ap/cgmanager/slack-desc | 19 | ||||
-rw-r--r-- | source/ap/pm-utils/49bluetooth-generic | 19 | ||||
-rw-r--r-- | source/ap/pm-utils/README.SLACKWARE | 134 | ||||
-rw-r--r-- | source/ap/pm-utils/patches/add-in-kernel-suspend-to-both.patch | 32 | ||||
-rw-r--r-- | source/ap/pm-utils/patches/fix-wrong-path-in-intel-audio-powersave.patch | 32 | ||||
-rw-r--r-- | source/ap/pm-utils/patches/hook-exit-code-log.patch | 19 | ||||
-rw-r--r-- | source/ap/pm-utils/patches/init-logfile-append.patch | 13 | ||||
-rw-r--r-- | source/ap/pm-utils/patches/log-line-spacing-fix.patch | 14 | ||||
-rw-r--r-- | source/ap/pm-utils/patches/use_more_sane_harddrive_defaults.patch | 12 | ||||
-rwxr-xr-x | source/ap/pm-utils/pm-utils.SlackBuild | 165 | ||||
-rw-r--r-- | source/ap/pm-utils/pm-utils.url | 1 | ||||
-rw-r--r-- | source/ap/pm-utils/slack-desc | 19 |
17 files changed, 0 insertions, 792 deletions
diff --git a/source/ap/cgmanager/cgmanager.SlackBuild b/source/ap/cgmanager/cgmanager.SlackBuild deleted file mode 100755 index 63216616..00000000 --- a/source/ap/cgmanager/cgmanager.SlackBuild +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/bash - -# Copyright 2014, 2015, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Modified by Matteo Bernardini <ponce@slackbuilds.org> (2014) - -cd $(dirname $0) ; CWD=$(pwd) - -PKGNAM=cgmanager -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | rev | cut -f 2- -d -)} -BUILD=${BUILD:-1} - -# Automatically determine the architecture we're building on: -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) export ARCH=i586 ;; - arm*) export ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$( uname -m ) ;; - esac -fi - -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. -if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then - echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" - exit 0 -fi - -NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -TMP=${TMP:-/tmp} -PKG=$TMP/package-$PKGNAM - -rm -rf $PKG -mkdir -p $TMP $PKG - -cd $TMP -rm -rf $PKGNAM-$VERSION -tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || 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 \) \ - -exec chmod 755 {} \+ -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \+ - -./bootstrap.sh - -# Configure: -CFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PKGNAM-$VERSION \ - --infodir=/usr/info \ - --enable-static=no \ - --with-distro=slackware \ - --with-pamdir=none \ - --build=$ARCH-slackware-linux || exit 1 - -# Build and install: -make $NUMJOBS || make || exit 1 -make install DESTDIR=$PKG || exit 1 - -# Install compat symlink -mkdir -p $PKG/usr/sbin -ln -s /usr/libexec/cgmanager/cgm-release-agent $PKG/usr/sbin/cgm-release-agent - -# Remove .la files: -rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la - -# Strip binaries: -( 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 -) - -# Remove broken init scripts: -rm -f $PKG/etc/rc.d/rc.* - -# Add good init scripts: -mkdir -p $PKG/etc/rc.d -cat $CWD/config/rc.cgmanager > $PKG/etc/rc.d/rc.cgmanager.new -cat $CWD/config/rc.cgproxy > $PKG/etc/rc.d/rc.cgproxy.new - -# Run cgmanager by default: -chmod 755 $PKG/etc/rc.d/rc.cgmanager.new - -# Make this executable by default as well, so that "rc.cgmanager start" will -# start cgproxy in a container: -chmod 755 $PKG/etc/rc.d/rc.cgproxy.new - -# No need for these in the package: -rm -rf $PKG/usr/share/cgmanager/tests -rmdir --parents $PKG/usr/share/cgmanager 2>/dev/null - -# Add a documentation directory: -mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION -cp -a \ - AUTHORS CONTRIBUTING COPYING* MAINTAINERS NEWS README* TODO \ - $PKG/usr/doc/${PKGNAM}-$VERSION - -# Compress and if needed symlink the man pages: -if [ -d $PKG/usr/man ]; then - ( cd $PKG/usr/man - for manpagedir in $(find . -type d -name "man*") ; do - ( cd $manpagedir - for eachpage in $( find . -type l -maxdepth 1) ; do - ln -s $( readlink $eachpage ).gz $eachpage.gz - rm $eachpage - done - gzip -9 *.? - ) - done - ) -fi - -# 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 -zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh - -cd $PKG -/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz - diff --git a/source/ap/cgmanager/cgmanager.url b/source/ap/cgmanager/cgmanager.url deleted file mode 100644 index 3bfd1a37..00000000 --- a/source/ap/cgmanager/cgmanager.url +++ /dev/null @@ -1 +0,0 @@ -https://linuxcontainers.org/cgmanager/downloads/ diff --git a/source/ap/cgmanager/config/rc.cgmanager b/source/ap/cgmanager/config/rc.cgmanager deleted file mode 100644 index 56f355d6..00000000 --- a/source/ap/cgmanager/config/rc.cgmanager +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -# /etc/rc.d/rc.cgmanager - start/stop the cgroup manager - -if [ -f /etc/default/cgmanager ]; then - # get cgmanager options if specified - . /etc/default/cgmanager -fi - -start_cgmanager() { - # Kill any existing cgproxy - /bin/sh /etc/rc.d/rc.cgproxy stop >/dev/null 2>&1 || true - # check whether to start cgproxy or cgmanager - if /usr/sbin/cgproxy --check-master; then - if [ -x /etc/rc.d/rc.cgproxy -a ! -r /run/cgmanager.pid ]; then - NESTED=yes /etc/rc.d/rc.cgproxy start || true && { exit 0; } - else - # If we are here, either cgmanager is already running (in which case - # we don't want to run it again), or rc.cgproxy is not executable - # (in which case we don't want to run it). - echo "Error: rc.cgproxy is not executable, or attempting to start multiple instances of cgmanager" - exit 1 - fi - fi - echo "Starting cgmanager: /usr/sbin/cgmanager --daemon" - /usr/sbin/cgmanager --daemon -} - -stop_cgmanager() { - # If the cgmanager stops, the proxy must also stop - /bin/sh /etc/rc.d/rc.cgproxy stop >/dev/null 2>&1 || true - echo "Stopping cgmanager." - /bin/kill $(cat /run/cgmanager.pid 2>/dev/null) 2>/dev/null - /usr/bin/pkill --exact /usr/sbin/cgmanager 2>/dev/null - rm -f /run/cgmanager.pid -} - -restart_cgmanager() { - stop_cgmanager - sleep 1 - start_cgmanager -} - -case "$1" in -'start') - start_cgmanager - ;; -'stop') - stop_cgmanager - ;; -'restart') - restart_cgmanager - ;; -*) - echo "usage $0 start|stop|restart" -esac diff --git a/source/ap/cgmanager/config/rc.cgproxy b/source/ap/cgmanager/config/rc.cgproxy deleted file mode 100644 index 59a61b78..00000000 --- a/source/ap/cgmanager/config/rc.cgproxy +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -# /etc/rc.d/rc.cgproxy - start/stop the cgroup proxy manager - -if [ -f /etc/default/cgproxy ]; then - # get cgproxy options if specified - . /etc/default/cgproxy -fi - -start_cgproxy() { - # cgproxy should only run on container unless on older kernel - if [ -e /proc/self/ns/pid ] && [ "$NESTED" != "yes" ]; then - echo "Error: cgproxy should only run inside containers" - exit 0 - fi - echo "Starting cgproxy: /usr/sbin/cgproxy --daemon" - /usr/sbin/cgproxy --daemon -} - -stop_cgproxy() { - if ps -C cgproxy | grep -q cgproxy 2>/dev/null ; then - echo "Stopping cgproxy." - if ! /bin/kill $(cat /run/cgproxy.pid 2>/dev/null) 2>/dev/null ; then - sleep 1 - echo "Sending cgproxy the TERM signal." - if ! /usr/bin/pkill --exact -TERM /usr/sbin/cgproxy ; then - sleep 5 - echo "Sending cgproxy the KILL signal." - /usr/bin/pkill --exact -KILL /usr/sbin/cgproxy - sleep 5 - if ps -C cgproxy | grep -q cgproxy 2>/dev/null ; then - echo "Error: couldn't stop cgproxy." - fi - fi - fi - rm -f /run/cgproxy.pid - fi -} - -restart_cgproxy() { - stop_cgproxy - sleep 1 - start_cgproxy -} - -case "$1" in -'start') - start_cgproxy - ;; -'stop') - stop_cgproxy - ;; -'restart') - restart_cgproxy - ;; -*) - echo "usage $0 start|stop|restart" -esac diff --git a/source/ap/cgmanager/doinst.sh b/source/ap/cgmanager/doinst.sh deleted file mode 100644 index e12ae79e..00000000 --- a/source/ap/cgmanager/doinst.sh +++ /dev/null @@ -1,27 +0,0 @@ -config() { - NEW="$1" - OLD="$(dirname $NEW)/$(basename $NEW .new)" - # If there's no config file by that name, mv it over: - if [ ! -r $OLD ]; then - mv $NEW $OLD - elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then - # toss the redundant copy - rm $NEW - fi - # Otherwise, we leave the .new copy for the admin to consider... -} - -preserve_perms() { - NEW="$1" - OLD="$(dirname $NEW)/$(basename $NEW .new)" - if [ -e $OLD ]; then - cp -a $OLD ${NEW}.incoming - cat $NEW > ${NEW}.incoming - mv ${NEW}.incoming $NEW - fi - config $NEW -} - -preserve_perms etc/rc.d/rc.cgmanager.new -preserve_perms etc/rc.d/rc.cgproxy.new - diff --git a/source/ap/cgmanager/slack-desc b/source/ap/cgmanager/slack-desc deleted file mode 100644 index f60cd2fc..00000000 --- a/source/ap/cgmanager/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line -# up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must -# make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':'. - - |-----handy-ruler------------------------------------------------------| -cgmanager: cgmanager (Control Group manager daemons) -cgmanager: -cgmanager: CGManager manages all your cgroups for you through a simple DBus API. -cgmanager: It's designed to work with nested LXC containers as well as accepting -cgmanager: unprivileged requests including resolving user namespaces UIDs/GIDs. -cgmanager: -cgmanager: The package contains two daemons: cgmanager (which runs on the host), -cgmanager: and cgproxy (which runs in containers). -cgmanager: -cgmanager: Homepage: https://linuxcontainers.org/cgmanager/ -cgmanager: diff --git a/source/ap/pm-utils/49bluetooth-generic b/source/ap/pm-utils/49bluetooth-generic deleted file mode 100644 index 1c88f198..00000000 --- a/source/ap/pm-utils/49bluetooth-generic +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -. "${PM_FUNCTIONS}" - -case "$1" in - hibernate|suspend) - if [ -d /sys/devices/virtual/misc/rfkill -a -x /usr/sbin/rfkill -a -x /etc/rc.d/rc.bluetooth ]; then - rfkill block bluetooth - fi - ;; - thaw|resume) - if [ -d /sys/devices/virtual/misc/rfkill -a -x /usr/sbin/rfkill -a -x /etc/rc.d/rc.bluetooth ]; then - rfkill unblock bluetooth - fi - ;; - *) - ;; -esac - diff --git a/source/ap/pm-utils/README.SLACKWARE b/source/ap/pm-utils/README.SLACKWARE deleted file mode 100644 index 1bbfbfe8..00000000 --- a/source/ap/pm-utils/README.SLACKWARE +++ /dev/null @@ -1,134 +0,0 @@ -README.SLACKWARE -20130512 - rworkman@slackware.com - -=============================================================================== -PLEASE READ THIS ENTIRE FILE BEFORE REPORTING PROBLEMS OR ASKING FOR HELP! -=============================================================================== - -One of these routines should tell you whether any of the operations -are supported by your current kernel/userspace at all: - - for i in hibernate suspend suspend-hybrid ; do - pm-is-supported --$i \ - && echo "$i is supported" \ - || echo "$i is not supported" ; - done - - *OR* - - cat /sys/power/state - -Assuming they are supported, running "pm-suspend" as root should do a suspend -to ram, and "pm-hibernate" should suspend to disk. Note that you must have a -swap partition (or file, but partition is easier) which is large enough -(2x ram is good here) and the relevant initrd lines and such for this to work. -If you're not familiar with all of that, don't test pm-hibernate. -I don't have hardware which supports suspend-hybrid, so I have no idea if/how -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-3.8.13-smp - initrd = /boot/initrd.gz - append = "resume=/dev/sda2" - root = /dev/sda1 - label = genericsmp.s - read-only - -/etc/mkinitrd.conf should look something like this: - MODULE_LIST="ext4" - ROOTDEV="/dev/sda1" - ROOTFS="ext4" - RESUMEDEV="/dev/sda2" - -mkinitrd command invocation would be this: - mkinitrd -c -k 3.8.13-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 -system that you can't easily reinstall without concern. - -============================================================================== - -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 :-) - Addendum: it's now been about three years since the above text was - written, and I've had zero reports of hardware requiring additional - quirks. Just FYI. :-) -*/ - -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: - http://people.freedesktop.org/~hughsient/quirk/quirk-suspend-try.html - -If you are able to get your machine to suspend/resume correctly by passing -additional quirks on the command line, then I would like to know about it so -that upstream hal-info can get the correct information to use. Please email -the make/model and other relevant information about your machine along with -the full output of "lshal" and "lspci" attached, and what extra quirks you -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(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(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 -also available; none of these will cause the suspend to fail: - $NA (not applicable), $NX (hook not executable), and $DX (hook disabled) - -============================================================================== - -The default powersave hooks are in /usr/lib(64)/pm-utils/power.d/ -- if you -need to override any parameters set in those, you can do so with same-named -files in /etc/pm/power.d/ As an example, if you wanted to change the hdparm -setting for your hard drive's power management setting, you would copy the -entire file at /usr/lib(64)/pm-utils/power.d/harddrive to /etc/pm/power.d/ -and edit the copy to reflect your needs, e.g.: - - DRIVE_POWER_MGMT_BAT=128 # edit value as desired - DRIVE_POWER_MGMT_AC=128 # edit value as desired - -Also note that any files in the /etc/pm/ hierarchy must be executable (use -chmod +x) in order to be used by pm-utils; otherwise, they will be ignored. - -============================================================================== - -KNOWN ISSUES - -**** 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(64)/pm-utils/defaults for proper format. - -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 -file. - -============================================================================== - diff --git a/source/ap/pm-utils/patches/add-in-kernel-suspend-to-both.patch b/source/ap/pm-utils/patches/add-in-kernel-suspend-to-both.patch deleted file mode 100644 index e09d0766..00000000 --- a/source/ap/pm-utils/patches/add-in-kernel-suspend-to-both.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/pm/pm-functions.in b/pm/pm-functions.in ---- a/pm/pm-functions.in -+++ b/pm/pm-functions.in -@@ -316,8 +316,28 @@ if [ -z "$HIBERNATE_MODULE" ] && \ - { - [ -n "${HIBERNATE_MODE}" ] && \ - grep -qw "${HIBERNATE_MODE}" /sys/power/disk && \ -+ HIBERNATE_MODE_SAVE=$(cat /sys/power/disk) && \ -+ HIBERNATE_MODE_SAVE="${HIBERNATE_MODE_SAVE##*[}" && \ -+ HIBERNATE_MODE_SAVE="${HIBERNATE_MODE_SAVE%%]*}" && \ - echo -n "${HIBERNATE_MODE}" > /sys/power/disk - echo -n "disk" > /sys/power/state -+ RET=$? -+ echo -n "$HIBERNATE_MODE_SAVE" > /sys/power/disk -+ return "$RET" -+ } -+fi -+ -+# for kernels that support suspend to both (i.e. hybrid suspend) -+# since kernel 3.6 -+if [ -z "$SUSPEND_HYBRID_MODULE" ] && \ -+ [ -f /sys/power/disk ] && \ -+ grep -q disk /sys/power/state && \ -+ grep -q suspend /sys/power/disk; then -+ SUSPEND_HYBRID_MODULE="kernel" -+ do_suspend_hybrid() -+ { -+ HIBERNATE_MODE="suspend" -+ do_hibernate - } - fi - diff --git a/source/ap/pm-utils/patches/fix-wrong-path-in-intel-audio-powersave.patch b/source/ap/pm-utils/patches/fix-wrong-path-in-intel-audio-powersave.patch deleted file mode 100644 index 90039710..00000000 --- a/source/ap/pm-utils/patches/fix-wrong-path-in-intel-audio-powersave.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 67abbd2f5109a732ab967c94bef4d6d9b2a11541 Mon Sep 17 00:00:00 2001 -From: Florian Kriener <florian@kriener.org> -Date: Sat, 25 Sep 2010 11:27:30 +0200 -Subject: [PATCH] wrong path in intel-audio-powersave (and a small bug) - -Package: pm-utils -Version: 1.4.1-2 -Severity: normal -Tags: patch ---- - pm/power.d/intel-audio-powersave | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/pm/power.d/intel-audio-powersave b/pm/power.d/intel-audio-powersave -index 36675a8..da63e40 100644 ---- a/pm/power.d/intel-audio-powersave -+++ b/pm/power.d/intel-audio-powersave -@@ -20,9 +20,9 @@ EOF - - audio_powersave() { - [ "$INTEL_AUDIO_POWERSAVE" = "true" ] || exit $NA -- for dev in /sys/module/snd_*/parameters/power_save; do -+ for dev in /sys/module/snd_*; do - [ -w "$dev/parameters/power_save" ] || continue -- printf "Setting power savings for $s to %d..." "$dev##*/" "$1" -+ printf "Setting power savings for %s to %d..." "${dev##*/}" "$1" - echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed. - done - } --- -1.7.3.4 - diff --git a/source/ap/pm-utils/patches/hook-exit-code-log.patch b/source/ap/pm-utils/patches/hook-exit-code-log.patch deleted file mode 100644 index 7eccd83b..00000000 --- a/source/ap/pm-utils/patches/hook-exit-code-log.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up pm-utils-1.4.1/pm/pm-functions.in.orig pm-utils-1.4.1/pm/pm-functions.in ---- pm-utils-1.4.1/pm/pm-functions.in.orig 2011-08-22 14:52:58.976213050 +0200 -+++ pm-utils-1.4.1/pm/pm-functions.in 2011-08-22 14:57:26.000000000 +0200 -@@ -195,11 +195,13 @@ hook_ok() - _run_hook() { - # $1 = hook to run - # rest of args passed to hook unchanged. -+ local hook_status - log "Running hook $*:" - hook_ok "$1" && "$@" -+ hook_status=$? - log "" -- log -n "$*: " -- hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit -+ log -n "$*: " -+ hook_exit_status $hook_status && LAST_HOOK="${1##*/}" || inhibit - } - - if profiling; then diff --git a/source/ap/pm-utils/patches/init-logfile-append.patch b/source/ap/pm-utils/patches/init-logfile-append.patch deleted file mode 100644 index 07978263..00000000 --- a/source/ap/pm-utils/patches/init-logfile-append.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- pm-utils-1.4.1/pm/pm-functions.in.old 2010-07-04 16:50:13.000000000 +0200 -+++ pm-utils-1.4.1/pm/pm-functions.in 2010-12-07 16:48:39.555074652 +0100 -@@ -271,7 +271,9 @@ - return 1 - fi - export LOGGING=true -- exec > "$1" 2>&1 -+ rm -f "$1" -+ touch "$1" -+ exec >> "$1" 2>&1 - } - - check_suspend() { [ -n "$SUSPEND_MODULE" ]; } diff --git a/source/ap/pm-utils/patches/log-line-spacing-fix.patch b/source/ap/pm-utils/patches/log-line-spacing-fix.patch deleted file mode 100644 index cf4fbe38..00000000 --- a/source/ap/pm-utils/patches/log-line-spacing-fix.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up pm-utils-1.4.1/pm/pm-functions.in.orig pm-utils-1.4.1/pm/pm-functions.in ---- pm-utils-1.4.1/pm/pm-functions.in.orig 2011-11-02 11:43:24.000000000 +0100 -+++ pm-utils-1.4.1/pm/pm-functions.in 2011-11-02 11:43:49.987116603 +0100 -@@ -199,9 +199,9 @@ _run_hook() { - log "Running hook $*:" - hook_ok "$1" && "$@" - hook_status=$? -- log "" - log -n "$*: " - hook_exit_status $hook_status && LAST_HOOK="${1##*/}" || inhibit -+ log "" - } - - if profiling; then diff --git a/source/ap/pm-utils/patches/use_more_sane_harddrive_defaults.patch b/source/ap/pm-utils/patches/use_more_sane_harddrive_defaults.patch deleted file mode 100644 index 3dcc8156..00000000 --- a/source/ap/pm-utils/patches/use_more_sane_harddrive_defaults.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur pm-utils-1.4.1.orig//pm/power.d/harddrive pm-utils-1.4.1/pm/power.d/harddrive ---- pm-utils-1.4.1.orig//pm/power.d/harddrive 2010-07-04 09:50:13.000000000 -0500 -+++ pm-utils-1.4.1/pm/power.d/harddrive 2010-12-27 14:23:12.729597017 -0600 -@@ -11,7 +11,7 @@ - # Default values on battery - DRIVE_SPINDOWN_VALUE_BAT="${DRIVE_SPINDOWN_VALUE_BAT:-6}" - DRIVE_WRITE_CACHE_BAT="${DRIVE_WRITE_CACHE_BAT:-0}" --DRIVE_POWER_MGMT_BAT="${DRIVE_POWER_MGMT_BAT:-1}" -+DRIVE_POWER_MGMT_BAT="${DRIVE_POWER_MGMT_BAT:-128}" - DRIVE_ACOUSTIC_MGMT_BAT="${DRIVE_ACOUSTIC_MGMT_BAT:-254}" - - # Default devices to operate on diff --git a/source/ap/pm-utils/pm-utils.SlackBuild b/source/ap/pm-utils/pm-utils.SlackBuild deleted file mode 100755 index 367b8b49..00000000 --- a/source/ap/pm-utils/pm-utils.SlackBuild +++ /dev/null @@ -1,165 +0,0 @@ -#!/bin/bash - -# Slackware build script for pm-utils - -# Copyright 2008, 2009, 2010 Robby Workman, Northport, Alabama, USA -# Copyright 2008, 2009, 2010, 2013, 2018 Patrick J. Volkerding, Sebeka, MN, USA -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -cd $(dirname $0) ; CWD=$(pwd) - -PKGNAM=pm-utils -VERSION=$(echo ${PKGNAM}-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev) -BUILD=${BUILD:-6} - -QUIRKS=20100619 # Version of the quirks database - -NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} - -# Automatically determine the architecture we're building on: -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) export ARCH=i586 ;; - arm*) export ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$( uname -m ) ;; - esac -fi - -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. -if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then - echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" - exit 0 -fi - -TMP=${TMP:-/tmp} -PKG=$TMP/package-$PKGNAM - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -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 $PKGNAM-$VERSION -tar xvf $CWD/$PKGNAM-$VERSION.tar.gz || 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 \) \ - -exec chmod 755 {} \+ -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \+ - -zcat $CWD/patches/use_more_sane_harddrive_defaults.patch.gz | patch -p1 || exit 1 -zcat $CWD/patches/fix-wrong-path-in-intel-audio-powersave.patch.gz | patch -p1 || exit 1 - -# Thanks to Fedora for these: -# Use append instead of write for init_logfile -zcat $CWD/patches/init-logfile-append.patch.gz | patch -p1 || exit 1 -# Fix hooks exit code logging -zcat $CWD/patches/hook-exit-code-log.patch.gz | patch -p1 || exit 1 -# Fix line spacing in logs to be easier to read -zcat $CWD/patches/log-line-spacing-fix.patch.gz | patch -p1 || exit 1 -# Add support for in-kernel (from kernel 3.6) suspend to both -zcat $CWD/patches/add-in-kernel-suspend-to-both.patch.gz | patch -p1 || exit 1 - -CFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --docdir=/usr/doc/$PKGNAM-$VERSION \ - --mandir=/usr/man \ - --build=$ARCH-slackware-linux - -make $NUMJOBS || make || exit 1 -make install DESTDIR=$PKG || exit 1 - -# Now let's add the video quirks -PM_UTILS_LIBDIR="/usr/lib${LIBDIRSUFFIX}/pm-utils" -mkdir -p $PKG/$PM_UTILS_LIBDIR -tar xf $CWD/pm-quirks-$QUIRKS.tar.gz -C $PKG/$PM_UTILS_LIBDIR -chown -R root:root $PKG/$PM_UTILS_LIBDIR/video-quirks - -# Probably this shouldn't be needed, but some bluetooth hardware isn't -# properly handled during the sleep/wake process -( cd $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/sleep.d - mv 49bluetooth 49bluetooth-ibm - cat $CWD/49bluetooth-generic > 49bluetooth-generic - chmod 0755 49bluetooth-generic -) - -# Remove the NetworkManager hook - recent NM listens to upower events -# directly to know when the system is suspending/waking -rm -f $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/sleep.d/55NetworkManager - -# Remove hooks which have shown to not reduce, or even increase power -# usage (thanks to Debian for this, and to Marin Glibic for the referral) -rm -f $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/power.d/journal-commit -rm -f $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/power.d/readahead - -# HAL is gone, so this should be too: -rm -f $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/power.d/hal-cd-polling - -# Actually, it is a bad thing(tm) for pm-utils to go messing around with all -# of the user's settings with the hooks in the power.d directory. Anything -# that wasn't already taken out back behind the shed should be disabled by -# default: -chmod 644 $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/power.d/* - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - -find $PKG/usr/man -type f -exec gzip -9 {} \+ -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - -mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION -cp -a \ - AUTHORS COPYING INSTALL NEWS README* TODO \ - $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/$PKGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/source/ap/pm-utils/pm-utils.url b/source/ap/pm-utils/pm-utils.url deleted file mode 100644 index 976c938f..00000000 --- a/source/ap/pm-utils/pm-utils.url +++ /dev/null @@ -1 +0,0 @@ -http://pm-utils.freedesktop.org diff --git a/source/ap/pm-utils/slack-desc b/source/ap/pm-utils/slack-desc deleted file mode 100644 index 61df486c..00000000 --- a/source/ap/pm-utils/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line -# up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must -# make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':'. - - |-----handy-ruler-------------------------------------------------------| -pm-utils: pm-utils (Power Management Utilities) -pm-utils: -pm-utils: The pm-utils package provides simple shell command line tools to -pm-utils: suspend and hibernate computers that can be used to run vendor or -pm-utils: distribution supplied scripts on suspend and resume. -pm-utils: -pm-utils: Homepage: http://pm-utils.freedesktop.org/ -pm-utils: -pm-utils: -pm-utils: -pm-utils: |