diff options
author | Christian Hesse | 2015-06-30 10:34:34 +0200 |
---|---|---|
committer | Christian Hesse | 2015-06-30 10:34:34 +0200 |
commit | ea836cc34f8833ada12d4d1ae29a544d209adb0e (patch) | |
tree | 2e5c1ee312c5a555c3f24cb4bd7b299465f1f6a8 | |
download | aur-ea836cc34f8833ada12d4d1ae29a544d209adb0e.tar.gz |
initial import of uswsusp-git 0.r501.g668c5f7-6
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 78 | ||||
-rw-r--r-- | load-checksum-mismatch.patch | 11 | ||||
-rw-r--r-- | no-deprecated-switch.patch | 29 | ||||
-rw-r--r-- | print-no-version.patch | 28 | ||||
-rw-r--r-- | uresume-hook | 3 | ||||
-rw-r--r-- | uresume-install | 14 | ||||
-rw-r--r-- | uswsusp.install | 17 |
8 files changed, 210 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..dc93f0b10f42 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = uswsusp-git + pkgdesc = Userspace software suspend - git checkout + pkgver = 0.r501.g668c5f7 + pkgrel = 6 + url = http://suspend.sourceforge.net/ + install = uswsusp.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = git + depends = libx86 + depends = lzo2 + provides = uswsusp + conflicts = uswsusp + backup = etc/suspend.conf + source = git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-utils.git + source = uresume-hook + source = uresume-install + source = print-no-version.patch + source = load-checksum-mismatch.patch + source = no-deprecated-switch.patch + sha256sums = SKIP + sha256sums = 2662d879ca7a2339233c8bdce123f0d686397093759ca54f162a3577603587b0 + sha256sums = 9fe3e38301014b4c8597aec2041ad3c6d85e6935004cbd3ac93659d391db3157 + sha256sums = cdf29e41f35469b134bb6421ba109e8398e1f3e88ec4e1d41b015920e420ee44 + sha256sums = fe8d5c831302125fd92ba6e48cacaf0359925d41de5623be2b8525a0cdf1fcc6 + sha256sums = d8a4f646d0785adf038830f14564f20ea307a27f225c17eb581a2e4d5e0c8519 + +pkgname = uswsusp-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4c3d2ae93c37 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,78 @@ +# Maintainer: Christian Hesse <mail@eworm.de> +# Contributor: cantabile <cantabile dot desu at gmail dot com> + +pkgname=uswsusp-git +pkgver=0.r501.g668c5f7 +pkgrel=6 +pkgdesc='Userspace software suspend - git checkout' +arch=('i686' 'x86_64') +url='http://suspend.sourceforge.net/' +license=('GPL') +#depends=('libgcrypt' 'libx86' 'lzo2') +depends=('libx86' 'lzo2') +makedepends=('git') +provides=('uswsusp') +conflicts=('uswsusp') +backup=('etc/suspend.conf') +install=uswsusp.install +source=('git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-utils.git' + 'uresume-hook' + 'uresume-install' + 'print-no-version.patch' + 'load-checksum-mismatch.patch' + 'no-deprecated-switch.patch') +sha256sums=('SKIP' + '2662d879ca7a2339233c8bdce123f0d686397093759ca54f162a3577603587b0' + '9fe3e38301014b4c8597aec2041ad3c6d85e6935004cbd3ac93659d391db3157' + 'cdf29e41f35469b134bb6421ba109e8398e1f3e88ec4e1d41b015920e420ee44' + 'fe8d5c831302125fd92ba6e48cacaf0359925d41de5623be2b8525a0cdf1fcc6' + 'd8a4f646d0785adf038830f14564f20ea307a27f225c17eb581a2e4d5e0c8519') + +pkgver() { + cd suspend-utils/ + + if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then + echo "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG}).r$(git rev-list --count ${GITTAG}..).g$(git log -1 --format="%h")" + else + echo "0.r$(git rev-list --count master).g$(git log -1 --format="%h")" + fi +} + +build() { + cd suspend-utils/ + + patch -Np1 < "${srcdir}/print-no-version.patch" + patch -Np1 < "${srcdir}/load-checksum-mismatch.patch" + patch -Np1 < "${srcdir}/no-deprecated-switch.patch" + + sed -i "s/^AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" configure.ac + mkdir m4 + + ./autogen.sh + + # This code includes references to deprecaded API in libgcrypt. Finally + # it has been removed from libgcrypt 1.6.0. + # For the time being encrypt support is disabled. To reenable add + # --enable-encrypt below and fix the code. + + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --enable-compress \ + --enable-threads \ + --disable-resume-static \ + --disable-static \ + --sysconfdir=/etc + make +} + +package() { + cd suspend-utils/ + + mkdir "${pkgdir}/etc" + make DESTDIR="${pkgdir}/" install + + install -D -m0644 "${srcdir}/uresume-hook" "${pkgdir}/usr/lib/initcpio/hooks/uresume" + install -D -m0644 "${srcdir}/uresume-install" "${pkgdir}/usr/lib/initcpio/install/uresume" +} + diff --git a/load-checksum-mismatch.patch b/load-checksum-mismatch.patch new file mode 100644 index 000000000000..a59171150294 --- /dev/null +++ b/load-checksum-mismatch.patch @@ -0,0 +1,11 @@ +--- a/load.c 2011-03-06 18:24:15.000000000 -0500 ++++ b/load.c 2013-05-21 11:26:54.363938429 -0400 +@@ -573,7 +573,7 @@ + { + static struct swap_reader handle; + static unsigned char orig_checksum[16], checksum[16]; +- static char csum_buf[48]; ++ static char csum_buf[49]; + int error = 0, test_mode = (verify || test); + + error = read_page(fd, header, start); diff --git a/no-deprecated-switch.patch b/no-deprecated-switch.patch new file mode 100644 index 000000000000..f19bb53d19f6 --- /dev/null +++ b/no-deprecated-switch.patch @@ -0,0 +1,29 @@ +--- a/wlcsv2c.pl ++++ b/wlcsv2c.pl +@@ -2,21 +2,21 @@ + # Rodolfo Garcia kix_at_kix.es + # suspend database management v1.0 + +-use Switch; ++use feature qw(switch); + +-switch ($#ARGV) { +- case 0 { ++given ($#ARGV) { ++ when (0) { + my $fin = $ARGV[0]; + open(INF, "<$fin") or die "Could not open input file\n"; + open(OUF, ">&STDOUT") or die "Could not open output file\n"; + } +- case 1 { ++ when (1) { + my $fin = $ARGV[0]; + my $fout = $ARGV[1]; + open(INF, "<$fin") or die "Could not open input file\n"; + open(OUF, ">$fout") or die "Could not open output file\n"; + } +- else { ++ default { + my $msg = $0 . " <input-file> [output-file]"; + die $msg; + } diff --git a/print-no-version.patch b/print-no-version.patch new file mode 100644 index 000000000000..1cba9d781106 --- /dev/null +++ b/print-no-version.patch @@ -0,0 +1,28 @@ +--- a/resume.c ++++ b/resume.c +@@ -444,8 +444,8 @@ int main(int argc, char *argv[]) + + mem_size = 2 * page_size + buffer_size; + #ifdef CONFIG_ENCRYPT +- printf("%s: libgcrypt version: %s\n", my_name, +- gcry_check_version(NULL)); ++ /* printf("%s: libgcrypt version: %s\n", my_name, ++ gcry_check_version(NULL)); */ + gcry_control(GCRYCTL_INIT_SECMEM, page_size, 0); + mem_size += page_size; + #endif +diff --git a/suspend.c b/suspend.c +index 479ce58..d782cd6 100644 +--- a/suspend.c ++++ b/suspend.c +@@ -2342,8 +2342,8 @@ int main(int argc, char *argv[]) + #endif + #ifdef CONFIG_ENCRYPT + if (do_encrypt) { +- printf("%s: libgcrypt version: %s\n", my_name, +- gcry_check_version(NULL)); ++ /* printf("%s: libgcrypt version: %s\n", my_name, ++ gcry_check_version(NULL)); */ + gcry_control(GCRYCTL_INIT_SECMEM, page_size, 0); + ret = gcry_cipher_open(&cipher_handle, IMAGE_CIPHER, + GCRY_CIPHER_MODE_CFB, GCRY_CIPHER_SECURE); diff --git a/uresume-hook b/uresume-hook new file mode 100644 index 000000000000..5003e4d0c1ca --- /dev/null +++ b/uresume-hook @@ -0,0 +1,3 @@ +run_hook() { + /usr/lib/suspend/resume +} diff --git a/uresume-install b/uresume-install new file mode 100644 index 000000000000..dd994649c1fc --- /dev/null +++ b/uresume-install @@ -0,0 +1,14 @@ +# vim:set ft=sh: + +build () { + add_binary /usr/lib/suspend/resume + add_file /etc/suspend.conf + add_runscript +} + +help () { + cat <<HELPEOF + This hook initializes support for resuming from Disk. + Supports uswsusp. +HELPEOF +} diff --git a/uswsusp.install b/uswsusp.install new file mode 100644 index 000000000000..d885d7260545 --- /dev/null +++ b/uswsusp.install @@ -0,0 +1,17 @@ +post_install() { + cat << EOF +==> The new Software Suspend does not use kernel parameters +==> to determine the suspend partition, instead it consults +==> /etc/suspend.conf when booting. +==> You MUST edit this file before you update your initrd. +==> Point the "resume device" variable to your swap partition. + +==> You will need to update your mkinitcpio.conf file to +==> include the hook uresume. Replace your 'resume' hook +==> with 'uresume'. If you do not have a resume hook the +==> uresume hook must go before filesystems but after block. +==> Do not get this wrong. Then rebuild the ramdisk with +==> '# mkinitcpio -p linux' (or what else needed for the +==> kernel you use) +EOF +} |