Re: git-fetch without a hash

2023-01-09 Thread Stephen Paul Weber

Once we update the ‘guix’ package, the daemon will no longer accept
‘url-fetch’ downloads with hash = #f.


Ok.  Is there something like (git-checkout) we can use that will work 
instead of an (origin) here for url downloads?




Re: git-fetch without a hash

2023-01-03 Thread Stephen Paul Weber

However, there's no real reason that git-fetch *needs* to be
fixed-output in terms of having a hash pre-defined, at least for local
development and other purposes.  So is there a way around this?


 • write (package (source (git-checkout …)) …)


This works well.  Now I'm curious how to know what can go in the (source) 
field?  Obviously not just (origin)...



If having a way around it is not desirable should url-fetch consider
this an error as well?


I’m not sure; do you have an example where it’s not behaving as
expected?


Yes.  When using (sha256 #f) url-fetch still has network access and works to 
download things, which is inconsistent vs other fetchers.


signature.asc
Description: PGP signature


git-fetch without a hash

2022-12-20 Thread Stephen Paul Weber

Hello Guix!

It seem that url-fetch will work without a hash (that is, with (sha256 #f)) 
but git-fetch will not.


As near as I can tell this is because git-fetch uses a fixed derivation 
build going via nix/build.cc stuff which contains this line:


if (i.second.hash == "") fixedOutput = false;

And this results in /etc/resolv.conf not getting written and DNS resolution 
failing.


Now, I *think* by my reading that it is intended for *only* fixed-output 
derivations to have network access, because otherwise the operation would be 
impure?


And then url-fetch is just not actually ending up in a build container and 
so it works even when it isn't fixed-output?


However, there's no real reason that git-fetch *needs* to be fixed-output in 
terms of having a hash pre-defined, at least for local development and other 
purposes.  So is there a way around this?  If having a way around it is not 
desirable should url-fetch consider this an error as well?


Finally, *if* git-fetch should not allow this, the current error message is 
beyond confusing (DNS resolution fails during git fetch and it tries to fall 
back to SWH).  So should git-fetch check for hash of #f and raise at that 
point with a better error message in that case?


signature.asc
Description: PGP signature


Getting GEM_PATH right for ruby scripts

2021-09-29 Thread Stephen Paul Weber

Hello everyone!

I've finally been diving deep into the Guix and doing a lot of packaging.  One
thing that has now come to my attention is the way ruby-build-system set
GEM_PATH for wrapped scripts.  It takes the whole GEM_PATH that is present at
build time.  This means that all those packages end up keeping store references
to build-only (indeed, unit-test-only!) dependencies such as rake and minitest.

Of course the problem is that the package specification does not have any way to
know which inputs are going to be needed past build time.  In the ruby packages,
convention is to use propogated-inputs for this, but even so the GEM_PATH we
need would be for all the implicitly propogated inputs.  I guess there should be
some way to get this, since it's what GEM_PATH will be in a profile that the
package is installed to?

I'm sure topics like this have been beaten to death, but I'd like to understand
how things are and if they can be improved as much as will fit in my head.

Thanks,


signature.asc
Description: PGP signature


Re: Test failures on new build

2021-04-13 Thread Stephen Paul Weber

Could you attach tests/guix-git-authenticate.log?
Likewise.
Likewise.
Likewise.


Attached.

+ '[' -d /home/singpolyma/src/guix/.git ']'
+ guile -c '(use-modules (git))
  (member "refs/heads/keyring" (branch-list (repository-open ".")))'
+ intro_commit=9edb3f66fd807b096b48283debdcddccfea34bad
+ intro_signer='BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA'
+ cache_key=test-4756
+ guix git authenticate 9edb3f66fd807b096b48283debdcddccfea34bad 'BBB0 2DDF 
2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA' --cache-key=test-4756 --stats 
--end=9549f0283a78fe36f2d4ff2a04ef8ad6b0c02604
guix git: error: Git error: cannot locate remote-tracking branch 'keyring'
FAIL tests/guix-git-authenticate.sh (exit status: 1)
substitute: guix substitute: warning: ACL for archive imports seems to be 
uninitialized, substitutes may be unavailable
substitute: guix substitute: warning: authentication and authorization of 
substitutes disabled!
waiting for locks or build slots...
Backtrace:
   8 (primitive-load-path "tests/derivations.scm")
In ice-9/eval.scm:
   626:19  7 (_ #)
   293:34  6 (_ #(#(#) #))
In ice-9/boot-9.scm:
  1736:10  5 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   636:37  4 (thunk)
  2066:24  3 (run-with-store # ?)
In guix/tests.scm:
   122:18  2 (_ _)
In guix/ui.scm:
566:4  1 (_ system-error "copy-file" _ _ _)
In ice-9/boot-9.scm:
  1669:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
In procedure copy-file: Permission denied: 
"/home/singpolyma/src/guix/gnu/packages/bootstrap/i686-linux/bash"
test-name: alist-cons-before
location: /home/singpolyma/src/guix/tests/build-utils.scm:37
source:
+ (test-equal
+   "alist-cons-before"
+   '((a . 1) (x . 42) (b . 2) (c . 3))
+   (alist-cons-before
+ 'b
+ 'x
+ 42
+ '((a . 1) (b . 2) (c . 3
expected-value: ((a . 1) (x . 42) (b . 2) (c . 3))
actual-value: ((a . 1) (x . 42) (b . 2) (c . 3))
result: PASS

test-name: alist-cons-before, reference not found
location: /home/singpolyma/src/guix/tests/build-utils.scm:41
source:
+ (test-equal
+   "alist-cons-before, reference not found"
+   '((a . 1) (b . 2) (c . 3) (x . 42))
+   (alist-cons-before
+ 'z
+ 'x
+ 42
+ '((a . 1) (b . 2) (c . 3
expected-value: ((a . 1) (b . 2) (c . 3) (x . 42))
actual-value: ((a . 1) (b . 2) (c . 3) (x . 42))
result: PASS

test-name: alist-cons-after
location: /home/singpolyma/src/guix/tests/build-utils.scm:45
source:
+ (test-equal
+   "alist-cons-after"
+   '((a . 1) (b . 2) (x . 42) (c . 3))
+   (alist-cons-after
+ 'b
+ 'x
+ 42
+ '((a . 1) (b . 2) (c . 3
expected-value: ((a . 1) (b . 2) (x . 42) (c . 3))
actual-value: ((a . 1) (b . 2) (x . 42) (c . 3))
result: PASS

test-name: alist-cons-after, reference not found
location: /home/singpolyma/src/guix/tests/build-utils.scm:49
source:
+ (test-equal
+   "alist-cons-after, reference not found"
+   '((a . 1) (b . 2) (c . 3) (x . 42))
+   (alist-cons-after
+ 'z
+ 'x
+ 42
+ '((a . 1) (b . 2) (c . 3
expected-value: ((a . 1) (b . 2) (c . 3) (x . 42))
actual-value: ((a . 1) (b . 2) (c . 3) (x . 42))
result: PASS

test-name: alist-replace
location: /home/singpolyma/src/guix/tests/build-utils.scm:53
source:
+ (test-equal
+   "alist-replace"
+   '((a . 1) (b . 77) (c . 3))
+   (alist-replace 'b 77 '((a . 1) (b . 2) (c . 3
expected-value: ((a . 1) (b . 77) (c . 3))
actual-value: ((a . 1) (b . 77) (c . 3))
result: PASS

test-name: alist-replace, key not found
location: /home/singpolyma/src/guix/tests/build-utils.scm:57
source:
+ (test-assert
+   "alist-replace, key not found"
+   (not (false-if-exception
+  (alist-replace 'z 77 '((a . 1) (b . 2) (c . 3))
actual-value: #t
result: PASS

test-name: fold-port-matches
location: /home/singpolyma/src/guix/tests/build-utils.scm:61
source:
+ (test-equal
+   "fold-port-matches"
+   (make-list 3 "Guix")
+   (call-with-input-string
+ "Guix is cool, Guix rocks, and it uses Guile, Guix!"
+ (lambda (port)
+   (fold-port-matches cons '() "Guix" port
expected-value: ("Guix" "Guix" "Guix")
actual-value: ("Guix" "Guix" "Guix")
result: PASS

test-name: fold-port-matches, trickier
location: /home/singpolyma/src/guix/tests/build-utils.scm:67
source:
+ (test-equal
+   "fold-port-matches, trickier"
+   (reverse '("Guix" "guix" "Guix" "guiX" "Guix"))
+   (call-with-input-string
+ "Guix, guix, GuiGuixguiX, Guix"
+ (lambda (port)
+   (fold-port-matches
+ cons
+ '()
+ (list (char-set #\G #\g)
+   (char-set #\u)
+   (char-set #\i)
+   (char-set #\x #\X))
+ port
expected-value: ("Guix" "guiX" "Guix" "guix" "Guix")
actual-value: ("Guix" "guiX" "Guix" "guix" "Guix")
result: PASS

test-name: fold-port-matches, with unmatched chars
location: /home/singpolyma/src/guix/tests/build-utils.scm:78
source:
+ (test-equal
+   "fold-port-matches, with unmatched chars"
+   '("Guix"
+ #\,

Test failures on new build

2021-04-12 Thread Stephen Paul Weber

Trying to get an environment for hacking on Guix going on my new computer.
Installed guix on my Debian stable using guix-install.sh then ran guix pull.
Did a fresh git clone on guix then

guix environment guix --pure
./bootstrap
./configure --localstatedir=/var
make -j24
make -j24 check

mostly works, but I get these failures:

FAIL: tests/guix-git-authenticate.sh
PASS: tests/workers.scm
make[4]: *** [Makefile:5605: tests/derivations.log] Error 1
make[4]: *** Waiting for unfinished jobs
FAIL: tests/build-utils.scm
make[4]: *** [Makefile:5605: tests/grafts.log] Error 1

any thoughts?


signature.asc
Description: PGP signature


Re: Racket packages / build system

2021-01-28 Thread Stephen Paul Weber

Thanks for the notes. I've skimmed through them
and they seem sensible. I'll look at how other
build systems are written as a first step, then
get my hands wet.

Do I open an issue for this


I've recently become interested in this as well.  I pinged cwebber asking for
the best place to start and got shown this thread.  Have you made any progress
in thinking about how to go about this?  Did an issue get created (I don't see
one)?  Any place I can jump in to help out?  Just don't want to start mucking
about and duplicating effort if it's not needed :)


signature.asc
Description: PGP signature