NetBSD Problem Report #48619

From makoto@ki.nu  Wed Feb 26 06:45:54 2014
Return-Path: <makoto@ki.nu>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 4B650A583C
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 26 Feb 2014 06:45:54 +0000 (UTC)
Message-Id: <201402260645.s1Q6joOH006505@ki.nu>
Date: Wed, 26 Feb 2014 15:45:50 +0900 (JST)
From: makoto@ki.nu
Reply-To: makoto@ki.nu
To: gnats-bugs@gnats.NetBSD.org
Subject: security/openssl for Cygwin64
X-Send-Pr-Version: 3.95

>Number:         48619
>Category:       pkg
>Synopsis:       security/openssl for Cygwin64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          feedback
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 26 06:50:00 +0000 2014
>Closed-Date:    
>Last-Modified:  Fri Dec 17 16:33:35 +0000 2021
>Originator:     Makoto Fujiwara
>Release:        CYGWIN_NT-6.1 1.7.28(0.271/5/3)
>Organization:
KINU Corporation
>Environment:
	CYGWIN_NT-6.1 1.7.28(0.271/5/3) 2014-02-09 21:06 x86_64 Cygwin
	gcc (GCC) 4.8.2
>Description:
	security/openssl for Cygwin64
>How-To-Repeat:
	1. Have Windows 7 (64bit) SP1
	2. Install Part of Cygwin
	3. bootstrap-pkgsrc
	4. cd pkgsrc/security/openssl; bmake package
>Fix:
	Probably this is not really fix. Some trial to build package, thank you.
Index: security/openssl/Makefile
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/security/openssl/Makefile,v
retrieving revision 1.183
diff -u -r1.183 Makefile
--- security/openssl/Makefile	10 Jan 2014 14:32:42 -0000	1.183
+++ security/openssl/Makefile	26 Feb 2014 01:41:48 -0000
@@ -113,6 +113,11 @@
 .  endif
 .elif ${OPSYS} == "Cygwin"
 USE_PLIST_SHLIB=	no
+	
+. if !empty(MACHINE:Mx86_64)
+CONFIGURE_ARGS+=	-march=x86-64 
+. endif
+
 .elif ${OPSYS} == "Linux"
 .  if ${MACHINE_ARCH} == "powerpc64"
 CONFIGURE_SCRIPT=	./Configure
Index: security/openssl/distinfo
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/security/openssl/distinfo,v
retrieving revision 1.102
diff -u -r1.102 distinfo
--- security/openssl/distinfo	14 Jan 2014 21:51:00 -0000	1.102
+++ security/openssl/distinfo	26 Feb 2014 01:41:48 -0000
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.102 2014/01/14 21:51:00 bsiegert Exp $
+$NetBSD$

 SHA1 (openssl-1.0.1f.tar.gz) = 9ef09e97dfc9f14ac2c042f3b7e301098794fc0f
 RMD160 (openssl-1.0.1f.tar.gz) = db8c07f8753fab2b76118d4c18175290356ed144
 Size (openssl-1.0.1f.tar.gz) = 4509212 bytes
+SHA1 (patch-Config) = a2affc7fed28c6d8cb154c33a4d71d753f7c7f2c
 SHA1 (patch-aa) = 4e759762074b73f7f0f4c24d5b56d1156a4bfe6e
-SHA1 (patch-ac) = ecdafa378e73bd2d6789c985ea28ef4ab2126aa6
+SHA1 (patch-ac) = 970ec63c0c1d6cb1e53fe50ba9fbacd9717d8bd6
 SHA1 (patch-ad) = bb86ac463fc4ab8b485df5f1a4fb9c13c1fc41c3
 SHA1 (patch-ae) = 7a58f1765a3761321dcc8dafc5fe2e33207be480
 SHA1 (patch-af) = f305134acfaa17e6a039630d916fbda4900adc85
