SF.net SVN: gar:[22969] csw/mgar/pkg/openssl1/trunk/files

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Sat Feb 8 00:02:35 CET 2014


Revision: 22969
          http://sourceforge.net/p/gar/code/22969
Author:   chninkel
Date:     2014-02-07 23:02:30 +0000 (Fri, 07 Feb 2014)
Log Message:
-----------
openssl1/trunk: strip down the wanboot patch to avoid compilation issue as we don't care about wanboot itself

Modified Paths:
--------------
    csw/mgar/pkg/openssl1/trunk/files/openssl-1.0.1f-wanboot.patch
    csw/mgar/pkg/openssl1/trunk/files/update-wanboot-patch.sh

Modified: csw/mgar/pkg/openssl1/trunk/files/openssl-1.0.1f-wanboot.patch
===================================================================
--- csw/mgar/pkg/openssl1/trunk/files/openssl-1.0.1f-wanboot.patch	2014-02-07 20:38:11 UTC (rev 22968)
+++ csw/mgar/pkg/openssl1/trunk/files/openssl-1.0.1f-wanboot.patch	2014-02-07 23:02:30 UTC (rev 22969)
@@ -1,35 +1,3 @@
---- openssl-1.0.0g/Makefile.org	2010-01-27 08:06:58.000000000 -0800
-+++ openssl-1.0.0g-1/Makefile.org	2012-03-26 03:04:08.440194448 -0700
-@@ -138,7 +138,13 @@
-
- BASEADDR=
-
-+# For wanboot, we only need crypto and ssl.
-+# 'apps' are not patched to work in stand-alone environment anyway.
-+ifeq ($(PLATFORM), solaris64-sparcv9-cc-sunw-wanboot)
-+DIRS=   crypto ssl
-+else
- DIRS=   crypto ssl engines apps test tools
-+endif
- ENGDIRS= ccgost
- SHLIBDIRS= crypto ssl
-
---- openssl-1.0.0g/Makefile	2012-01-18 05:42:28.000000000 -0800
-+++ openssl-1.0.0g-1/Makefile	2012-03-26 03:03:59.170540344 -0700
-@@ -137,7 +137,13 @@
-
- BASEADDR=0xFB00000
-
-+# For wanboot, we only need crypto and ssl.
-+# 'apps' are not patched to work in stand-alone environment anyway.
-+ifeq ($(PLATFORM), solaris64-sparcv9-cc-sunw-wanboot)
-+DIRS=   crypto ssl
-+else
- DIRS=   crypto ssl engines apps test tools
-+endif
- ENGDIRS= ccgost
- SHLIBDIRS= crypto ssl
-
 --- openssl-1.0.0e/crypto/cryptlib.c	2011-06-22 08:39:00.000000000 -0700
 +++ openssl-1.0.0e_patched/crypto/cryptlib.c	2011-12-12 06:17:45.422476900 -0800
 @@ -900,6 +900,10 @@
@@ -337,20 +305,6 @@
 +	nop
 +	nop
 +#endif
---- openssl-1.0.1c/crypto/Makefile      Thu Aug  2 12:56:38 2012
-+++ openssl-1.0.1c/crypto/Makefile.new  Thu Aug  2 12:59:43 2012
-@@ -35,9 +35,9 @@
- LIB= $(TOP)/libcrypto.a
- SHARED_LIB= libcrypto$(SHLIB_EXT)
- LIBSRC=	cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
--	ebcdic.c uid.c o_time.c o_str.c o_dir.c o_fips.c o_init.c fips_ers.c
-+	ebcdic.c uid.c o_time.c o_str.c o_dir.c o_fips.c o_init.c fips_ers.c wanboot-stubs.c
- LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o ebcdic.o \
--	uid.o o_time.o o_str.o o_dir.o o_fips.o o_init.o fips_ers.o $(CPUID_OBJ)
-+	uid.o o_time.o o_str.o o_dir.o o_fips.o o_init.o fips_ers.o wanboot-stubs.o $(CPUID_OBJ)
-
- SRC= $(LIBSRC)
-
 --- openssl-1.0.1f/ssl/s3_clnt.c    Thu Jan 30 02:53:33 2014
 +++ openssl-1.0.1f/ssl/s3_clnt.c.new   Thu Jan 30 02:57:51 2014
 @@ -681,8 +681,13 @@
@@ -367,131 +321,3 @@
  
  		/* Do the message type and length last */
  		d=p= &(buf[4]);
