aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2020-02-11 23:48:03 +0000
committerMartin Matuska <mm@FreeBSD.org>2020-02-11 23:48:03 +0000
commit8185c4ae244f9a52ad987b36e7d6300500054d00 (patch)
tree11e2d7cd0caf20998ed1e1146e1c1d7fc747165e /build
parent98c1f51f769841d99d879099f9075ff60d51ee4a (diff)
downloadsrc-8185c4ae244f9a52ad987b36e7d6300500054d00.tar.gz
src-8185c4ae244f9a52ad987b36e7d6300500054d00.zip
Update vendor/libarchive/dist to git 3288ebb0353beb51dfb09d444dedbe9235ead53dvendor/libarchive/3.4.2
Libarchive 3.4.2 Relevant vendor changes: PR #1289: atomic extraction support (bsdtar -x --safe-writes) PR #1308: big endian fix for UTF16 support in LHA reader PR #1326: reject RAR5 files that declare invalid header flags Issue #987: fix support 7z archive entries with Delta filter Issue #1317: fix compression output buffer handling in XAR writer Issue #1319: fix uname or gname longer than 32 characters in pax writer Issue #1325: fix use after free when archiving hardlinks in ISO9660 or XAR Use localtime_r() and gmtime_r() instead of localtime() and gmtime()
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=357783 svn path=/vendor/libarchive/3.4.2/; revision=357784; tag=vendor/libarchive/3.4.2
Diffstat (limited to 'build')
-rwxr-xr-xbuild/ci/build.sh7
-rwxr-xr-xbuild/ci/github_actions/ci.cmd65
-rw-r--r--build/cmake/config.h.in3
-rw-r--r--build/release/Dockerfile11
-rwxr-xr-xbuild/release/release.sh8
-rw-r--r--build/version2
6 files changed, 76 insertions, 20 deletions
diff --git a/build/ci/build.sh b/build/ci/build.sh
index 97d570b5e016..0e0c2fbab0cf 100755
--- a/build/ci/build.sh
+++ b/build/ci/build.sh
@@ -42,6 +42,7 @@ while getopts a:b:c:d:s: opt; do
test) ;;
install) ;;
distcheck) ;;
+ artifact) ;;
*) inputerror "Invalid action (-a)" ;;
esac
ACTIONS="${ACTIONS} ${OPTARG}"
@@ -147,12 +148,16 @@ for action in ${ACTIONS}; do
install)
${MAKE} ${MAKE_ARGS} install DESTDIR="${BUILDDIR}/destdir"
RET="$?"
- cd ${BUILDDIR}/destdir && ls -lR .
+ cd "${BUILDDIR}/destdir" && ls -lR .
;;
distcheck)
${MAKE} ${MAKE_ARGS} distcheck
RET="$?"
;;
+ artifact)
+ tar -c -J -C "${BUILDDIR}/destdir" -f "${CURDIR}/libarchive.tar.xz" usr
+ ls -l "${CURDIR}/libarchive.tar.xz"
+ ;;
esac
if [ "${RET}" != "0" ]; then
exit "${RET}"
diff --git a/build/ci/github_actions/ci.cmd b/build/ci/github_actions/ci.cmd
index 30626d5c2a40..954d515c3b42 100755
--- a/build/ci/github_actions/ci.cmd
+++ b/build/ci/github_actions/ci.cmd
@@ -1,5 +1,6 @@
@ECHO OFF
SET ZLIB_VERSION=1.2.11
+SET BZIP2_VERSION=b7a672291188a6469f71dd13ad14f2f9a7344fc8
IF NOT "%BE%"=="mingw-gcc" (
IF NOT "%BE%"=="msvc" (
ECHO Environment variable BE must be mingw-gcc or msvc
@@ -7,20 +8,31 @@ IF NOT "%BE%"=="mingw-gcc" (
)
)
+SET ORIGPATH=%PATH%
+IF "%BE%"=="mingw-gcc" (
+ SET MINGWPATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
+)
+
IF "%1"=="deplibs" (
IF NOT EXIST build_ci\libs (
MKDIR build_ci\libs
)
CD build_ci\libs
- IF NOT EXIST zlib-%ZLIB_VERSION%.tar.gz (
- curl -o zlib-%ZLIB_VERSION%.tar.gz https://www.zlib.net/zlib-%ZLIB_VERSION%.tar.gz
+ IF NOT EXIST zlib-%ZLIB_VERSION%.zip (
+ curl -L -o zlib-%ZLIB_VERSION%.zip https://github.com/libarchive/zlib/archive/v%ZLIB_VERSION%.zip
)
IF NOT EXIST zlib-%ZLIB_VERSION% (
- tar -x -z -f zlib-%ZLIB_VERSION%.tar.gz
+ tar -x -f zlib-%ZLIB_VERSION%.zip
+ )
+ IF NOT EXIST bzip2-%BZIP2_VERSION%.zip (
+ curl -L -o bzip2-%BZIP2_VERSION%.zip https://github.com/libarchive/bzip2/archive/%BZIP2_VERSION%.zip
+ )
+ IF NOT EXIST bzip2-%BZIP2_VERSION% (
+ tar -x -f bzip2-%BZIP2_VERSION%.zip
)
CD zlib-%ZLIB_VERSION%
IF "%BE%"=="mingw-gcc" (
- SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
+ SET PATH=%MINGWPATH%
cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" . || EXIT /b 1
mingw32-make || EXIT /b 1
mingw32-make test || EXIT /b 1
@@ -31,49 +43,66 @@ IF "%1"=="deplibs" (
cmake --build . --target RUN_TESTS --config Release || EXIT /b 1
cmake --build . --target INSTALL --config Release || EXIT /b 1
)
+ CD ..
+ CD bzip2-%BZIP2_VERSION%
+ IF "%BE%"=="mingw-gcc" (
+ SET PATH=%MINGWPATH%
+ cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" -D ENABLE_LIB_ONLY=ON -D ENABLE_SHARED_LIB=OFF -D ENABLE_STATIC_LIB=ON . || EXIT /b 1
+ mingw32-make || EXIT /b 1
+ REM mingw32-make test || EXIT /b 1
+ mingw32-make install || EXIT /b 1
+ ) ELSE IF "%BE%"=="msvc" (
+ cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" -D ENABLE_LIB_ONLY=ON -D ENABLE_SHARED_LIB=OFF -D ENABLE_STATIC_LIB=ON . || EXIT /b 1
+ cmake --build . --target ALL_BUILD --config Release || EXIT /b 1
+ REM cmake --build . --target RUN_TESTS --config Release || EXIT /b 1
+ cmake --build . --target INSTALL --config Release || EXIT /b 1
+ )
+ CD ..
) ELSE IF "%1%"=="configure" (
IF "%BE%"=="mingw-gcc" (
- SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
+ SET PATH=%MINGWPATH%
MKDIR build_ci\cmake
CD build_ci\cmake
- cmake -G "MinGW Makefiles" ..\.. || EXIT /b 1
+ cmake -G "MinGW Makefiles" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/libzlibstatic.a" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/libbz2.a" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" ..\.. || EXIT /b 1
) ELSE IF "%BE%"=="msvc" (
MKDIR build_ci\cmake
CD build_ci\cmake
- cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" ..\.. || EXIT /b 1
+ cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/zlibstatic.lib" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/bz2.lib" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" ..\.. || EXIT /b 1
)
) ELSE IF "%1%"=="build" (
IF "%BE%"=="mingw-gcc" (
- SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
+ SET PATH=%MINGWPATH%
CD build_ci\cmake
- mingw32-make || EXIT /b 1
+ mingw32-make VERBOSE=1 || EXIT /b 1
) ELSE IF "%BE%"=="msvc" (
CD build_ci\cmake
- cmake --build . --target ALL_BUILD --config Release
+ cmake --build . --target ALL_BUILD --config Release || EXIT /b 1
)
) ELSE IF "%1%"=="test" (
IF "%BE%"=="mingw-gcc" (
- SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
- COPY "C:\Program Files (x86)\zlib\bin\libzlib.dll" build_ci\cmake\bin\
+ SET PATH=%MINGWPATH%
CD build_ci\cmake
SET SKIP_TEST_SPARSE=1
- mingw32-make test
+ mingw32-make test VERBOSE=1 || EXIT /b 1
) ELSE IF "%BE%"=="msvc" (
ECHO "Skipping tests on this platform"
EXIT /b 0
REM CD build_ci\cmake
- REM cmake --build . --target RUN_TESTS --config Release
+ REM cmake --build . --target RUN_TESTS --config Release || EXIT /b 1
)
) ELSE IF "%1%"=="install" (
IF "%BE%"=="mingw-gcc" (
- SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
+ SET PATH=%MINGWPATH%
CD build_ci\cmake
- mingw32-make install DESTDIR=%cd%\destdir
+ mingw32-make install || EXIT /b 1
) ELSE IF "%BE%"=="msvc" (
- cmake --build . --target INSTALL --config Release
+ CD build_ci\cmake
+ cmake --build . --target INSTALL --config Release || EXIT /b 1
)
+) ELSE IF "%1"=="artifact" (
+ tar -c -C "C:\Program Files (x86)" --format=zip -f libarchive.zip libarchive
) ELSE (
- ECHO "Usage: %0% deplibs|configure|build|test|install"
+ ECHO "Usage: %0% deplibs|configure|build|test|install|artifact"
@EXIT /b 0
)
@EXIT /b 0
diff --git a/build/cmake/config.h.in b/build/cmake/config.h.in
index 3b1f0b95c8fb..fcbd80c5a171 100644
--- a/build/cmake/config.h.in
+++ b/build/cmake/config.h.in
@@ -1210,6 +1210,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `_get_timezone' function. */
#cmakedefine HAVE__GET_TIMEZONE 1
+/* Define to 1 if you have the `_gmtime64_s' function. */
+#cmakedefine HAVE__GMTIME64_S 1
+
/* Define to 1 if you have the `_localtime64_s' function. */
#cmakedefine HAVE__LOCALTIME64_S 1
diff --git a/build/release/Dockerfile b/build/release/Dockerfile
new file mode 100644
index 000000000000..76944f40c484
--- /dev/null
+++ b/build/release/Dockerfile
@@ -0,0 +1,11 @@
+FROM ubuntu:18.04
+RUN apt-get update && apt-get install -y build-essential autoconf automake libtool pkg-config cmake libssl-dev libacl1-dev libbz2-dev liblzma-dev libzip-dev liblz4-dev libzstd-dev lzop groff ghostscript bsdmainutils zip
+ADD . $HOME/libarchive/
+ADD "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" $HOME/libarchive/build/autoconf/config.guess
+ADD "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" $HOME/libarchive/build/autoconf/config.sub
+WORKDIR $HOME/libarchive
+RUN /bin/sh build/clean.sh
+RUN /bin/sh build/autogen.sh
+ENV SKIP_OPEN_FD_ERR_TEST=1 SKIP_TEST_SPARSE=1
+RUN ./configure
+RUN make V=1 distcheck
diff --git a/build/release/release.sh b/build/release/release.sh
new file mode 100755
index 000000000000..4d0803892687
--- /dev/null
+++ b/build/release/release.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+ID=$(docker build -q -f build/release/Dockerfile .)
+if [ -z "$ID" ]; then
+ echo "Failed to build docker image"
+ exit 1
+else
+ docker run $ID sh -c "tar -c -f - libarchive-*" | tar -x -f -
+fi
diff --git a/build/version b/build/version
index bd97679ec3cc..78be3ab7e349 100644
--- a/build/version
+++ b/build/version
@@ -1 +1 @@
-3004002dev
+3004002