@@ -30,4 +31,5 @@
 SHA1 (patch-doc_ssl_SSL__set__session.pod) = e4d8442f4fc827520ca20f108050fcd6314dd41d
 SHA1 (patch-doc_ssl_SSL__shutdown.pod) = 21682f3385a66ba8f0ebd11bb9bb3c6198352783
 SHA1 (patch-doc_ssl_SSL__write.pod) = 67efd6d0de0a0db34c18c62e4a939c0ea49442ca
-SHA1 (patch-engines_ccgost_Makefile) = 08999f0f40969883482ad9ffc1aa9959ed7d402c
+SHA1 (patch-engines_Makefile) = 38ed3d803666b08554d7672d7ec215c84a6805e0
+SHA1 (patch-engines_ccgost_Makefile) = 127292b06c059d2df913a804a47e39006941c02a
Index: security/openssl/patches/patch-Config
===================================================================
RCS file: security/openssl/patches/patch-Config
diff -N security/openssl/patches/patch-Config
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ security/openssl/patches/patch-Config	26 Feb 2014 01:41:48 -0000
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Add Cygwin64
+
+--- Config.orig	2014-02-25 17:22:39.704900000 +0900
++++ Config	2014-02-25 17:23:14.014900000 +0900
+@@ -851,6 +851,7 @@
+   # *-dgux) OUT="dgux" ;;
+   mips-sony-newsos4) OUT="newsos4-gcc" ;;
+   *-*-cygwin_pre1.3) OUT="Cygwin-pre1.3" ;;
++  x86_64-*-cygwin) OUT="Cygwin64" ;;
+   *-*-cygwin) OUT="Cygwin" ;;
+   t3e-cray-unicosmk) OUT="cray-t3e" ;;
+   j90-cray-unicos) OUT="cray-j90" ;;
Index: security/openssl/patches/patch-ac
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/security/openssl/patches/patch-ac,v
retrieving revision 1.43
diff -u -r1.43 patch-ac
--- security/openssl/patches/patch-ac	21 Dec 2013 12:21:47 -0000	1.43
+++ security/openssl/patches/patch-ac	26 Feb 2014 01:41:48 -0000
@@ -3,9 +3,10 @@
 * Avoid -fast on Solaris, creates non-portable packages which depend on
   host-specific CPU features.
 * Add GNU/kFreeBSD support.
+* Add Cygwin64 support

