I've attached an updated specification for this project.  The only thing
thathas changed is this is now a monolithic project rather than having
a phased implementation.  There is no change in the final state of the
system from that in the initial submission.

The timer remains set for 10/5/2006.

- jek3



Title:          libcmd must die
Case Number:    PSARC/2006/561
Submitter:      Joseph Kowalski
Sponsor:        Joseph Kowalski
Date:           September 28th, 2006

        libcmd must die....
        
        Long live libcmd!

Background and Summary
======================

Solaris has long contained the Private library libcmd containing a small
set of routines (referred to as the def*() functions) designed for parsing
NAME=VALUE pairs as are expected in /etc/default files. The exact taxonomy
of these routines is unknown, but it is some form of Private.  Non-Solaris
Sun products have latched on to these routines making them effectively
Sun Private and there is reason to suspect that third party products may
also be (inappropriately) using them.

The community reference sources for ksh (1993) also contains a libcmd and
an OpenSolaris based project wishes to integrate ksh (1993).  The historical
nature of the Solaris libcmd and the desire for upstream compatibility with
the reference ksh community makes simply changing the name of either library
distasteful.  (See PSARC/2006/550 for discussion and detailed rationale as
to why the name is significant.)

This project removes the existing Solaris libcmd, clearing the way for the
ksh (1993) libcmd, which will require only trivial modification.  Also, an
official interface taxonomy level is established for the def* routines.

Project Details
===============

The following steps will be taken:

   1)   The contents of the existing libcmd will be moved to libc and
        there be labeled as SUNW_private. This leaves libcmd as an
        empty shell of a library (sorry about the pun). Add filter
        entries for the moved functions to this vistigial library[1].

   2)   All references to libcmd (-lcmd) will be removed from the ON
        consolidation.  It is only required that they be removed from
        eight utilities in /sbin which may be used before /usr is mounted
        but maintaining sanitary conditions in ON strongly suggests that
        they all be removed.  (As the sign says, "State law and common
        decency require that ...".)
   
   3)   Relocate libcmd from /lib to /usr/lib.  No compatibility symbolic
        link will be placed into /lib.
   
The taxonomy level of the existing def*() routines is Sun Private.
Although this level is generally considered intractable, it correctly
reflects reality in this instance.  Ideally, these would be Consolidation
Private.[2]

Note that this commitment level should not be considered a blanket
endorsement of these routines.  In the case of system services, SMF
is the clearly preferred solution and /etc/default files should not
be created.  The usage is less clear for an arbitrary application.  (Again,
see PSARC/2006/550 for discussion.)  This should not be a problem because
analysis of usage should be triggered by the proposal of the /etc/default
file itself as an interface.

Exported Interfaces
===================

        Interface               Level           Comments
        
        def*() functions        Sun Private     Reality bites.

The project asserts a Patch release binding.

Errata
======

[1]     It might seem that the filter entries are not required (and for
        a brief period I held that hope).  After all, in general the
        existing utilities need to find something called libcmd and they
        need to find the def*() routines (which they will in libc).  They
        don't need to find the def*() routines in libcmd.  However, in
        the case of -B direct linker bindings, they do need to find the
        def*() in something called libcmd.

[2]     In the discussion of PSARC/2006/550, it was suggested that the
        def*() routines be made Public (and to be of use, Committed).
        As has been said before, that's not this case.  However, note
        that this case makes that action as simple as the generation of
        man pages and a quick edit of the libc mapfile.



Reply via email to