From fff44813411552be71fcf7b0abef112d55e01748 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 5 Mar 2019 09:53:40 +0000 Subject: [PATCH] community/zram-init: fix depend and default algo zram-init depends on zramctl from util-linux so add that as explicit depends. the alpine kernel does not support crypto zstd so use lz4 algo as default. ref #10044 --- community/zram-init/APKBUILD | 11 +++--- community/zram-init/default-lz4.patch | 49 +++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 community/zram-init/default-lz4.patch diff --git a/community/zram-init/APKBUILD b/community/zram-init/APKBUILD index 322beaf8d13..ca76174ee73 100644 --- a/community/zram-init/APKBUILD +++ b/community/zram-init/APKBUILD @@ -3,14 +3,16 @@ # Contributor: Pedro Filipe pkgname=zram-init pkgver=8.0 -pkgrel=0 +pkgrel=1 pkgdesc="wrapper script for the zram kernel module" arch="noarch" url="https://github.com/vaeth/zram-init" license="GPL-2.0" -depends="e2fsprogs-extra" +depends="e2fsprogs-extra util-linux" # we need zramctl from util-linux subpackages="$pkgname-zsh-completion:zshcomp $pkgname-openrc" -source="$pkgname-$pkgver.tar.gz::https://github.com/vaeth/zram-init/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/vaeth/zram-init/archive/v$pkgver.tar.gz + default-lz4.patch + " builddir="$srcdir/$pkgname-$pkgver" options="!check" @@ -32,4 +34,5 @@ zshcomp() { "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname } -sha512sums="d8efb796f14482b389db940fda1cc2d3869fa139bb3d60d282fb4bfa9ee6f7adb93801c6e22860bf1eb1a2b1c4715681418f916ae7a96c1fe58ef003365eed34 zram-init-8.0.tar.gz" +sha512sums="d8efb796f14482b389db940fda1cc2d3869fa139bb3d60d282fb4bfa9ee6f7adb93801c6e22860bf1eb1a2b1c4715681418f916ae7a96c1fe58ef003365eed34 zram-init-8.0.tar.gz +4dee4a83771fec0b4ea63e59f61d7615ae7253acaff46a219d700237326e8b96d3d2fda31754c3c7bc53c04159d163dcdc432bfb790f9e9a52faef508036b3ed default-lz4.patch" diff --git a/community/zram-init/default-lz4.patch b/community/zram-init/default-lz4.patch new file mode 100644 index 00000000000..30d2e8f5755 --- /dev/null +++ b/community/zram-init/default-lz4.patch @@ -0,0 +1,49 @@ +diff --git a/openrc/conf.d/zram-init b/openrc/conf.d/zram-init +index 06871f3..9d6ce70 100644 +--- a/openrc/conf.d/zram-init ++++ b/openrc/conf.d/zram-init +@@ -54,7 +54,7 @@ mlim0= # no hard memory limit + back0= # no backup device + notr0= # keep the default on linux-3.15 or newer + maxs0=1 # maximum number of parallel processes for this device +-algo0=zstd # zstd (since linux-4.18), lz4 (since linux-3.15), or lzo. ++algo0=lz4 # zstd (since linux-4.18), lz4 (since linux-3.15), or lzo. + # Size: zstd (best) > lzo > lz4. Speed: lz4 (best) > zstd > lzo + labl0=zram_swap # the label name + uuid0= # Do not force UUID +@@ -74,7 +74,7 @@ mode1=1777 + owgr1= # No reason to change the default "root:root" + notr1= # keep the default on linux-3.15 or newer + maxs1=2 +-algo1=zstd ++algo1=lz4 + labl1=tmp_dir + uuid1= + args1= +@@ -90,7 +90,7 @@ mode2=1777 + owgr2= # No reason to change the default "root:root" + notr2= # keep the default on linux-3.15 or newer + maxs2=1 +-algo2=zstd ++algo2=lz4 + labl2=var_tmp_dir + uuid2= + args2= +@@ -100,7 +100,7 @@ type3=- # Only format the filesystem but actually do not mount it + flag3=btrfs + size3=1024 + maxs3=1 +-algo3=zstd ++algo3=lz4 + labl3=zbtrfs + uuid3= + args3= +@@ -114,7 +114,7 @@ type3=swap + flag3= + size3=512 + maxs3=1 +-algo3=zstd ++algo3=lz4 + labl3=zram_swap2 + uuid3= + args3=