AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
Expand all | Collapse all

Relocatable Package help

  • 1.  Relocatable Package help

    Posted Fri April 24, 2009 01:25 AM

    Originally posted by: Vibhor_Kumar_Agarwal


    Hi,

    I am trying to create a relocatable package on AIX.
    Couple of queries:

    • Is relocation supported AIX 5.3 onwards only, as couldn't see the _r commands on 5.2 systems.
    • Relocation talks about User Specified Install Location (USIL) as an alternate root. That means this will have a completely different SWVPD. If my package installs under /opt, can i make it install under /abc without creating a USIL and have it maintained under / via the normal commands like lslpp, installp, etc.

    Thanks
    #AIX-Forum


  • 2.  Re: Relocatable Package help

    Posted Fri April 24, 2009 07:15 AM

    Originally posted by: unixgrl


    I'm pretty sure relocatable packages don't work in 5.2 or even early cuts of 5.3.

    You have to create the USIL - I don't like this but that's how it works.
    And then you have to use the "normal" installation commands but
    with "_r" tacked on. I played with this a little bit and the following are
    instructions I received from IBM.

    To perform relocatable installations:
    1. Create the Volume Group, filesystem, and directory the relocatable fileset will be installed to if they are not already created.

    2. Create relocation path (the path that should be used instead of the ./) This can be any valid path that is not "/", and has a size no greater than 512 characters
    1. mkusil -R <desired_path>

    Example ---> # mkusil –R /chris/reloc
    >>This is the directory that will contain the relocatable filesets.

    3. check if location is properly created
    1. lsusil -R ALL
    >>The output should look like this:
    INSTALL PATH=/chris/reloc
    COMMENTS = None

    4. copy packages to be installed into any folder on the system and perform inutoc_r
    1. cd /dir/with/relocatable/filesets
    2. inutoc_r . (notice the dot “.” after the inutoc_r command)

    5. install required packages using installp_r -R
    1. installp_r -R <desired_path> -ad <package_location> <rte package name>

    Example ---> installp_r -R /chris/reloc -aYd /chris/reloc_inst Java14.samples Java14.sdk

    6. check if installation had been successful
    lslpp_r -R ALL –Lc | grep <relocatable fileset>

    Example ---> lslpp_r –R ALL –Lc | grep Java14
    >>Java14.sdk:Java14.sdk:1.4.2.200: : :C: :Java SDK 32-bit : : : : : : :0:0:/chris/reloc
    Java14.sdk:Java14.sdk:1.4.2.175: : :C: :Java SDK 32-bit : : : : : : :1:0:/
    #AIX-Forum


  • 3.  Re: Relocatable Package help

    Posted Fri April 24, 2009 07:23 AM

    Originally posted by: Vibhor_Kumar_Agarwal


    Thanks.

    So if i follow the instructions, will the package be visible with lslpp command. It looks like there will be separate packages visible in lslpp & lslpp_r.

    Suppose i create a package which can be installed in any location by the end user, then in such a case who will take care of the creation's of usil's.

    During postinstall phase, if i want to configure something based on package location, how will i determine where the package has been installed.
    #AIX-Forum


  • 4.  Re: Relocatable Package help

    Posted Fri April 24, 2009 11:55 AM

    Originally posted by: unixgrl


    lslpp and lslpp_r are the same executable but I suggest playing with it to see if you get the output you expect.

    If you start using relocatable packages, I would expect the aystem admin would have to create the USIL. I wanted to use relocatable for WPARs but as you can see, this becomes a maintenance issue because each WPAR would have to have its own USIL.

    To configure things based on package location, there are variables that are set
    by installp at installation time.

    INU_RELOCATED_PATH should equal the value specified by -R of installp.
    #AIX-Forum


  • 5.  Re: Relocatable Package help

    Posted Tue April 28, 2009 10:17 AM

    Originally posted by: Vibhor_Kumar_Agarwal


    Hi,

    Thanks for the info.

    Does process of creation of relocatable package is different.

    I have created a Test package containing a single fileset named Test.

    When i install it simply saying:
    installp -ad pkg Test
    All goes well

    However, when i try to install relocatably:
    installp_r -R /abc -ad pkg Test
    It says no fileset named Test found.

    Have created /abc as usil
    bash-2.05b# lsusil -R ALL
    INSTALL PATH = /abc
    COMMENTS = None

    Am is missing something?
    #AIX-Forum


  • 6.  Re: Relocatable Package help

    Posted Mon May 04, 2009 01:27 AM

    Originally posted by: SystemAdmin


    Can somebody help me on this similar question.

    1. Can my normal package will installed to relocated location.
    2. During installation of my package i got following error.

    1 Selected to be installed, of which:
    1 FAILED pre-installation verification
    ----
    0 Total to be installed

    3. Does process of creation of relocatable package is different. My package is in bff format?
    4. How to set BASEDIR during installation as we set in Solaris?
    5. Do we need to set INU_RELOCATED_PATH, to were we need to install the package or some other variable?
    6. What changes lpp_name file should have?

    Mine lpp_name is

    bash-2.05b# cat lpp_name
    4 R I mypack {
    mypack.ats 4.5.234.0 1 N U C "My Test package" Fileset
    [
    %
    RELOCATABLE
    ./opt/mypack/tools 19
    ./opt/mypack/data/datatools 7
    ./opt/mypack/bin 41
    ./opt/mypack/data/datatools/tools 46
    %
    ]
    }

    please help me if i am missing any thing.

    Appritiate your help in advance.
    #AIX-Forum


  • 7.  Re: Relocatable Package help

    Posted Mon May 04, 2009 08:28 AM

    Originally posted by: unixgrl


    When you create a package that is relocatable you must set "Relocatable: Y" in the package template.

    You don't set INU_RELOCATED_PATH, installp sets that based on where you install the package.

    Read the manpage for mkinstallp and then read /usr/lpp/bos/README.MKINSTALLP.

    There really isn't great documentation for this so give it a try and see if you can
    make it work.
    #AIX-Forum


  • 8.  Re: Relocatable Package help

    Posted Mon May 04, 2009 11:17 AM

    Originally posted by: SystemAdmin


    Thanks for reply.

    Basically i am using backup utility to create a package.

    /usr/sbin/backup -iq -f mypack.bff

    Also, I checked the "AIX61 Workload Management techref.pdf"
    Below is taken from above pdf, does all the below is necessary to create relocatable package.
    TOC Changes for Relocatable Packages
    Here is a sample of the new requisite sections in the TOC file:
    sscp.rte.1.0.0.5.U.PRIVATE.bff 4 R S sscp {
    sscp.rte 01.00.0000.0005 1 N B En_US Sscp
    [
    *coreq bos.games 1.1.1.1 <-- default requisite in default requisite section
    *prereq bos.rte 1.1.1.1 <-- default requisite in default requisite section
    %
    /usr/bin 20
    /etc 20
    INSTWORK 72 40
    %
    %
    %
    19
    IY99999 1 APAR text here.
    %
    RELOCATABLE <-- attribute tag to denote relocatable package
    %
    *prereq bos.rte 1.1.1.1 <-- default requisite in relocated requisite section
    *coreq_r bos.games 1.1.1.1 <-- relocated requisite in relocated requisite section
    ]
    }

    Can you please let me know the link for sample .bff relocatable package. Also how to set the INSTALL PATH in the package.
    #AIX-Forum


  • 9.  Re: Relocatable Package help

    Posted Tue May 05, 2009 01:26 AM

    Originally posted by: Vibhor_Kumar_Agarwal


    Cool,
    I was able to get it to work.

    A concerning factor:
    Generally if a package gets installed in "/opt/Test" and i want to relocate it to "/abc" it gets installed under "/abc/Test". This happens the way in Solaris, Linux & HP.
    In case of AIX, after creating the USIL, its getting installed under "/abc/opt/Test".

    Am i missing something or is this the way AIX works?

    @Nil
    Your .toc file should work, mine was similar just simpler.
    Couldn't get your last statemet.
    Also how to set the INSTALL PATH in the package
    Don't think there are any sample packages available on the net.
    #AIX-Forum


  • 10.  Re: Relocatable Package help

    Posted Tue May 05, 2009 01:57 AM

    Originally posted by: SystemAdmin


    Thanks again.
    Can you please provide me steps you performed to create relocated package. I hope you have used backup utility to create the package.

    Appritiate your help.
    #AIX-Forum


  • 11.  Re: Relocatable Package help

    Posted Tue May 05, 2009 03:05 AM

    Originally posted by: Vibhor_Kumar_Agarwal


    I used mkinstallp.

    Have read a bit about creating with backup command.
    Can you give your steps, I'll try to check and see if something is missing.
    #AIX-Forum


  • 12.  Re: Relocatable Package help

    Posted Tue May 05, 2009 04:06 AM

    Originally posted by: SystemAdmin


    I am getting error as below:
    bash-2.05b# installp_r -R /usr/sta -aqd ./mypack.bff mypack
    -----------------------------------------------------------------------------
    Pre-installation Verification...
    -----------------------------------------------------------------------------
    Verifying selections...done
    Verifying requisites...done
    Results...

    FAILURES

    Filesets listed in this section failed pre-installation verification
    and will not be installed.

    Missing Filesets

    The following filesets could not be found on the installation media.
    If you feel these filesets really are on the media, check for typographical
    errors in the name specified or, if installing from directory, check for
    discrepancies between the Table of Contents file (.toc) and the images that
    reside in the directory.

    mypack

    << End of Failure Section >>

    -----------------------------------------------------------------------------
    BUILDDATE Verification ...
    -----------------------------------------------------------------------------
    Verifying build dates...done
    FILESET STATISTICS

    1 Selected to be installed, of which:
    1 FAILED pre-installation verification
    ----
    0 Total to be installed
    Pre-installation Failure/Warning Summary

    Name Level Pre-installation Failure/Warning

    mypack Not found on the installation media
    bash-2.05b# ls
    mypack.bff
    Here are my steps.

    Create a file say content, which will have all the files which we need to pakcage.

    ./lpp_name
    ./usr/lpp/mypack/liblpp.a
    ./opt/mypack/support/tools/TREADME
    ./opt/mypack/support/tools/f_editor.pl
    ./opt/mypack/support/tools/n_pl.sh
    Here are the content of lpp_name

    I am having directory structure from pwd as mentioned above, containing files and pl files.

    eg:
    ./opt/mypack/support/tools/f_editor.pl

    4 R I mypack {
    mypack.sta 5.4.144.0 1 N U C "Test package" Fileset
    [
    %
    RELOCATABLE
    /opt/mypack/support/tools 19
    /opt/mypack/bin 41

    ]
    }

    bash-2.05b# ls
    mypack content lpp_name opt usr

    The i ran below command to create package using backup utility

    cat content | backup -iq -f mypack.bff

    Were i am going wrong? am i missing any steps.
    #AIX-Forum


  • 13.  Re: Relocatable Package help

    Posted Tue May 05, 2009 04:25 AM

    Originally posted by: Vibhor_Kumar_Agarwal


    Were you able to install the package without any relocation?

    Your command should be:
    installp -aqd . mypack

    The -d points to the destination directory and not to the actual package itself.
    Let me know if normal installation is successful.

    If that's successful, the error you have quoted will come if the .toc file doesn't contain the keyword "RELOCATABLE" (I also got the same ;-)
    Add this keyword after the 4 % sign.
    #AIX-Forum


  • 14.  Re: Relocatable Package help

    Posted Tue May 05, 2009 05:39 AM

    Originally posted by: SystemAdmin


    I got got some success result but also got some error.

    bash-2.05b# cat .toc
    0 050519340409 2
    mypack.bff 4 R I mypack {
    mypack.sta 05.01.0177.0000 1 N U C "MY Test pack" Fileset
    [
    %
    RELOCATABLE
    /opt/mypack/support/tools 19
    /opt/mypack/bin 41
    %
    %
    %
    %
    %
    %
    ]
    }

    bash-2.05b# installp -aqd ./mypack.bff mypack
    -----------------------------------------------------------------------------
    Pre-installation Verification...
    -----------------------------------------------------------------------------
    Verifying selections...done
    Verifying requisites...done
    Results...

    SUCCESSES

    Filesets listed in this section passed pre-installation verification
    and will be installed.

    Selected Filesets

    mypack.ccsta 5.4.144.0 # "My test pack...

    << End of Success Section >>

    -----------------------------------------------------------------------------
    BUILDDATE Verification ...
    -----------------------------------------------------------------------------
    Verifying build dates...done
    FILESET STATISTICS

    1 Selected to be installed, of which:
    1 Passed pre-installation verification
    ----
    1 Total to be installed

    -----------------------------------------------------------------------------
    Installing Software...
    -----------------------------------------------------------------------------

    installp: APPLYING software for:
    mypack.ccsta 5.4.144.0

    ar: A file or directory in the path name does not exist.
    ar: 0707-113 The fopen system call failed on file .
    ar: A file or path name is too long.

    Am i missing any thing else, Please correct me if i have kept Keyword "RELOCATABLE" in correct place.
    #AIX-Forum


  • 15.  Re: Relocatable Package help

    Posted Tue May 05, 2009 06:25 AM

    Originally posted by: Vibhor_Kumar_Agarwal


    For the time being remove the RELOCATABLE keyword.
    If everything works well, put it just above the bottom 2 %.
    0 050519340409 2
    mypack.bff 4 R I mypack {
    mypack.sta 05.01.0177.0000 1 N U C "MY Test pack" Fileset
    [
    %
    /opt/mypack/support/tools 19
    /opt/mypack/bin 41
    %
    %
    %
    %
    RELOCATABLE
    %
    %
    ]
    }
    #AIX-Forum


  • 16.  Re: Relocatable Package help

    Posted Tue May 05, 2009 07:15 AM

    Originally posted by: SystemAdmin


    Hi Vibhor,

    I was able to install the package but its getting installed on default location.

    installp_r -aqd ./mypack.bff mypack

    bash-2.05b# lslpp -l | grep mypack
    mypack.sta 5.4.277.0 COMMITTED "Test Pack
    I tried without RELOCATABLE key it got install flawlessly.

    Even after putting RELOCATABLE keyword, it got installed at default location.

    mypack.bff 4 R I mypack {
    mypack.sta 05.01.0277.0000 1 N U C "Test package" Fileset
    [
    %
    /opt/mypack/support/tools 19
    /opt/mypack/bin 41
    %
    %
    RELOCATABLE
    %
    %
    %
    %
    %
    %
    ]
    }

    How can i installed it at non default location, do i need any thing else to set before creating a package or before installing package.

    IBM didn't provide any doc on this?
    #AIX-Forum


  • 17.  Re: Relocatable Package help

    Posted Tue May 05, 2009 07:39 AM

    Originally posted by: Vibhor_Kumar_Agarwal


    Great.

    Now just follow the steps provided by unixgrl in the initial posts.
    BTW, the keyword is still not in the right location, check the .toc file that i have posted.
    #AIX-Forum


  • 18.  Re: Relocatable Package help

    Posted Wed May 06, 2009 05:26 AM

    Originally posted by: SystemAdmin


    The .toc is generated with help of "inutoc ."

    unixgrl has suggested to set the Keyword = Y, but this is only valid when you create package using mkinstallp. But i am creating package using backup utility.
    #AIX-Forum


  • 19.  Re: Relocatable Package help

    Posted Wed May 06, 2009 07:10 AM

    Originally posted by: SystemAdmin


    Well at last i was able to install package at non default location.

    But "lslpp -l | grep mypack" didn't shows my package installed.

    When i checked manually to the target location my package was installed, and installp_r has also shows the success report of package installed.

    Also why it creates "etc and lpp" directory don't know.

    bash-2.05b# pwd
    /usr/sta
    bash-2.05b# ls
    etc lpp opt usr
    #AIX-Forum


  • 20.  Re: Relocatable Package help

    Posted Wed May 06, 2009 08:35 AM

    Originally posted by: Vibhor_Kumar_Agarwal


    lslpp -R ALL -l | grep mypack

    Will show you your package
    #AIX-Forum


  • 21.  Re: Relocatable Package help

    Posted Thu May 07, 2009 01:52 AM

    Originally posted by: SystemAdmin


    Yes !! now its visible.

    Now as you mentioned earlier that package will get installed at non default location but unlike solaris,hp,linux , in AIX it will get installed at /non_default/opt/mypack.

    So i think we can make the changes in the packaging script such that it should installed at /non_default/mypack

    am i missing any thing here?
    #AIX-Forum


  • 22.  Re: Relocatable Package help

    Posted Thu May 07, 2009 03:09 AM

    Originally posted by: Vibhor_Kumar_Agarwal


    And what will be that change?
    What are the options you are thinking of?

    Let me know if you are able to do it and how.
    #AIX-Forum


  • 23.  Re: Relocatable Package help

    Posted Thu June 18, 2009 01:03 AM

    Originally posted by: SystemAdmin


    Sorry for late response, got busy with some other task.

    In my packaging script inventory file.
    #AIX-Forum


  • 24.  Re: Relocatable Package help

    Posted Wed December 23, 2009 03:40 AM

    Originally posted by: Hello_123_adai


    Hello,
    I tried to create a package similar to nil274's
    .
    But I also met with the similar problem:
    bash-2.05b# installp_r -R /usr/sta -aqd ./mypack.bff mypack

    Pre-installation Verification...

    Verifying selections...done
    Verifying requisites...done
    Results...

    FAILURES
    Filesets listed in this section failed pre-installation verification
    and will not be installed.

    Missing Filesets
    The following filesets could not be found on the installation media.
    If you feel these filesets really are on the media, check for typographical
    errors in the name specified or, if installing from directory, check for
    discrepancies between the Table of Contents file (.toc) and the images that
    reside in the directory.

    mypack

    << End of Failure Section >>

    From the discuss thread,
    I don't find out any solution for this error.

    It is a pitty that IBM's doc about how to create and install one relocatable package is so little and unclear, I need some hot hearted one to help me on the upper problem.

    I have tried many methods, but it failed.

    The following is my package information:

    #ls
    content lpp_name mypack opt usr
    #cat content
    ./lpp_name
    ./usr/lpp/mypack/liblpp.a
    ./opt/mypack/new.kkk
    #cat lpp_name
    4 R I mypack {
    mypack.sta 5.4.144.0 1 N U C "Test package" Fileset
    [
    %
    ./opt/mypack/new.kkk 20
    RELOCATABLE
    %
    %
    ]
    }

    #ls
    content lpp_name mypack opt usr
    #ls usr/lpp/mypack/liblpp.a
    usr/lpp/mypack/liblpp.a
    #ls opt/mypack/new.kkk
    opt/mypack/new.kkk
    #ls mypack/
    new.kkk
    #ls mypack/new.kkk
    mypack/new.kkk
    #cat .toc
    0 041606072909 2
    mypack.bff 4 R I mypack {
    mypack.sta 05.04.0144.0000 1 N U C "Test package" Fileset
    [
    %
    ./opt/mypack/new.kkk 20
    RELOCATABLE
    %
    %
    %
    %
    %
    %
    ]
    }

    Any comments is welcome!

    Thanks a lot!
    #AIX-Forum