COPR RPM: %post and %preun call xdg-mime without requiring xdg-utils, so install and removal fail where it is missing

Open Beginner friendly
#48 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
linux, python
Domain
devops, release

Research direction

Start with .copr/openvpn3-indicator.spec.py and inspect the %post, %preun, and %posttrans scriptlets alongside the RPM dependency declarations. Reproduce the install and removal failure on Fedora without xdg-utils, or review the reported commands and scriptlet behavior. Done when package installation and removal succeed when xdg-utils is absent.

Written by the indexing model from the issue text.

Description

The RPM built from .copr/openvpn3-indicator.spec.py runs xdg-mime install --mode system ... in %post and xdg-mime uninstall --mode system ... in %preun, but xdg-utils isn't in Requires (or Requires(post)/Requires(preun)), and neither command ends in || : like the %posttrans commands do.

On a Fedora system without xdg-utils, dnf reports the install as failed even though the files are installed, and removal fails and leaves the package installed:

$ podman run --rm -it registry.fedoraproject.org/fedora:43
# dnf copr enable -y dsommers/openvpn3
# dnf copr enable -y grzegorz-gutowski/openvpn3-indicator
# dnf install -y openvpn3-indicator
...
Transaction failed: Rpm transaction failed.
# rpm -q openvpn3-indicator xdg-utils
openvpn3-indicator-1.0.1.20260724101809.devel-1.noarch
package xdg-utils is not installed
# dnf remove -y openvpn3-indicator
>>> Running %preun scriptlet: openvpn3-indicator-0:1.0.1.20260724101809.devel-1.
>>> Error in %preun scriptlet: openvpn3-indicator-0:1.0.1.20260724101809.devel-1
>>> /var/tmp/rpm-tmp.TxTthy: line 2: xdg-mime: command not found
Transaction failed: Rpm transaction failed.
# rpm -q openvpn3-indicator
openvpn3-indicator-1.0.1.20260724101809.devel-1.noarch

This can cause tools that install it non-interactively to treat the install as failed, and leaves a package that can't be removed until xdg-utils is installed.

Dominant language
Python
Stars
120
Forks
25
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenVPN/openvpn3-indicator

All issues in OpenVPN/openvpn3-indicator

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.