From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2 07/10] samba: adapt package's '/var/lib' and '/var/cache' requirements
Date: Fri, 28 Jun 2019 09:43:40 +0200 [thread overview]
Message-ID: <20190628074343.6700-8-jbe@pengutronix.de> (raw)
In-Reply-To: <20190628074343.6700-2-jbe@pengutronix.de>
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
...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 <juergen@kreuzholzen.de>
+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 <juergen@kreuzholzen.de>
+---
+ 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
next prev parent reply other threads:[~2019-06-28 7:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 7:43 [ptxdist] [PATCH v2 01/10] rootfs: keep /var writable, even if the rootfs is read-only Juergen Borleis
2019-06-28 7:43 ` [ptxdist] [PATCH v2 02/10] conman: adapt package's '/var/lib' requirements Juergen Borleis
2019-06-28 7:43 ` [ptxdist] [PATCH v2 03/10] networkmanager: " Juergen Borleis
2019-06-28 7:43 ` [ptxdist] [PATCH v2 04/10] ntp: adapt package's '/var/lib' and '/var/log' requirements Juergen Borleis
2019-06-28 7:43 ` [ptxdist] [PATCH v2 05/10] dnsmasq: adapt package's '/var/lib' requirements Juergen Borleis
2019-06-28 7:43 ` [ptxdist] [PATCH v2 06/10] mariadb: " Juergen Borleis
2019-06-28 7:43 ` Juergen Borleis [this message]
2019-06-28 7:43 ` [ptxdist] [PATCH v2 08/10] samba: show SysV related menue on demand only Juergen Borleis
2019-06-28 7:43 ` [ptxdist] [PATCH v2 09/10] nfsutils: adapt package's '/var/lib' requirements Juergen Borleis
2019-06-28 7:43 ` [ptxdist] [PATCH v2 10/10] logrotate: " Juergen Borleis
2019-06-28 7:46 ` [ptxdist] [PATCH v2 01/10] rootfs: keep /var writable, even if the rootfs is read-only Juergen Borleis
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=20190628074343.6700-8-jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--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