Subject: bug#20037: closed (Re: bug#20037: 'guix system reconfigure' without 'gnu/system/linux.go' fails with duplicates login pam-service)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 10 Mar 2015 17:14:03 +0000

Your bug report

#20037: 'guix system reconfigure' without 'gnu/system/linux.go' fails with duplicates login pam-service

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
20037: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20037
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#20037: 'guix system reconfigure' without 'gnu/system/linux.go' fails with duplicates login pam-service
From: [email-masked] (Ludovic Courtès)
To: 宋文武 <[email-masked]>
Cc: [email-masked]
Date: Tue, 10 Mar 2015 18:13:23 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

宋文武 <[email-masked]> skribis:

> I can reproduce the issue Tomáš Čech (Sleep_Walker) reported at IRC,
> but only when reconfigure under 'pre-inst-env' and without 'gnu/system/linux.go':

Thanks a lot for finding it out, it’s an interesting bug!

The problem was that ‘pam-service->directory’ would get a different list
of objects depending on whether (gnu packages linux) is evaluated or
running from bytecode: when evaluated, the list would contain duplicate
services, leading to the build error you reported, but when running from
bytecode, the list is deduplicated.

This is because (gnu system) would call ‘delete-duplicates’ on the list
of PAM services, thereby using ‘equal?’ to compare them.  But since
<pam-service> include gexps, which include closures, ‘equal?’ could
return #t when running the compiled code (because in effect the gexps in
‘unix-pam-service’ would not lead to the allocation of fresh closures at
each call, so the gexps would be ‘eq?’), whereas with the evaluated
code, it would systematically return #f (we get fresh closures at each
‘unix-pam-service’ call.)

Commit 11dddd8 fixes that.

Thanks to both of you!

Ludo’.

Subject: 'guix system reconfigure' without 'gnu/system/linux.go' fails with duplicates login pam-service
From: 宋文武 <[email-masked]>
To: [email-masked]
Date: Sun, 08 Mar 2015 18:32:01 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

I can reproduce the issue Tomáš Čech (Sleep_Walker) reported at IRC,
but only when reconfigure under 'pre-inst-env' and without 'gnu/system/linux.go':

$ cd guix; make clean-go
# .../guix/pre-inst-env guix system reconfigure config.scm

;;; Failed to autoload make-session in (gnutls):
;;; ERROR: missing interface for module (gnutls)
;;; Failed to autoload connection-end/client in (gnutls):
;;; ERROR: missing interface for module (gnutls)
;;; Failed to autoload make-session in (gnutls):
;;; ERROR: missing interface for module (gnutls)
The following derivations will be built:
   /gnu/store/8576w1km2a8ij7k66k6n37gyhxzpxda4-system.drv
   /gnu/store/8jg5iqrd04hj1k8nx6fzcm9lz16nmk4r-grub.cfg.drv
   /gnu/store/d53lbndj9yryrzgb3p4vjlb9gyh1rri0-activate.drv
   /gnu/store/y3i8spghyv4dg8d8yl78bvkjb3xcbarb-boot.drv
   /gnu/store/mrlw80nawfbc8mhq3pz6gbxxpgjbabij-pam.d.drv
   /gnu/store/sf3n6ijagmc64ik7mn96p8c69xk30nmv-etc.drv
Backtrace:
In ice-9/boot-9.scm:
 157: 10 [catch #t #<catch-closure e365c0> ...]
In unknown file:
   ?: 9 [apply-smob/1 #<catch-closure e365c0>]
In ice-9/boot-9.scm:
  63: 8 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 7 [eval # #]
In ice-9/boot-9.scm:
2401: 6 [save-module-excursion #<procedure e53980 at ice-9/boot-9.scm:4045:3 ()>]
4050: 5 [#<procedure e53980 at ice-9/boot-9.scm:4045:3 ()>]
1724: 4 [%start-stack load-stack #<procedure e66ae0 at ice-9/boot-9.scm:4041:10 ()>]
1729: 3 [#<procedure e6af00 ()>]
In unknown file:
   ?: 2 [primitive-load "/gnu/store/dmsgr6bsp9k0x7c2dmcvhqrgrqqal7kb-pam.d-builder"]
In ice-9/boot-9.scm:
 775: 1 [for-each #<procedure eec7e0 at ice-9/eval.scm:416:20 (a)> (# # # # ...)]
In unknown file:
   ?: 0 [symlink "/gnu/store/pn2wmdczwcknksxhdn4jl6sh49h0vidm-login" ...]

ERROR: In procedure symlink:
ERROR: In procedure symlink: File exists
builder for `/gnu/store/mrlw80nawfbc8mhq3pz6gbxxpgjbabij-pam.d.drv' failed with exit code 1
cannot build derivation `/gnu/store/sf3n6ijagmc64ik7mn96p8c69xk30nmv-etc.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/8576w1km2a8ij7k66k6n37gyhxzpxda4-system.drv': 1 dependencies couldn't be built
killing process 2317
guix system: error: build failed: build of `/gnu/store/8576w1km2a8ij7k66k6n37gyhxzpxda4-system.drv' failed

the pam.d-builder contains duplicates login entries
(I have 3 mingetty-service)

After add '(pretty-print services)' to 'pam-services->directory', I get:

After 'make gnu/system/linux.go', it works with a different pam.d-builder: