[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1012601: marked as done (wireless-regdb: alternative broken on debian-installer install)



Your message dated Wed, 29 Jun 2022 23:32:25 +0000
with message-id <E1o6hAX-0006WK-VJ@fasolo.debian.org>
and subject line Bug#1012601: fixed in wireless-regdb 2022.04.08-2
has caused the Debian Bug report #1012601,
regarding wireless-regdb: alternative broken on debian-installer install
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1012601: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012601
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: wireless-regdb
Version: 2021.08.28-1
Severity: important
Tags: d-i
X-Debbugs-Cc: debian-boot@lists.debian.org

Dear Maintainer,

I've noticed after installing wireless-regdb on a fresh install the
package-provided file is not actually used (older version from
wireless-regdb-udeb is used), and update-alternative to select the
upstream version of the regdb also fails


(debian-boot@l.d.o: sorry for the explicit cc, I'm not really sure what
the d-i tag implies)


The problem is that the installer copies /lib/firmware/regulatory.db and
/lib/firmware/regulatory.db.p7s from the installer, and wireless-regdb
postinstall script does not overwrite these if they exist.

This can be reproduced in a minimal container:
root@00e7025e1eeb:/# mkdir /lib/firmware
root@00e7025e1eeb:/# touch /lib/firmware/regulatory.db
root@00e7025e1eeb:/# apt install -y wireless-regdb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  crda
The following NEW packages will be installed:
  wireless-regdb
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.9 kB of archives.
After this operation, 42.0 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 wireless-regdb all 2020.04.29-2 [13.9 kB]
Fetched 13.9 kB in 0s (222 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package wireless-regdb.
(Reading database ... 6662 files and directories currently installed.)
Preparing to unpack .../wireless-regdb_2020.04.29-2_all.deb ...
Unpacking wireless-regdb (2020.04.29-2) ...
Setting up wireless-regdb (2020.04.29-2) ...
update-alternatives: using /lib/firmware/regulatory.db-debian to provide /lib/firmware/regulatory.db (regulatory.db) in auto mode
update-alternatives: warning: not replacing /lib/firmware/regulatory.db with a link
update-alternatives: warning: forcing reinstallation of alternative /lib/firmware/regulatory.db-debian because link group regulatory.db is broken
update-alternatives: warning: not replacing /lib/firmware/regulatory.db with a link
root@00e7025e1eeb:/# ls -l /lib/firmware/regulatory.db*
-rw-r--r-- 1 root root    0 Jun 10 00:21 /lib/firmware/regulatory.db
-rw-r--r-- 1 root root 3764 Jun 30  2020 /lib/firmware/regulatory.db-debian
-rw-r--r-- 1 root root 3764 Jun 30  2020 /lib/firmware/regulatory.db-upstream
lrwxrwxrwx 1 root root   35 Jun 10 00:21 /lib/firmware/regulatory.db.p7s -> /etc/alternatives/regulatory.db.p7s
-rw-r--r-- 1 root root 1249 Jun 30  2020 /lib/firmware/regulatory.db.p7s-debian
-rw-r--r-- 1 root root 1182 Jun 30  2020 /lib/firmware/regulatory.db.p7s-upstream
root@00e7025e1eeb:/# update-alternatives --config regulatory.db
There are 2 choices for the alternative regulatory.db (providing /lib/firmware/regulatory.db).

  Selection    Path                                  Priority   Status
------------------------------------------------------------
  0            /lib/firmware/regulatory.db-debian     100       auto mode
* 1            /lib/firmware/regulatory.db-debian     100       manual mode
  2            /lib/firmware/regulatory.db-upstream   50        manual mode

Press <enter> to keep the current choice[*], or type selection number:
update-alternatives: warning: forcing reinstallation of alternative /lib/firmware/regulatory.db-debian because link group regulatory.db is broken
update-alternatives: warning: not replacing /lib/firmware/regulatory.db with a link
root@00e7025e1eeb:/# ls -l /lib/firmware/regulatory.db
-rw-r--r-- 1 root root    0 Jun 10 00:21 /lib/firmware/regulatory.db


Running with --force removes the original file with a warning and works:
root@00e7025e1eeb:/# update-alternatives --force --config regulatory.db
There are 2 choices for the alternative regulatory.db (providing /lib/firmware/regulatory.db).

  Selection    Path                                  Priority   Status
------------------------------------------------------------
  0            /lib/firmware/regulatory.db-debian     100       auto mode
* 1            /lib/firmware/regulatory.db-debian     100       manual mode
  2            /lib/firmware/regulatory.db-upstream   50        manual mode

Press <enter> to keep the current choice[*], or type selection number:
update-alternatives: warning: forcing reinstallation of alternative /lib/firmware/regulatory.db-debian because link group regulatory.db is broken
root@00e7025e1eeb:/# ls -l /lib/firmware/regulatory.db
lrwxrwxrwx 1 root root 31 Jun 10 00:23 /lib/firmware/regulatory.db -> /etc/alternatives/regulatory.db




The original cause for this is that deian-installer copies the files
because of the combinaison of these two:
https://salsa.debian.org/installer-team/debian-installer/-/blob/master/build/pkg-lists/base#L34
 - wireless-regdb-udeb contains the firmwares as regular files
https://salsa.debian.org/installer-team/hw-detect/-/blob/master/hw-detect.post-base-installer.d/50install-firmware#L14
 - it copies /lib/firmware content in base post-install step

the udeb regdb is also slightly obsolete, I'm not sure why it was needed
in the first place but it might be possible to use the normal package
instead?

That won't fix existing systems though.
If wireless-regdb had been owning the files in dpkg it would be fair
game to just overwrite the files (dpkg overwrites any untracked file
when installing a package that provides the path).

Would it make sense to include regulatory.db -> regulatory.db-debian
(+same for p7s) links in the package itself, so package installation
overwrites these and the post update-alternative step fixes it?
It seems to fix "broken" links without force in this case.
(or push real links to /etc/alternatives/regulatory.db would work too)


Thanks,
-- 
Dominique Martinet

--- End Message ---
--- Begin Message ---
Source: wireless-regdb
Source-Version: 2022.04.08-2
Done: Ben Hutchings <benh@debian.org>

We believe that the bug you reported is fixed in the latest version of
wireless-regdb, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1012601@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ben Hutchings <benh@debian.org> (supplier of updated wireless-regdb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 30 Jun 2022 00:01:25 +0200
Source: wireless-regdb
Architecture: source
Version: 2022.04.08-2
Distribution: unstable
Urgency: medium
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: Ben Hutchings <benh@debian.org>
Closes: 1012601
Changes:
 wireless-regdb (2022.04.08-2) unstable; urgency=medium
 .
   * debian/tests: Add check that regulatory.db signatures are valid
   * d/wireless-regdb.postinst: Remove regular files installed by d-i
     (Closes: #1012601)
Checksums-Sha1:
 2b06505f5dbd8ae3582a324dd9b539580c2d05ca 2270 wireless-regdb_2022.04.08-2.dsc
 d6ebdaa8826a4bfaea2f9bcfe6bb2ac4413f5e05 18504 wireless-regdb_2022.04.08-2.debian.tar.xz
 2b0f8edd556e3e6448c086a9b68f4b580ebc0e73 7427 wireless-regdb_2022.04.08-2_source.buildinfo
Checksums-Sha256:
 7ccbf0f383389ee308f2ed07bdf6cdea1b210ce57ad0f86c3171abc03e5a92e7 2270 wireless-regdb_2022.04.08-2.dsc
 e502b481a3431fa8ac6970dd9cc258758d1660616938302a4c4336f20dbfe6bd 18504 wireless-regdb_2022.04.08-2.debian.tar.xz
 6d93e1f912b9944f62f413008f15f3e8b2ad1b6091a2e5490ea95cfeabb12b48 7427 wireless-regdb_2022.04.08-2_source.buildinfo
Files:
 a36033f129f73a1dad095343c001c31d 2270 net optional wireless-regdb_2022.04.08-2.dsc
 a90611177003018ff19e2e92f303a9e6 18504 net optional wireless-regdb_2022.04.08-2.debian.tar.xz
 30b375065455cad58af4180da57a6f43 7427 net optional wireless-regdb_2022.04.08-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAmK8y+cACgkQ57/I7JWG
EQnphhAAwyuNMrFir05nTTxw7KeiWIYM05sL978L7afZvIshK0PuansqHivJHngA
YIq2Py8CG8MaX5+KMCT7ouN44/cWgtl/2r7UMMKYMsib7s41PpijahIPkzxll5NG
uvANpssqsKTnhzfq3zgFLyhJDN461Sj9Y8k0dIPY2wI1kbhGTtlqpwZOAbfkISbb
t+LpWiviMiMjmupioyVBOvuE+RD+X0DDrYqqubQYtBtJOyF90Exlf3yU7fVL4I9m
ximGg1PDNFPcQsKS654eBKvdmHK0kV/DCdu2bUnl7EeYDvDlyNdbj7UZsDNKOMjf
cssIYjz4S2pRedE4lZ+PDTUnb9A0hYDUGbgizYdH5IfmFinmnQR4s+H9FlAAR4/f
PSnqkqXgXypLeommeUEzVfxYyuYgDC0VvjGrORCpO6PEgSo7mXxd3jhP2QA9G+GE
zqrHB2sbBx6ACBQyxNg+mxgH00BZxxqsW99/ovSfhLV1ZMz4lGU0OqSGRFHNAsUV
9LQHwISWkcqrzoE8PPkcGygliunRME9KmY31RafU35P2RNxmHVM3w3NGehv+90cx
VB7rz4Z4UIzkwRsUc4kVqp6vlDmPQNQrv1U8nHoysif0UKkNxWc75Q9cI+HHRBaU
oAPxTyXt+lOd9BlJoq5sUVZfsrJqhvASXmMY44s0QJu1orWwK6E=
=BWCX
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: