Skip to content

Commit

Permalink
wget: upgrade to latest base builder (#6488)
Browse files Browse the repository at this point in the history
* wget: upgrade build to latest base builder

* dont add old script

* wget: cleanup build
  • Loading branch information
DavidKorczynski committed Sep 19, 2021
1 parent 1933636 commit c44b98f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
6 changes: 1 addition & 5 deletions projects/wget/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
#
################################################################################

# Using Ubuntu 16.04 because of breakage on Ubuntu 20.04.
# See https://github.com/google/oss-fuzz/issues/6291 for more details.
FROM gcr.io/oss-fuzz-base/base-builder:xenial
# Delete line above and uncomment line below to upgrade to 20.04.
# FROM gcr.io/oss-fuzz-base/base-builder
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y \
make \
pkg-config \
Expand Down
19 changes: 15 additions & 4 deletions projects/wget/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,31 @@ make install
# avoid iconv() memleak on Ubuntu 16.04 image (breaks test suite)
export ASAN_OPTIONS=detect_leaks=0

# Ensure our libraries can be found
ln -s $WGET_DEPS_PATH/lib64/libhogweed.a $WGET_DEPS_PATH/lib/libhogweed.a
ln -s $WGET_DEPS_PATH/lib64/libnettle.a $WGET_DEPS_PATH/lib/libnettle.a

cd $SRC/wget
./bootstrap
autoreconf -fi

export CFLAGS="$CFLAGS -I$WGET_DEPS_PATH/include"
export CXXFLAGS="$CXXFLAGS -I$WGET_DEPS_PATH/include"

# build and run non-networking tests
LIBS="-lgnutls -lhogweed -lnettle -lidn2 -lunistring" \
./configure -C
GNUTLS_CFLAGS="-lgnutls" \
GNUTLS_LIBS="-lgnutls" \
LIBS="-lgnutls -lhogweed -lnettle -lidn2 -lunistring -lpsl" \
./configure -C
make clean
make -j$(nproc)
make -j$(nproc) -C fuzz check

# build for fuzzing
LIBS="-lgnutls -lhogweed -lnettle -lidn2 -lunistring" \
./configure --enable-fuzzing -C
GNUTLS_CFLAGS="-lgnutls" \
GNUTLS_LIBS="-lgnutls" \
LIBS="-lgnutls -lhogweed -lnettle -lidn2 -lunistring -lpsl" \
./configure --enable-fuzzing -C
make clean
make -j$(nproc) -C lib
make -j$(nproc) -C src
Expand Down

0 comments on commit c44b98f

Please sign in to comment.