unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* mutt builds to fail on a barebones sytem
@ 2016-07-14 15:14 Carlos Sánchez de La Lama
  2016-07-14 19:10 ` ng0
  2016-07-14 22:21 ` Leo Famulari
  0 siblings, 2 replies; 7+ messages in thread
From: Carlos Sánchez de La Lama @ 2016-07-14 15:14 UTC (permalink / raw)
  To: guix-devel

Hi all,

in my new system (almost identical to the barebones template), mutt does
not build:

--8<---------------cut here---------------start------------->8---
$ guix package -i mutt

...

chgrp: invalid group: ‘mail’
Can't fix mutt_dotlock's permissions!  This is required to lockmailboxes in the mail spool directory.
Makefile:1337: recipe for target 'install-exec-hook' failed
--8<---------------cut here---------------end--------------->8---

I have tried looking for a module which creates the mail group but I
have not found it. Do I need to add "mail" to groups field on system
definition? Or is it somehow automatically added it mutt is added at the
system level?

Thanks!

Carlos

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mutt builds to fail on a barebones sytem
  2016-07-14 15:14 mutt builds to fail on a barebones sytem Carlos Sánchez de La Lama
@ 2016-07-14 19:10 ` ng0
  2016-07-14 22:21 ` Leo Famulari
  1 sibling, 0 replies; 7+ messages in thread
From: ng0 @ 2016-07-14 19:10 UTC (permalink / raw)
  To: guix-devel

Hi,

Carlos Sánchez de La Lama writes:

> Hi all,
>
> in my new system (almost identical to the barebones template), mutt does
> not build:
>
> $ guix package -i mutt
>
> ...
>
> chgrp: invalid group: ‘mail’
> Can't fix mutt_dotlock's permissions!  This is required to lockmailboxes in the mail spool directory.
> Makefile:1337: recipe for target 'install-exec-hook' failed

This is most strange. On my GuixSD system mutt was able to
builtand install, but this was earliest on June 21th or 29th or
sometime between those dates.

> I have tried looking for a module which creates the mail group but I
> have not found it. Do I need to add "mail" to groups field on system
> definition? Or is it somehow automatically added it mutt is added at the
> system level?
>
> Thanks!
>
> Carlos
>

Could you provide some more info and maybe the system definition
you use?
I don't use the barebones template here, but with your system
definition file someone could reproduce the problem in a VM.

-- 
♥Ⓐ  ng0
For non-prism friendly talk find me on http://www.psyced.org
SecuShare – http://secushare.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mutt builds to fail on a barebones sytem
  2016-07-14 15:14 mutt builds to fail on a barebones sytem Carlos Sánchez de La Lama
  2016-07-14 19:10 ` ng0
@ 2016-07-14 22:21 ` Leo Famulari
  2016-07-15 11:27   ` Carlos Sánchez de La Lama
  1 sibling, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2016-07-14 22:21 UTC (permalink / raw)
  To: Carlos Sánchez de La Lama; +Cc: guix-devel

On Thu, Jul 14, 2016 at 05:14:19PM +0200, Carlos Sánchez de La Lama wrote:
> Hi all,
> 
> in my new system (almost identical to the barebones template), mutt does
> not build:
> 
> --8<---------------cut here---------------start------------->8---
> $ guix package -i mutt
> 
> ...
> 
> chgrp: invalid group: ‘mail’
> Can't fix mutt_dotlock's permissions!  This is required to lockmailboxes in the mail spool directory.
> Makefile:1337: recipe for target 'install-exec-hook' failed
> --8<---------------cut here---------------end--------------->8---

Strange, it works for me on GuixSD (where I don't have a 'mail' group)
and also with Guix on Debian.

Can you give some more information about your setup?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mutt builds to fail on a barebones sytem
  2016-07-14 22:21 ` Leo Famulari
