Author: branden Date: 2005-02-08 02:13:50 -0500 (Tue, 08 Feb 2005) New Revision: 2171
Modified: trunk/debian/CHANGESETS trunk/debian/patches/099u_mkdirhier_rewrite.diff Log: Add further clarifications to mkdirhier's usage message and manpage. Modified: trunk/debian/CHANGESETS =================================================================== --- trunk/debian/CHANGESETS 2005-02-08 06:50:12 UTC (rev 2170) +++ trunk/debian/CHANGESETS 2005-02-08 07:13:50 UTC (rev 2171) @@ -222,7 +222,7 @@ (Closes: #141347) + No longer creates spurious levels of directory hierarchy. (Closes: #232357) - 2161, 2170 + 2161, 2170, 2171 Grab patch from X.Org CVS (via Jan Kreuzer) to increase DDC retry delay a little bit, which permits DDC probing to succeed on some hardware Modified: trunk/debian/patches/099u_mkdirhier_rewrite.diff =================================================================== --- trunk/debian/patches/099u_mkdirhier_rewrite.diff 2005-02-08 06:50:12 UTC (rev 2170) +++ trunk/debian/patches/099u_mkdirhier_rewrite.diff 2005-02-08 07:13:50 UTC (rev 2171) @@ -6,8 +6,159 @@ Not submitted upstream to XFree86 or X.Org. ---- xc/config/util/mkdirhier.sh~ 2005-01-25 13:40:29.000000000 -0500 -+++ xc/config/util/mkdirhier.sh 2005-01-25 15:21:30.000000000 -0500 +diff -urN xc/config/util~/mkdirhier.man xc/config/util/mkdirhier.man +--- xc/config/util~/mkdirhier.man 2005-02-08 01:58:07.000000000 -0500 ++++ xc/config/util/mkdirhier.man 2005-02-08 02:08:53.000000000 -0500 +@@ -1,42 +1,111 @@ +-.\" $Xorg: mkdirhier.man,v 1.4 2001/02/09 02:03:17 xorgcvs Exp $ +-.\" Copyright (c) 1993, 1994, 1998 The Open Group +-.\" +-.\" Permission to use, copy, modify, distribute, and sell this software and its +-.\" documentation for any purpose is hereby granted without fee, provided that +-.\" the above copyright notice appear in all copies and that both that +-.\" copyright notice and this permission notice appear in supporting +-.\" documentation. +-.\" +-.\" The above copyright notice and this permission notice shall be included in +-.\" all copies or substantial portions of the Software. +-.\" +-.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +-.\" THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +-.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +-.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +-.\" SOFTWARE. +-.\" +-.\" Except as contained in this notice, the name of The Open Group shall not +-.\" be used in advertising or otherwise to promote the sale, use or other +-.\" dealing in this Software without prior written authorization from The +-.\" Open Group. ++.\" Copyright 2005 Branden Robinson. + .\" +-.\" $XFree86: xc/config/util/mkdirhier.man,v 1.3 2001/12/14 19:53:22 dawes Exp $ ++.\" Permission is hereby granted, free of charge, to any person obtaining a ++.\" copy of this software and associated documentation files (the "Software"), ++.\" to deal in the Software without restriction, including without limitation ++.\" the rights to use, copy, modify, merge, publish, distribute, sublicense, ++.\" and/or sell copies of the Software, and to permit persons to whom the ++.\" Software is furnished to do so, subject to the following condition: + .\" +-.TH MKDIRHIER 1 __xorgversion__ ++.\" The above copyright notice and this permission notice shall be ++.\" included in all copies or substantial portions of the Software. ++.\" ++.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++.\" SOFTWARE IN THE PUBLIC INTEREST, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR ++.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++.\" DEALINGS IN THE SOFTWARE. ++.TH mkdirhier __mansuffix__ __xorgversion__ + .SH NAME +-mkdirhier \- makes a directory hierarchy ++mkdirhier \- create a directory hierarchy + .SH SYNOPSIS + .B mkdirhier +-directory ... ++.I directory ++\&... + .SH DESCRIPTION +-The +-.I mkdirhier +-command creates the specified directories. Unlike +-.I mkdir +-if any of the parent directories of the specified directory +-do not exist, it creates them as well. ++.B mkdirhier ++creates the specified directories. ++Unlike some versions of ++.BR mkdir , ++if any of the parent directories of the specified directory do not exist, ++.B mkdirhier ++creates them as well. ++.PP ++.B mkdirhier ++is a wrapper for ++.BR mkdir ; ++systems with ++.BR mkdir (__osmansuffix__) ++implementations conformant with the Single Unix Specification may simply ++use ++.B mkdir \-p ++instead \(em this includes all systems using the GNU Core Utilities' ++version of ++.BR mkdir . ++.SH DIAGNOSTICS ++If ++.B mkdirhier ++is not supplied with any arguments, a usage message is printed. ++.PP ++.B mkdirhier ++prefixes its diagnostic messages with the name under which it was invoked, ++followed by a colon (\(oq:\(cq) so that its messages can be distingushed ++from others. ++.TP ++.B could not create directory \(dq\fIdirectory\fP\(dq ++indicates that there was a failure while creating ++.IR directory . ++This message will likely be preceded by a diagnostic message from ++.BR mkdir . ++.SH "EXIT STATUS" ++.TP ++.B 64 ++.B mkdirhier ++was not given any directory names to create. ++.PP ++.B mkdirhier ++otherwise exits with the exit status of the last ++.B mkdir ++command that failed. ++.SH BUGS ++.B mkdirhier ++does not create all the requested directories as an atomic operation; ++therefore, it is is susceptible to race conditions. ++For example, if ++.B mkdirhier ++is directed to create a hierarchy ++.I a/b/c/d ++and any of ++.IR a/ , ++.IR b/ , ++or ++.I c/ ++do not yet exist, any of the newly-created directories can be removed ++and/or replaced by a symbolic link to another location in the window of ++time after ++.B mkdirhier ++creates a directory and the directory immediately below it. ++This means that failures can be provoked (since ++.B mkdir ++will fail to create a directory in a directory that does not already ++exist), ++or directories may be created in unexpected locations. ++The same limitation holds for multiple directory arguments to ++.BR mkdirhier ; ++given two arguments ++.I a/b/c/d ++and ++.IR a/b/c/f , ++it is possible for the directory hierarchy ++.I a/b/c ++to be disrupted in the time between the processing of the two arguments. ++To avoid these problems, use ++.B mkdir \-p ++instead, or do not use ++.B mkdirhier ++to create directories in parts of the filesystem where untrusted users can ++manipulate them. + .SH "SEE ALSO" +-mkdir(1) ++.BR mkdir (__osmansuffix__) +diff -urN xc/config/util~/mkdirhier.sh xc/config/util/mkdirhier.sh +--- xc/config/util~/mkdirhier.sh 2005-02-08 01:58:07.000000000 -0500 ++++ xc/config/util/mkdirhier.sh 2005-02-08 02:12:37.000000000 -0500 @@ -1,67 +1,94 @@ #!/bin/sh -# $Xorg: mkdirhier.sh,v 1.3 2000/08/17 19:41:53 cpqbld Exp $ @@ -120,7 +271,7 @@ +Create each directory DIRECTORY, also creating intermediate directories in the +specified hierarchy as necessary. + -+Use "mkdir -p" instead if the system supports it. ++Note: Use "mkdir -p" instead of "$PROGNAME" if the system supports it. +EOF +} + @@ -167,132 +318,3 @@ +exit $STATUS + +# vim:set ai et sts=4 sw=4 tw=80: ---- xc/config/util/mkdirhier.man~ 2005-01-25 14:00:13.000000000 -0500 -+++ xc/config/util/mkdirhier.man 2005-01-25 17:27:10.000000000 -0500 -@@ -1,42 +1,91 @@ --.\" $Xorg: mkdirhier.man,v 1.4 2001/02/09 02:03:17 xorgcvs Exp $ --.\" Copyright (c) 1993, 1994, 1998 The Open Group --.\" --.\" Permission to use, copy, modify, distribute, and sell this software and its --.\" documentation for any purpose is hereby granted without fee, provided that --.\" the above copyright notice appear in all copies and that both that --.\" copyright notice and this permission notice appear in supporting --.\" documentation. --.\" --.\" The above copyright notice and this permission notice shall be included in --.\" all copies or substantial portions of the Software. --.\" --.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL --.\" THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, --.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF --.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --.\" SOFTWARE. --.\" --.\" Except as contained in this notice, the name of The Open Group shall not --.\" be used in advertising or otherwise to promote the sale, use or other --.\" dealing in this Software without prior written authorization from The --.\" Open Group. -+.\" Copyright 2005 Branden Robinson. - .\" --.\" $XFree86: xc/config/util/mkdirhier.man,v 1.3 2001/12/14 19:53:22 dawes Exp $ -+.\" Permission is hereby granted, free of charge, to any person obtaining a -+.\" copy of this software and associated documentation files (the "Software"), -+.\" to deal in the Software without restriction, including without limitation -+.\" the rights to use, copy, modify, merge, publish, distribute, sublicense, -+.\" and/or sell copies of the Software, and to permit persons to whom the -+.\" Software is furnished to do so, subject to the following condition: - .\" --.TH MKDIRHIER 1 __xorgversion__ -+.\" The above copyright notice and this permission notice shall be -+.\" included in all copies or substantial portions of the Software. -+.\" -+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+.\" SOFTWARE IN THE PUBLIC INTEREST, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR -+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+.\" DEALINGS IN THE SOFTWARE. -+.TH mkdirhier __mansuffix__ __xorgversion__ - .SH NAME --mkdirhier \- makes a directory hierarchy -+mkdirhier \- create a directory hierarchy - .SH SYNOPSIS - .B mkdirhier --directory ... -+.I directory -+\&... - .SH DESCRIPTION --The --.I mkdirhier --command creates the specified directories. Unlike --.I mkdir --if any of the parent directories of the specified directory --do not exist, it creates them as well. -+.B mkdirhier -+creates the specified directories. -+Unlike some versions of -+.BR mkdir , -+if any of the parent directories of the specified directory do not exist, -+.B mkdirhier -+creates them as well. -+.PP -+Systems with -+.BR mkdir (__osmansuffix__) -+implementations conformant with the Single Unix Specification may simply -+use -+.B mkdir \-p -+instead \(em this includes all systems using the GNU Core Utilities' -+version of -+.BR mkdir . -+.SH DIAGNOSTICS -+If -+.B mkdirhier -+is not supplied with any arguments, a usage message is printed. -+.PP -+.B mkdirhier -+prefixes its diagnostic messages with the name under which it was invoked, -+followed by a colon (\(oq:\(cq) so that its messages can be distingushed -+from others. -+.TP -+.B could not create directory \(dq\fIdirectory\fP\(dq -+indicates that there was a failure while creating -+.IR directory . -+This message will likely be preceded by a diagnostic message from -+.BR mkdir . -+.SH "EXIT STATUS" -+.TP -+.B 64 -+.B mkdirhier -+was not given any directory names to create. -+.PP -+.B mkdirhier -+otherwise exits with the exit status of the last -+.B mkdir -+command that failed. -+.SH BUGS -+.B mkdirhier -+is susceptible to race conditions; for example, if it is directed to create -+a hierarchy -+.I a/b/c/d -+and any of -+.IR a/ , -+.IR b/ , -+or -+.I c/ -+do not yet exist, they can be removed and replaced by a symbolic link to -+another location in the window of time after -+.B mkdirhier -+creates a directory and the directory immediately below it. -+This means that directories may be created in unexpected locations. -+To avoid this problem, use -+.B mkdir \-p -+instead, or do not use -+.B mkdirhier -+to create directories in parts of the filesystem where untrusted users can -+manipulate them. - .SH "SEE ALSO" --mkdir(1) -+.BR mkdir (__osmansuffix__) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

