GNU bug report logs - #24834
Samba commands expect configuration file inside store

Previous Next

Package: guix;

Reported by: Adonay Felipe Nogueira <adfeno <at> openmailbox.org>

Date: Mon, 31 Oct 2016 10:19:01 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24834 in the body.
You can then email your comments to 24834 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#24834; Package guix. (Mon, 31 Oct 2016 10:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Adonay Felipe Nogueira <adfeno <at> openmailbox.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 31 Oct 2016 10:19:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Adonay Felipe Nogueira <adfeno <at> openmailbox.org>
To: Relatórios de falhas do Guix e GuixSD <bug-guix <at> gnu.org>
Subject: Samba commands expect configuration file inside store
Date: Mon, 31 Oct 2016 08:17:54 -0200
[Message part 1 (text/plain, inline)]
# Begin of terminal interaction
$ strace ".guix-profile/sbin/samba/smbd"
stat64("/gnu/store/...-samba-4.5.0/etc/samba/smb.conf", 0xbfeb41b0) = -1
ENOENT (No such file or directory)
open("/gnu/store/...-samba-4.5.0/etc/samba/smb.conf", O_RDONLY|
O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2001, ...}) = 0
exit_group(1)                           = ?
+++ exited with 1 +++
# End of terminal interaction

Sorry for my brevity, I'll return to this issue at a later time.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#24834; Package guix. (Thu, 03 Nov 2016 13:40:02 GMT) Full text and rfc822 format available.

Message #8 received at 24834 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Adonay Felipe Nogueira <adfeno <at> openmailbox.org>
Cc: 24834 <at> debbugs.gnu.org
Subject: Re: bug#24834: Samba commands expect configuration file inside store
Date: Thu, 03 Nov 2016 14:38:55 +0100
[Message part 1 (text/plain, inline)]
Adonay Felipe Nogueira <adfeno <at> openmailbox.org> skribis:

> # Begin of terminal interaction
> $ strace ".guix-profile/sbin/samba/smbd"
> stat64("/gnu/store/...-samba-4.5.0/etc/samba/smb.conf", 0xbfeb41b0) = -1

Presumably part of the solution is the attached patch, but very often
‘make install’ tries to mkdir $(sysconfdir), so a bit of additional work
may be needed.

Can you look into it?

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index 1706ec3..447720c 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -121,6 +121,7 @@ anywhere.")
                        ;; XXX: heimdal not packaged.
                        "--bundled-libraries=com_err"
                        (string-append "--prefix=" out)
+                       "--sysconfdir=/etc"
                        ;; Install public and private libraries into
                        ;; a single directory to avoid RPATH issues.
                        (string-append "--libdir=" libdir)

Information forwarded to bug-guix <at> gnu.org:
bug#24834; Package guix. (Fri, 18 Nov 2016 09:52:01 GMT) Full text and rfc822 format available.

Message #11 received at 24834 <at> debbugs.gnu.org (full text, mbox):

From: Adonay Felipe Nogueira <adfeno <at> openmailbox.org>
To: 24834 <at> debbugs.gnu.org
Subject: Re: bug#24834: Samba commands expect configuration file inside store
Date: Fri, 18 Nov 2016 07:50:54 -0200
Thank you for the suggestion!

I'll reinstall Samba from Guix here, and will test it.

I plan to do so this weekend.


Respectfully, Adonay.




Information forwarded to bug-guix <at> gnu.org:
bug#24834; Package guix. (Wed, 23 Nov 2016 10:46:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Adonay Felipe Nogueira <adfeno <at> openmailbox.org>
To: bug-guix <at> gnu.org
Subject: Re: bug#24834: Samba commands expect configuration file inside store
Date: Wed, 23 Nov 2016 08:44:54 -0200
[Message part 1 (text/plain, inline)]
Tested the patch today