@ 2016-07-15 11:27   ` Carlos Sánchez de La Lama
  2016-07-15 13:02     ` Carlos Sánchez de La Lama
  2016-07-15 14:27     ` Ludovic Courtès
  0 siblings, 2 replies; 7+ messages in thread
From: Carlos Sánchez de La Lama @ 2016-07-15 11:27 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

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

>> in my new system (almost identical to the barebones template), mutt does
>> not build:
>> 
>> --8<---------------cut here---------------start------------->8---
>> $ guix package -i mutt
>> 
>> ...
>> 
>> chgrp: invalid group: ‘mail’
>> Can't fix mutt_dotlock's permissions!  This is required to lockmailboxes in the mail spool directory.
>> Makefile:1337: recipe for target 'install-exec-hook' failed
>> --8<---------------cut here---------------end--------------->8---
>
> Strange, it works for me on GuixSD (where I don't have a 'mail' group)
> and also with Guix on Debian.

Seems it happens on some other systems as well (see "Misc. errors" on
this report:
https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00237.html) 

> Can you give some more information about your setup?

My system is nothing strange, I attach the definition.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: config.scm --]
[-- Type: text/x-scheme, Size: 1693 bytes --]

;; This is an operating system configuration template
;; for a "bare bones" setup, with no X11 display server.

(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules admin)

(operating-system
  (host-name "gollum")
  (timezone "Europe/Madrid")
  (locale "es_ES.UTF-8")

  ;; Assuming /dev/sdX is the target hard disk, and "my-root" is
  ;; the label of the target root file system.
  (bootloader (grub-configuration (device "/dev/sda")))
  (file-systems (cons (file-system
                        (device "my-root")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems))

  ;; This is where user accounts are specified.  The "root"
  ;; account is implicit, and is initially created with the
  ;; empty password.
  (users (cons (user-account
                (name "csanchez")
                (comment "Carlos Sanchez de La Lama")
                (group "users")

                ;; Adding the account to the "wheel" group
                ;; makes it a sudoer.  Adding it to "audio"
                ;; and "video" allows the user to play sound
                ;; and access the webcam.
                (supplementary-groups '("wheel"
                                        "audio" "video"))
                (home-directory "/home/csanchez"))
               %base-user-accounts))

  ;; Globally-installed packages.
  (packages (cons tcpdump %base-packages))

  ;; Add services to the baseline: a DHCP client and
  ;; an SSH server.
  (services (cons* (dhcp-client-service)
                   (lsh-service #:port-number 2222)
                   %base-services)))

[-- Attachment #3: Type: text/plain, Size: 1492 bytes --]


I think I can shed some light on the problem. *If* during mutt configure
step, "/var/mail" is found to be group-writable, then mutt makefiles
decide mutt has to be setgid, to group "mail" unless overriden by
configure parameters. If "/var/mail" is not group-writable, then mutt is
built without setgid.

This is performed by a test program in configure.ac which is:

--8<---------------cut here---------------start------------->8---
#include <sys/stat.h>
#include <stdlib.h>

int main (int argc, char **argv)
{
        struct stat s;

        stat ("$mutt_cv_mailpath", &s);
        if (s.st_mode & S_IWGRP) exit (0);
        exit (1);
}
--8<---------------cut here---------------end--------------->8---

where $mutt_cv_mailpath is "/var/mail" (passed as configure parameter).

The problem happens when "/var/mail" does not exist. "stat" return value
is not checked, so whatever garbage happens to be in s.st_mode can
randomly lead to detecting it as group-writable or not.

If I create "/var/mail" on my system, I can build & install mutt in
"guix environment mutt". However, building in the chroot (with "guix
build") still fails. I am reaching the limits of my guix knowledge
here... how/where are chroot contents defined?

I was going to report the bug to mutt (strictly speaking, it's theirs),
but seems it was already reported *and fixed* as bug #3810:

https://dev.mutt.org/trac/ticket/3810

So reconfiguring with an updated tree would fix my problem (it's
building now).

BR

Carlos

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mutt builds to fail on a barebones sytem
  2016-07-15 11:27   ` Carlos Sánchez de La Lama
