mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] redis: new package
Date: Fri, 3 Dec 2021 16:50:26 +0100	[thread overview]
Message-ID: <Yao8wk5ZFLZgoi2j@workstation.tuxnet> (raw)
In-Reply-To: <Yao6bZY5e3fPEPsZ@ada.ifak-system.com>

Hello Alex,

On Fri, Dec 03, 2021 at 04:40:29PM +0100, Alexander Dahl wrote:
> Hello Clemens,
> 
> Am Fri, Dec 03, 2021 at 04:28:39PM +0100 schrieb Clemens Gruber:
> > On Fri, Dec 03, 2021 at 04:17:06PM +0100, Roland Hieber wrote:
> > > On Thu, Dec 02, 2021 at 04:09:55PM +0100, Clemens Gruber wrote:
> > > > Adds a new package for redis, an open source (BSD licensed), in-memory
> > > > data structure store, used as a database, cache, and message broker.
> > > > 
> > > > Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > ---
> > > >  ...ort-systemd-and-set-a-data-directory.patch | 30 ++++++
> > > >  patches/redis-6.2.6/series                    |  4 +
> > > >  projectroot/etc/group                         |  1 +
> > > >  projectroot/etc/passwd                        |  1 +
> > > >  .../usr/lib/systemd/system/redis.service      | 23 +++++
> > > >  projectroot/usr/lib/tmpfiles.d/redis.conf     |  1 +
> > > >  rules/redis.in                                | 27 ++++++
> > > >  rules/redis.make                              | 96 +++++++++++++++++++
> > > >  8 files changed, 183 insertions(+)
> > > >  create mode 100644 patches/redis-6.2.6/0001-Support-systemd-and-set-a-data-directory.patch
> > > >  create mode 100644 patches/redis-6.2.6/series
> > > >  create mode 100644 projectroot/usr/lib/systemd/system/redis.service
> > > >  create mode 100644 projectroot/usr/lib/tmpfiles.d/redis.conf
> > > >  create mode 100644 rules/redis.in
> > > >  create mode 100644 rules/redis.make
> > > > 
> > > > diff --git a/patches/redis-6.2.6/0001-Support-systemd-and-set-a-data-directory.patch b/patches/redis-6.2.6/0001-Support-systemd-and-set-a-data-directory.patch
> > > > new file mode 100644
> > > > index 000000000..34d8fd283
> > > > --- /dev/null
> > > > +++ b/patches/redis-6.2.6/0001-Support-systemd-and-set-a-data-directory.patch
> > > > @@ -0,0 +1,30 @@
> > > > +From: Clemens Gruber <clemens.gruber@pqgruber.com>
> > > > +Date: Mon, 15 Nov 2021 16:21:31 +0100
> > > > +Subject: [PATCH] Support systemd and set a data directory
> > > > +
> > > > +---
> > > > + redis.conf | 4 ++--
> > > > + 1 file changed, 2 insertions(+), 2 deletions(-)
> > > > +
> > > > +diff --git a/redis.conf b/redis.conf
> > > > +index e8eff2774981..8f76ea1c84e4 100644
> > > > +--- a/redis.conf
> > > > ++++ b/redis.conf
> > > > +@@ -272,7 +272,7 @@ daemonize no
> > > > + # The default is "no". To run under upstart/systemd, you can simply uncomment
> > > > + # the line below:
> > > > + #
> > > > +-# supervised auto
> > > > ++supervised auto
> > > > + 
> > > > + # If a pid file is specified, Redis writes it where specified at startup
> > > > + # and removes it at exit.
> > > > +@@ -451,7 +451,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/redis/
> > > > + 
> > > > + ################################# REPLICATION #################################
> > > > + 
> > > > diff --git a/patches/redis-6.2.6/series b/patches/redis-6.2.6/series
> > > > new file mode 100644
> > > > index 000000000..1a299f8b7
> > > > --- /dev/null
> > > > +++ b/patches/redis-6.2.6/series
> > > > @@ -0,0 +1,4 @@
> > > > +# generated by git-ptx-patches
> > > > +#tag:base --start-number 1
> > > > +0001-Support-systemd-and-set-a-data-directory.patch
> > > > +# a122637ab2789578ffe3ff7cc6f22faf  - git-ptx-patches magic
> > > > diff --git a/projectroot/etc/group b/projectroot/etc/group
> > > > index 09df73ba0..69d650510 100644
> > > > --- a/projectroot/etc/group
> > > > +++ b/projectroot/etc/group
> > > > @@ -33,4 +33,5 @@ render:x:209:
> > > >  pulse:x:210:
> > > >  chrony:x:211:
> > > >  rauc-hawkbit:x:212:
> > > > +redis:x:213:
> > > >  nogroup:x:65534:
> > > > diff --git a/projectroot/etc/passwd b/projectroot/etc/passwd
> > > > index 529f49a77..b4669abb5 100644
> > > > --- a/projectroot/etc/passwd
> > > > +++ b/projectroot/etc/passwd
> > > > @@ -17,5 +17,6 @@ systemd-journal-upload:x:208:208:systemd-journal-upload:/dev/null:/bin/false
> > > >  pulse:x:209:210:pulse:/dev/null:/bin/false
> > > >  chrony:x:210:211:chrony:/dev/null:/bin/false
> > > >  rauc-hawkbit:x:211:212:rauc-hawkbit:/dev/null:/bin/false
> > > > +redis:x:212:213:redis:/dev/null:/bin/false
> > > >  rpcuser:x:65533:65534:RPC user:/dev/null:/bin/false
> > > >  nobody:x:65534:65534:Unprivileged Nobody:/dev/null:/bin/false
> > > > diff --git a/projectroot/usr/lib/systemd/system/redis.service b/projectroot/usr/lib/systemd/system/redis.service
> > > > new file mode 100644
> > > > index 000000000..715e64d69
> > > > --- /dev/null
> > > > +++ b/projectroot/usr/lib/systemd/system/redis.service
> > > > @@ -0,0 +1,23 @@
> > > > +[Unit]
> > > > +Description=Advanced key-value store
> > > > +After=network.target
> > > > +
> > > > +[Service]
> > > > +Type=notify
> > > > +User=redis
> > > > +Group=redis
> > > > +ExecStart=/usr/bin/redis-server /etc/redis.conf
> > > > +TimeoutStartSec=60
> > > > +TimeoutStopSec=60
> > > > +CapabilityBoundingSet=
> > > > +PrivateTmp=true
> > > > +PrivateDevices=true
> > > > +ProtectSystem=full
> > > > +ProtectHome=true
> > > > +NoNewPrivileges=true
> > > > +RuntimeDirectory=redis
> > > > +RuntimeDirectoryMode=755
> > > > +LimitNOFILE=10032
> > > 
> > > Magic number? Or is this really the maximum number of file descriptors
> > > that redis will ever need?
> > 
> > By default, Redis sets its maxclients variable to 10000. Number of
> > required FDs is apparently maxclients + 32. That's why some distros set
> > the FD limit to 10032. Debian sets it to 65535 but I think 10000 client
> > connections should be enough for embedded Linux usecases :)
> > I took the whole service file from ArchLinux btw.
> 
> Would it help to put that information (where the service unit came
> from) somewhere? Either commit message or comment in service unit?
> 
> Greets
> Alex

Yes, mentioning it in the commit message is a good idea.

Thanks,
Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


  reply	other threads:[~2021-12-03 15:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 15:09 Clemens Gruber
2021-12-03 15:17 ` Roland Hieber
2021-12-03 15:28   ` Clemens Gruber
2021-12-03 15:40     ` Alexander Dahl
2021-12-03 15:50       ` Clemens Gruber [this message]
     [not found] <20140724104658.GR25193@pengutronix.de>
2014-07-24 12:26 ` [ptxdist] [PATCH] redis : " Stéphane Massoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yao8wk5ZFLZgoi2j@workstation.tuxnet \
    --to=clemens.gruber@pqgruber.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox