[darcs-devel] privs/ownership within repo
quick at sparq.org
quick at sparq.org
Wed Apr 11 16:35:18 PDT 2007
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.
$ darcs check
Checking patch 41 of 41... done.
The repository is consistent!
$ darcs repair
Applying patch 41 of 41... done.
The repository is already consistent, no changes made.
$ ls -lhR _darcs
cvs_sync/_darcs:
total 48K
drwxrwxr-x 2 kquick users 1 Jun 20 2006 checkpoints
drwxrwxr-x 2 kquick kquick 4.0K Apr 4 12:47 current
drwxrwxr-x 2 kquick users 1 Jun 20 2006 inventories
-rw-rw-r-- 1 kquick kquick 4.4K Apr 4 12:47 inventory
drwxrwxr-x 2 kquick users 4.0K Apr 11 12:06 patches
drwxrwxr-x 2 kquick users 4.0K Jun 20 2006 prefs
drwxrwxr-x 2 kquick users 4.0K Feb 27 15:33 pristine-old
-rw-rw-r-- 1 kquick kquick 187 Apr 4 12:47 tentative_pristine
cvs_sync/_darcs/patches:
total 200K
-rw-rw-r-- 2 kquick users 5.4K Jun 20 2006 20060620204157-670fd-
f9a0970932f8447f6ef5e08300f3bab3a7e02f71.gz
-rw-rw-r-- 2 kquick users 2.4K Jun 20 2006 20060620204320-670fd-
1fa20fd81f0d4b14345782aef53b219a2ba939a7.gz
-rw-rw-r-- 1 kquick users 180 Jun 20 2006 20060620205002-670fd-
95e9f6fd164c3b0c20a5b2ee2cafe3895c466a5d.gz
-rw-rw-r-- 1 kquick users 439 Jun 20 2006 20060620205156-670fd-
8564a74329acfd79f2042012b3afb2b89a14c5fc.gz
...
-rw-rw-r-- 1 kquick kquick 174 Apr 4 12:47 20070404175628-88aff-
d7c35ff75ad7569547bd6ed505c252ee2b5035dc.gz
-rw-r--r-- 1 kurt kurt 257 Apr 11 12:06 20070411190501-e3414-
d34d232f6e84918020bf0649c6f8cbf0e0739524.gz
-rw-r--r-- 1 kurt kurt 206 Apr 11 12:06 20070411190536-e3414-
c2bf70d93e699741c9a1a05419c53da11b7ce4b2.gz
-rw-rw-r-- 1 kquick kquick 4 Apr 4 12:47 pending
-rw-r--r-- 1 kurt kurt 4 Apr 11 12:06 pending.new
-rw-rw-r-- 1 kquick kquick 5.4K Feb 27 15:34 unrevert
First, note that some of my own commits have the "users" group, and some have
my own group, of which no-one else is a member. A mild inconsistency... more
on this below. His push apparently failed however because the ownership/privs
of the inventory file prevented him from updating it.
However, his (failed) commits created two patch files that only he can modify.
This may or may not be a problem: if I later tried to do a pull or apply for
those patches, would darcs recognize that they were already there and not try
to write them? Keep in mind that they are not in the inventory.
Also, he now owns the pending.new... what impact will that have on my
subsequent operations.
----------------
As far as resolutions:
1) Clearly I could have been more pro-active about making sure things would
have worked before-hand, and/or I can clean things up after the fact here, but
both of these would seem to violate the principle of least surprise and the
general ease-of-use I've come to love about darcs.
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).
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.
4) The "darcs check" and "darcs repair" should probably detect and report this
type of thing at a minimum, and perhaps do the fixups in #2 and #3 above as
part of the repair.
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?
-KQ
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
More information about the darcs-devel
mailing list