> Confirmed wireless-regdb update unblocks `apt upgrade` and works as expected 
> with the proposed boot-
> manged-by-snapd change. Setting verification to done.


We have two test plans:
a) ubuntu classic
b) ubuntu FDE

Which of the two test plans was verified? And we then still need a
verification for "the other". It was also not specified which ubuntu
release was tested, even though both tags were changed to verification
done.

I'll also note that the second point in the (b) case cannot be easily
done, since there is no boot-managed-by-snapd package version 5 in the
archive, so that can be skipped.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to wireless-regdb in Ubuntu.
https://bugs.launchpad.net/bugs/2096979

Title:
  wireless-regdb update problem at Ubuntu 24.04.1 TPM-backed Full Disk
  Encryption setup

Status in boot-managed-by-snapd package in Ubuntu:
  Confirmed
Status in wireless-regdb package in Ubuntu:
  Fix Released
Status in boot-managed-by-snapd source package in Noble:
  Confirmed
Status in wireless-regdb source package in Noble:
  Fix Committed
Status in boot-managed-by-snapd source package in Oracular:
  Confirmed
Status in wireless-regdb source package in Oracular:
  Fix Committed
Status in boot-managed-by-snapd source package in Plucky:
  Confirmed
Status in wireless-regdb source package in Plucky:
  Fix Released

Bug description:
  I have an Ubuntu 24.04.1 TPM-backed Full Disk Encryption setup,  there
  is a problem with last wireless-regdb update.

  Whenever I try to update the system, I get this error:

  The following packages will be upgraded:
    wireless-regdb
  1 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
  1 not fully installed or removed.
  Need to get 0 B/7.058 B of archives.
  After this operation, 1.024 B of additional disk space will be used.
  Do you want to continue? [Y/n]
  (Reading database ... 131856 files and directories currently installed.)
  Preparing to unpack .../wireless-regdb_2024.07.04-0ubuntu1~24.04.1_all.deb ...
  Unpacking wireless-regdb (2024.07.04-0ubuntu1~24.04.1) over 
(2022.06.06-0ubuntu2) ...
  dpkg: error processing archive 
/var/cache/apt/archives/wireless-regdb_2024.07.04-0ubuntu1~24.04.1_all.deb 
(--unpack):
   unable to create '/lib/firmware/regulatory.db.dpkg-new' (while processing 
'./lib/firmware/regulatory.db'): Read-only file system
  dpkg: error while cleaning up:
   unable to remove newly-extracted version of '/lib/firmware/regulatory.db': 
Read-only file system
  Errors were encountered while processing:
   /var/cache/apt/archives/wireless-regdb_2024.07.04-0ubuntu1~24.04.1_all.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)

  I tried "sudo dpkg --purge --force-remove-reinstreq wireless-regdb" and got 
this error:
  dpkg: warning: overriding problem because --force enabled:
  dpkg: warning: package is in a very bad inconsistent state; you should
   reinstall it before attempting a removal
  (Reading database ... 131856 files and directories currently installed.)
  Removing wireless-regdb (2022.06.06-0ubuntu2) ...
  dpkg: error processing package wireless-regdb (--purge):
   cannot remove '/lib/firmware/regulatory.db.p7s': Read-only file system
  Processing triggers for man-db (2.12.0-4build2) ...
  Errors were encountered while processing:
   wireless-regdb

  I know snap pc-kernel has own firmware on immutable read-only filesystem. 
wireless-regdb package was on the system with no problem.
  How can I uninstall the package? or is this a bug with lastest wireless-regdb 
against snap pc-kernel install?

  [SRU information added by nwager]
  [ Impact ]

   * On FDE+TPM systems, apt tries to update wireless-regdb and fails because 
it can't write files to /lib/firmware
   * wireless-regdb shouldn't be installed on snapd systems like FDE because 
the regulatory  db files are shipped in the kernel snap
   * The fix is to prevent new wireless-regdb updates from installing to 
/lib/firmware by "dpkg-divert"-ing the files in boot-managed-by-snapd, and in 
the future wireless-regdb should be added to the Conflicts of 
boot-managed-by-snapd so future installs don't ship with wireless-regdb. 
Additionally, wireless-regdb will Conflict with earlier versions of 
boot-managed-by-snapd that don't have the divert so it can't attempt to install 
on systems without the safeguard

  [ Test Plan ]

   * Test on Ubuntu classic installs:
     1. Install new wireless-regdb without issues.
     2. Reload wifi drivers
     3. Check that "iw reg get" and "iw reg set" function properly

   * Test on FDE installs:
     1. With boot-managed-by-snapd <= 4, try to install new versions of 
wireless-regdb. This should fail due to the Conflicts clause.
     2. With boot-managed-by-snapd >= 5 (may need to build and install 
yourself, see comments in this thread), try to install new versions of 
wireless-regdb. The install should be successful and the /lib/firmware files 
should be diverted.

  [ Where problems could occur ]

   * Systems without the new boot-managed-by-snapd will not be able to upgrade 
wireless-regdb.
   * snapd systems can still install wireless-regdb, but the package will do 
nothing due to the dpkg-divert

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/boot-managed-by-snapd/+bug/2096979/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to