bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case.

2019-06-15 Thread Maxim Cournoyer
Ricardo Wurmus  writes:

> And finally: Number 9!

Yay!

>> From 1290f9d1f0d594fdd4723d76b94116be25da9dd5 Mon Sep 17 00:00:00 2001
>> From: Maxim Cournoyer 
>> Date: Sat, 30 Mar 2019 20:27:35 -0400
>> Subject: [PATCH 9/9] import: pypi: Preserve package name case when forming
>>  pypi-uri.
>>
>> Fixes issue: #33046.
>
> Please change this to:
>
> Fixes .

Done!

>> * guix/build-system/python.scm (pypi-uri): Update the host URI to
>> "files.pythonhosted.org".
>> * guix/import/pypi.scm (make-pypi-sexp): Preserve the package name case when
>> the source URL calls for it.
>
> Is the first change to use files.pythonhosted.org required to fix this?
> Or is this unrelated?
>
> If it is required this looks fine to me.
>
> Thank you!

The permanent redirection was found while fixing the issue; but it's
better to have the fix separate.  I've separated it into its own commit.

Thank you!





bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case.

2019-06-15 Thread Maxim Cournoyer
Hello Ricardo!

Ricardo Wurmus  writes:

>> From cfde6e09f8f8c692fe252d76ed27e8c50a9e5377 Mon Sep 17 00:00:00 2001
>> From: Maxim Cournoyer 
>> Date: Sat, 30 Mar 2019 23:13:26 -0400
>> Subject: [PATCH 8/9] import: pypi: Scan source archive to find requires.txt
>>  file.
>
>> * guix/import/pypi.scm (use-modules): Use invoke from (guix build utils).
>> (guess-requirements)[archive-root-directory]: Remove procedure.
>
> Oh, I guess I reviewed this procedure in vain :(
>
> Please modify the commits so that added procedures are not removed in
> later commits.  This is easier on the reviewer and makes for a clearer
> commit history.

Indeed; I'll be more careful about this is the future; sorry!

I've squashed this commit along with the one enabling more archive types
support, as this is where the modified (and later removed) procedure
originated.

>>(define (guess-requirements-from-source)
>>  ;; Return the package's requirements by guessing them from the source.
>> -(let ((dirname (archive-root-directory source-url))
>> -  (extension (file-extension source-url)))
>> -  (if (string? dirname)
>> -  (call-with-temporary-directory
>> -   (lambda (dir)
>> - (let* ((pypi-name (string-take dirname (string-rindex dirname 
>> #\-)))
>> -(requires.txt (string-append dirname "/" pypi-name
>> - ".egg-info" 
>> "/requires.txt"))
>> -(exit-code
>> - (parameterize ((current-error-port (%make-void-port 
>> "rw+"))
>> -(current-output-port (%make-void-port 
>> "rw+")))
>> -   (if (string=? "zip" extension)
>> -   (system* "unzip" archive "-d" dir requires.txt)
>> -   (system* "tar" "xf" archive "-C" dir 
>> requires.txt)
>> -   (if (zero? exit-code)
>> -   (parse-requires.txt (string-append dir "/" requires.txt))
>> -   (begin
>> - (warning
>> -  (G_ "Failed to extract file: ~a from source.~%")
>> -  requires.txt)
>> - (list '() '()))
>> +(if (compressed-file? source-url)
>> +(call-with-temporary-directory
>> + (lambda (dir)
>> +   (parameterize ((current-error-port (%make-void-port "rw+"))
>> +  (current-output-port (%make-void-port "rw+")))
>> + (if (string=? "zip" (file-extension source-url))
>> + (invoke "unzip" archive "-d" dir)
>> + (invoke "tar" "xf" archive "-C" dir)))
>> +   (let ((requires.txt-files
>> +  (find-files dir (lambda (abs-file-name _)
>> +(string-match "\\.egg-info/requires.txt$"
>> +  abs-file-name)
>> + (if (> (length requires.txt-files) 0)
>
> Let’s work on the empty list directly.  Here “match” would be better.

Done, like this:

--8<---cut here---start->8---
- (if (> (length requires.txt-files) 0)
- (parse-requires.txt (first requires.txt-files))
- (begin (warning (G_ "Cannot guess requirements from source 
archive:\
+ (match requires.txt-files
+   (()
+(warning (G_ "Cannot guess requirements from source archive:\
  no requires.txt file found.~%"))
-'())
+'())
+   (else (parse-requires.txt (first requires.txt-files)))
--8<---cut here---end--->8---

>> + (begin
>> +   (parse-requires.txt (first requires.txt-files)))
>
> No need for “begin” here.

Fixed.

>> + (begin (warning (G_ "Cannot guess requirements from source 
>> archive:\
>> + no requires.txt file found.~%"))
>> +(list '() '()))
>
> I know that this is from an earlier commit, but I don’t like the look of
> “(list '() '())” at all :)
>
>> +(begin
>> +  (warning (G_ "Unsupported archive format; \
>> +cannot determine package dependencies from source archive: ~a~%")
>> +   (basename source-url))
>>(list '() '()
>
> Same here.  Certainly there’s a better return value.

This might look ugly, but I can't think of a better return value, since
using anything else would mean having to introduce extra logic in the
callers, while it is now a correct value that needs no special case.

Maxim





bug#36238: Problems cross-compiling on core-updates

2019-06-15 Thread Carl Dong
Hi all,

I noticed that cross-compiling isn't working on the core-updates branch. I'm on
commit cfd4e4d06e3cda0f3eed8d6b9277ce53e55404b8 and all you need to reproduce is
to invoke:

./pre-inst-env guix build --target=aarch64-linux-gnu coreutils

Attached is the build log.

Cheers,
Carl Dong
cont...@carldong.me
"I fight for the users"


riwrnisxp5skbmi8alq3m611g46lid-bison-3.4.1.drv.bz2
Description: BZip2 compressed data


bug#36231: haskell-build-system: patches conflict with cabal revisions

2019-06-15 Thread Robert Vollmert
The cabal revision mechanism replaces the cabal file after any patches
have been applied, making it impossible to patch the cabal file via the
regular patching mechanism.






bug#36207: Circular dependency in gnu/services: mcron -> base -> admin -> mcron

2019-06-15 Thread Jack Hill


On Sat, 15 Jun 2019, Ludovic Courtès wrote:


This is fixed (surprisingly easily!) by commit
f3d797005374e5333c7596fe86b4a524ab1b9b11.


Neat!


Let me know if you notice anything wrong!


Everything looks good and works well for me.


Thanks for the bug report,


Thanks for the quick fix.

Best,
Jack

bug#36207: Circular dependency in gnu/services: mcron -> base -> admin -> mcron

2019-06-15 Thread Ludovic Courtès
Hi Jack,

Jack Hill  skribis:

> As discussed on IRC with Ludo’ and Ricardo,
> 4252dace19945f56192477e8cb07973c20a526ba introduced a circular
> dependency among gnu/services modules, by adding a dependency between
> from base -> 
> admin, resulting in the full dependency chain:
>
>  mcron -> base -> admin -> mcron
>
> I ran into this when building a channel. The error reported by guix
> pull was:
>
> ```
> (repl-version 0 0)
> (exception misc-error (value #f) (value "Unbound variable: ~s") (value 
> (mcron-service-type)) (value #f))
> ```

This is fixed (surprisingly easily!) by commit
f3d797005374e5333c7596fe86b4a524ab1b9b11.

Let me know if you notice anything wrong!

Thanks for the bug report,
Ludo’.





bug#35640: Make USB modems just work on Guix

2019-06-15 Thread Ludovic Courtès
Hello!

"pelzflorian (Florian Pelz)"  skribis:

> From 27aff97683537407c178ea2b664069def0cf141a Mon Sep 17 00:00:00 2001
> From: Florian Pelz 
> Date: Thu, 13 Jun 2019 19:17:05 +0200
> Subject: [PATCH 1/2] Add usb-modeswitch-service-type.
>
> * gnu/services/networking.scm (usb-modeswitch-service-type): New variable.
> (usb-modeswitch-configuration): New variable.
> (usb-modeswitch-sh): New procedure.
> (usb-modeswitch-configuration->udev-rules): New procedure.
> * doc/guix.texi (Networking Services): Document it.

[...]

> From f4a5103b365f8bc5d2c514dad2e40f3c9981cfc2 Mon Sep 17 00:00:00 2001
> From: Florian Pelz 
> Date: Wed, 12 Jun 2019 11:16:57 +0200
> Subject: [PATCH 2/2] services: Include USB_ModeSwitch in %desktop-services.
>
> Fixes .
>
> * gnu/services/desktop.scm (%desktop-services): Add 
> usb-modeswitch-service-type.
> * doc/guix.texi (Networking Services): Document it.

Pushed, thank you!

Ludo’.





bug#36180: Problem with non ASCII chars in Libreoffice and zsh on foreign distro

2019-06-15 Thread Andréas Livet

Thanks for your help, GUIX is really awesome and I enjoy using it !






bug#36221: Make GDM *not* restart 504 times on failure

2019-06-15 Thread pelzflorian (Florian Pelz)
If GDM does not start for whatever reason, it attempts to restart 504
more times which all fail and overwrite all five old logs.  It
probably should not attempt to restart at all.

Regards,
Florian