bug#62059: 'guix style' loses comments

2023-03-16 Thread Ludovic Courtès
Hi,

Maxim Cournoyer  skribis:

>  (list #:phases #~(modify-phases %standard-phases
> (add-after 'extract-gemspec 'delete-problematic-tests
>   (lambda _
> (delete-file 
> "test/webrick/test_httpresponse.rb"))
> (home-page "https://github.com/ruby/webrick;)
> (synopsis "HTTP server toolkit")
> (description
>  "WEBrick is an HTTP server toolkit that can be configured as an
> HTTPS server, a proxy server, and a virtual-host server.")
> (license license:bsd-2)))
>
> I.e., it lost the comment in the phase.

Fixed in 83128f00e9149f3c1bcd4450eb0ed3620a37149c.

> It also causes the longest line to be 82 chars, while it could have
> easily broken the line to make it fit under 80.

Hmm let’s investigate that separately.

Thanks,
Ludo’.





bug#53502: Pre-commit package is duplicate

2023-03-16 Thread Vinicius Monego

Fixed in 831baaf81e57ce9d9053ba6f9e0653a2d27298c4. Closing.





bug#62226: bash-minimal fails to build on x86_64-w64-mingw32

2023-03-16 Thread Ekaitz Zarraga
Any package that uses `bash-minimal` to build in mingw (all of them?) fails 
when trying to build `bash-minimal` with the following error:

```
phase `patch-generated-file-shebangs' succeeded after 0.0 seconds
starting phase `build'
rm -f mksyntax.exe
gcc -DPROGRAM='"bash.exe"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"mingw32"' 
-DCONF_MACHTYPE='"x86_64-w64-mingw32"' -DCONF_VENDOR='"w64"' 
-DLOCALEDIR='"/gnu/store/lb1afqc8mx7jjynpf8qbn6mc13h9p4ji-bash-minimal-5.1.8/share/locale"'
 -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -g 
-DCROSS_COMPILING  -g -DCROSS_COMPILING -o mksyntax.exe ./mksyntax.c
In file included from ./mksyntax.c:23:
./config.h:361:19: error: two or more data types in declaration specifiers
  361 | #define socklen_t unsigned int
  |   ^~~~
./config.h:361:28: error: two or more data types in declaration specifiers
  361 | #define socklen_t unsigned int
  |^~~
make: *** [Makefile:720: mksyntax.exe] Error 1
error: in phase 'build': uncaught exception:
%exception #< program: "make" arguments: () exit-status: 2 
term-signal: #f stop-signal: #f>
phase `build' failed after 0.0 seconds
command "make" failed with status 2
note: keeping build directory `/tmp/guix-build-bash-minimal-5.1.8.drv-2'
builder for 
`/gnu/store/r3kiyak1js85m8achjf9jcbqq7asmjy3-bash-minimal-5.1.8.drv' failed 
with exit code 1
build of /gnu/store/r3kiyak1js85m8achjf9jcbqq7asmjy3-bash-minimal-5.1.8.drv 
failed
View build log at 
'/var/log/guix/drvs/r3/kiyak1js85m8achjf9jcbqq7asmjy3-bash-minimal-5.1.8.drv.gz'.
```

I'll investigate but I don't think I'll reach far on this one.

I already tried removing the offending lines from the `config.h` but other 
errors appear (how surprising :) )

Thanks all,
Ekaitz





bug#62181: [PATCH v2 1/2] gnu: gnulib: Reset the shebangs.

2023-03-16 Thread Vivien Kraus via Bug reports for GNU Guix
* gnu/packages/build-tools.scm (gnulib) [phase reset-shebangs]: After
installation, rewrite the /gnu/store shebangs in the distributed build-aux
files.
[inputs, native-inputs]: Add bash-minimal.
[phase let-autogen-execute-gnulib-tool]: Specify a shell to execute
gnulib-tool from autogen.sh.
---
 gnu/packages/build-tools.scm | 21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 28ab77bbb4..caf0f3fc1c 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -973,12 +973,25 @@ (define (find-ucd-files . names)
("NormalizationTest.txt" . "uninorm")
("auxiliary/GraphemeBreakTest.txt" . "unigbrk")
("auxiliary/WordBreakTest.txt" . "uniwbrk")))
-(delete-file "gen-uni-tables")))
-(inputs ;; Shebangs for some auxiliary build files.
- (list python perl clisp))
+(delete-file "gen-uni-tables"
+  (add-after 'install 'restore-shebangs
+(lambda _
+  (substitute* (find-files
+(string-append #$output "/src/gnulib")
+(lambda (fname stat)
+  (and (not (string-suffix? 
"/lib/javaversion.class" fname))
+   (not (string-suffix? ".mo" fname)
+(("^#! ?(.*)/bin/sh" _ prefix)
+ "#!/bin/sh")
+(("^#! ?(.*)/bin/python3" _ prefix)
+ "#!/usr/bin/env python3")
+(("^#! ?(.*)/bin/([a-zA-Z0-9-]+)" _ prefix program)
+ (string-append "#!/usr/bin/" program
+(inputs ;; Shebang for gnulib-tool
+ (list bash-minimal))
 (native-inputs
  (list
-  python perl clisp
+  bash-minimal python perl clisp
   ;; Unicode data:
   ucd-next
   ;; Programs for the tests:
-- 
2.39.2





bug#62181: [PATCH v2 0/2] Drop references to other store items in /src, with better style

2023-03-16 Thread Vivien Kraus via Bug reports for GNU Guix
So I applied Ludo’s proposed style improvement with a few more tweaks to
respect the gnulib-intended shebangs, and making sure that substitute* failure
on /lib/javaversion.class and the .mo test data can be recovered.

This v2 is still not a silver bullet, because gnulib users need to patch a few
files before bootstrap.

Vivien Kraus (2):
  gnu: gnulib: Reset the shebangs.
  gnu: guile-gnutls: Do not expect gnulib shebangs to work.

 gnu/packages/build-tools.scm | 21 +
 gnu/packages/tls.scm |  6 ++
 2 files changed, 23 insertions(+), 4 deletions(-)


base-commit: 1820dc7ce6945569db4ef6e265764705e6aabc48
-- 
2.39.2





bug#62181: [PATCH v2 2/2] gnu: guile-gnutls: Do not expect gnulib shebangs to work.

2023-03-16 Thread Vivien Kraus via Bug reports for GNU Guix
* gnu/packages/tls.scm (guile-gnutls) [phase patch-more-shebangs]: Fix how
autogen.sh invokes gnulib-tool, and how configure.ac invokes git-version-gen,
so as not to rely on shebangs.
---
 gnu/packages/tls.scm | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 81d90c86ae..5a44fa89dc 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -417,6 +417,12 @@ (define-public guile-gnutls
   #~(modify-phases %standard-phases
   (add-after 'unpack 'patch-more-shebangs
 (lambda _
+  (substitute* "autogen.sh"
+(("\\$gnulib_tool \\$gnulib_tool_options")
+ "sh $gnulib_tool $gnulib_tool_options"))
+  (substitute* "configure.ac"
+(("build-aux/git-version-gen")
+ "sh build-aux/git-version-gen"))
   (for-each patch-shebang
 '("autopull.sh" "autogen.sh"
   (replace 'bootstrap
-- 
2.39.2





bug#62217: Ungoogled-chromium doesn't launch with linux 6.2

2023-03-16 Thread Jack Hill

On Thu, 16 Mar 2023, Nicolas Graves via Bug reports for GNU Guix wrote:


"/gnu/store/1jmlqw987ifnb3abr0s2hvihcg1n2xmx-ungoogled-chromium-wayland-109.0.5414.119-1/bin/chromium":
 not in executable format: file format not recognized


I've run into this message in the past when my store got corrupted (in my 
case it was a full disk on a computer that has other evil spirits living 
in it as well). Can you check with `guix gc --verify=contents`? If it 
reports anything, you might be able to repair it with `sudo guix gc 
--verify=contents,repair`.


For what it's worth ungoogled-chromium works for me with Guix commit 
5312d798ac36a72d8a977325a7c6ff7647be670a.


Best,
Jack





bug#62071: openjdk@9/10 sources not reproducible

2023-03-16 Thread Jonathan Brielmaier

I’m not sure why it uses these tarballs in the first place, since we
have a hg-download.

-> I guess a reason could be that downloading via hg is quite slow.
Thats at least my impression when fetching the "comm" repository for
Thunderbird with mecurial. Tarballs and git checkout tend to be way
faster...





bug#62071: openjdk@9/10 sources not reproducible

2023-03-16 Thread Ludovic Courtès
Hi Björn,

Björn Höfling  skribis:

> I will check the same for JDK10 and will prepare a patch within the
> next two days.

Thanks for 7636c49b45adb9870cf416c64bde032ec858a820 and its parent
commit!

For the record, there are two remaining issues:

  1. Reproducibility of past revisions.  If we lose copies of the
 auto-generated tarballs, then OpenJDK in past revisions of Guix is
 irreparably lost.  We should check whether/how to get them in
 Disarchive + SWH.

  2. Mercurial/SWH bridge.  While SWH has a one-to-one mapping with Git
 (you can ask it for a specific Git commit ID), that’s not true for
 hg.  This is a more general problem, but as things are today,
 there’s no automatic SWH fallback if the upstream hg server
 vanishes.

Thanks,
Ludo’.





bug#62181: [PATCH 2/2] gnu: guile-gnutls: Do not expect gnulib shebangs to work.

2023-03-16 Thread Vivien Kraus via Bug reports for GNU Guix
Le jeudi 16 mars 2023 à 11:48 +0100, Ludovic Courtès a écrit :
> > +  (substitute* "configure.ac"
> > +    (("build-aux/git-version-gen")
> > + "sh build-aux/git-version-gen"))
> >    (for-each patch-shebang
> >  '("autopull.sh" "autogen.sh"
> 
> Maybe you can instead add ‘build-aux/git-version-gen’ to the ‘for-
> each’
> list above?

Unfortunately, no, because it is imported from gnulib (so it does not
exist before this early patch shebang phase) and *immediately* invoked
by the same bootstrap script, so I have no time window when I can fix
it.

Vivien


bug#62181: [PATCH 0/2] Re: bug#62181: Gnulib package keeps references to clisp, Python, Perl, and Bash

2023-03-16 Thread Vivien Kraus via Bug reports for GNU Guix
Le jeudi 16 mars 2023 à 11:41 +0100, Ludovic Courtès a écrit :
> Apart from ‘gnulib-tool’, every script is first
> copied into the source tree, and that happens before the
> ‘patch-source-shebangs’ phase no?

Precisely, so if they are executed during the bootstrap phase, we can’t
rely on their shebangs being correct yet. It depends on individual
packages which build-aux scripts are actually called (although I’m
pretty sure noone will call the clisp thing). However, top/bootstrap-
funclib.sh is intended to be included in the top-level directory of the
package, to be invoked at bootstrap time, and at least this script
calls gnulib-tool (the one in /src, so the unpatched copy) incorrectly.

Vivien





bug#62181: [PATCH 2/2] gnu: guile-gnutls: Do not expect gnulib shebangs to work.

2023-03-16 Thread Ludovic Courtès
Vivien Kraus  skribis:

> * gnu/packages/tls.scm (guile-gnutls) [phase patch-more-shebangs]: Fix how
> autogen.sh invokes gnulib-tool, and how configure.ac invokes git-version-gen,
> so as not to rely on shebangs.

[...]

> +  (substitute* "configure.ac"
> +(("build-aux/git-version-gen")
> + "sh build-aux/git-version-gen"))
>(for-each patch-shebang
>  '("autopull.sh" "autogen.sh"

Maybe you can instead add ‘build-aux/git-version-gen’ to the ‘for-each’
list above?

Ludo’.





bug#62181: [PATCH 1/2] gnu: gnulib: Reset the shebangs.

2023-03-16 Thread Ludovic Courtès
Vivien Kraus  skribis:

> * gnu/packages/build-tools.scm (gnulib) [phase reset-shebangs]: After
> installation, rewrite the /gnu/store shebangs in the distributed build-aux
> files.
> [inputs, native-inputs]: Add bash-minimal.
> [phase let-autogen-execute-gnulib-tool]: Specify a shell to execute
> gnulib-tool from autogen.sh.

[...]

> +  (add-after 'install 'reset-shebangs

s/reset/restore/ ?

> +(lambda _
> +  (for-each
> +   (lambda (file)
> + (false-if-exception
> +  ;; Might fail on binary files, this is not a problem.
> +  (substitute* file
> +((#$(file-append (this-package-native-input 
> "bash-minimal")
> + "/bin/sh"))
> + "/bin/sh")
> +((#$(file-append (this-package-native-input "python")
> + "/bin/python3"))
> + "/usr/bin/env python3")
> +((#$(file-append (this-package-native-input "perl")
> + "/bin/perl"))
> + "/usr/bin/perl")
> +((#$(file-append (this-package-native-input "clisp")
> + "/bin/clisp"))
> + "/usr/bin/clisp"
> +   (find-files (string-append #$output "/src/gnulib"

How about:

  (substitute* (find-files …)
(("^#! ?(.*)/bin/([a-zA-Z0-9-]+)" _ prefix program)
 (string-append "#!/bin/" program "\n")))

?

Ludo’.





bug#62181: [PATCH 0/2] Re: bug#62181: Gnulib package keeps references to clisp, Python, Perl, and Bash

2023-03-16 Thread Ludovic Courtès
Hello!

Vivien Kraus  skribis:

> These were shebangs in the build auxiliary scripts. It’s a tough problem,
> because if I undo all the patch shebangs after installation, then gnulib is
> not usable in the gnu-build-system bootstrap phase without a few more
> tweaks.

Is it really a problem?  Apart from ‘gnulib-tool’, every script is first
copied into the source tree, and that happens before the
‘patch-source-shebangs’ phase no?

> In any case, #:allowed-reference is a gnu-build-system thing, so we can’t 
> use that for gnulib.

True; we should add it to other build systems.

Thanks,
Ludo’.





bug#62217: Ungoogled-chromium doesn't launch with linux 6.2

2023-03-16 Thread Josselin Poiret via Bug reports for GNU Guix
Hi Nicolas,

Nicolas Graves via Bug reports for GNU Guix  writes:

> Hi!
>
> I've updated linux to version 6.2.2 (the nonfree version), and since
> then I can't launch ungoogled-chromium-wayland.

Can you reproduce in linux-libre?  A `guix system vm` should be enough
to test this.

Best,
-- 
Josselin Poiret


signature.asc
Description: PGP signature


bug#62071: openjdk@9/10 sources not reproducible

2023-03-16 Thread Björn Höfling
On Sun, 12 Mar 2023 22:00:21 +0100
Björn Höfling  wrote:

> On Thu, 9 Mar 2023 10:48:53 +0100
> Lars-Dominik Braun  wrote:
> 
> > Hi,
> > 
> > it looks like the (auto-generated) tarballs for openjdk@9 and
> > openjdk@10 changed their hash, causing a hash mismatch via
> > 
> > guix build -S openjdk@9 --no-substitutes --no-grafts
> > 
> > I’m not sure why it uses these tarballs in the first place, since we
> > have a hg-download.  

Changed to hg-download in commit(s):

7636c49b45adb9870cf416c64bde032ec858a820

Thanks for pointing this out.

Björn


pgpGhmzvtJlQD.pgp
Description: OpenPGP digital signature


bug#62217: Ungoogled-chromium doesn't launch with linux 6.2

2023-03-16 Thread Nicolas Graves via Bug reports for GNU Guix


Hi!

I've updated linux to version 6.2.2 (the nonfree version), and since
then I can't launch ungoogled-chromium-wayland.

Nyxt or Firefox-like browsers work fine. 

Here's what I tried :

guix shell gdb -- gdb 
/gnu/store/1jmlqw987ifnb3abr0s2hvihcg1n2xmx-ungoogled-chromium-wayland-109.0.5414.119-1/bin/chromium

yields 

"/gnu/store/1jmlqw987ifnb3abr0s2hvihcg1n2xmx-ungoogled-chromium-wayland-109.0.5414.119-1/bin/chromium":
 not in executable format: file format not recognized

Thanks if you can fix this quickly. 

-- 
Best regards,
Nicolas Graves