Bug 2208570 - python3-ipaserver requires rpm-libs
Summary: python3-ipaserver requires rpm-libs
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: freeipa
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: IPA Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-19 15:13 UTC by Petr Pisar
Modified: 2023-05-19 15:37 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-05-19 15:36:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-9907 0 None None None 2023-05-19 15:15:16 UTC

Description Petr Pisar 2023-05-19 15:13:59 UTC
May I know why python3-ipaserver-0:4.10.1-5.fc39.noarch depends on rpm-libs? The explicit run-time dependency was added with:

commit e7de033e9ef5f06fd35d58d00667e0c21f161971
Author: Thomas Woerner <twoerner>
Date:   Mon Sep 3 17:50:10 2018 +0200

    - Restore SELinux context of session_dir /etc/httpd/alias (pagure#7662)
    - Restore SELinux context of template_dir /var/log/dirsrv/slapd-X (pagure#7662)
    - Add "389-ds-base-legacy-tools" to requires
    - Refactor os-release and platform information (#1609475)
    - Don't check for systemd service (#1609475)
    - Switched to upstream spec file with small adaptions

We are now rebuilding all rpm-libs reverse dependencies because of an ABI change and we question whether freeipa needs a rebuild or not.

Reproducible: Always

Comment 1 Alexander Bokovoy 2023-05-19 15:19:37 UTC
FreeIPA uses Python ctypes to load `librpm` and run `rpmvercmp()` method:

@total_ordering
class IPAVersion:
    _rpmvercmp_func = None

    @classmethod
    def _rpmvercmp(cls, a, b):
        """Lazy load and call librpm's rpmvercmp
        """
        rpmvercmp_func = cls._rpmvercmp_func
        if rpmvercmp_func is None:
            librpm = ctypes.CDLL(find_library('rpm'))
            rpmvercmp_func = librpm.rpmvercmp
            # int rpmvercmp(const char *a, const char *b)
            rpmvercmp_func.argtypes = [ctypes.c_char_p, ctypes.c_char_p]
            rpmvercmp_func.restype = ctypes.c_int
            cls._rpmvercmp_func = rpmvercmp_func
        return rpmvercmp_func(a, b)


Since this happens in runtime, we should be OK with any ABI that implements the same `rpmvercmp(const char *a, const char *b)` function. If this is not a problem with this ABI change, a rebuild of freeipa package is not needed.

Comment 2 Petr Pisar 2023-05-19 15:36:59 UTC
Thanks for the explanation. The new rpm library did not change rpmvercmp(). The prototypes remains "int rpmvercmp(const char * a, const char * b)" and the semantics is preserved. That means freeipa is fine and no rebuild is required.


Note You need to log in before you can comment on or make changes to this bug.