Bug#1061816: mmdebstrap-autopkgtest-build-qemu VM image cannot be updated with sbuild-qemu-update

2024-03-29 Thread Francesco Poli
On Thu, 28 Mar 2024 17:50:34 +0100 Christian Kastner wrote:

[...]
> Though if I understand #1061816 correctly, then this should probably be
> a separate bug, right? (Wanted to check before I clone)

Why?

I unarchived and reopened this bug report, since I found another
reason why sbuild-qemu-update cannot update a VM image created with
mmdebstrap-autopkgtest-build-qemu.

I think this bug report can be closed, once sbuild-qemu-update is able
to update such a VM image.
I don't think there's any need to clone any bug report here...


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
. Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE


pgptijtSQz_7B.pgp
Description: PGP signature


Bug#1061816: mmdebstrap-autopkgtest-build-qemu VM image cannot be updated with sbuild-qemu-update

2024-03-29 Thread Francesco Poli
On Thu, 28 Mar 2024 10:05:53 +0100 Johannes Schauer Marin Rodrigues wrote:

[...]
> Could you temporarily add a symlink from OVMF_CODE.fd to OVMF_CODE_4M.fd and
> check if it still works?

Well, apparently it works:

  # ln -s /usr/share/OVMF/OVMF_CODE_4M.fd /usr/share/OVMF/OVMF_CODE.fd
  # exit
  $ sbuild-qemu-update --boot=efi ~/var/cache/sbuild/sid-amd64.img
  qemu-system-x86_64 -enable-kvm -drive 
if=pflash,format=raw,unit=0,read-only=on,file=/usr/share/OVMF/OVMF_CODE.fd 
-object rng-random,filename=/dev/urandom,id=rng0 -device 
virtio-rng-pci,rng=rng0,id=rng-device0 -device virtio-serial -nic 
user,model=virtio -m 1024 -smp 1 -nographic 
/home/frx/var/cache/sbuild/sid-amd64.img
  root
  Linux host 6.7.9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.7.9-2 (2024-03-13) 
