diff options
author | Giancarlo Razzolini | 2016-08-10 17:41:31 -0300 |
---|---|---|
committer | Giancarlo Razzolini | 2016-08-10 17:41:31 -0300 |
commit | 4f9940a08656b2f3e4db9944b938b4e262e995ae (patch) | |
tree | 34a1362bf9b3c65c9b4acb61fbc3b1beeeab2d43 | |
download | aur-4f9940a08656b2f3e4db9944b938b4e262e995ae.tar.gz |
* Initial commit of the memlockd package.
* It contains a patch that adapts the default memlockd configuration to arch paths, but does not change the core of the configuration.
* The patch also correct the systemd service file to reflect correct paths.
* Also, it use systemd-sysusers to create delete the user memlockd uses for running.
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | memlockd-1.1.patch | 51 | ||||
-rw-r--r-- | memlockd-sysusers.conf | 1 | ||||
-rw-r--r-- | memlockd.install | 9 |
6 files changed, 125 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d42786b13c98 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +# Generated by mksrcinfo v8 +# Wed Aug 10 20:41:18 UTC 2016 +pkgbase = memlockd + pkgdesc = Memlockd is a daemon that locks files into memory. It is meant to increase the chances of recovery from paging issues. + pkgver = 1.1 + pkgrel = 1 + url = https://doc.coker.com.au/projects/memlockd/ + install = memlockd.install + arch = any + license = GPL + backup = etc/memlockd.cfg + source = memlockd-1.1.tar.gz::https://www.coker.com.au/memlockd/memlockd_1.1.tar.gz + source = memlockd-sysusers.conf + source = memlockd.install + source = memlockd-1.1.patch + sha512sums = 0f7a61dcf82d58f518d631f979f876e62f952ff80507a6dc1369b88e6a4d99aa94d48b1d54fcc3b02860239f189fa1d83a8a595b1b5a1bc9b5c051c5c0217784 + sha512sums = 609fb89887a7d7cdc7a0aeae21dee54618162479ac6696d70e47e11213be6d678eba0963dc8b867a956e792c4f116e9d9ce57e7c9dcdbf126d7b0d6311dce35a + sha512sums = b2fb6ed0d061925cdb71778cb4fcea15eb61de5cdd60d324eaffcdabaa411c4f21404dd269af4e9ac48e8dc2dee17ae2aae2a49b875c0996c8f9ab725b7fe014 + sha512sums = 39f694f740cafa4a2b314124c7fa6ebb5334c81130b2c5c7b7044637d6590b1d1df43de6d2e961edc295c7f3f41051795765a320d83a551b366d769e7379fd3f + +pkgname = memlockd + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..090c160cdb84 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +memlockd-*.pkg.tar.xz +memlockd-*.tar.gz +memlockd-*/* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..cf6eeb2ca1f0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Giancarlo Razzolini <grazzolini@gmail.com> +pkgname=memlockd +pkgver=1.1 +pkgrel=1 +pkgdesc="Memlockd is a daemon that locks files into memory. It is meant to increase the chances of recovery from paging issues." +arch=('any') +url="https://doc.coker.com.au/projects/memlockd/" +license=('GPL') +backup=(etc/memlockd.cfg) +install=memlockd.install +changelog= +source=($pkgname-$pkgver.tar.gz::https://www.coker.com.au/$pkgname/$pkgname\_$pkgver.tar.gz + memlockd-sysusers.conf + memlockd.install + $pkgname-$pkgver.patch) +sha512sums=('0f7a61dcf82d58f518d631f979f876e62f952ff80507a6dc1369b88e6a4d99aa94d48b1d54fcc3b02860239f189fa1d83a8a595b1b5a1bc9b5c051c5c0217784' + '609fb89887a7d7cdc7a0aeae21dee54618162479ac6696d70e47e11213be6d678eba0963dc8b867a956e792c4f116e9d9ce57e7c9dcdbf126d7b0d6311dce35a' + 'b2fb6ed0d061925cdb71778cb4fcea15eb61de5cdd60d324eaffcdabaa411c4f21404dd269af4e9ac48e8dc2dee17ae2aae2a49b875c0996c8f9ab725b7fe014' + '39f694f740cafa4a2b314124c7fa6ebb5334c81130b2c5c7b7044637d6590b1d1df43de6d2e961edc295c7f3f41051795765a320d83a551b366d769e7379fd3f') + +prepare() { + cd "$pkgname-$pkgver" + patch -p1 -i "$srcdir/$pkgname-$pkgver.patch" +} + +build() { + cd "$pkgname-$pkgver" + make +} + +package() { + cd "$pkgname-$pkgver" + install -D -m 644 memlockd.cfg $pkgdir/etc/memlockd.cfg + install -d -m 644 $pkgdir/etc/memlockd.d + install -D -m 755 memlockd $pkgdir/usr/bin/memlockd + install -D -m 644 memlockd.8 $pkgdir/usr/share/man/man8/memlockd.8 + install -D -m 644 memlockd.service $pkgdir/usr/lib/systemd/system/memlockd.service + install -D -m 644 $srcdir/memlockd-sysusers.conf $pkgdir/usr/lib/sysusers.d/memlockd.conf +} diff --git a/memlockd-1.1.patch b/memlockd-1.1.patch new file mode 100644 index 000000000000..8c46b8385cc3 --- /dev/null +++ b/memlockd-1.1.patch @@ -0,0 +1,51 @@ +diff -aur memlockd-1.1.pristine/memlockd.cfg memlockd-1.1.new/memlockd.cfg +--- memlockd-1.1.pristine/memlockd.cfg 2016-08-09 21:32:35.208273414 -0300 ++++ memlockd-1.1.new/memlockd.cfg 2016-08-10 07:51:06.397571265 -0300 +@@ -1,25 +1,22 @@ + +/bin/bash +-+/usr/sbin/sshd +-+/bin/busybox +-+/sbin/getty +-+/bin/login +++/usr/bin/sshd +++/usr/bin/agetty +++/usr/bin/login + /etc/passwd + /etc/shadow + /etc/group + /etc/nsswitch.conf + /etc/resolv.conf +-/etc/locale.alias ++/etc/locale.conf + /usr/lib/locale/locale-archive + /etc/localtime +-?+/lib/i386-linux-gnu/libnss_files.so.2 +-?+/lib/i386-linux-gnu/i686/nosegneg/libnss_files.so.2 +-?+/lib/x86_64-linux-gnu/libnss_files.so.2 ++?+/usr/lib32/libnss_files.so.2 ++?+/usr/lib64/libnss_files.so.2 + /etc/ld.so.cache +-+/bin/ls +-+/bin/ps +++/usr/bin/ls +++/usr/bin/ps + +/usr/bin/killall + # even though I don't use NIS this is loaded +-?+/lib/i386-linux-gnu/libnss_nis.so.2 +-?+/lib/i386-linux-gnu/i686/nosegneg/libnss_nis.so.2 +-?+/lib/x86_64-linux-gnu/libnss_nis.so.2 ++?+/usr/lib32/libnss_nis.so.2 ++?+/usr/lib64/libnss_nis.so.2 + %/etc/memlockd.d +diff -aur memlockd-1.1.pristine/memlockd.service memlockd-1.1.new/memlockd.service +--- memlockd-1.1.pristine/memlockd.service 2016-08-09 21:32:35.208273414 -0300 ++++ memlockd-1.1.new/memlockd.service 2016-08-09 21:33:10.415198193 -0300 +@@ -2,7 +2,7 @@ + Description=memlockd + + [Service] +-ExecStart=/usr/sbin/memlockd -f -u memlockd ++ExecStart=/usr/bin/memlockd -f -u memlockd + ExecReload=/bin/kill -HUP $MAINPID + Type=simple + StandardOutput=syslog diff --git a/memlockd-sysusers.conf b/memlockd-sysusers.conf new file mode 100644 index 000000000000..16c82198e75f --- /dev/null +++ b/memlockd-sysusers.conf @@ -0,0 +1 @@ +u memlockd - "memlockd system account" /usr/lib/memlockd diff --git a/memlockd.install b/memlockd.install new file mode 100644 index 000000000000..dde18527485a --- /dev/null +++ b/memlockd.install @@ -0,0 +1,9 @@ +## arg 1: the new package version +post_install() { + systemd-sysusers memlockd.conf +} + +## arg 1: the new package version +post_remove() { + userdel memlockd +} |