It seems that, during the `install' phase, something tries to make
"/etc/samba" directory.

The log from the start of the error is attached.

I did `guix build samba` as normal user, and since I'm new to this
situation, I must ask: should I run it as root instead? Or should we
find a way to tell the `install' phase to not make such paths? Or, do
you have other ideas?
[guix build samba.log (application/octet-stream, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#24834; Package guix. (Wed, 23 Nov 2016 10:53:01 GMT) Full text and rfc822 format available.

Message #17 received at 24834 <at> debbugs.gnu.org (full text, mbox):

From: Adonay Felipe Nogueira <adfeno <at> openmailbox.org>
To: 24834 <at> debbugs.gnu.org
Subject: Re: bug#24834: Samba commands expect configuration file inside store
Date: Wed, 23 Nov 2016 08:52:36 -0200
[Message part 1 (text/plain, inline)]
Tested the patch today

It seems that, during the `install' phase, something tries to make
"/etc/samba" directory.

The log from the start of the error is attached.

I did `guix build samba` as normal user, and since I'm new to this
situation, I must ask: should I run it as root instead? Or should we
find a way to tell the `install' phase to not make such paths? Or, do
you have other ideas?
[guix build samba.log (application/octet-stream, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#24834; Package guix. (Wed, 23 Nov 2016 22:17:02 GMT) Full text and rfc822 format available.

Message #20 received at 24834 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Adonay Felipe Nogueira <adfeno <at> openmailbox.org>
Cc: 24834 <at> debbugs.gnu.org
Subject: Re: bug#24834: Samba commands expect configuration file inside store
Date: Wed, 23 Nov 2016 23:16:22 +0100
Hi,

Adonay Felipe Nogueira <adfeno <at> openmailbox.org> skribis:

> Tested the patch today
>
> It seems that, during the `install' phase, something tries to make
> "/etc/samba" directory.

[...]

>   File "/tmp/guix-build-samba-4.5.1.drv-0/samba-4.5.1/third_party/waf/wafadmin/Utils.py", line 458, in check_dir
>     raise WafError("Cannot create the folder '%s' (error: %s)" % (path, e))
> WafError: Cannot create the folder '/etc/samba' (error: [Errno 13] Permission denied: '/etc/samba')  
>
> make: *** [Makefile:11: install] Error 1
> phase `install' failed after 0.5 seconds

That’s a common issue as I mentioned in
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24834#8> (‘sysconfdir’
corresponds to /etc here.)

Do address it, we need to modify Samba’s build system to not attempt to
create /etc.  Samba uses Waf, so we’d have to comment out the Waf bit
that leads to this attempt to create /etc.  I’m not familiar with Waf so
I’d “grep -r” in the source.  :-)

Could you look into it?

There are similar cases in gnu/packages/*.scm but the fix always depends
on the specifics of the build system being used, so nothing that really
helps here I’m afraid.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#24834; Package guix. (Sun, 04 Dec 2016 00:08:01 GMT) Full text and rfc822 format available.

Message #23 received at 24834 <at> debbugs.gnu.org (full text, mbox):

From: Adonay Felipe Nogueira <adfeno <at> openmailbox.org>
To: 24834 <at> debbugs.gnu.org
Subject: Re: bug#24834: Samba commands expect configuration file inside store
Date: Sat, 03 Dec 2016 22:06:33 -0200
[Message part 1 (text/plain, inline)]
Here's a patch that tries to fix this issue. I already tested it, but
please do so also just in case.


Respectfully, Adonay.
[guix.patch (text/x-diff, attachment)]

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Wed, 07 Dec 2016 23:30:02 GMT) Full text and rfc822 format available.

Notification sent to Adonay Felipe Nogueira <adfeno <at> openmailbox.org>:
bug acknowledged by developer. (Wed, 07 Dec 2016 23:30:03 GMT) Full text and rfc822 format available.

Message #28 received at 24834-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Adonay Felipe Nogueira <adfeno <at> openmailbox.org>
Cc: 24834-done <at> debbugs.gnu.org
Subject: Re: bug#24834: Samba commands expect configuration file inside store
Date: Thu, 08 Dec 2016 00:29:38 +0100
Adonay Felipe Nogueira <adfeno <at> openmailbox.org> skribis:

> Here's a patch that tries to fix this issue. I already tested it, but
> please do so also just in case.
>
>
> Respectfully, Adonay.
>
> From 086396d33e113a6d991b7c63063844c66a5610ca Mon Sep 17 00:00:00 2001
> From: Adonay Felipe Nogueira <adfeno <at> openmailbox.org>
> Date: Sat, 3 Dec 2016 21:22:56 -0200
> Subject: [PATCH] gnu: samba: Don't expect configuration files inside the
>  store.
>
> Attempts to fix <https://bugs.gnu.org/24834>.
>
> * gnu/packages/samba.scm (samba) [arguments]:
>   * Set `--sysconfdir` to "/etc".
>   * Avoid creation of "/etc/samba" (otherwise would require root).

Apply with commit log and indentation tweaks.  It builds fine here.

Thank you!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 05 Jan 2017 12:24:08 GMT) Full text and rfc822 format available.

Changed bug submitter to 'adfeno <at> hyperbola.info' from 'Adonay Felipe Nogueira <adfeno <at> openmailbox.org>' Request was from Adonay Felipe Nogueira <adfeno <at> hyperbola.info> to control <at> debbugs.gnu.org. (Tue, 09 Jan 2018 13:43:02 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.