Bug 1830753 - Upgrade from F31 to F32 fails due to conflict in /usr/lib/firmware/intel/sof-tplg
Summary: Upgrade from F31 to F32 fails due to conflict in /usr/lib/firmware/intel/sof-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: alsa-sof-firmware
Version: 32
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Kysela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1832130 1835663 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-03 16:54 UTC by cb-rhbugz
Modified: 2020-05-14 10:02 UTC (History)
20 users (show)

Fixed In Version: alsa-sof-firmware-1.4.2-6.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-14 02:36:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description cb-rhbugz 2020-05-03 16:54:41 UTC
Description of problem:

Upgrade from Fedora 31 to Fedora 32 fails with
Unable to upgrade to Fedora 32:
Error running transaction: file /usr/lib/firmware/intel/sof-tplg from install of alsa-sof-firmware-1.4.2-4.fc32.noarch conflicts with file from package alsa-firmware-1.2.1-4.fc31.noarch

Version-Release number of selected component (if applicable):


How reproducible:
Every time.


Steps to Reproduce:
1. Use the Software upgrade utility in Gnome, which presents "Fedora 32 Now Available"
2. Click Download, and wait.


Actual results:
Notification is displayed with above package conflict error.

Expected results:
Upgrade to Fedora 32 happens

Additional info:

Comment 1 Jaroslav Kysela 2020-05-04 08:56:26 UTC
I cannot enter the alsa-firmware update for F31 for an uknown reason: https://github.com/fedora-infra/bodhi/issues/4015

Fixed alsa-firmware build for F31: https://koji.fedoraproject.org/koji/buildinfo?buildID=1473971 
alsa-sof-firmware build for F31: https://koji.fedoraproject.org/koji/buildinfo?buildID=1502856

Comment 2 Panos Kavalagios 2020-05-08 09:55:59 UTC
I have also tried today to upgrade from 31 to 32 and the same issue occured:

---------------
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction test error:
  file /usr/lib/firmware/intel/sof-tplg from install of alsa-sof-firmware-1.4.2-5.fc32.noarch conflicts with file from package alsa-firmware-1.2.1-4.fc31.noarch
---------------

The fix is not pushed to stable repos right?

Panos

Comment 3 Jaroslav Kysela 2020-05-08 10:57:30 UTC
Unfortunately, I do not see the new alsa-firmware build in the Fedora Updates System, so I cannot create the new update.

Comment 4 Zbigniew Jędrzejewski-Szmek 2020-05-08 11:49:15 UTC
Please just rebuild it again.

I'll reassign this back to alsa-sof-firmware, since this has nothing to do with fedora-release and will just get lost there.

Comment 5 Pavla Kratochvilova 2020-05-11 05:28:20 UTC
*** Bug 1832130 has been marked as a duplicate of this bug. ***

Comment 6 Sam Varshavchik 2020-05-12 01:26:45 UTC
I do not understand this dependency issue.

From dnf system-upgrade's logs:

Upgrading:
 alsa-firmware                                noarch  1.2.1-7.fc32                           fedora                   3.3 M

and alsa-sof-firmware gets pulled in as a weak depedency:

Installing weak dependencies:
 alsa-sof-firmware                            noarch  1.4.2-5.fc32                           updates-released-local   384 k

Looking at alsa-firmware-1.2.1-7.fc32.noarch.rpm I do not see the problematic /usr/lib/firmware/intel/sof-tplg file.

So, Fedora 31 has /usr/lib/firmware/intel/sof-tplg in alsa-firmware-1.2.1-4.fc31.noarch

This is being upgraded to alsa-firmware-1.2.1-7.fc32.noarch.rpm and alsa-sof-firmware-1.4.2-5.fc32.noarch, and this file is getting moved to the alsa-sof-firmware package.

Why is dnf complaining about a conflict with the F31 package? It's getting removed:

  file /usr/lib/firmware/intel/sof-tplg from install of alsa-sof-firmware-1.4.2-5.fc32.noarch conflicts with file from package alsa-firmware-1.2.1-4.fc31.noarch