-Index: crypto//wanboot-stubs.c
-===================================================================
-diff -uNr openssl-1.0.1f/engines/wanboot-stubs.c openssl-1.0.1f/engines/wanboot-stubs.c
---- openssl-1.0.1f/engines/wanboot-stubs.c 1970-01-01 01:00:00.000000000 +0100
-+++ openssl-1.0.1f/engines/wanboot-stubs.c 2014-02-07 21:31:24.%N +0100
-@@ -0,0 +1,122 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+/*
-+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-+ */
-+
-+/* Content of this file is only needed for wanboot. */
-+#ifdef	_BOOT
-+
-+#include <sys/types.h>
-+#include <dirent.h>
-+#include <errno.h>
-+#include <stddef.h>
-+
-+/*
-+ * In OpenSSL 0.9.7 the EVP_read_pw_string now calls into the new "ui"
-+ * routines of 0.9.7, which is not compiled in the standalone, so it is
-+ * stubbed out here to avoid having to add a bunch of #ifndef's elsewhere.
-+ */
-+/* ARGSUSED */
-+int
-+EVP_read_pw_string_min(char *buf, int min, int len, const char *prompt, int
-+    verify)
-+{
-+	return (-1); /* failure */
-+}
-+
-+/*
-+ * In standalone issetugid() is always false.
-+ */
-+int
-+OPENSSL_issetugid(void)
-+{
-+	return (1);
-+}
-+
-+/*
-+ * Directory routines -- currently, the only consumer of these interfaces
-+ * is $SRC/common/openssl/ssl/ssl_cert.c, and it has fallback code in the
-+ * case of failure, so we just fail opendir() and stub out the rest.  At
-+ * some point, we may need to provide a real implementation.
-+ */
-+/* ARGSUSED */
-+DIR *
-+opendir(const char *dirname)
-+{
-+	errno = EACCES;
-+	return (NULL);
-+}
-+
-+/* ARGSUSED */
-+struct dirent *
-+readdir(DIR *dirp)
-+{
-+	return (NULL);
-+}
-+
-+/* ARGSUSED */
-+int
-+closedir(DIR *dirp)
-+{
-+	return (0);
-+}
-+
-+/*
-+ * Atoi is used on multiple places in libcrypto.
-+ * This implementation is taken from stand-alone libsock library:
-+ * usr/src/stand/lib/sock/sock_test.c
-+ * Alternative solution: just extern it here, wanboot has -lsock anyway.
-+ */
-+#ifndef	isdigit
-+#define	isdigit(c) ((c) >= '0' && (c) <= '9')
-+#endif
-+
-+#ifndef	isspace
-+#define	isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || \
-+		    (c) == '\r' || (c) == '\f' || (c) == '\013')
-+#endif
-+int
-+atoi(const char *p)
-+{
-+	int n;
-+	int c = *p++, neg = 0;
-+
-+	while (isspace(c)) {
-+		c = *p++;
-+	}
-+	if (!isdigit(c)) {
-+		switch (c) {
-+		case '-':
-+			neg++;
-+			/* FALLTHROUGH */
-+		case '+':
-+			c = *p++;
-+		}
-+	}
-+	for (n = 0; isdigit(c); c = *p++) {
-+		n *= 10; /* two steps to avoid unnecessary overflow */
-+		n += '0' - c; /* accum neg to avoid surprises at MAX */
-+	}
-+	return (neg ? n : -n);
-+}
-+
-+#endif	/* _BOOT */

Modified: csw/mgar/pkg/openssl1/trunk/files/update-wanboot-patch.sh
===================================================================
--- csw/mgar/pkg/openssl1/trunk/files/update-wanboot-patch.sh	2014-02-07 20:38:11 UTC (rev 22968)
+++ csw/mgar/pkg/openssl1/trunk/files/update-wanboot-patch.sh	2014-02-07 23:02:30 UTC (rev 22969)
@@ -4,7 +4,7 @@
 #                        hg.openindiana.org repository 
 #           
 
-WANBOOT_FILES="wanboot-stubs.c"
+WANBOOT_FILES=""
 SOURCE_URL="http://buildfarm.opencsw.org/source/raw/solaris-userland/components/openssl/openssl-1.0.1/"
 WGET_OPTIONS="--quiet"
 
@@ -21,9 +21,11 @@
 echo "Updating wanboot engine patch from ${SOURCE_URL}..."
 (
 	# ar in in /usr/ccs/bin under Solaris 9 and 10 so we change the path
+	# we also remove the makefile part as we will not really compile wanboot
 	wget $WGET_OPTIONS --output-document=- ${SOURCE_URL}/patches/30_wanboot.patch | \
 
-		gsed -e 's/\/usr\/bin\/ar/\/usr\/ccs\/bin\/ar/g' 
+		gsed -e 's/\/usr\/bin\/ar/\/usr\/ccs\/bin\/ar/g'  | \
+		perl -ne 'if (/^--- .*Makefile/) { $makefile=1 } else { $makefile=0 if /^---/; }; print $_ if not $makefile'
 
 	# in the repository, the new files are not part of the patch, but we merge them
 	# in a single patch

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list