public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* standalone cygwin programs that use "/tmp" don't work
@ 2002-08-12 23:25 John R. McPherson
  2002-08-13  4:36 ` Corinna Vinschen
  2002-08-13  6:57 ` Warren Young
  0 siblings, 2 replies; 8+ messages in thread
From: John R. McPherson @ 2002-08-12 23:25 UTC (permalink / raw)
  To: cygwin

Hi,

I'm a developer for some digital library software (http://greenstone.org).
For our windows version, we use cygwin to compile some third-party file
converters such as wvWare.
Our windows distribution includes these binaries as well as cygwin1.dll.

However, we've only recently noticed that these programs fail on some
windows machines. It turns out that they run fine if cygwin is installed,
and fail if it isn't. The problem is when these programs use a function
such as mkstemp() or tmpnam(), the cygwin1.dll will use "/tmp" relative
to the mount points, but if cygwin has never been installed on that
machine, then it defaults to "\\tmp" on the current windows drive.
Ie, removing/renaming the key HKLM\SOFTWARE\Cygnus\Cygwin\mounts v2\"/"
will cause these cygwin1.dll linked programs to run, but fail to
work correctly as file access to "/tmp/whatever" fails.

Other than forcing users to create a "X:\\tmp" directory (or doing this
during installation) or modifying the source code for these 3rd-party
packages, is there any way to get the dll to use windows's %TEMP%
or %TMPDIR% environment variables? The version we are distributing is
version 1.3.10 of the dll, but using the latest version didn't make
any difference.

Any info or pointers would be greatly appreciated.

Thanks,
John McPherson

--
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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: standalone cygwin programs that use "/tmp" don't work
  2002-08-12 23:25 standalone cygwin programs that use "/tmp" don't work John R. McPherson
@ 2002-08-13  4:36 ` Corinna Vinschen
       [not found]   ` <20020817035535.GA15227@redhat.com>
  2002-08-13  6:57 ` Warren Young
  1 sibling, 1 reply; 8+ messages in thread
From: Corinna Vinschen @ 2002-08-13  4:36 UTC (permalink / raw)
  To: John R. McPherson; +Cc: cygwin

On Tue, Aug 13, 2002 at 04:28:43PM +1200, John R. McPherson wrote:
> Our windows distribution includes these binaries as well as cygwin1.dll.

Do you distribute also the source code of the Cygwin version you're
using according to the Cygwin license?

> Other than forcing users to create a "X:\\tmp" directory (or doing this
> during installation) or modifying the source code for these 3rd-party
> packages, is there any way to get the dll to use windows's %TEMP%
> or %TMPDIR% environment variables?

No.  These functions are implemented according to POSIX standards.
If you need other paths you'll have to change the sources.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: standalone cygwin programs that use "/tmp" don't work
  2002-08-12 23:25 standalone cygwin programs that use "/tmp" don't work John R. McPherson
  2002-08-13  4:36 ` Corinna Vinschen
@ 2002-08-13  6:57 ` Warren Young
  1 sibling, 0 replies; 8+ messages in thread
From: Warren Young @ 2002-08-13  6:57 UTC (permalink / raw)
  To: Cygwin-L

(duplicate post -- I sent the previous one to cygapps-l by mistake)

John R. McPherson wrote:
 >
 > Other than forcing users to create a "X:\\tmp" directory (or doing this
 > during installation) or modifying the source code for these 3rd-party
 > packages, is there any way to get the dll to use windows's %TEMP%
 > or %TMPDIR% environment variables?

You need to look into the way Cygwin handles the mount table.  For your
purposes, it would probably be enough to simply set up a mount for /tmp
to point to the user's %TEMP% during your normal installation process.



--
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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: standalone cygwin programs that use "/tmp" don't work
       [not found]   ` <20020817035535.GA15227@redhat.com>
@ 2002-08-17  5:28     ` John R. McPherson
  2002-08-17 14:21       ` Christopher Faylor
  0 siblings, 1 reply; 8+ messages in thread
From: John R. McPherson @ 2002-08-17  5:28 UTC (permalink / raw)
  To: Christopher Faylor; +Cc: Corinna Vinschen, cygwin

