From patchwork Sat May 9 16:50:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Titouan Christophe X-Patchwork-Id: 1286743 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=railnova.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=railnova-eu.20150623.gappssmtp.com header.i=@railnova-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=LRdPYAaL; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KCrk2nvbz9sNH for ; Sun, 10 May 2020 02:51:18 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B70CB8878B; Sat, 9 May 2020 16:51:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MQuUJ+mNliJE; Sat, 9 May 2020 16:51:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 237B1887BF; Sat, 9 May 2020 16:51:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id C9C211BF335 for ; Sat, 9 May 2020 16:51:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C677286D92 for ; Sat, 9 May 2020 16:51:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gUpnygSumBpE for ; Sat, 9 May 2020 16:51:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by fraxinus.osuosl.org (Postfix) with ESMTPS id B2B4A86D78 for ; Sat, 9 May 2020 16:50:57 +0000 (UTC) Received: by mail-wm1-f54.google.com with SMTP id h4so13362589wmb.4 for ; Sat, 09 May 2020 09:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=railnova-eu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BgDbBjv7yAJBze65jORiZ9qn/t1eq5M2KNGrDH3M+00=; b=LRdPYAaL2jL1HHJyGkQjqqbvySQtqH/Jy16zzdPR52aTZM6c1YwwDzhaGCmdpG0304 IgKJ53jqfJU+9Z3HfcI2WAw5ENlw8MHi8Y2TS++3FxtI9vBVpTVj2Usr22l2mbkTDQK8 zDk1QZGmteRgR2uJqyGMkQtwyBubkRz9oI9AapPJ8Ww9Kh8rszsvwgPtzRN2NbbsnJ9p Wcp3W3fYBzmxaJ32iB4YfFeBeRDIuO6fq6o9YnZfMDsRO9P/JYNBJwnrBX3DwFoTUhRq KqrfiBGW9J7PYf0UAxao7wj/9cwyUiGIMMvtDyCsS3jSCzptm4CCB7T9YrFI/dqmbmwi ecIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BgDbBjv7yAJBze65jORiZ9qn/t1eq5M2KNGrDH3M+00=; b=UomiubTc9Tsjwh7Y6dVD0ZAVuV748GiyJpDyeJ+PcWVfw0/mhSaGQ0FsiNwPDW+sBU IIKY7AaIOwz//5GMpXZpBh06HTQGGb0eoM64KTIEGyCzTXDBcueqBjS0MQzJvbUhmWVu A4kHM2CB4ZIv2tIB5+px8VMgqqqTuytLsLx2Ds+354WZkiEikBO431lvTiIyr9SsuQkn zpCV5sREw/V4sSRHjWnVum6WrmERmceiLQoB5aDrZ7irOrycGpHx4LfioZpc3ej7C49G EziKaNMKDWF/I0IGc+DIhvPFAx0UWHzvQB1TaKVuBIZL1yJpkd2mdrtJqgB9c1Jl/dx3 0Hwg== X-Gm-Message-State: AGi0PuaCKNSnLaBREk3D+gjA1LhQLXhGBF71aRYDofk/X8WwKbQ1bXIj 0Sc3NZGc4CSD3+m1xMlaC+9gbS4UVtclTA== X-Google-Smtp-Source: APiQypJhwjgyhpizvMPjDY+D5cZLLZg/QkPeCEkkLvsblwgFF07dqY7YThcUnUWhXY3z7LHb9ea/og== X-Received: by 2002:a1c:5642:: with SMTP id k63mr21809305wmb.188.1589043055913; Sat, 09 May 2020 09:50:55 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:63d3:7700:cd2f:ad0c:9163:73be]) by smtp.gmail.com with ESMTPSA id u127sm18577787wme.8.2020.05.09.09.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 09:50:55 -0700 (PDT) From: Titouan Christophe To: buildroot@buildroot.org Date: Sat, 9 May 2020 18:50:39 +0200 Message-Id: <20200509165039.10363-5-titouan.christophe@railnova.eu> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200509165039.10363-1-titouan.christophe@railnova.eu> References: <20200509165039.10363-1-titouan.christophe@railnova.eu> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 4/4] package/redis: add optional support for systemd X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Price , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" - Use the unit type=notify (Redis contacts systemd when ready) - Start redis with the supervised option, so it knows it should talk to systemd Signed-off-by: Titouan Christophe --- package/redis/redis.mk | 4 ++++ package/redis/redis.service | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package/redis/redis.mk b/package/redis/redis.mk index c83a3a0775..8d4c3947fc 100644 --- a/package/redis/redis.mk +++ b/package/redis/redis.mk @@ -30,6 +30,10 @@ endif REDIS_BUILDOPTS = $(TARGET_CONFIGURE_OPTS) \ PREFIX=$(TARGET_DIR)/usr MALLOC=libc +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +REDIS_DEPENDENCIES += systemd +endif + ifeq ($(BR2_PACKAGE_LIBOPENSSL),y) REDIS_DEPENDENCIES += libopenssl REDIS_BUILDOPTS += BUILD_TLS=yes diff --git a/package/redis/redis.service b/package/redis/redis.service index 0a8162b8ab..2cc82a1980 100644 --- a/package/redis/redis.service +++ b/package/redis/redis.service @@ -1,13 +1,15 @@ [Unit] -Description=Advanced key-value store +Description=Redis data structure server +Documentation=https://redis.io/documentation After=network.target [Service] -Type=simple +Type=notify User=redis Group=redis -ExecStart=/usr/bin/redis-server /etc/redis.conf -ExecStop=/usr/bin/redis-cli shutdown +ExecStart=/usr/bin/redis-server --supervised systemd --daemonize no +TimeoutStartSec=5 +TimeoutStopSec=5 CapabilityBoundingSet= PrivateTmp=true PrivateDevices=true