[arch-commits] Commit in redis/trunk (4 files)

Frederik Schwan freswa at archlinux.org
Tue Mar 9 13:47:30 UTC 2021


    Date: Tuesday, March 9, 2021 @ 13:47:29
  Author: freswa
Revision: 887046

implement redis-sentinel.service for the Redis HA Daemon

Added:
  redis/trunk/redis-sentinel.service
Modified:
  redis/trunk/PKGBUILD
  redis/trunk/redis.service
  redis/trunk/redis.tmpfiles

------------------------+
 PKGBUILD               |   18 +++++++++---------
 redis-sentinel.service |   24 ++++++++++++++++++++++++
 redis.service          |    2 +-
 redis.tmpfiles         |    2 ++
 4 files changed, 36 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-03-09 13:31:29 UTC (rev 887045)
+++ PKGBUILD	2021-03-09 13:47:29 UTC (rev 887046)
@@ -15,17 +15,20 @@
 depends=('jemalloc' 'grep' 'shadow' 'systemd-libs')
 # pkg-config fails to detect systemd libraries if systemd is not installed
 makedepends=('systemd' 'openssl')
-backup=('etc/redis.conf')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/antirez/redis/archive/${pkgver}.tar.gz"
+backup=('etc/redis/redis.conf'
+        'etc/redis/sentinel.conf')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/redis/redis/archive/${pkgver}.tar.gz"
         redis.service
+        redis-sentinel.service
         redis.sysusers
         redis.tmpfiles
         redis.conf-sane-defaults.patch
         redis-5.0-use-system-jemalloc.patch)
 sha512sums=('79108a10911698aef64412792574e75d8b5e41fa45e7631a9cd39bc704d2fce8648a494f25868c4cf6775afa8b56287a21cafbaee8c306803a2ddcb2b355ff7e'
-            'a3793d84f4da8eae68e0deda60ce2d7874a98562cd56be0bce07a54de99bad9ebba8db06051310a86587b6e8ddfcf401f6e1b089161981c68e25b6a63c56b52c'
+            '749c5eecfd6cd2ed949302672c20a7972dbef3a4b971ed569eb064362d7f20434b5c39077f665e178394158b5200375bc2e56614682fa08dbf99e868a9b75783'
+            '2314c26920f5f0989fb98622f594b621a0b5035525146263da3fdfe640257118e03fc1903c15a62bcd4fbf260e0dcbf9249088292323739a607a11c9630795bf'
             '2227dfb41bf5112f91716f011862ba5fade220aea3b6a8134a5a05ee3af6d1cca05b08d793a486be97df98780bf43ac5dc4e5e9989ae0c5cd4e1eedb6cee5d71'
-            '68f7bc12e3b95cb199b71255c6aa5bfaa431fbabbc7d2308e54347c0d35e6d8091c4a79a5a6b56494ab3a294f9389e3ec63902931920862f60b1ffe77222eeeb'
+            '6a817024df70213205159de8350c684684d7dbda568c35a0a3d654bab0b91ec62d60b1a2aac6e1ffbe24040df4033b37a77361357834c572759f2d3c76d16ac0'
             '9c43c858270d72cf5251d8226b0113f83c1749ad39b8ba286b7f90f05ad666d62ae7e17dc41a2d0a7bec833d65c98c7a3f12a30a93a28f0b1ab1c5a9e9a04a73'
             '0acb08a6e0eaba239db7461bcfeddfbe0c1aaa517dc33c3918c9e991a1d5067cfe135b7f75085caade8c3ababd51ec9cefcc4120f57818bea1f7029a548a7732')
 
@@ -46,11 +49,8 @@
   make PREFIX="$pkgdir"/usr install
 
   install -Dm644 COPYING "$pkgdir"/usr/share/licenses/redis/LICENSE
-  install -Dm644 redis.conf "$pkgdir"/etc/redis.conf
-  install -Dm644 ../redis.service "$pkgdir"/usr/lib/systemd/system/redis.service
-
-  ln -sf redis-server "$pkgdir"/usr/bin/redis-sentinel
-
+  install -Dm644 -t "$pkgdir"/etc/redis redis.conf sentinel.conf
+  install -Dm644 -t "$pkgdir"/usr/lib/systemd/system/ ../redis.service ../redis-sentinel.service
   install -Dm644 "$srcdir"/redis.sysusers "$pkgdir"/usr/lib/sysusers.d/redis.conf
   install -Dm644 "$srcdir"/redis.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/redis.conf
 }

Added: redis-sentinel.service
===================================================================
--- redis-sentinel.service	                        (rev 0)
+++ redis-sentinel.service	2021-03-09 13:47:29 UTC (rev 887046)
@@ -0,0 +1,24 @@
+[Unit]
+Description=High availability daemon for Redis
+After=network.target
+
+[Service]
+Type=notify
+User=redis
+Group=redis
+ExecStart=/usr/bin/redis-sentinel /etc/redis/sentinel.conf --supervised systemd
+TimeoutStartSec=60
+TimeoutStopSec=60
+CapabilityBoundingSet=
+PrivateTmp=true
+PrivateDevices=true
+ProtectSystem=full
+ProtectHome=true
+ReadWritePaths=/etc/redis/
+NoNewPrivileges=true
+RuntimeDirectory=redis
+RuntimeDirectoryMode=755
+LimitNOFILE=10032
+
+[Install]
+WantedBy=multi-user.target

Modified: redis.service
===================================================================
--- redis.service	2021-03-09 13:31:29 UTC (rev 887045)
+++ redis.service	2021-03-09 13:47:29 UTC (rev 887046)
@@ -6,7 +6,7 @@
 Type=notify
 User=redis
 Group=redis
-ExecStart=/usr/bin/redis-server /etc/redis.conf
+ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
 TimeoutStartSec=60
 TimeoutStopSec=60
 CapabilityBoundingSet=

Modified: redis.tmpfiles
===================================================================
--- redis.tmpfiles	2021-03-09 13:31:29 UTC (rev 887045)
+++ redis.tmpfiles	2021-03-09 13:47:29 UTC (rev 887046)
@@ -1 +1,3 @@
 d /var/lib/redis 0700 redis redis
+d /etc/redis 0775 root redis
+f /etc/redis/sentinel.conf 0664 root redis



More information about the arch-commits mailing list