Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #75543 > unrolled thread
| Started by | Dominique Martinet <dominique.martinet@atmark-techno.com> |
|---|---|
| First post | 2022-06-10 02:50 +0200 |
| Last post | 2022-06-30 01:40 +0200 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.debian.kernel
Bug#1012601: wireless-regdb: alternative broken on debian-installer install Dominique Martinet <dominique.martinet@atmark-techno.com> - 2022-06-10 02:50 +0200
Bug#1012601: wireless-regdb: alternative broken on debian-installer install Ben Hutchings <ben@decadent.org.uk> - 2022-06-13 16:50 +0200
Bug#1012601: wireless-regdb: alternative broken on debian-installer install Dominique Martinet <dominique.martinet@atmark-techno.com> - 2022-06-14 01:40 +0200
Bug#1012601: wireless-regdb: alternative broken on debian-installer install Ben Hutchings <ben@decadent.org.uk> - 2022-06-30 02:10 +0200
Bug#1012601: wireless-regdb: alternative broken on debian-installer install Dominique Martinet <dominique.martinet@atmark-techno.com> - 2022-06-30 02:30 +0200
Bug#1012601: marked as done (wireless-regdb: alternative broken on debian-installer install) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2022-06-30 01:40 +0200
| From | Dominique Martinet <dominique.martinet@atmark-techno.com> |
|---|---|
| Date | 2022-06-10 02:50 +0200 |
| Subject | Bug#1012601: wireless-regdb: alternative broken on debian-installer install |
| Message-ID | <EwB0C-3M9d-1@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2022-06-13 16:50 +0200 |
| Message-ID | <ExTy9-4ymW-3@gated-at.bofh.it> |
| In reply to | #75543 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, 2022-06-10 at 09:39 +0900, Dominique Martinet wrote: [...] > 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 I didn't realise the installer was copying firmware files over. It should be installing the relevant packages instead where possible. > 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? Why do you think it's obsolete? It is useful to have this file present in the installer. > 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) I don't think it's right to include symlinks in the package that are supposed to be managed by update-alternatives. I would rather fix this up in the postinst script. Ben. -- Ben Hutchings It's easier to fight for one's principles than to live up to them.
[toc] | [prev] | [next] | [standalone]
| From | Dominique Martinet <dominique.martinet@atmark-techno.com> |
|---|---|
| Date | 2022-06-14 01:40 +0200 |
| Message-ID | <Ey1P3-4DzD-1@gated-at.bofh.it> |
| In reply to | #75585 |
Ben Hutchings wrote on Mon, Jun 13, 2022 at 04:39:23PM +0200: > On Fri, 2022-06-10 at 09:39 +0900, Dominique Martinet wrote: > > 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? > > Why do you think it's obsolete? It is useful to have this file present > in the installer. Sorry this wasn't clear. I didn't mean obsolete as no longer useful, just that it is old: wireless-regdb-udeb hasn't been updated in two years, while the main wireless-regdb package keeps getting updates regularly. That means it's possible a firmware that requires the updated version to work for new band regulations will not have access to these bands for IR. Note that for clients (installer usecase), it _also_ doesn't matter: if an AP uses regulated bands, the client will (should?) rightfully use these. Regulations mean a wireless emetter cannot start broadcasting on regulated bands unless they know it's safe, but if an access point or other clients use the band they can tell it's OK and will allow it. The regdb will thus only matter for people setting up hotspots or AP on their system, or perhaps if the remote AP is also missing its regdb but I'm not sure how the ssid would come up then. (At least, the marvell/NXP chip I've tested this with does that properly; there can be other aspects to regdb I'm not aware of or didn't understand) In that sense, removing the firmware from installer also should not make a difference to most users, but I'm not suggesting to remove it in this bug as I'm sure there was a reason for it to be added in the first place. I'd just like post-install systems which install the package to get the new version :) > > 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) > > I don't think it's right to include symlinks in the package that are > supposed to be managed by update-alternatives. I would rather fix this > up in the postinst script. Yeah, it probably makes more sense to just remove whatever was there in the post-install script. I'll leave the resolution to you unless you want/need help with something. -- Dominique
[toc] | [prev] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2022-06-30 02:10 +0200 |
| Message-ID | <EDPUS-86WS-3@gated-at.bofh.it> |
| In reply to | #75592 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, 2022-06-14 at 08:27 +0900, Dominique Martinet wrote: > Ben Hutchings wrote on Mon, Jun 13, 2022 at 04:39:23PM +0200: > > On Fri, 2022-06-10 at 09:39 +0900, Dominique Martinet wrote: > > > 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? > > > > Why do you think it's obsolete? It is useful to have this file present > > in the installer. > > Sorry this wasn't clear. I didn't mean obsolete as no longer useful, > just that it is old: wireless-regdb-udeb hasn't been updated in two > years, while the main wireless-regdb package keeps getting updates > regularly. You are comparing wireless-regdb-udeb in stable with wireless-regdb in unstable. Both the regular and udeb packages are outdated in stable, but this should be fixed in the next point release. [...] > Note that for clients (installer usecase), it _also_ doesn't matter: if > an AP uses regulated bands, the client will (should?) rightfully use > these. Yes, I think this is generally what happens. But the kernel wants to load regulatory.db regardless of what mode is being used, so it seemed like a good idea to include it in the installer. This bug shows that that didn't have an entirely positive effect, but it will be fixed. [...] > Yeah, it probably makes more sense to just remove whatever was there in > the post-install script. > I'll leave the resolution to you unless you want/need help with > something. That is what I've now implemented. Ben. -- Ben Hutchings Nothing is ever a complete failure; it can always serve as a bad example.
[toc] | [prev] | [next] | [standalone]
| From | Dominique Martinet <dominique.martinet@atmark-techno.com> |
|---|---|
| Date | 2022-06-30 02:30 +0200 |
| Message-ID | <EDQed-872Y-1@gated-at.bofh.it> |
| In reply to | #75776 |
Ben Hutchings wrote on Thu, Jun 30, 2022 at 02:08:24AM +0200: > > Sorry this wasn't clear. I didn't mean obsolete as no longer useful, > > just that it is old: wireless-regdb-udeb hasn't been updated in two > > years, while the main wireless-regdb package keeps getting updates > > regularly. > > You are comparing wireless-regdb-udeb in stable with wireless-regdb in > unstable. > > Both the regular and udeb packages are outdated in stable, but this > should be fixed in the next point release. Ah, sorry I didn't realize they had the same source package. > > Yeah, it probably makes more sense to just remove whatever was there in > > the post-install script. > > I'll leave the resolution to you unless you want/need help with > > something. > > That is what I've now implemented. I've had a look at the postinst script[1] after the automated notification and it looks good to me, thank you. [1] https://salsa.debian.org/kernel-team/wireless-regdb/-/blob/master/debian/wireless-regdb.postinst -- Dominique
[toc] | [prev] | [next] | [standalone]
| From | "Debian Bug Tracking System" <owner@bugs.debian.org> |
|---|---|
| Date | 2022-06-30 01:40 +0200 |
| Subject | Bug#1012601: marked as done (wireless-regdb: alternative broken on debian-installer install) |
| Message-ID | <EDPrP-86yA-15@gated-at.bofh.it> |
| In reply to | #75543 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.kernel
csiph-web