From patchwork Tue Jun 2 10:40:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Titouan Christophe X-Patchwork-Id: 1302333 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.136; helo=silver.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=yXfAJXmv; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49bpV90ddFz9sSy for ; Tue, 2 Jun 2020 20:40:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 745301FE49; Tue, 2 Jun 2020 10:40:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SRTs-yrs1YQM; Tue, 2 Jun 2020 10:40:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 731A21FEBF; Tue, 2 Jun 2020 10:40:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 172471BF27A for ; Tue, 2 Jun 2020 10:40:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 03FCF2078B for ; Tue, 2 Jun 2020 10:40:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1dLNLHfGsmD3 for ; Tue, 2 Jun 2020 10:40:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by silver.osuosl.org (Postfix) with ESMTPS id D4E9020110 for ; Tue, 2 Jun 2020 10:40:39 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id r7so2901182wro.1 for ; Tue, 02 Jun 2020 03:40:39 -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=3AsvKH5ARmzDJ/p5cz3yeEZvCJzdySginyBOEW+irps=; b=yXfAJXmviKGbF5Bx+GVRt8rUAjbIwIMVgmaviKoagGnbXCu3wWnHOS2QpJY/qBkUMj BFAHzqj2DdvokMyph3fKkapRXRt/g+Ijdx8FbqjRnudk6ApHQWMa2JyNVJ7ftjDiHi0v RRndRo0v1O5Mso98W+4JVkxcBC/FnUkpyVUDmrCxwR5LllBsTpfRQKnyoOMR9eTHp0er 7gqiKz4/m4nGhubT7I2hOFUCNjc6j/Pm6S5phnrXkA//f8/0vpXevtIOz2MjLc37PfVd BQk08/9GbedDCWEEz2GnVxJqXXDmJLQtpItcW6r4OCPASSa5po5JYF12cHQHMFuPe0mp nUVw== 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=3AsvKH5ARmzDJ/p5cz3yeEZvCJzdySginyBOEW+irps=; b=fJ631rHn27uEAZ8sqbzvZG8TJLN/4F0W3dINfdSN10Ld+muHqjre249JRDS0CLRzsG F8ssnNRU/S1aIn4Sp1XKAbJz/LxkF6/6siqpmejyKqer2kCmc56xV+koH8vEfkl0wmT9 Nz35jJjGVEIjWQ4/RcMkEOEk3jslfwv84/ud3tOAILcOy9TeZCLmRzjk2uEvzdmAilTm iSCiHqaP/fd5frr1/u83+VCKgJJ/xc2CsZLicW6WZBvYPTRiMdFkXVqOL+ghcQX/76Ku gYrV6Ju2gBlwopJUdVpOr+KE1TtN07ucqqChkZDmuOeDFIYJbr+fu17z/DJXrms3rMt5 MLBw== X-Gm-Message-State: AOAM532gdz4eGmSH8810ELR0OmLH0IjyNW+6KGP2rYvFP5IWJUAmlVW2 7G2Bk0H+szdNLcbLeBaxbTsY18zuC2xP0w== X-Google-Smtp-Source: ABdhPJy+7q0eoOr9hF/9nszSWSE0KXSLhoi2R6ook/xuvWZBQorUb9Thl2uCtRORVGp/jfAiMvYlQA== X-Received: by 2002:adf:a491:: with SMTP id g17mr1711435wrb.132.1591094437975; Tue, 02 Jun 2020 03:40:37 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:63d3:7700:5fb9:2a66:a7a8:378f]) by smtp.gmail.com with ESMTPSA id g3sm3627738wrb.46.2020.06.02.03.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 03:40:37 -0700 (PDT) From: Titouan Christophe To: buildroot@buildroot.org Date: Tue, 2 Jun 2020 12:40:11 +0200 Message-Id: <20200602104011.837-5-titouan.christophe@railnova.eu> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200602104011.837-1-titouan.christophe@railnova.eu> References: <20200602104011.837-1-titouan.christophe@railnova.eu> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 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 c88e107c2b..1883f2fbaa 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