On Sun, Jan 18, 2009 at 1:14 AM, Mike Meyer <m...@mired.org> wrote:
> On Sat, 17 Jan 2009 23:03:12 +0100
> Mika Borner <opensola...@bluewin.ch> wrote:
>> We should not forget that Apple welcomes users with a BSD userland. Many
>> developers also use Mac OS X as their preferred platform. And almost
>> everybody seems quite happy with it...
>
> This isn't quite true. Yes, OSX is fundamentally a BSD ("best of the
> BSDs" would be more accurate, as they picked tools from them all)
> userland, but they've been actively dropping in GNU tools where they
> believed it wouldn't hurt anything, specifically to help Linux people
> switch. I.e. - /bin/sh is now bash, /usr/bin/tar is the gnu tar, and
> probably others, as I don't make a habit of keeping track of it.
>
> Further, the BSD folks have been adding select features from the GNU
> tools all along - so even if /usr/bin/tar on OSX were still the bsd
> tar, it would understand the z and j flags (for that matter, on my OSX
> dev boxes, "tar" is /usr/pkg/bin/tar, which is the NetBSD tar, which
> understands the z & j flags....).
>
> Come to think of it, being in all the BSD's as well as GNU makes a
> good starting criterion for whether something should be added to the
> Solaris version. Three groups of unix systems developers - other than
> the original implementers - have decided this was a worthwhile
> feature, and added it. Assuming they do it the same way, it's now
> pretty much standard across at least the open source Unix community.

Because this hasn't been beaten to death already, while I am waiting
for some unrelated stuff to build, I hammered this out:
http://cr.opensolaris.org/~jbk/chmod

It's not complete, and could probably be a bit cleaner.  The long
options from GNU chmod aren't supported yet, but -c, -v are
implemented (and a couple quick tests look ok).  Also -H -L, -P from
BSD has also been implemented (but not tested yet, I'll try to do that
later this week unless someone wants to take a stab at it).  Current
deficiencies aside, it is actual code.

It tries to do the best of all worlds, though there's no way it can be
100% identical in all cases.  Specifically, the -c/-v output format
differs between BSD & GNU, though if anyone's trying to use that in a
script, they do so at their own risk.  Related to that, ACL (as
opposed to trad. unix permission) changes do not currently print
anything for -c/-v (probably should, but the question is what, and I
haven't thought of a good answer yet).

I'm also unsure if the long options present any complications wrt
standards compliance (I have no experience in that area, so those more
familiar would have to comment).
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to