Diverting the real script (`/sbin/lxd`) instead of the `usrmerged`
symlink (/usr/sbin/lxd`) one works:

```
root@c1:~# dpkg-divert --add --divert /sbin/lxd.REAL --rename /sbin/lxd
Adding 'local diversion of /sbin/lxd to /sbin/lxd.REAL'
root@c1:~# ln -s /bin/true /sbin/lxd
root@c1:~# ll /sbin/lxd* /usr/sbin/lxd*
lrwxrwxrwx 1 root root   9 May 22 14:27 /sbin/lxd -> /bin/true*
-rwxr-xr-x 1 root root 372 Jan 11 16:58 /sbin/lxd.REAL*
lrwxrwxrwx 1 root root   9 May 22 14:27 /usr/sbin/lxd -> /bin/true*
-rwxr-xr-x 1 root root 372 Jan 11 16:58 /usr/sbin/lxd.REAL*
root@c1:~# sed -i 's/noble-backports/noble-proposed/' 
/etc/apt/sources.list.d/ubuntu.sources
root@c1:~# apt-get update -qq
root@c1:~# apt-get install lxd-installer -t noble-proposed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be upgraded:
  lxd-installer
1 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
Need to get 3926 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble-proposed/main amd64 lxd-installer 
all 4ubuntu0.1 [3926 B]
Fetched 3926 B in 0s (107 kB/s)         
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 12554 files and directories currently installed.)
Preparing to unpack .../lxd-installer_4ubuntu0.1_all.deb ...
Unpacking lxd-installer (4ubuntu0.1) over (4) ...
Setting up lxd-installer (4ubuntu0.1) ...
root@c1:~# ll /sbin/lxd* /usr/sbin/lxd*
lrwxrwxrwx 1 root root   9 May 22 14:27 /sbin/lxd -> /bin/true*
-rwxr-xr-x 1 root root 589 May  7 23:33 /sbin/lxd.REAL*
lrwxrwxrwx 1 root root   9 May 22 14:27 /usr/sbin/lxd -> /bin/true*
-rwxr-xr-x 1 root root 589 May  7 23:33 /usr/sbin/lxd.REAL*
root@c1:~# lxd --version
true (GNU coreutils) 9.4
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Jim Meyering.
```

So it seems this issue was not visible before because `lxd-installer`
was not upgraded.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2061017

Title:
  lxd-installer: permission error not handled and lxd snap not installed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxd-installer/+bug/2061017/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to