Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate OpenSSL 3.x #89

Merged
merged 28 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2663b4a
Make switch between openssl 1.1. and 3.x possible
Dec 18, 2023
fee97b7
Trigger build manually
pde-cds Dec 18, 2023
f9f4338
Build openssl 3.0 without old interfaces
Dec 19, 2023
2ea7489
Update scons to 4.6 and cmake to 3.28.1; Fix openssl reference for li…
Dec 19, 2023
d4d1e74
Try to load the correct dotnet version for dotnet core targets
Jan 4, 2024
aa28cf7
Try to fix unittests
Jan 4, 2024
39fa5e4
Remove some tests
Jan 4, 2024
0a357c5
Set dotnet core to 3.1.100 explicitly
pde-cds Jan 5, 2024
035efc8
Use both 3.1.x and 3.1.100
pde-cds Jan 5, 2024
f4555ed
Uncomment Test for Core
pde-cds Jan 5, 2024
1ff03af
Fix name of step
Jan 8, 2024
1895fcd
Use git for github repositories
Jan 17, 2024
ab5cea9
Update cyrus-sasl to 2.1.28
Jan 17, 2024
9656100
Fix tests (use subversion repo instead of github.com/ampscm/SharpSvn
Jan 17, 2024
0431f47
Check installed dotnet versions and disable DOTNET_MULTILEVEL_LOOKUP
Jan 18, 2024
70b3208
Test new workflow file
Jan 18, 2024
17e900c
checkout repo for build
Jan 18, 2024
c0eb514
Use actions/*-artifacts to transport artifacts between jobs
Jan 18, 2024
7a47741
Use net6.0 for Tests for .netcore
Jan 19, 2024
1034dc7
Load artifacts for create-nuget
Jan 19, 2024
7ac0563
Load artifacts for create-nuget
Jan 19, 2024
44b3f3e
Rename MSBuildV2.yml to MSBuild.yml
Jan 19, 2024
549e735
Merge branch 'investigation/openssl-3.x' of https://github.com/pde-cd…
Jan 19, 2024
be57708
Merge branch 'rename-msbuildv2' into investigation/openssl-3.x
Jan 19, 2024
b0131e5
Revert changes to SharpSvnStrings.h from 1ff03af48834a2db72c4f534043f…
Jan 19, 2024
7e282f1
Remove debugging step
Jan 19, 2024
6accffa
Update netcoreapp3.1 to net6.0
Jan 19, 2024
670af9b
Revert "Update netcoreapp3.1 to net6.0" -> back to netcoreapp3.1
Jan 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
466 changes: 372 additions & 94 deletions .github/workflows/MSBuild.yml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions imports/Default.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
r1890223,r1890668 - ARM64 support
r1899028 - VS2022 build support
// -->
<property name="subversionVersion" value="1.14.2" overwrite="false" />
<property name="subversionVersion" value="1.14.3" overwrite="false" />
<property name="subversionMerges" value="r1856397,r1860175-1860188,1890223,1890668,1899028,1900882,1900890" overwrite="false" />
<property name="subversionMergeBranches" value="" overwrite="false" />
<property name="svnAddSharpSvn" value="true" overwrite="false" />
Expand All @@ -31,7 +31,7 @@
<property name="serfMerges" value="r1699721-1699723,1712131,1807594,1811083,1811088,1861036" overwrite="false" />

<!-- -->
<property name="opensslVersion" value="1.1.1u" overwrite="false" />
<property name="opensslVersion" value="3.0.12" overwrite="false" />

<property name="aprVersion" value="1.7.4" overwrite="false" />
<property name="aprUtilVersion" value="1.6.3" overwrite="false" />
Expand All @@ -40,7 +40,7 @@
<property name="expatVersion" value="2.5.0" overwrite="false" />
<property name="zlibVersion" value="1.2.13" overwrite="false" />
<property name="serfVersion" value="1.3.10" overwrite="false" />
<property name="saslVersion" value="2.1.26" overwrite="false" />
<property name="saslVersion" value="2.1.28" overwrite="false" />
<property name="swigVersion" value="3.0.12" overwrite="false" />
<property name="nasmVersion" value="2.16.01" overwrite="false" />
<property name="pcreVersion" value="8.45" overwrite="false" />
Expand All @@ -52,8 +52,8 @@
<property name="py3cVersion" value="1.1" overwrite="false" />

<!-- Building only -->
<property name="cmakeVersion" value="3.27.1" overwrite="false" />
<property name="sconsVersion" value="4.5.2" overwrite="false" />
<property name="cmakeVersion" value="3.28.1" overwrite="false" />
<property name="sconsVersion" value="4.6.0" overwrite="false" />

<!-- For testcase -->
<property name="junitVersion" value="4.13.2" overwrite="false" />
Expand Down
6 changes: 5 additions & 1 deletion imports/scripts/libssh2.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<target name="libssh2-prepare" depends="checkout" if="${buildLibssh2}">
<OnceBlock file="build/libssh2_${platform}.patched">
<foreach item="File" property="patch" if="${applyPatches}">
<foreach item="File" property="patch" if="${applyPatches and opensslVersion &lt; '3.0.'}">
<in>
<items basedir="${downloads}/../patches/libssh2">
<include name="*.patch" />
Expand Down Expand Up @@ -47,6 +47,10 @@
<prop name="CMAKE_INSTALL_PREFIX" value="${intDir}" />
<prop name="BUILD_SHARED_LIBS" value="OFF" if="${static}" />
<prop name="BUILD_STATIC_LIBS" value="OFF" unless="${static}" />
<prop name="CRYPTO_BACKEND" value="OpenSSL" />
<prop name="OPENSSL_CRYPTO_LIBRARY:FILEPATH" value="${release}/lib/libcrypto.lib" />
<prop name="OPENSSL_SSL_LIBRARY:FILEPATH" value="${release}/lib/libssl.lib" />
<prop name="OPENSSL_INCLUDE_DIR" value="${release}/include/" />
</CMake>
</OnceBlock>
<MSBuild src="${libssh2Dir}/libssh2.sln">
Expand Down
4 changes: 2 additions & 2 deletions imports/scripts/openssl.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<target name="openssl-prepare" depends="checkout">
<OnceBlock file="build/openssl-${opensslVersion}-${platform}.patched">
<foreach item="File" property="patch">
<foreach item="File" property="patch" if="${opensslVersion &lt; '3.0.'}">
<in>
<items basedir="${downloads}/../patches/openssl">
<include name="*.patch" />
Expand Down Expand Up @@ -44,7 +44,7 @@
<arg value="no-dso" if="${static}" />
<arg value="no-shared" if="${static}" />
<arg value="shared" if="${not static}" />
<arg value="no-hw" />
<arg value="no-hw" if="${opensslVersion &lt; '3.0.'}"/> <!-- Not supported openSSl 3.x -->
<arg value="no-ssl3" />
<arg value="no-gost" if="${static}"/>
<arg value="no-dtls" />
Expand Down
144 changes: 82 additions & 62 deletions imports/scripts/prepare.build
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,27 @@
</foreach>
</OnceBlock>

<Svn
<exec program="git" verbose="true"
unless="${directory::exists(zlibDir)}">

<arg value="co" />
<arg value="https://github.com/madler/zlib/tags/v${zlibVersion}/" />
<arg value="clone" />
<arg value="--branch=v${zlibVersion}" />
<arg value="--depth=1" />
<arg value="https://github.com/madler/zlib.git" />
<arg value="${zlibDir}" />
<arg value="-q" />
</Svn>
</exec>

<Svn
<exec program="git" verbose="true"
unless="${directory::exists(opensslDir)}">

<arg value="co" />
<arg value="https://github.com/openssl/openssl/tags/OpenSSL_${string::replace(opensslVersion,'.','_')}/" />
<arg value="clone" />
<!--OpenSSL changed naming and seperation characters with 3.0-->
<arg value="--branch=openssl-${opensslVersion}" if="${opensslVersion &gt;= '3.0.'}"/>
<arg value="--branch=OpenSSL_${string::replace(opensslVersion,'.','_')}" if="${opensslVersion &lt; '3.0.'}"/>
<arg value="--depth=1" />
<arg value="https://github.com/openssl/openssl.git" />
<arg value="${opensslDir}" />
<arg value="-q" />
</Svn>
</exec>

<Svn
if="${buildHttpd}"
Expand All @@ -88,15 +92,16 @@
<arg value="-q" />
</Svn>

<Svn
<exec program="git" verbose="true"
if="${buildHttpd}"
unless="${directory::exists(nghttp2Dir)}">

<arg value="co" />
<arg value="https://github.com/tatsuhiro-t/nghttp2/tags/v${nghttp2Version}/" />
<arg value="clone" />
<arg value="--branch=v${nghttp2Version}" />
<arg value="--depth=1" />
<arg value="https://github.com/tatsuhiro-t/nghttp2.git" />
<arg value="${nghttp2Dir}" />
<arg value="-q" />
</Svn>
</exec>

<Svn
if="${buildHttpd}"
Expand Down Expand Up @@ -127,14 +132,23 @@
<arg value="-q" />
</Svn>

<Svn
unless="${directory::exists(libexpatDir)}">

<arg value="co" />
<arg value="https://github.com/libexpat/libexpat/tags/R_${string::replace(expatVersion,'.','_')}/expat/" />
<arg value="${libexpatDir}" />
<arg value="-q" />
</Svn>
<get src="https://github.com/libexpat/libexpat/archive/refs/tags/R_${string::replace(expatVersion,'.','_')}.zip" dest="${downloads + 'libexpat_R_' + string::replace(expatVersion,'.','_')}.zip" unless="${file::exists(downloads + 'libexpat_R_' + string::replace(expatVersion,'.','_')+'.zip')}"/>

<unzip zipfile="${downloads + 'libexpat_R_' + string::replace(expatVersion,'.','_')}.zip"
todir="build"
encoding="utf-8"
unless="${directory::exists('build/libexpat-R_' + string::replace(expatVersion,'.','_'))}" />
<copy todir="${libexpatDir}">
<fileset basedir="${'build/libexpat-R_' + string::replace(expatVersion,'.','_')}/expat" />
</copy>
<!-- <Svn -->
<!-- unless="${directory::exists(libexpatDir)}"> -->

<!-- <arg value="co" /> -->
<!-- <arg value="https://github.com/libexpat/libexpat/tags/R_${string::replace(expatVersion,'.','_')}/expat/" /> -->
<!-- <arg value="${libexpatDir}" /> -->
<!-- <arg value="-q" /> -->
<!-- </Svn> -->

<Svn
unless="${directory::exists(serfDir)}">
Expand All @@ -147,42 +161,42 @@
<arg value="-q" />
</Svn>

<Svn
<exec program="git" verbose="true"
unless="${directory::exists(sqliteDir)}">

<arg value="co" />
<arg value="https://github.com/rhuijben/sqlite-amalgamation/tags/${sqliteVersion}/" />
<arg value="clone" />
<arg value="--depth=1" />
<arg value="--branch=${sqliteVersion}" />
<arg value="https://github.com/rhuijben/sqlite-amalgamation.git" />
<arg value="${sqliteDir}" />
<arg value="-q" />
</Svn>
</exec>

<Svn
<exec program="git" verbose="true"
unless="${directory::exists(saslDir)}">

<arg value="co" />
<arg value="https://github.com/rhuijben/cyrus-sasl/tags/cyrus-sasl-${saslVersion}/" />
<arg value="clone" />
<arg value="--depth=1" />
<arg value="--branch=cyrus-sasl-${saslVersion}" />
<arg value="https://github.com/rhuijben/cyrus-sasl.git" />
<arg value="${saslDir}" />
<arg value="-q" />
</Svn>
</exec>

<Svn
<exec program="git" verbose="true"
unless="${directory::exists(libssh2Dir)}" if="${buildLibssh2}">

<arg value="co" />
<arg value="https://github.com/libssh2/libssh2/trunk/" if="${libssh2BuildType == 'trunk'}" />
<arg value="https://github.com/libssh2/libssh2/tags/libssh2-${libssh2Version}" if="${libssh2BuildType == 'tag'}" />
<arg value="clone" />
<arg value="--depth=1" />
<arg value="" if="${libssh2BuildType == 'trunk'}"/>
<arg value="--branch=libssh2-${libssh2Version}" if="${libssh2BuildType == 'tag'}"/>
<arg value="https://github.com/libssh2/libssh2.git" />
<arg value="${libssh2Dir}" />
<arg value="-q" />
</Svn>
</exec>

<Svn
<exec program="git" verbose="true"
unless="${directory::exists(libeventDir)}" if="${buildLibevent}">

<arg value="co" />
<arg value="https://github.com/libevent/libevent/tags/release-${libeventVersion}"/>
<arg value="clone" />
<arg value="--depth=1" />
<arg value="--branch=release-${libeventVersion}" />
<arg value="https://github.com/libevent/libevent.git"/>
<arg value="${libeventDir}" />
<arg value="-q" />
</Svn>
</exec>

<Svn
unless="${directory::exists(pthreadwin32Dir)}" if="${buildPthreadwin32}">
Expand All @@ -194,24 +208,24 @@
<arg value="-q" />
</Svn>

<Svn
<exec program="git" verbose="true"
unless="${directory::exists(memcachedDir)}" if="${buildMemcached}">

<arg value="co" />
<arg value="https://github.com/memcached/memcached/branches/engine-pu" if="${memcachedBuildType == 'trunk'}" />/>
<arg value="https://github.com/memcached/memcached/tags/${memcachedVersion}" if="${memcachedBuildType == 'tag'}" />/>
<arg value="clone" />
<arg value="--depth=1" />
<arg value="--branch=engine-pu" if="${memcachedBuildType == 'trunk'}"/>
<arg value="--branch=${memcachedVersion}" if="${memcachedBuildType == 'tag'}"/>
<arg value="https://github.com/memcached/memcached.git" />/>
<arg value="${memcachedDir}" />
<arg value="-q" />
</Svn>
</exec>

<Svn
<exec program="git" verbose="true"
unless="${directory::exists(py3cDir)}">

<arg value="co" />
<arg value="https://github.com/encukou/py3c/tags/v${py3cVersion}/" />
<arg value="clone" />
<arg value="--depth=1" />
<arg value="--branch=v${py3cVersion}" />
<arg value="https://github.com/encukou/py3c.git" />
<arg value="${py3cDir}" />
<arg value="-q" />
</Svn>
</exec>
</target>

<filterchain id="license-filter">
Expand Down Expand Up @@ -256,9 +270,15 @@
tofile="release/licenses/Cyrus-Sasl-License.txt">
<filterchain refid="license-filter" />
</copy>
<!-- OpenSSL changed License file name -->
<copy
file="${opensslDir}/LICENSE.txt"
tofile="release/licenses/OpenSSL-License.txt" if="${opensslVersion &gt;= '3.0.'}">
<filterchain refid="license-filter" />
</copy>
<copy
file="${opensslDir}/LICENSE"
tofile="release/licenses/OpenSSL-License.txt">
tofile="release/licenses/OpenSSL-License.txt" if="${opensslVersion &lt; '3.0.'}">
<filterchain refid="license-filter" />
</copy>
<copy
Expand Down
8 changes: 4 additions & 4 deletions imports/scripts/sasl.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
</items>
</in>
<do>
<Svn>
<arg value="patch" />
<exec program="git" verbose="true">
<arg value="apply" />
<arg value="--directory=${saslDir}" />
<arg value="${patch}" />
<arg value="${saslDir}" />
</Svn>
</exec>
</do>
</foreach>
<FilterFile file="${saslDir}/win32/include/config.h">
Expand Down
2 changes: 1 addition & 1 deletion src/SharpSvn.Tests/Commands/CapabilitiesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void Capabilities_SharpCaps()

SvnGetCapabilitiesArgs ca = new SvnGetCapabilitiesArgs();
ca.RetrieveAllCapabilities = true;
Assert.That(client.GetCapabilities(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn"), ca, out caps));
Assert.That(client.GetCapabilities(new Uri("https://svn.apache.org/repos/asf/subversion/trunk"), ca, out caps));

Assert.That(caps.Contains(SvnCapability.MergeInfo));
Assert.That(caps.Count, Is.GreaterThanOrEqualTo(5));
Expand Down
14 changes: 7 additions & 7 deletions src/SharpSvn.Tests/Commands/FileVersionsTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//
//
// Copyright 2008-2009 The SharpSvn Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -174,8 +174,8 @@ public void FileVersions_WalkKeywords()
public void FileVersions_WalkMe()
{
SvnFileVersionsArgs a = new SvnFileVersionsArgs();
SvnUriTarget me = new SvnUriTarget(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/trunk/src/SharpSvn.Tests/Commands/FileVersions.cs"), 931);
a.End = 931;
SvnUriTarget me = new SvnUriTarget(new Uri("https://svn.apache.org/repos/asf/subversion/trunk/win-tests.py"), 874950);
a.End = 874950;

int n = 0;

Expand All @@ -187,16 +187,16 @@ public void FileVersions_WalkMe()
n++;
});

Assert.That(n, Is.EqualTo(7));
Assert.That(n, Is.EqualTo(93));
}

[TestMethod]
public void FileVersions_WalkChange()
{
SvnFileVersionsArgs a = new SvnFileVersionsArgs();
SvnUriTarget me = new SvnUriTarget(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/trunk/src/SharpSvn.Tests/Commands/FileVersions.cs"), 931);
a.Start = 927;
a.End = 928;
SvnUriTarget me = new SvnUriTarget(new Uri("https://svn.apache.org/repos/asf/subversion/trunk/win-tests.py"), 874950);
a.Start =873511;
a.End = 873512;
int n = 0;

Client.FileVersions(me, a,
Expand Down
11 changes: 6 additions & 5 deletions src/SharpSvn.Tests/Commands/ListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ public void List_ListSharp()
Client.Authentication.Clear();
Client.Authentication.DefaultCredentials = new NetworkCredential("guest", "");

client.List(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/trunk"),
client.List(new Uri("https://svn.apache.org/repos/asf/subversion/trunk/"),
delegate(object sender, SvnListEventArgs e)
{
Assert.That(e.RepositoryRoot, Is.EqualTo(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/")));
Assert.That(e.BaseUri, Is.EqualTo(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/trunk/")));
Assert.That(e.BasePath, Is.EqualTo("/trunk"));
Assert.That(e.RepositoryRoot, Is.EqualTo(new Uri("https://svn.apache.org/repos/asf/")));
Assert.That(e.BaseUri, Is.EqualTo(new Uri("https://svn.apache.org/repos/asf/subversion/trunk/")));
Assert.That(e.BasePath, Is.EqualTo("/subversion/trunk"));
});

}
Expand Down Expand Up @@ -319,7 +319,8 @@ public void List_ListDepth()
}
}

[TestMethod]
// Does not work because this repository does not exist anymore
//[TestMethod]
public void List_TestHash()
{
using (SvnClient client = NewSvnClient(false, false))
Expand Down
2 changes: 1 addition & 1 deletion src/SharpSvn.Tests/Commands/ResolveTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void Resolve_ResolveDirectory()
public void Resolve_RepeatedEventHookUp_SOC_411()
{
SvnSandBox sbox = new SvnSandBox(this);
Uri projectRoot = new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/trunk/scripts");
Uri projectRoot = new Uri("https://svn.apache.org/repos/asf/subversion/trunk/");

using (var svnClient = NewSvnClient(false, false))
{
Expand Down
Loading
Loading