Saturday, February 19, 2011

pkgtrans - Conversion between FileSystem format and Datastream Packages.

Demo of pkgtrans.
Conversion between FileSystem format and Datastream Packages.

MyServer:/var/tmp#
MyServer:/var/tmp# df -k .
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d103     6193583 3494049 2637599    57%    /var
MyServer:/var/tmp#

Extracting the package creates it a file system format:

MyServer:/var/tmp# mkdir sudotesting
MyServer:/var/tmp# cd sudotesting
MyServer:/var/tmp/sudotesting# cp ../Mysudo-sol9.SPARC.pkg.tar.gz .
MyServer:/var/tmp/sudotesting# ls
Mysudo-sol9.SPARC.pkg.tar.gz
MyServer:/var/tmp/sudotesting#
MyServer:/var/tmp/sudotesting# gunzip Mysudo-sol9.SPARC.pkg.tar.gz
MyServer:/var/tmp/sudotesting#
MyServer:/var/tmp/sudotesting# ls
Mysudo-sol9.SPARC.pkg.tar
MyServer:/var/tmp/sudotesting#
MyServer:/var/tmp/sudotesting# tar -xvf *.tar
x SFWsudo, 0 bytes, 0 tape blocks
x SFWsudo/archive, 0 bytes, 0 tape blocks
x SFWsudo/archive/none.bz2, 77545 bytes, 152 tape blocks
x SFWsudo/install, 0 bytes, 0 tape blocks
x SFWsudo/install/copyright, 3950 bytes, 8 tape blocks
x SFWsudo/install/depend, 875 bytes, 2 tape blocks
x SFWsudo/install/i.none, 2245 bytes, 5 tape blocks
x SFWsudo/pkginfo, 482 bytes, 1 tape blocks
x SFWsudo/pkgmap, 832 bytes, 2 tape blocks
x SFWsudo/reloc, 0 bytes, 0 tape blocks
x SFWsudo/reloc/sfw, 0 bytes, 0 tape blocks
x SFWsudo/reloc/sfw/bin, 0 bytes, 0 tape blocks
x SFWsudo/reloc/sfw/etc, 0 bytes, 0 tape blocks
x SFWsudo/reloc/sfw/man, 0 bytes, 0 tape blocks
x SFWsudo/reloc/sfw/man/man1m, 0 bytes, 0 tape blocks
x SFWsudo/reloc/sfw/man/man4, 0 bytes, 0 tape blocks
x SFWsudo/reloc/sfw/READMEs, 0 bytes, 0 tape blocks
x SFWsudo/reloc/sfw/sbin, 0 bytes, 0 tape blocks

MyServer:/var/tmp/sudotesting#
MyServer:/var/tmp/sudotesting# ls
Mysudo-sol9.SPARC.pkg.tar  SFWsudo
MyServer:/var/tmp/sudotesting# ls -ltr
total 192
drwxr-xr-x   5 buxus    sys          512 Mar  7  2005 SFWsudo
-rw-r--r--   1 root     other      97280 Feb 15 11:16 Mysudo-sol9.SPARC.pkg.tar

MyServer:/var/tmp/sudotesting#

Use pkgtrans to transfer it to datastream format:

MyServer:/var/tmp/sudotesting# pkgtrans . SFWsudo.pkg SFWsudo
Transferring package instance

MyServer:/var/tmp/sudotesting# ls -ltr
total 370
drwxr-xr-x   5 buxus    sys          512 Mar  7  2005 SFWsudo
-rw-r--r--   1 root     other      97280 Feb 15 11:16 Mysudo-sol9.SPARC.pkg.tar
-rw-r--r--   1 root     other      91136 Feb 15 11:17 SFWsudo.pkg


Reverse transformation from filesystem format to datastream format:

MyServer:/var/tmp/sudotesting# rm -rf SFWsudo
MyServer:/var/tmp/sudotesting#
MyServer:/var/tmp/sudotesting# ls -ltr
total 368
-rw-r--r--   1 root     other      97280 Feb 15 11:16 Mysudo-sol9.SPARC.pkg.tar
-rw-r--r--   1 root     other      91136 Feb 15 11:17 SFWsudo.pkg
MyServer:/var/tmp/sudotesting#

MyServer:/var/tmp/sudotesting# pkgtrans . SFWsudo SFWsudo.pkg        //wrong format command
pkgtrans: ERROR: unable to complete package transfer
    - no packages were selected from

MyServer:/var/tmp/sudotesting# pkgtrans . SFWsudo.pkg
pkgtrans: ERROR: unable to complete package transfer
    - no packages were selected from
MyServer:/var/tmp/sudotesting#
MyServer:/var/tmp/sudotesting# pkgtrans . SFWsud
pkgtrans: ERROR: unable to complete package transfer
    - no packages were selected from
MyServer:/var/tmp/sudotesting#
MyServer:/var/tmp/sudotesting# pkgtrans . . SFWsudo.pkg
pkgtrans: ERROR: unable to complete package transfer
    - source and destination represent the same device
MyServer:/var/tmp/sudotesting#

MyServer:/var/tmp/sudotesting# pkgtrans SFWsudo.pkg . all
Transferring package instance

MyServer:/var/tmp/sudotesting#

MyServer:/var/tmp/sudotesting# ls -ltr
total 370
-rw-r--r--   1 root     other      97280 Feb 15 11:16 Mysudo-sol9.SPARC.pkg.tar
-rw-r--r--   1 root     other      91136 Feb 15 11:17 SFWsudo.pkg
drwxr-xr-x   5 root     other        512 Feb 15 11:22 SFWsudo
MyServer:/var/tmp/sudotesting#
MyServer:/var/tmp/sudotesting#

1 comment:

  1. !!! Unix !!!: Pkgtrans - Conversion Between Filesystem Format And Datastream Packages. >>>>> Download Now

    >>>>> Download Full

    !!! Unix !!!: Pkgtrans - Conversion Between Filesystem Format And Datastream Packages. >>>>> Download LINK

    >>>>> Download Now

    !!! Unix !!!: Pkgtrans - Conversion Between Filesystem Format And Datastream Packages. >>>>> Download Full

    >>>>> Download LINK Kq

    ReplyDelete