On Thu, 11 Jan 2024 00:45:50 +0100 Johannes Schauer Marin Rodrigues wrote:

[...]
> Interesting! I'm unable to reproduce either of these issues and I'm also
> puzzled why you get this "permission denied" error. On my system, I'm able run
> your command with the default (in /tmp) as well as in /dev/shm. Here is the
> free space each:
> 
>     $ df --si /tmp /dev/shm
>     Filesystem      Size  Used Avail Use% Mounted on
>     tmpfs           8.6G  4.1k  8.6G   1% /tmp
>     tmpfs           2.0G  418k  2.0G   1% /dev/shm

So 2.0 GB should be enough.
And yet, it fails for me with 8.2 GB available on /dev/shm ...  :-(

> 
> Maybe something is mounted in a funny way? Both my /tmp and my /dev/shm are
> tmpfs. The former is mounted with
> rw,nosuid,nodev,relatime,size=8388608k,inode64 and the latter with
> rw,nosuid,nodev,inode64.

  $ mount | grep '/tmp\|shm'
  tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
  /dev/md3 on /tmp type ext4 (rw,relatime,discard)

> 
> I doubt that it fails for lack of system memory unless you have less than 3.7
> GB of RAM.

  $ free --giga
                 total        used        free      shared  buff/cache   
available
  Mem:              16           2          12           0           2          
14
  Swap:             17           0          17

> 
> Maybe permissions are somehow whacky? Both my /tmp and my /dev/shm are set to
> drwxrwxrwt (so there is a sticky bit set) and owned by root:root.

  $ ls -ld /tmp /dev/shm
  drwxrwxrwt  3 root root  200 Jan 11 08:25 /dev/shm
  drwxrwxrwt 13 root root 4096 Jan 11 08:36 /tmp

> 
> What happens with other locations for TMPDIR?

Which other locations?
I cannot use anything within my home directory, as you may recall from
our past [discussions]

[discussions]: <https://bugs.debian.org/944485#216>

And indeed, anything within my home directory is still unusable:

  $ cd ~/Downloads
  $ mkdir TEMP
  $ TMPDIR=./TEMP mmdebstrap-autopkgtest-build-qemu \
                  --boot=efi sid sid_amd64.img
  [...]
  E: cannot create /home/$USER/Downloads: Permission denied; cannot create 
/home/$USER/Downloads/TEMP: Permission denied; cannot create 
/home/$USER/Downloads/TEMP/mmdebstrap.XSbRetZNZV: Permission denied; cannot 
create /home/$USER/Downloads/TEMP/mmdebstrap.XSbRetZNZV//etc: Permission 
denied; cannot create 
/home/$USER/Downloads/TEMP/mmdebstrap.XSbRetZNZV//etc/apt: Permission denied; 
cannot create 
/home/$USER/Downloads/TEMP/mmdebstrap.XSbRetZNZV//etc/apt/apt.conf.d: 
Permission denied
  W: hooklistener errored out: E: received eof on socket
  
  I: main() received signal PIPE: waiting for setup...
  I: removing tempdir /home/$USER/Downloads/TEMP/mmdebstrap.XSbRetZNZV...
  env: cannot change directory to 
'/home/$USER/Downloads/TEMP/mmdebstrap.XSbRetZNZV': Permission denied
  E: rm failed: 32000
  E: remove_tree failed
  mmdebstrap failed


So, what's left?!?
I think /dev/shm is the only possible choice (without root privileges).

> 
> > By the way, the old script that used guestfish (with all its limitations)
> > was able to create a QEMU image in .qcow2 format and my /dev/shm was
> > enough for it to work correctly.
> 
> It should be enough. Your /dev/shm is 8G large and it works with my 2G.
> 
> > Why does the current mmdebstrap-autopkgtest-build-qemu create a QEMU
> > image in .img format? Isn't the .qcow2 format better?
> 
> Maybe. It's currently .img because it's easier to debug stuff and use kpartx
> with it without having to extract it first. :)

Do I understand correctly that you intend to switch to .qcow2 in the future?
Or otherwise, what's your plan?

> 
> > Please clarify and/or improve mmdebstrap-autopkgtest-build-qemu .
> > Thanks for your time!
> 
> Thanks for your bug! Lets hope we get to the bottom of this.

You're welcome.

Looking forward to hearing back from you!


-- 
 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

Attachment: pgpCrk8PurQoy.pgp
Description: PGP signature

Reply via email to