Bug 2370231 - Fedora builds put the wrong file in ` /usr/share/mime/packages/qgis.xml`
Summary: Fedora builds put the wrong file in ` /usr/share/mime/packages/qgis.xml`
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qgis
Version: 41
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
URL: https://kojipkgs.fedoraproject.org//p...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-04 12:01 UTC by dolfandringa@gmail.com
Modified: 2025-06-06 02:07 UTC (History)
5 users (show)

Fixed In Version: qgis-3.40.7-3.fc41
Clone Of:
Environment:
Last Closed: 2025-06-06 02:07:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description dolfandringa@gmail.com 2025-06-04 12:01:46 UTC
When updating some packages on fedora 41, update-alternatives runs which throws the following error:

```
>>> Scriptlet output:
>>> update-alternatives is /sbin/update-alternatives
>>> /usr/share/mime/packages/qgis.xml:1: parser error : Start tag expected, '<' not found
>>> ==================================================
>>> ^
>>> Failed to parse '/usr/share/mime/packages/qgis.xml'
```

Inspecting the file, it seems the file is a plain text file (some Readme or something) instead of the expected xml mime-type data. 

Reproducible: Always

Steps to Reproduce:
1. sudo dnf install qgis
2. head -n 10 /usr/share/mime/packages/qgis.xml
Actual Results:
==================================================
QGIS server
==================================================

QGIS server allows you to publish your QGIS projects as Web Map
Services (WMS). Simply layout your map in QGIS. The WMS will look
exactly the same, because QGIS server uses the same libraries for
rendering, as the desktop application does.

A sample configuration file for Httpd is installed under

Expected Results:
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>

  <mime-type type="application/x-qgis-project">
    <comment>QGIS Project</comment>
    <comment xml:lang="de">QGIS-Projekt</comment>
    <sub-class-of type="application/xml"/>
    <alias type="application/x-qgis"/>
    <icon name="qgis-qgs"/>
    <magic priority="50">

Additional Information:
I double checked by downloading the rpm files and check their contents and those all seem to contain the same issue.

This seems to be the case at least in:

* [Fedora 42 3.42.3](https://koji.fedoraproject.org/koji/buildinfo?buildID=2715791)
* [Fedora 41 3.40.7](https://koji.fedoraproject.org/koji/buildinfo?buildID=2715856)

Checking the [source rpm build scripts from QGIS itself](https://github.com/qgis/QGIS/blob/499873d76966e4e869dcfa3d8d8f519fe09b794b/rpm/qgis.spec.template#L257), the build script does contain a valid file for it. The fedora build script just deviates from it.

Comment 1 Fedora Update System 2025-06-04 12:03:45 UTC
FEDORA-2025-b2b73f5bc4 (qgis-3.40.7-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-b2b73f5bc4

Comment 2 dolfandringa@gmail.com 2025-06-04 12:30:52 UTC
It looks like the [testing version](https://koji.fedoraproject.org/koji/buildinfo?buildID=2721248) actually fixed it. 
Running `sudo dnf update --enablerepo=updates-testing qgis` seems to install the correct file there. So I guess its just a matter of time before its fixed.

Comment 3 Fedora Update System 2025-06-05 01:41:48 UTC
FEDORA-2025-4e80be5a1e has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-4e80be5a1e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-4e80be5a1e

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

Comment 4 Fedora Update System 2025-06-06 02:07:30 UTC
FEDORA-2025-4e80be5a1e (qgis-3.40.7-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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