forked from msys2/MSYS2-packages
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only the ca-dir patch applied cleanly. The MSYS2 one had to be re-done. The others seem not to be necessary. To indicate that this package has not yet been released (and to let `please.sh upgrade openssl` commit a change to `PKGBUILD`), let's force the pkgrel to 0 for starters. Signed-off-by: Johannes Schindelin <[email protected]>
- Loading branch information
Showing
9 changed files
with
456 additions
and
675 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
openssl/0001-Use-usr-ssl-as-ca-dir-instead-of-.-demoCA.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
From a6c3a5cb68fb76bddc67fb7bd3164897d7877d05 Mon Sep 17 00:00:00 2001 | ||
From: Johannes Schindelin <[email protected]> | ||
Date: Wed, 21 Nov 2018 13:55:30 +0100 | ||
Subject: [PATCH 1/3] Use /usr/ssl/ as ca-dir (instead of ./demoCA) | ||
|
||
--- | ||
apps/CA.pl.in | 2 +- | ||
apps/openssl.cnf | 2 +- | ||
test/CAss.cnf | 2 +- | ||
3 files changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/apps/CA.pl.in b/apps/CA.pl.in | ||
index db3cc38..fc85f74 100644 | ||
--- a/apps/CA.pl.in | ||
+++ b/apps/CA.pl.in | ||
@@ -33,7 +33,7 @@ my $X509 = "$openssl x509"; | ||
my $PKCS12 = "$openssl pkcs12"; | ||
|
||
# default openssl.cnf file has setup as per the following | ||
-my $CATOP = "./demoCA"; | ||
+my $CATOP = "/usr/ssl"; | ||
my $CAKEY = "cakey.pem"; | ||
my $CAREQ = "careq.pem"; | ||
my $CACERT = "cacert.pem"; | ||
diff --git a/apps/openssl.cnf b/apps/openssl.cnf | ||
index 6df2878..ca59ecd 100644 | ||
--- a/apps/openssl.cnf | ||
+++ b/apps/openssl.cnf | ||
@@ -42,7 +42,7 @@ default_ca = CA_default # The default ca section | ||
#################################################################### | ||
[ CA_default ] | ||
|
||
-dir = ./demoCA # Where everything is kept | ||
+dir = /usr/ssl # Where everything is kept | ||
certs = $dir/certs # Where the issued certs are kept | ||
crl_dir = $dir/crl # Where the issued crl are kept | ||
database = $dir/index.txt # database index file. | ||
diff --git a/test/CAss.cnf b/test/CAss.cnf | ||
index b20a242..edf0d20 100644 | ||
--- a/test/CAss.cnf | ||
+++ b/test/CAss.cnf | ||
@@ -31,7 +31,7 @@ default_ca = CA_default # The default ca section | ||
#################################################################### | ||
[ CA_default ] | ||
|
||
-dir = ./demoCA # Where everything is kept | ||
+dir = /usr/ssl # Where everything is kept | ||
certs = $dir/certs # Where the issued certs are kept | ||
crl_dir = $dir/crl # Where the issued crl are kept | ||
database = $dir/index.txt # database index file. | ||
-- | ||
2.19.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,249 @@ | ||
From ccf4a669f8c23296e3f89d1da5109d9a63ad63ea Mon Sep 17 00:00:00 2001 | ||
From: Johannes Schindelin <[email protected]> | ||
Date: Wed, 21 Nov 2018 13:55:56 +0100 | ||
Subject: [PATCH 2/3] Support MSYS2 | ||
|
||
This is an almost mechanical "copy/edit Cygwin support" patch. | ||
--- | ||
Configurations/10-main.conf | 51 +++++++++++++++++++++++++++++++++++ | ||
Configurations/shared-info.pl | 4 +++ | ||
Configure | 4 +-- | ||
apps/build.info | 2 +- | ||
build.info | 2 +- | ||
config | 5 ++++ | ||
crypto/build.info | 2 +- | ||
crypto/dllmain.c | 4 +-- | ||
crypto/dso/dso_dlfcn.c | 2 +- | ||
include/openssl/e_os2.h | 2 +- | ||
tools/c_rehash.in | 1 + | ||
util/process_docs.pl | 1 + | ||
12 files changed, 71 insertions(+), 9 deletions(-) | ||
|
||
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf | ||
index 5cf345d..a17caea 100644 | ||
--- a/Configurations/10-main.conf | ||
+++ b/Configurations/10-main.conf | ||
@@ -1505,6 +1505,57 @@ my %targets = ( | ||
inherit_from => [ "Cygwin-x86" ] | ||
}, | ||
|
||
+#### MSYS | ||
+ "Msys-x86" => { | ||
+ inherit_from => [ "BASE_unix", asm("x86_asm") ], | ||
+ CC => "gcc", | ||
+ CFLAGS => picker(default => "-Wall", | ||
+ debug => "-g -O0", | ||
+ release => "-O3 -fomit-frame-pointer"), | ||
+ lib_cppflags => "-DTERMIOS -DL_ENDIAN", | ||
+ sys_id => "CYGWIN", | ||
+ bn_ops => "BN_LLONG", | ||
+ thread_scheme => "pthread", | ||
+ perlasm_scheme => "coff", | ||
+ dso_scheme => "dlfcn", | ||
+ shared_target => "msys-shared", | ||
+ shared_cppflags => "-D_WINDLL", | ||
+ shared_extension => ".dll", | ||
+ }, | ||
+ "Msys-x86_64" => { | ||
+ inherit_from => [ "BASE_unix", asm("x86_64_asm") ], | ||
+ CC => "gcc", | ||
+ CFLAGS => picker(default => "-Wall", | ||
+ debug => "-g -O0", | ||
+ release => "-O3"), | ||
+ lib_cppflags => "-DTERMIOS -DL_ENDIAN", | ||
+ sys_id => "CYGWIN", | ||
+ bn_ops => "SIXTY_FOUR_BIT_LONG", | ||
+ thread_scheme => "pthread", | ||
+ perlasm_scheme => "mingw64", | ||
+ dso_scheme => "dlfcn", | ||
+ shared_target => "msys-shared", | ||
+ shared_cppflags => "-D_WINDLL", | ||
+ shared_extension => ".dll", | ||
+ }, | ||
+ # Backward compatibility for those using this target | ||
+ "Msys" => { | ||
+ inherit_from => [ "Msys-x86" ] | ||
+ }, | ||
+ # In case someone constructs the Msys target name themself | ||
+ "Msys-i386" => { | ||
+ inherit_from => [ "Msys-x86" ] | ||
+ }, | ||
+ "Msys-i486" => { | ||
+ inherit_from => [ "Msys-x86" ] | ||
+ }, | ||
+ "Msys-i586" => { | ||
+ inherit_from => [ "Msys-x86" ] | ||
+ }, | ||
+ "Msys-i686" => { | ||
+ inherit_from => [ "Msys-x86" ] | ||
+ }, | ||
+ | ||
##### MacOS X (a.k.a. Darwin) setup | ||
"darwin-common" => { | ||
inherit_from => [ "BASE_unix" ], | ||
diff --git a/Configurations/shared-info.pl b/Configurations/shared-info.pl | ||
index 47eddd6..34f0f3b 100644 | ||
--- a/Configurations/shared-info.pl | ||
+++ b/Configurations/shared-info.pl | ||
@@ -50,6 +50,10 @@ my %shared_info; | ||
shared_ldflag => '-shared -Wl,--enable-auto-image-base', | ||
shared_impflag => '-Wl,--out-implib=', | ||
}, | ||
+ 'msys-shared' => { | ||
+ shared_ldflag => '-shared -Wl,--enable-auto-image-base', | ||
+ shared_impflag => '-Wl,--out-implib=', | ||
+ }, | ||
'mingw-shared' => sub { | ||
return { | ||
%{$shared_info{'cygwin-shared'}}, | ||
diff --git a/Configure b/Configure | ||
index d5dc36c..5801912 100755 | ||
--- a/Configure | ||
+++ b/Configure | ||
@@ -1124,7 +1124,7 @@ $target{CXXFLAGS}//=$target{CFLAGS} if $target{CXX}; | ||
$target{cxxflags}//=$target{cflags} if $target{CXX}; | ||
$target{exe_extension}=""; | ||
$target{exe_extension}=".exe" if ($config{target} eq "DJGPP" | ||
- || $config{target} =~ /^(?:Cygwin|mingw)/); | ||
+ || $config{target} =~ /^(?:Cygwin|Msys|mingw)/); | ||
$target{exe_extension}=".pm" if ($config{target} =~ /vos/); | ||
|
||
($target{shared_extension_simple}=$target{shared_extension}) | ||
@@ -1132,7 +1132,7 @@ $target{exe_extension}=".pm" if ($config{target} =~ /vos/); | ||
unless defined($target{shared_extension_simple}); | ||
$target{dso_extension}//=$target{shared_extension_simple}; | ||
($target{shared_import_extension}=$target{shared_extension_simple}.".a") | ||
- if ($config{target} =~ /^(?:Cygwin|mingw)/); | ||
+ if ($config{target} =~ /^(?:Cygwin|Msys|mingw)/); | ||
|
||
# Fill %config with values from %user, and in case those are undefined or | ||
# empty, use values from %target (acting as a default). | ||
diff --git a/apps/build.info b/apps/build.info | ||
index 751d8da..4c27432 100644 | ||
--- a/apps/build.info | ||
+++ b/apps/build.info | ||
@@ -22,7 +22,7 @@ IF[{- !$disabled{apps} -}] | ||
INCLUDE[openssl]=.. ../include | ||
DEPEND[openssl]=libapps.a ../libssl | ||
|
||
-IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}] | ||
+IF[{- $config{target} =~ /^(?:Cygwin|Msys|mingw|VC-)/ -}] | ||
GENERATE[openssl.rc]=../util/mkrc.pl openssl | ||
SOURCE[openssl]=openssl.rc | ||
ENDIF | ||
diff --git a/build.info b/build.info | ||
index 3dda4e8..37136aa 100644 | ||
--- a/build.info | ||
+++ b/build.info | ||
@@ -71,7 +71,7 @@ ELSIF[{- $config{target} =~ /^vms/ -}] | ||
SHARED_SOURCE[libssl]=libssl.opt | ||
ENDIF | ||
|
||
-IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}] | ||
+IF[{- $config{target} =~ /^(?:Cygwin|Msys|mingw|VC-)/ -}] | ||
GENERATE[libcrypto.rc]=util/mkrc.pl libcrypto | ||
GENERATE[libssl.rc]=util/mkrc.pl libssl | ||
|
||
diff --git a/config b/config | ||
index b8adf34..02f3571 100755 | ||
--- a/config | ||
+++ b/config | ||
@@ -331,6 +331,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in | ||
echo "${MACHINE}-pc-cygwin"; exit 0 | ||
;; | ||
|
||
+ MSYS*) | ||
+ echo "${MACHINE}-whatever-msys"; exit 0 | ||
+ ;; | ||
+ | ||
vxworks*) | ||
echo "${MACHINE}-whatever-vxworks"; exit 0; | ||
;; | ||
@@ -815,6 +819,7 @@ case "$GUESSOS" in | ||
# these are all covered by the catchall below | ||
i[3456]86-*-cygwin) OUT="Cygwin-x86" ;; | ||
*-*-cygwin) OUT="Cygwin-${MACHINE}" ;; | ||
+ *-*-msys) OUT="Msys" ;; | ||
x86-*-android|i?86-*-android) OUT="android-x86" ;; | ||
armv[7-9]*-*-android) | ||
OUT="android-armeabi" | ||
diff --git a/crypto/build.info b/crypto/build.info | ||
index 2c619c6..a196bcc 100644 | ||
--- a/crypto/build.info | ||
+++ b/crypto/build.info | ||
@@ -34,6 +34,6 @@ INCLUDE[armv4cpuid.o]=. | ||
GENERATE[s390xcpuid.S]=s390xcpuid.pl $(PERLASM_SCHEME) | ||
INCLUDE[s390xcpuid.o]=. | ||
|
||
-IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}] | ||
+IF[{- $config{target} =~ /^(?:Cygwin|Msys|mingw|VC-)/ -}] | ||
SHARED_SOURCE[../libcrypto]=dllmain.c | ||
ENDIF | ||
diff --git a/crypto/dllmain.c b/crypto/dllmain.c | ||
index 0838c55..f74d36c 100644 | ||
--- a/crypto/dllmain.c | ||
+++ b/crypto/dllmain.c | ||
@@ -10,8 +10,8 @@ | ||
#include "e_os.h" | ||
#include "internal/cryptlib_int.h" | ||
|
||
-#if defined(_WIN32) || defined(__CYGWIN__) | ||
-# ifdef __CYGWIN__ | ||
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) | ||
+# if defined(__CYGWIN__) || defined(__MSYS__) | ||
/* pick DLL_[PROCESS|THREAD]_[ATTACH|DETACH] definitions */ | ||
# include <windows.h> | ||
/* | ||
diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c | ||
index ad8899c..d70f81c 100644 | ||
--- a/crypto/dso/dso_dlfcn.c | ||
+++ b/crypto/dso/dso_dlfcn.c | ||
@@ -26,7 +26,7 @@ | ||
# endif | ||
# include <dlfcn.h> | ||
# define HAVE_DLINFO 1 | ||
-# if defined(__CYGWIN__) || \ | ||
+# if defined(__CYGWIN__) || defined(__MSYS__) || \ | ||
defined(__SCO_VERSION__) || defined(_SCO_ELF) || \ | ||
(defined(__osf__) && !defined(RTLD_NEXT)) || \ | ||
(defined(__OpenBSD__) && !defined(RTLD_SELF)) || \ | ||
diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h | ||
index eeae215..f13b7dc 100644 | ||
--- a/include/openssl/e_os2.h | ||
+++ b/include/openssl/e_os2.h | ||
@@ -48,7 +48,7 @@ extern "C" { | ||
# undef OPENSSL_SYS_UNIX | ||
# define OPENSSL_SYS_WIN32_UWIN | ||
# else | ||
-# if defined(__CYGWIN__) || defined(OPENSSL_SYS_CYGWIN) | ||
+# if defined(__CYGWIN__) || defined(__MSYS__) || defined(OPENSSL_SYS_CYGWIN) | ||
# define OPENSSL_SYS_WIN32_CYGWIN | ||
# else | ||
# if defined(_WIN32) || defined(OPENSSL_SYS_WIN32) | ||
diff --git a/tools/c_rehash.in b/tools/c_rehash.in | ||
index 421fd89..640db8c 100644 | ||
--- a/tools/c_rehash.in | ||
+++ b/tools/c_rehash.in | ||
@@ -21,6 +21,7 @@ my $x509hash = "-subject_hash"; | ||
my $crlhash = "-hash"; | ||
my $verbose = 0; | ||
my $symlink_exists=eval {symlink("",""); 1}; | ||
+if ($^O eq "msys") { $symlink_exists=0 }; | ||
my $removelinks = 1; | ||
|
||
## Parse flags. | ||
diff --git a/util/process_docs.pl b/util/process_docs.pl | ||
index 30b149e..0f97ce1 100755 | ||
--- a/util/process_docs.pl | ||
+++ b/util/process_docs.pl | ||
@@ -79,6 +79,7 @@ if ($options{debug}) { | ||
} | ||
|
||
my $symlink_exists = eval { symlink("",""); 1 }; | ||
+if ($^O eq "msys") { $symlink_exists=0 }; | ||
|
||
foreach my $section (sort @{$options{section}}) { | ||
my $subdir = "man$section"; | ||
-- | ||
2.19.1 | ||
|
Oops, something went wrong.
1f5782d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change breaks
ssh
with the messageC:/msys64/usr/bin/ssh.exe: error while loading shared libraries: msys-crypto-1.0.0.dll: cannot open shared object file: No such file or directory
. Was this intended to be released yet?I was able to rollback manually using this command:
pacman -U /var/cache/pacman/pkg/libopenssl-1.0.2.p-1-x86_64.pkg.tar.xz
1f5782d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And that is not the only thing it breaks. I am in the process of rebuilding at least most of the packages that depend on OpenSSL. In the meantime, you can imitate what the Git for Windows SDK's
sync
command does: copy backusr/bin/msys-crypto-1.0.0.dll
andusr/bin/msys-ssl-1.0.0.dll
, e.g. from here: https://github.com/git-for-windows/git-sdk-64/tree/cb81ff0de1ddc4c8aab2ed733087bd711c693cd3/usr/binAnd yes, I knew it would be painful to upgrade, and you knew that, too: git-for-windows/git#1691 (comment). And you still don't help.