bug#44916: No option to add whisker menu to xfce panel after installing package xfce4-whiskermenu-plugin.

2020-12-05 Thread Kei Kebreau
Hello again!

If you are able, please take a look at patch #45062 linked below.  I've
slightly modified Michael's patch and added one of my own to take a shot
at solving this issue.  If it passes review (or no one says anything for
a while), these changes will be applied to Guix proper.

The patch is here: https://issues.guix.gnu.org/45062

Thanks,
Kei


signature.asc
Description: PGP signature


bug#45051: Acknowledgement (Guix pull fails: `In procedure put-string: Wrong type argument in position 1 (expecting open output port): #`)

2020-12-05 Thread pkill9
It's actually doing this for *any* package I build, and it's not
because it can't get substitutes, as running `guix weather hello`
reports that a substitute is available, but it still does this issue
with the `hello` package.





bug#45031: qoauth fail install/build

2020-12-05 Thread Distopico

Thanks, I'll try it, I need install another package that have dependency
of it but not rush. thanks again for your help.


On 2020-12-04, zimoun wrote:

> Hi,
>
> Thanks for the report. Well, something is wrong but it is not easy to
> spot out what.  For example, the history shows,
>
> 
>
> that something in the qtbase or qca dependencies is going wrong.  Trying
> to locally build with,
>
> --8<---cut here---start->8---
> for ci in $(git log --format="%H %s" | grep qtbase | head -5 | cut -f1 -d' 
> '); \
> do
>guix time-machine --commit=$ci \
> -- build qoauth --no-grafts ;
> done
> --8<---cut here---end--->8---
>
> does not build easily.  I am trying to figure out why.
>
>
> In the meantime, if you absolutely need the package qoauth, it is
> avaible with:
>
>guix time-machine --commit=ec944bdd -- install qoauth
>
> but the substitute is not available, so it will burn a bit of CPU. 
>
>
> Thanks,
> simon



signature.asc
Description: PGP signature


bug#43448: [PATCH] gnu: freecad: Fix compilation flags

2020-12-05 Thread Ekaitz Zarraga
Hi everyone,

I managed to solve the longstanding issue with freecad's compilation (#43448).

I'll submit a new change with the package update to 0.18.5 next.

Thanks



>From d4d8a65679406b212c68d5198f239bdd71395541 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga 
Date: Sun, 6 Dec 2020 00:43:36 +0100
Subject: [PATCH] gnu: freecad: Fix compilation flags

* gnu/packages/engineering.scm (freecad)[arguments]: Set correct
search paths in compilation flags. Fixes #43448
---
 gnu/packages/engineering.scm | 24 ++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 558541dd5a..5a8977c940 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2496,8 +2496,28 @@ full programmatic control over your models.")
#:configure-flags
(list
 "-DBUILD_QT5=ON"
-(string-append "-DCMAKE_INSTALL_LIBDIR="
-   (assoc-ref %outputs "out") "/lib"))
+(string-append "-DCMAKE_INSTALL_LIBDIR=" (assoc-ref %outputs "out") 
"/lib")
+
+(string-append "-DPYSIDE2UICBINARY="
+   (assoc-ref %build-inputs "python-pyside-2-tools")
+   "/bin/uic")
+(string-append "-DPYSIDE2RCCBINARY="
+   (assoc-ref %build-inputs "python-pyside-2-tools")
+   "/bin/rcc")
+
+"-DPYSIDE_LIBRARY=PySide2::pyside2"
+(string-append
+ "-DPYSIDE_INCLUDE_DIR="
+ (assoc-ref %build-inputs "python-pyside-2") "/include;"
+ (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2;"
+ (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtCore;"
+ (assoc-ref %build-inputs "python-pyside-2") 
"/include/PySide2/QtWidgets;"
+ (assoc-ref %build-inputs "python-pyside-2") "/include/PySide2/QtGui;")
+
+"-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken"
+(string-append "-DSHIBOKEN_INCLUDE_DIR="
+   (assoc-ref %build-inputs "python-shiboken-2")
+   "/include/shiboken2"))
#:phases
(modify-phases %standard-phases
  (add-before 'configure 'restore-pythonpath
--
2.28.0







bug#43448: FreeCAD fails to compile

2020-12-05 Thread Ekaitz Zarraga
On Saturday, December 5, 2020 5:55 PM, John Soo  wrote:

> Nice work Ekaitz!
>
> I worked hard on freecad, it is quite a difficult program to package. That 
> was a weird issue that I asked about on the freecad forums. Perhaps it is 
> fixed upstream now, which would be excellent. Thanks for keeping it up to 
> date!
>
> - John

Hey!
I think I found you post.
I'm hitting against the same wall. The funny thing is the thread says [SOLVED].
I have a couple of ideas but this thing is hard to build...

I'll fight with all my soul, and keep you posted.

Thanks for the support,
Ekaitz

bug#45058: Duplicate inputs with Crate importer

2020-12-05 Thread Nicolas Goaziou
Hello,

I noticed the Crate importer sometimes returns duplicate inputs. For
example

guix import crate bat

returns

...
(arguments
  `(#:cargo-inputs
(("rust-ansi-colours" ,rust-ansi-colours-1)
 ("rust-ansi-term" ,rust-ansi-term-0.12)
 ("rust-atty" ,rust-atty-0.2)
 ("rust-clap" ,rust-clap-2)
 ("rust-clap" ,rust-clap-2)
 ...

Regards,
-- 
Nicolas Goaziou





bug#44808: Default to allowing password authentication on leaves users vulnerable

2020-12-05 Thread Christopher Lemmer Webber
Ludovic Courtès writes:

> Hi!
>
> Maxim Cournoyer  skribis:
>
 I'm on board with what you're proposing, and I think Guix should
 default to the more secure option, but I'm not sure that an 
 "average user" (whatever that means for Guix's demographic) would
 expect that password authentication is disabled by default.
>>>
>>> That's fair... I think that
>>> "[ ] Password authentication? (insecure)"
>>> would be sufficient as an option.  How do others feel?
>>
>> I'm +1 on disabling password access out of the box; especially since
>> Guix System makes it easy to authorize SSH keys at installation time.
>> We'd have to see if it breaks any of our system tests, but I doubt so.
>
> Agreed.  There are several ways to do that:
>
>   1. Have the installer emit an ‘openssh-configuration’ that explicitly
>  disables password authentication.
>
>   2. Change the default value of the relevant field in
>  .
>
> #2 is more thorough but also more risky: people could find themselves
> locked out of their server after reconfiguration, though this could be
> mitigated by a news entry.
>
> Thoughts?
>
> Ludo’.

We could also do a combination of the above, as a transitional plan:
do #1 for now, but try to advertise that in the future, the default will
be changing... please explicitly set password access to #t if you need
this!  Then in the *following* release, change the default.

This seems like a reasonable transition plan, kind of akin to a
deprecation process?






bug#45055: cabal-install does not work with default ghc

2020-12-05 Thread John Soo
Hi Guix,

Our version of cabal-install is 2.4.0.0 which is not supported by the
default version of ghc (8.8).  It probably ought to be updated.

Kindly,

John





bug#43448: FreeCAD fails to compile

2020-12-05 Thread John Soo
 Nice work Ekaitz! 

 
I worked hard on freecad, it is quite a difficult program to package. That was 
a weird issue that I asked about on the freecad forums. Perhaps it is fixed 
upstream now, which would be excellent. Thanks for keeping it up to date!
 

 
- John
 

bug#43448: FreeCAD fails to compile

2020-12-05 Thread Ekaitz Zarraga
Looks like this line, inherited from the previous definition, was giving some 
trouble:

>  (string-append "-DCMAKE_INSTALL_LIBDIR=\\"" (assoc-ref %outputs 
> "out") "/lib\\"")


It was creating wrong variables (and wrong syntax too!):


  if(EXISTS 
"$ENV{DESTDIR}/tmp/guix-build-freecad-mine-0.18.5.drv-0/build/"/gnu/store/30rcpcdv7h6ak37wf30ijlbf9x2j6jyz-freecad-mine-0.18.5/lib"/libSMDS.so"
 AND
 NOT IS_SYMLINK 
"$ENV{DESTDIR}/tmp/guix-build-freecad-mine-0.18.5.drv-0/build/"/gnu/store/30rcpcdv7h6ak37wf30ijlbf9x2j6jyz-freecad-mine-0.18.5/lib"/libSMDS.so")


I think I'll manage to solve this myself.





bug#23874: [PATCH v3 2/2] profiles: Delete duplicate manifest entries in packages->manifest.

2020-12-05 Thread Leo Prikler
* gnu/profiles.scm (packages->manifest): Delete duplicate entries.
* tests/profiles.scm ("packages->manifest, no duplicates"): New test.
---
 guix/profiles.scm  | 34 ++
 tests/profiles.scm | 10 ++
 2 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index 034591eb79..59a313ea08 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -399,22 +399,24 @@ denoting a specific output of a package."
 'inferior-package->manifest-entry))
 
   (manifest
-   (map (match-lambda
-  (((? package? package) output)
-   (package->manifest-entry package output))
-  ((? package? package)
-   (package->manifest-entry package))
-  ((thing output)
-   (if inferiors-loaded?
-   ((inferior->entry) thing output)
-   (throw 'wrong-type-arg 'packages->manifest
-  "Wrong package object: ~S" (list thing) (list thing
-  (thing
-   (if inferiors-loaded?
-   ((inferior->entry) thing)
-   (throw 'wrong-type-arg 'packages->manifest
-  "Wrong package object: ~S" (list thing) (list thing)
-packages)))
+   (delete-duplicates
+(map (match-lambda
+   (((? package? package) output)
+(package->manifest-entry package output))
+   ((? package? package)
+(package->manifest-entry package))
+   ((thing output)
+(if inferiors-loaded?
+((inferior->entry) thing output)
+(throw 'wrong-type-arg 'packages->manifest
+   "Wrong package object: ~S" (list thing) (list thing
+   (thing
+(if inferiors-loaded?
+((inferior->entry) thing)
+(throw 'wrong-type-arg 'packages->manifest
+   "Wrong package object: ~S" (list thing) (list thing)
+ packages)
+manifest-entry=?)))
 
 (define (manifest->gexp manifest)
   "Return a representation of MANIFEST as a gexp."
diff --git a/tests/profiles.scm b/tests/profiles.scm
index f0a1a1d11c..2dec42bec1 100644
--- a/tests/profiles.scm
+++ b/tests/profiles.scm
@@ -384,6 +384,16 @@
(manifest-entry-search-paths
 (package->manifest-entry mpl)
 
+(test-assert "packages->manifest, no duplicates"
+  (let ((expected
+ (manifest
+  (list
+   (package->manifest-entry packages:guile-2.2
+(manifest (packages->manifest
+   (list packages:guile-2.2 packages:guile-2.2
+(every manifest-entry=? (manifest-entries expected)
+   (manifest-entries manifest
+
 (test-equal "packages->manifest, propagated inputs"
   (map (match-lambda
  ((label package)
-- 
2.29.2






bug#23874: [PATCH v3 1/2] profiles: Remove duplicates in manifest transactions.

2020-12-05 Thread Leo Prikler
* guix/profiles.scm (manifest-transaction-effects): Delete duplicates in
install and remove.  Let multiple upgrades and downgrades shadow previous
transactions of the same kind.
* tests/profiles.scm
("manifest-transaction-effects no double install or upgrades")
("manifest-transaction-effects no double downgrade")
("manifest-transaction-effects no double removal"): New tests.
---
 guix/profiles.scm  | 18 --
 tests/profiles.scm | 28 
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index 1b15257210..034591eb79 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -716,6 +716,12 @@ replace it."
 (manifest-pattern
   (name   (manifest-entry-name entry))
   (output (manifest-entry-output entry
+  (define manifest-entry-pair=?
+(match-lambda*
+  (((m1a . m2a) (m1b . m2b))
+   (and (manifest-entry=? m1a m1b)
+(manifest-entry=? m2a m2b)))
+  (_ #f)))
 
   (let loop ((input (manifest-transaction-install transaction))
  (install   '())
@@ -724,8 +730,16 @@ replace it."
 (match input
   (()
(let ((remove (manifest-transaction-remove transaction)))
- (values (manifest-matching-entries manifest remove)
- (reverse install) (reverse upgrade) (reverse downgrade
+ (values (delete-duplicates
+  (manifest-matching-entries manifest remove)
+  manifest-entry=?)
+ (delete-duplicates (reverse install) manifest-entry=?)
+ (delete-duplicates
+  (reverse upgrade)
+  manifest-entry-pair=?)
+ (delete-duplicates
+  (reverse downgrade)
+  manifest-entry-pair=?
   ((entry rest ...)
;; Check whether installing ENTRY corresponds to the installation of a
;; new package or to an upgrade.
diff --git a/tests/profiles.scm b/tests/profiles.scm
index 055924ba3e..f0a1a1d11c 100644
--- a/tests/profiles.scm
+++ b/tests/profiles.scm
@@ -183,6 +183,16 @@
(equal? (list glibc) install)
(equal? (list (cons guile-1.8.8 guile-2.0.9)) upgrade)
 
+(test-assert "manifest-transaction-effects no double install or upgrades"
+  (let* ((m0 (manifest (list guile-1.8.8)))
+ (t  (manifest-transaction
+  (install (list guile-2.0.9 glibc glibc)
+(let-values (((remove install upgrade downgrade)
+  (manifest-transaction-effects m0 t)))
+  (and (null? remove) (null? downgrade)
+   (equal? (list glibc) install)
+   (equal? (list (cons guile-1.8.8 guile-2.0.9)) upgrade)
+
 (test-assert "manifest-transaction-effects and downgrades"
   (let* ((m0 (manifest (list guile-2.0.9)))
  (t  (manifest-transaction (install (list guile-1.8.8)
@@ -191,6 +201,14 @@
   (and (null? remove) (null? install) (null? upgrade)
(equal? (list (cons guile-2.0.9 guile-1.8.8)) downgrade)
 
+(test-assert "manifest-transaction-effects no double downgrade"
+  (let* ((m0 (manifest (list guile-2.0.9)))
+ (t  (manifest-transaction (install (list guile-1.8.8 guile-1.8.8)
+(let-values (((remove install upgrade downgrade)
+  (manifest-transaction-effects m0 t)))
+  (and (null? remove) (null? install) (null? upgrade)
+   (equal? (list (cons guile-2.0.9 guile-1.8.8)) downgrade)
+
 (test-assert "manifest-transaction-effects and pseudo-upgrades"
   (let* ((m0 (manifest (list guile-2.0.9)))
  (t  (manifest-transaction (install (list guile-2.0.9)
@@ -209,6 +227,16 @@
 (and (manifest-transaction-removal-candidate? guile-2.0.9 t)
  (not (manifest-transaction-removal-candidate? glibc t)
 
+(test-assert "manifest-transaction-effects no double removal"
+  (let* ((m0 (manifest (list guile-2.0.9)))
+ (t  (manifest-transaction
+  (remove (list (manifest-pattern (name "guile")))
+(let-values (((remove install upgrade downgrade)
+  (manifest-transaction-effects m0 t)))
+  (and (= 1 (length remove))
+   (manifest-transaction-removal-candidate? guile-2.0.9 t)
+   (null? install) (null? downgrade) (null? upgrade)
+
 (test-assertm "profile-derivation"
   (mlet* %store-monad
   ((entry ->   (package->manifest-entry %bootstrap-guile))
-- 
2.29.2






bug#43448: FreeCAD fails to compile

2020-12-05 Thread Ekaitz Zarraga
Hi,

I solved most of the compilation issue with freecad.

Now my package version compiles but install phase fails with this error:


``` 

CMake Error at 
src/3rdParty/salomesmesh/cmake_install.cmake:41 (if):   

  if given arguments:   




  "EXISTS" "/tmp/guix-build-freecad-mine-0.18.5.drv-0/build/" 
"/gnu/store/injf0n8qja607qswa5cyxz1dpzqia21p-freecad-mine-0.18.5/lib\"/libSMDS.so\""
 "AND" "NOT" "IS_SYMLINK" "/tmp/guix-build-freecad-mine-0.18.5.drv-0/build/" 
"/gnu/store/injf0n8qja607qswa5cyxz1dpzqia21p-freecad-mine-0.18.5/lib\"/libSMDS.so\""



  Unknown arguments specified   

   Call Stack (most recent 
call first):

 src/3rdParty/cmake_install.cmake:42 (include)  

src/cmake_install.cmake:43 (include)

   
cmake_install.cmake:46 (include)
```


Did anyone see something like this before?

Right now I have no idea how to tackle this but I'll keep researching.

If anyone wants to be able to reach this point, the only changes I applied to 
the project are configure-flags suggested in this bug report with some extra 
more because the header files were not found in subdirectories. These are the 
configure flags I added (mostly copied from Nix package[^nix]):

```
(list
 "-DBUILD_QT5=ON"
 (string-append "-DCMAKE_INSTALL_LIBDIR=\"" (assoc-ref %outputs "out") 
"/lib\"")

 (string-append "-DPYSIDE2UICBINARY="
(assoc-ref %build-inputs "python-pyside-2-tools")
"/bin/uic")
 (string-append "-DPYSIDE2RCCBINARY="
(assoc-ref %build-inputs "python-pyside-2-tools")
"/bin/rcc")

 "-DPYSIDE_LIBRARY=PySide2::pyside2"
 (string-append "-DPYSIDE_INCLUDE_DIR="
(assoc-ref %build-inputs "python-pyside-2") "/include;"
(assoc-ref %build-inputs "python-pyside-2") 
"/include/PySide2;"
(assoc-ref %build-inputs "python-pyside-2") 
"/include/PySide2/QtCore;"
(assoc-ref %build-inputs "python-pyside-2") 
"/include/PySide2/QtWidgets;"
(assoc-ref %build-inputs "python-pyside-2") 
"/include/PySide2/QtGui;")

 "-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken"
 (string-append "-DSHIBOKEN_INCLUDE_DIR="
(assoc-ref %build-inputs "python-shiboken-2")
"/include/shiboken2"))
```


I hope we can have something working soon!



Cheers,
Ekaitz



[^nix]: 
https://github.com/NixOS/nixpkgs/blob/7caa81d8a23f0278e868adf9054ec5409cd81f93/pkgs/applications/graphics/freecad/default.nix






bug#23874: [PATCH 1/2] profiles: Remove duplicates in manifest transactions.

2020-12-05 Thread Leo Prikler
Hi Ludo

Am Samstag, den 05.12.2020, 16:38 +0100 schrieb Ludovic Courtès:
> Hi Leo,
> 
> Could you explain what each patch fixes, and perhaps add a test case
> for
> each that illustrates that?
> 
> Thanks,
> Ludo’.
Tests sent along with v3.  These patches remove duplicates from
manifests constructed by packages->manifest and manifest-transaction-
effects, so that the UI reports them only once even if they're
specified multiple times (e.g. by "guix package -i stress stress
stress" or by more accidental copying of package names).  The first
patch does so for computing transactions (i.e. when using -i, -u and
-r), the second for manifests (-m).

Regards,
Leo






bug#23874: [PATCH 1/2] profiles: Remove duplicates in manifest transactions.

2020-12-05 Thread Ludovic Courtès
Hi Leo,

Could you explain what each patch fixes, and perhaps add a test case for
each that illustrates that?

Thanks,
Ludo’.





bug#45017: asdf-build-system packages have priority over user ones

2020-12-05 Thread Guillaume Le Vaillant

Pierre Neidhardt  skribis:

> Guillaume Le Vaillant  writes:
>
>> Updated patches in attachment.
>> Do you see something else to fix or improve?
>
> Tested and approved!
>
> I suggest we merge on master since this is not very disruptive and it
> fixes a regression introduced with the build system overhaul.
>
> Thoughts?

Thanks for the review. Pushed as
031fbebafef81244a72e584a46b3fcc219256fcb and following.


signature.asc
Description: PGP signature


bug#44808: Default to allowing password authentication on leaves users vulnerable

2020-12-05 Thread Ludovic Courtès
Hi!

Maxim Cournoyer  skribis:

>>> I'm on board with what you're proposing, and I think Guix should
>>> default to the more secure option, but I'm not sure that an 
>>> "average user" (whatever that means for Guix's demographic) would
>>> expect that password authentication is disabled by default.
>>
>> That's fair... I think that
>> "[ ] Password authentication? (insecure)"
>> would be sufficient as an option.  How do others feel?
>
> I'm +1 on disabling password access out of the box; especially since
> Guix System makes it easy to authorize SSH keys at installation time.
> We'd have to see if it breaks any of our system tests, but I doubt so.

Agreed.  There are several ways to do that:

  1. Have the installer emit an ‘openssh-configuration’ that explicitly
 disables password authentication.

  2. Change the default value of the relevant field in
 .

#2 is more thorough but also more risky: people could find themselves
locked out of their server after reconfiguration, though this could be
mitigated by a news entry.

Thoughts?

Ludo’.





bug#44947: No variable named guile-avahi in #

2020-12-05 Thread Ludovic Courtès
For the record, I test changes to (guix self) and other things that
affect ‘guix pull’, such as changes to the ‘guix’ package (which
‘guix-daemon’ inherits from) or updates to the translations, by running:

  make as-derivation

That’s a good way to avoid bad surprises.

Ludo’.





bug#44847: [Petition] Add a dotnet 5.0 support

2020-12-05 Thread Ludovic Courtès
Hi,

Timothy Sample  skribis:

> A quick glance around suggests that an older version of .NET is
> available for Fedora 32, and that Debian does not have a package yet.
> That’s at least promising, but Guix has stricter requirements than
> either of those two distributions.  Particularly, Guix tries to avoid
> packages that cannot be bootstrapped from source.  From the README of
> the repository you linked to:
>
> Nearly all .NET Core repositories require the .NET Core SDK to
> build. This is a circular dependency, which presents a bootstrapping
> problem.
>
> This means that Guix is unlikely to accept .NET Core packages.  Because
> of that, I’m closing this bug.

Note that we do have a few compilers not bootstrapped from source, such
as GHC.  It’s clearly something we avoid as much as possible, though.

Has anyone looked into bootstrapping the Microsoft .NET code with Mono?

Ludo’.





bug#42771: [PATCH] Disable tests for smalltalk and add candidate releases

2020-12-05 Thread Ludovic Courtès
Hi Holger,

Holger Peters  skribis:

> * gnu/packages/smalltalk.scm (smalltalk): disable tests
> (smalltalk-next): New variable.
> (smalltalk-next-from-vcs): New variable.

I have mostly two comments, as discussed on IRC (restating them here for
those following along):

  1. Instead of disabling tests wholesale, what we usually do is (1)
 investigate why the test is failing (I think it’s a single test
 failure here), (2) try to determine whether it’s serious or not,
 (3) see if we can work around it with reasonable effort, and if
 not, skip just this test.

  2. I think we should just have ‘smalltalk’ (latest release) and
 ‘smalltalk-next’ (VCS snapshot).  Having an extra package for the
 release candidate is not really useful IMO, and not something we
 generally do.

HTH!

Ludo’.





bug#44893: `guix deploy` doesn't recognize option --dry-run

2020-12-05 Thread Ludovic Courtès
Hi,

We can make this change:

diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 0725fba54b..d9371b3d4a 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -165,7 +165,9 @@ Perform the deployment specified by FILE.\n"))
   (with-build-handler (build-notifier #:use-substitutes?
   (assoc-ref opts 'substitutes?)
   #:verbosity
-  (assoc-ref opts 'verbosity))
+  (assoc-ref opts 'verbosity)
+  #:dry-run?
+  (assoc-ref opts 'dry-run?))
 (parameterize ((%graft? (assq-ref opts 'graft?)))
   (map/accumulate-builds store
  (cut deploy-machine* store <>)

It may not be the kind of “dry run” that users have in mind for ‘guix
deploy’, as you note zimoun, but that’s probably better than nothing.

Thoughts?

Ludo’.


bug#44924: guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH

2020-12-05 Thread 宋文武
Ludovic Courtès  writes:

> Hi,
>
> 宋文武  skribis:
>
>> Running:
>>   guix build u-boot-pinebook \
>> --with-git-url=u-boot-pinebook=https://github.com/u-boot/u-boot
>>
>> Would fail with "fatal error: asm/string.h: No such file or directory".
>>
>> And it's caused by the first entry in C_INCLUDE_PATH, which is
>> "/gnu/store/xxx-u-boot-xxx/include".
>
> Why don’t we have that problem when omitting ‘--with-git-url’?

When not use git, source is a tarball, not a directory, so it's ignored
by "set-paths".

>
>> I think we should filter out "source" in `set-paths` of the
>> `gnu-build-system`.
>
> Yes, sounds like a good idea.  We can do it in ‘core-updates’.

Here is patch:

>From 77283132c6eeeb75900afad5782b989ceee1506a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= 
Date: Sat, 5 Dec 2020 11:35:37 +0800
Subject: [PATCH] build-system/gnu: Remove the source directory from search
 paths.

Fixes .

* guix/build/gnu-build-system.scm (set-paths): Delete 'source' from
'input-directories'.
---
 guix/build/gnu-build-system.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 5f08b9d6ac..f9e6f5013d 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -72,7 +72,9 @@ See https://reproducible-builds.org/specs/source-date-epoch/.";
 (search-paths '()) (native-search-paths '())
 #:allow-other-keys)
   (define input-directories
-(match inputs
+;; The "source" input can be a directory, but we don't want it for search
+;; paths.  See .
+(match (alist-delete "source" inputs)
   (((_ . dir) ...)
dir)))
 
-- 
2.29.1



Thanks!


bug#45017: asdf-build-system packages have priority over user ones

2020-12-05 Thread Guillaume Le Vaillant

Updated patches in attachment.
Do you see something else to fix or improve?
From 757b4f4a84fdbcbd26148f2a170d84ba8c128c7a Mon Sep 17 00:00:00 2001
From: Guillaume Le Vaillant 
Date: Thu, 3 Dec 2020 14:52:02 +0100
Subject: [PATCH 1/6] gnu: cl-asdf: Improve priorities of configuration file
 search.

* gnu/packages/patches/cl-asdf-config-directories.patch: New file.
* gnu/local.mk (dist_PATCH_DATA): Add it.
* gnu/packages/lisp.scm (cl-asdf)[native-inputs]: Add it.
  [arguments]: Apply the new patch.

Co-authored-by: Pierre Neidhardt 
---
 gnu/local.mk  |  1 +
 gnu/packages/lisp.scm | 28 
 .../patches/cl-asdf-config-directories.patch  | 44 +++
 3 files changed, 53 insertions(+), 20 deletions(-)
 create mode 100644 gnu/packages/patches/cl-asdf-config-directories.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 28ad119846..f838ebe1fa 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -868,6 +868,7 @@ dist_patch_DATA =		\
   %D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch 	\
   %D%/packages/patches/ceph-disable-cpu-optimizations.patch	\
   %D%/packages/patches/chmlib-inttypes.patch			\
+  %D%/packages/patches/cl-asdf-config-directories.patch		\
   %D%/packages/patches/clamav-config-llvm-libs.patch		\
   %D%/packages/patches/clamav-system-tomsfastmath.patch		\
   %D%/packages/patches/clang-3.5-libc-search-path.patch		\
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index e4c963070e..0038cb0dca 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -90,6 +90,9 @@
(sha256
 (base32 "1hpx30f6yrak15nw992k7x3pn75ahvjs04n4f134k68mhgs62km2"
 (build-system trivial-build-system)
+(native-inputs
+ `(("config-patch" ,@(search-patches "cl-asdf-config-directories.patch"))
+   ("patch" ,patch)))
 (arguments
  `(#:modules ((guix build utils)
   (guix build lisp-utils))
@@ -101,28 +104,13 @@
 (asdf-install (string-append out %source-install-prefix
  "/source/asdf/"))
 (src-asdf (string-append (assoc-ref %build-inputs "source")))
-(dst-asdf (string-append asdf-install "asdf.lisp")))
+(dst-asdf (string-append asdf-install "asdf.lisp"))
+(patch (string-append (assoc-ref %build-inputs "patch")
+  "/bin/patch"))
+(config-patch (assoc-ref %build-inputs "config-patch")))
(mkdir-p asdf-install)
(copy-file src-asdf dst-asdf)
-   ;; Patch ASDF to make it read the configuration files in all
-   ;; the direcories listed in '$XDG_CONFIG_DIRS' instead of just
-   ;; the first.
-   (substitute* dst-asdf
- (("\\(xdg-config-pathname \\*source-registry-directory\\* direction\\)")
-  "`(:source-registry
- ,@(loop
-  for dir in (xdg-config-dirs
-  \"common-lisp/source-registry.conf.d/\")
-  collect `(:include ,dir))
- :inherit-configuration)")
- (("\\(xdg-config-pathname \\*output-translations-directory\\* direction\\)")
-  "`(:output-translations
- ,@(loop
-  for dir in (xdg-config-dirs
-  \"common-lisp/asdf-output-translations.conf.d/\")
-  collect `(:include ,dir))
- :inherit-configuration)")))
- #t)))
+   (invoke patch "-p1" "-i" config-patch dst-asdf)
 (home-page "https://common-lisp.net/project/asdf/";)
 (synopsis "Another System Definition Facility")
 (description
diff --git a/gnu/packages/patches/cl-asdf-config-directories.patch b/gnu/packages/patches/cl-asdf-config-directories.patch
new file mode 100644
index 00..2b1b51932c
--- /dev/null
+++ b/gnu/packages/patches/cl-asdf-config-directories.patch
@@ -0,0 +1,44 @@
+Search for ASDF configuration files first in user directories, and then in
+Guix profiles.
+
+diff -ru a/asdf-3.3.4.lisp b/asdf-3.3.4.lisp
+--- a/asdf-3.3.4.lisp	2020-02-14 20:16:22.0 +0100
 b/asdf-3.3.4.lisp	2020-12-05 11:09:56.066229482 +0100
+@@ -12535,10 +12535,15 @@
+ (find-preferred-file (system-config-pathnames *output-translations-file*)
+  :direction direction))
+   (defun user-output-translations-directory-pathname (&key (direction :input))
+-(xdg-config-pathname *output-translations-directory* direction))
+-  (defun system-output-translations-directory-pathname (&key (direction :input))
+-(find-preferred-file (system-config-pathnames *output-translations-directory*)
++(find-preferred-file (list (xdg-config-home *output-translations-directory*))
+  :direction direction))
++  (defun system-output-translations-directory-pathname (&key (direction :input

bug#45045: substitute fails if discovery is enabled

2020-12-05 Thread Mathieu Othacehe


Hello Maxime,

> Discovery of substitute servers on the local network doesn't seem to
> work properly, see output of
> `sudo guix system reconfigure config.scm --save-provenance`
> at end of e-mail. Disabling substitutes (e.g. `guix build hello --no-
> substitutes`) seems to work-around the issue. 

Thanks for the complete bug report. This is fixed with
c952a9312a94bb236495ec654bf184685cf9fe79. Note that you will need to run
"guix pull" before reconfiguring.

Mathieu





bug#45017: asdf-build-system packages have priority over user ones

2020-12-05 Thread Guillaume Le Vaillant

Pierre Neidhardt  skribis:

> Tested!
>
> I've installed sbcl to my "common-lisp" profile along quri.
> I've also cloned quri to ~/common-lisp.
>
> Then:
>
> --8<---cut here---start->8---
> $ sbcl
> * (asdf:locate-system :quri)
> T
> NIL
> #P"/gnu/store/5gj1inwiqpn2fm9w384zd0grpyadx96m-sbcl-quri-0.1.0-2.b53231c/share/common-lisp/sbcl/quri/quri.asd"
> NIL
> NIL
> NIL
>
> ;; Indeed:
> * (asdf:user-source-registry-directory)
> #P"/gnu/store/75qppl3a062b138fkrn324qq8f912zqh-profile/etc/common-lisp/source-registry.conf.d/"
> --8<---cut here---end--->8---
>
> It does not work because the sbcl package definition sets the
> XDG_CONFIG_DIRS native search path which is picked by
> user-source-registry-directory, which has higher priority than
> default-user-source-registry.
>
> I think the flaw is ASDF's this time:
>
> --8<---cut here---start->8---
>   (defun user-source-registry-directory (&key (direction :input))
> (xdg-config-pathname *source-registry-directory* direction))
>
> ;...
>
>   (defun xdg-config-pathnames (&rest more)
> "Return a list of pathnames for application configuration.
> MORE may contain specifications for a subpath relative to these directories: a
> subpathname specification and keyword arguments as per RESOLVE-LOCATION \(see
> also \"Configuration DSL\"\) in the ASDF manual."
> (filter-pathname-set
>  `(,(xdg-config-home more)
>,@(xdg-config-dirs more
> --8<---cut here---end--->8---
>
> So the user registry looks into XDG_CONFIG_DIRS, while really it should
> just look at XDG_CONFIG_HOME.
>

The same test works for me. I think it's because I have
a ".config/common-lisp/source-registry.conf.d" directory (even if it's
empty), and '(user-source-registry-directory)' returns it instead of the
first directory in XDG_CONFIG_DIRS.

> So this patch should do (untested):
>
> --8<---cut here---start->8---
> - (defun user-source-registry-directory (&key (direction :input))
> -   (xdg-config-pathname *source-registry-directory* direction))
> + (defun user-source-registry-directory (&key (direction :input))
> +   (find-preferred-file (list (xdg-config-home *source-registry-directory*)) 
> :direction direction))
> --8<---cut here---end--->8---
>
> If you confirm, then we should also report upstream I think.
>
> Cheers!

I don't know if the fact that ASDF can give priority to XDG_CONFIG_DIRS
over "~/common-lisp" is a feature or a bug, so you could ask upstream.
Anyway in our case, your patch makes sense since we always want to give
priority to "~/common-lisp" and other usual user directories. I'll add
it to our patch for cl-asdf.


signature.asc
Description: PGP signature


bug#45017: asdf-build-system packages have priority over user ones

2020-12-05 Thread Guillaume Le Vaillant

Pierre Neidhardt  skribis:

> A few comments:
>
>> @@ -603,7 +603,8 @@ statistical profiler, a code coverage tool, and many 
>> other extensions.")
>>  "0x4bjx6cxsjvxyagijhlvmc7jkyxifdvz5q5zvz37028va65243c")
>> (_ 
>> "15l7cfa4a7jkfwdzsfm4q3n22jnb57imxahpql3h77xin57v1gbz"
>>  (native-inputs
>> - `(("m4" ,m4)))
>> + `(("cl-asdf" ,cl-asdf)
>> +   ("m4" ,m4)))
>>  (arguments
>>   `(#:tests? #f  ;no 'check' target
>> #:modules ((ice-9 match)
>> @@ -615,6 +616,17 @@ statistical profiler, a code coverage tool, and many 
>> other extensions.")
>>   (add-after 'unpack 'unpack-image
>> (lambda* (#:key inputs #:allow-other-keys)
>>   (invoke "tar" "xzvf" (assoc-ref inputs "ccl-bootstrap"
>> + (add-after 'unpack 'replace-asdf
>> +   ;; Use system ASDF instead of bundled one.
>> +   (lambda* (#:key inputs outputs #:allow-other-keys)
>> + (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
>> +(guix-asdf (string-append
>> +cl-asdf
>> +"/share/common-lisp/source/asdf/asdf.lisp"))
>> +(out (string-append (assoc-ref outputs "out")))
>
> "out" is unused.  By the way, the same "out" is unused in SBCL.
>

Indeed, I'll fix that.

>> +(contrib-asdf "tools/asdf.lisp"))
>> +   (delete-file contrib-asdf)
>
> I think you don't need to delete the file, copy-file should overwrite.
> That's what SBCL does.
>
> Same with CLISP.

Actually, for CCL and Clisp, I get a "In procedure copy-file: Permission
denied" error if I don't delete the current file before copying the new
one.


signature.asc
Description: PGP signature


bug#45051: Acknowledgement (Guix pull fails: `In procedure put-string: Wrong type argument in position 1 (expecting open output port): #`)

2020-12-05 Thread pkill9
with --fallback it is building. It may be the result of the substitute
server not being available, the error may need to be caught.





bug#45051: Guix pull fails: `In procedure put-string: Wrong type argument in position 1 (expecting open output port): #`

2020-12-05 Thread pkill9
Using guix commit 243512d984e1b870d3b77b2759698a64ed723fea. Also fails
with previous guix revisions.

Full output:

Computing Guix derivation for 'x86_64-linux'... /@ substituter-started
/gnu/store/9ph7spq3b72fv4scqqzwxalb8n0wc6xn-graphviz-2.42.3-doc
substitute -following redirection to
`https://ci.guix.gnu.org/nar/lzip/9ph7spq3b72fv4scqqzwxalb8n0wc6xn-graphviz-2.42.3-doc'...
Backtrace: In ice-9/boot-9.scm: 1736:10  4 (with-exception-handler _ _
#:unwind? _ # _) In unknown file:
   3 (apply-smob/0 #)
In ice-9/boot-9.scm:
718:2  2 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8  1 (_ #(#(#)))
In guix/ui.scm:
  1949:12  0 (run-guix-command _ . _)

guix/ui.scm:1949:12: In procedure run-guix-command:
In procedure put-string: Wrong type argument in position 1 (expecting
open output port): # @ substituter-failed
/gnu/store/9ph7spq3b72fv4scqqzwxalb8n0wc6xn-graphviz-2.42.3-doc 256
fetching path
`/gnu/store/9ph7spq3b72fv4scqqzwxalb8n0wc6xn-graphviz-2.42.3-doc'
failed with exit code 1 @ substituter-started
/gnu/store/adx3hrrgjs0n55zm4i4p5kv6yj0q3bhq-guile-ssh-0.13.1-debug
substitute killing process 4025 Backtrace: 11 (primitive-load
"/gnu/store/f2ymnsn7d0jv9p8alj4mrg4dpw2fr5vn-compute-guix-derivation")
In ice-9/eval.scm: 155:9 10 (_ _) 159:9  9 (_
#(#(#(#(#(#(#(#(#(#(#(#(#(# ?) ?)
?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?)) In ./guix/store.scm: 2049:24  8
(run-with-store # _
#:guile-for-build _ #:system _ #:target _) 1883:8  7 (_ _) In
./guix/gexp.scm: 258:18  6 (_ _) 1123:2  5 (_ _)
982:2  4 (_ _)
843:4  3 (_ _)
In ./guix/store.scm:
  1931:12  2 (_ #)
   1358:5  1 (map/accumulate-builds # _ _) 1369:15  0 (_ # 7fc0406ba5f0> _ _)

./guix/store.scm:1369:15: ERROR:
  1. &store-protocol-error:
  message: "some substitutes for the outputs of derivation
`/gnu/store/d879bxb47cnzkgsl37478aa4mmp7cjdg-graphviz-2.42.3.drv'
failed (usually happens due to networking issues); try `--fallback' to
build derivation from source " status: 1 guix pull: error: You found a
bug: the program
'/gnu/store/f2ymnsn7d0jv9p8alj4mrg4dpw2fr5vn-compute-guix-derivation'
failed to compute the derivation for Guix (version:
"4cf3734c56d669ee2d78082e5d7c4d0a58e0f800"; system: "x86_64-linux";
host version: "243512d984e1b870d3b77b2759698a64ed723fea"; pull-version:
1). Please report it by email to .