Bug 2086206

Summary: wrong version reported by llvm-config-13
Product: [Fedora] Fedora Reporter: vincent
Component: llvmAssignee: Tom Stellard <tstellar>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 36CC: dmalcolm, jakub, jistone, kkleine, npopov, scottt.tw, sguelton, siddharth.kde, tbaeder, tstellar
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-25 19:08:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description vincent 2022-05-14 17:02:59 UTC
Description of problem:


On Fedora 36, "llvm-config-13 --version" prints the wrong version:

$ llvm-config-13 --version
14.0.0


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

llvm13-devel-13.0.1-1.fc36.x86_64


How reproducible:


Steps to Reproduce:
1. install llvm13-devel
2. run "llvm-config-13 --version"

Actual results:

The command prints "14.0.0"

Expected results:

The command should print "13.0.1"

Additional info:

Comment 1 Josh Stone 2022-05-16 19:03:38 UTC
I can't reproduce this in clean mock f36, nor in rawhide.

What does your "update-alternatives --display llvm-config-13" say?

Comment 2 vincent 2022-05-16 19:26:24 UTC
Without llvm13-devel installed:

$ update-alternatives --display llvm-config-13
llvm-config-13 - status is auto.
 link currently points to /usr/bin/llvm-config-64
/usr/bin/llvm-config-64 - priority 64
Current `best' version is /usr/bin/llvm-config-64.


With llvm13-devel installed:

$ update-alternatives --display llvm-config-13
llvm-config-13 - status is auto.
 link currently points to /usr/bin/llvm-config-64
/usr/bin/llvm-config-64 - priority 64
/usr/lib64/llvm13/bin/llvm-config-13-64 - priority 64
Current `best' version is /usr/bin/llvm-config-64.


And yeah I didn't mention it but this is on a system upgraded from Fedora 35.

Comment 3 Josh Stone 2022-05-16 22:38:54 UTC
I see -- there's an llvm-devel %postun, but that only takes effect for uninstall (if [ $1 -eq 0 ]), not upgrades (where $1 is 1).

I can reproduce this in mock:

$ mock -r fedora-35-x86_64 install llvm-devel
$ mock -r fedora-35-x86_64 --dnf-cmd update --releasever 36 llvm-devel --nogpgcheck
$ mock -r fedora-35-x86_64 --shell -- update-alternatives --list | grep llvm
llvm-config-13          auto    /usr/bin/llvm-config-64
llvm-config             auto    /usr/bin/llvm-config-64
llvm-config-14          auto    /usr/bin/llvm-config-64

So I'm reassigning this to llvm, as it's not really llvm13's fault.

I'm not sure what is the right answer here. Given the ordering[1] of scriptlets, we could unconditionally remove the old in %postun, and then add the new in %posttrans, but that probably won't do the right thing if the user actually had made a choice of alternatives.

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

Comment 4 Ben Cotton 2023-04-25 17:09:58 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Ludek Smid 2023-05-25 19:08:13 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.