darcs

Issue 2724 cannot push to wiki

Title cannot push to wiki
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List bfrk
Assigned To
Topics

Created on 2024-05-26.12:15:38 by bfrk, last changed 2024-05-27.17:30:57 by bfrk.

Messages
msg23910 (view) Author: bfrk Date: 2024-05-26.12:15:36
I tried to push a change to the wiki.

First, it fails because _darcs/index is not writable. Have you (Ganesh) 
set your umask to 0002? I fixed the permissions manually. Then I pushed 
again and it says:

darcs: /opt/gitit/data/wikidata/filecache-tmp-66: 
renameDirectory:renamePath:rename: unsatisfied constraints (Directory 
not empty)
Apply failed!

Then I set the whole repo recursively to g+w. Push again, now it tells 
me

No recorded local patches to push!

But the page is still at 2.18.2. So I look at what's in there and see my 
changes reverted. So I do darcs revert -a. But that doesn't fix it 
either.

Can we get this to work a bit more reliably?
msg23911 (view) Author: bfrk Date: 2024-05-26.12:17:27
Just did a `systemctl restart gitit` but that doesn't help either.
msg23912 (view) Author: bfrk Date: 2024-05-26.17:47:30
Okay, I solved the problem with my patch to the FrontPage not being 
visible. Turns out we were missing the _darcs/prefs/defaults which 
enables running the posthook.sh as apply posthook. Furthermore, the 
script had a bug (it still had the cache directory from the old vm). 
Anyway, a better way to invalidate cache entries in the posthook is to 
run

expireGititCache http://localhost:5001 $DARCS_FILES

The permission problem is a bug in darcs (it ignores the corretly set 
umask for _darcs/index). My current workaround is to push as user gitit.
msg23914 (view) Author: ganesh Date: 2024-05-26.20:23:55
ganesh's umark on darcs.net is 0002, and according to the defaultrepo
in the place I normally work on the wiki locally, I'm pushing to
gitit@ rather than ganesh@

But I can't remember exactly what I do, I think it's a bit of a
struggle to figure it out each time.
msg23915 (view) Author: bfrk Date: 2024-05-26.23:30:33
Interesting that you also push as gitit@. I just checked that the user 
gitit also has umask 0002, and still _darcs/index (and only that file) 
becomes g-w. The darcs version used by gitit (i.e. /usr/bin/darcs) is 
2.14 which is quite old. I have install a current darcs and a current 
cabal into /usr/local/bin and it looks as if the permissions are okay 
now.
msg23916 (view) Author: bfrk Date: 2024-05-27.17:30:57
Works now after my various fixes.
History
Date User Action Args
2024-05-26 12:15:38bfrkcreate
2024-05-26 12:17:28bfrksetmessages: + msg23911
2024-05-26 17:47:32bfrksetmessages: + msg23912
2024-05-26 20:23:56ganeshsetmessages: + msg23914
2024-05-26 23:30:34bfrksetmessages: + msg23915
2024-05-27 17:30:57bfrksetstatus: unknown -> resolved
priority: bug
messages: + msg23916