AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  openldap update removes group ldap

    Posted Mon January 24, 2022 07:25 AM
    Hi OpenSource-Team,

    we have found out that the openldap update from 2.4.56-2 to 2.4.58-1 removes the group ldap. We checked the pre/post-scripts in the rpm and they seem to work, so we are not sure where the problem is.

    Any idea why the group ldap is missing after the update?

    Current package in AIX toolbox: 2.4.58-1

    ### Make sure group ldap is available
    root@aixserver0001 /root# lsgroup ldap
    3004-686 Group "ldap" does not exist.
    root@aixserver0001 /root# lsgroup ldap > /dev/null 2>&1 || mkgroup id=55 ldap
    root@aixserver0001 /root# lsgroup ldap
    ldap id=55 admin=false users= registry=files

    ### Update process removes ldap group
    root@aixserver0001 /root# yum update openldap
    Setting up Update Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package openldap.ppc 0:2.4.56-2 will be updated
    ---> Package openldap.ppc 0:2.4.58-1 will be an update
    --> Finished Dependency Resolution

    Dependencies Resolved

    ===========================================================================================================================================================
     Package                            Arch                          Version                             Repository                                      Size
    ===========================================================================================================================================================
    Updating:
     openldap                           ppc                           2.4.58-1                            AIX_YUM_LOCAL_ppc                               4.3 M

    Transaction Summary
    ===========================================================================================================================================================
    Upgrade       1 Package

    Total download size: 4.3 M
    Is this ok [y/N]: y
    Downloading Packages:
    Running Transaction Check
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Updating   : openldap-2.4.58-1.ppc                                                                                                                   1/2
      Cleanup    : openldap-2.4.56-2.ppc                                                                                                                   2/2

    Updated:
      openldap.ppc 0:2.4.58-1

    Complete!
    root@aixserver0001 /root# lsgroup ldap
    3004-686 Group "ldap" does not exist.

    ### Pre/Post-Install scripts of the RPM
    root@aixserver0001 /root# rpm -qi --scripts openldap-2.4.58-1.ppc
    Name        : openldap
    Version     : 2.4.58
    Release     : 1
    Architecture: ppc
    Install Date: Mon Jan 24 13:12:45 MEZ 2022
    Group       : System Environment/Daemons
    Size        : 12925899
    License     : OpenLDAP
    Signature   : (none)
    Source RPM  : openldap-2.4.58-1.src.rpm
    Build Date  : Mon Apr 12 12:25:19 MESZ 2021
    Build Host  : pokndd5.pok.stglabs.ibm.com
    URL         : http://www.openldap.org/
    Summary     : The configuration files, libraries, and documentation for OpenLDAP
    Description :
    OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
    Protocol) applications and development tools. LDAP is a set of
    protocols for accessing directory services (usually phone book style
    information, but other information is possible) over the Internet,
    similar to the way DNS (Domain Name System) information is propagated
    over the Internet. The openldap package contains configuration files,
    libraries, and documentation for OpenLDAP.
    preinstall scriptlet (using /bin/sh):
    # add the "ldap" group only if it does not yet exist
    result=`/usr/sbin/lsgroup ldap | /usr/bin/awk '{ print $1 }' 2>/dev/null`
    if [ "${result}" != "ldap" ] ; then
        /usr/bin/mkgroup ldap 2> /dev/null || :
    fi
    postinstall scriptlet (using /bin/sh):
    if [ "$1" == "2" ];then
      output=$(/usr/bin/lslpp -l|/usr/bin/grep idsldap)
      if [ ! -z "$output" ];then
        version=$(/usr/bin/echo "$output"|/usr/bin/head -1|/usr/bin/awk '{print $2}'|/usr/bin/cut -d. -f1,2)
        echo ""
        echo "Openldap <= 2.4.46-1 overwrites symbolic links created by ibmldap in /usr/bin. From 2.4.46-2 onwards, no files are being shipped in /usr/bin directory."
        echo "So updating openldap from any version <= 2.4.46-1 will remove symbolic links created by ibmldap in /usr/bin. One can recreate them using the following command"
        echo "/opt/IBM/ldap/V${version}/bin/idslink -g -f"
        echo ""
      fi
    fi
    preuninstall scriptlet (using /bin/sh):
    if [ "$1" = "0" ] ; then
      /sbin/service ldap stop > /dev/null 2>&1 || :
    fi
    # remove "ldap" group
    /usr/sbin/rmgroup ldap || :

    ### PreInstall-Snippet seems to work
    root@aixserver0001 /root# if [ "${result}" != "ldap" ] ; then
    >     /usr/bin/mkgroup ldap 2> /dev/null || :
    > fi
    root@aixserver0001 /root# lsgroup ldap
    ldap id=242 admin=false users= registry=files
    ​​​​Best regards

    ------------------------------
    Niklas
    System Engineer UNIX and Linux on Power
    ------------------------------


  • 2.  RE: openldap update removes group ldap

    Posted Mon January 24, 2022 09:48 AM

    The "preuninstallation" script (without any condition) will also run during the update ( new version install & old version uninstall ).

    The "/usr/sbin/rmgroup ldap || : " should have been inside the if condition. 

    We will fix it and upload a new release.



    ------------------------------
    Ayappan P
    ------------------------------



  • 3.  RE: openldap update removes group ldap

    Posted Mon March 28, 2022 08:58 AM
    Edited by Niklas Vosskoetter Mon March 28, 2022 09:45 AM
    Hi OSS-Team,

    we updated to openldap-2.4.58-2 and the problem still exists.

    /root# rpm -qi --scripts openldap
    Name : openldap
    Version : 2.4.58
    Release : 2
    Architecture: ppc
    Install Date: Mon Mar 28 14:44:53 MESZ 2022
    Group : System Environment/Daemons
    Size : 12926257
    License : OpenLDAP
    Signature : (none)
    Source RPM : openldap-2.4.58-2.src.rpm
    Build Date : Tue Nov 16 11:08:50 MEZ 2021
    Build Host : pokndd5.pok.stglabs.ibm.com
    Packager : IBM AIX Toolbox <https://ibm.biz/AIXToolbox>
    URL : http://www.openldap.org/
    Bug URL : https://ibm.biz/aixoss_forum
    Summary : The configuration files, libraries, and documentation for OpenLDAP
    Description :
    OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
    Protocol) applications and development tools. LDAP is a set of
    protocols for accessing directory services (usually phone book style
    information, but other information is possible) over the Internet,
    similar to the way DNS (Domain Name System) information is propagated
    over the Internet. The openldap package contains configuration files,
    libraries, and documentation for OpenLDAP.
    preinstall scriptlet (using /bin/sh):
    # add the "ldap" group only if it does not yet exist
    result=`/usr/sbin/lsgroup ldap | /usr/bin/awk '{ print $1 }' 2>/dev/null`
    if [ "${result}" != "ldap" ] ; then
    /usr/bin/mkgroup ldap 2> /dev/null || :
    fi
    postinstall scriptlet (using /bin/sh):
    if [ "$1" == "2" ];then
    output=$(/usr/bin/lslpp -l|/usr/bin/grep idsldap)
    if [ ! -z "$output" ];then
    version=$(/usr/bin/echo "$output"|/usr/bin/head -1|/usr/bin/awk '{print $2}'|/usr/bin/cut -d. -f1,2)
    echo ""
    echo "Openldap <= 2.4.46-1 overwrites symbolic links created by ibmldap in /usr/bin. From 2.4.46-2 onwards, no files are being shipped in /usr/bin directory."
    echo "So updating openldap from any version <= 2.4.46-1 will remove symbolic links created by ibmldap in /usr/bin. One can recreate them using the following command"
    echo "/opt/IBM/ldap/V${version}/bin/idslink -g -f"
    echo ""
    fi
    fi
    preuninstall scriptlet (using /bin/sh):
    if [ "$1" = "0" ] ; then
    /sbin/service ldap stop > /dev/null 2>&1 || :
    fi
    # remove "ldap" group
    /usr/sbin/rmgroup ldap || :

    /root# lsgroup ldap
    3004-686 Group "ldap" does not exist.


    Best regards

    ------------------------------
    Niklas
    System Engineer UNIX and Linux on Power
    ------------------------------



  • 4.  RE: openldap update removes group ldap

    Posted Mon March 28, 2022 09:48 AM

    This openldap update "2.4.58-2" was pending for a long time. It is to fix the cyrus-sasl library linking. 
    It was built and tested long time back, so it didn't have the fix for this issue.
    We will be soon releasing 2.4.58-3 which will contain the fix. 




    ------------------------------
    Ayappan P
    ------------------------------