darcs

Issue 17 darcs and gpg path-handling mismatch in Windows

Title darcs and gpg path-handling mismatch in Windows
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, eivuokko, kowey, thorkilnaur, tommy, wglozer
Assigned To eivuokko
Topics Patch, Windows

Created on 2005-11-22.23:42:54 by eivuokko, last changed 2009-08-27.13:46:46 by admin.

Messages
msg67 (view) Author: eivuokko Date: 2005-11-22.23:42:54
When running darcs apply with --verify, the keyring is treated as path and all
path separators are transformed into /, but gpg for windows doesn't understand
this.  Using full path, with drive-letter, doesn't help.

This is also bug in gpg, and maybe certainly not critical until someone tries to
use host darcs email/other push scheme in Windows.

Transcript follows:
D:\source\haskell\sign>darcs apply -v --verify=d:\source\haskell\sign-ring ..\ad
d-foo.darcs
gpg: error creating keyring `C:/Documents and Settings/eivuokko/Application Data
/gnupg\d:/source/haskell/sign-ring': Invalid argument
gpg: keyblock resource `C:/Documents and Settings/eivuokko/Application Data/gnup
g\d:/source/haskell/sign-ring': file open error
gpg: Signature made 11/23/05 01:01:37 using DSA key ID B9223248
gpg: Can't check signature: public key not found
gpg: error creating keyring `C:/Documents and Settings/eivuokko/Application Data
/gnupg\d:/source/haskell/sign-ring': Invalid argument
gpg: keyblock resource `C:/Documents and Settings/eivuokko/Application Data/gnup
g\d:/source/haskell/sign-ring': file open error
gpg: Signature made 11/23/05 01:01:37 using DSA key ID B9223248
gpg: Can't check signature: public key not found

darcs failed:  Patch bundle not properly signed, or gpg failed.

D:\source\haskell\sign>gpg --batch --no-default-keyring --keyring d:\source\hask
ell\sign-ring --verify ..\add-foo.darcs
gpg: Signature made 11/23/05 01:01:37 using DSA key ID B9223248
gpg: Good signature from "Esa Ilari Vuokko <ei@vuokko.info>"
msg132 (view) Author: droundy Date: 2005-11-30.14:10:56
I'm wondering, would gpg be all right with a path like

C:\foo/bar/baz?

That might be a bit more transparent to code than converting all / to \ on
windows.  On the other hand, I imagine that \ is illegal in filenames on
windows, which might mean that converting all / to \ when we do the system
call would be reasonable...
-- 
David Roundy
http://www.darcs.net
msg133 (view) Author: eivuokko Date: 2005-11-30.14:38:27
I have patch for this, posted on darcs-devel [1] (There is also
another patch on that email.)  I implemented it simply by
making conversion in this specific case.  I didn't feel
courageous enough to change this behaviour through-out darcs.
(or even just exec)

It's rarely a problem to have / as patch separator, it is  just
some tools, like gnupg that have wierd expectations.  And some
things think / as a commandline switch, but it's mostly non-issue
when quotes are in place.  Converting such switches to \ would
be wrong, tho.

[1] http://www.abridgegame.org/pipermail/darcs-devel/2005-November/003583.html
msg135 (view) Author: droundy Date: 2005-12-01.12:45:09
Looks good to me.  Thanks!
-- 
David Roundy
http://www.darcs.net
msg523 (view) Author: tommy Date: 2006-02-28.23:54:12
fixed in 1.0.6
Tue Nov 29 17:45:33 CET 2005  Esa Ilari Vuokko <ei@vuokko.info>
  * Use \ as path separator for GnuPG in Windows -- makes apply --verify work
History
Date User Action Args
2005-11-22 23:42:54eivuokkocreate
2005-11-30 14:10:57droundysetstatus: unread -> unknown
nosy: droundy, tommy, wglozer, eivuokko
messages: + msg132
2005-11-30 14:38:27eivuokkosetnosy: droundy, tommy, wglozer, eivuokko
messages: + msg133
2005-12-01 12:40:46droundysettopic: + Patch
nosy: droundy, tommy, wglozer, eivuokko
2005-12-01 12:45:10droundysetnosy: droundy, tommy, wglozer, eivuokko
messages: + msg135
2005-12-17 20:47:44jchsetstatus: unknown -> resolved-in-unstable
nosy: droundy, tommy, wglozer, eivuokko
2006-02-28 23:54:13tommysetstatus: resolved-in-unstable -> resolved
nosy: droundy, tommy, wglozer, eivuokko
messages: + msg523
2009-08-06 17:38:03adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, dagit, mornfall, simon, kowey, beschmi, thorkilnaur, - droundy, wglozer, eivuokko
2009-08-06 20:46:19adminsetnosy: - beschmi
2009-08-10 21:51:49adminsetnosy: + wglozer, eivuokko, - markstos, darcs-devel, zooko, jast, dagit, Serware, mornfall
2009-08-25 17:51:40adminsetnosy: + darcs-devel, - simon
2009-08-27 13:46:46adminsetnosy: tommy, kowey, wglozer, darcs-devel, eivuokko, thorkilnaur, dmitry.kurochkin