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

File conflict errors when attempting to install RPM #140

Closed
SonicGDX opened this issue Jan 2, 2023 · 5 comments
Closed

File conflict errors when attempting to install RPM #140

SonicGDX opened this issue Jan 2, 2023 · 5 comments

Comments

@SonicGDX
Copy link

SonicGDX commented Jan 2, 2023

Installing the latest release RPM (either via "sudo dnf install" or with GNOME Software using PackageKit) on my Fedora Linux 37 system fails with a bunch of file conflict errors, related to /usr/share/icons and /usr/share/mime. I also tested on a VM and it occurs there too, ruling out my setup being the issue (but I did have Java installed there so I doubt this is related to that). I do not know if this occurs on other RPM-based distros or with the .deb version.

Here is the DNF log from the freshly installed Fedora 37 VM (although not updated, but I don't think this matters since it also occured on my up-to-date system)

[VirtualMachine@localhost-live Downloads]$ sudo dnf install gdx-texturepacker-4.11.0.rpm
Dependencies resolved.
============================================================================================================================================
 Package                                Architecture                Version                         Repository                         Size
============================================================================================================================================
Installing:
 gdx-texturepacker                      noarch                      4.11.0-1                        @commandline                       14 M

Transaction Summary
============================================================================================================================================
Install  1 Package

Total size: 14 M
Installed size: 15 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file /usr/share/icons/hicolor from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package fedora-logos-36.0.0-3.fc37.noarch
  file /usr/share/icons/hicolor/256x256 from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package fedora-logos-36.0.0-3.fc37.noarch
  file /usr/share/icons/hicolor/256x256/apps from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package fedora-logos-36.0.0-3.fc37.noarch
  file /usr/share/icons from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package filesystem-3.18-2.fc37.x86_64
  file /usr/share/icons/hicolor from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package hicolor-icon-theme-0.17-14.fc37.noarch
  file /usr/share/icons/hicolor/256x256 from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package hicolor-icon-theme-0.17-14.fc37.noarch
  file /usr/share/icons/hicolor/256x256/apps from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package hicolor-icon-theme-0.17-14.fc37.noarch
  file /usr/share/icons/hicolor/256x256/mimetypes from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package hicolor-icon-theme-0.17-14.fc37.noarch
  file /usr/share/icons/hicolor from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package qemu-common-2:7.0.0-9.fc37.x86_64
  file /usr/share/icons/hicolor/256x256 from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package qemu-common-2:7.0.0-9.fc37.x86_64
  file /usr/share/icons/hicolor/256x256/apps from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package qemu-common-2:7.0.0-9.fc37.x86_64
  file /usr/share/mime from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package shared-mime-info-2.2-2.fc37.x86_64
  file /usr/share/mime/packages from install of gdx-texturepacker-0:4.11.0-1.noarch conflicts with file from package shared-mime-info-2.2-2.fc37.x86_64



image

EDIT: I see this line

// FIXME: "java8-runtime" is not recognized by RPM package manager and throws an error (on Fedora at least).
in the build.gradle but I'm not sure if its related

@SonicGDX
Copy link
Author

SonicGDX commented Jan 3, 2023

I managed to get the transaction test to work through adding a few things to the build.gradle (didn't check whether createDirectoryEntry=false or addParentDirs=false were individually needed) https://github.com/SonicGDX/gdx-texture-packer-gui/commit/3f90eb892d8ba35ec665d95459da56e77079358a from nebula-plugins/gradle-ospackage-plugin#297 (comment) but I won't submit a PR or anything because I am not knowledgeable on this plugin or Gradle build scripts at all and there is likely a much better way of doing it.

I also got this error from the post install:
error: setexecfilecon: (/usr/bin/env bash, rpm_script_t) No such file or directory
error: Plugin selinux: hook scriplet_fork_post failed
warning: %post(gdx-texturepacker-0:4.11.0-1.noarch) scriptlet failed, exit status 126

Error in POSTIN scriptlet in rpm package gdx-texturepacker

but I'm not sure if that's just my setup or not

@metaphore
Copy link
Member

Thanks for bringing this up and looking into the Gradle files!

Apparently, the RPM package task wasn't properly configured and was imposing ownership over some system directories. Now it should work without an issue.

I've updated the 4.11.0 release RPM artifact, could you please test it on your end?

@SonicGDX
Copy link
Author

SonicGDX commented Jan 4, 2023

It brings up errors and warnings, but does install now

Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : gdx-texturepacker-4.11.0-1.noarch                      1/1
warning: user metaphore does not exist - using root
warning: user metaphore does not exist - using root
warning: user metaphore does not exist - using root
warning: user metaphore does not exist - using root
warning: user metaphore does not exist - using root
warning: user metaphore does not exist - using root
warning: user metaphore does not exist - using root
warning: user metaphore does not exist - using root
warning: user metaphore does not exist - using root
warning: user metaphore does not exist - using root

  Running scriptlet: gdx-texturepacker-4.11.0-1.noarch                      1/1
error: setexecfilecon: (/usr/bin/env bash, rpm_script_t) No such file or directory
error: Plugin selinux: hook scriplet_fork_post failed
warning: %post(gdx-texturepacker-0:4.11.0-1.noarch) scriptlet failed, exit status 126

Error in POSTIN scriptlet in rpm package gdx-texturepacker
  Verifying        : gdx-texturepacker-4.11.0-1.noarch                      1/1

Installed:
  gdx-texturepacker-4.11.0-1.noarch

@metaphore
Copy link
Member

metaphore commented Jan 4, 2023

Oh, looks like some more configuration is required for package producing task. But at least it works now. I will make some amends to RPM for the next release.

Thanks for checking out!

@metaphore
Copy link
Member

Configure RPM task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants