wiki:HP-UX

Porting on HP-UX

HP-UX packages

Software Package Builder 7.0 User's Guide

Software Distributor Administration Guide

Port from scratch

These notes are taken as the HP-UX 11.23 port is occuring

  • Working on a pre-installed HP-UX machine
  • Download the source of project-builder.org
    $ wget ftp://ftp.project-builder.org/src/project-builder-latest.tar.gz
    $ wget ftp://ftp.project-builder.org/src/ProjectBuilder-latest.tar.gz
    
  • Extract the sources
    $ gzip -cd ProjectBuilder-latest.tar.gz | tar xf -
    $ gzip -cd project-builder-latest.tar.gz | tar xf -
    
  • Install the project
    $ cd ProjectBuilder-0.10.1/
    $ perl Makefile.PL
    $ make
    $ sudo make install
    $ cd ../project-builder-0.10.1/
    $ perl Makefile.PL
    $ make
    $ sudo make install
    
  • Test that project-builder is installed and working correctly
  • Build project-builder.org with itself to create native packages
    $ echo > ~/.pbrc << EOF
    pburl pb = svn+ssh://bruno@mondo.hpintelco.net/mondo/svn/pb
    pbconfurl pb = svn+ssh://svn.project-builder.net/mondo/svn/pb/pbconf
    pbdefdir default = $ENV{'HOME'}/pb/projects
    pbdefdir pb = $ENV{'HOME'}
    pbconfdir pb = $ENV{'HOME'}/pb/pbconf
    EOF
    $ pb -p pb -r devel cms2pkg
    [...]
    

