all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: fesoj000 <fesoj000@gmail.com>, 54561@debbugs.gnu.org
Subject: [bug#54561] [PATCH 1/4] services: Add samba service.
Date: Sun, 27 Mar 2022 16:13:46 +0200	[thread overview]
Message-ID: <02c2e04f0ef7404aab26e2c590cf3cd44634c74d.camel@telenet.be> (raw)
In-Reply-To: <2f1eb553-2d1d-2e83-1412-948011d502cc@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1797 bytes --]

fesoj000 schreef op zo 27-03-2022 om 03:07 [+0200]:
> > +(define (samba-activation config)
> > +  (let ((package (samba-configuration-package config))
> > +        (config-file (samba-configuration-config-file config)))
> > +    (with-imported-modules '((guix build utils))
> > +      (let ((lib-directory "/var/lib/samba")
> > +            (log-directory "/var/log/samba")
> > +            (run-directory "/var/run/samba")
> > +            (smb.conf "/etc/samba/smb.conf"))

Is it necessary to put the configuration file there?
Can be we do something like (system* "/.../testparm" #$smb.conf), where
smb.conf is the generated configuration file?

> > +        #~(begin
> > +            (use-modules (guix build utils))
> > +
> > +            (mkdir-p #$log-directory)
> > +            (mkdir-p #$run-directory)
> > +            (mkdir-p (string-append #$lib-directory "/private"))
> > +            (mkdir-p "/etc/samba")
> > +            (copy-file #$config-file #$smb.conf)
> > +            (system* (string-append #$package "/bin/testparm")
> > +                     "--suppress-prompt" #$smb.conf))))))
> Is it a good idea to create all those directories with the default
> umask? I always wanted to investigate which of those directories
> contains sensitive data. I never got around to.

FWIW, you can use 'mkdir-p/perms' to set the permission bits.
The (string-append ...) can be simplified to:

  (system* #$(file-append package "/bin/testparm" "--suppres-prompt
#$smb.conf).

Also, would it be a good idea to use (invoke ...) instead of system, to
make sure errors are detected?  What is the 'suppress-prompt' for?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2022-03-27 14:14 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25  8:48 [bug#54561] [PATCH 0/4] Add service declarations for Samba Simon Streit
2022-03-24 21:10 ` [bug#54561] [PATCH 3/4] doc: Add documentation for WSDD service Simon Streit
2022-03-24 21:14 ` [bug#54561] [PATCH 4/4] services: Add wsdd service Simon Streit
2022-03-25  9:16   ` Simon Streit
2022-03-25 12:02     ` Simon Streit
2022-03-25  9:00 ` [bug#54561] [PATCH 1/4] services: Add samba service Simon Streit
2022-03-27  1:07   ` fesoj000
2022-03-27 14:13     ` Maxime Devos [this message]
2022-03-27 18:32       ` Simon Streit
2022-04-08 18:21       ` [bug#54561] v2 [PATCH 0/5] Add service declarations for Samba Simon Streit
2022-04-08 18:21         ` [bug#54561] v2 [PATCH 1/5] services: Add samba service Simon Streit
2022-04-08 21:26           ` [bug#54561] [PATCH 0/4] Add service declarations for Samba Ludovic Courtès
2022-04-08 18:21         ` [bug#54561] v2 [PATCH 2/5] doc: Add "Samba" chapter Simon Streit
2022-04-08 21:35           ` [bug#54561] [PATCH 0/4] Add service declarations for Samba Ludovic Courtès
2022-04-08 18:21         ` [bug#54561] v2 [PATCH 3/5] doc: Add documentation for WSDD service Simon Streit
2022-04-08 21:41           ` [bug#54561] [PATCH 0/4] Add service declarations for Samba Ludovic Courtès
2022-04-09  8:29           ` [bug#54561] v2 [PATCH 3/5] doc: Add documentation for WSDD service Maxime Devos
2022-04-08 18:21         ` [bug#54561] v2 [PATCH 4/5] services: Add wsdd service Simon Streit
2022-04-08 21:43           ` [bug#54561] [PATCH 0/4] Add service declarations for Samba Ludovic Courtès
2022-04-08 18:21         ` [bug#54561] v2 [PATCH 5/5] gnu: Add wsdd Simon Streit
2022-04-08 21:23         ` [bug#54561] [PATCH 0/4] Add service declarations for Samba Ludovic Courtès
2022-03-27 18:48     ` [bug#54561] [PATCH 1/4] services: Add samba service Simon Streit
2022-03-27 18:58       ` fesoj000
2022-03-25  9:01 ` [bug#54561] [PATCH 2/4] doc: Add "Samba" chapter Simon Streit
2022-03-27  1:07   ` fesoj000
2022-03-27 14:15   ` Maxime Devos
2022-03-27 18:51     ` Simon Streit
2022-03-25 15:14 ` [bug#54561] [PATCH] gnu: samba: Modify input list Simon Streit
2022-03-27 19:22 ` [bug#54561] [PATCH] gnu: libdaemon: fix build for riscv64 fesoj000
2022-03-27 19:23   ` fesoj000
2022-08-08 14:56 ` [bug#54561] [PATCH v3 0/4] Add samba and wsdd to services list simon
2022-08-08 14:56   ` [bug#54561] [PATCH v3 1/4] gnu: samba: Add avahi to inputs simon
2022-08-08 14:56   ` [bug#54561] [PATCH v3 2/4] services: Add samba service simon
2022-08-08 14:56   ` [bug#54561] [PATCH v3 3/4] gnu: Add wsdd simon
2022-08-08 14:56   ` [bug#54561] [PATCH v3 4/4] services: Add wsdd service simon
2022-09-24  7:48   ` bug#54561: [PATCH v3 0/4] Add samba and wsdd to services list Lars-Dominik Braun
2022-09-25  8:22     ` [bug#54561] " Lars-Dominik Braun

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=02c2e04f0ef7404aab26e2c590cf3cd44634c74d.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=54561@debbugs.gnu.org \
    --cc=fesoj000@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.