From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hglY1-0007rq-V8 for ptxdist@pengutronix.de; Fri, 28 Jun 2019 09:43:53 +0200 Received: from jbe by dude02.lab.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1hglY1-00029m-Iz for ptxdist@pengutronix.de; Fri, 28 Jun 2019 09:43:53 +0200 From: Juergen Borleis Date: Fri, 28 Jun 2019 09:43:40 +0200 Message-Id: <20190628074343.6700-8-jbe@pengutronix.de> In-Reply-To: <20190628074343.6700-2-jbe@pengutronix.de> References: <20190628074343.6700-2-jbe@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [PATCH v2 07/10] samba: adapt package's '/var/lib' and '/var/cache' requirements List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Signed-off-by: Juergen Borleis --- ...ate-expected-directories-at-run-time.patch | 38 +++++++++++++++++++ patches/samba-4.9.5/series | 4 ++ rules/samba.in | 5 +++ 3 files changed, 47 insertions(+) create mode 100644 patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch create mode 100644 patches/samba-4.9.5/series diff --git a/patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch b/patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch new file mode 100644 index 000000000..8569e0737 --- /dev/null +++ b/patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch @@ -0,0 +1,38 @@ +From: Juergen Borleis +Date: Tue, 4 Jun 2019 20:24:15 +0200 +Subject: [PATCH] Lets systemd create expected directories at run-time + +'samba' requires '/var/lib/samba' and '/var/cache/samba'. + +Signed-off-by: Juergen Borleis +--- + packaging/systemd/nmb.service.in | 2 ++ + packaging/systemd/smb.service.in | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/packaging/systemd/nmb.service.in b/packaging/systemd/nmb.service.in +index a30812320c05..c9373d2ba0a6 100644 +--- a/packaging/systemd/nmb.service.in ++++ b/packaging/systemd/nmb.service.in +@@ -8,6 +8,8 @@ After=network.target network-online.target + Type=notify + NotifyAccess=all + PIDFile=@PIDDIR@/nmbd.pid ++StateDirectory=samba ++CacheDirectory=samba + EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba + ExecStart=@SBINDIR@/nmbd --foreground --no-process-group $NMBDOPTIONS + ExecReload=/bin/kill -HUP $MAINPID +diff --git a/packaging/systemd/smb.service.in b/packaging/systemd/smb.service.in +index 18912ef0e98f..76aedfa20337 100644 +--- a/packaging/systemd/smb.service.in ++++ b/packaging/systemd/smb.service.in +@@ -9,6 +9,8 @@ Type=notify + NotifyAccess=all + PIDFile=@PIDDIR@/smbd.pid + LimitNOFILE=16384 ++StateDirectory=samba ++CacheDirectory=samba + EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba + ExecStart=@SBINDIR@/smbd --foreground --no-process-group $SMBDOPTIONS + ExecReload=/bin/kill -HUP $MAINPID diff --git a/patches/samba-4.9.5/series b/patches/samba-4.9.5/series new file mode 100644 index 000000000..b2dcdc0a4 --- /dev/null +++ b/patches/samba-4.9.5/series @@ -0,0 +1,4 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Lets-systemd-create-expected-directories-at-run-time.patch +# 2d2f83b2911fe3f43bff610738827040 - git-ptx-patches magic diff --git a/rules/samba.in b/rules/samba.in index ec5423661..aeaf90a75 100644 --- a/rules/samba.in +++ b/rules/samba.in @@ -19,6 +19,8 @@ menuconfig SAMBA select READLINE select SYSTEMD if SAMBA_SYSTEMD_UNIT select ZLIB + select ROOTFS_VAR_LIB if RUNTIME + select ROOTFS_VAR_CACHE if RUNTIME help Samba is an Open Source/Free Software suite that has, since 1992, provided file and print services to all manner of @@ -28,6 +30,9 @@ menuconfig SAMBA See http://www.samba.org for details. + Note: on a read-only root filesystem this package still requires a + writable '/var/lib' and '/var/cache'. + if SAMBA config SAMBA_COMMON -- 2.20.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de