Defect Report concerning: IEEE Std. 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities
Clause: ??
PASC Interpretation Ref: pasc-1003.2-206
Topic: pax symlinks


This is an unapproved interpretation of PASC 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities.

Use of the information contained in this unapproved document is at your own risk.

Last update: 20 April,2001


								1003.2-92  #206

 _____________________________________________________________________________


	Interpretation Number:XXX	
	Topic:   pax symlinks
	Relevant Sections:  ??



PASC Interpretation Request: (Defect Report)
----------------------------  

        Date: 2001 Mar 13

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

 7  Defect Report concerning (number and title of International Standard
    or DIS final text, if applicable): 

Shells & Utilities - Amendment: IEEE P1003.2b/D14

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

 8  Qualifier (e.g. error, omission, clarification required):

1

Error=1 , Omission=2, Clarification=3

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

 9  References in document (e.g. page, clause, figure, and/or table
    numbers):

P2909, L1503-1507
P2909, L1523-1524
P2909, L1525-1530

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

10  Nature of defect (complete, concise explanation of the perceived
    problem):


The specification of the handling of symbolic links by the pax utility is
ambiguous.  In the OPTIONS section, the -H and -L options currently
contain language about the handling of symbolic links which refer to
directories, but contain no description of the handling of symbolic links
which refer to other archivable file types.

As well, the -l option, which can be specified in conjunction with -H and
-L, needs to describe what happens when it is specified in conjunction
with one of them and a symbolic link is encountered.

What should happen in these circumstances?

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

11  Solution proposed by the submitter (optional):

(Note: references are to the Austin Group Revision, Draft 5.)

Replace the text @P2909, L26741-26744 with the following:

26741  -H  If a symbolic link referencing a file of type directory is
           specified on the command line, pax shall archive the file
           hierarchy rooted in the file referenced by the link, using the
           name of the link as the root of the file hierarchy.
           Otherwise, if a symbolic link referencing a file of any other
           file type which pax can normally archive is specified on the
           command line, then pax shall archive the file referenced by
           the link, using the name of the link.  The default behavior
           shall be to archive the symbolic link itself.

Replace the text @P2909, L26758-26759 with the following:

26758  -l  (The letter ell.) In copy mode, hard links shall be made
           between the source and destination file hierarchies whenever
           possible.  If specified in conjunction with -H or -L, when a
           symbolic link is encountered, the hard link created in the
           destination file hierarchy shall be to the file referenced by
           the symbolic link; otherwise, the hard link created shall be
           to the symbolic link in the source file hierarchy.

Replace the text @P2909, L26760-26764 with the following:

26760  -L  If a symbolic link referencing a file of type directory is
           specified on the command line or encountered during the
           traversal of a file hierarchy, pax shall archive the file
           hierarchy rooted in the file referenced by the link, using the
           name of the link as the root of the file hierarchy.
           Otherwise, if a symbolic link referencing a file of any other
           file type which pax can normally archive is specified on the
           command line or encountered during the traversal of a file
           hierarchy pax shall archive the file referenced by the link,
           using the name of the link.  The default behavior shall be to
           archive the symbolic link itself.

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

Response
_________

For the first question, the new definition of pathname resolution in
P1003.1a says that symbolic links are always followed unless the
description of the interface specifies otherwise.  The wording in the
-H and -L options ("The default behavior shall be to archive the
symbolic link itself.") clearly specifies otherwise for symbolic links
referencing files of type directory in certain cases.  It is not clear,
however, if the statement quoted above applies to all symbolic links
encountered or only to symbolic links referencing a file of type
directory specified on the command line (for -H) or to symbolic links
referencing a file of type directory specified on the command line or
encountered during the traversal of a file hierarchy (for -L).

For the second question, the standard is silent concerning any
interaction between the -l option and the -H and -L options.

These issues are being forwarded to the sponsor.



Rationale
_________
None.

Notes to project editor (not part of this interpretation):
==========================================================
Make the following changes to draft 5 of the XCU volume of the Austin
Group Revision:
Change P2909, L26741-26744 to:
  -H    If a symbolic link referencing a file of type directory is
        specified on the command line, pax shall archive the file
        hierarchy rooted in the file referenced by the link, using the
        name of the link as the root of the file hierarchy.  Otherwise,
        if a symbolic link referencing a file of any other file type
        which pax can normally archive is specified on the command
        line, then pax shall archive the file referenced by the link,
        using the name of the link.  The default behavior shall be to
        archive the symbolic link itself.

Change P2909, L26758-26759 to:
  -l    (The letter ell.)  In copy mode, hard links shall be made
        between the source and destination file hierarchies whenever
        possible.  If specified in conjunction with -H or -L, when a
        symbolic link is encountered, the hard link created in the
        destination file hierarchy shall be to the file referenced by
        the symbolic link.  If specified when neither -H nor -L is
        specified, when a symbolic link is encountered, the
        implementation shall create a hard link to the symbolic link in
        the source file hierarchy or copy the symbolic link to the
        destination.

Change P2909, L26760-26764 to:
  -L    If a symbolic link referencing a file of type directory is
        specified on the command line or encountered during the
        traversal of a file hierarchy, pax shall archive the file
        hierarchy rooted in the file referenced by the link, using the
        name of the link as the root of the file hierarchy.  Otherwise,
        if a symbolic link referencing a file of any other file type
        which pax can normally archive is specified on the command line
        or encountered during the traversal of a file hierarchy pax
        shall archive the file referenced by the link, using the name
        of the link.  The default behavior shall be to archive the
        symbolic link itself.

Add a new paragraph to the rationale following P2932, L27716:
        The description of the -l option allows implementations to make
        hard links to symbolic links.  This standard does not specify
        any way to create a hard link to a symbolic link, but many
        systems provide this capability as an extension.  If there are
        hard links to symbolic links when an archive is created, the
        implementation is required to archive the hard link in the
        archive (unless -H or -L is specified).  When in read mode and
        in copy mode, systems supporting hard links to symbolic links
        should use them when appropriate.



Forwarded to Interpretations group: 13 Mar 2001
Recirculated: 29 Mar 2001
Finalized: 10 Apr 2001