AIX Open Source

 View Only
Expand all | Collapse all

updtvpkg error

  • 1.  updtvpkg error

    Posted Wed March 08, 2023 09:41 AM

    Hello,

    We have errors when we want to update AIX-virtual rpm packages, so with debug mode we can see

    # sh -x /usr/sbin/updtvpkg
    + sleep 1
    + [[ en_US = en_US ]]
    + export LANG=C
    + + /usr/bin/rpm -q --queryformat %{RELEASE} AIX-rpm
    + 2> /dev/null
    current_release=package AIX-rpm is not installed
    + [[ -z package AIX-rpm is not installed ]]
    + [[ package AIX-rpm is not installed == package AIX-rpm is not installed ]]
    + current_release=0
    + ((  release = 0 + 1  ))
    + + /usr/bin/dspmsg -s 3 cmdinstl_e.cat 49 Please wait...\n
    waitmsg=Please wait...
    + echo Please wait...\c
    Please wait...+ + /usr/bin/lslpp -qLc bos.rte
    + /usr/bin/cut -d: -f3
    version=7.2.2.15
    + + /usr/bin/rpm --eval %{_rpmdir}
    rpmdir=/packages/aix/creation_rpm/RPMS
    + + /usr/bin/rpm --eval %{_srcrpmdir}
    srcrpmdir=/packages/aix/creation_rpm/SRPMS
    + update_virtual_package 1
    + 1> /tmp/mkvirtpkg.11796766
    + [[ -s /tmp/mkvirtpkg.11796766 ]]
    + /usr/bin/rpmbuild -ba /tmp/mkvirtpkg.11796766
    + 1> /tmp/mkvirtpkg.11796766.out 2>& 1
    + [[ 0 -eq 0 ]]
    + + /usr/bin/rpm --showrc
    + LANG=C
    + /usr/bin/grep ^build arch
    + /usr/bin/awk {print $NF}
    arch=ppc
    + + /usr/bin/rpm --showrc
    + LANG=C
    + /usr/bin/grep ^build os
    + /usr/bin/awk {print $NF}
    os=aix7.2
    + /usr/bin/rpm --nodeps -U /packages/aix/creation_rpm/RPMS/ppc/AIX-rpm-7.2.2.15-1.aix7.2.ppc.rpm
    error: open of /packages/aix/creation_rpm/RPMS/ppc/AIX-rpm-7.2.2.15-1.aix7.2.ppc.rpm failed: No such file or directory
    + [[ 1 -ne 0 ]]
    + /usr/bin/cat /tmp/mkvirtpkg.11796766.out
    warning: line 8: It's not recommended to have unversioned Obsoletes: Obsoletes: SysProvides
    Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.XmFaea
    + umask 022
    + cd /packages/aix/creation_rpm/BUILD
    + RPM_EC=0
    + jobs -p
    + exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.XmFaeb
    + umask 022
    + cd /packages/aix/creation_rpm/BUILD
    + RPM_EC=0
    + jobs -p
    + exit 0
    Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.XqFaec
    + umask 022
    + cd /packages/aix/creation_rpm/BUILD
    + RPM_EC=0
    + jobs -p
    + exit 0
    Processing files: AIX-rpm-7.2.2.15-1.ppc
    Wrote: /packages/aix/creation_rpm/SRPMS/AIX-rpm-7.2.2.15-1.src.rpm
    Wrote: /packages/aix/creation_rpm/RPMS/ppc/AIX-rpm-7.2.2.15-1.ppc.rpm
    Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.XyFaed
    + umask 022
    + cd /packages/aix/creation_rpm/BUILD
    + RPM_EC=0
    + jobs -p
    + exit 0
    + echo

    + /usr/bin/rm -rf /tmp/mkvirtpkg.11796766 /tmp/mkvirtpkg.11796766.out
    + /usr/bin/rpm -q AIX-rpm
    + 1> /dev/null
    + exit 1

    echo $LIBPATH
    /usr/lib:/opt/freeware/lib

    oslevel 7200-02-02-1806

    bos.rte 7.2.2.15

     lslpp -l rpm.rte
      Fileset                      Level  State      Description
      ----------------------------------------------------------------------------
    Path: /usr/lib/objrepos
      rpm.rte                   4.15.1.1  COMMITTED  RPM Package Manager

    Path: /etc/objrepos
      rpm.rte                   4.15.1.1  COMMITTED  RPM Package Manager

     lslpp -l|grep openssl
      openssl.base            1.0.2.2105  COMMITTED  Open Secure Socket Layer
      openssl.license         1.0.2.2105  COMMITTED  Open Secure Socket License
      openssl.man.en_US       1.0.2.2105  COMMITTED  Open Secure Socket Layer
      openssl.base            1.0.2.2105  COMMITTED  Open Secure Socket Layer

    lslpp -l|grep openssh
      openssh.base.client   8.1.102.2106  COMMITTED  Open Secure Shell Commands
      openssh.base.server   8.1.102.2106  COMMITTED  Open Secure Shell Server
      openssh.msg.en_US     8.1.102.2106  COMMITTED  Open Secure Shell Messages -
      openssh.base.client   8.1.102.2106  COMMITTED  Open Secure Shell Commands
      openssh.base.server   8.1.102.2106  COMMITTED  Open Secure Shell Server

    rpm -qa is empty

    Can someone help me to solve this problem ?

    The end goal is then to install ase-1.05-45.aix6.1.rpm because for the moment we can not 

     rpm -i --test ase-1.05-45.aix6.1.rpm
    error: Failed dependencies:
            /bin/sh is needed by ase-1.05-45.ppc
            libbind.a(shr.o) is needed by ase-1.05-45.ppc
            libc.a(shr.o) is needed by ase-1.05-45.ppc
            libcrypt.a(shr.o) is needed by ase-1.05-45.ppc
            libdl.a(shr.o) is needed by ase-1.05-45.ppc
            libnsl.a(shr.o) is needed by ase-1.05-45.ppc
            libpthreads.a(shr_comm.o) is needed by ase-1.05-45.ppc
            libpthreads.a(shr_xpg5.o) is needed by ase-1.05-45.ppc
            librtl.a(shr.o) is needed by ase-1.05-45.ppc

    Have you an idea ....?

    Thanks a lot for your help

    HBO



    ------------------------------
    HBO
    ------------------------------


  • 2.  RE: updtvpkg error

    Posted Fri March 10, 2023 03:47 AM

    Hello

    does anyone have an idea ? 

    Thanks a lot 

    HBO



    ------------------------------
    HBO
    ------------------------------



  • 3.  RE: updtvpkg error

    Posted Sun March 12, 2023 02:04 PM

     

    Looks like someone has deleted the AIX-rpm by mistake.

    Also looks like you have changed rpmmacros for default RPM build directory structure.

    It should be /opt/freeware/src/packages in your case it is /packages/aix/creation_rpm/

    This dir /packages/aix/creation_rpm/ does not exists and hence the error.

    Either move back to the default RPM build directory structure or have a build directory structure in /packages/aix/creation_rpm/

     

     

    Thanks,

     

    Sanket Rathi

     






  • 4.  RE: updtvpkg error

    Posted Fri March 24, 2023 11:47 AM

    Hello Sanket Rathi,

    Thanks a lot for your response

    This dir /packages/aix/creation_rpm/ does not exists and hence the error.

    Either move back to the default RPM build directory structure or have a build directory structure in /packages/aix/creation_rpm/

    How to do it  please ?

    Thanks,

    HBO



    ------------------------------
    HBO
    ------------------------------



  • 5.  RE: updtvpkg error

    Posted Tue March 28, 2023 02:33 AM

    Hi Hakim,

    Looks like you the customised rpm macros set in ~/.rpmmacros

    However, it looks like you the wrong macro for _build_name_fmt

    I think you have

    %_build_name_fmt    %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

    instead of 

     _build_name_fmt    %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm

    The "updtvpkg" script looks for virtual package built in format of %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm

    However we have built %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm.

    If you don't have ~/.rpmmacros then the default macro file to verify is /usr/opt/rpm/lib/rpm/macros



    ------------------------------
    SANGAMESH
    ------------------------------



  • 6.  RE: updtvpkg error

    Posted Tue April 11, 2023 11:26 AM
      |   view attached

    Hi Sangamesh,

    thanks a lot for your answer

    This dir /packages/aix/creation_rpm/ does exist since 2012

    # ls -ltr /packages/aix/creation_rpm/SRPMS/AIX*
    -rw-r--r--    1 root     system        10171 Mar 08 12:05 /packages/aix/creation_rpm/SRPMS/AIX-rpm-7.2.2.15-1.src.rpm
    # ls -ltr /packages/aix/creation_rpm/RPMS/ppc/AIX*
    -rw-r--r--    1 root     system        20051 Sep 10 2018  /packages/aix/creation_rpm/RPMS/ppc/AIX-rpm-7.1.2.15-5.ppc.rpm
    -rw-r--r--    1 root     system        26432 Mar 08 12:05 /packages/aix/creation_rpm/RPMS/ppc/AIX-rpm-7.2.2.15-1.ppc.rpm

    You can see the content in the attached file 

    Thank a lot 
    Regards, 

    HBO



    ------------------------------
    HBO
    ------------------------------

    Attachment(s)



  • 7.  RE: updtvpkg error

    Posted Wed April 12, 2023 01:40 PM

    Hi Hakim,

    As mentioned please check the "_build_name_fmt".
    This macro in your case doesn't seem to be having OS field included when an AIX-rpm package is generated.



    ------------------------------
    SANGAMESH
    ------------------------------



  • 8.  RE: updtvpkg error

    Posted Tue April 18, 2023 05:28 AM

    Hi Sangamesh, 

    I checked the "_build_name_fmt" and this macro has an OS field included as you can see
    For information we don't have ~/.rpmmacros 


    [root@bu8z] /
    # ls -ltr  /usr/opt/rpm/lib/rpm/macros*
    -rw-r--r--    1 root     system        46048 Jul 21 2020  /usr/opt/rpm/lib/rpm/macros
    -rw-r--r--    1 root     system        46070 Mar 15 2021  /usr/opt/rpm/lib/rpm/macros-save-24062022
    -rw-r--r--    1 root     system        46070 Mar 15 2021  /usr/opt/rpm/lib/rpm/macros-27062022

    /usr/opt/rpm/lib/rpm/macros.d:
    total 0
    # file /usr/opt/rpm/lib/rpm/macros
    /usr/opt/rpm/lib/rpm/macros: commands text
    [root@bu8z] /
    # grep %_build_name_fmt  /usr/opt/rpm/lib/rpm/macros
    %_build_name_fmt        %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm
    [root@bu8z] /
    # grep %_build_name_fmt /usr/opt/rpm/lib/rpm/macros-save-24062022
    %_build_name_fmt        %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm
    [root@bu8z] /
    # grep %_build_name_fmt /usr/opt/rpm/lib/rpm/macros-27062022
    %_build_name_fmt        %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm
    [root@bu8z] /

    I don't understand, do you have any idea please ?
    Thanks you very much for your time

    Regards,
    HBO



    ------------------------------
    HBO
    ------------------------------



  • 9.  RE: updtvpkg error

    Posted Tue April 18, 2023 07:33 AM

    Hi Hakim

    Can you let me know the output of "rpm --showrc | grep _build_name_fmt"



    ------------------------------
    SANGAMESH
    ------------------------------



  • 10.  RE: updtvpkg error

    Posted Tue April 18, 2023 08:35 AM

    Hi Sangamesh,

    thanks for your feedback

    [root@bu8z] /
    # rpm --showrc | grep _build_name_fmt
    -13: _build_name_fmt    %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm

    [root@bu8z] /
    # rpm --showrc|grep _rpmfilename
    -13: _rpmfilename       %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%{ARCH}.rpm

    Regards,
    HBO



    ------------------------------
    HBO
    ------------------------------



  • 11.  RE: updtvpkg error

    Posted Tue April 18, 2023 10:36 AM

    Hi Hakim

    Usually _rpmfilename is same as _build_name_fmt which has the OS field.

    # rpm --showrc | grep  _rpmfilename
    -13: _rpmfilename       %{_build_name_fmt}

    Please also verify the file /usr/opt/rpm/lib/rpm/macros



    ------------------------------
    SANGAMESH
    ------------------------------



  • 12.  RE: updtvpkg error

    Posted Wed April 19, 2023 09:03 AM

    Hi Sangemesh,

    I hope you are well ! 

    Here is the information
    1)
    [root@bu8z] /
    # ls -ltr  /usr/opt/rpm/lib/rpm/macros*
    -rw-r--r--    1 root     system        46048 Jul 21 2020  /usr/opt/rpm/lib/rpm/macros
    -rw-r--r--    1 root     system        46070 Mar 15 2021  /usr/opt/rpm/lib/rpm/macros-save-24062022
    -rw-r--r--    1 root     system        46070 Mar 15 2021  /usr/opt/rpm/lib/rpm/macros-27062022

    /usr/opt/rpm/lib/rpm/macros.d:
    total 0
    # file /usr/opt/rpm/lib/rpm/macros
    /usr/opt/rpm/lib/rpm/macros: commands text
    [root@bu8z] /
    # grep %_build_name_fmt  /usr/opt/rpm/lib/rpm/macros
    %_build_name_fmt        %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm
    [root@bu8z] /
    # grep %_build_name_fmt /usr/opt/rpm/lib/rpm/macros-save-24062022
    %_build_name_fmt        %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm
    [root@bu8z] /
    # grep %_build_name_fmt /usr/opt/rpm/lib/rpm/macros-27062022
    %_build_name_fmt        %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm
    [root@bu8z] /
    #

    2)
    Thanks 
    Regards

    HBO



    ------------------------------
    HBO
    ------------------------------



  • 13.  RE: updtvpkg error

    Posted Thu April 20, 2023 10:09 AM

    Hi Sangamesh,

    In addition, for _rpmfilename

    [root@bu8z] /
    # grep %_rpmfilename /usr/opt/rpm/lib/rpm/macros
    %_rpmfilename           %{_build_name_fmt}
    [root@bu8z] /

    Thanks a lot
    Regards,

    HBO



    ------------------------------
    HBO
    ------------------------------



  • 14.  RE: updtvpkg error

    Posted Mon May 22, 2023 09:57 AM

    Hello Sangamesh and Team,

    I am still facing this issue, have you an idea ?

    Thanks for your help 
    Regards,
    Hakim



    ------------------------------
    HBO
    ------------------------------



  • 15.  RE: updtvpkg error

    Posted Tue May 23, 2023 06:27 AM

    Hi Hakim,

    In one of your output i have seen 
    # rpm --showrc|grep _rpmfilename
    -13: _rpmfilename       %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%{ARCH}.rpm

    Can you check if this is missing OS field ?



    ------------------------------
    SANGAMESH
    ------------------------------



  • 16.  RE: updtvpkg error

    Posted Tue May 30, 2023 06:01 AM

    Hi Sangamesh,

    I hope you are well, 

    [root@bu8z] /
    # rpm --showrc | grep _build_name_fmt
    -13: _build_name_fmt    %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm

    [root@bu8z] /
    # rpm --showrc|grep _rpmfilename
    -13: _rpmfilename       %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%{ARCH}.rpm

    %%{OS} is missing in _rpmfilename,
    How I can edit it or add it to have the same ?

    Thank in advance

    Regards,
    HBO



    ------------------------------
    HBO
    ------------------------------



  • 17.  RE: updtvpkg error

    Posted Tue May 30, 2023 08:40 AM

    You can edit this file --> /usr/opt/rpm/lib/rpm/macros
    Make it refer to _build_name_fmt

    %_rpmfilename           %{_build_name_fmt}



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



  • 18.  RE: updtvpkg error

    Posted Fri June 09, 2023 09:37 AM

    Hello Ayappan,

    Thanks for your feedback

    I have checked %_rpmfilename in file macros but it is already refer to _build_name_fmt

    [root@bu8z] /
    # grep %_rpmfilename /usr/opt/rpm/lib/rpm/macros*
    /usr/opt/rpm/lib/rpm/macros:%_rpmfilename               %{_build_name_fmt}

    How to resolve this issue ?

    Thanks a lot for your ideas 

    HBO



    ------------------------------
    HBO
    ------------------------------



  • 19.  RE: updtvpkg error

    Posted Mon June 12, 2023 03:35 AM

    You need to check whether any other rpm macros file is overriding this. You can see the list of macros file which the rpm can use by running the below command.

    rpm --showrc | grep "Macro path"



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



  • 20.  RE: updtvpkg error

    Posted Fri June 16, 2023 09:32 AM

    Hello Ayappan,

    I hope you are well,

    Sorry but I'm not familiar with rpm

    how understand this result

    [root@bu8z] /
    # rpm --showrc | grep "Macro path"
    Macro path: /usr/opt/rpm/lib/rpm/macros:/usr/opt/rpm/lib/rpm/macros.d/macros.*:/usr/opt/rpm/lib/rpm/platform/%{_target}/macros:/usr/opt/rpm/lib/rpm/fileattrs/*.attr:/usr/opt/rpm/lib/rpm/ibm/macros:/usr/opt/rpm/etc/rpm/macros.*:/usr/opt/rpm/etc/rpm/macros:/usr/opt/rpm/etc/rpm/%{_target}/macros:~/.rpmmacros
    [root@bu8z] /

    Thank you for your clarifications

    Regards,

    HBO



    ------------------------------
    HBO
    ------------------------------



  • 21.  RE: updtvpkg error

    Posted Fri June 23, 2023 04:35 AM

    Hello 

    Any update of this issue and explanations

    Thanks for all

    Regards,

    HBO



    ------------------------------
    HBO
    ------------------------------



  • 22.  RE: updtvpkg error

    Posted Fri June 23, 2023 04:57 AM

    You mentioned that in /usr/opt/rpm/lib/rpm/macros , _rpmfilename refers to _build_name_fmt. 
    So something is overriding it. In the above output, you can see the macros files which can do this. You need to open these files and check whether _rpmfilename has a different entry.



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