bug#36838: mcron leaves zombies around

2021-08-24 Thread Leo Prikler
Hi Maxim,

I still have a defunct mcron flying around with a fairly standard Guix
configuration.  The only service running through mcron seems to be
rottlog-service-type.

Regards






bug#36510: confusing mcron logging

2021-08-24 Thread Maxim Cournoyer
Hello,

I sent a v3 of the output annotation patch [0], which no longer blocks
reading the output of long-running child processes.

I've reconfigured my system with it, so far so good.

[0]  https://lists.gnu.org/archive/html/bug-mcron/2021-08/msg8.html





bug#50182: ruby-sass-spec hash mismatch

2021-08-24 Thread Eric Brown
Hello Guix:

I am trying to install ruby-sass-spec and get a hash mismatch:

# guix pull && hash guix && guix package -u
# guix build ruby-sass-spec --no-substitutes

HEAD is now at a7a2305 3.5.4
r:sha256 hash mismatch for 
/gnu/store/mn6522xx9lmirzzvmrkjga1vil0sqg1p-ruby-sass-spec-3.5.4-checkout:
  expected hash: 1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr
  actual hash:   06zlwvc4hi5wyrfh182xlaq2igp54c1a1xwr3s9v7l41bb0inzsg

Best regards,
Eric






bug#50183: httpd hash mismatch

2021-08-24 Thread Eric Brown
Hello Guix:

I am trying to install httpd and I get a hash mismatch:

# guix pull && hash guix && guix package -u
# guix build httpd --no-substitutes

sha256 hash mismatch for 
/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2:
  expected hash: 0v4npxnvih5mlxx6dywwhhfs8xvgcckc0hxzwk3hi0g8nbkjdj0v
  actual hash:   0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73
hash mismatch for store item 
'/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2'

Best regards,
Eric






bug#34999: Record special field abstraction leakage

2021-08-24 Thread Leo Prikler
Hi Ludo,

