rpmpack: Unable to install the built rpm (without force)

Ive been trying to build an rpm using pkg_tar2rpm

when i go to install the rpm im seeing the following errors

Error: Transaction check error:
  file /opt from install of envoy-0:1.19.0-pre.noarch conflicts with file from package filesystem-3.8-2.el8.x86_64
  file /usr from install of envoy-0:1.19.0-pre.noarch conflicts with file from package filesystem-3.8-2.el8.x86_64
  file /usr/bin from install of envoy-0:1.19.0-pre.noarch conflicts with file from package filesystem-3.8-2.el8.x86_64

if i use rpm -i --force my.rpm it works - im wondering what im doing wrong (or not doing right) that is fooing the paths in the package

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (4 by maintainers)

Commits related to this issue

Most upvoted comments

I can confirm that when using 3d6252945290ac5a55ebe5bc675ff9d49a4e6226 and setting use_dir_allowlist = True, that the RPMs now install without issue 🥳

Workspace Diff
diff --git a/WORKSPACE b/WORKSPACE
index fbcd8799..285cc140 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -365,8 +365,8 @@ http_file(
 git_repository(
     name = "com_github_google_rpmpack",
     # Lastest commit in main branch as of 2021-09-22
-    commit = "dc539ef4f2ea1c53ab359280cadc7249f2fb3e61",
-    remote = "https://github.com/google/rpmpack.git",
+    commit = "3d6252945290ac5a55ebe5bc675ff9d49a4e6226",
+    remote = "https://github.com/jarondl/rpmpack.git",
 )

 load("@com_github_google_rpmpack//:deps.bzl", "rpmpack_dependencies")
diff --git a/-redacted-/-redacted-/-redacted-/BUILD b/-redacted-/-redacted-/-redacted-/BUILD
index f6cb5d9e..33f5f393 100644
--- a/-redacted-/-redacted-/-redacted-/BUILD
+++ b/-redacted-/-redacted-/-redacted-/BUILD
@@ -56,5 +56,6 @@ pkg_tar2rpm(
     requires = [
         "PyYAML",
     ],
+    use_dir_allowlist = True,
     version = "0.0.1",
 )

I’ve verified the new RPM works in:

  • centos:7
  • registry.access.redhat.com/ubi8/ubi-minimal:8.5-204
  • the centos-based VM where I originally encountered the error