On Fri, Aug 16, 2002 at 11:55:35PM -0400, Christopher Faylor wrote:
> On Tue, Aug 13, 2002 at 12:48:02PM +0200, Corinna Vinschen wrote:
> >On Tue, Aug 13, 2002 at 04:28:43PM +1200, John R. McPherson wrote:
> >> Our windows distribution includes these binaries as well as cygwin1.dll.
> >
> >Do you distribute also the source code of the Cygwin version you're
> >using according to the Cygwin license?
> 
> I haven't seen an answer to this question and it isn't clear from your
> web site where one would get the source files for the GPLed executables
> you have in your distribution.


I replied to this to Corinna, but as I got an error message from the
list server I had no idea who got it or not.
So I've forwarded the bounced message - see below.

> If you are distributing GPLed binaries like the cygwin DLL, tar, wget,
> etc.  you need to also make the source code available.  It doesn't
> matter that the source code is available elsewhere on the web.

We have the source code to wget, pdftohtml, etc available for download
as part of the "source code" download link that is on the website
I referenced. Some of these packages have been very slightly modified (mostly
Makefiles). As I said, our project is all GPL and GPL-compatible
code.

We use the cygwin dll as downloaded from a cygwin mirror. So you want
us to mirror the whole cygwin source code as well, in New Zealand,
where we have to pay data charges for international traffic in both
directions? The GPL says that if someone we give binaries
to asks us for the source code, we are obliged to do so. I don't
see how we're not complying...

John McPherson

----- forwarded message -----

Date: 13 Aug 2002 11:15:41 -0000
From: MAILER-DAEMON@sources.redhat.com
To: jrm21@cs.waikato.ac.nz
Subject: failure notice
Message-Id: <E17eZeI-0003KU-00@orc.cs.waikato.ac.nz>

