Comment 6 for bug 1913421

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Build in PPA complete, testing ...

$ ll /var/run/qemu/
ls: cannot access '/var/run/qemu/': No such file or directory
$ sudo apt install --reinstall qemu-block-extra
$ ls -laFd /var/run/qemu; ls -laF /var/run/qemu; ls -laF /var/run/qemu/*
drwxr-xr-x 3 root root 60 Jan 27 20:02 /var/run/qemu/
total 0
drwxr-xr-x 3 root root 60 Jan 27 20:02 ./
drwxr-xr-x 32 root root 960 Jan 27 20:02 ../
drwxr-xr-x 2 root root 120 Jan 27 20:02 Debian_1_5.2+dfsg-3ubuntu1/
total 164
drwxr-xr-x 2 root root 120 Jan 27 20:02 ./
drwxr-xr-x 3 root root 60 Jan 27 20:02 ../
-rw-r--r-- 1 root root 38632 Jan 5 11:43 block-curl.so
-rw-r--r-- 1 root root 45160 Jan 5 11:43 block-iscsi.so
-rw-r--r-- 1 root root 35912 Jan 5 11:43 block-rbd.so
-rw-r--r-- 1 root root 40136 Jan 5 11:43 block-ssh.so

But noexec:
mount | grep run
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=203112k,mode=755)

On install the unit is enabled (postinst has the dusual dh_installsystemd snippet), but sadly it stays disabled. Even after reboot, despite the enabled config it stayed disabled.

To be clear once started (manually for now) it works fine
$ sudo systemctl start run-qemu.mount
$ systemctl status run-qemu.mount
● run-qemu.mount - Allow noexec to for late qemu module load after upgrades
     Loaded: loaded (/lib/systemd/system/run-qemu.mount; disabled; vendor preset: enabled)
     Active: active (mounted) since Wed 2021-01-27 20:09:45 UTC; 1s ago
      Where: /run/qemu
       What: tmpfs
      Tasks: 0 (limit: 2338)
     Memory: 24.0K
     CGroup: /system.slice/run-qemu.mount

Jan 27 20:09:45 h-qemu-modules systemd[1]: Mounting Allow noexec to for late qemu module load after upgrades...
Jan 27 20:09:45 h-qemu-modules systemd[1]: Mounted Allow noexec to for late qemu module load after upgrades.

$ mount | grep run
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=203112k,mode=755)
tmpfs on /run/qemu type tmpfs (rw,nosuid,nodev,relatime,mode=755)

And a reinstall now places files in there as it did before:

$ ls -laFd /var/run/qemu; ls -laF /var/run/qemu; ls -laF /var/run/qemu/*
drwxr-xr-x 3 root root 60 Jan 27 20:11 /var/run/qemu/
total 0
drwxr-xr-x 3 root root 60 Jan 27 20:11 ./
drwxr-xr-x 30 root root 880 Jan 27 20:09 ../
drwxr-xr-x 2 root root 120 Jan 27 20:11 Debian_1_5.2+dfsg-3ubuntu2~ppa2/
total 164
drwxr-xr-x 2 root root 120 Jan 27 20:11 ./
drwxr-xr-x 3 root root 60 Jan 27 20:11 ../
-rw-r--r-- 1 root root 38632 Jan 27 12:45 block-curl.so
-rw-r--r-- 1 root root 45160 Jan 27 12:45 block-iscsi.so
-rw-r--r-- 1 root root 35912 Jan 27 12:45 block-rbd.so
-rw-r--r-- 1 root root 40136 Jan 27 12:45 block-ssh.so

Seems I'm cursed with dh_installsystemd magice recently, maybe the .mount behaves differently in dh*. In any case the postinst really has no start section for it, so it can't work yet.