public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Volker Quetschke <quetschke@scytek.de>
To: Olaf Foellinger <Olaf.Foellinger@bln.sesa.de>
Cc: cygwin@cygwin.com
Subject: Re: mutt and gpg 1.07
Date: Fri, 31 May 2002 19:56:00 -0000	[thread overview]
Message-ID: <3CF7D1B5.2020901@scytek.de> (raw)
In-Reply-To: <20020528105452.GG1504@NBOF>

[-- Attachment #1: Type: text/plain, Size: 1715 bytes --]

Hi!

>>>now where gnupg 1.07 is out and builds cleanly under cygwin I'll repeat
>>>my question whether it is possible to get mutt working with gpg. All my
>>>tries failed so far with the error that gpg cannot find the file mutt
>>>reports to him. I'm not a developer so I cannot resolve the problem
>>>myself but this is the biggest problem for me.
>>>
>>here's a more detailed error description. I'm using the cygwin mutt
>>together with a gpg 1.07 which builds cleanly under cygwin.

Now it builds OOB, at least when you use the attached patch.

>>When I try to encrypt a message and press y to send mutt presents me a
>>list of possible keys.  I choose one and I get the error
>>
>>gpg: /tmp/mutt-NBOF-1728-4: encryption failed: file open error
>>Bitte drücken Sie eine Taste...

Yes, the gnupg 1.0.7 version uses the "windows file system", and I think 
you don't have a c:\tmp\ directory. Even if you have, this is not the 
same directory ( \tmp ) for mutt. (mutt is a real cygwin application)

>>and indeed there isn't such a file 
>>
>>$ ls /tmp
>>mutt-NBOF-1620-143  mutt-NBOF-1728-1  mutt-NBOF-1728-2
>>
>>It seems to me that mutt doesn't create the right file or does report
>>the wrong filename to gpg. 

Mutt does, but gpg looks elseware.

As I had a look into this problem I realized that it was easy to fix 
configure.ac to make gnupg compile OOB. Then I removed the special cases 
with __CYGWIN__ for the file handling and it still build without a problem.

This patch might fix your problem, feel free to test the patched gpg.

I only looked at the parts of the source with special __CYGWIN__ cases 
therefore if might be that I missed someting. (Please report if it works 
;-) )


Bye

     Volker

[-- Attachment #2: gnupg.diff --]
[-- Type: text/plain, Size: 4674 bytes --]

? gnupg.diff
Index: configure.ac
===================================================================
RCS file: /cvs/gnupg/gnupg/Attic/configure.ac,v
retrieving revision 1.1.2.29
diff -u -r1.1.2.29 configure.ac
--- configure.ac	29 Apr 2002 14:56:08 -0000	1.1.2.29
+++ configure.ac	31 May 2002 16:29:14 -0000
@@ -199,7 +199,7 @@
 
 try_gettext=yes
 case "${target}" in
-    *-*-mingw32*|*-*-cygwin*)
+    *-*-mingw32*)
         # special stuff for Windoze NT
         ac_cv_have_dev_random=no
         AC_DEFINE(USE_ONLY_8DOT3,1,
@@ -215,6 +215,10 @@
                    MingW32 systems and these systems lack Posix functions,
                    we use a simplified version of gettext])
         try_gettext="no"
+        ;;
+    *-*-cygwin*)
+        # special stuff for cygwin
+        ac_cv_have_dev_random=no
         ;;
     i?86-emx-os2 | i?86-*-os2*emx )
         # OS/2 with the EMX environment
Index: g10/exec.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/Attic/exec.c,v
retrieving revision 1.1.2.12
diff -u -r1.1.2.12 exec.c
--- g10/exec.c	29 Apr 2002 14:42:33 -0000	1.1.2.12
+++ g10/exec.c	31 May 2002 16:29:15 -0000
@@ -62,7 +62,7 @@
 #ifdef __riscos__
 	      tmp="<Wimp$ScrapDir>.GnuPG";
 	      mkdir(tmp,0700); /* Error checks occur later on */
-#elif defined (__MINGW32__) || defined (__CYGWIN32__)
+#elif defined (__MINGW32__)
 	      tmp=m_alloc(256);
 	      if(GetTempPath(256,tmp)==0)
 		strcpy(tmp,"c:\\temp");
@@ -88,7 +88,7 @@
 
   sprintf(info->tempdir,"%s" DIRSEP_S "gpg-XXXXXX",tmp);
 
-#if defined (__MINGW32__) || defined (__CYGWIN32__)
+#if defined (__MINGW32__)
   m_free(tmp);
 #endif
 