I think I have found out why users see the thunked fields as below.
Am Dienstag, den 26.03.2019, 10:38 +0100 schrieb Ludovic Courtès:
> The changes I made in version-control.scm and gnucash.scm in commit
> e6301fb76d0a8d931ece2e18d197e3c2cc53fc6c revealed an abstraction
> leakage
> I wasn’t aware of: there’s a pattern where users “see” that thunked
> fields are thunked:
> 
>   (package
> ;; …
> (inputs …)
> (arguments `(foo bar ,(inputs) …)))  ;<- here ‘inputs’ is seen as
> a thunk
The issue is that for constructing the records, we let*-bind the field
names to their values before calling the constructor.  In these let*-
bindings the fields are already wrapped, e.g. inputs will be bound to
the value that the record field inputs will have, not to the raw value.

I've attached a patch to fix this issue as well as a MWE to try it out.
I'm not sure about the broader semantics of this patch, though.  I fear
that exposing raw values through let-binding probably eliminates the
delayed/thunked nature of said fields in some ways.  WDYT?
From 1f38ff4c8b93cde533cf3d3f67358aafe9cf3dfa Mon Sep 17 00:00:00 2001
From: Leo Prikler 
Date: Tue, 24 Aug 2021 17:32:33 +0200
Subject: [PATCH] guix: records: let*-bind raw values, wrap them in
 constructor.

This fixes the abstraction leakage mentioned in .

* guix/records.scm (make-syntactic-constructor)[field-bindings]: Bind to raw
value.
[field-value]: Always wrap the value.
[record-inheritance]: Wrap "inherited" values.
---
 guix/records.scm | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/guix/records.scm b/guix/records.scm
index ed94c83dac..074f1650c8 100644
--- a/guix/records.scm
+++ b/guix/records.scm
@@ -153,7 +153,10 @@ of TYPE matches the expansion-time ABI."
 
#`(make-struct/no-tail type
   #,@(map (lambda (field index)
-(or (field-inherited-value field)
+(or (and=>
+ (field-inherited-value field)
+ (lambda (value)
+   (wrap-field-value field value)))
 (if (innate-field? field)
 (wrap-field-value
  field (field-default-value field))
@@ -211,8 +214,7 @@ of TYPE matches the expansion-time ABI."
(map (lambda (field+value)
   (syntax-case field+value ()
 ((field value)
- #`(field
-#,(wrap-field-value #'field #'value)
+ #`(field value
 field+value))
 
  (syntax-case s (inherit expected ...)
@@ -224,10 +226,11 @@ of TYPE matches the expansion-time ABI."
((_ (field value) (... ...))
 (let ((fields (map syntax->datum #'(field (... ...)
   (define (field-value f)
-(or (find (lambda (x)
-(eq? f (syntax->datum x)))
-  #'(field (... ...)))
-(wrap-field-value f (field-default-value f
+(wrap-field-value f
+  (or (find (lambda (x)
+  (eq? f (syntax->datum x)))
+#'(field (... ...)))
+  (field-default-value f
 
   ;; Pass S to make sure source location info is preserved.
   (report-duplicate-field-specifier 'name s)
-- 
2.33.0

(use-modules (guix records))

(define-record-type*  thing make-thing
  thing?
  this-thing
  (name thing-name (thunked))
  (name2 thing-name2))

(let* ((%thing
   (thing
(name "foo")
(name2 name)))
   (%thing2
(thing
 (inherit %thing)
 (name "bar"
  (format #t "thing1:~%  name: ~a~%  name2: ~a~%~%"
  (thing-name %thing)
  (thing-name2 %thing))

  (format #t "thing2:~%  name: ~a~%  name2: ~a~%"
  (thing-name %thing2)
  (thing-name2 %thing2)))


bug#50183: httpd hash mismatch

2021-08-24 Thread Leo Famulari
On Tue, Aug 24, 2021 at 04:44:01AM -0500, Eric Brown via Bug reports for GNU 
Guix wrote:
> I am trying to install httpd and I get a hash mismatch:

Thanks for the report!

> # guix pull && hash guix && guix package -u
> # guix build httpd --no-substitutes
> 
> sha256 hash mismatch for 
> /gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2:
>   expected hash: 0v4npxnvih5mlxx6dywwhhfs8xvgcckc0hxzwk3hi0g8nbkjdj0v
>   actual hash:   0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73
> hash mismatch for store item 
> '/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2'

I just tried and it worked for me:

--
$ guix build --no-grafts httpd -S --no-substitutes
;;; note: source file /home/leo/work/guix/gnu/packages/tls.scm
;;;   newer than compiled /home/leo/work/guix/gnu/packages/tls.go
The following derivation will be built:
   /gnu/store/8yz30bpf6yw6rd1yf7h3fh5p8yr062zf-httpd-2.4.48.tar.bz2.drv
building /gnu/store/8yz30bpf6yw6rd1yf7h3fh5p8yr062zf-httpd-2.4.48.tar.bz2.drv...

Starting download of 
/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2
>From http://www.eu.apache.org/dist/httpd/httpd-2.4.48.tar.bz2...
In procedure getaddrinfo: Name or service not known

Starting download of 
/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2
>From http://www.us.apache.org/dist/httpd/httpd-2.4.48.tar.bz2...
In procedure getaddrinfo: Name or service not known

Starting download of 
/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2
>From https://ftp.nluug.nl/internet/apache/httpd/httpd-2.4.48.tar.bz2...
downloading from 
https://ftp.nluug.nl/internet/apache/httpd/httpd-2.4.48.tar.bz2 ...
 httpd-2.4.48.tar.bz2  6.9MiB   
  2.3MiB/s 
00:03 [##] 100.0%
successfully built 
/gnu/store/8yz30bpf6yw6rd1yf7h3fh5p8yr062zf-httpd-2.4.48.tar.bz2.drv
/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2
--

Which URL did you end up downloading from? Can you download the file
again and see what it is? Like, maybe it's a 404 HTML page or
something.





bug#50182: ruby-sass-spec hash mismatch

2021-08-24 Thread zimoun
Hi,


On Tue, 24 Aug 2021 at 04:40, "Eric Brown" via Bug reports for GNU Guix 
 wrote:

> # guix pull && hash guix && guix package -u
> # guix build ruby-sass-spec --no-substitutes
>
> HEAD is now at a7a2305 3.5.4
> r:sha256 hash mismatch for 
> /gnu/store/mn6522xx9lmirzzvmrkjga1vil0sqg1p-ruby-sass-spec-3.5.4-checkout:
>   expected hash: 1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr
>   actual hash:   06zlwvc4hi5wyrfh182xlaq2igp54c1a1xwr3s9v7l41bb0inzsg

Ah, this is annoying because it works for me:

--8<---cut here---start->8---
$ guix build -S ruby-sass-spec --no-substitutes
The following derivation will be built:
   /gnu/store/p44b8rxvc54zj52a3g7hacs4aiqwdx5q-ruby-sass-spec-3.5.4-checkout.drv
building 
/gnu/store/p44b8rxvc54zj52a3g7hacs4aiqwdx5q-ruby-sass-spec-3.5.4-checkout.drv...
guile: warning: failed to install locale
environment variable `PATH' set to 
`/gnu/store/378zjf2kgajcfd7mfr98jn5xyc5wa3qv-gzip-1.10/bin:/gnu/store/sf3rbvb6iqcphgm1afbplcs72hsywg25-tar-1.32/bin'
hint: Using 'master' as the name for the initial branch. This default branch 
name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch 
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m 
Initialized empty Git repository in 
/gnu/store/mn6522xx9lmirzzvmrkjga1vil0sqg1p-ruby-sass-spec-3.5.4-checkout/.git/
>From https://github.com/sass/sass-spec
 * tag   v3.5.4 -> FETCH_HEAD
Note: switching to 'FETCH_HEAD'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c 

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at a7a2305 3.5.4
successfully built 
/gnu/store/p44b8rxvc54zj52a3g7hacs4aiqwdx5q-ruby-sass-spec-3.5.4-checkout.drv
/gnu/store/mn6522xx9lmirzzvmrkjga1vil0sqg1p-ruby-sass-spec-3.5.4-checkout

$ guix hash -r 
/gnu/store/mn6522xx9lmirzzvmrkjga1vil0sqg1p-ruby-sass-spec-3.5.4-checkout
1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr
--8<---cut here---end--->8---

All the best,
simon





bug#50183: httpd hash mismatch

2021-08-24 Thread zimoun
Hi,

On Tue, 24 Aug 2021 at 04:44, "Eric Brown" via Bug reports for GNU Guix 
 wrote:

> # guix pull && hash guix && guix package -u
> # guix build httpd --no-substitutes
>
> sha256 hash mismatch for 
> /gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2:
>   expected hash: 0v4npxnvih5mlxx6dywwhhfs8xvgcckc0hxzwk3hi0g8nbkjdj0v
>   actual hash:   0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73
> hash mismatch for store item 
> '/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2'

I get this:

--8<---cut here---start->8---
$ guix build httpd -S --no-substitutes
The following derivation will be built:
   /gnu/store/8yz30bpf6yw6rd1yf7h3fh5p8yr062zf-httpd-2.4.48.tar.bz2.drv
building /gnu/store/8yz30bpf6yw6rd1yf7h3fh5p8yr062zf-httpd-2.4.48.tar.bz2.drv...

Starting download of 
/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2
>From http://www.eu.apache.org/dist/httpd/httpd-2.4.48.tar.bz2...
In procedure getaddrinfo: Name or service not known

Starting download of 
/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2
>From http://www.us.apache.org/dist/httpd/httpd-2.4.48.tar.bz2...
In procedure getaddrinfo: Name or service not known

Starting download of 
/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2
>From https://ftp.nluug.nl/internet/apache/httpd/httpd-2.4.48.tar.bz2...
downloading from 
https://ftp.nluug.nl/internet/apache/httpd/httpd-2.4.48.tar.bz2 ...
 httpd-2.4.48.tar.bz2  6.9MiB 476KiB/s 00:15 [##] 100.0%
successfully built 
/gnu/store/8yz30bpf6yw6rd1yf7h3fh5p8yr062zf-httpd-2.4.48.tar.bz2.drv
/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2

$ guix hash /gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2
0v4npxnvih5mlxx6dywwhhfs8xvgcckc0hxzwk3hi0g8nbkjdj0v

$ guix download https://ftp.nluug.nl/internet/apache/httpd/httpd-2.4.48.tar.bz2

Starting download of /tmp/guix-file.cFPPuX
>From https://ftp.nluug.nl/internet/apache/httpd/httpd-2.4.48.tar.bz2...
 …48.tar.bz2  6.9MiB  611KiB/s 00:11 [##] 100.0%
/gnu/store/vqdsqzdq1vfhn49fmj32daja43vmbg8v-httpd-2.4.48.tar.bz2
0v4npxnvih5mlxx6dywwhhfs8xvgcckc0hxzwk3hi0g8nbkjdj0v
--8<---cut here---end--->8---

Therefore, from which mirror are you downloading?  It should be
something from the list:

--8<---cut here---start->8---
  (apache ; from http://www.apache.org/mirrors/dist.html
   "http://www.eu.apache.org/dist/";
   "http://www.us.apache.org/dist/";
   "https://ftp.nluug.nl/internet/apache/";
   "http://apache.mirror.iweb.ca/";
   "http://mirrors.ircam.fr/pub/apache/";
   "http://apache.mirrors.ovh.net/ftp.apache.org/dist/";
   "http://apache-mirror.rbc.ru/pub/apache/";
   "ftp://ftp.osuosl.org/pub/apache/";
   "http://mirrors.ibiblio.org/apache/";
--8<---cut here---end--->8---


All the best,
simon





bug#50193: guix: shepherd pid 1 holds /dev/console

2021-08-24 Thread muradm



On IRC chat we identified an issue related to linux SAK, which
is explained here 
https://www.kernel.org/doc/html/latest/security/sak.html


Following the check what processes will be SAK'ed:

~# ls -l /proc/[0-9]*/fd/* | grep console
lrwx-- 1 root   root   64 Aug 24 21:22 /proc/1/fd/1 -> 
/dev/console
lrwx-- 1 root   root   64 Aug 24 21:22 /proc/1/fd/2 -> 
/dev/console
l-wx-- 1 root   root   64 Aug 24 21:22 /proc/578/fd/4 -> 
/dev/console
lrwx-- 1 root   root   64 Aug 24 21:22 /proc/593/fd/1 -> 
/dev/console
lrwx-- 1 root   root   64 Aug 24 21:22 /proc/593/fd/2 -> 
/dev/console
lrwx-- 1 root   root   64 Aug 24 20:03 /proc/705/fd/1 -> 
/dev/console
lrwx-- 1 root   root   64 Aug 24 20:03 /proc/705/fd/2 -> 
/dev/console
lrwx-- 1 root   root   64 Aug 24 21:22 /proc/909/fd/1 -> 
/dev/console
lrwx-- 1 root   root   64 Aug 24 21:22 /proc/909/fd/2 -> 
/dev/console


As it is seen from above output, pid 1 which is shepherd holds 
/dev/console
making linux SAK feature useless. When SAK command issued by 
shortcut keys,
all above proceses gets killed including pid 1 which is shepherd, 
causing

system to stall.