Hi. This is the qmail-send program at sources.redhat.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<cygwin@cygwin.com>:
Mail rejected: List address must be in To: or Cc: headers.
Contact cygwin-owner@cygwin.com if you have questions about this. (#5.7.2)

--- Below this line is a copy of the message.

Date: Tue, 13 Aug 2002 23:15:33 +1200
From: "John R. McPherson" <jrm21@cs.waikato.ac.nz>
To: Corinna Vinschen <corinna-cygwin@cygwin.com>
Subject: Re: standalone cygwin programs that use "/tmp" don't work
Message-ID: <20020813231533.B19266@puriri.cs.waikato.ac.nz>
References: <3D588AFB.9D17EC0D@cs.waikato.ac.nz> <20020813124802.W17250@cygbert.vinschen.de>

On Tue, Aug 13, 2002 at 12:48:02PM +0200, Corinna Vinschen wrote:
> On Tue, Aug 13, 2002 at 04:28:43PM +1200, John R. McPherson wrote:
> > Our windows distribution includes these binaries as well as cygwin1.dll.
> 
> Do you distribute also the source code of the Cygwin version you're
> using according to the Cygwin license?

Our software is all GPL or compatible. We use an unmodified version
of cygwin, so the source code of the library we distribute is already
publicly available. We have sources for the 3rd-party packages mirrored
for download as well.

> > Other than forcing users to create a "X:\\tmp" directory (or doing this
> > during installation) or modifying the source code for these 3rd-party
> > packages, is there any way to get the dll to use windows's %TEMP%
> > or %TMPDIR% environment variables?
> 
> No.  These functions are implemented according to POSIX standards.
> If you need other paths you'll have to change the sources.

OK, thanks for that. Is there any other way to set the root directory
for use by cygwin1.dll (eg CYGWIN environment variable) other than
the windows registry entries used by a proper cygwin install?

John McPherson





--
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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: standalone cygwin programs that use "/tmp" don't work
  2002-08-17  5:28     ` John R. McPherson
@ 2002-08-17 14:21       ` Christopher Faylor
  2002-08-18 13:40         ` From the GPL FAQ (was "standalone cygwin programs that use "/tmp" don't work") Christopher Faylor
       [not found]         ` <20020824174911.GC26276@redhat.com>
  0 siblings, 2 replies; 8+ messages in thread
From: Christopher Faylor @ 2002-08-17 14:21 UTC (permalink / raw)
  To: John R. McPherson; +Cc: Corinna Vinschen, cygwin

On Sat, Aug 17, 2002 at 07:44:10PM +1200, John R. McPherson wrote:
>I replied to this to Corinna, but as I got an error message from the
>list server I had no idea who got it or not.  So I've forwarded the
>bounced message - see below.

Corinna's original message had set the Reply-To to the cygwin mailing
list.  My message didn't do that but you replied to the list anyway.
Hmm.

>> If you are distributing GPLed binaries like the cygwin DLL, tar, wget,
>> etc.  you need to also make the source code available.  It doesn't
>> matter that the source code is available elsewhere on the web.
>
>We have the source code to wget, pdftohtml, etc available for download
>as part of the "source code" download link that is on the website
>I referenced. Some of these packages have been very slightly modified (mostly
>Makefiles). As I said, our project is all GPL and GPL-compatible
>code.

Ok.  You're providing some sources but not all.  That's a little
mystifying to me.  I don't know why you chose to provide sources for
wget, pdftohtml, etc.  but not for the cygwin DLL, tar, gzip, bzip2, or
unzip.

>We use the cygwin dll as downloaded from a cygwin mirror. So you want
>us to mirror the whole cygwin source code as well, in New Zealand,
>where we have to pay data charges for international traffic in both
>directions? The GPL says that if someone we give binaries
>to asks us for the source code, we are obliged to do so. I don't
>see how we're not complying...

How you are not complying is that you are apparently not providing the
source code for the DLL and other random binaries.  I'm not sure how
this was unclear from my original message.  Are you saying that you have
the source code available for such things as the cygwin dll and tar and
that if someone asks you'll provide it?  If so, I think you probably
should make that clear on your web site.

I'm only asking that you make available the cygwin DLL sources and any
other GPLed sources that you are using.  The cygwin sources are 3878779
bytes.  The tar sources are 967054 bytes.  The other packages (with the
possible exception of perl) are not that large either.

Let me restate it:  You can't rely on the fact that the source code
is "freely available".  As I mentioned, that won't be the case for long
with cygwin 1.3.10.

My suggestion would be to just make the source code available and
include a line that says "Please don't use this.  It is just here for
GPL compliance." or something like that.

cgf

--
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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* From the GPL FAQ (was "standalone cygwin programs that use "/tmp" don't work")
  2002-08-17 14:21       ` Christopher Faylor
@ 2002-08-18 13:40         ` Christopher Faylor
       [not found]         ` <20020824174911.GC26276@redhat.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Christopher Faylor @ 2002-08-18 13:40 UTC (permalink / raw)
  To: cygwin; +Cc: John R. McPherson, Corinna Vinschen

On Sat, Aug 17, 2002 at 12:47:50PM -0400, Christopher Faylor wrote:
>Let me restate it: You can't rely on the fact that the source code is
>"freely available".  As I mentioned, that won't be the case for long
>with cygwin 1.3.10.

For everyone who is concerned by my insistence that people adhere to the
GPL by making sources available for download, I'd like to direct your
attention here:

http://www.gnu.org/licenses/gpl-faq.html#TOCSourceAndBinaryOnDifferentSites

RMS referred me to this site after I asked him for some kind of
definitive statement on the issue so that I don't have to keep fighting
the same battle over and over again.  Of course, I should have realized
that I was in no way unique and that there was already a FAQ for this.

I want to definitively state that I have no intention of providing a
backup system for people who want to point at sources.redhat.com (aka
cygwin.com) as a location to retrieve sources for the binaries that they
are making available.  If you are releasing binaries of any GPLed
software you *must* make the sources available via the same mechanism.
You cannot rely on me to keep the sources for your release binaries
around.

I'd suggest giving the whole FAQ a read, it clears up a lot of these
issues.

cgf

--
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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: standalone cygwin programs that use "/tmp" don't work
       [not found]         ` <20020824174911.GC26276@redhat.com>
@ 2002-08-24 18:05           ` John R. McPherson
  2002-08-24 18:29             ` Christopher Faylor
  0 siblings, 1 reply; 8+ messages in thread
From: John R. McPherson @ 2002-08-24 18:05 UTC (permalink / raw)
  To: cygwin, Corinna Vinschen

On Sat, Aug 24, 2002 at 01:49:11PM -0400, Christopher Faylor wrote:
> Any news here?
> 
> cgf
> 
> On Sat, Aug 17, 2002 at 12:47:50PM -0400, Christopher Faylor wrote:
> >On Sat, Aug 17, 2002 at 07:44:10PM +1200, John R. McPherson wrote:

> >>> If you are distributing GPLed binaries like the cygwin DLL, tar, wget,
> >>> etc.  you need to also make the source code available.  It doesn't
> >>> matter that the source code is available elsewhere on the web.


> >Let me restate it:  You can't rely on the fact that the source code
> >is "freely available".  As I mentioned, that won't be the case for long
> >with cygwin 1.3.10.
> >
> >My suggestion would be to just make the source code available and
> >include a line that says "Please don't use this.  It is just here for
> >GPL compliance." or something like that.

I've made our maintainer aware of the issue, and I think our plan is
to have a statement both on our website and within our source tarball
that if people want the source code to the cygwin binaries we provide
in our windows binary distribution (which we will explicitly mention
package names and versions) then we will provide them with the source
to those versions if they contact us. I'll make sure that this is
included when he releases the next version. I hope this is an
acceptable solution to our oversight.

John McPherson


--
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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: standalone cygwin programs that use "/tmp" don't work
  2002-08-24 18:05           ` standalone cygwin programs that use "/tmp" don't work John R. McPherson
@ 2002-08-24 18:29             ` Christopher Faylor
  0 siblings, 0 replies; 8+ messages in thread
From: Christopher Faylor @ 2002-08-24 18:29 UTC (permalink / raw)
  To: cygwin

On Sun, Aug 25, 2002 at 11:06:18AM +1200, John R. McPherson wrote:
>On Sat, Aug 24, 2002 at 01:49:11PM -0400, Christopher Faylor wrote:
>> Any news here?
>> 
>> cgf
>> 
>> On Sat, Aug 17, 2002 at 12:47:50PM -0400, Christopher Faylor wrote:
>> >On Sat, Aug 17, 2002 at 07:44:10PM +1200, John R. McPherson wrote:
>
>> >>> If you are distributing GPLed binaries like the cygwin DLL, tar, wget,
>> >>> etc.  you need to also make the source code available.  It doesn't
>> >>> matter that the source code is available elsewhere on the web.
>
>
>> >Let me restate it:  You can't rely on the fact that the source code
>> >is "freely available".  As I mentioned, that won't be the case for long
>> >with cygwin 1.3.10.
>> >
>> >My suggestion would be to just make the source code available and
>> >include a line that says "Please don't use this.  It is just here for
>> >GPL compliance." or something like that.
>
>I've made our maintainer aware of the issue, and I think our plan is
>to have a statement both on our website and within our source tarball
>that if people want the source code to the cygwin binaries we provide
>in our windows binary distribution (which we will explicitly mention
>package names and versions) then we will provide them with the source
>to those versions if they contact us. I'll make sure that this is
>included when he releases the next version. I hope this is an
>acceptable solution to our oversight.

It sounds like it is to me, yes.

Thanks very much for the update.

cgf

--
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/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-08-24 18:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-12 23:25 standalone cygwin programs that use "/tmp" don't work John R. McPherson
2002-08-13  4:36 ` Corinna Vinschen
     [not found]   ` <20020817035535.GA15227@redhat.com>
2002-08-17  5:28     ` John R. McPherson
2002-08-17 14:21       ` Christopher Faylor
2002-08-18 13:40         ` From the GPL FAQ (was "standalone cygwin programs that use "/tmp" don't work") Christopher Faylor
     [not found]         ` <20020824174911.GC26276@redhat.com>
2002-08-24 18:05           ` standalone cygwin programs that use "/tmp" don't work John R. McPherson
2002-08-24 18:29             ` Christopher Faylor
2002-08-13  6:57 ` Warren Young

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).