Index: g10/g10.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/Attic/g10.c,v
retrieving revision 1.129.2.103
diff -u -r1.129.2.103 g10.c
--- g10/g10.c	25 Apr 2002 08:30:35 -0000	1.129.2.103
+++ g10/g10.c	31 May 2002 16:29:20 -0000
@@ -807,7 +807,7 @@
     opt.pgp2_workarounds = 1;
     opt.force_v3_sigs = 1;
     opt.escape_from = 1;
-#if defined (__MINGW32__) || defined (__CYGWIN32__)
+#if defined (__MINGW32__)
     opt.homedir = read_w32_registry_string( NULL, "Software\\GNU\\GnuPG", "HomeDir" );
 #else
     opt.homedir = getenv("GNUPGHOME");
Index: g10/gpgv.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/Attic/gpgv.c,v
retrieving revision 1.1.2.17
diff -u -r1.1.2.17 gpgv.c
--- g10/gpgv.c	29 Apr 2002 14:42:34 -0000	1.1.2.17
+++ g10/gpgv.c	31 May 2002 16:29:20 -0000
@@ -151,7 +151,7 @@
     opt.always_trust = 1;
     opt.batch = 1;
 
-  #if defined (__MINGW32__) || defined (__CYGWIN32__)
+  #if defined (__MINGW32__)
     opt.homedir = read_w32_registry_string( NULL, "Software\\GNU\\GnuPG", "HomeDir" );
   #else
     opt.homedir = getenv("GNUPGHOME");
Index: g10/passphrase.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/passphrase.c,v
retrieving revision 1.33.2.24
diff -u -r1.33.2.24 passphrase.c
--- g10/passphrase.c	29 Apr 2002 14:42:34 -0000	1.33.2.24
+++ g10/passphrase.c	31 May 2002 16:29:22 -0000
@@ -97,7 +97,7 @@
 static char *next_pw = NULL;
 static char *last_pw = NULL;
 
-#if defined (__MINGW32__) || defined (__CYGWIN32__)
+#if defined (__MINGW32__)
 static int read_fd = 0;
 static int write_fd = 0;
 #endif
@@ -176,7 +176,7 @@
 static int
 writen ( int fd, const void *buf, size_t nbytes )
 {
-#if defined (__MINGW32__) || defined (__CYGWIN32__)
+#if defined (__MINGW32__)
     DWORD nwritten, nleft = nbytes;
     
     while (nleft > 0) {
@@ -219,7 +219,7 @@
 static int
 readn ( int fd, void *buf, size_t buflen, size_t *ret_nread )
 {
-#if defined (__MINGW32__) || defined (__CYGWIN32__)
+#if defined (__MINGW32__)
     DWORD nread, nleft = buflen;
     
     while (nleft > 0) {
@@ -313,7 +313,7 @@
 
 #if !defined (__riscos__)
 
-#if !defined (__MINGW32__) && !defined (__CYGWIN32__)
+#if !defined (__MINGW32__)
 /* For the new Assuan protocol we may have to send options */
 static int
 agent_send_option (int fd, const char *name, const char *value)
@@ -418,7 +418,7 @@
 #endif
   return rc;
 }
-#endif /*!__MINGW32__ && !__CYGWIN32__*/
+#endif /*!__MINGW32__ */
 
 
 /*
@@ -429,7 +429,7 @@
 static int
 agent_open (int *ret_prot)
 {
-#if defined (__MINGW32__) || defined (__CYGWIN32__)
+#if defined (__MINGW32__)
     int fd;
     char *infostr, *p;
     HANDLE h;
@@ -574,7 +574,7 @@
 static void
 agent_close ( int fd )
 {
-#if defined (__MINGW32__) || defined (__CYGWIN32__)
+#if defined (__MINGW32__)
     HANDLE h = OpenEvent(EVENT_ALL_ACCESS, FALSE, "gpg_agent");
     ResetEvent(h);
 #else


[-- Attachment #3: Type: text/plain, Size: 214 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

  parent reply	other threads:[~2002-05-31 19:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-03  6:35 Olaf Foellinger
2002-05-17  4:15 ` Olaf Foellinger
2002-05-28  8:12   ` Olaf Foellinger
2002-05-28 15:16     ` Volker Quetschke
2002-05-29 10:28       ` Olaf Foellinger
2002-05-30 10:03         ` Volker Quetschke
2002-05-30 11:14           ` Olaf Foellinger
2002-05-31 19:56     ` Volker Quetschke [this message]
     [not found]       ` <20020531203828.GA22766@redhat.com>
2002-06-01 17:32         ` Volker Quetschke
2002-06-02  5:54           ` Nicholas Wourms
2002-06-03  1:47       ` Olaf Foellinger
2002-06-03 12:10         ` Volker Quetschke
2002-06-03 13:00           ` Nicholas Wourms

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CF7D1B5.2020901@scytek.de \
    --to=quetschke@scytek.de \
    --cc=Olaf.Foellinger@bln.sesa.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).