@ 2016-07-15 13:02     ` Carlos Sánchez de La Lama
  2016-07-15 14:27     ` Ludovic Courtès
  1 sibling, 0 replies; 7+ messages in thread
From: Carlos Sánchez de La Lama @ 2016-07-15 13:02 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

> So reconfiguring with an updated tree would fix my problem (it's
> building now).

I can confirm newer mutt versions used in current guix snapshot do not
suffer from this building problem.

I am sorry about the noise :S

BR

Carlos

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mutt builds to fail on a barebones sytem
  2016-07-15 11:27   ` Carlos Sánchez de La Lama
  2016-07-15 13:02     ` Carlos Sánchez de La Lama
@ 2016-07-15 14:27     ` Ludovic Courtès
  2016-07-15 14:47       ` Carlos Sánchez de La Lama
  1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2016-07-15 14:27 UTC (permalink / raw)
  To: Carlos Sánchez de La Lama; +Cc: guix-devel

Hi!

csanchezdll@gmail.com (Carlos Sánchez de La Lama) skribis:

> I think I can shed some light on the problem. *If* during mutt configure
> step, "/var/mail" is found to be group-writable, then mutt makefiles
> decide mutt has to be setgid, to group "mail" unless overriden by
> configure parameters. If "/var/mail" is not group-writable, then mutt is
> built without setgid.
>
> This is performed by a test program in configure.ac which is:
>
> #include <sys/stat.h>
> #include <stdlib.h>
>
> int main (int argc, char **argv)
> {
>         struct stat s;
>
>         stat ("$mutt_cv_mailpath", &s);
>         if (s.st_mode & S_IWGRP) exit (0);
>         exit (1);
> }
>
> where $mutt_cv_mailpath is "/var/mail" (passed as configure parameter).
>
> The problem happens when "/var/mail" does not exist. "stat" return value
> is not checked, so whatever garbage happens to be in s.st_mode can
> randomly lead to detecting it as group-writable or not.

Terrible.

> If I create "/var/mail" on my system, I can build & install mutt in
> "guix environment mutt". However, building in the chroot (with "guix
> build") still fails. I am reaching the limits of my guix knowledge
> here... how/where are chroot contents defined?

The chroot content is described in the bullet list at:

  https://www.gnu.org/software/guix/manual/html_node/Build-Environment-Setup.html

The code that populates it is in nix/libstore/build.cc:1825.

There’s no /var in the chroot.

> I was going to report the bug to mutt (strictly speaking, it's theirs),
> but seems it was already reported *and fixed* as bug #3810:
>
> https://dev.mutt.org/trac/ticket/3810
>
> So reconfiguring with an updated tree would fix my problem (it's
> building now).

Great.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: mutt builds to fail on a barebones sytem
  2016-07-15 14:27     ` Ludovic Courtès
@ 2016-07-15 14:47       ` Carlos Sánchez de La Lama
  0 siblings, 0 replies; 7+ messages in thread
From: Carlos Sánchez de La Lama @ 2016-07-15 14:47 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Hi Ludo,

>> how/where are chroot contents defined?
>
> The chroot content is described in the bullet list at:
>
>   https://www.gnu.org/software/guix/manual/html_node/Build-Environment-Setup.html

Yes, but description is a bit abstract. I wanted to know the exact details.

> The code that populates it is in nix/libstore/build.cc:1825.

Thanks! I was unable to find it.

Carlos

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-15 14:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-14 15:14 mutt builds to fail on a barebones sytem Carlos Sánchez de La Lama
2016-07-14 19:10 ` ng0
2016-07-14 22:21 ` Leo Famulari
2016-07-15 11:27   ` Carlos Sánchez de La Lama
2016-07-15 13:02     ` Carlos Sánchez de La Lama
2016-07-15 14:27     ` Ludovic Courtès
2016-07-15 14:47       ` Carlos Sánchez de La Lama

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).