---- Configure.orig	2013-02-11 15:26:04.000000000 +0000
-+++ Configure
+--- Configure.orig	2014-01-06 22:47:42.000000000 +0900
++++ Configure	2014-02-25 17:48:37.360400000 +0900
 @@ -225,8 +225,8 @@ my %table=(
  "solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64",

@@ -54,7 +55,15 @@

  "bsdi-elf-gcc",     "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",

-@@ -865,13 +888,13 @@ PROCESS_ARGS:
+@@ -549,6 +572,7 @@ my %table=(
+ # Cygwin
+ "Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
+ "Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:coff:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
++"Cygwin64", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -Wall:::CYGWIN64::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:WIN64:cygwin-shared:-D_WINDLL::.a",
+ "debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
+ 
+ # NetWare from David Ward (dsward@novell.com)
+@@ -865,13 +889,13 @@ PROCESS_ARGS:
  			# The check for the option is there so scripts aren't
  			# broken
  			}
@@ -70,7 +79,7 @@
  				{
  				$_ =~ s/%([0-9a-f]{1,2})/chr(hex($1))/gei;
  				$flags.=$_." ";
-@@ -1674,7 +1697,7 @@ while (<IN>)
+@@ -1674,7 +1698,7 @@ while (<IN>)
  	elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
  		{
  		my $sotmp = $1;
Index: security/openssl/patches/patch-engines_Makefile
===================================================================
RCS file: security/openssl/patches/patch-engines_Makefile
diff -N security/openssl/patches/patch-engines_Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ security/openssl/patches/patch-engines_Makefile	26 Feb 2014 01:41:48 -0000
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Cyginw64 support
+
+--- engines/Makefile.save	2014-01-06 23:36:06.000000000 +0900
++++ engines/Makefile	2014-02-25 20:36:46.598300000 +0900
+@@ -111,12 +111,13 @@ install:
+ 		for l in $(LIBNAMES); do \
+ 			( echo installing $$l; \
+ 			  pfx=lib; \
+-			  if [ "$(PLATFORM)" != "Cygwin" ]; then \
++			  if [ "$(PLATFORM)" != "Cygwin" && "$(PLATFORM)" != "Cygwin64" ]; then \
+ 				case "$(CFLAGS)" in \
+ 				*DSO_BEOS*)	sfx=".so";;	\
+ 				*DSO_DLFCN*)	sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;;	\
+ 				*DSO_DL*)	sfx=".sl";;	\
+ 				*DSO_WIN32*)	sfx="eay32.dll"; pfx=;;	\
++				*DSO_WIN64*)	sfx=".dll"; pfx=;;	\
+ 				*)		sfx=".bad";;	\
+ 				esac; \
+ 				cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
Index: security/openssl/patches/patch-engines_ccgost_Makefile
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/security/openssl/patches/patch-engines_ccgost_Makefile,v
retrieving revision 1.1
diff -u -r1.1 patch-engines_ccgost_Makefile
--- security/openssl/patches/patch-engines_ccgost_Makefile	6 Feb 2013 21:40:34 -0000	1.1
+++ security/openssl/patches/patch-engines_ccgost_Makefile	26 Feb 2014 01:41:48 -0000
@@ -1,9 +1,10 @@
 $NetBSD: patch-engines_ccgost_Makefile,v 1.1 2013/02/06 21:40:34 jperkin Exp $

 * Make sure rpath is set properly on the libgost.so engine lib.
+* Cygwin64 support 

---- engines/ccgost/Makefile.orig	2012-04-26 10:42:20.000000000 +0000
-+++ engines/ccgost/Makefile	2013-02-04 13:27:37.220193130 +0000
+--- engines/ccgost/Makefile.orig	2014-01-06 23:36:06.000000000 +0900
++++ engines/ccgost/Makefile	2014-02-25 21:02:25.525300000 +0900
 @@ -32,7 +32,7 @@ lib: $(LIBOBJ)
  		$(MAKE) -f $(TOP)/Makefile.shared -e \
  			LIBNAME=$(LIBNAME) \
@@ -13,3 +14,18 @@
  			link_o.$(SHLIB_TARGET); \
  	else \
  		$(AR) $(LIB) $(LIBOBJ); \
+@@ -45,12 +45,13 @@ install:
+ 		set -e; \
+ 		echo installing $(LIBNAME); \
+ 		pfx=lib; \
+-		if [ "$(PLATFORM)" != "Cygwin" ]; then \
++		if [ "$(PLATFORM)" != "Cygwin" && "$(PLATFORM)" != "Cygwin64" ]; then \
+ 			case "$(CFLAGS)" in \
+ 			*DSO_BEOS*) sfx=".so";; \
+ 			*DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
+ 			*DSO_DL*) sfx=".sl";; \
+ 			*DSO_WIN32*) sfx="eay32.dll"; pfx=;; \
++			*DSO_WIN64*) sfx=".dll"; pfx=;; \
+ 			*) sfx=".bad";; \
+ 			esac; \
+ 			cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \



>Release-Note:

>Audit-Trail:
From: "OBATA Akio" <obata@lins.jp>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48619: security/openssl for Cygwin64
Date: Tue, 04 Mar 2014 17:01:42 +0900

 It is better to use Cygwin's openssl 1.0.1-cygwin64.patch
 instead of maintaining local patches.

 -- 
 OBATA Akio / obata@lins.jp

State-Changed-From-To: open->feedback
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Fri, 17 Dec 2021 16:33:35 +0000
State-Changed-Why:
Makoto-san, are you still interested in this ?


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: gnats-precook-prs,v 1.4 2018/12/21 14:20:20 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.