PSARC/2007/048 Include GNU coreutils 6.7 Stephen Hahn (sch@sun.com) ident "$Hg: d-coreutils-fast-track.txt 724d1929c863 2007/02/20 13:38:45 -0800 $ SMI" 1. Summary This case adds the GNU/FSF implementations of numerous standard commands, collectively known as "coreutils", under the integration guidelines for /usr/gnu [1]. Patch binding is sought for this case. 2. Discussion GNU coreutils--the combination of GNU fileutils, GNU shellutils, and GUN textutils--provide implementations of many common Unix utilities as well as various enhancements and additional related utilities. Providing these commands in a supported fashion on OpenSolaris is expected to conserve developer time, in that GNU extensions in common use on other platforms will be available on OpenSolaris, albeit on an alternate path. The coreutils package includes manual pages for the included commands; these will be installed in /usr/gnu/share/man. Conflicting commands and the complete commands are separated out in the interface table below. A new package, SUNWgnu-coreutils, will be introduced to deliver the binaries. The initial version provided will be coreutils-6.7. 2.1. Omission of GNU su(1M) Although upstream open source software can be integrated with waivers on various policies surrounding internationalization or accessibility, security policies cannot be waived. Although the current implementation of GNU su is undoubtedly well-tested, it does not interact with PAM or BSM auditing and therefore would introduce a setuid-component in violation of architectural policies [3, 4]. It is therefore omitted from the delivered components. 2.2. Apparent provision of 'g'-prefixed GNU install(1) It turns out that GNU coreutils offers its variant of install(1M) as "ginstall"--in the standard installation of the coreutils components. Since it is non-conflicting, ginstall will also be provided in /usr/bin but is not considered a precedent-setting example of a 'g'-prefixed variant. 2.3. Conflicts with /usr/ucb variants printenv(1B), users(1B), and whoami(1B) conflict with the variants provided in the coreutils package. As each of the GNU variant implementations are upwards compatible with the /usr/ucb variants, this case proposes placing the non-conflicting GNU variants in /usr/bin. 2.4. Hash digest commands The hash digest commands will be integrated in /usr/bin, and supersede interface declarations made in PSARC/2005/530 [5]. The project team will coordinate with other contributors to attempt to use the libmd(3LIB) implementation in ON; the absence of such a change will be treated as a defect. 2.5. Provision of shred(1) The coreutils package contains a command, shred(1), that relies on filesystem implementation to operate correctly. For the most part, the disclaimers in the shred usage message and in the shred manual page can be enhanced to include additional disclaimers regarding specific OpenSolaris functionality, such as ZFS. Elimination of the command, although considered, appears to result in an unsatisfactory deviation from the default installation, and loss of functionality useful on devices. The proposed amendment would be similar to The following are examples of file systems on which shred is not effective, or is not guaranteed to be effective in all file system modes: * log-structured or journaled file systems, such as those supplied with AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.) * file systems that write redundant data and carry on even if + some writes fail, such as RAID-based file systems and ZFS + * file systems with copy-on-write semantics, such as ZFS + * file systems that make snapshots, such as ZFS and Network Appliance's NFS server Further text of this kind can be added as appropriate. 3. Interfaces 3.1. Non-conflicting commands. /usr/bin/ [ base64 dir dircolors ginstall md5sum pinky printenv ptx readlink seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf stat tac users vdir whoami Location Uncommitted Invocation Uncommitted Human-readable output Not an Interface 3.2. Conflicting command variants. /usr/gnu/bin/ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd df dirname du echo env expand expr factor false fmt fold groups head hostid hostname id install join kill link ln logname ls mkdir mkfifo mknod mv nice nl nohup od paste pathchk pr printf pwd rm rmdir sleep sort split stty sum sync tail tee test touch tr true tsort tty uname unexpand uniq unlink uptime wc who whoami yes Location Uncommitted Invocation Uncommitted Human-readable output Not an Interface /usr/share/info/coreutils.info Location Uncommitted /usr/gnu/share/man/man1/ base64.1 basename.1 cat.1 chgrp.1 chmod.1 chown.1 chroot.1 cksum.1 comm.1 cp.1 csplit.1 cut.1 date.1 dd.1 df.1 dir.1 dircolors.1 dirname.1 du.1 echo.1 env.1 expand.1 expr.1 factor.1 false.1 fmt.1 fold.1 groups.1 head.1 hostid.1 hostname.1 id.1 install.1 join.1 kill.1 link.1 ln.1 logname.1 ls.1 md5sum.1 mkdir.1 mkfifo.1 mknod.1 mv.1 nice.1 nl.1 nohup.1 od.1 paste.1 pathchk.1 pinky.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 rm.1 rmdir.1 seq.1 sha1sum.1 sha224sum.1 sha256sum.1 sha384sum.1 sha512sum.1 shred.1 shuf.1 sleep.1 sort.1 split.1 stat.1 stty.1 su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 who.1 whoami.1 yes.1 Location Uncommitted 4. References [1] S. Hahn, B. Smaalders, and R. Orth, PSARC/2007/047: /usr/gnu, 2007. [2] S. Hahn, PSARC/2007/049: Including GNU which, 2007. [3] "PAM Policy", http://opensolaris.org/os/community/arc/policies/PAM/, 2004. [4] "Draft Audit Policy", http://opensolaris.org/os/community/arc/policies/audit-policy/, 2006. [5] A. Muffett, PSARC/2005/530: digest(1) md5/md5sum compatibility, 2005.