Find the answer to your Linux question:
Results 1 to 1 of 1
Complete Thread forums.fedoraforum.org/showthread.php?t=262782 i'm having a spec file task is to build the rpm package with the appripriate version number, the problem what i'm facling is while the building up ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2011
    Posts
    12

    RPM Packaging


    Complete Thread

    forums.fedoraforum.org/showthread.php?t=262782

    i'm having a spec file task is to build the rpm package with the appripriate version number, the problem what i'm facling is while the building up the source code if the version number changes rpm -U is not upgarding instead of installing it as a new one.
    For ex: rpm -qa | grep test
    test-4.2-01.i386

    rpm -Uvvh test-4.2-02.i386

    rpm -qa | grep test
    it shows the both

    test-4.2-01.i386
    test-4.2-02.i386


    ====
    in the spec file i'm specifyin the version number
    %define version 4.2
    %define release 01
    Version: %{version}
    Release: %{release}
    Summary: Test
    Name: test
    License: test
    Group: Applications/System
    Distribution: test 4.2
    Vendor: test
    Prefix: /opt/test
    Prefix: /var/test
    # turn off auto dependancy checking
    AutoReqProv: no

    %description
    RPM build Example

    %prep

    %build

    %install

    %clean
    .......
    .................................................. .
    [root@aninath-lnx bacc]# rpm -qi test-4.2-02.i386
    Name : test Relocations: /opt/test /var/test
    Version : 4.2 Vendor: test
    Release : 02 Build Date: Tue 10 May 2011 01:24:40 AM PDT
    Install Date: Tue 10 May 2011 01:46:16 AM PDT Build Host: aninath-lnx
    Group : Applications/System Source RPM: test-4.2-02.src.rpm
    Size : 48513857 License: test
    Signature : (none)
    Summary : Test
    Description :RPMbuild Example

    [root@aninath-lnx]# rpm -qi test-4.2-01.i386
    Name : test Relocations: /opt/test /var/test
    Version : 4.2 Vendor: test
    Release : 01 Build Date: Tue 10 May 2011 01:21:06 AM PDT
    Install Date: Tue 10 May 2011 01:44:38 AM PDT Build Host: aninath-lnx
    Group : Applications/System Source RPM: test-4.2-01.src.rpm
    Size : 48505407 License: test
    Signature : (none)
    Summary : Test
    Description :RPMbuild Example
    ===================================
    Re: Rpm

    --------------------------------------------------------------------------------

    rpm -Uvvh install/Linux/obj_lnx/rpm/RPMS/i386/test-4.2-02.i386.rpm
    D: ============== install/Linux/obj_lnx/rpm/RPMS/i386/test-4.2-02.i386.rpm
    D: Expected size: 29871144 = lead(96)+sigs(180)+pad(4)+data(29870864)
    D: Actual size: 29871144
    D: install/Linux/obj_lnx/rpm/RPMS/i386/test-4.2-02.i386.rpm: Header SHA1 digest: OK (e8733af0f93adf2be178d4c556778e17ba2bdc23)
    D: opening db environment /var/lib/rpm/Packages joinenv
    D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
    D: locked db index /var/lib/rpm/Packages
    D: opening db index /var/lib/rpm/Name rdonly mode=0x0
    D: read h# 1387 Header SHA1 digest: OK (89a61ccfa0d8c34224cc8f0bf2ab6c1d5bc4cb3
    D: added binary package [0]
    D: found 0 source and 1 binary packages
    D: ========== +++ test-4.2-02 i386/linux 0x0
    D: opening db index /var/lib/rpm/Depends create mode=0x0
    D: opening db index /var/lib/rpm/Basenames rdonly mode=0x0
    D: opening db index /var/lib/rpm/Pubkeys rdonly mode=0x0
    D: read h# 1107 Header sanity check: OK
    D: ========== DSA pubkey id 53268101 37017186 (h#1107)
    D: read h# 62 Header V3 DSA signature: OK, key ID 37017186
    D: Requires: /bin/sh YES (db files)
    D: Requires: /bin/sh YES (cached)
    D: Requires: /bin/sh YES (cached)
    D: Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 YES (rpmlib provides)
    D: Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 YES (rpmlib provides)
    D: opening db index /var/lib/rpm/Conflictname rdonly mode=0x0
    D: ========== --- test-4.2-01 i386/linux 0x0
    D: opening db index /var/lib/rpm/Requirename rdonly mode=0x0
    D: closed db index /var/lib/rpm/Depends
    D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth, breadth)
    D: 0 0 0 1 1 0 -test-4.2-01.i386
    D: ========== successors only (0 bytes)
    D: 1 0 0 0 1 1 +test-4.2-02.i386
    ===================================
    Last edited by anish2good; 05-10-2011 at 12:07 PM. Reason: More Info

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •