summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config-box-proton-base.PKGBUILD5
-rw-r--r--config-box-winston-base.PKGBUILD5
-rw-r--r--config-mgmt-swap.PKGBUILD30
3 files changed, 34 insertions, 6 deletions
diff --git a/config-box-proton-base.PKGBUILD b/config-box-proton-base.PKGBUILD
index fdcb34d..c2587c1 100644
--- a/config-box-proton-base.PKGBUILD
+++ b/config-box-proton-base.PKGBUILD
@@ -1,11 +1,11 @@
. ${BUILDFILE%/*}/common.sh
-pkgver=20161112
+pkgver=20170204
package() {
preamble
# #### base setup
-depends+=(linux-libre-lts grub haveged systemd-swap)
+depends+=(linux-libre-lts grub haveged)
conflicts+=(linux-libre)
add-file etc/hostname <<EOF
@@ -22,7 +22,6 @@ LC_COLLATE=C
EOF
add-unit etc/systemd/system/getty.target.wants/getty@tty1.service
-add-unit etc/systemd/system/local-fs.target.wants/systemd-swap.service
add-unit etc/systemd/system/multi-user.target.wants/haveged.service
add-unit etc/systemd/system/multi-user.target.wants/remote-fs.target
diff --git a/config-box-winston-base.PKGBUILD b/config-box-winston-base.PKGBUILD
index 8e6d1ab..43c0f7a 100644
--- a/config-box-winston-base.PKGBUILD
+++ b/config-box-winston-base.PKGBUILD
@@ -1,11 +1,11 @@
. ${BUILDFILE%/*}/common.sh
-pkgver=20161112
+pkgver=20170204
package() {
preamble
# #### base setup
-depends+=(linux-libre-lts grub haveged irqbalance systemd-swap)
+depends+=(linux-libre-lts grub haveged irqbalance)
conflicts+=(linux-libre)
add-file etc/hostname <<EOF
@@ -28,7 +28,6 @@ LC_COLLATE=C
EOF
add-unit etc/systemd/system/getty.target.wants/getty@tty1.service
-add-unit etc/systemd/system/local-fs.target.wants/systemd-swap.service
add-unit etc/systemd/system/multi-user.target.wants/haveged.service
add-unit etc/systemd/system/multi-user.target.wants/irqbalance.service
add-unit etc/systemd/system/multi-user.target.wants/remote-fs.target
diff --git a/config-mgmt-swap.PKGBUILD b/config-mgmt-swap.PKGBUILD
new file mode 100644
index 0000000..6d0492b
--- /dev/null
+++ b/config-mgmt-swap.PKGBUILD
@@ -0,0 +1,30 @@
+. ${BUILDFILE%/*}/common.sh
+pkgver=20170204
+
+package() {
+preamble
+
+depends=(systemd-swap)
+
+add-file -m755 usr/share/holo/files/10-"$pkgname"/etc/systemd/swap.conf.holoscript <<EOF
+#!/bin/sh
+sed '
+ s/^# Zswap$/& (compress pages on disk)/
+ /zswap_zspool=z3fold/ {
+ a# The systemd-swap default '\''z3fold'\'' was added in Linux 4.7; because we
+ a# are running an -lts kernel, we'\''re still on 4.4, so we fall back to
+ a# zbud.
+ azswap_zpool=zbud
+ }
+
+ /^# ZRam/s/.*/& (compress pages in RAM)/
+ s/zram_enabled=.*/zram_enabled=1/
+
+ s/swapfc_enabled=.*/swapfc_enabled=1/
+' | awk '\$0==""||!x[\$0]++'
+EOF
+
+add-unit etc/systemd/system/local-fs.target.wants/systemd-swap.service
+
+postamble
+}