Some updates:

* I didn't try the --umask flag: this is available for send, but not push,
  but seems like it should apply to both (if possible).

* Experimentation with my scenario showed that setting group sticky and group
  ownership of things was all that was really needed to recover (see my next 
  point though).  The un-inventoried patch files didn't seem to cause any 
  problems, although once I did have to do a darcs repair but I can't remember 
  the exact situation at the moment.

* I think my proposal of automatically setting up the _darcs stuff is
  insufficient (removing the need to determine if it is the right thing
  to do).  The reason is that the push will also modify the current
  working directory, which means that the group sticky bit should be
  set throughout that working directory, not just on _darcs.

  * This leads me to believe that a wiki entry "chmod -R g+s ." is
    probably the best solution, although not automatic.  It's unfortunate
    because the pull operation works just fine, leading one to try
    the push with the expectation that it will just work as well.

* The umask is still needed though.  It got me wondering though that it's the
  *target* repository that should supply this info instead of the local
  repository: setting a darcs prefs in the local repository would apply that
  to all pushes, regardless of the target.

* It turns out that to fix the problem I described, I had to do the chmod as
  above and change the group ownership to something everyone belongs to.
  However, during further testing, I discovered additional items that
  should probably be tweaked to help people clean up from this in the future:
  * The push failure did make changes to the working directory before it
    failed to update the inventory file.  This required me to "revert" to
    get rid of the changes before the push could be retried.
  * The push should probably ensure that at a minimum the new inventory has
    the same permissions/ownership as the old inventory.

Obviously not high priority stuff, but pending more discussion here (or other 
volunteers), I'll probably take a crack at this in a couple of weeks (after my 
vacation).

-KQ


Quoting "Eric Y. Kow" <[EMAIL PROTECTED]>:

> On Wed, Apr 11, 2007 at 18:35:18 -0500, [EMAIL PROTECTED] wrote:
> > Just ran into a situation of concern when a colleague (kurt) tried to push
> some
> > patches to my (kquick) darcs repo.  His push failed with privilege
> problems, and
> > warned that a "darcs repair" was recommended for the repository.
> 
> I have also been bitten by other people owning files in my darcs
> directory and would like to see some means of helping people to avoid
> it.  Even a short snippet of example chmodery on the darcs wiki would be
> good.
> 
> > 2) Setting the sticky-group bit on the _darcs directory and all
> subdirectories 
> > would ensure that group ownership in the repository was consistent.  This
> seems 
> > desireable, but something that "darcs init" should do for me (if apropriate
> to 
> > the current system type).
> 
> Two questions here:
> 
> - Is this something we would want to happen systematically? can setting
>   the sticky bit 'hurt'?  If so, wouldn't it be better just to tell
>   people what Unix invocation to type in whilst setting up a shared
>   repo?
> - Is darcs init really enough?  What if kurt pushes a patch that creates
>   a directory?
> 
> > 3) It also seems desireable for "darcs push" to ensure that all files
> created 
> > have rw privs at the group level.  This may not be directly available
> through 
> > the transport mechanism and might require a post-copy operation.
> 
> Have you looked at the --umask flag that Juliusz implemented?  I am
> thinking that setting it as repository default for the apply command
> might alleviate some of the push issues, though likely not all.  The
> hope is that at the very least, patches pushed over will be g+w so that
> darcs doesn't fail for you because of something kurt did, or something
> like that.
> 
> > I'm willing to undertake the work needed to resolve these issues, but I
> need to 
> > know if this sounds reasonable or if I've just foolishly gone off into the
> 
> > weeds.  Thoughts anyone?
> 
> I'll happily review anything you submit, but I'll probably need the help
> of somebody who knows more about computers/Unix.
> 
> -- 
> Eric Kow                     http://www.loria.fr/~kow
> PGP Key ID: 08AC04F9         Merci de corriger mon français.
> 




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
_______________________________________________
darcs-devel mailing list
[EMAIL PROTECTED]
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to