Extracting files from a pax.gz package

  • Hello!

    I'd like to know if there's any documentation on the pax.gz format used by
    Apple to create their installer packages.  If so, where can I get it?

    I'm working on an OS X version of Apple's Tome Viewer.  With this utility, I
    should be able to extract specific files/bundles from a pax.gz format.  It
    would be really cool to have this type of utility.  For one thing, it'll
    mean that I don't have to re-install the whole OS just because I zapped one
    or two of the two UNIX shell executables.

    Any assistance or information you can provide would be greatly appreciated.

    Thanks!

    --
    Jose R.C. Cruz
    <jcruz1...>
    416.939.9983
  • On Saturday, April 14, 2001, at 12:42 , Jose R.C. Cruz wrote:

    > Hello!
    >
    > I'd like to know if there's any documentation on the pax.gz format used by
    > Apple to create their installer packages.  If so, where can I get it?
    >
    > I'm working on an OS X version of Apple's Tome Viewer.  With this utility,
    > I
    > should be able to extract specific files/bundles from a pax.gz format.  It
    > would be really cool to have this type of utility.  For one thing, it'll
    > mean that I don't have to re-install the whole OS just because I zapped
    > one
    > or two of the two UNIX shell executables.
    >
    > Any assistance or information you can provide would be greatly
    > appreciated.

    In Terminal:

    man pax

    Hint:

    gzip -cd file | pax

    for a listing

    gzip -cd file |pax -r

    to decompress it (entirely)

    andy
    --
    Description forthcoming.
  • Thanks everyone!  I've received some very useful input on this subject.
    What I am really looking for is documentation on the pax file format itself.
    I am interested more in directly manipulating the contents of the pax
    archive.

    I was recommended to seek out the Darwin sources for the pax tool,
    specifically pax.h.  Did got those checked out via CVS so I'm now in the
    right direction.

    Again thanks for the assist!

    --
    Jose R.C. Cruz
    <jcruz1...>
    416.939.9983

    > On Saturday, April 14, 2001, at 12:42 , Jose R.C. Cruz wrote:
    >
    >> Hello!
    >>
    >> I'd like to know if there's any documentation on the pax.gz format used by
    >> Apple to create their installer packages.  If so, where can I get it?
    >>
    >> I'm working on an OS X version of Apple's Tome Viewer.  With this utility,
    >> I
    >> should be able to extract specific files/bundles from a pax.gz format.  It
    >> would be really cool to have this type of utility.  For one thing, it'll
    >> mean that I don't have to re-install the whole OS just because I zapped
    >> one
    >> or two of the two UNIX shell executables.
    >>
    >> Any assistance or information you can provide would be greatly
    >> appreciated.
    >
    > In Terminal:
    >
    > man pax
    >
    > Hint:
    >
    > gzip -cd file | pax
    >
    > for a listing
    >
    > gzip -cd file |pax -r
    >
    > to decompress it (entirely)
    >
    > andy
    > --
    > Description forthcoming.
  • On Saturday, April 14, 2001, at 05:55 PM, Jose R.C. Cruz wrote:

    > What I am really looking for is documentation on the pax file format
    > itself.

      There is no pax file format.  The ".pax" file extension is wrong.  pax
    is a tool which reads and writes archives in several formats: tar,
    ustar, cpio, bcpio, sv4cpio, sv4crc.  Last I checked, the Apple ".pax"
    files were cpio format files.

    -Fred
  • I do not know if pax is using cpio to extract the files.
    But if so, maybe cpio is broken or it's launched with the wrong options.
    Or if not (cpio not broken) just replace the code that deal with the
    cpio format by a fork/exec of cpio with the right options.

    My $0.02

    Fabien

    man pax:
    [skip]
    AUTHOR
        Keith Muller at the University of California, San Diego
    [skip]
    BSD Experimental                April 18, 1994
            9

    man cpio:
    [skip]
    AUTHOR
        Keith Muller at the University of California, San Diego

    BSD Experimental              February 16, 1997
    > There is no pax file format.  The ".pax" file extension is
    wrong.  pax
    > is a tool which reads and writes archives in several formats: tar,
    > ustar, cpio, bcpio, sv4cpio, sv4crc.  Last I checked, the Apple ".pax"
    > files were cpio format files.
    >
    > -Fred
    >
  • Pax creates a variety of formats. Most noteworthy are the tar and cpio
    formats described in the POSIX.1 standard. It looks like the packages
    Apple ships on CD are in the cpio format.

    MDT

    On Sat, 14 Apr 2001, Jose R.C. Cruz wrote:

    > Thanks everyone!  I've received some very useful input on this subject.
    > What I am really looking for is documentation on the pax file format itself.
    > I am interested more in directly manipulating the contents of the pax
    > archive.
    >
    > I was recommended to seek out the Darwin sources for the pax tool,
    > specifically pax.h.  Did got those checked out via CVS so I'm now in the
    > right direction.
    >
    > Again thanks for the assist!
    >
    > --
    > Jose R.C. Cruz
    > <jcruz1...>
    > 416.939.9983
    >
    >
    >
    >> On Saturday, April 14, 2001, at 12:42 , Jose R.C. Cruz wrote:
    >>
    >>> Hello!
    >>>
    >>> I'd like to know if there's any documentation on the pax.gz format used by
    >>> Apple to create their installer packages.  If so, where can I get it?
    >>>
    >>> I'm working on an OS X version of Apple's Tome Viewer.  With this utility,
    >>> I
    >>> should be able to extract specific files/bundles from a pax.gz format.  It
    >>> would be really cool to have this type of utility.  For one thing, it'll
    >>> mean that I don't have to re-install the whole OS just because I zapped
    >>> one
    >>> or two of the two UNIX shell executables.
    >>>
    >>> Any assistance or information you can provide would be greatly
    >>> appreciated.
    >>
    >> In Terminal:
    >>
    >> man pax
    >>
    >> Hint:
    >>
    >> gzip -cd file | pax
    >>
    >> for a listing
    >>
    >> gzip -cd file |pax -r
    >>
    >> to decompress it (entirely)
    >>
    >> andy
    >> --
    >> Description forthcoming.
    >
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >
  • Clever readers will note that cpio is just a hardlink to pax ... so pax
    and cpio are identical. Ehether you fork/exec pax or cpio it doesn't
    matter much. Perhaps you're having trouble with pax's usage?

    MDT

    On Sun, 15 Apr 2001, Fabien Roy wrote:

    > I do not know if pax is using cpio to extract the files.
    > But if so, maybe cpio is broken or it's launched with the wrong options.
    > Or if not (cpio not broken) just replace the code that deal with the
    > cpio format by a fork/exec of cpio with the right options.
    >
    > My $0.02
    >
    > Fabien
    >
    > man pax:
    > [skip]
    > AUTHOR
    > Keith Muller at the University of California, San Diego
    > [skip]
    > BSD Experimental                April 18, 1994
    > 9
    >
    > man cpio:
    > [skip]
    > AUTHOR
    > Keith Muller at the University of California, San Diego
    >
    > BSD Experimental              February 16, 1997
    >> There is no pax file format.  The ".pax" file extension is
    > wrong.  pax
    >> is a tool which reads and writes archives in several formats: tar,
    >> ustar, cpio, bcpio, sv4cpio, sv4crc.  Last I checked, the Apple ".pax"
    >> files were cpio format files.
    >>
    >> -Fred
    >>
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >
  • Now this boggles the mind.  So what you're saying here is that so-called
    '.pax' archive could be anything <tar, ustar, cpio, etc..>.  Why the various
    "possible" archive formats?  Would it be more productive <and perhaps even
    reliable> to stick to just one?

    -----
    Jose R.C. Cruz
    <jcruz1...>
    416.939.9983

    You know, I used to think it was awful that life was so unfair.
    Then I thought, wouldn't it be much worse if life were fair, and
    all the terrible things that happen to us come because we actually
    deserve them? So, now I take great comfort in the general
    hostility and unfairness of the universe."
        -- J. Michael Strazinsky
            "A Late Delivery from Avalon", Babylon 5

        |\    _,,,---,,_
      /,`.-'`'    -.  ;-;;,_
      |,4-  ) )-,_..;\ (  `'-'
    '---''(_/--'  `-'\_)

    > I do not know if pax is using cpio to extract the files.
    > But if so, maybe cpio is broken or it's launched with the wrong options.
    > Or if not (cpio not broken) just replace the code that deal with the
    > cpio format by a fork/exec of cpio with the right options.
    >
    > My $0.02
    >
    > Fabien
    >
    > man pax:
    > [skip]
    > AUTHOR
    > Keith Muller at the University of California, San Diego
    > [skip]
    > BSD Experimental                April 18, 1994
    > 9
    >
    > man cpio:
    > [skip]
    > AUTHOR
    > Keith Muller at the University of California, San Diego
    >
    > BSD Experimental              February 16, 1997
    >> There is no pax file format.  The ".pax" file extension is
    > wrong.  pax
    >> is a tool which reads and writes archives in several formats: tar,
    >> ustar, cpio, bcpio, sv4cpio, sv4crc.  Last I checked, the Apple ".pax"
    >> files were cpio format files.
    >>
    >> -Fred
    >>
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
  • Because there is no POSIX standard file format everyone is happy with. pax
    solves the problem by allowing you to create whatever format you like
    (depending on your need) but use the same program to dearchive. Mac OS
    users will recognize this strategy from StuffIt / Stuffit Expander.

    It would be nice to have a POSIX standard file format that would meet
    everyone's needs all the time, though.

    MDT

    On Sun, 15 Apr 2001, Jose R.C. Cruz wrote:

    > Now this boggles the mind.  So what you're saying here is that so-called
    > '.pax' archive could be anything <tar, ustar, cpio, etc..>.  Why the various
    > "possible" archive formats?  Would it be more productive <and perhaps even
    > reliable> to stick to just one?
    >
    > -----
    > Jose R.C. Cruz
    > <jcruz1...>
    > 416.939.9983
    >
    > You know, I used to think it was awful that life was so unfair.
    > Then I thought, wouldn't it be much worse if life were fair, and
    > all the terrible things that happen to us come because we actually
    > deserve them? So, now I take great comfort in the general
    > hostility and unfairness of the universe."
    > -- J. Michael Strazinsky
    > "A Late Delivery from Avalon", Babylon 5
    >
    > |\    _,,,---,,_
    > /,`.-'`'    -.  ;-;;,_
    > |,4-  ) )-,_..;\ (  `'-'
    > '---''(_/--'  `-'\_)
    >
    >
    >> I do not know if pax is using cpio to extract the files.
    >> But if so, maybe cpio is broken or it's launched with the wrong options.
    >> Or if not (cpio not broken) just replace the code that deal with the
    >> cpio format by a fork/exec of cpio with the right options.
    >>
    >> My $0.02
    >>
    >> Fabien
    >>
    >> man pax:
    >> [skip]
    >> AUTHOR
    >> Keith Muller at the University of California, San Diego
    >> [skip]
    >> BSD Experimental                April 18, 1994
    >> 9
    >>
    >> man cpio:
    >> [skip]
    >> AUTHOR
    >> Keith Muller at the University of California, San Diego
    >>
    >> BSD Experimental              February 16, 1997
    >>> There is no pax file format.  The ".pax" file extension is
    >> wrong.  pax
    >>> is a tool which reads and writes archives in several formats: tar,
    >>> ustar, cpio, bcpio, sv4cpio, sv4crc.  Last I checked, the Apple ".pax"
    >>> files were cpio format files.
    >>>
    >>> -Fred
    >>>
    >> _______________________________________________
    >> MacOSX-dev mailing list
    >> <MacOSX-dev...>
    >> http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >
  • It's interesting to note that both pax and cpio register with a 0K file
    size.  Either OS X is in error reporting that or there's something afoot
    going on.

    By the way, this is OS X on an HFS+ volume.  A symlink at least registers
    with a 4K file size <and that's a pretty small file in the order of a few
    bytes>.

    --
    Jose R.C. Cruz
    <jcruz1...>
    416.939.9983

    _______________________________________________
    MacOSX-dev mailing list
    <MacOSX-dev...>
    http://www.omnigroup.com/mailman/listinfo/macosx-dev

    > Clever readers will note that cpio is just a hardlink to pax ... so pax
    > and cpio are identical. Ehether you fork/exec pax or cpio it doesn't
    > matter much. Perhaps you're having trouble with pax's usage?
    >
    > MDT
    >
    > On Sun, 15 Apr 2001, Fabien Roy wrote:
    >
    >> I do not know if pax is using cpio to extract the files.
    >> But if so, maybe cpio is broken or it's launched with the wrong options.
    >> Or if not (cpio not broken) just replace the code that deal with the
    >> cpio format by a fork/exec of cpio with the right options.
    >>
    >> My $0.02
    >>
    >> Fabien
    >>
    >> man pax:
    >> [skip]
    >> AUTHOR
    >> Keith Muller at the University of California, San Diego
    >> [skip]
    >> BSD Experimental                April 18, 1994
    >> 9
    >>
    >> man cpio:
    >> [skip]
    >> AUTHOR
    >> Keith Muller at the University of California, San Diego
    >>
    >> BSD Experimental              February 16, 1997
  • On Tue, Apr 17, 2001 at 02:08:57PM -0400, Jose R.C. Cruz wrote:
    :
    : It's interesting to note that both pax and cpio register with a 0K file
    : size.  Either OS X is in error reporting that or there's something afoot
    : going on.

    It might be you:

    bash-2.04$ ls -l /bin/pax /usr/bin/cpio
    -r-xr-xr-x  1 root    wheel      98704 Apr 16 04:22 /bin/pax
    -r-xr-xr-x  1 root    wheel      98704 Apr 16 04:23 /usr/bin/cpio

    --
    Eugene Lee
    <eugene...>
previous month april 2001 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
Go to today