Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/5] package/redis: Add redis system user
Date: Tue, 21 Jul 2015 15:27:56 +0200	[thread overview]
Message-ID: <20150721152756.1448370d@free-electrons.com> (raw)
In-Reply-To: <1437483774-30291-2-git-send-email-martin@barkynet.com>

Dear Martin Bark,

On Tue, 21 Jul 2015 14:02:51 +0100, Martin Bark wrote:
> Add a redis system user and set the home directory to /var/lib/redis
> 
> Signed-off-by: Martin Bark <martin@barkynet.com>
> ---
>  package/redis/redis.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/redis/redis.mk b/package/redis/redis.mk
> index 51c1f9c..633d411 100644
> --- a/package/redis/redis.mk
> +++ b/package/redis/redis.mk
> @@ -9,6 +9,10 @@ REDIS_SITE = http://download.redis.io/releases
>  REDIS_LICENSE = BSD-3c (core); MIT and BSD family licenses (Bundled components)
>  REDIS_LICENSE_FILES = COPYING
>  
> +define REDIS_USERS
> +	redis -1 redis -1 * /var/lib/redis /bin/sh - Redis Server

Does it really need to have a login shell?

> +endef
> +
>  # Redis doesn't support DESTDIR (yet, see
>  # https://github.com/antirez/redis/pull/609).  We set PREFIX
>  # instead.
> @@ -22,6 +26,7 @@ endef
>  define REDIS_INSTALL_TARGET_CMDS
>  	$(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D) \
>  		LDCONFIG=true install
> +	$(INSTALL) -d -m 0700 $(TARGET_DIR)/var/lib/redis

I don't think this line is needed, unless you want to install specific
things to /var/lib/redis, since specifying /var/lib/redis for the
REDIS_USERS is sufficient to get this directory created and chown-ed to
the right user.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-07-21 13:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 13:02 [Buildroot] [PATCH 1/5] package/redis: Bump version to 3.0.3 Martin Bark
2015-07-21 13:02 ` [Buildroot] [PATCH 2/5] package/redis: Add redis system user Martin Bark
2015-07-21 13:27   ` Thomas Petazzoni [this message]
2015-07-21 14:27     ` Martin Bark
2015-07-21 13:02 ` [Buildroot] [PATCH 3/5] package/redis: Install /etc/redis.conf to target Martin Bark
2015-07-21 13:02 ` [Buildroot] [PATCH 4/5] package/redis: Add systemV init script Martin Bark
2015-07-21 13:02 ` [Buildroot] [PATCH 5/5] package/redis: Add systemd service Martin Bark
2015-07-21 21:19 ` [Buildroot] [PATCH 1/5] package/redis: Bump version to 3.0.3 Thomas Petazzoni

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=20150721152756.1448370d@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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