guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mutt builds to fail on a barebones sytem


From: Carlos Sánchez de La Lama
Subject: Re: mutt builds to fail on a barebones sytem
Date: Fri, 15 Jul 2016 13:27:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

>> 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.

;; 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)))
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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]