Make depot for HP-UX software distribution

  • Create control files for ProjectBuilder?
    # vi postinstall
    "postinstall" 11 lines, 860 characters 
    #!/usr/bin/sh
    export PATH=/opt/perl_32/bin
    pod2man --section=1 $SOURCELOC/bin/pbdistrocheck > /opt/perl_32/man/man1/pbdistrocheck.1
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/Base.pm > /opt/perl_32/man/man3/ProjectBuilder::Base.3
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/Conf.pm > /opt/perl_32/man/man3/ProjectBuilder::Conf.3
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/Display.pm > /opt/perl_32/man/man3/ProjectBuilder::Display.3
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/Distrobution.pm > /opt/perl_32/man/man3/ProjectBuilder::Distrobution.3
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/Log/Item.pm > /opt/perl_32/man/man3/ProjectBuilder::Item.3
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/Log.pm > /opt/perl_32/man/man3/ProjectBuilder::Log.3
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/Version.pm > /opt/perl_32/man/man3/ProjectBuilder::Version.3
    pod2man --section=5 $SOURCELOC/etc/pb.conf.pod > /usr/local/share/man/man5/pb.conf.5
    # vi postremove
    "postremove" 11 lines, 458 characters
    #!/usr/bin/sh 
    export PATH=/usr/bin
    rm -f /opt/perl_32/man/man1/pbdistrocheck.1
    rm -f /opt/perl_32/man/man3/ProjectBuilder::Base.3
    rm -f /opt/perl_32/man/man3/ProjectBuilder::Conf.3
    rm -f /opt/perl_32/man/man3/ProjectBuilder::Display.3
    rm -f /opt/perl_32/man/man3/ProjectBuilder::Distrobution.3
    rm -f /opt/perl_32/man/man3/ProjectBuilder::Item.3
    rm -f /opt/perl_32/man/man3/ProjectBuilder::Log.3
    rm -f /opt/perl_32/man/man3/ProjectBuilder::Version.3
    rm -f /usr/local/share/man/man5/pb.conf.5
    

  • Create pb psf(product specification file) for ProjectBuilder?
    # vi pb.psf
    "pb.psf" 41 lines, 874 characters 
            depot
                    layout_version   1.0
    
            vendor
                    tag              HP
                    description      HP EMEA CME solution center
                    title            HP Intel Redhat Lab
    
            category
                    tag              package_tool
                    description      packags source code to different OS platform
    
            product
                    tag             PB
                    architecture    HP-UX_B.11.23_32/64
                    category        package_tool
            #       copyright       <copyright
                    description     "PB part of package tool to distribute source code for
                                    different OS platform"
                    directory       /opt/perl_32
                    is_locatable    false
                    is_patch        false
                    machine_type    *
                    os_name         HP-UX
                    os_release      ?.11.23.*
                    revision        0.10.1
                    title           ProjectBuilder
                    vendor_tag      HP
            fileset
                    tag             commands
                    architecture    HP-UX_B.11.23_32/64
            #       prerequisites
                    postinstall     ./postinstall
                    postremove      ./postremove
                    directory       ./bin=/opt/perl_32/bin
                    file            -m 755 -o root -g sys pbdistrocheck
                    directory       ./lib/ProjectBuilder=/opt/perl_32/lib/5.8.8/ProjectBuilder
                    file_permissions  -m 644 -o root -g sys
                    file            *
    
    
  • Create control files for project-builder
    # vi postinstall
    "postinstall" 9 lines, 576 characters 
    #!/usr/bin/sh
    export PATH=/opt/perl_32/bin
    pod2man --section=1 $SOURCELOC/bin/pb > /opt/perl_32/man/man1/pb.1
    pod2man --section=1 $SOURCELOC/bin/pbg > /opt/perl_32/man/man1/pbg.1
    pod2man --section=1 $SOURCELOC/bin/pbvi > /opt/perl_32/man/man1/pbvi.1
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/Changelog.pm > /opt/perl_32/man/man3/ProjectBuilder::Changelog.3
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/CMS.pm > /opt/perl_32/man/man3/ProjectBuilder::CMS.3
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/Env.pm > /opt/perl_32/man/man3/ProjectBuilder::Env.3
    pod2man --section=3 $SOURCELOC/lib/ProjectBuilder/Filter.pm > /opt/perl_32/man/man3/ProjectBuilder::Filter.3
    # vi postremove
    "postremove" 7 lines, 311 characters 
    #!/usr/bin/sh
    export PATH=/usr/bin
    rm -f /opt/perl_32/man/man1/pb.1
    rm -f /opt/perl_32/man/man1/pbg.1
    rm -f /opt/perl_32/man/man1/pbvi.1
    rm -f /opt/perl_32/man/man3/ProjectBuilder::Changelog.3
    rm -f /opt/perl_32/man/man3/ProjectBuilder::CMS.3
    rm -f /opt/perl_32/man/man3/ProjectBuilder::Env.3
    rm -f /opt/perl_32/man/man3/ProjectBuilder::Filter.3
    
  • Create pb psf(product specification file) for project-builder
    # vi p-b.psf
    "p-b.psf" 41 lines, 874 characters 
            depot
                    layout_version   1.0
    
            vendor
                    tag              HP
            depot
                    layout_version   1.0
    
            vendor
                    tag              HP
                    description      HP EMEA CME solution center
                    title            HP Intel Redhat Lab
    
            category
                    tag              package_tool
                    description      packags source code to different OS platform
                   
            product
                    tag             p-b     
                    architecture    HP-UX_B.11.23_32/64
                    category        package_tool
            #       copyright       <copyright
                    description     "PB part of package tool to distribute source code for
                                    different OS platform"
                    directory       /opt/perl_32
                    is_locatable    false
                    is_patch        false
                    machine_type    *
                    os_name         HP-UX
                    os_release      ?.11.23.*
                    revision        0.10.1
                    title           project-builder
                    vendor_tag      HP      
            fileset
                    tag             commands
                    architecture    HP-UX_B.11.23_32/64
            #       prerequisites
                    postinstall     ./postinstall
                    postremove      ./postremove
                    directory       ./bin=/opt/perl_32/bin
                    file_permissions  -m 755 -o root -g sys
                    file            pb
                    file            pbg
                    file            pbvi
                    directory       ./lib/ProjectBuilder=/opt/perl_32/lib/5.8.8/ProjectBuilder
                    file_permissions  -m 644 -o root -g sys
                    file            *
    
  • Package pb as HPUX-SD format based on its psf file then register into depository
    # swpackage -s pb.psf -d /tmp/pb.depot
    
    =======  01/24/11 12:50:50 EAT  BEGIN swpackage SESSION
    
           * Session started for user "root@ux14230".
             
           * Source:        ux14230:pb.psf
           * Target:        ux14230:/tmp/pb.depot
           * Software selections:
                 *
    
    
           * Beginning Selection Phase.
           * Reading the Product Specification File (PSF) "pb.psf".
           * Reading the product "PB" at line 13.
           * Reading the fileset "commands" at line 30.
    
           * Selection Phase succeeded.
    
    
           * Beginning Analysis Phase.
    NOTE:    The estimated free disk space required on filesystem "/tmp" is
             112 Kbyte blocks.  This requirement will leave 2077472 Kbyte
             blocks of free disk space on the filesystem after the
             packaging session completes.
           * Analysis Phase succeeded.
    
    
           * Beginning Package Phase.
           * Packaging the product "PB".
           * Packaging the fileset "PB.commands".
           * Package Phase succeeded.
    
    =======  01/24/11 12:50:51 EAT  END swpackage SESSION
    # swpackage -s p-b.psf -d /tmp/pb.depot
    
    =======  01/24/11 13:36:30 EAT  BEGIN swpackage SESSION
    
           * Session started for user "root@ux14230".
             
           * Source:        ux14230:p-b.psf
           * Target:        ux14230:/tmp/pb.depot
           * Software selections:
                 *
    
    
           * Beginning Selection Phase.
           * Reading the Product Specification File (PSF) "p-b.psf".
           * Reading the product "p-b" at line 13.
           * Reading the fileset "commands" at line 30.
    
           * Selection Phase succeeded.
    
    
           * Beginning Analysis Phase.
    NOTE:    The estimated free disk space required on filesystem "/tmp" is
             248 Kbyte blocks.  This requirement will leave 2077152 Kbyte
             blocks of free disk space on the filesystem after the
             packaging session completes.
           * Analysis Phase succeeded.
    
    
           * Beginning Package Phase.
           * Packaging the product "p-b".
           * Packaging the fileset "p-b.commands".
           * Package Phase succeeded.
    
    =======  01/24/11 13:36:30 EAT  END swpackage SESSION
    
    # swreg -l depot /tmp/pb.depot
    
    =======  01/24/11 13:38:37 EAT  BEGIN swreg SESSION (non-interactive)
    
           * Session started for user "root@ux14230".
             
           * Beginning Selection
           * Targets:                ux14230
           * Objects:                /tmp/pb.depot
           * Selection succeeded.
             
             
    
    =======  01/24/11 13:38:37 EAT  END swreg SESSION (non-interactive)
    
    
  • install pb.depot on HPUX platform (Make sure the swinstall option “make install incompatible software in target” is true.)
    #swinstall -s /temp/pb.depot -x allow_incompatible=true
    
    ┌ ===             SD Install - Software Selection (ux14230) (1)                ┐  
    │File View Options Actions                                                Help │  
    │                       Press CTRL-K for keyboard help.                        │  
    │Source: ux14230:/tmp/pb.depot                                                 │  
    │Target:  ux14230:/                                                            │  
    │                                                                              │  
    │All software on the source is available for selection.                        │                
    │──────────────────────────────────────────────────────────────────────────────│                
    │Top (Bundles and Products)                                     0 of 3 selected│                
    │──────────────────────────────────────────────────────────────────────────────│                
    │  Marked?    Name                  Revision        Information       Size(    │                
    │┌───────────────────────────────────────────────────────────────────────────┐ │                
    ││            PB               ->   0.10.1          ProjectBuilder           ^ │                
    ││            p-b              ->   0.10.1          project-builder        1   │                
    ││            pb               ->   0.9.10          project-builder            │                
    ││                                                                             │                
    ││                                                                             │                
    ││                                                                             │                
    ││                                                                             │                
    ││                                                                             │                
    ││                                                                           v │                
    │ <─────────────────────────────────────────────────────────────────────────>┘ │                
    │                                                                              │  
    └──────────────────────────────────────────────────────────────────────────────┘  
    
    

then follow the instruction to install pb project, please ignore the incompatible warning message.

  • to check the product of pb installed successfully by swlist command or run the command pb
    # swlist -l file PB
    # Initializing...
    # Contacting target "ux14230"...
    #
    # Target:  ux14230:/
    #
    
    # PB            0.10.1         ProjectBuilder 
    # PB.commands                                 
      /opt/perl_32/bin/pbdistrocheck                       
      /opt/perl_32/lib/5.8.8/ProjectBuilder                
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Base.pm                
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Conf.pm                
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Display.pm                     
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Distribution.pm                
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Log                    
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Log.pm                 
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Log/Item.pm                    
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Version.pm 
    
    # swlist -l file p-b
    # Initializing...
    # Contacting target "ux14230"...
    #
    # Target:  ux14230:/
    #
    
    # p-b           0.10.1         project-builder 
    # p-b.commands                                
      /opt/perl_32/bin/pb                  
      /opt/perl_32/bin/pbg                 
      /opt/perl_32/bin/pbvi                
      /opt/perl_32/lib/5.8.8/ProjectBuilder                
      /opt/perl_32/lib/5.8.8/ProjectBuilder/CMS.pm                 
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Changelog.pm                   
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Env.pm                 
      /opt/perl_32/lib/5.8.8/ProjectBuilder/Filter.pm 
    
    # pb
    pb (aka project-builder.org) Version 0.10.1-1162
    
    Usage:
        pb [-vhSq][-r pbroot][-p project][[-s script -a account -P port][-t
        os-ver-arch][-m os-ver-arch[,...]]][-g][-i iso] <action> [<pkg1> ...]
    
        pb [--verbose][--help][--man][--quiet][--snapshot][--revision
        pbroot][--project project][[--script script --account account --port
        port][--target os-ver-arch][--machine
        os-ver-arch[,...]]][--nographic][--iso iso] <action> [<pkg1> ...]
    
    Options:
        -v|--verbose
            Print a brief help message and exits.
    ...
    
    
Last modified 7 years ago Last modified on Jan 25, 2011, 7:52:00 AM