aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2019-02-12 22:29:41 +0000
committerMartin Matuska <mm@FreeBSD.org>2019-02-12 22:29:41 +0000
commitfbb1b16ad8bc7a6f9a32424ddbd61e59ad5a4d4d (patch)
tree7032f8b865acde86f00b1124822b74bdb4be73f9 /build
parentc6234fa1ee365085418a23124c988baf3d02c2fd (diff)
downloadsrc-fbb1b16ad8bc7a6f9a32424ddbd61e59ad5a4d4d.tar.gz
src-fbb1b16ad8bc7a6f9a32424ddbd61e59ad5a4d4d.zip
Update vendor/libarchive/dist to git 31c0a517c91f44eeee717a04db8b075cadda83d8
Relevant vendor changes: PR #1085: Fix a null pointer dereference bug in zip writer PR #1110: ZIP reader added support for XZ, LZMA, PPMD8 and BZIP2 decopmpression PR #1116: Add support for 64-bit ar format PR #1120: Fix a 7zip crash [1] and a ISO9660 infinite loop [2] PR #1125: RAR5 reader - fix an invalid read and a memory leak PR #1131: POSIX reader - do not fail when tree_current_lstat() fails due to ENOENT [3] PR #1134: Delete unnecessary null pointer checks before calls of free() OSS-Fuzz 10843: Force intermediate to uint64_t to make UBSAN happy. OSS-Fuzz 11011: Avoid buffer overflow in rar5 reader PR: 233006 [3] Security: CVE-2019-1000019 [1], CVE-2019-1000020 [2]
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=344063
Diffstat (limited to 'build')
-rwxr-xr-xbuild/ci/build.sh (renamed from build/ci_build.sh)35
-rwxr-xr-xbuild/ci/cirrus_ci.sh53
-rwxr-xr-xbuild/ci/test_driver (renamed from build/ci_test_driver)0
3 files changed, 72 insertions, 16 deletions
diff --git a/build/ci_build.sh b/build/ci/build.sh
index 65e5ceb54478..d61336eafb0e 100755
--- a/build/ci_build.sh
+++ b/build/ci/build.sh
@@ -3,15 +3,17 @@
# Automated build and test of libarchive on CI systems
#
# Variables that can be passed via environment:
-# BUILD_SYSTEM=
-# BUILDDIR=
-# SRCDIR=
-# CONFIGURE_ARGS=
-# MAKE_ARGS=
-#
+# BS= # build system (autotools or cmake)
+# BUILDDIR= # build directory
+# SRCDIR= # source directory
+# CONFIGURE_ARGS= # configure arguments
+# MAKE_ARGS= # make arguments
ACTIONS=
-BUILD_SYSTEM="${BUILD_SYSTEM:-autotools}"
+if [ -n "${BUILD_SYSTEM}" ]; then
+ BS="${BUILD_SYSTEM}"
+fi
+BS="${BS:-autotools}"
MAKE="${MAKE:-make}"
CMAKE="${CMAKE:-cmake}"
CURDIR=`pwd`
@@ -38,8 +40,8 @@ while getopts a:b:d:s: opt; do
esac
ACTIONS="${ACTIONS} ${OPTARG}"
;;
- b) BUILD_SYSTEM="${OPTARG}"
- case "${BUILD_SYSTEM}" in
+ b) BS="${OPTARG}"
+ case "${BS}" in
autotools) ;;
cmake) ;;
*) inputerror "Invalid build system (-b)" ;;
@@ -59,18 +61,18 @@ done
if [ -z "${ACTIONS}" ]; then
ACTIONS="autogen configure build test"
fi
-if [ -z "${BUILD_SYSTEM}" ]; then
- inputerror "Missing type (-t) parameter"
+if [ -z "${BS}" ]; then
+ inputerror "Missing build system (-b) parameter"
fi
if [ -z "${BUILDDIR}" ]; then
- BUILDDIR="${CURDIR}/build_ci/${BUILD_SYSTEM}"
+ BUILDDIR="${CURDIR}/build_ci/${BS}"
fi
mkdir -p "${BUILDDIR}"
for action in ${ACTIONS}; do
cd "${BUILDDIR}"
case "${action}" in
autogen)
- case "${BUILD_SYSTEM}" in
+ case "${BS}" in
autotools)
cd "${SRCDIR}"
sh build/autogen.sh
@@ -79,7 +81,7 @@ for action in ${ACTIONS}; do
esac
;;
configure)
- case "${BUILD_SYSTEM}" in
+ case "${BS}" in
autotools) "${SRCDIR}/configure" ${CONFIGURE_ARGS} ;;
cmake) ${CMAKE} ${CONFIGURE_ARGS} "${SRCDIR}" ;;
esac
@@ -90,15 +92,16 @@ for action in ${ACTIONS}; do
RET="$?"
;;
test)
- case "${BUILD_SYSTEM}" in
+ case "${BS}" in
autotools)
- ${MAKE} ${MAKE_ARGS} check LOG_DRIVER="${SRCDIR}/build/ci_test_driver"
+ ${MAKE} ${MAKE_ARGS} check LOG_DRIVER="${SRCDIR}/build/ci/test_driver"
;;
cmake)
${MAKE} ${MAKE_ARGS} test
;;
esac
RET="$?"
+ find ${TMPDIR:-/tmp} -path '*_test.*' -name '*.log' -print -exec cat {} \;
;;
esac
if [ "${RET}" != "0" ]; then
diff --git a/build/ci/cirrus_ci.sh b/build/ci/cirrus_ci.sh
new file mode 100755
index 000000000000..9db762f97cca
--- /dev/null
+++ b/build/ci/cirrus_ci.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+UNAME=`uname`
+if [ "$1" = "install" ]
+then
+ if [ "${UNAME}" = "FreeBSD" ]
+ then
+ set -x -e
+ sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf
+ mount -u -o acls /
+ mkdir /tmp_acl_nfsv4
+ MD=`mdconfig -a -t swap -s 128M`
+ newfs /dev/$MD
+ tunefs -N enable /dev/$MD
+ mount /dev/$MD /tmp_acl_nfsv4
+ chmod 1777 /tmp_acl_nfsv4
+ pkg install -y autoconf automake cmake libiconv libtool pkgconf expat libxml2 liblz4 zstd
+ elif [ "${UNAME}" = "Darwin" ]
+ then
+ set -x -e
+ brew update
+ brew install autoconf automake libtool pkg-config cmake xz lz4 zstd
+ elif [ "${UNAME}" = "Linux" ]
+ then
+ if [ -f "/etc/debian_version" ]
+ then
+ apt-get -y update
+ apt-get -y install build-essential locales automake libtool bison sharutils pkgconf libacl1-dev libbz2-dev libzip-dev zlib1g-dev liblzma-dev liblz4-dev libzstd-dev libssl-dev lrzip cmake
+ elif [ -f "/etc/fedora-release" ]
+ then
+ dnf -y install make cmake gcc gcc-c++ kernel-devel automake libtool bison sharutils pkgconf libacl-devel librichacl-devel bzip2-devel libzip-devel zlib-devel xz-devel lz4-devel libzstd-devel openssl-devel
+ fi
+ fi
+elif [ "$1" = "test" ]
+then
+ if [ "${UNAME}" = "FreeBSD" ]
+ then
+ set -e
+ echo "Additional NFSv4 ACL tests"
+ CURDIR=`pwd`
+ if [ "${BS}" = "cmake" ]
+ then
+ BIN_SUBDIR="bin"
+ else
+ BIN_SUBDIR=.
+ fi
+ BUILDDIR="${CURDIR}/build_ci/${BS}"
+ cd "$BUILDDIR"
+ TMPDIR=/tmp_acl_nfsv4 ${BIN_SUBDIR}/libarchive_test -r "${CURDIR}/libarchive/test" -v test_acl_platform_nfs4
+ fi
+else
+ echo "Usage $0 install | test_nfsv4_acls"
+ exit 1
+fi
diff --git a/build/ci_test_driver b/build/ci/test_driver
index 69a5463c10e8..69a5463c10e8 100755
--- a/build/ci_test_driver
+++ b/build/ci/test_driver