#89 Fix issue with package update introduce with changing symlink to dir
Closed 10 months ago by rmeggins. Opened 10 months ago by spetros.
rpms/ spetros/linux-system-roles fix-symlinks  into  rawhide

file modified
+22 -1
@@ -30,7 +30,7 @@ 

  Url: https://github.com/linux-system-roles

  Summary: Set of interfaces for unified system management

  Version: 1.22.0

- Release: 2%{?dist}

+ Release: 3%{?dist}

  

  License: GPLv3+ and MIT and BSD and Python

  %global _pkglicensedir %{_licensedir}/%{name}
@@ -280,6 +280,23 @@ 

  Collection artifact for %{name}. This package contains %{collection_namespace}-%{collection_name}-%{version}.tar.gz

  %endif

  

+ # Fix issue with package update introduce with changing symlink to directory

+ # in 1.21.1-5

+ %pretrans -p <lua>

+ roles = {

+     "certificate", "cockpit", "crypto_policies", "firewall", "ha_cluster",

+     "kdump", "kernel_settings", "logging", "metrics", "nbde_client",

+     "nbde_server", "network", "postfix", "selinux", "ssh", "sshd", "storage",

+     "timesync", "tlog", "vpn"

+ }

+ for i,v in ipairs(roles) do

+     path = "/usr/share/ansible/roles/linux-system-roles." .. v

+     st = posix.stat(path)

+     if st and st.type == "link" then

+       os.remove(path)

+     end

+ end

+ 

  %prep

  %setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -a20 -a21 -a22 -n %{getarchivedir 0}

  
@@ -747,6 +764,10 @@ 

  %endif

  

  %changelog

+ * Tue Nov 8 2022 Sergei Petrosian <spetrosi@redhat.com> - 1.22.0-2

+ - Fix issue with package update introduce with changing symlink to directory

+   in 1.21.1-5

+ 

  * Thu Nov 03 2022 Rich Megginson <rmeggins@redhat.com> - 1.22.0-1

  - ad_integration - new role

  - cockpit - use the firewall, selinux, certificate roles

no initial comment

#1 introduced a bug where roles have been installed to /usr/share/linux-system-roles/, and symlinks added to roles to /usr/share/ansible/roles. These symlinks carried no purpose.
Fedora must install roles directly to /usr/share/ansible/roles.
RHEL installs roles to /usr/share/ansible/roles and creates symlinks for upstream names in the same directory.

Build succeeded.

Is the problem that the RPM upgrade cannot convert the symlink to a directory?

Is the problem that the RPM upgrade cannot convert the symlink to a directory?

Correct, this is a long-standing limitation of RPM. I'm sorry that I didn't think about it before.

EDIT: A reference to rhbz#2141152 should be added to the changelog before this is built.

I screwed up - I thought I merged this first, but I didn't, and now I can't rebase :-(

So I just created a new PR https://src.fedoraproject.org/rpms/linux-system-roles/pull-request/92 that obsoletes this one

Pull-Request has been closed by rmeggins

10 months ago
Metadata