ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Oxspring" <roxspr...@yahoo.com>
Subject RE: PROPOSAL: chgrp, chown, chmod, chrights + question ;)
Date Fri, 09 Nov 2001 20:42:38 GMT
I've been thinking about putting together a bigger change for a while (since
the chrights task first came up), and wondered what others thought...

My pet hate with the the chmod task is that it is too like the unix
commandline tool and not a verbose style interface in keeping with ant
tasks - basically I think that the perm attribute should be replaced by a
bunch of inner elements in any "new" implementation.  My other niggle with
the chmod task is that it doesn't seem to work on windows - I use
Hummingbird NFS (or something like that) to mount unix shares as drives in
NT and have a chmod.exe all ready to us, but Ant doesn't seem to take
advantage of this.

Another niggle is that there is no equivelant attrib task for FAT / NTFS
drives and no support for CACLS.EXE which seems to be part of NT4 & W2K for
changing access control lists on NTFS.  The XML snippet following demos my
proposal, where a given set of files can be altered in different ways on
different filing systems:

<filerights>
	<fileset ... > ... </fileset>
	<fat readonly="yes|no" hidden="yes|no" system="yes|no" archive="yes|no"/>
	<ntfs>
		<grant user="roberto"  access="none|read|write|change|full"/>
		<grant user="everyone" access="none|read|write|change|full"/>
	</ntfs>
	<unix>
		<user  name="roberto"     readable="yes|no" writable="yes|no"
executable="yes|no">
		<group name="informatics" readable="yes|no" writable="yes|no"
executable="yes|no">
		<all                      readable="yes|no" writable="yes|no"
executable="yes|no">
	</unix>
</filerights>

The fat,ntfs and unix elements would correspond to calls to attrib,cacls and
chmod+chown accordingly.  The order of execution would match the order in
the buildfile, leaving it to the build engineer to resolve clashes between
commands.

So why haven't I done it already? mainly because I keep getting scared off
by the code to exec other files :-) Also I'm not sure when the task should
be considered to fail - presumably it should fail if none of the three
subtask types succeeds but is this good enough?

Of course all of this is only really worth it if people would find the
functionality useful so what do people think? should I pull my finger out
and get on with it, or should I go back to the drawing board?

Thoughts?

Rob


> -----Original Message-----
> From: Martin van den Bemt [mailto:mvdb@mvdb.com]
> Sent: Thursday, November 08, 2001 3:39 PM
> To: Ant Developers List
> Subject: RE: PROPOSAL: chgrp, chown, chmod, chrights + question ;)
>
>
> Soo below..
>
> > -----Original Message-----
> > From: Stefan Bodewig [mailto:bodewig@apache.org]
> > Sent: Thursday, November 08, 2001 3:41 PM
> > To: ant-dev@jakarta.apache.org
> > Subject: Re: PROPOSAL: chgrp, chown, chmod, chrights + question ;)
> >
> >
> > On Tue, 6 Nov 2001, Martin van den Bemt <mvdb@mvdb.com> wrote:
> >
> > > but since backward compatibility is necessary, I could create the
> > > chgrp and chown tasks (simple copies of chmod) and integrate the 3
> > > in the chrights task.
> >
> > As there is no single chgrp task, there is no need for having a
> > separate task IMHO.  Do you exepect chrights to use a similar sytax
> > like chmod did?
>
> I planned a lot of copy and past in there yes ;))
>
> > If so, we could get away with making chmod an alias
> > name for chrights (and issue a deprecation warning if somebody uses
> > that name).
>
> I'm in favour of that too..
>
> > > d) Let's deprecate the chown and go for the chrights
> >
> > Yes.
>
>
>
> > > 2) If everyone prefers a or c, I would prefer to minimize code and
> > > execute the task chmod/chown/chgrp from the chrights task.
> >
> > Don't know whether this actually is necessary, see above.
> >
> > > but couldn't find a clean way to do that from my code.
> >
> > There are a couple of tasks that do similar things, see how <genkey>
> > (ab)uses <exec> for example.
>
> I'll see what these tasks do..
>
> Thanx for the reply..
>
> Mvgr,
> Martin
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message