Comment 7 Jaroslav Kysela 2020-05-12 06:18:42 UTC
I am sorry about those issues. 

Workaround: Just remove (uninstall) the alsa-firmware package before upgrade from F31 to F32.


(In reply to Zbigniew Jędrzejewski-Szmek from comment #4)
> Please just rebuild it again.
> 
> I'll reassign this back to alsa-sof-firmware, since this has nothing to do
> with fedora-release and will just get lost there.

The rebuild of the F31 alsa-firmware package means that I need to increase version and push updates for all recent version of Fedora, because I cannot use alsa-firmware-1.2.1-7.fc31 in the Fedora Update System.


The new SOF binaries version 1.5.0 will be available soon. I'll do the new alsa-firmware update when the new alsa-sof-firmware is also available.

Comment 8 Zbigniew Jędrzejewski-Szmek 2020-05-12 08:29:12 UTC
Oh, so this is more complicated. In alsa-firmware-1.2.1-4.fc31 /usr/lib/firmware/intel/sof-tplg is a directory.
In alsa-sof-firmware-1.4.2-5.fc32.noarch it is a symlink. Rpm cannot handle upgrades like this due
to a well-known limitation (#61413, #447156), and a %pretrans scriptlet would be required to make
such upgrades work [1].

[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/#_working_around_it_with_scriptlets

Maybe it's not necessary to have the version in the name at all? Unless there's a plan to
allow multiple versions of the firmware to be installed in parallel, it'd be reasonable to
get rid of the symlink and rename sof-tplg-v1.4.2/ to sof-tplg/ (and also remove the version
suffix in later versions). Unfortunately, a %pretrans scriptlet would be required in this case
too, since the package with the symlink is already out in the wild.

> The rebuild of the F31 alsa-firmware package means that I need to increase version and push updates for
> all recent version of Fedora, because I cannot use alsa-firmware-1.2.1-7.fc31 in the Fedora Update System.

Oh, there's even more confusion here.
First: this bug is about upgrades to F32, so a fix will be in an F32 package, not in an F31 package. So
the F31 build is not really relevant to this. As described above, you'll need to do an F32 build to
add the %pretrans scriptlet.

Second: (not necessary in this case but) if you need to do a rebuild just for F31, then it is always
possible. Just use a version string like alsa-firmware-1.2.1-4.fc31.1, which sorts
higher than "-1.2.1-4.fc31" and lower than "-1.2.1-4.fc32", so the upgrade path is preserved.
[https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_you_need_to_change_an_old_branch_without_rebuilding_the_others]

> The new SOF binaries version 1.5.0 will be available soon. I'll do the new alsa-firmware update when the
> new alsa-sof-firmware is also available.

Please note that this bug is breaking upgrades for users, and we go to a large effort to avoid that.
So please consider this as fairly high priority. If the new version will be out in a day or two, it
is OK to wait. But if "soon" means a week or more, please do the fix for this bug immediately.
As noted above, the %pretrans scriptlet needs to be added in any case.

tl;dr: my recommendation would be to:
1. add a %pretrans scriptlet to move /usr/lib/firmware/intel/sof-tplg out of the way
2. rename /usr/lib/firmware/intel/sof-tplg-v1.4.2/ to /usr/lib/firmware/intel/sof-tplg/ in the package
3. release alsa-sof-firmware-1.4.2-6.fc32.noarch immediately

Let me know if I should help with the scriptlet.

Comment 9 Fedora Update System 2020-05-12 10:04:26 UTC
FEDORA-2020-96f6bdf6c5 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-96f6bdf6c5

Comment 10 Jaroslav Kysela 2020-05-12 10:05:08 UTC
Ok, I made some cleanups. Please test or comment. Thank you.

Comment 11 Fedora Update System 2020-05-13 03:55:41 UTC
FEDORA-2020-96f6bdf6c5 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-96f6bdf6c5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-96f6bdf6c5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2020-05-14 02:36:03 UTC
FEDORA-2020-96f6bdf6c5 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Jaroslav Kysela 2020-05-14 10:02:59 UTC
*** Bug 1835663 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.