samba icon indicating copy to clipboard operation
samba copied to clipboard

Add support for multi-line strings in SAMBA_VOLUME_CONFIG_ variables

Open nakermann1973 opened this issue 3 years ago • 3 comments

I have added an example of the updated format in the sample docker-compose.yml. This makes it a lot more readable in my opinion

Reference: https://yaml-multiline.info/

nakermann1973 avatar Mar 26 '22 10:03 nakermann1973

Hi there, thanks for your work! Seems like you put a lot of effort into this.

I'll need some time to check all, maybe I'll integrate it manually or only partially.

MarvAmBass avatar Mar 28 '22 05:03 MarvAmBass

Hi. I don't use git much, and forgot that further changes to a branch would show up in the pull request.

There are two separate changes here.

The first is one which allows environment variables with embedded newlines, and thus also allows the multiline format yaml config (that is https://github.com/ServerContainers/samba/pull/60/commits/8417e08eeb25e29c75dcd34cf35f0eb7f16f856b)

The second set of changes tries to ensure that the scripts and commands executed in them are work under both alpine and debian. ash is the default shell installed in alpine (through busybox), but /bin/sh in debian has fewer features. Also the adduser/addgroup commands need long format arguments to be compatible. I need to use debian because the samba packages in alpine do not have a vfs driver for ceph.

I only intended the first pull request to be sent. I can split this up into two separate PRs if you want, to make it easier to reason about.

nakermann1973 avatar Mar 28 '22 08:03 nakermann1973

no no it's fine, I could cherry pick those - I also kinda like that you made those command work in alpine and debian

-> maybe I'll create an automatically build debian flavor using this technique

thanks :)

MarvAmBass avatar Mar 28 '22 08:03 MarvAmBass

@MarvAmBass any idea if this change is still being considered for acceptance? This is one of the few things that would really make a drastic difference (IMO) in maintaining/reading the compose definition for this image.

maverick1872 avatar Jan 08 '24 07:01 maverick1872

Hi there, thanks for pinging - I have to admit I forgot about this issue

maybe I find some time to test this

MarvAmBass avatar Jan 08 '24 07:01 MarvAmBass

Hi @nakermann1973 thanks again for this pull request, unfortunately I forgot about it, but I merged the important stuff by hand now.

@maverick1872 thanks to you for pinging me, so that I finally found time to add this feature 👍

MarvAmBass avatar Jan 08 '24 17:01 MarvAmBass