[SRU] libraspberrypi0 multi-arch install failing due to lintian override content difference

Bug #1973285 reported by Noah Horler
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
raspberrypi-userland (Ubuntu)
Fix Released
Medium
Dave Jones
Jammy
Fix Released
Medium
Dave Jones
Kinetic
Fix Released
Medium
Dave Jones

Bug Description

[Impact]

Despite libraspberrypi0 being declared Multi-Arch: same, users cannot install libraspberrypi0:armhf on arm64 systems. This affects the ability to (attempt to) use libwidevine (the library required to play certain proprietary streaming services, e.g. Netflix, which is currently only available as an armhf binary).

Note: For the sake of clarity, while this fix enables libraspberrypi0:armhf to be co-installed with the arm64 variant, I have *not* tested installation / usage of widevine itself as that's beyond the scope of this bug.

It also affects users of the (still very popular) legacy camera stack, which is only supported on the armhf architecture as of jammy (all the mmal utilities and libraries were removed from arm64 upstream, and this change was incorporated in raspberrypi-userland in jammy).

[Test Plan]

* Flash the Ubuntu Desktop 22.04 for Raspberry Pi to an SD card (http://cdimage.ubuntu.com/ubuntu/releases/jammy/release/ubuntu-22.04-preinstalled-desktop-arm64+raspi.img.xz is the relevant image, but this is probably easier to accomplish via the rpi-imager tool)

* Boot the SD card on a supported Pi (4, 400, CM4) and run through first-time setup

* Open a terminal

* sudo dpkg --add-architecture armhf

* sudo apt update

* sudo apt install libraspberrypi0:armhf

* Observe failure due to conflict in lintian-overrides

* Enable proposed updates (https://wiki.ubuntu.com/Testing/EnableProposed)

* sudo apt update

* sudo apt install -t jammy-proposed libraspberrypi0 libraspberrypi0:armhf

* Package installs successfully

* The fixed version also sets Multi-Arch: same on libraspberrypi-dev, so it would also be useful to test the following: sudo apt install libraspberrypi-dev:{armhf,arm64}

[Regression Potential]

We could backport just the Multi-Arch fixes to the lintian-overrides (an essentially risk-free option, since the only difference would be in the lintian overrides themselves), but the diff between the version currently shipped in jammy, and the fixed version in kinetic is small consisting of only 6 (mostly trivial) commits (no new features are included, just bug fixes). Hence, I've decided to just backport the kinetic version, unless the SRU team raises any objections.

The fixed version has been tested on the jammy desktop and jammy server arm64 platforms without issue so far. The regression potential is low; despite it being a new version the delta is (as mentioned) a few largely trivial bug fixes.

The extra commits (https://github.com/raspberrypi/userland/compare/14b90ff9d9f031391a299e6e006965d02bfd1bb1...HEAD) in the kinetic version are as follows:

3ff42d69724062cbe4f72d2978ac035550823d10
vcos: Add vcos_safe_strncpy and VCOS_SAFE_STRNCPY -- fixes a complaint from the vc4 linker about not finding strnlen

a70a7428f7861d3b8eab24886d48a308936ec912
userland: dtoverlay: Handle parameters in overlay_map -- fixes dtoverlay ignoring parameters from the overlay map

affef1eb4f264f4fffa732d9216e4fc1e1b9ac56
dtoverlay: Rebase aliases in overlays like labels -- fixes dtoverlay handling aliases in loaded overlays

09570925bf244f8a041f8b7e88f8f2a6664acbab
dtoverlay: Don't mix non-fatal errors and offsets -- fixes an issue (https://github.com/raspberrypi/firmware/issues/1686) with invalid fragments in an overlay breaking boot

8fa944c74085aacd99da3e733af8dc5ac9b04fd9
mmal: Add mapping for IL OMX_IndexParamBrcmEnableIJGTableScaling param -- added a missing MMAL mapping for the legacy graphics stack

c4fd1b8986c6d6d4ae5cd51e65a8bbeb495dfa4e
Fix declaration of raspicommonsettings_parse_cmdline

[Original Description]

https://github.com/Botspot/pi-apps/pull/1806

Cannot install libraspberrypi0:armhf on 22.04 (Jammy) because of broken dependencies.
Please fix your packages for libraspberrypi0.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, could you provide some details. Installing seems to be working without issue

$ sudo apt install libraspberrypi0 --reinstall
...
Preparing to unpack .../libraspberrypi0_0~20211124+git14b90ff-0ubuntu2_arm64.deb ...
Unpacking libraspberrypi0:arm64 (0~20211124+git14b90ff-0ubuntu2) over (0~20211124+git14b90ff-0ubuntu2) ...
Setting up libraspberrypi0:arm64 (0~20211124+git14b90ff-0ubuntu2) ...
Processing triggers for libc-bin (2.35-0ubuntu3) ...

Changed in raspberrypi-userland (Ubuntu):
status: New → Incomplete
Revision history for this message
theofficialgman (theofficialgman) wrote (last edit ):

I can give some extra insight. the problem is with attempting to install the libraspberrypi0:armhf dependency in addition which users might want to do in a multiarch arm64 and armhf scenario.

The problem is that both the armhf and arm64 package contain the `/usr/share/lintian/overrides/libraspberrypi0` file. This files contents do not match on the armhf and arm64 package, causing apt to error saying that there is a conflicting file (which there is).

```
dpkg: error processing archive /tmp/apt-dpkg-install-UXjmv9/250-libraspberrypi0_0~20200520+git2fe4ca3-0ubuntu5~21.10.1_armhf.deb (--unpack):

 trying to overwrite shared '/usr/share/lintian/overrides/libraspberrypi0', which is different from other instances of package libraspberrypi0:armhf

Errors were encountered while processing:

 /tmp/apt-dpkg-install-UXjmv9/250-libraspberrypi0_0~20200520+git2fe4ca3-0ubuntu5~21.10.1_armhf.deb

needrestart is being skipped since dpkg has failed
```

The fix is to add the lintian overrides from armhf to arm64 and vice versa so the files match and update in all ubuntu releases, since its a problem on every release since the raspberrypi-userland package package was added (focal and up). the official raspbian/raspberrypi foundation packages do not have this issue.

Revision history for this message
Sebastien Bacher (seb128) wrote : Re: libraspberrypi0 multi-arch install failing due to lintian override content difference

Thanks, the details help to understand the issue, I'm marking as confirmed. It's a multi-arch issue trying to install the armhf variant, which is different from the broken dependencies statement.

What's the usecase exactly to install the armhf version there when you already have the arm64 one?

It's a bug that should be fixed by understanding why it's problematic would help setting the importance

summary: - broken package on 22.04 libraspberrypi0
+ libraspberrypi0 multi-arch install failing due to lintian override
+ content difference
Changed in raspberrypi-userland (Ubuntu):
status: Incomplete → New
Revision history for this message
theofficialgman (theofficialgman) wrote (last edit ):

there are a few usecases where pi users wish to install the armhf variants in addition to the arm64 variants:

1. use armhf only binary software with hardware accelerated gles (and other gpu libraries). The arm64 libraries do not help in this case.

2. for x86 (32bit) to armhf emulation of linux applications/binaries, the armhf libraspberrypi0 package is also necessary for hardware accelerated gpu (as with 1.)

3. software such as chromium only has widevine support on armhf (and x86_64 and x86), not arm64, so the armhf version of chromium needs to be installs, requiring the armhf gpu libraries to be installed for hardware accelerated web compositing.

tags: added: rls-jj-incoming
Dave Jones (waveform)
Changed in raspberrypi-userland (Ubuntu):
assignee: nobody → Dave Jones (waveform)
status: New → Confirmed
tags: added: fr-2417
Changed in raspberrypi-userland (Ubuntu):
importance: Undecided → Medium
tags: removed: rls-jj-incoming
Dave Jones (waveform)
Changed in raspberrypi-userland (Ubuntu Jammy):
status: New → Confirmed
assignee: nobody → Dave Jones (waveform)
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package raspberrypi-userland - 0~20220324+gitc4fd1b8-0ubuntu1

---------------
raspberrypi-userland (0~20220324+gitc4fd1b8-0ubuntu1) kinetic; urgency=medium

  * Bump to current version on RaspiOS Bullseye
  * Fix lintian-overrides to use arch-specific flags, ensuring both the armhf
    and arm64 versions can be simultaneously installed (LP: #1973285)
  * Fix Multi-Arch spec on libraspberrypi-bin and libraspberrypi-dev
  * d/libraspberrypi0.symbols.* add Build-Depends-Package
  * Don't embed Vera.ttf in libraspberrypi-dev examples; symlink to the one
    from ttf-bitstream-vera and Suggest: that package instead
  * Ensure examples in libraspberrypi-dev are not compressed

 -- Dave Jones <email address hidden> Thu, 26 May 2022 14:22:37 +0100

Changed in raspberrypi-userland (Ubuntu Kinetic):
status: Confirmed → Fix Released
Dave Jones (waveform)
summary: - libraspberrypi0 multi-arch install failing due to lintian override
+ [SRU] libraspberrypi0 multi-arch install failing due to lintian override
content difference
Dave Jones (waveform)
description: updated
Dave Jones (waveform)
Changed in raspberrypi-userland (Ubuntu Jammy):
status: Confirmed → In Progress
Dave Jones (waveform)
description: updated
Dave Jones (waveform)
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Dave: I'm generally fine in including those additional changes on top of the aforementioned change so I'll accept it as is, but please be sure to include information about them in the bug here as well. Since it would be useful to have it noted in the bug description besides the changelog entries.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Actually, could you change the description now? Since I think some of the in-code changes are not mentioned in the changelog (besides mentioning backporting kinetic) - and I'd like to know what the pulled in changes do, if possible.

Revision history for this message
Dave Jones (waveform) wrote :

Added some commentary for each additional commit to the regression section, with a link to the relevant commits in the upstream repo that we build from.

description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Noah, or anyone else affected,

Accepted raspberrypi-userland into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/raspberrypi-userland/0~20220324+gitc4fd1b8-0ubuntu1~22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in raspberrypi-userland (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Dave Jones (waveform) wrote :

Fixed up the instructions (forgot to mention that *both* libraspberrypi0 and libraspberrypi0:armhf need installing from -proposed to verify this!). Verification done on Ubuntu Desktop for Pi and Ubuntu Server (arm64) for Pi, on a Pi 400, and a Pi 4B. No issues encountered.

description: updated
tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package raspberrypi-userland - 0~20220324+gitc4fd1b8-0ubuntu1~22.04.1

---------------
raspberrypi-userland (0~20220324+gitc4fd1b8-0ubuntu1~22.04.1) jammy; urgency=medium

  * SRU of kinetic version
  * Fix lintian-overrides to use arch-specific flags, ensuring both the armhf
    and arm64 versions can be simultaneously installed (LP: #1973285)
  * Fix Multi-Arch spec on libraspberrypi-bin and libraspberrypi-dev
  * d/libraspberrypi0.symbols.* add Build-Depends-Package
  * Don't embed Vera.ttf in libraspberrypi-dev examples; symlink to the one
    from ttf-bitstream-vera and Suggest: that package instead
  * Ensure examples in libraspberrypi-dev are not compressed

 -- Dave Jones <email address hidden> Thu, 26 May 2022 14:22:37 +0100

Changed in raspberrypi-userland (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for raspberrypi-userland has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.