Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install provided rpm packages #51

Closed
3lswear opened this issue Sep 3, 2022 · 2 comments
Closed

Unable to install provided rpm packages #51

3lswear opened this issue Sep 3, 2022 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@3lswear
Copy link

3lswear commented Sep 3, 2022

Hello, I am unable to install any of recent rpm packages on Fedora due to conflicts.
Here's the message dnf gives me:

Error: Transaction test error:
  file /usr/bin from install of httm-0.14.10-2.x86_64 conflicts with file from package filesystem-3.18-2.fc36.x86_64

I noticed that recently package creation process has been changed so that rpms are created using alien. As far as I've researched, the problem with alien is known and the gist of it is that alien can include unnecessary paths to the package spec that conflict with system packages.
One way it can be solved is by rebuilding the package with a fixed spec, like demonstrated here.

Maybe it is possible to add some steps to rpm creation to remove conflicting paths, something like the method in the linked article?

@kimono-koans kimono-koans added bug Something isn't working good first issue Good for newcomers labels Sep 5, 2022
@kimono-koans
Copy link
Owner

Thanks for filing a bug report. Sorry the tagged package isn't working for you.

Yes, removing the offending lines from the rpm spec might be possible. My issue is I can't tell exactly where the error might occur. See the rpm spec for 0.14.10:

Buildroot: /srv/program/httm/target/debian/httm-0.14.10
Name: httm
Version: 0.14.10
Release: 2
Summary: A CLI tool for viewing snapshot file versions on ZFS and btrfs datasets
License: see /usr/share/doc/httm/copyright
Distribution: Debian
Group: Converted/utility

%define _rpmdir ../
%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%define _unpackaged_files_terminate_build 0

%description
httm prints the size, date and corresponding locations of available unique
versions of files
residing on snapshots.  May also be used interactively to select and restore
from such
versions, and even to snapshot datasets which contain certain files.


(Converted from a deb package by alien version 8.95.5.)

%files
%dir "/usr/share/doc/httm/"
"/usr/share/doc/httm/copyright"
"/usr/bin/httm"
"/usr/share/doc/httm/README"
"/usr/share/man/man1/httm.1.gz"

Can you get a more verbose error that could show you the conflict, because the install files (see %files) don't appear as if they would conflict with any system packages?

@kimono-koans
Copy link
Owner

kimono-koans commented Sep 5, 2022

It turns out the alien generated spec doesn't include /usr/bin, but one of the rpm build tools alien invokes will add /usr/bin later in the process, after the spec is generated.

However, you can add --replacefiles when you use rpm to install, like so: rpm -i --replacefiles httm*.rpm and it will install. This is putatively safe from my testing, that is, rpm -e won't remove /usr/bin unless the directory is empty.

I don't use RHEL/Fedora, therefore, this issue (but really all packaging generally) is a low priority for me to personally fix, and, especially since, as I described, there is a mitigation --replacefiles. However, PRs are welcome from you and other RHEL/Fedora users in the form of a GH action yaml. Preferably something, like alien, that can be invoked from an Ubuntu container.

I will, of course, add a note to the documentation with a link to this issue so others will know the situation.

Again thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants