[PATCH] 0.9.8: Install bug on case-preserving filesystems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] 0.9.8: Install bug on case-preserving filesystems

Corinna Vinschen
Hi,

the first day of 0.9.8 in Cygwin resulted in the following bug report
on the Cygwin list:

> Have just done a fresh install of cygwin to compile a Linux app that uses
> DES.
>
> According to "man des",  I should still be able to include <openssl/des.h>,
> but that
> file doesn't seem to exist in this release.

The reporter was right and I tried to figure out what has gone wrong so
that the des (and, FWIW, the bf) header files were missing.

The cause of these files missing is a "cleanup" in the Makefiles of
crypto/des and crypto/bf.  Both directories have a file called "INSTALL"
in them.  The Makefile rule is:

  install:
        @do something in a subshell

The problem only happens on filesystems which are not case-sensitive but
only case-preserving, like filesystems on Windows or MacOS.

What happens is that make(1) tries to find if the rule is up to date.
While doing this, make calls stat("install"), which returns with
success on case-preserving filesystems!  As a result, the install rule
is "up to date" and the make action will never be called.

This did *not* happen in 0.9.7, which had the "install" rule created
so that the above install bug couldn't happen:

  install: installs

  installs:
  @do something in a subshell

This circumvents the above problem on case-preserving filesystems.

I would like to ask for reverting this change in the affected directories
crypto/des and crypto/bf.  The patch is below.  I'm going to release a new
Cygwin version of OpenSSL 0.9.8 today which has this fix applied and which
installs the des and bf header files correctly.


Thanks for considering,
Corinna


--- crypto/des/Makefile.save 2005-07-05 22:33:16.046875000 +0200
+++ crypto/des/Makefile 2005-07-07 10:24:53.312500000 +0200
@@ -88,7 +88,9 @@ links:
  @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
  @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 
-install:
+install: installs
+
+installs:
  @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
  @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
  do  \
--- crypto/bf/Makefile.save 2005-07-05 22:33:19.531250000 +0200
+++ crypto/bf/Makefile 2005-07-07 10:24:40.781250000 +0200
@@ -62,7 +62,9 @@ links:
  @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
  @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 
-install:
+install: installs
+
+installs:
  @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
  @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
  do  \



--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] 0.9.8: Install bug on case-preserving filesystems

Doug Kaufman
On Thu, 7 Jul 2005, Corinna Vinschen wrote:

> > According to "man des",  I should still be able to include <openssl/des.h>,
> > but that
> > file doesn't seem to exist in this release.
>
> The reporter was right and I tried to figure out what has gone wrong so
> that the des (and, FWIW, the bf) header files were missing.
>
> The cause of these files missing is a "cleanup" in the Makefiles of
> crypto/des and crypto/bf.  Both directories have a file called "INSTALL"
> in them.  The Makefile rule is:
>
>   install:
> @do something in a subshell
>
> The problem only happens on filesystems which are not case-sensitive but
> only case-preserving, like filesystems on Windows or MacOS.

I can confirm that the des.h and blowfish.h headers are not installed in
either the DJGPP build or in the MINGW build (via
Configure/-mno-cygwin).
                                    Doug
--
Doug Kaufman
Internet: [hidden email]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] 0.9.8: Install bug on case-preserving filesystems

Richard Levitte - VMS Whacker
Doug Kaufman writes:

>>   install:
>> @do something in a subshell
>>
>> The problem only happens on filesystems which are not case-sensitive but
>> only case-preserving, like filesystems on Windows or MacOS.
>
> I can confirm that the des.h and blowfish.h headers are not installed in
> either the DJGPP build or in the MINGW build (via
> Configure/-mno-cygwin).

I'll see what I can do with that, tomorrow evening.

Cheers,
Richard

 -----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

--
Richard Levitte                         [hidden email]
                                       http://richard.levitte.org/ 

"When I became a man I put away childish things, including
the fear of childishness and the desire to be very grown up."
                                               -- C.S. Lewis

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] 0.9.8: Install bug on case-preserving filesystems

