Subject: [BugDB] mod_ssl port to POSIX 1003.1-2001 hosts (PR#665)

From: [email-masked]
Date: Sat, 23 Feb 2002 09:14:13 +0100 (MET)

Full_Name: Paul Eggert
Version: 2.8.6
OS: 
Submission from: (NULL) (209.55.111.154)

The new POSIX standard is now official (IEEE Std 1003.1-2001), and it
has removed support for some obsolete utility options that modssl
uses.  Basically, the new POSIX has removed digit-string options
(e.g., "tail -1") and options beginning with "+" (e.g., "sort +1").
I'm using an experimental environment that insists on the new
standard, so I tend to run into these problems before other people do.

Here is a proposed patch to modssl to port it to POSIX 1003.1-2001
hosts.

2002-02-23  Paul Eggert  <[email-masked]>

	* pkg.sslmod/ssl_engine_dh.c: expand -8 -> expand

	* pkg.eapi/eapi.patch, pkg.sslmod/libssl.module: tail -1 -> sed -n '$p'

===================================================================
RCS file: pkg.eapi/eapi.patch,v
retrieving revision 2.8.6.0
retrieving revision 2.8.6.1
diff -pu -r2.8.6.0 -r2.8.6.1
--- pkg.eapi/eapi.patch	2002/02/01 14:09:49	2.8.6.0
+++ pkg.eapi/eapi.patch	2002/02/23 08:07:08	2.8.6.1
@@ -79,7 +79,7 @@ Index: src/Configure
 +    esac
 +    #   MM Shared Memory Library support for EAPI
 +    if [ "x$EAPI_MM" = "x" ]; then
-+        EAPI_MM=`egrep '^EAPI_MM=' $file | tail -1 | awk -F= '{print $2}'`
++        EAPI_MM=`egrep '^EAPI_MM=' $file | sed -n '$p' | awk -F= '{print
$2}'`
 +    fi
 +    if [ "x$EAPI_MM" != "x" ]; then
 +        case $EAPI_MM in
===================================================================
RCS file: pkg.sslmod/libssl.module,v
retrieving revision 2.8.6.0
retrieving revision 2.8.6.1
diff -pu -r2.8.6.0 -r2.8.6.1
--- pkg.sslmod/libssl.module	2001/05/20 09:13:47	2.8.6.0
+++ pkg.sslmod/libssl.module	2002/02/23 08:07:08	2.8.6.1
@@ -282,7 +282,7 @@ ConfigStart
     #   determine SSL_BASE
     #
     if [ ".$SSL_BASE" = . ]; then
-        SSL_BASE=`egrep '^SSL_BASE=' $file | tail -1 | awk -F= '{print $2}'`
+        SSL_BASE=`egrep '^SSL_BASE=' $file | sed -n '$p' | awk -F= '{print
$2}'`
         if [ ".$SSL_BASE" = . ]; then
             if [ -d /usr/local/ssl ]; then
                 SSL_BASE="/usr/local/ssl"
===================================================================
RCS file: pkg.sslmod/ssl_engine_dh.c,v
retrieving revision 2.8.6.0
retrieving revision 2.8.6.1
diff -pu -r2.8.6.0 -r2.8.6.1
--- pkg.sslmod/ssl_engine_dh.c	2001/08/07 18:20:57	2.8.6.0
+++ pkg.sslmod/ssl_engine_dh.c	2002/02/23 08:07:08	2.8.6.1
@@ -227,10 +227,10 @@ $dhinfo = "\n\/\*\n$dhinfo\*\/\n\n";
 
 #   generate C source from DH params
 my $dhsource = '';
-open(FP, "openssl dh -noout -C -in dh512.pem | indent | expand -8 |") || die;
+open(FP, "openssl dh -noout -C -in dh512.pem | indent | expand |") || die;
 $dhsource .= $_ while (<FP>);
 close(FP);
-open(FP, "openssl dh -noout -C -in dh1024.pem | indent | expand -8 |") || die;
+open(FP, "openssl dh -noout -C -in dh1024.pem | indent | expand |") || die;
 $dhsource .= $_ while (<FP>);
 close(FP);
 $dhsource =~ s|(DH\s+\*get_dh)|static $1|sg;

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]