bug#64593: ‘guix system image’ fails to create image while invoking ‘grub-bios-setup’

2023-07-13 Thread Ludovic Courtès
Hello,

There seems to be a recent regression:

--8<---cut here---start->8---
$ cat mini-os.scm 
(use-modules (gnu))
 
(operating-system
  (host-name "mini-1")
 
  (bootloader (bootloader-configuration 
(bootloader grub-bootloader)
(targets '("/dev/sda"
  (file-systems (cons (file-system 
(device (file-system-label "my-root"))
(mount-point "/")
(type "ext4")) %base-file-systems))
  (kernel-arguments (list "console=tty0 console=ttyS0,115200")))
$ guix system image mini-os.scm

[...]

building /gnu/store/99wmrm4ali4f4pnii21rlhjvpfds762j-boot.drv...
building /gnu/store/6gra5cyiilyv3dm3jc7yhkga0kygblhn-system.drv...
building /gnu/store/xf50b8cm7ida4rgxp2q69vp2jhsl3kzp-grub.cfg.drv...
building /gnu/store/69nhv7idhf1i7a3j8pdchkdd5jj5fl7l-partition.img.drv...
building /gnu/store/74sxq3x9gwq0wlwqrrs0lqkr0n14p1kd-partition.img.drv...
building /gnu/store/dnqxyq1x7fd5131rby4z46rx8wkzw1k6-genimage.cfg.drv...
building /gnu/store/rvq9sqk55qwk27j8m3gjhba7f4zjid2k-disk-image.drv...
-builder for `/gnu/store/rvq9sqk55qwk27j8m3gjhba7f4zjid2k-disk-image.drv' 
failed with exit code 1
build of /gnu/store/rvq9sqk55qwk27j8m3gjhba7f4zjid2k-disk-image.drv failed
View build log at 
'/var/log/guix/drvs/rv/q9sqk55qwk27j8m3gjhba7f4zjid2k-disk-image.drv.gz'.
guix system: error: build of 
`/gnu/store/rvq9sqk55qwk27j8m3gjhba7f4zjid2k-disk-image.drv' failed
$ zcat /var/log/guix/drvs/rv/q9sqk55qwk27j8m3gjhba7f4zjid2k-disk-image.drv.gz | 
tail -20
INFO: hdimage(image): writing GPT
INFO: hdimage(image): writing protective MBR
INFO: hdimage(image): writing MBR
/gnu/store/0f4z2i472rfd3qphl82j7jm49qgm672d-grub-2.06/sbin/grub-bios-setup: 
error: cannot find a device for . (is /dev mounted?).
Backtrace:
   2 (primitive-load "/gnu/store/i6khnb475pxagfvjwnhi09z07n5?")
In ice-9/eval.scm:
619:8  1 (_ #(# ("/gn?" ?) ?))
In ./guix/build/utils.scm:
812:6  0 (invoke "/gnu/store/0f4z2i472rfd3qphl82j7jm49qgm672d-g?" ?)

./guix/build/utils.scm:812:6: In procedure invoke:
ERROR:
  1. &invoke-error:
  program: 
"/gnu/store/0f4z2i472rfd3qphl82j7jm49qgm672d-grub-2.06/sbin/grub-bios-setup"
  arguments: ("-m" "device.map" "-r" "hd0,msdos2" "-d" "." "images/image")
  exit-status: 1
  term-signal: #f
  stop-signal: #f
environment variable `PATH' set to 
`/gnu/store/n31fw25l5yxq17x52mm7jjbvld58f8zd-genimage-15-1.ec44ae0/bin:/gnu/store/yr39rh6wihd1wv6gzf7w4w687dwzf3vb-coreutils-9.1/bin:/gnu/store/016lrymzc8a1rpx2p1app1awp2w2wlpk-findutils-4.9.0/bin:/gnu/store/nl2ddwgdw4mzghv6kzl6akg1s7p7yik8-qemu-minimal-7.2.1/bin'
$ guix describe
Generation 269  Jul 10 2023 00:17:51(current)
  guix d2cf631
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: d2cf63165119fc78c9f52abce2ce66af23e49243
--8<---cut here---end--->8---

Conversely, it works with a commit from two weeks ago:

--8<---cut here---start->8---
$ guix time-machine --commit=269cfe341f242c2b5f37774cb9b1e17d9aa68e2c -- system 
image mini-os.scm

[...]

building /gnu/store/k4r5d09slzl70sn4zbl0gpnzn1mb5ksy-system.drv...
building /gnu/store/13z2cyi9n4isyrw5ashhcazy4ps8qffy-grub.cfg.drv...
building /gnu/store/7sx021qpby1p57fqv5n5jkfz20qi9933-partition.img.drv...
building /gnu/store/vw5n9q3z6k59mcsw7z4kb6ckp9bbc8nh-partition.img.drv...
building /gnu/store/hq7lw7qm3fbl4fhlmqxxp9sw1v8h3h3m-genimage.cfg.drv...
building /gnu/store/dil3qjisdkprw20kybr1bxmp6sid7g2v-disk-image.drv...
/gnu/store/5lsi1wp59vwnk8rk2124y14p9r2fr9yc-disk-image
--8<---cut here---end--->8---

A relevant difference seems to be GPT vs. MBR (the latter works, the
former breaks):

--8<---cut here---start->8---
$ cat $(guix build 
/gnu/store/hq7lw7qm3fbl4fhlmqxxp9sw1v8h3h3m-genimage.cfg.drv) |head -3
image image {
hdimage {
partition-table-type = "mbr"
$ cat $(guix build 
/gnu/store/dnqxyq1x7fd5131rby4z46rx8wkzw1k6-genimage.cfg.drv) |head -3
image image {
hdimage {
partition-table-type = "gpt"
--8<---cut here---end--->8---

The culprit might be 209204e23b39af09e0ea92540b6fa00a60e6a0ae, from
.

Josselin, Sergey, WDYT?

Ludo’.





bug#64598: Test fail: tests/store-roots.scm

2023-07-13 Thread wolf
Hi,

I am experiencing a test failure on a Guix build from the git in the
tests/store-roots.scm test file.  Excerpt (whole log file attached):

test-name: gc-roots, initial
location: /home/wolf/devel/guix/tests/store-roots.scm:33
source:
+ (test-equal
+   "gc-roots, initial"
+   (list (string-append %state-directory "/profiles"))
+   (begin
+ (delete-file-recursively
+   (string-append %state-directory "/profiles"))
+ (gc-roots)))
expected-value: ("/home/wolf/devel/guix/test-tmp/var/15530/profiles")
actual-value: #f
actual-error:
+ (system-error
+   "lstat"
+   "~A: ~S"
+   ("No such file or directory"
+"/home/wolf/devel/guix/test-tmp/var/15530/profiles")
+   (2))
result: FAIL

Commit: 3b524cde7115a6e89a438c1fd230093e6f30442f

Build was done inside guix shell -D guix --pure.

W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
test-name: gc-roots, initial
location: /home/wolf/devel/guix/tests/store-roots.scm:33
source:
+ (test-equal
+   "gc-roots, initial"
+   (list (string-append %state-directory "/profiles"))
+   (begin
+ (delete-file-recursively
+   (string-append %state-directory "/profiles"))
+ (gc-roots)))
expected-value: ("/home/wolf/devel/guix/test-tmp/var/15530/profiles")
actual-value: #f
actual-error:
+ (system-error
+   "lstat"
+   "~A: ~S"
+   ("No such file or directory"
+"/home/wolf/devel/guix/test-tmp/var/15530/profiles")
+   (2))
result: FAIL

test-name: gc-roots, regular root
location: /home/wolf/devel/guix/tests/store-roots.scm:44
source:
+ (test-assert
+   "gc-roots, regular root"
+   (let* ((item (add-text-to-store
+  %store
+  "something"
+  (random-text)))
+  (root (string-append
+  %gc-roots-directory
+  "/test-gc-root")))
+ (symlink item root)
+ (let ((result (member root (gc-roots
+   (delete-file root)
+   result)))
actual-value: ("/home/wolf/devel/guix/test-tmp/var/15530/gcroots/test-gc-root")
result: PASS

test-name: gc-roots, indirect root
location: /home/wolf/devel/guix/tests/store-roots.scm:53
source:
+ (test-assert
+   "gc-roots, indirect root"
+   (call-with-temporary-directory
+ (lambda (directory)
+   (let* ((item (add-text-to-store
+  %store
+  "something"
+  (random-text)))
+  (root (string-append directory "/gc-root")))
+ (symlink item root)
+ (add-indirect-root %store root)
+ (let ((result (member root (gc-roots
+   (delete-file root)
+   result)
actual-value: ("/tmp/guix-directory.YyukEN/gc-root" 
"/home/wolf/devel/guix/test-tmp/var/15530/profiles")
result: PASS

random seed for tests: 1689185210


signature.asc
Description: PGP signature


bug#64505: bug report

2023-07-13 Thread Josselin Poiret via Bug reports for GNU Guix
Hi,

Josselin Poiret  writes:

> You seem to have a quite old version of Guix, along with Guile 2.x, and
> there raise-exception doesn't exist, but it is indirectly being used
> when building Guix.
>
> You can either try to pull in small increments (I think 1.1 -> 1.2 ->
> 1.3 -> master should do it) for now, but we should also fix this use of
> raise-exception: it should be `raise` from srfi-34/35 instead.

I've pushed a fix for this as d17879cd0dec60ea7490632910257890f207d6cb.

Preemptively closing, feel free to re-open if this doesn't work.

Best,
-- 
Josselin Poiret


signature.asc
Description: PGP signature


bug#63230: ‘guix shell’ cache is system-independent

2023-07-13 Thread Ludovic Courtès
Ludovic Courtès  skribis:

> I just noticed that the ‘guix shell’ cache doesn’t take the system type
> into account, which is problematic:

Fixed in 9c513303156b418567b9d2cde9f8df66190051ac!

Ludo’.





bug#64605: HandBrake 1.5.1 hangs on startup due libQt5Qml

2023-07-13 Thread Distopico Vegan

HandBrake 1.5.1 hangs on startup and `dmesg` show the following error


```
 QQmlThread[]: segfault at 0 ip 000 sp ... error 4 in 
libQt5Qml.so.5.15.8
```
After some research I found a similar issues on NixOS:

- https://github.com/NixOS/nixpkgs/issues/32577
- https://github.com/NixOS/nixpkgs/issues/177720

and a solution: https://github.com/NixOS/nixpkgs/pull/197010

Looks like the issue is related with QML disk cache, and after test
ruining *handbrake* with `QML_DISABLE_DISK_CACHE=1` works fine

```
QML_DISABLE_DISK_CACHE=1 ghb
```


signature.asc
Description: PGP signature