x86_64
  
  The programs included with the Debian GNU/Linux system are free software;
  the exact distribution terms for each program are described in the
  individual files in /usr/share/doc/*/copyright.
  
  Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
  permitted by applicable law.
  root@host:~# DEBIAN_FRONTEND=noninteractive apt-get --quiet update
  DEBIAN_FRONTEND=noninteractive apt-get --quiet update
  Get:1 http://deb.debian.org/debian sid InRelease [198 kB]
  [...]
  DEBIAN_FRONTEND=noninteractive apt-get --quiet --assume-yes autoremove
  Reading package lists...
  Building dependency tree...
  Reading state information...
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  root@host:~# sync
  sync
  root@host:~# sleep 1
  sleep 1
  root@host:~# shutdown -h now



-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
. Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE


pgp0xEUTcoqGC.pgp
Description: PGP signature


Bug#1061816: mmdebstrap-autopkgtest-build-qemu VM image cannot be updated with sbuild-qemu-update

2024-03-28 Thread Christian Kastner
Hi josch,

On 2024-03-28 11:28, Johannes Schauer Marin Rodrigues wrote:
> I think sbuild-qemu-boot and sbuild-qemu-update should do the same as
> autopkgtest did here:
> 
> https://salsa.debian.org/ci-team/autopkgtest/-/commit/7a4954ded0f24221ac34ca0aaf10f3f9b083afa2

Thanks for pointing this out! Applied (though stupidly, with two commits.)

Though if I understand #1061816 correctly, then this should probably be
a separate bug, right? (Wanted to check before I clone)

Best,
Christian



Bug#1061816: mmdebstrap-autopkgtest-build-qemu VM image cannot be updated with sbuild-qemu-update

2024-03-28 Thread Johannes Schauer Marin Rodrigues
Hi Christian,

Quoting Johannes Schauer Marin Rodrigues (2024-03-28 10:05:53)
> Christian, can you give this a try as well?

I think sbuild-qemu-boot and sbuild-qemu-update should do the same as
autopkgtest did here:

https://salsa.debian.org/ci-team/autopkgtest/-/commit/7a4954ded0f24221ac34ca0aaf10f3f9b083afa2

Thanks!

cheers, josch

signature.asc
Description: signature


Bug#1061816: mmdebstrap-autopkgtest-build-qemu VM image cannot be updated with sbuild-qemu-update

2024-03-28 Thread Johannes Schauer Marin Rodrigues
Hi,

Quoting Francesco Poli (2024-03-28 09:40:27)
> > But your system does not have /usr/share/OVMF/OVMF_CODE.fd?
> Where should it be?

it's from the package ovmf.

> Debian package [search says] it should be in package 'ovmf'.  However, the
> [file list] seems to disagree...
> 
> [search says]: 
> 
> [file list]: 

It's in bookworm but not in trixie:

https://packages.debian.org/bookworm/all/ovmf/filelist

This was changed in edk2 (= 2023.11-2), see the corresponding NEWS.Debian:

$ cat /usr/share/doc/ovmf/NEWS.Debian 
edk2 (2023.11-2) unstable; urgency=medium

  The 2MB ovmf pflash images, OVMF_CODE.*.fd and OVMF_VARS.*.fd, have now
  been removed. Users of the 2MB pflash images should migrate to their 4MB
  image counterparts:

OVMF_CODE.fd -> OVMF_CODE_4M.fd
OVMF_CODE.ms.fd  -> OVMF_CODE_4M.ms.fd
OVMF_CODE.secboot.fd -> OVMF_CODE_4M.secboot.fd
OVMF_VARS.fd -> OVMF_VARS_4M.fd
OVMF_VARS.ms.fd  -> OVMF_VARS_4M.ms.fd

  2MB VAR images are not compatible with 4MB CODE images. Users must
  migrate both CODE and VARS images simultaneously.

  A migration guide is provided at:
/usr/share/doc/ovmf/howto-2M-to-4M-migration.md.gz

 -- dann frazier   Wed, 27 Dec 2023 10:15:33 -0700

Could you temporarily add a symlink from OVMF_CODE.fd to OVMF_CODE_4M.fd and
check if it still works?

Christian, can you give this a try as well?

Thanks!

cheers, josch

signature.asc
Description: signature


Bug#1061816: mmdebstrap-autopkgtest-build-qemu VM image cannot be updated with sbuild-qemu-update

2024-03-28 Thread Francesco Poli
On Thu, 28 Mar 2024 09:32:01 +0100 Johannes Schauer Marin Rodrigues wrote:

> On 2024-03-28 08:26, Francesco Poli wrote:
[...]
> >   before (last 100 chars): "/share/OVMF/OVMF_CODE.fd: Could not open
> > '/usr/share/OVMF/OVMF_CODE.fd': No such file or directory\r\n"
> 
> But your system does not have /usr/share/OVMF/OVMF_CODE.fd?

Where should it be?

Debian package [search says] it should be in package 'ovmf'.
However, the [file list] seems to disagree...

[search says]: 

[file list]: 

Maybe it's a dynamically created symlink or something?

I have package 'ovmf' installed:

  $ apt policy ovmf
  ovmf:
Installed: 2024.02-2
Candidate: 2024.02-2
Version table:
   *** 2024.02-2 800
  800 http://deb.debian.org/debian testing/main amd64 Packages
  500 http://deb.debian.org/debian unstable/main amd64 Packages
  100 /var/lib/dpkg/status

But not the file under consideration:

  $ dpkg -L ovmf | grep -c OVMF_CODE.fd
  0
  $ ls /usr/share/OVMF/OVMF_CODE.fd
  ls: cannot access '/usr/share/OVMF/OVMF_CODE.fd': No such file or directory




-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
. Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE


pgp5GXHGA7jXR.pgp
Description: PGP signature


Bug#1061816: mmdebstrap-autopkgtest-build-qemu VM image cannot be updated with sbuild-qemu-update

2024-03-28 Thread Johannes Schauer Marin Rodrigues

On 2024-03-28 08:26, Francesco Poli wrote:

  $ sbuild-qemu-update --boot=efi \
  ~/var/cache/sbuild/sid-amd64.img 1> update.out 2> update.err


You added --boot=efi, good!


  before (last 100 chars): "/share/OVMF/OVMF_CODE.fd: Could not open
'/usr/share/OVMF/OVMF_CODE.fd': No such file or directory\r\n"


But your system does not have /usr/share/OVMF/OVMF_CODE.fd?



Bug#1061816: mmdebstrap-autopkgtest-build-qemu VM image cannot be updated with sbuild-qemu-update

2024-03-28 Thread Francesco Poli
Control: found -1 sbuild/0.85.6

Hello,
I finally got around to testing this new feature.

But it seems to fail:

  $ mkdir -p ~/var/cache/sbuild/
  $ cd /dev/shm
  $ TMPDIR=/dev/shm mmdebstrap-autopkgtest-build-qemu \
--size=25G --boot=efi sid sid-amd64.img
  $ mv -i sid-amd64.img ~/var/cache/sbuild/

  $ sbuild-qemu-update --boot=efi \
  ~/var/cache/sbuild/sid-amd64.img 1> update.out 2> update.err
  $ echo $?
  1
  $ cat update.out 
  qemu-system-x86_64 -enable-kvm -drive 
if=pflash,format=raw,unit=0,read-only=on,file=/usr/share/OVMF/OVMF_CODE.fd 
-object rng-random,filename=/dev/urandom,id=rng0 -device 
virtio-rng-pci,rng=rng0,id=rng-device0 -device virtio-serial -nic 
user,model=virtio -m 1024 -smp 1 -nographic 
/home/${USER}/var/cache/sbuild/sid-amd64.img
  $ cat update.err
  Traceback (most recent call last):
File "/usr/bin/sbuild-qemu-update", line 282, in 
  main()
File "/usr/bin/sbuild-qemu-update", line 275, in main
  update_interaction(child, parsed_args.quiet)
File "/usr/bin/sbuild-qemu-update", line 166, in update_interaction
  child.expect('host login: ')
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 354, in 
expect
  return self.expect_list(compiled_pattern_list,
 ^^^
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 383, in 
expect_list
  return exp.expect_loop(timeout)
 
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 179, in 
expect_loop
  return self.eof(e)
 ^^^
File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 122, in eof
  raise exc
  pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
  
  command: /usr/bin/qemu-system-x86_64
  args: [b'/usr/bin/qemu-system-x86_64', b'-enable-kvm', b'-drive', 
b'if=pflash,format=raw,unit=0,read-only=on,file=/usr/share/OVMF/OVMF_CODE.fd', 
b'-object', b'rng-random,filename=/dev/urandom,id=rng0', b'-device', 
b'virtio-rng-pci,rng=rng0,id=rng-device0', b'-device', b'virtio-serial', 
b'-nic', b'user,model=virtio', b'-m', b'1024', b'-smp', b'1', b'-nographic', 
b'/home/${USER}/var/cache/sbuild/sid-amd64.img']
  buffer (last 100 chars): ''
  before (last 100 chars): "/share/OVMF/OVMF_CODE.fd: Could not open 
'/usr/share/OVMF/OVMF_CODE.fd': No such file or directory\r\n"
  after: 
  match: None
  match_index: None
  exitstatus: None
  flag_eof: True
  pid: 99474
  child_fd: 5
  closed: False
  timeout: 600
  delimiter: 
  logfile: None
  logfile_read: None
  logfile_send: None
  maxread: 2000
  ignorecase: False
  searchwindowsize: None
  delaybeforesend: 0.05
  delayafterclose: 0.1
  delayafterterminate: 0.1
  searcher: searcher_re:
  0: re.compile('host login: ')


What's wrong? What did I fail to understand?


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
. Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE


pgpCUzMLY9N0H.pgp
Description: PGP signature