Package Details: swapspace 1.12-2

Git Clone URL: https://aur.archlinux.org/swapspace.git (read-only)
Package Base: swapspace
Description: A dynamic swap manager
Upstream URL: https://github.com/Tookmund/Swapspace
Licenses: GPL
Submitter: chungy
Maintainer: chungy
Last Packager: chungy
Votes: 11
Popularity: 0.160168
First Submitted: 2011-10-13 18:29
Last Updated: 2015-11-18 20:42

Dependencies (0)

Required by (0)

Sources (4)

Latest Comments

jprendes commented on 2016-02-05 15:18

The daemon fails to deallocate the swap files. This is due to it failing to correctly identify the files in /proc/swap.

By setting VARPREFIX to "/", swappath becomes "//var/lib/swapspace".
The length of the string is computed before it is canonized, so swappath_len is off by one, finally preventing to validate the path of the files in /proc/swap.

A workaround is to set VARPREFIX to ""

char101 commented on 2015-11-04 06:43

https://github.com/Tookmund/Swapspace/blob/5d53218727069f8a2a33bd89d8156e21640b1cdf/README#L10
If you install to somewhere other than /usr/local/ be sure to edit the
ETCPREFIX and VARPREFIX variables in src/env.h as well as the initscript

The default configuration path without modifying ETCPREFIX is /usr/local/etc/swapspace.conf not /etc/swapspace.conf

Blissfull commented on 2015-09-18 00:57

Error: Could not get filesystem information for swap directory '/usr/local/var/lib/swapspace': No such file or directory

chungy commented on 2015-03-24 22:48

Thanks. I've also taken the opportunity to redo the whole package for a proper systemd integration (no more shell script emulating the old initscripts). Please take note that instead of being wanted by multi-user.target anymore, it's now wanted by swap.target. You'll probably need to fix your systemd configuration if you have swapspace enabled.

Doing so should be simple, either run "systemctl disable swapspace.service" before upgrading, or run "rm /etc/systemd/system/multi-user.target/swapspace.service" afterwards, and then "systemctl enable swapspace.service".

chungy commented on 2015-03-24 22:46

Thanks. I've also taken the opportunity to redo the whole package for a proper systemd integration (no more shell script emulating the old initscripts). Please take note that instead of being wanted by multi-user.target anymore, it's now wanted by swap.target. You'll probably need to fix your systemd configuration if you have swapspace enabled.

InfernoZeus commented on 2015-03-21 20:12

This package wouldn't install for me as /usr/sbin is now just a symlink to /usr/bin, which is referenced in both Makefile.patch and systemd.scripts.swapspace. I've uploaded new copies of those two, plus the PKGBUILD with updated hashes to gist, here: https://gist.github.com/InfernoZeus/24e201605ffa67aafc5f

daroczig commented on 2013-12-24 23:30

Sry, I flagged the package "out-of-date" by coincidence, I wanted to download the tarball :(

zatricky commented on 2013-02-02 14:41

pqxx.org appears down :-/
Temporary alternative: http://swiftspirit.co.za/down/swapspace-1.10.tar.gz

chungy commented on 2012-07-29 16:36

Thanks; I don't use systemd so please let me know if the new script for it doesn't work.

nbvcxz commented on 2012-07-29 10:09

As Archlinux is slightly going to systemd - could you add the following files to PKGBUILD (service for systemd):

/usr/lib/systemd/scripts/swapspace:

#!/bin/sh

start() {
SWAPSPACE_ARGS="-q -d -p /var/run/swapspace.pid"
PIDFILE=/var/run/swapspace.pid
PID=$(cat $PIDFILE 2> /dev/null)
if ! readlink -q /proc/$PID/exe | grep -q \^/usr/sbin/swapspace; then
PID=
rm -f $PIDFILE
fi
[ -r /etc/conf.d/swapspace ] && . /etc/conf.d/swapspace
PID=$(get_pid swapspace)
[[ -z $PID ]] && /usr/sbin/swapspace $SWAPSPACE_ARGS
}

stop() {
/usr/sbin/swapspace -e
[[ ! -z $PID ]] && kill $PID &> /dev/null
}

case $1 in
start|stop) "$1" ;;
esac

and /usr/lib/systemd/system/swapspace:

[Unit]
Description=A dynamic swap manager

[Service]
Type=oneshot
ExecStart=/usr/lib/systemd/scripts/swapspace start
ExecStop=/usr/lib/systemd/scripts/swapspace stop
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target