diff options
author | Óscar García Amor | 2024-04-01 14:39:25 +0200 |
---|---|---|
committer | Óscar García Amor | 2024-04-01 14:39:25 +0200 |
commit | d06c986f5ea17a5f43949f464982d53ee1263007 (patch) | |
tree | 107e9dadd46b009930e9d2ca1d22c331b161536a | |
download | aur-d06c986f5ea17a5f43949f464982d53ee1263007.tar.gz |
Initial upload: redict 7.3.0+rc2-1
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | redict-sentinel.service | 24 | ||||
-rw-r--r-- | redict-use-system-jemalloc.patch | 15 | ||||
-rw-r--r-- | redict.conf-sane-defaults.patch | 13 | ||||
-rw-r--r-- | redict.service | 23 | ||||
-rw-r--r-- | redict.sysusers | 1 | ||||
-rw-r--r-- | redict.tmpfiles | 3 |
9 files changed, 176 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..789304729704 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +pkgbase = redict + pkgdesc = A distributed key/value database + pkgver = 7.3.0+rc2 + pkgrel = 1 + url = https://redict.io/ + arch = x86_64 + license = LGPL-3.0-only + makedepends = systemd + makedepends = openssl + depends = jemalloc + depends = grep + depends = shadow + depends = systemd-libs + backup = etc/redict/redict.conf + backup = etc/redict/sentinel.conf + source = redict-7.3.0-rc2.tar.gz::https://codeberg.org/redict/redict/archive/7.3.0-rc2.tar.gz + source = redict.service + source = redict-sentinel.service + source = redict.sysusers + source = redict.tmpfiles + source = redict.conf-sane-defaults.patch + source = redict-use-system-jemalloc.patch + sha512sums = aa79c9edf42ff3fc2eaaae568c2c2346bf6b02f8587476c5c24d627738886ed4c01095cc379ade35a9132245f984c1fc2191f1383598ea73eb67379809805528 + sha512sums = bafdd8d5bb16eb651e6dbed2fbd85c8a2264e5063cdc590add10f79879cb0e3dd3ea65635cb0f2502b272b9ad08704461ebec2523eb5263130ae01b1e5fc6983 + sha512sums = b72ee96c78e9c2e760f8241f109c7c91ebf0d5ba699af7e05e28e0f4eab8864e43673fca074a11730223e22b93f109c9739ea92f429332f7dc37ae8d6d7ad691 + sha512sums = 94556abeb7eba84d428130e9a0848865ddfa354e7652ec7a1a1d9ad4100a95fea92ce2be55abcf98b1ae176cc204d475e43294bb901c7aee3fa6cefbd759c8be + sha512sums = ecb0ecc6cb0470227834033eefd8f44e4ee83a0554059c9c01d8ce95182fc74b93a8cf75e148ecf449f9b0831ab0ee846929352afded3b20c6811c2c76ab60ea + sha512sums = 27e800b8514657aa8639ade7547f5ecdcbf56d656e1f268838b2423a1c943a657a3f198023917cc3de974aa9c32915872d4468e6b203d62f44a27cd78d80b319 + sha512sums = 0acb08a6e0eaba239db7461bcfeddfbe0c1aaa517dc33c3918c9e991a1d5067cfe135b7f75085caade8c3ababd51ec9cefcc4120f57818bea1f7029a548a7732 + +pkgname = redict diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..24ca83a3cff8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +* +!.gitignore +!PKGBUILD +!redict.conf-sane-defaults.patch +!redict-sentinel.service +!redict.service +!redict.sysusers +!redict.tmpfiles +!redict-use-system-jemalloc.patch +!.SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f24301893bc1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: "Amhairghin" Oscar Garcia Amor (https://ogarcia.me) +# Contributor: Andrew Crerar <crerar@archlinux.org> +# Contributor: Frederik Schwan <freswa at archlinux dot org> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org> +# Contributor: Jan-Erik Rediger <badboy at archlinux dot us> +# Contributor: nofxx <x@<nick>.com> + +pkgname=redict +pkgver=7.3.0+rc2 +pkgrel=1 +pkgdesc='A distributed key/value database' +arch=('x86_64') +url='https://redict.io/' +license=('LGPL-3.0-only') +depends=('jemalloc' 'grep' 'shadow' 'systemd-libs') +# pkg-config fails to detect systemd libraries if systemd is not installed +makedepends=('systemd' 'openssl') +backup=('etc/redict/redict.conf' + 'etc/redict/sentinel.conf') +source=("${pkgname}-${pkgver//+/-}.tar.gz::https://codeberg.org/redict/redict/archive/${pkgver//+/-}.tar.gz" + redict.service + redict-sentinel.service + redict.sysusers + redict.tmpfiles + redict.conf-sane-defaults.patch + redict-use-system-jemalloc.patch) +sha512sums=('aa79c9edf42ff3fc2eaaae568c2c2346bf6b02f8587476c5c24d627738886ed4c01095cc379ade35a9132245f984c1fc2191f1383598ea73eb67379809805528' + 'bafdd8d5bb16eb651e6dbed2fbd85c8a2264e5063cdc590add10f79879cb0e3dd3ea65635cb0f2502b272b9ad08704461ebec2523eb5263130ae01b1e5fc6983' + 'b72ee96c78e9c2e760f8241f109c7c91ebf0d5ba699af7e05e28e0f4eab8864e43673fca074a11730223e22b93f109c9739ea92f429332f7dc37ae8d6d7ad691' + '94556abeb7eba84d428130e9a0848865ddfa354e7652ec7a1a1d9ad4100a95fea92ce2be55abcf98b1ae176cc204d475e43294bb901c7aee3fa6cefbd759c8be' + 'ecb0ecc6cb0470227834033eefd8f44e4ee83a0554059c9c01d8ce95182fc74b93a8cf75e148ecf449f9b0831ab0ee846929352afded3b20c6811c2c76ab60ea' + '27e800b8514657aa8639ade7547f5ecdcbf56d656e1f268838b2423a1c943a657a3f198023917cc3de974aa9c32915872d4468e6b203d62f44a27cd78d80b319' + '0acb08a6e0eaba239db7461bcfeddfbe0c1aaa517dc33c3918c9e991a1d5067cfe135b7f75085caade8c3ababd51ec9cefcc4120f57818bea1f7029a548a7732') + +prepare() { + cd ${pkgname} + patch -Np1 < ../redict.conf-sane-defaults.patch + patch -Np1 < ../redict-use-system-jemalloc.patch +} + +build() { + make BUILD_TLS=yes \ + USE_SYSTEMD=yes \ + -C ${pkgname} +} + +package() { + cd ${pkgname} + make PREFIX="${pkgdir}"/usr install + + install -Dm644 -t "${pkgdir}"/etc/redict redict.conf sentinel.conf + install -Dm644 -t "${pkgdir}"/usr/lib/systemd/system/ ../redict.service ../redict-sentinel.service + install -Dm644 "${srcdir}"/redict.sysusers "${pkgdir}"/usr/lib/sysusers.d/redict.conf + install -Dm644 "${srcdir}"/redict.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/redict.conf +} diff --git a/redict-sentinel.service b/redict-sentinel.service new file mode 100644 index 000000000000..f75d16761eab --- /dev/null +++ b/redict-sentinel.service @@ -0,0 +1,24 @@ +[Unit] +Description=High availability daemon for Redict +After=network.target + +[Service] +Type=notify +User=redict +Group=redict +ExecStart=/usr/bin/redict-sentinel /etc/redict/sentinel.conf --supervised systemd +TimeoutStartSec=60 +TimeoutStopSec=60 +CapabilityBoundingSet= +PrivateTmp=true +PrivateDevices=true +ProtectSystem=full +ProtectHome=true +ReadWritePaths=/etc/redict/ +NoNewPrivileges=true +RuntimeDirectory=redict +RuntimeDirectoryMode=755 +LimitNOFILE=10032 + +[Install] +WantedBy=multi-user.target diff --git a/redict-use-system-jemalloc.patch b/redict-use-system-jemalloc.patch new file mode 100644 index 000000000000..7597a7e49b36 --- /dev/null +++ b/redict-use-system-jemalloc.patch @@ -0,0 +1,15 @@ +diff --git a/src/Makefile b/src/Makefile +index 3bc9f11c0..a4b23d986 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -229,8 +229,8 @@ endif + + ifeq ($(MALLOC),jemalloc) + DEPENDENCY_TARGETS+= jemalloc +- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include +- FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS) ++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE -I/usr/include/jemalloc ++ FINAL_LIBS := -ljemalloc $(FINAL_LIBS) + endif + + ifeq ($(BUILD_TLS),yes) diff --git a/redict.conf-sane-defaults.patch b/redict.conf-sane-defaults.patch new file mode 100644 index 000000000000..787522cb31a8 --- /dev/null +++ b/redict.conf-sane-defaults.patch @@ -0,0 +1,13 @@ +diff --git a/redict.conf b/redict.conf +index 465d56fc0..9c1bd1ed1 100644 +--- a/redict.conf ++++ b/redict.conf +@@ -441,7 +441,7 @@ rdb-del-sync-files no + # The Append Only File will also be created inside this directory. + # + # Note that you must specify a directory here, not a file name. +-dir ./ ++dir /var/lib/redict/ + + ################################# REPLICATION ################################# + diff --git a/redict.service b/redict.service new file mode 100644 index 000000000000..e11b3fcdd489 --- /dev/null +++ b/redict.service @@ -0,0 +1,23 @@ +[Unit] +Description=Advanced key-value store +After=network.target + +[Service] +Type=notify +User=redict +Group=redict +ExecStart=/usr/bin/redict-server /etc/redict/redict.conf --supervised systemd +TimeoutStartSec=60 +TimeoutStopSec=60 +CapabilityBoundingSet= +PrivateTmp=true +PrivateDevices=true +ProtectSystem=full +ProtectHome=true +NoNewPrivileges=true +RuntimeDirectory=redict +RuntimeDirectoryMode=755 +LimitNOFILE=10032 + +[Install] +WantedBy=multi-user.target diff --git a/redict.sysusers b/redict.sysusers new file mode 100644 index 000000000000..d9b5d2040fdf --- /dev/null +++ b/redict.sysusers @@ -0,0 +1 @@ +u redict - "Redict in-memory data structure store" /var/lib/redict diff --git a/redict.tmpfiles b/redict.tmpfiles new file mode 100644 index 000000000000..1419a3512ee6 --- /dev/null +++ b/redict.tmpfiles @@ -0,0 +1,3 @@ +d /var/lib/redict 0700 redict redict +d /etc/redict 0755 root redict +f /etc/redict/sentinel.conf 0664 root redict |