bug#55358: docker containers stopped when doing guix install or guix shell

2022-05-11 Thread Remco van 't Veer
On a Guix system host, some running docker containers are stopped when
doing guix install or other guix operations like shell.  I noticed this
happing to mysql and postgres containers but an elasticsearch container
just keeps running.

Here's an example session:

  $ docker ps
  CONTAINER ID  IMAGE   COMMAND  CREATED STATUS 
   PORTS NAMES
  $ docker run -d postgres:10.10
  ..
  2b52ee072b1f5584cae597afb033cdcc0e560bbe9145b17b41502c204034e60b
  $ docker ps
  CONTAINER ID  IMAGE   COMMAND  CREATED STATUS 
   PORTS NAMES
  2b52ee072b1f  postgres:10.10  "docker-entrypoint.s…"  2 seconds ago   Up 1 
seconds  5432/tcp  blah_blah
  $ guix shell xeyes -- xeyes
  substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
  0.0 MB will be downloaded
   xeyes-1.1.2  11KiB   
613KiB/s 00:00 [##] 100.0%
  The following derivation will be built:
/gnu/store/xc002hxl4g8mskqmpm0grsk8s45m91gz-profile.drv

  applying 4 grafts for xeyes-1.1.2 ...
  building CA certificate bundle...
  listing Emacs sub-directories...
  building fonts directory...
  building directory of Info manuals...
  building profile with 1 package...
  $ docker ps
  CONTAINER ID  IMAGE   COMMAND  CREATED STATUS 
   PORTS NAMES
  $ exit

First we see no docker containers are running, then we start postgres-10
from docker hub, we see its container is running, then we do something
using guix-shell on an application *not already available on this
system*, and now the container died.  This does not work the second time
when the "derivation" is already "built".

Cheers,
Remco





bug#55443: emacs-28.1: tramp sudo broken

2022-05-15 Thread Remco van 't Veer
After upgrading from emacs-27.2 to emacs-28.1 on a Guix system, opening
files/directories via sudo using tramp no longer works.

Here's what's in the *Messages* buffer:

> Tramp: Opening connection nil for root@remq240 using sudo...done
> File error: Couldn't find a proper `ls' command [6 times]
> tramp-error: Couldn't find a proper `ls' command

I am at:

> Generation 48 May 15 2022 16:38:54(current)
>   guix 9860c90
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: 9860c90e8e5362e0e843efbd45f4563b9746a196

Logging out after upgrade does not help.

Kind regards,
Remco





bug#55443: emacs-28.1: tramp sudo broken

2022-05-19 Thread Remco van 't Veer
2022/05/19 15:57, Josselin Poiret:

> What I personally use is described at [1], and fixed this issue I had
> when I switched to emacs-next.
>
> [1] https://yhetil.org/guix/87czjsmif0@jpoiret.xyz/

Thanks!  Your workaround works.  Here's my slightly tweaked version
(inspired by the post by Max Brieiev):

  (connection-local-set-profile-variables
'guix-system
'((tramp-remote-path . (tramp-own-remote-path

  (connection-local-set-profiles
`(:application tramp :protocol "sudo" :machine ,(system-name))
'guix-system))

I do agree with Maxime Devos in the same thread, ideally tramp sudo
should just work on guix.





bug#55776: maven-core fails to build

2022-06-04 Thread Remco van 't Veer
I did some digging and found this regression is caused by commit:

 6068b83b82475566acd4162467bcf54270f338f9
 "gnu: java-jdom: Update to 2.0.6.1 [fixes CVE-2021-33813]."

Apparently the fix for this issue causes jdom to be very strict;

> java.io.IOException: Invalid input descriptor for merge:
> /tmp/plexus-metadata3957336728290309540xml -->
> http://xml.org/sax/features/external-general-entities feature
> http://xml.org/sax/features/external-general-entities not supported
> for SAX driver org.codehaus.plexus.metadata.merge.Driver

Which sound familiar when looking at that CVE
(https://github.com/advisories/GHSA-2363-cqg2-863c):

> An XXE issue in SAXBuilder in JDOM through 2.0.6 allows attackers to
> cause a denial of service via a crafted HTTP request. At this time
> there is not released fixed version of JDOM. As a workaround, to avoid
> external entities being expanded, one can call
> builder.setExpandEntities(false) and they won't be expanded.

I dunno how to fix this though, I'm just a curious guixer.  Easiest path
seems to be to make a new java-jdom-2.0.6 var and use that as a
native-input for maven.  Would that be an acceptable solution?

Cheers,
Remco





bug#55657: libgccjit is unusable

2022-06-04 Thread Remco van 't Veer
2022/05/26 15:07, Liliana Marie Prikler:

> Hi Guix,
>
> with the release of Emacs 28.1, there has been some demand to enable
> native-compilation.  While trying to set that up, I've come to realize
> that no matter how I slice it, I can't make libgccjit usable.

The guixrus channel has an emacs which seems to support gccjit.  I have
not tried it myself.

  https://git.sr.ht/~whereiseveryone/guixrus/

Especially:

  
https://git.sr.ht/~whereiseveryone/guixrus/tree/master/item/guixrus/packages/emacs.scm
  
https://git.sr.ht/~whereiseveryone/guixrus/tree/master/item/guixrus/packages/gcc.scm

Maybe you can borrow some knowledge there? ;-)

Cheers,
Remco





bug#55776: maven-core fails to build

2022-06-04 Thread Remco van 't Veer
2022/06/04 15:47, Julien Lepiller:

> So I figured I could fix java-plexus-component-metadata that we use to
> generate some xml files during the build of maven. jdom is one of its
> inputs. Adding another jdom to the native inputs would probably not fix
> the issue.

Reverting the jdom upgrade patch, I did get mave-core to build.  I admit
I did not try running it.  My interest in maven is as a dependency to
clojure-tools, I don't really know how to test maven is actually working
by itself.

> What I did instead is, since jdom wants to set more features than
> supported in the driver, to add dummy support for all these additional
> features by just not throwing the exception. It's not very satisfying,
> but it works and we don't keep a vulnerable jdom around. With the
> attached patch, I built up to maven.

Smart!  I look forward to seeing your patch land in the main branch.

Cheers,
Remco





bug#55443: closed (Re: [PATCH] gnu: emacs: Fix source snippet.)

2022-06-25 Thread Remco van 't Veer
Works for me, thank you!

Cheers,
Remco





bug#55358: docker containers stopped when doing guix install or guix shell

2022-07-12 Thread Remco van 't Veer


2022/07/12 09:48, Maxim Cournoyer:

> Hi,
>
> Remco van 't Veer  writes:
>
>> On a Guix system host, some running docker containers are stopped when
>> doing guix install or other guix operations like shell.  I noticed this
>> happing to mysql and postgres containers but an elasticsearch container
>> just keeps running.
>>
>> Here's an example session:
>>
>>   $ docker ps
>>   CONTAINER ID  IMAGE   COMMAND  CREATED 
>> STATUSPORTS NAMES
>>   $ docker run -d postgres:10.10
>>   ..
>>   2b52ee072b1f5584cae597afb033cdcc0e560bbe9145b17b41502c204034e60b
>>   $ docker ps
>>   CONTAINER ID  IMAGE   COMMAND  CREATED 
>> STATUSPORTS NAMES
>>   2b52ee072b1f  postgres:10.10  "docker-entrypoint.s…"  2 seconds ago   Up 1 
>> seconds  5432/tcp  blah_blah
>>   $ guix shell xeyes -- xeyes
>>   substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
>>   0.0 MB will be downloaded
>>xeyes-1.1.2  11KiB
>>613KiB/s 00:00 [##] 100.0%
>>   The following derivation will be built:
>> /gnu/store/xc002hxl4g8mskqmpm0grsk8s45m91gz-profile.drv
>>
>>   applying 4 grafts for xeyes-1.1.2 ...
>>   building CA certificate bundle...
>>   listing Emacs sub-directories...
>>   building fonts directory...
>>   building directory of Info manuals...
>>   building profile with 1 package...
>>   $ docker ps
>>   CONTAINER ID  IMAGE   COMMAND  CREATED 
>> STATUSPORTS NAMES
>>   $ exit
>>
>> First we see no docker containers are running, then we start postgres-10
>> from docker hub, we see its container is running, then we do something
>> using guix-shell on an application *not already available on this
>> system*, and now the container died.  This does not work the second time
>> when the "derivation" is already "built".
>
> Are you still able to reproduce this using the new version of docker
> packaged in Guix?

Yes, same problem after a guix pull and guix system reconfigure just now.

  $ guix describe
  Generation 72 Jul 12 2022 16:11:38(current)
guix 9173cb5
  repository URL: https://git.savannah.gnu.org/git/guix.git
  branch: master
  commit: 9173cb522ddc4f31f21948cee3fb214fd67ef616

Cheers,
Remco





bug#56556: texlive-babel-dutch with and without texlive-hyphen-dutch: No hyphenation patterns were preloaded

2022-07-14 Thread Remco van 't Veer
Neither texlive-babel-dutch nor texlive-hyphen-dutch load hyphenation.

Test document:

  \documentclass{article}
  \usepackage[dutch]{babel}
  \begin{document}
  test
  \end{document}

Running with texlive-babel-dutch only:

  $ guix shell --pure texlive-base texlive-babel-dutch -- pdflatex test.tex
  This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/GNU Guix) 
(preloaded format=pdflatex)
   restricted \write18 enabled.
  entering extended mode
  (./test.tex
  LaTeX2e <2020-10-01> patch level 4
  L3 programming layer <2021-02-18> 
(/gnu/store/1p55mddnasba5xq2vcnzyc8wjywn4cwn-profile/share/texmf-dist/tex/latex/base/article.cls
  Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
  
(/gnu/store/1p55mddnasba5xq2vcnzyc8wjywn4cwn-profile/share/texmf-dist/tex/latex/base/size10.clo))
 
(/gnu/store/1p55mddnasba5xq2vcnzyc8wjywn4cwn-profile/share/texmf-dist/tex/generic/babel/babel.sty
 
(/gnu/store/1p55mddnasba5xq2vcnzyc8wjywn4cwn-profile/share/texmf-dist/tex/generic/babel/babel.def
 
(/gnu/store/1p55mddnasba5xq2vcnzyc8wjywn4cwn-profile/share/texmf-dist/tex/generic/config/language.def)
 
(/gnu/store/1p55mddnasba5xq2vcnzyc8wjywn4cwn-profile/share/texmf-dist/tex/generic/babel/txtbabel.def))
 
(/gnu/store/1p55mddnasba5xq2vcnzyc8wjywn4cwn-profile/share/texmf-dist/tex/generic/babel-dutch/dutch.ldf

  Package babel Warning: No hyphenation patterns were preloaded for
  (babel)the language `Dutch' into the format.
  (babel)Please, configure your TeX system to add them and
  (babel)rebuild the format. Now I will use the patterns
  (babel)preloaded for \language=0 instead on input line 49.

  )) 
(/gnu/store/1p55mddnasba5xq2vcnzyc8wjywn4cwn-profile/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
 (./test.aux) 
[1{/gnu/store/1p55mddnasba5xq2vcnzyc8wjywn4cwn-profile/share/texmf-dist/fonts/map/pdftex/updmap/pdftex.map}]
 (./test.aux) ) 

  Output written on test.pdf (1 page, 2226 bytes).
  Transcript written on test.log.

With texlive-hyphen-dutch included:

  $ guix shell --pure texlive-base texlive-babel-dutch texlive-hyphen-dutch -- 
pdflatex test.tex
  This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/GNU Guix) 