Corinna Vinschen
On Jul  7 15:51, Richard Levitte wrote:

> Doug Kaufman writes:
>
> >>  install:
> >> @do something in a subshell
> >>
> >>The problem only happens on filesystems which are not case-sensitive but
> >>only case-preserving, like filesystems on Windows or MacOS.
> >
> >I can confirm that the des.h and blowfish.h headers are not installed in
> >either the DJGPP build or in the MINGW build (via
> >Configure/-mno-cygwin).
>
> I'll see what I can do with that, tomorrow evening.

My patch should be everything needed.


Corinna

--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] 0.9.8: Install bug on case-preserving filesystems

Andy Polyakov
>>>> install:
>>>> @do something in a subshell
>>>>
>>>>The problem only happens on filesystems which are not case-sensitive but
>>>>only case-preserving, like filesystems on Windows or MacOS.
>>>
>
> My patch should be everything needed.

Aha! That's why it was there... I'm the one who removed it... Speaking
of "everything." I'd throw in a small comment mentioning why there is an
extra rule, which appears redundant, so that it's not tempting to remove
it again... A.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] 0.9.8: Install bug on case-preserving filesystems

Richard Levitte - VMS Whacker
In reply to this post by Corinna Vinschen
In message <[hidden email]> on Thu, 7 Jul 2005 11:01:11 +0200, Corinna Vinschen <[hidden email]> said:

vinschen> The problem only happens on filesystems which are not
vinschen> case-sensitive but only case-preserving, like filesystems on
vinschen> Windows or MacOS.
vinschen>
vinschen> What happens is that make(1) tries to find if the rule is up
vinschen> to date.  While doing this, make calls stat("install"),
vinschen> which returns with success on case-preserving filesystems!

I've applied a fix which looks a little different from yours:

Index: crypto/des/Makefile
===================================================================
RCS file: /e/openssl/cvs/openssl/crypto/des/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- crypto/des/Makefile 16 May 2005 16:55:22 -0000 1.5
+++ crypto/des/Makefile 8 Jul 2005 10:10:55 -0000
@@ -88,7 +88,10 @@
  @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
  @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
 
-install:
+# We need to use force because 'install' matches 'INSTALL' on case
+# insensitive systems
+FRC.install:
+install: FRC.install
  @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
  @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
  do  \


(did the same thing in the crypto/bf directory)

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

--
Richard Levitte                         [hidden email]
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] 0.9.8: Install bug on case-preserving filesystems

Corinna Vinschen
On Jul  8 12:14, Richard Levitte - VMS Whacker wrote:

> In message <[hidden email]> on Thu, 7 Jul 2005 11:01:11 +0200, Corinna Vinschen <[hidden email]> said:
>
> vinschen> The problem only happens on filesystems which are not
> vinschen> case-sensitive but only case-preserving, like filesystems on
> vinschen> Windows or MacOS.
> vinschen>
> vinschen> What happens is that make(1) tries to find if the rule is up
> vinschen> to date.  While doing this, make calls stat("install"),
> vinschen> which returns with success on case-preserving filesystems!
>
> I've applied a fix which looks a little different from yours:
>
> Index: crypto/des/Makefile
> ===================================================================
> RCS file: /e/openssl/cvs/openssl/crypto/des/Makefile,v
> retrieving revision 1.5
> diff -u -r1.5 Makefile
> --- crypto/des/Makefile 16 May 2005 16:55:22 -0000 1.5
> +++ crypto/des/Makefile 8 Jul 2005 10:10:55 -0000
> @@ -88,7 +88,10 @@
>   @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
>   @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
>  
> -install:
> +# We need to use force because 'install' matches 'INSTALL' on case
> +# insensitive systems
> +FRC.install:
> +install: FRC.install
>   @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
>   @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
>   do  \
>
>
> (did the same thing in the crypto/bf directory)


Looks good.


Thanks,
Corinna

--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]