mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 11/20] samba: adapt package's '/var/lib' and '/var/cache' requirements
Date: Fri, 7 Jun 2019 09:15:39 +0200	[thread overview]
Message-ID: <20190607071539.tn5n4hx6gfzz5sld@pengutronix.de> (raw)
In-Reply-To: <20190605125421.20087-12-jbe@pengutronix.de>

On Wed, Jun 05, 2019 at 02:54:12PM +0200, Juergen Borleis wrote:
> 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                                |  9 ++++-
>  3 files changed, 49 insertions(+), 2 deletions(-)
>  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..822a9758a 100644
> --- a/rules/samba.in
> +++ b/rules/samba.in
> @@ -17,8 +17,10 @@ menuconfig SAMBA
>  	select LIBCAP
>  	select LIBPOPT
>  	select READLINE
> -	select SYSTEMD				if SAMBA_SYSTEMD_UNIT
> +	select SYSTEMD				if SAMBA_SYSTEMD_UNIT && RUNTIME

No, parts of samba link to libsystemd, so this is a build-time dependency
as well.

>  	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
> @@ -64,7 +69,7 @@ config SAMBA_CUPS
>  config SAMBA_STARTSCRIPT
>  	bool
>  	default y
> -	depends on SAMBA_SERVER
> +	depends on SAMBA_SERVER && !INITMETHOD_SYSTEMD

This should be separate. None of the start scripts conflict with
INITMETHOD_SYSTEMD so far.
I think, all of them should depend on INITMETHOD_BBINIT instead.

Michael

>  	prompt "install /etc/init.d/samba"
>  
>  config SAMBA_SYSTEMD_UNIT
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2019-06-07  7:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 12:54 [ptxdist] More collected changes Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 01/20] rootfs: keep /var writable, even if the rootfs is read-only Juergen Borleis
2019-06-24  6:48   ` [ptxdist] [PATCH] fixup! " Michael Olbrich
2019-06-24  6:57     ` Michael Olbrich
2019-06-05 12:54 ` [ptxdist] [PATCH 02/20] rootfs: keep '/var/tmp' permissions in sync with 'systemd' Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 03/20] rootfs: '/var' is a mandatory directory according to FHS Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 04/20] conman: adapt package's '/var/lib' requirements Juergen Borleis
2019-06-11  8:17   ` Michael Olbrich
2019-06-05 12:54 ` [ptxdist] [PATCH 05/20] networkmanager: " Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 06/20] ntp: adapt package's '/var/lib' and '/var/log' requirements Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 07/20] dnsmasq: version bump 2.79 -> 2.80 Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 08/20] dnsmasq: clean up rule file Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 09/20] dnsmasq: adapt package's '/var/lib' requirements Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 10/20] mariadb: " Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 11/20] samba: adapt package's '/var/lib' and '/var/cache' requirements Juergen Borleis
2019-06-07  7:15   ` Michael Olbrich [this message]
2019-06-05 12:54 ` [ptxdist] [PATCH 12/20] polkit: adapt package's '/var/lib' requirements Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 13/20] nfsutils: " Juergen Borleis
2019-06-07  7:25   ` Michael Olbrich
2019-06-05 12:54 ` [ptxdist] [PATCH 14/20] logrotate: " Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 15/20] systemd: adapt package's '/var/lib' and '/var/cache' requirements Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 16/20] sysstat: adapt package's '/var/log' requirements Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 17/20] minicoredumper: adapt package's '/var/cache' requirements Juergen Borleis
2019-06-07  7:27   ` Michael Olbrich
2019-06-05 12:54 ` [ptxdist] [PATCH 18/20] opkg: move opkg-database to a read-only location Juergen Borleis
2019-06-11  8:19   ` Michael Olbrich
2019-06-05 12:54 ` [ptxdist] [PATCH 19/20] dbus: adapt run-time socket path Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 20/20] Update and sync autotools based package templates 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=20190607071539.tn5n4hx6gfzz5sld@pengutronix.de \
    --to=m.olbrich@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