(preloaded format=pdflatex)
   restricted \write18 enabled.
  entering extended mode
  (./test.tex
  LaTeX2e <2020-10-01> patch level 4
  L3 programming layer <2021-02-18> 
(/gnu/store/c61c43w5c7dlz7ipxcqi4z385p3a4dzb-profile/share/texmf-dist/tex/latex/base/article.cls
  Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
  
(/gnu/store/c61c43w5c7dlz7ipxcqi4z385p3a4dzb-profile/share/texmf-dist/tex/latex/base/size10.clo))
 
(/gnu/store/c61c43w5c7dlz7ipxcqi4z385p3a4dzb-profile/share/texmf-dist/tex/generic/babel/babel.sty
 
(/gnu/store/c61c43w5c7dlz7ipxcqi4z385p3a4dzb-profile/share/texmf-dist/tex/generic/babel/babel.def
 
(/gnu/store/c61c43w5c7dlz7ipxcqi4z385p3a4dzb-profile/share/texmf-dist/tex/generic/config/language.def)
 
(/gnu/store/c61c43w5c7dlz7ipxcqi4z385p3a4dzb-profile/share/texmf-dist/tex/generic/babel/txtbabel.def))
 
(/gnu/store/c61c43w5c7dlz7ipxcqi4z385p3a4dzb-profile/share/texmf-dist/tex/generic/babel-dutch/dutch.ldf

  Package babel Warning: No hyphenation patterns were preloaded for
  (babel)the language `Dutch' into the format.
  (babel)Please, configure your TeX system to add them and
  (babel)rebuild the format. Now I will use the patterns
  (babel)preloaded for \language=0 instead on input line 49.

  )) 
(/gnu/store/c61c43w5c7dlz7ipxcqi4z385p3a4dzb-profile/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
 (./test.aux) 
[1{/gnu/store/c61c43w5c7dlz7ipxcqi4z385p3a4dzb-profile/share/texmf-dist/fonts/map/pdftex/updmap/pdftex.map}]
 (./test.aux) ) 

  Output written on test.pdf (1 page, 2226 bytes).
  Transcript written on test.log.

Problem does not occur when using the complete TeX Live distribution:

  $ guix shell --pure texlive -- pdflatex test.tex
  This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/GNU Guix) 
(preloaded format=pdflatex)
   restricted \write18 enabled.
  entering extended mode
  (./test.tex
  LaTeX2e <2020-10-01> patch level 4
  L3 programming layer <2021-02-18>
  
(/gnu/store/lgkfz7wg59sg81zlf3xy7i7dbvx1fvyp-texlive-texmf-20210325/share/texmf
  -dist/tex/latex/base/article.cls
  Document Class: article 2020/04/10 v1.4m Standard LaTeX document class

  
(/gnu/store/lgkfz7wg59sg81zlf3xy7i7dbvx1fvyp-texlive-texmf-20210325/share/texmf
  -dist/tex/latex/base/size10.clo))
  
(/gnu/store/lgkfz7wg59sg81zlf3xy7i7dbvx1fvyp-texlive-texmf-20210325/share/texmf
  -dist/tex/generic/babel/babel.sty
  
(/gnu/store/lgkfz7wg59sg81zlf3xy7i7dbvx1fvyp-texlive-texmf-20210325/share/texmf
  -dist/tex/generic/babel/babel.def
  
(/gnu/store/lgkfz7wg59sg81zlf3xy7i7dbvx1fvyp-texlive-texmf-20210325/share/texmf
  -dist/tex/generic/babel/txtbabel.def))
  
(/gnu/store/lgkfz7wg59sg81zlf3xy7i7d

bug#57083: Jekyll is unusable

2022-08-15 Thread Remco van &#x27;t Veer
The jekyll packages is pretty minimal and the generated site by a
"jekyll new" requires more than supplied by the package.  To get it to
work you either need to include the ruby package for bundler (as you
did), set GEM_HOME to some writable directory, and pull in the
development dependencies of ruby (to allow compilation of native code
gems).  Or stay minimal, here's an example:

  $ guix shell --pure jekyll -- jekyll new --skip-bundle testdir
  New jekyll site installed in /home/me/tmp/testdir.
  Bundle install skipped.
  $ echo title: test title > testdir/_config.yml # drop theme and plugins
  $ rm testdir/Gemfile # avoid bundler installing themes and plugins
  $ echo test content >> testdir/index.markdown
  $ guix shell --pure jekyll -- jekyll s --source=testdir
  Configuration file: /home/me/tmp/testdir/_config.yml
  Source: /home/me/tmp/testdir
 Destination: /home/me/tmp/_site
   Incremental build: disabled. Enable with --incremental
Generating...
   Build Warning: Layout 'post' requested in 
_posts/2022-08-15-welcome-to-jekyll.markdown does not exist.
   Build Warning: Layout 'default' requested in 404.html does not exist.
   Build Warning: Layout 'page' requested in about.markdown does not exist.
   Build Warning: Layout 'home' requested in index.markdown does not exist.
  done in 0.156 seconds.
   Auto-regeneration: enabled for 'testdir'
  Server address: http://127.0.0.1:4000
Server running... press ctrl-c to stop.

I am not sure this is an issue because it does work for the minimal
approach.  Unfortunately it does not really operate as expected.  Maybe
the package should be altered to generate a minimal setup as in the
above example on "jekyll new"?

Cheers,
Remco





bug#56322: Ruby packaging issues

2022-08-24 Thread Remco van &#x27;t Veer
Maxime Devos wrote on 30 Jun 13:15 +0200

> I noticed that:
>
>   * Ruby has Autotools ./configure scripts that aren't regenerated.

I'll make a patch for that.  I also noticed unbundling of libffi is not
applied to all versions, will fix that too.

>   * Ruby bundles zlib.

Can you point out where it is in the source tree?  Looking at the
sources I can only find a (very beefy) wrapper around zlib which seems
to implement all kinds of zlib stuff but also depends on the zlib
library.  I dunno how to determine if this is bundling or not.

  https://github.com/ruby/ruby/blob/master/ext/zlib/zlib.c

>   * Ruby contains some things generated by bison or such.

It seems the generated parse.c file (from parse.y) is included in the
tarballs as a service to workaround a bootstrap problem; generating the
parser requires ruby.  See also:

  https://github.com/ruby/ruby/blob/master/common.mk#L910

I don't know how to deal with this properly.  The only thing I can think
of is compiling in two phases: first with the supplied parse.c and after
without.  Or try it with mruby as a native-input but that seems to
require ruby to compile too.  What's to gain by this?

Cheers,
Remco





bug#56322: [PATCH 0/2] Ruby packaging issues

2022-08-24 Thread Remco van &#x27;t Veer
Guix style messed up the formatting and thus the diff a bit.  Sorry
about that.

Remco van 't Veer (2):
  gnu: ruby: trigger autotools bootstrap
  gnu: ruby: fix unbundling of libffi for inheriting rubies

 gnu/packages/ruby.scm | 206 --
 1 file changed, 98 insertions(+), 108 deletions(-)

-- 
2.37.2






bug#56322: [PATCH 1/2] gnu: ruby: trigger autotools bootstrap

2022-08-24 Thread Remco van &#x27;t Veer
* gnu/packages/ruby.scm (ruby-2.6, ruby-2.7): Remove autotools artifacts
---
 gnu/packages/ruby.scm | 129 --
 1 file changed, 62 insertions(+), 67 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index cc95bd8d6e..ad8ef3d390 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -29,6 +29,7 @@
 ;;; Copyright © 2020 Tomás Ortín Fernández 
 ;;; Copyright © 2021 Giovanni Biscuolo 
 ;;; Copyright © 2022 Philip McGrath 
+;;; Copyright © 2022 Remco van 't Veer 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -101,45 +102,44 @@ (define-public ruby-2.6
   (package
 (name "ruby")
 (version "2.6.5")
-(source
- (origin
-   (method url-fetch)
-   (uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
-   (version-major+minor version)
-   "/ruby-" version ".tar.xz"))
-   (sha256
-(base32
- "0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm"))
-   (modules '((guix build utils)))
-   (snippet `(begin
-   ;; Remove bundled libffi
-   (delete-file-recursively "ext/fiddle/libffi-3.2.1")
-   #t
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
+  (version-major+minor version) "/ruby-"
+  version ".tar.xz"))
+  (sha256
+   (base32
+"0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm"))
+  (modules '((guix build utils)))
+  (snippet `(begin
+  ;; Remove bundled libffi
+  (delete-file-recursively "ext/fiddle/libffi-3.2.1")
+  ;; Trigger bootstap
+  (delete-file "configure")
+  (delete-file "aclocal.m4")
+  #t
 (build-system gnu-build-system)
 (arguments
  `(#:test-target "test"
-   #:configure-flags '("--enable-shared") ; dynamic linking
-   #:phases
-   (modify-phases %standard-phases
- (add-before 'configure 'replace-bin-sh-and-remove-libffi
-   (lambda _
- (substitute* '("Makefile.in"
-"ext/pty/pty.c"
-"io.c"
-"lib/mkmf.rb"
-"process.c"
-"test/rubygems/test_gem_ext_configure_builder.rb"
-"test/rdoc/test_rdoc_parser.rb"
-"test/ruby/test_rubyoptions.rb"
-"test/ruby/test_process.rb"
-"test/ruby/test_system.rb"
-"tool/rbinstall.rb")
-   (("/bin/sh") (which "sh")))
- #t)
-(inputs
- (list readline openssl libffi gdbm))
-(propagated-inputs
- (list zlib))
+   #:configure-flags '("--enable-shared") ;dynamic linking
+   #:phases (modify-phases %standard-phases
+  (add-before 'configure 'replace-bin-sh-and-remove-libffi
+(lambda _
+  (substitute* '("Makefile.in" "ext/pty/pty.c"
+ "io.c"
+ "lib/mkmf.rb"
+ "process.c"
+ 
"test/rubygems/test_gem_ext_configure_builder.rb"
+ "test/rdoc/test_rdoc_parser.rb"
+ "test/ruby/test_rubyoptions.rb"
+ "test/ruby/test_process.rb"
+ "test/ruby/test_system.rb"
+ "tool/rbinstall.rb")
+(("/bin/sh")
+ (which "sh"))) #t)
+(inputs (list readline openssl libffi gdbm))
+(propagated-inputs (list zlib))
+(native-inputs (list autoconf automake))
 (native-search-paths
  (list (search-path-specification
 (variable "GEM_PATH")
@@ -154,39 +154,34 @@ (define-public ruby-2.7
   (package
 (inherit ruby-2.6)
 (version "2.7.4")
-(source
- (origin
-   (inherit (package-source ruby-2.6))
-   (uri (string-append "https://cache.ruby-lang.org/pub/ruby/";
-

bug#56322: [PATCH 2/2] gnu: ruby: fix unbundling of libffi for inheriting rubies

2022-08-24 Thread Remco van &#x27;t Veer
* gnu/packages/ruby.scm (ruby-2.4, ruby-2.5, ruby-3.0, ruby-3.1): Inherit 
package-source to ensure inclusion of unbundling snippet
---
 gnu/packages/ruby.scm | 77 ---
 1 file changed, 36 insertions(+), 41 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ad8ef3d390..e98814da6d 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -187,62 +187,57 @@ (define-public ruby-3.0
   (package
 (inherit ruby-2.7)
 (version "3.0.2")
-(source
- (origin
-   (method url-fetch)
-   (uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
-   (version-major+minor version)
-   "/ruby-" version ".tar.xz"))
-   (sha256
-(base32
- "0h2w2ms4gx2s96v3lzdr3add94bd2qqkhdjzaycmaqhg21rpf3jp"))
+(source (origin
+  (inherit (package-source ruby-2.7))
+  (method url-fetch)
+  (uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
+  (version-major+minor version) "/ruby-"
+  version ".tar.xz"))
+  (sha256
+   (base32
+"0h2w2ms4gx2s96v3lzdr3add94bd2qqkhdjzaycmaqhg21rpf3jp"))
 
 (define-public ruby-3.1
   (package
 (inherit ruby-2.7)
 (version "3.1.1")
-(source
- (origin
-   (method url-fetch)
-   (uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
-   (version-major+minor version)
-   "/ruby-" version ".tar.xz"))
-   (sha256
-(base32
- "1akcl7vhmwfm6ybj7493kzy58ykh2r39ri9f4xfm2xmhg1msmvvs"))
+(source (origin
+  (inherit (package-source ruby-2.7))
+  (method url-fetch)
+  (uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
+  (version-major+minor version) "/ruby-"
+  version ".tar.xz"))
+  (sha256
+   (base32
+"1akcl7vhmwfm6ybj7493kzy58ykh2r39ri9f4xfm2xmhg1msmvvs"))
 
 (define-public ruby-2.5
   (package
 (inherit ruby-2.6)
 (version "2.5.9")
-(source
- (origin
-   (method url-fetch)
-   (uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
-   (version-major+minor version)
-   "/ruby-" version ".tar.xz"))
-   (sha256
-(base32
- "1w2qncacm7h3f3il1whghdabwnv9fvwmz9f1a9vcg32006ljyzx8"))
+(source (origin
+  (inherit (package-source ruby-2.6))
+  (method url-fetch)
+  (uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
+  (version-major+minor version) "/ruby-"
+  version ".tar.xz"))
+  (sha256
+   (base32
+"1w2qncacm7h3f3il1whghdabwnv9fvwmz9f1a9vcg32006ljyzx8"))
 
 (define-public ruby-2.4
   (package
 (inherit ruby-2.6)
 (version "2.4.10")
-(source
- (origin
-   (method url-fetch)
-   (uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
-   (version-major+minor version)
-   "/ruby-" version ".tar.xz"))
-   (sha256
-(base32
- "1prhqlgik1zmw9lakl6hkriqslspw48pvhxff17h7ns42p8qwrnm"))
-   (modules '((guix build utils)))
-   (snippet `(begin
-   ;; Remove bundled libffi
-   (delete-file-recursively "ext/fiddle/libffi-3.2.1")
-   #t))
+(source (origin
+  (inherit (package-source ruby-2.6))
+  (method url-fetch)
+  (uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
+  (version-major+minor version) "/ruby-"
+  version ".tar.xz"))
+  (sha256
+   (base32
+"1prhqlgik1zmw9lakl6hkriqslspw48pvhxff17h7ns42p8qwrnm"))
 
 (define-public ruby ruby-2.7)
 
-- 
2.37.2






bug#56322: Ruby packaging issues

2022-08-25 Thread Remco van &#x27;t Veer
2022/08/24 20:38, Maxime Devos:

> We have a bunch of old rubies packaged, maybe it can be generated with
> one of the old versions? Though possibly the old versions have the
> same problem, I haven't checked.

Older rubies need ruby to compile too, I checked.  To totally getting
rid of parse.c is not easy.

> If not: fully properly generating it might not be possible, but
> something in-between could be an option:
>
> 1. First, use the pre-generated parse.c.
> 2. Once ruby is built, regenerate the parse.c, and verify that it is
>the same as the old parse.c (ignoring the timestamp)
>
>> What's to gain by this?
>
> (1) I would assume it is much easier to hide malware in a generated
> file like parse.c than in the real source code (*) (IIRC, the .c code
> generated by bison is much longer than the .y). By generating the
> parse.c, the potential issue is side-stepped; any security reviewers
> wouldn't even have to look at parse.c because the pre-generated
> parse.c isn't used, it's regenerated.

By using one ruby to support compiling the others said security reviewer
can focus on one particular parse.c.  It's big but reviewing it seems
doable but I am no security reviewer.

> (2) Also: generators like Bison can have bugs, fixed in later
> versions. Now imagine that Bison had, say, a buffer overflow bug, and
> that distro's just used the pre-generated parse.c. Then once a fixed
> version of Bison comes out, we would have to check every package to
> see if it has a pre-generated parser. It would be much less stressful
> to just always generate parsers from source, then once the version of
> Bison in Guix is updated then all packages automatically get the
> buffer overflow fix.
>
> I don't think my in-between proposal helps much with (1) in case of a
> competent attacker (though it could stop some insufficiently
> sophisticated attacks where the parse.c malware doesn't try to subvert
> the later check), but it still helps with (2) -- it at least detects
> if ruby used an old bison (and hence that a patch might be in order)

The two phase build approach (first building with parse.c and then using
that ruby as native-input for a package with parse.c removed) seems to
work but with some notes.  Rubies 2.7 and up work fine with bison
current in guix (bison-3.7.6) but ruby-2.6 (and possibly down) don't
because they trigger some incompatibility between bison-3.5.1 (stated as
parse.c generator in ruby-2.6) and bison-3.7.6.

I tried bison-3.0 from gnu/packages/bison for ruby-2.6 and it works but
using that kinda defeats the ".. automatically get the buffer overflow
fix" argument.  I'd say, it doesn't really matter for ruby-2.6 and down
since they are EOL anyway and should at some point be removed from guix.

I'll post a patch after this message for feedback.  In it a new package
is introduced based on ruby-2.7 named baseruby which is compiled with
the parse.c from the tarball, ruby-2.7 and up will delete parse.c before
build and have extra native-inputs on baseruby and bison to support the
magic.

Cheers,
Remco





bug#56322: [PATCH] gnu: ruby: regenerate parse.c

2022-08-25 Thread Remco van &#x27;t Veer
* gnu/packages/ruby.scm (baseruby, ruby-2.7): Use bootstrap baseruby to 
regenerate parse.c
---
 gnu/packages/ruby.scm | 30 --
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index e98814da6d..8de6cda257 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -161,7 +161,16 @@ (define-public ruby-2.7
   version ".tar.gz"))
   (sha256
(base32
-"0nxwkxh7snmjqf787qsp4i33mxd1rbf9yzyfiky5k230i680jhrh"
+"0nxwkxh7snmjqf787qsp4i33mxd1rbf9yzyfiky5k230i680jhrh"))
+  (snippet `(begin
+  ;; Remove bundled libffi
+  (delete-file-recursively "ext/fiddle/libffi-3.2.1")
+  ;; Trigger bootstap
+  (delete-file "configure")
+  (delete-file "aclocal.m4")
+  ;; Trigger rebuild of parse.c from parse.y
+  (delete-file "parse.c")
+  #t
 (arguments
  `(#:test-target "test"
#:configure-flags '("--enable-shared") ;dynamic linking
@@ -181,7 +190,24 @@ (define-public ruby-2.7
  "test/ruby/test_system.rb"
  "tool/rbinstall.rb")
 (("/bin/sh")
- (which "sh"))) #t)))
+ (which "sh"))) #t)
+(native-inputs (list autoconf automake baseruby bison
+
+(define baseruby ;; used to build ruby by parser generator
+  (package
+(inherit ruby-2.7)
+(name "baseruby")
+(source (origin
+  (inherit (package-source ruby-2.7))
+  ;; override snippet to not include deletion of bundled parse.c
+  (snippet `(begin
+  ;; Remove bundled libffi
+  (delete-file-recursively "ext/fiddle/libffi-3.2.1")
+  ;; Trigger bootstap
+  (delete-file "configure")
+  (delete-file "aclocal.m4")
+  #t
+(native-inputs (list autoconf automake
 
 (define-public ruby-3.0
   (package
-- 
2.37.2






bug#56322: Debbug 56322, Ruby packaging issues, ping?

2022-10-08 Thread Remco van &#x27;t Veer
Do the patches[1][2] need more work?


[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56322#11
[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56322#29





bug#56322: Debbug 56322, Ruby packaging issues, ping?

2022-10-09 Thread Remco van &#x27;t Veer
Hi Maxime,

Thanks for taking a look again.  I'll make a new patchset to correct the
things you mentioned.

2022/10/09 11:15, Maxime Devos:

> Otherwise, not that I know of, these patches appear
> straightforward. They might need to be done on core-updates though --
> unless this has changed, IIRC ruby-asciidoctor is deep in the package
> graph.

What's the protocol for "doing on core-updates"?  I guess I can rebase
on that but who will or should pick up these patches?  Is there somebody
I need to ping?

Remco





bug#56322: [PATCH core-updates 1/3] gnu: ruby: trigger autotools bootstrap

2022-10-12 Thread Remco van &#x27;t Veer
* gnu/packages/ruby.scm (ruby-2.6, ruby-2.7): Remove autotools artifacts
---
 gnu/packages/ruby.scm | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index e1b71a0a1a..25d7aba933 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -116,7 +116,9 @@ (define-public ruby-2.6
(snippet `(begin
;; Remove bundled libffi
(delete-file-recursively "ext/fiddle/libffi-3.2.1")
-   #t
+   ;; Trigger bootstap
+   (delete-file "configure")
+   (delete-file "aclocal.m4")
 (build-system gnu-build-system)
 (arguments
  `(#:test-target "test"
@@ -142,6 +144,7 @@ (define-public ruby-2.6
  (list readline openssl-1.1 libffi gdbm))
 (propagated-inputs
  (list zlib))
+(native-inputs (list autoconf automake))
 (native-search-paths
  (list (search-path-specification
 (variable "GEM_PATH")
@@ -185,10 +188,7 @@ (define-public ruby-2.7
 "test/ruby/test_process.rb"
 "test/ruby/test_system.rb"
 "tool/rbinstall.rb")
-   (("/bin/sh") (which "sh")))
- #t)
-(native-inputs
- (list autoconf
+   (("/bin/sh") (which "sh"))
 
 (define-public ruby-3.0
   (package
-- 
2.37.3






bug#56322: [PATCH core-updates 2/3] gnu: ruby: fix unbundling of libffi for inheriting rubies

2022-10-12 Thread Remco van &#x27;t Veer
* gnu/packages/ruby.scm (ruby-3.0, ruby-3.1): Inherit package-source to ensure 
inclusion of unbundling snippet
---
 gnu/packages/ruby.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 25d7aba933..bd55d5ac6d 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -196,6 +196,7 @@ (define-public ruby-3.0
 (version "3.0.4")
 (source
  (origin
+   (inherit (package-source ruby-2.7))
(method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
(version-major+minor version)
@@ -213,6 +214,7 @@ (define-public ruby-3.1
 (version "3.1.2")
 (source
  (origin
+   (inherit (package-source ruby-3.0))
(method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/";
(version-major+minor version)
-- 
2.37.3






bug#56322: [PATCH core-updates 3/3] gnu: ruby: regenerate parse.c

2022-10-12 Thread Remco van &#x27;t Veer
* gnu/packages/ruby.scm (baseruby, ruby-2.7): Use bootstrap baseruby to 
regenerate parse.c
---
 gnu/packages/ruby.scm | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index bd55d5ac6d..497271f442 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -188,7 +188,23 @@ (define-public ruby-2.7
 "test/ruby/test_process.rb"
 "test/ruby/test_system.rb"
 "tool/rbinstall.rb")
-   (("/bin/sh") (which "sh"))
+   (("/bin/sh") (which "sh"
+(native-inputs (list autoconf automake baseruby bison
+
+(define baseruby ;; for bootstrapping ruby's parser generator
+  (package
+(inherit ruby-2.7)
+(name "baseruby")
+(source (origin
+  (inherit (package-source ruby-2.7))
+  ;; override snippet to not include deletion of bundled parse.c
+  (snippet `(begin
+  ;; Remove bundled libffi
+  (delete-file-recursively "ext/fiddle/libffi-3.2.1")
+  ;; Trigger bootstap
+  (delete-file "configure")
+  (delete-file "aclocal.m4")
+(native-inputs (list autoconf automake
 
 (define-public ruby-3.0
   (package
-- 
2.37.3






bug#56322: [PATCH core-updates 0/3] Ruby packaging issues

2022-10-12 Thread Remco van &#x27;t Veer
Applied changes from feedback by Maxime Devos and rebased on
core-updates.

Remco van 't Veer (3):
  gnu: ruby: trigger autotools bootstrap
  gnu: ruby: fix unbundling of libffi for inheriting rubies
  gnu: ruby: regenerate parse.c

 gnu/packages/ruby.scm | 28 +++-
 1 file changed, 23 insertions(+), 5 deletions(-)


base-commit: 685110045c04a60bf18163aab1c230f944c871c9
-- 
2.37.3






bug#58880: [PATCH] guix gc: Round MiBs in user feedback.

2022-11-25 Thread Remco van &#x27;t Veer
* guix/scripts/gc.scm (guix-gc): Round MiBs in user feedback.
* po/*/*.po (guix/scripts/gc.scm)a: Round MiBs in user feedback.
---
 guix/scripts/gc.scm |  8 
 po/guix/bn.po   |  6 +++---
 po/guix/cs.po   |  6 +++---
 po/guix/da.po   | 12 ++--
 po/guix/de.po   |  8 
 po/guix/eo.po   |  6 +++---
 po/guix/es.po   |  8 
 po/guix/fa.po   |  6 +++---
 po/guix/fi.po   |  6 +++---
 po/guix/fr.po   |  6 +++---
 po/guix/hu.po   |  6 +++---
 po/guix/it.po   |  6 +++---
 po/guix/ja.po   |  6 +++---
 po/guix/ko.po   |  6 +++---
 po/guix/lt.po   |  6 +++---
 po/guix/nl.po   |  6 +++---
 po/guix/oc.po   |  6 +++---
 po/guix/pl.po   |  6 +++---
 po/guix/pt_BR.po|  8 
 po/guix/ru.po   |  6 +++---
 po/guix/si.po   |  6 +++---
 po/guix/sk.po   |  6 +++---
 po/guix/sr.po   |  6 +++---
 po/guix/sv.po   |  6 +++---
 po/guix/ta.po   |  6 +++---
 po/guix/tr.po   |  6 +++---
 po/guix/uk.po   |  6 +++---
 po/guix/vi.po   |  6 +++---
 po/guix/zh_CN.po|  6 +++---
 29 files changed, 94 insertions(+), 94 deletions(-)

diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 5e775c5cdb..2bbfb26d5d 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -260,10 +260,10 @@ (define-command (guix-gc . args)
 ;; Attempt to have at least SPACE bytes available in STORE.
 (let ((free (free-disk-space (%store-prefix
   (if (> free space)
-  (info (G_ "already ~h MiBs available on ~a, nothing to do~%")
+  (info (G_ "already ~,2h MiBs available on ~a, nothing to do~%")
 (/ free 1024. 1024.) (%store-prefix))
   (let ((to-free (- space free)))
-(info (G_ "freeing ~h MiBs~%") (/ to-free 1024. 1024.))
+(info (G_ "freeing ~,2h MiBs~%") (/ to-free 1024. 1024.))
 (collect-garbage store to-free)
 
   (define (delete-generations store pattern)
@@ -327,10 +327,10 @@ (define-command (guix-gc . args)
  (ensure-free-space store free-space))
 (min-freed
  (let-values (((paths freed) (collect-garbage store min-freed)))
-  (info (G_ "freed ~h MiBs~%") (/ freed 1024. 1024.
+  (info (G_ "freed ~,2h MiBs~%") (/ freed 1024. 1024.
 (else
  (let-values (((paths freed) (collect-garbage store)))
-  (info (G_ "freed ~h MiBs~%") (/ freed 1024. 1024.)))
+  (info (G_ "freed ~,2h MiBs~%") (/ freed 1024. 1024.)))
 ((list-roots)
  (assert-no-extra-arguments)
  (list-roots))
diff --git a/po/guix/bn.po b/po/guix/bn.po
index 05bb1849c0..bbbe913130 100644
--- a/po/guix/bn.po
+++ b/po/guix/bn.po
@@ -3723,11 +3723,11 @@ msgid "~s does not denote a duration~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:252
-msgid "already ~h MiBs available on ~a, nothing to do~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:255
-msgid "freeing ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:295
@@ -3736,7 +3736,7 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:319 guix/scripts/gc.scm:322
-msgid "freed ~h MiBs~%"
+msgid "freed ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/git.scm:26
diff --git a/po/guix/cs.po b/po/guix/cs.po
index 955fd10264..3858ec2fb3 100644
--- a/po/guix/cs.po
+++ b/po/guix/cs.po
@@ -3787,11 +3787,11 @@ msgid "~s does not denote a duration~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:252
-msgid "already ~h MiBs available on ~a, nothing to do~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:255
-msgid "freeing ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:295
@@ -3800,7 +3800,7 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr "Neplatný argument: ~a~%"
 
 #: guix/scripts/gc.scm:319 guix/scripts/gc.scm:322
-msgid "freed ~h MiBs~%"
+msgid "freed ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/git.scm:26
diff --git a/po/guix/da.po b/po/guix/da.po
index f61ee1c7b7..d4002b5f16 100644
--- a/po/guix/da.po
+++ b/po/guix/da.po
@@ -4154,12 +4154,12 @@ msgid "~s does not denote a duration~%"
 msgstr "~s betegner ikke en varighed~%"
 
 #: guix/scripts/gc.scm:252
-msgid "already ~h MiBs available on ~a, nothing to do~%"
-msgstr "der er allerede ~h MiBs tilgængelige på ~a, intet at udføre~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
+msgstr "der er allerede ~,2h MiBs tilgængelige på ~a, intet at udføre~%"
 
 #: guix/scripts/gc.scm:255
-msgid "freeing ~h MiBs~%"
-msgstr "frigiver ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
+msgstr "frigiver ~,2h MiBs~%"
 
 #: guix/scripts/gc.scm:295
 #, scheme-format
@@ -4167,8 +4167,8 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr "uvedkommende argumenter: ~{~a ~}~%"
 
 #: guix/scripts/gc.scm:319 guix/scripts/gc.scm:322
-msgid "freed ~h MiBs~%"
-msgstr "frigav ~h MiBs~%"
+ms

bug#58880: 'guix gc' does not round the amount of disk space freed

2023-01-21 Thread Remco van &#x27;t Veer
Hi,

2023/01/21 17:26, zimoun:

> On Fri, 25 Nov 2022 at 21:33, Remco van 't Veer  wrote:
>> * guix/scripts/gc.scm (guix-gc): Round MiBs in user feedback.
>> * po/*/*.po (guix/scripts/gc.scm)a: Round MiBs in user feedback.
>
> If the way to go with the translation dance?

I don't know.  I figured since the translation key was changed this
would be the best way to do this but to be honest I don't understand how
to do this using "weblate" (from info:guix#Translating Guix).

> The only change is:
>
>> diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
>> index 5e775c5cdb..2bbfb26d5d 100644
>> --- a/guix/scripts/gc.scm
>> +++ b/guix/scripts/gc.scm
>> @@ -260,10 +260,10 @@ (define-command (guix-gc . args)
>>  ;; Attempt to have at least SPACE bytes available in STORE.
>>  (let ((free (free-disk-space (%store-prefix
>>(if (> free space)
>> -  (info (G_ "already ~h MiBs available on ~a, nothing to do~%")
>> +  (info (G_ "already ~,2h MiBs available on ~a, nothing to do~%")
>>  (/ free 1024. 1024.) (%store-prefix))
>>(let ((to-free (- space free)))
>> -(info (G_ "freeing ~h MiBs~%") (/ to-free 1024. 1024.))
>> +(info (G_ "freeing ~,2h MiBs~%") (/ to-free 1024. 1024.))
>>  (collect-garbage store to-free)
>>
>>(define (delete-generations store pattern)
>> @@ -327,10 +327,10 @@ (define-command (guix-gc . args)
>>   (ensure-free-space store free-space))
>>  (min-freed
>>   (let-values (((paths freed) (collect-garbage store min-freed)))
>> -  (info (G_ "freed ~h MiBs~%") (/ freed 1024. 1024.
>> +  (info (G_ "freed ~,2h MiBs~%") (/ freed 1024. 1024.
>>  (else
>>   (let-values (((paths freed) (collect-garbage store)))
>> -  (info (G_ "freed ~h MiBs~%") (/ freed 1024. 1024.)))
>> +  (info (G_ "freed ~,2h MiBs~%") (/ freed 1024. 1024.)))
>>  ((list-roots)
>>   (assert-no-extra-arguments)
>>   (list-roots))
>
> and captured by G_ so does this only to be applied and then all the
> msgid updated by the translation process?

Yes, this is the only change.  The old keys will be orphaned though and
remain in the po files.  I'd be happy to drop the po/*/*.po part of the
patch if that helps.

Cheers,
Remco





bug#58880: [PATCH v2 1/2] guix gc: Round MiBs in user feedback.

2023-01-23 Thread Remco van &#x27;t Veer
* guix/scripts/gc.scm (guix-gc): Round MiBs in user feedback.
---
 guix/scripts/gc.scm | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 5e775c5cdb..2bbfb26d5d 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -260,10 +260,10 @@ (define-command (guix-gc . args)
 ;; Attempt to have at least SPACE bytes available in STORE.
 (let ((free (free-disk-space (%store-prefix
   (if (> free space)
-  (info (G_ "already ~h MiBs available on ~a, nothing to do~%")
+  (info (G_ "already ~,2h MiBs available on ~a, nothing to do~%")
 (/ free 1024. 1024.) (%store-prefix))
   (let ((to-free (- space free)))
-(info (G_ "freeing ~h MiBs~%") (/ to-free 1024. 1024.))
+(info (G_ "freeing ~,2h MiBs~%") (/ to-free 1024. 1024.))
 (collect-garbage store to-free)
 
   (define (delete-generations store pattern)
@@ -327,10 +327,10 @@ (define-command (guix-gc . args)
  (ensure-free-space store free-space))
 (min-freed
  (let-values (((paths freed) (collect-garbage store min-freed)))
-  (info (G_ "freed ~h MiBs~%") (/ freed 1024. 1024.
+  (info (G_ "freed ~,2h MiBs~%") (/ freed 1024. 1024.
 (else
  (let-values (((paths freed) (collect-garbage store)))
-  (info (G_ "freed ~h MiBs~%") (/ freed 1024. 1024.)))
+  (info (G_ "freed ~,2h MiBs~%") (/ freed 1024. 1024.)))
 ((list-roots)
  (assert-no-extra-arguments)
  (list-roots))
-- 
2.39.1






bug#58880: [PATCH v2 2/2] nls: Update translation keys for guix gc

2023-01-23 Thread Remco van &#x27;t Veer
* po/*/*.po (guix/scripts/gc.scm): Round MiBs in user feedback.
---
 po/guix/bn.po| 6 +++---
 po/guix/cs.po| 6 +++---
 po/guix/da.po| 6 +++---
 po/guix/de.po| 6 +++---
 po/guix/eo.po| 6 +++---
 po/guix/es.po| 6 +++---
 po/guix/fa.po| 6 +++---
 po/guix/fi.po| 6 +++---
 po/guix/fr.po| 6 +++---
 po/guix/hu.po| 6 +++---
 po/guix/ja.po| 6 +++---
 po/guix/ka.po| 6 +++---
 po/guix/ko.po| 6 +++---
 po/guix/lt.po| 6 +++---
 po/guix/nl.po| 6 +++---
 po/guix/oc.po| 6 +++---
 po/guix/pl.po| 6 +++---
 po/guix/pt_BR.po | 6 +++---
 po/guix/ru.po| 6 +++---
 po/guix/si.po| 6 +++---
 po/guix/sk.po| 6 +++---
 po/guix/sr.po| 6 +++---
 po/guix/sv.po| 6 +++---
 po/guix/ta.po| 6 +++---
 po/guix/tr.po| 6 +++---
 po/guix/uk.po| 6 +++---
 po/guix/vi.po| 6 +++---
 po/guix/zh_CN.po | 6 +++---
 28 files changed, 84 insertions(+), 84 deletions(-)

diff --git a/po/guix/bn.po b/po/guix/bn.po
index 55a2942212..83cf451f8f 100644
--- a/po/guix/bn.po
+++ b/po/guix/bn.po
@@ -4067,11 +4067,11 @@ msgid "invoke the garbage collector"
 msgstr ""
 
 #: guix/scripts/gc.scm:263
-msgid "already ~h MiBs available on ~a, nothing to do~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:266
-msgid "freeing ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:306
@@ -4080,7 +4080,7 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:330 guix/scripts/gc.scm:333
-msgid "freed ~h MiBs~%"
+msgid "freed ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/git.scm:26
diff --git a/po/guix/cs.po b/po/guix/cs.po
index 3b5128f227..b0f1c04ea0 100644
--- a/po/guix/cs.po
+++ b/po/guix/cs.po
@@ -4132,11 +4132,11 @@ msgid "invoke the garbage collector"
 msgstr ""
 
 #: guix/scripts/gc.scm:263
-msgid "already ~h MiBs available on ~a, nothing to do~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:266
-msgid "freeing ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:306
@@ -4145,7 +4145,7 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr "Neplatný argument: ~a~%"
 
 #: guix/scripts/gc.scm:330 guix/scripts/gc.scm:333
-msgid "freed ~h MiBs~%"
+msgid "freed ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/git.scm:26
diff --git a/po/guix/da.po b/po/guix/da.po
index 809f0a6d20..89917a7613 100644
--- a/po/guix/da.po
+++ b/po/guix/da.po
@@ -4507,11 +4507,11 @@ msgid "invoke the garbage collector"
 msgstr ""
 
 #: guix/scripts/gc.scm:263
-msgid "already ~h MiBs available on ~a, nothing to do~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
 msgstr "der er allerede ~h MiBs tilgængelige på ~a, intet at udføre~%"
 
 #: guix/scripts/gc.scm:266
-msgid "freeing ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
 msgstr "frigiver ~h MiBs~%"
 
 #: guix/scripts/gc.scm:306
@@ -4520,7 +4520,7 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr "uvedkommende argumenter: ~{~a ~}~%"
 
 #: guix/scripts/gc.scm:330 guix/scripts/gc.scm:333
-msgid "freed ~h MiBs~%"
+msgid "freed ~,2h MiBs~%"
 msgstr "frigav ~h MiBs~%"
 
 #: guix/scripts/git.scm:26
diff --git a/po/guix/de.po b/po/guix/de.po
index 39de45814e..ed4da5fdf9 100644
--- a/po/guix/de.po
+++ b/po/guix/de.po
@@ -4561,11 +4561,11 @@ msgid "invoke the garbage collector"
 msgstr "den Müllsammler aufrufen"
 
 #: guix/scripts/gc.scm:263
-msgid "already ~h MiBs available on ~a, nothing to do~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
 msgstr "Es sind bereits ~h MiB verfügbar auf ~a, nichts zu tun~%"
 
 #: guix/scripts/gc.scm:266
-msgid "freeing ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
 msgstr "~h MiB werden freigegeben~%"
 
 #: guix/scripts/gc.scm:306
@@ -4574,7 +4574,7 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr "Zusätzliche Argumente: ~{~a ~}~%"
 
 #: guix/scripts/gc.scm:330 guix/scripts/gc.scm:333
-msgid "freed ~h MiBs~%"
+msgid "freed ~,2h MiBs~%"
 msgstr "~h MiB wurden freigegeben~%"
 
 #: guix/scripts/git.scm:26
diff --git a/po/guix/eo.po b/po/guix/eo.po
index f0e433ed1f..bbd6870f4f 100644
--- a/po/guix/eo.po
+++ b/po/guix/eo.po
@@ -4344,12 +4344,12 @@ msgid "invoke the garbage collector"
 msgstr ""
 
 #: guix/scripts/gc.scm:263
-msgid "already ~h MiBs available on ~a, nothing to do~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:266
 #, fuzzy
-msgid "freeing ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
 msgstr "ni forigas ~a~%"
 
 #: guix/scripts/gc.scm:306
@@ -4358,7 +4358,7 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr "~A: fremda argumento~%"
 
 #: guix/scripts/gc.scm:330 guix/scripts/gc.scm:333
-msgid "freed ~h MiBs~%"
+msgid "freed ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/git.scm:26
diff --git a/po/guix/es.po b/po/guix/es.po
index c2b10cd0b1..f0d1d1fb62 100644
--- a/po/guix/es.po
+++ b/po/guix/es.po
@@ -4622,11 +4622,11 @@ msgid "invoke the garbage collector"
 msgstr "invocación del recolector 

bug#58880: [PATCH v2 0/2] split into 2 commits and rebased on master

2023-01-23 Thread Remco van &#x27;t Veer
I'm not sure about the commit message of the second commit.

Remco van 't Veer (2):
  guix gc: Round MiBs in user feedback.
  nls: Update translation keys for guix gc

 guix/scripts/gc.scm | 8 
 po/guix/bn.po   | 6 +++---
 po/guix/cs.po   | 6 +++---
 po/guix/da.po   | 6 +++---
 po/guix/de.po   | 6 +++---
 po/guix/eo.po   | 6 +++---
 po/guix/es.po   | 6 +++---
 po/guix/fa.po   | 6 +++---
 po/guix/fi.po   | 6 +++---
 po/guix/fr.po   | 6 +++---
 po/guix/hu.po   | 6 +++---
 po/guix/ja.po   | 6 +++---
 po/guix/ka.po   | 6 +++---
 po/guix/ko.po   | 6 +++---
 po/guix/lt.po   | 6 +++---
 po/guix/nl.po   | 6 +++---
 po/guix/oc.po   | 6 +++---
 po/guix/pl.po   | 6 +++---
 po/guix/pt_BR.po| 6 +++---
 po/guix/ru.po   | 6 +++---
 po/guix/si.po   | 6 +++---
 po/guix/sk.po   | 6 +++---
 po/guix/sr.po   | 6 +++---
 po/guix/sv.po   | 6 +++---
 po/guix/ta.po   | 6 +++---
 po/guix/tr.po   | 6 +++---
 po/guix/uk.po   | 6 +++---
 po/guix/vi.po   | 6 +++---
 po/guix/zh_CN.po| 6 +++---
 29 files changed, 88 insertions(+), 88 deletions(-)

-- 
2.39.1






bug#58880: [PATCH v2 2/2] nls: Update translation keys for guix gc

2023-01-23 Thread Remco van &#x27;t Veer
2023/01/23 14:14, Julien Lepiller:

> Ah this is dangerous. You updated the msgid but not the msgstr. This
> means the translation will keep using the old format string. Could you
> also update the msgstr when a translation exists?

The order of the arguments is still the same for all translatable
strings so the danger is minimal.  I'll send a v3 with the msgstrs
updated too (using po-mode.el) but I'll only touch the ones having "~h"
(and changed them to "~,2h") and will leave the ones having "~a" for the
size argument as they were, just to be sure (don't want to break a
translation).

> You can also drop all the files with no translation for the affected
> msgids from your patch, though this works too.

Thanks for the tip but I'll leave them as is for now.

Cheers,
Remco





bug#58880: [PATCH v3 1/2] guix gc: Round MiBs in user feedback.

2023-01-23 Thread Remco van &#x27;t Veer
* guix/scripts/gc.scm (guix-gc): Round MiBs in user feedback.
---
 guix/scripts/gc.scm | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 5e775c5cdb..2bbfb26d5d 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -260,10 +260,10 @@ (define-command (guix-gc . args)
 ;; Attempt to have at least SPACE bytes available in STORE.
 (let ((free (free-disk-space (%store-prefix
   (if (> free space)
-  (info (G_ "already ~h MiBs available on ~a, nothing to do~%")
+  (info (G_ "already ~,2h MiBs available on ~a, nothing to do~%")
 (/ free 1024. 1024.) (%store-prefix))
   (let ((to-free (- space free)))
-(info (G_ "freeing ~h MiBs~%") (/ to-free 1024. 1024.))
+(info (G_ "freeing ~,2h MiBs~%") (/ to-free 1024. 1024.))
 (collect-garbage store to-free)
 
   (define (delete-generations store pattern)
@@ -327,10 +327,10 @@ (define-command (guix-gc . args)
  (ensure-free-space store free-space))
 (min-freed
  (let-values (((paths freed) (collect-garbage store min-freed)))
-  (info (G_ "freed ~h MiBs~%") (/ freed 1024. 1024.
+  (info (G_ "freed ~,2h MiBs~%") (/ freed 1024. 1024.
 (else
  (let-values (((paths freed) (collect-garbage store)))
-  (info (G_ "freed ~h MiBs~%") (/ freed 1024. 1024.)))
+  (info (G_ "freed ~,2h MiBs~%") (/ freed 1024. 1024.)))
 ((list-roots)
  (assert-no-extra-arguments)
  (list-roots))
-- 
2.39.1






bug#58880: [PATCH v3 2/2] nls: Update translation keys for guix gc

2023-01-23 Thread Remco van &#x27;t Veer
* po/*/*.po (guix/scripts/gc.scm): Round MiBs in user feedback.
---
 po/guix/bn.po|  6 +++---
 po/guix/cs.po|  6 +++---
 po/guix/da.po| 14 +++---
 po/guix/de.po| 14 +++---
 po/guix/eo.po|  6 +++---
 po/guix/es.po| 14 +++---
 po/guix/fa.po|  6 +++---
 po/guix/fi.po|  6 +++---
 po/guix/fr.po| 14 +++---
 po/guix/hu.po|  6 +++---
 po/guix/ja.po|  6 +++---
 po/guix/ka.po|  6 +++---
 po/guix/ko.po|  6 +++---
 po/guix/lt.po|  6 +++---
 po/guix/nl.po| 14 +++---
 po/guix/oc.po|  6 +++---
 po/guix/pl.po| 12 ++--
 po/guix/pt_BR.po | 14 +++---
 po/guix/ru.po|  6 +++---
 po/guix/si.po|  6 +++---
 po/guix/sk.po| 14 +++---
 po/guix/sr.po|  6 +++---
 po/guix/sv.po|  6 +++---
 po/guix/ta.po| 12 ++--
 po/guix/tr.po|  6 +++---
 po/guix/uk.po|  6 +++---
 po/guix/vi.po|  6 +++---
 po/guix/zh_CN.po |  6 +++---
 28 files changed, 118 insertions(+), 118 deletions(-)

diff --git a/po/guix/bn.po b/po/guix/bn.po
index 55a2942212..83cf451f8f 100644
--- a/po/guix/bn.po
+++ b/po/guix/bn.po
@@ -4067,11 +4067,11 @@ msgid "invoke the garbage collector"
 msgstr ""
 
 #: guix/scripts/gc.scm:263
-msgid "already ~h MiBs available on ~a, nothing to do~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:266
-msgid "freeing ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:306
@@ -4080,7 +4080,7 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:330 guix/scripts/gc.scm:333
-msgid "freed ~h MiBs~%"
+msgid "freed ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/git.scm:26
diff --git a/po/guix/cs.po b/po/guix/cs.po
index 3b5128f227..b0f1c04ea0 100644
--- a/po/guix/cs.po
+++ b/po/guix/cs.po
@@ -4132,11 +4132,11 @@ msgid "invoke the garbage collector"
 msgstr ""
 
 #: guix/scripts/gc.scm:263
-msgid "already ~h MiBs available on ~a, nothing to do~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:266
-msgid "freeing ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/gc.scm:306
@@ -4145,7 +4145,7 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr "Neplatný argument: ~a~%"
 
 #: guix/scripts/gc.scm:330 guix/scripts/gc.scm:333
-msgid "freed ~h MiBs~%"
+msgid "freed ~,2h MiBs~%"
 msgstr ""
 
 #: guix/scripts/git.scm:26
diff --git a/po/guix/da.po b/po/guix/da.po
index 809f0a6d20..c3db9c9ac6 100644
--- a/po/guix/da.po
+++ b/po/guix/da.po
@@ -22,7 +22,7 @@ msgstr ""
 "Project-Id-Version: guix 1.1.0-pre1\n"
 "Report-Msgid-Bugs-To: bug-guix@gnu.org\n"
 "POT-Creation-Date: 2022-11-21 03:18+\n"
-"PO-Revision-Date: 2020-03-08 14:10+0200\n"
+"PO-Revision-Date: 2023-01-23 14:36+0100\n"
 "Last-Translator: joe Hansen \n"
 "Language-Team: Danish \n"
 "Language: da\n"
@@ -4507,12 +4507,12 @@ msgid "invoke the garbage collector"
 msgstr ""
 
 #: guix/scripts/gc.scm:263
-msgid "already ~h MiBs available on ~a, nothing to do~%"
-msgstr "der er allerede ~h MiBs tilgængelige på ~a, intet at udføre~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
+msgstr "der er allerede ~,2h MiBs tilgængelige på ~a, intet at udføre~%"
 
 #: guix/scripts/gc.scm:266
-msgid "freeing ~h MiBs~%"
-msgstr "frigiver ~h MiBs~%"
+msgid "freeing ~,2h MiBs~%"
+msgstr "frigiver ~,2h MiBs~%"
 
 #: guix/scripts/gc.scm:306
 #, scheme-format
@@ -4520,8 +4520,8 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr "uvedkommende argumenter: ~{~a ~}~%"
 
 #: guix/scripts/gc.scm:330 guix/scripts/gc.scm:333
-msgid "freed ~h MiBs~%"
-msgstr "frigav ~h MiBs~%"
+msgid "freed ~,2h MiBs~%"
+msgstr "frigav ~,2h MiBs~%"
 
 #: guix/scripts/git.scm:26
 #, fuzzy
diff --git a/po/guix/de.po b/po/guix/de.po
index 39de45814e..f8493fd523 100644
--- a/po/guix/de.po
+++ b/po/guix/de.po
@@ -13,7 +13,7 @@ msgstr ""
 "Project-Id-Version: guix 1.2.0-pre3\n"
 "Report-Msgid-Bugs-To: bug-guix@gnu.org\n"
 "POT-Creation-Date: 2022-11-21 03:18+\n"
-"PO-Revision-Date: 2022-12-09 21:22+\n"
+"PO-Revision-Date: 2023-01-23 14:23+0100\n"
 "Last-Translator: Florian Pelz \n"
 "Language-Team: German 
\n"
 "Language: de\n"
@@ -4561,12 +4561,12 @@ msgid "invoke the garbage collector"
 msgstr "den Müllsammler aufrufen"
 
 #: guix/scripts/gc.scm:263
-msgid "already ~h MiBs available on ~a, nothing to do~%"
-msgstr "Es sind bereits ~h MiB verfügbar auf ~a, nichts zu tun~%"
+msgid "already ~,2h MiBs available on ~a, nothing to do~%"
+msgstr "Es sind bereits ~,2h MiB verfügbar auf ~a, nichts zu tun~%"
 
 #: guix/scripts/gc.scm:266
-msgid "freeing ~h MiBs~%"
-msgstr "~h MiB werden freigegeben~%"
+msgid "freeing ~,2h MiBs~%"
+msgstr "~,2h MiB werden freigegeben~%"
 
 #: guix/scripts/gc.scm:306
 #, scheme-format
@@ -4574,8 +4574,8 @@ msgid "extraneous arguments: ~{~a ~}~%"
 msgstr "Zusätzliche Argumente: ~{~a ~}~%"
 
 #: guix/scripts/gc.scm

bug#58880: [PATCH v2 2/2] nls: Update translation keys for guix gc

2023-01-24 Thread Remco van &#x27;t Veer
2023/01/24 16:14, pelzflorian (Florian Pelz):

> Remco van 't Veer  writes:
>> * po/*/*.po (guix/scripts/gc.scm): Round MiBs in user feedback.
>
> Thank you Remco for not breaking translations, which is nice to users.
> But note that usually committers just ignore that the translations stay
> broken for a while and that is more feasible for developers and would be
> okay too.

Good to know.  Thanks.





bug#55358: docker containers stopped when doing guix install or guix shell

2023-02-09 Thread Remco van &#x27;t Veer
I think I know what is causing the issue.  Both the "standard" mysql and
postgres containers use user-id 999 to run the database service (this
seems like a common practice because the redis container is configured
similarly).  That user-id is also configured as guixbuilder01 so I guess
the guix daemon is killing those when processes when it finishes doing
builds.

Does that make sense?  If so can guix daemon be fixed to be a tad more
gentile to the processes not spawned on its behalf?


2022/07/12 16:37, Remco van 't Veer:

> 2022/07/12 09:48, Maxim Cournoyer:
>
>> Hi,
>>
>> Remco van 't Veer  writes:
>>
>>> On a Guix system host, some running docker containers are stopped when
>>> doing guix install or other guix operations like shell.  I noticed this
>>> happing to mysql and postgres containers but an elasticsearch container
>>> just keeps running.
>>>
>>> Here's an example session:
>>>
>>>   $ docker ps
>>>   CONTAINER ID  IMAGE   COMMAND  CREATED 
>>> STATUSPORTS NAMES
>>>   $ docker run -d postgres:10.10
>>>   ..
>>>   2b52ee072b1f5584cae597afb033cdcc0e560bbe9145b17b41502c204034e60b
>>>   $ docker ps
>>>   CONTAINER ID  IMAGE   COMMAND  CREATED 
>>> STATUSPORTS NAMES
>>>   2b52ee072b1f  postgres:10.10  "docker-entrypoint.s…"  2 seconds ago   Up 
>>> 1 seconds  5432/tcp  blah_blah
>>>   $ guix shell xeyes -- xeyes
>>>   substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
>>>   0.0 MB will be downloaded
>>>xeyes-1.1.2  11KiB   
>>> 613KiB/s 00:00 [##] 100.0%
>>>   The following derivation will be built:
>>> /gnu/store/xc002hxl4g8mskqmpm0grsk8s45m91gz-profile.drv
>>>
>>>   applying 4 grafts for xeyes-1.1.2 ...
>>>   building CA certificate bundle...
>>>   listing Emacs sub-directories...
>>>   building fonts directory...
>>>   building directory of Info manuals...
>>>   building profile with 1 package...
>>>   $ docker ps
>>>   CONTAINER ID  IMAGE   COMMAND  CREATED 
>>> STATUSPORTS NAMES
>>>   $ exit
>>>
>>> First we see no docker containers are running, then we start postgres-10
>>> from docker hub, we see its container is running, then we do something
>>> using guix-shell on an application *not already available on this
>>> system*, and now the container died.  This does not work the second time
>>> when the "derivation" is already "built".
>>
>> Are you still able to reproduce this using the new version of docker
>> packaged in Guix?
>
> Yes, same problem after a guix pull and guix system reconfigure just now.
>
>   $ guix describe
>   Generation 72   Jul 12 2022 16:11:38(current)
> guix 9173cb5
>   repository URL: https://git.savannah.gnu.org/git/guix.git
>   branch: master
>   commit: 9173cb522ddc4f31f21948cee3fb214fd67ef616
>
> Cheers,
> Remco





bug#63376: (no subject)

2023-05-08 Thread Remco van &#x27;t Veer






bug#63377: sssd fails to build

2023-05-08 Thread Remco van &#x27;t Veer
Two tests fail with "aborted".  See below:

> make  check-TESTS
> make[3]: Entering directory '/tmp/guix-build-sssd-2.8.1.drv-0/source'
> /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash: 
> line 1: git: command not found
> make[4]: Entering directory '/tmp/guix-build-sssd-2.8.1.drv-0/source'
> /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash: 
> line 1: git: command not found
> PASS: sss_nss_idmap-tests
> PASS: test-io
> PASS: test-find-uid
> PASS: test_prompt_config
> PASS: deskprofile_utils-tests
> PASS: test-authtok
> PASS: domain_resolution_order-tests
> PASS: fqnames-tests
> PASS: test_sss_idmap
> PASS: test_ipa_idmap
> PASS: src/tests/pysss_murmur-test.py3.sh
> PASS: src/tests/pyhbac-test.py3.sh
> PASS: src/tests/pysss-test.py3.sh
> PASS: sss_sifp-tests
> PASS: config_check-tests
> PASS: test_ldap_auth
> PASS: test_search_bases
> PASS: test_sdap_access
> PASS: sdap-tests
> PASS: responder-get-domains-tests
> PASS: dp_opt_tests
> PASS: test_sysdb_utils
> PASS: test_utils
> PASS: src/config/SSSDConfigTest.py3.sh
> PASS: test_copy_ccache
> PASS: test_sysdb_domain_resolution_order
> PASS: test_sysdb_certmap
> PASS: test_copy_keytab
> PASS: test_sbus_message
> PASS: test_child_common
> PASS: test_sbus_opath
> PASS: nestedgroups-tests
> PASS: test_sdap_certmap
> PASS: test_ipa_subdom_util
> PASS: test_tools_colondb
> PASS: test_cert_utils
> PASS: test_ldap_id_cleanup
> PASS: test_sysdb_views
> PASS: test_krb5_wait_queue
> PASS: test_dp_builtin
> PASS: ssh-srv-tests
> PASS: test_ipa_dn
> PASS: dyndns-tests
> PASS: test_iobuf
> PASS: sss_certmap_test
> PASS: test_sssd_krb5_locator_plugin
> PASS: krb5_common_test
> PASS: test_krb5_idp_plugin
> PASS: test_resolv_fake
> PASS: ifp_tests
> PASS: test_confdb
> PASS: test_kcm_marshalling
> PASS: test_sysdb_ts_cache
> PASS: test_kcm_renewals
> PASS: ad_access_filter_tests
> PASS: test_sysdb_subdomains
> ./build/test-driver: line 112:  9133 Aborted "$@" >> 
> "$log_file" 2>&1
> FAIL: ad_gpo_tests
> ./build/test-driver: line 112:  9139 Aborted "$@" >> 
> "$log_file" 2>&1
> FAIL: ad_common_tests
> PASS: test_ad_subdom
> PASS: test_sysdb_sudo
> PASS: test_sssd_krb5_localauth_plugin
> PASS: dlopen-tests
> PASS: test_sdap_initgr
> PASS: strtonum-tests
> PASS: nss-srv-tests
> PASS: krb5-utils-tests
> PASS: check_file-tests
> PASS: files-tests
> PASS: refcount-tests
> PASS: fail_over-tests
> PASS: find_uid-tests
> PASS: test_dp_request
> PASS: ipa_ldap_opt-tests
> PASS: ad_ldap_opt-tests
> PASS: crypto-tests
> PASS: util-tests
> PASS: debug-tests
> PASS: ipa_hbac-tests
> PASS: sss_idmap-tests
> PASS: responder_socket_access-tests
> PASS: safe-format-tests
> PASS: sysdb_ssh-tests
> SKIP: src/tests/whitespace_test
> SKIP: src/tests/double_semicolon_test
> PASS: test_data_provider_be
> PASS: auth-tests
> PASS: simple-access-tests
> PASS: test_inotify
> PASS: test_ipa_subdom_server
> PASS: test_kcm_queue
> PASS: test_be_ptask
> PASS: resolv-tests
> PASS: test_fo_srv
> PASS: responder_cache_req-tests
> PASS: sysdb-tests
> 
> Testsuite summary for sssd 2.8.1
> 
> # TOTAL: 95
> # PASS:  91
> # SKIP:  2
> # XFAIL: 0
> # FAIL:  2
> # XPASS: 0
> # ERROR: 0
> 
> See ./test-suite.log
> Please report to sssd-de...@lists.fedorahosted.org
> 
> make[4]: *** [Makefile:38868: test-suite.log] Error 1
> make[4]: Leaving directory '/tmp/guix-build-sssd-2.8.1.drv-0/source'
> make[3]: *** [Makefile:38976: check-TESTS] Error 2
> make[3]: Leaving directory '/tmp/guix-build-sssd-2.8.1.drv-0/source'
> make[2]: *** [Makefile:39843: check-am] Error 2
> make[2]: Leaving directory '/tmp/guix-build-sssd-2.8.1.drv-0/source'
> make[1]: *** [Makefile:38753: check-recursive] Error 1
> make[1]: Leaving directory '/tmp/guix-build-sssd-2.8.1.drv-0/source'
> make: *** [Makefile:39845: check] Error 2
>
> Test suite failed, dumping logs.
>
> --- ./test-suite.log 
>
> ==
>sssd 2.8.1: ./test-suite.log
> ==
>
> # TOTAL: 95
> # PASS:  91
> # SKIP:  2
> # XFAIL: 0
> # FAIL:  2
> # XPASS: 0
> # ERROR: 0
>
> .. contents:: :depth: 2
>
> FAIL: ad_gpo_tests
> ==
>
> [==] Running 11 test(s).
> [ RUN  ] test_populate_som_list_plain
> [   OK ] test_populate_som_list_plain
> [ RUN  ] test_populate_som_list_malformed
> [   OK ] test_populate_som_list_malformed
> [ RUN  ] test_populate_gplink_list_plain
> [   OK ] test_populate_gplink_list_plain
> [ RUN  ] test_populate_gplink_list_with_ignored
> [   OK ] test_populate_gplink_list_with_ignored
> [ RUN  ] test_populate_gpli

bug#63376: (no subject)

2023-05-09 Thread Remco van &#x27;t Veer
Op di 9 mei 2023, om 17:08 schreef Simon Tournier:
>  As far I can see, this report is empty.  Therefore closing?

Oeps, slapstick.. Yes, sorry about that.

Thanks for noticing.

Remco





bug#55358: docker containers stopped when doing guix install or guix shell

2023-05-19 Thread Remco van &#x27;t Veer
Hi Maxim and Zimoun,

2023/02/09 13:26, Remco van 't Veer:

> I think I know what is causing the issue.  Both the "standard" mysql and
> postgres containers use user-id 999 to run the database service (this
> seems like a common practice because the redis container is configured
> similarly).  That user-id is also configured as guixbuilder01 so I guess
> the guix daemon is killing those when processes when it finishes doing
> builds.

I found a solution / workaround for this problem by using
"userns-remap".  This feature allows the remapping of uids and guids to
different ranges.  I tried it by hacking the required files into my
etc-directory and it works; guix no long kills my database containers.

I'd like to add this feature to docker-service-type having a new
configuration option named enable-userns-remap? which introduces a new
user and group (both named dockremap) to do the remapping by adding some
configurable number to the uids and guids of the running container.  In
/etc/subuid and /etc/subgid it would look like:

  dockremap:10:65536

See https://docs.docker.com/engine/security/userns-remap/ for
documentation about this.

WDYT?

Cheers,
Remco


--
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55358





bug#55358: [PATCH] services: docker: Add 'enable-userns-remap?' argument.

2023-05-23 Thread Remco van &#x27;t Veer
* gnu/services/docker.scm (docker-configuration): Define the argument.
* gnu/services/docker.scm (docker-shepherd-service): Use it.
* doc/guix.texi (Docker Service): Document it.
---
 doc/guix.texi   | 27 ++-
 gnu/services/docker.scm | 28 +++-
 2 files changed, 53 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index f4cca66d76..ae185ced61 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -100,7 +100,7 @@
 Copyright @copyright{} 2021 muradm@*
 Copyright @copyright{} 2021, 2022 Andrew Tropin@*
 Copyright @copyright{} 2021 Sarah Morgensen@*
-Copyright @copyright{} 2022 Remco van 't Veer@*
+Copyright @copyright{} 2022, 2023 Remco van 't Veer@*
 Copyright @copyright{} 2022 Aleksandr Vityazev@*
 Copyright @copyright{} 2022 Philip M@sup{c}Grath@*
 Copyright @copyright{} 2022 Karl Hallsby@*
@@ -38533,6 +38533,31 @@ Miscellaneous Services
 @item @code{enable-iptables?} (default @code{#t})
 Enable or disable the addition of iptables rules.
 
+@item @code{enable-userns-remap?} (default @code{#f})
+Enable remapping and subordinate user and group IDs.
+
+A system user account named @code{dockremap} and user group named
+@code{dockremap} will be created.  They must be mapped using the
+@file{/etc/subuid} and @file{/etc/subguid} files otherwise docker fail
+to startup.
+
+Here's an example service to setup both files:
+
+@lisp
+(simple-service
+   'subuid-subgid etc-service-type
+   (list `("subuid"
+   ,(plain-file "subuid"
+"dockremap:65536:65536\n"))
+ `("subgid"
+   ,(plain-file "subgid"
+"dockremap:65536:65536\n"
+@end lisp
+
+The above will remap to UID 0 (root) to 65536, UID 1 to 65537 etc.  For
+more information regarding the format of these files, consult
+@command{man 5 subuid} and @command{man 5 subgid}.
+
 @item @code{environment-variables} (default: @code{()})
 List of environment variables to set for @command{dockerd}.
 
diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm
index 741bab5a8c..e138a6be7e 100644
--- a/gnu/services/docker.scm
+++ b/gnu/services/docker.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2020 Efraim Flashner 
 ;;; Copyright © 2020 Jesse Dowell 
 ;;; Copyright © 2021 Brice Waegeneire 
+;;; Copyright © 2023 Remco van 't Veer 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,6 +30,7 @@ (define-module (gnu services docker)
   #:use-module (gnu services shepherd)
   #:use-module (gnu system setuid)
   #:use-module (gnu system shadow)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages docker)
   #:use-module (gnu packages linux)   ;singularity
   #:use-module (guix records)
@@ -62,6 +64,9 @@ (define-configuration docker-configuration
   (enable-iptables?
(boolean #t)
"Enable addition of iptables rules (enabled by default).")
+  (enable-userns-remap?
+   (boolean #f)
+   "Enable remapping and subordinate user and group IDs (disabled by 
default).")
   (environment-variables
(list '())
"Environment variables to set for dockerd")
@@ -107,6 +112,7 @@ (define (docker-shepherd-service config)
   (let* ((docker (docker-configuration-docker config))
  (enable-proxy? (docker-configuration-enable-proxy? config))
  (enable-iptables? (docker-configuration-enable-iptables? config))
+ (enable-userns-remap? (docker-configuration-enable-userns-remap? 
config))
  (environment-variables (docker-configuration-environment-variables 
config))
  (proxy (docker-configuration-proxy config))
  (debug? (docker-configuration-debug? config)))
@@ -135,6 +141,9 @@ (define (docker-shepherd-service config)
 #~(string-append
"--userland-proxy-path=" #$proxy 
"/bin/proxy"))
   '("--userland-proxy=false"))
+   #$@(if enable-userns-remap?
+  '("--userns-remap=dockremap")
+  '())
(if #$enable-iptables?
"--iptables"
"--iptables=false")
@@ -145,6 +154,18 @@ (define (docker-shepherd-service config)
  #:log-file "/var/log/docker.log"))
(stop #~(make-kill-destructor)
 
+(define %docker-remap-user-group
+  (user-group (name "dockremap")
+  (system? #t)))
+
+(define %docker-remap-user-account
+  (user-account (name "dockremap")
+(group "dockremap")
+(system? #t)
+(comment "Docker user namespace remap user")
+(home-directory "/var/empt

bug#55358: docker containers stopped when doing guix install or guix shell

2023-05-23 Thread Remco van &#x27;t Veer
Hi Csepp,

2023/05/20 00:29, Csepp:

> Remco van 't Veer  writes:
>
>> Hi Maxim and Zimoun,
>>
>> 2023/02/09 13:26, Remco van 't Veer:
>>
>>> I think I know what is causing the issue.  Both the "standard" mysql and
>>> postgres containers use user-id 999 to run the database service (this
>>> seems like a common practice because the redis container is configured
>>> similarly).  That user-id is also configured as guixbuilder01 so I guess
>>> the guix daemon is killing those when processes when it finishes doing
>>> builds.
>>
>> I found a solution / workaround for this problem by using
>> "userns-remap".  This feature allows the remapping of uids and guids to
>> different ranges.  I tried it by hacking the required files into my
>> etc-directory and it works; guix no long kills my database containers.
>>
>> I'd like to add this feature to docker-service-type having a new
>> configuration option named enable-userns-remap? which introduces a new
>> user and group (both named dockremap) to do the remapping by adding some
>> configurable number to the uids and guids of the running container.  In
>> /etc/subuid and /etc/subgid it would look like:
>>
>>   dockremap:10:65536
>>
>> See https://docs.docker.com/engine/security/userns-remap/ for
>> documentation about this.
>>
>> WDYT?
>>
>> Cheers,
>> Remco
>
> The rootless podman example that was shared a few months ago could be
> relevant to this, since that also adds a subuid/subgid mapping.

Thanks!  Borrowed that.

For future reference:

  https://lists.gnu.org/archive/html/guix-devel/2023-03/msg00176.html

Cheers,
Remco





bug#63205: quodlibet fails to build after python 3.10 update

2023-06-12 Thread Remco van &#x27;t Veer
Hi,

Forgotten patch:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63205#11

The supplied patch by Alice works and looks good to me.  Can somebody
please have a look and consider committing it?

Thanks!

Cheers,
Remco





bug#70051: system hangs at boot - LUKS /home/ problem(?)

2024-03-30 Thread Remco van &#x27;t Veer
Hi,

Confirmed on a couple of my installs.  I too have an unencrypted root
and encrypted home filesystems.  The passphrase prompt never appears and
the system seems to be waiting for something or is halted.

I've git bisected it down to:

  commit 6f9d844d2ece7b369d17bbe678978462425f869c (HEAD)
  Author: Ludovic Courtès 
  Date:   Wed Mar 20 18:48:38 2024 +0100

services: shepherd: Load each service file in a fresh module.

Fixes .

* gnu/home/services/shepherd.scm (home-shepherd-configuration-file)[config]:
Define ‘make-user-module’.  Call ‘load’ in ‘save-module-excursion’.
* gnu/services/shepherd.scm (shepherd-configuration-file): Likewise.

Commit 2b052fe3c0fa85e9faa8873a581568ad4c78e151 still works.

Cheers,
Remco





bug#70051: [PATCH] gnu: open-luks-device: Fix unbound variables.

2024-04-02 Thread Remco van &#x27;t Veer
2024/04/02, aurtzy:

> Can anyone confirm this patch works for them too?

Yes, it does.

Cheers,
Remco





bug#70051: system hangs at boot - LUKS /home/ problem(?)

2024-04-02 Thread Remco van &#x27;t Veer
2024/04/02, Benjamin Slade:

> I can't roll back to the earlier commit mentioned by Remco because
> other things/channels depend on me being roughly up-to-date on the
> main guix channel.

Reverting the commit on a local checkout of guix worked for me but isn't
workable of course.  I tested the patch provided by aurtzy
(https://issues.guix.gnu.org/70051#5) and that worked worked too.

For now I won't reconfigure my system until this issue is fixed or try
out "guix pull --switch-generation" to go back to some earlier situation
when I really need to deploy some configuration change.

Remco





bug#72042: [core-updates] Python-gst fails its test suite

2024-09-02 Thread Remco van &#x27;t Veer
Hi,

The issue is here:

  https://gitlab.gnome.org/GNOME/pygobject/-/issues/624

I've tried and upgrading python-pygobject from 3.47.0 (currently on
master) to 3.48.2 (current upstream release) fixes the issue.

Unfortunately python-pygobject has a lot of dependent packages.

  $ guix refresh --list-dependent python-pygobject
  Building the following 2015 packages would ensure 4466 dependent packages are 
rebuilt: ..

Graft, add a python-pygobject-3.48.2 package or just go for it?

Cheers,
Remco





bug#72042: [PATCH 0/1] introduce python-pygobject-3.48 to fix python-gst build

2024-09-02 Thread Remco van &#x27;t Veer
Like this?

Remco van 't Veer (1):
  gnu: python-gst: Fix build.

 gnu/packages/glib.scm  | 15 +++
 gnu/packages/gstreamer.scm |  3 ++-
 2 files changed, 17 insertions(+), 1 deletion(-)


base-commit: ad7211cfe0cba1b7a97308c0fec941c807c1c1e5
-- 
2.45.2






bug#72042: [PATCH 1/1] gnu: python-gst: Fix build.

2024-09-02 Thread Remco van &#x27;t Veer
* gnu/packages/glib.scm: Add package python-pygobject-3.48.
* gnu/packages/gstreamer.scm (python-gst) [inputs]:
  Use python-pygobject-3.48 to fix tests.

Change-Id: I3038b85db67ff354a6d77708fa4fd7c63aa6732c
---
 gnu/packages/glib.scm  | 15 +++
 gnu/packages/gstreamer.scm |  3 ++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 9827856f32..d6275ea63e 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2022 Petr Hodina 
 ;;; Copyright © 2023 Saku Laesvuori 
 ;;; Copyright © 2024 Zheng Junjie <873216...@qq.com>
+;;; Copyright © 2024 Remco van 't Veer 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1077,6 +1078,20 @@ (define-public python-pygobject
  '((upstream-name . "pygobject")))
 (license license:lgpl2.1+)))
 
+(define-public python-pygobject-3.48
+  (package
+(inherit python-pygobject)
+(version "3.48.2")
+(source
+ (origin
+   (inherit (package-source python-pygobject))
+   (uri (string-append "mirror://gnome/sources/pygobject/"
+   (version-major+minor version)
+   "/pygobject-" version ".tar.xz"))
+   (sha256
+(base32
+ "19yii8lydnjw225k4gclhn8hya7caiginqi0mj9a0cdym6sax507"))
+
 (define-public perl-glib
   (package
 (name "perl-glib")
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index ad08285181..66978fc2bc 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2020 Liliana Marie Prikler 
 ;;; Copyright © 2020 Michael Rohleder 
 ;;; Copyright © 2023 Maxim Cournoyer 
+;;; Copyright © 2024 Remco van 't Veer 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1126,7 +1127,7 @@ (define-public python-gst
 (native-inputs
  (list pkg-config python))
 (propagated-inputs
- (list gst-plugins-base python-pygobject))
+ (list gst-plugins-base python-pygobject-3.48))
 (home-page "https://gstreamer.freedesktop.org/";)
 (synopsis "GStreamer GObject Introspection overrides for Python")
 (description
-- 
2.45.2