Skip to content

Commit 2453a6d

Browse files
authored
Merge pull request libgit2#96 from libgit2/no-tls
Stop depending on OpenSSL on linux
2 parents df57a8f + 925b27e commit 2453a6d

12 files changed

+29
-81
lines changed

.travis.yml

+3-23
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,17 @@ matrix:
1212
- os: linux
1313
dist: trusty
1414
sudo: required
15-
env: RID=ubuntu.18.04-x64
15+
env: RID=linux-musl-x64
1616
- os: linux
1717
dist: trusty
1818
sudo: required
19-
env: RID=rhel-x64
19+
env: RID=linux-arm64
2020
- os: linux
2121
dist: trusty
2222
sudo: required
23-
env: RID=fedora-x64
24-
- os: linux
25-
dist: trusty
26-
sudo: required
27-
env: RID=debian.9-x64
28-
- os: linux
29-
dist: trusty
30-
sudo: required
31-
env: RID=alpine-x64
32-
- os: linux
33-
dist: trusty
34-
sudo: required
35-
env: RID=alpine.3.9-x64
23+
env: RID=linux-arm
3624
- os: osx
3725
env: RID=osx
38-
- os: linux
39-
dist: trusty
40-
sudo: required
41-
env: RID=ubuntu.16.04-arm64
42-
- os: linux
43-
dist: trusty
44-
sudo: required
45-
env: RID=debian-arm64
4626

4727
branches:
4828
only:

CMakeLists.arm.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SET(CMAKE_SYSTEM_NAME Linux)
2+
set(CMAKE_SYSTEM_PROCESSOR arm)
3+
set(TARGET_ABI "linux-gnueabihf")
4+
5+
SET(CMAKE_C_COMPILER ${CMAKE_SYSTEM_PROCESSOR}-${TARGET_ABI}-gcc)
6+
SET(CMAKE_CXX_COMPILER ${CMAKE_SYSTEM_PROCESSOR}-${TARGET_ABI}-g++)

Dockerfile.alpine.3.9-x64

-7
This file was deleted.

Dockerfile.fedora-x64

-7
This file was deleted.

Dockerfile.debian.9-x64 renamed to Dockerfile.linux-arm

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM debian:9
22
WORKDIR /nativebinaries
33
COPY . /nativebinaries/
44

5-
RUN apt update && apt -y install cmake gcc libssl-dev pkg-config
5+
RUN dpkg --add-architecture armhf
6+
7+
RUN apt update && apt -y install cmake pkg-config crossbuild-essential-armhf
68

79
CMD ["/bin/bash", "-c", "./build.libgit2.sh"]

Dockerfile.debian-arm64 renamed to Dockerfile.linux-arm64

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ COPY . /nativebinaries/
44

55
RUN dpkg --add-architecture arm64
66

7-
RUN apt update \
8-
&& apt -y install cmake pkg-config \
9-
crossbuild-essential-arm64 \
10-
libssl-dev:arm64
7+
RUN apt update && apt -y install cmake pkg-config crossbuild-essential-arm64
118

129
CMD ["/bin/bash", "-c", "./build.libgit2.sh"]

Dockerfile.alpine-x64 renamed to Dockerfile.linux-musl-x64

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ FROM alpine:3.7
22
WORKDIR /nativebinaries
33
COPY . /nativebinaries/
44

5-
RUN apk add --no-cache bash build-base cmake openssl-dev
5+
RUN apk add --no-cache bash build-base cmake
66

77
CMD ["/bin/bash", "-c", "./build.libgit2.sh"]

Dockerfile.linux-x64

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM ubuntu:14.04
22
WORKDIR /nativebinaries
33
COPY . /nativebinaries/
44

5-
RUN apt update && apt -y install libssl-dev pkg-config curl make gcc build-essential
5+
RUN apt update && apt -y install pkg-config curl make gcc build-essential
66

77
RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.15.4/cmake-3.15.4-Linux-x86_64.sh -o /tmp/cmake.sh && bash /tmp/cmake.sh --skip-license --prefix=/usr/local
88

Dockerfile.rhel-x64

-8
This file was deleted.

Dockerfile.ubuntu.16.04-arm64

-17
This file was deleted.

Dockerfile.ubuntu.18.04-x64

-7
This file was deleted.

build.libgit2.sh

+14-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,26 @@ set -e
44

55
LIBGIT2SHA=`cat ./nuget.package/libgit2/libgit2_hash.txt`
66
SHORTSHA=${LIBGIT2SHA:0:7}
7+
OS=`uname`
8+
ARCH=`uname -m`
9+
PACKAGEPATH="nuget.package/runtimes"
10+
11+
if [[ $OS == "Darwin" ]]; then
12+
USEHTTPS="ON"
13+
else
14+
USEHTTPS="OFF"
15+
fi
716

817
rm -rf libgit2/build
918
mkdir libgit2/build
1019
pushd libgit2/build
1120

1221
export _BINPATH=`pwd`
1322

23+
if [[ $RID == *arm ]]; then
24+
export TOOLCHAIN_FILE=/nativebinaries/CMakeLists.arm.txt
25+
fi
26+
1427
if [[ $RID == *arm64 ]]; then
1528
export TOOLCHAIN_FILE=/nativebinaries/CMakeLists.arm64.txt
1629
fi
@@ -21,18 +34,14 @@ cmake -DCMAKE_BUILD_TYPE:STRING=Release \
2134
-DENABLE_TRACE=ON \
2235
-DLIBGIT2_FILENAME=git2-$SHORTSHA \
2336
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
37+
-DUSE_HTTPS=$USEHTTPS \
2438
-DUSE_BUNDLED_ZLIB=ON \
2539
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
2640
..
2741
cmake --build .
2842

2943
popd
3044

31-
OS=`uname`
32-
ARCH=`uname -m`
33-
34-
PACKAGEPATH="nuget.package/runtimes"
35-
3645
if [[ $RID == "" ]]; then
3746
if [[ $ARCH == "x86_64" ]]; then
3847
RID="unix-x64"

0 commit comments

Comments
 (0)