Merge pull request 'renamed zcutil to util' (#199) from jahway603/hush3:dev into dev

Reviewed-on: https://git.hush.is/hush/hush3/pulls/199
This commit is contained in:
Duke Leto
2022-09-19 00:55:57 +00:00
21 changed files with 38 additions and 38 deletions

View File

@@ -84,7 +84,7 @@ to generate new unix man pages for that version :
After successfully compiling Hush, you can generate a debian package of these binaries with:
./zcutil/build-debian-package.sh
./util/build-debian-package.sh
This command will not work on Mac OS X. Currently you cannot generate a Debian package
from operating systems other than Linux. Oh well.

View File

@@ -26,7 +26,7 @@ RUN ln -sf /hush/src/hushd /usr/bin/hushd && \
ln -sf /hush/src/hush-tx /usr/bin/hush-tx && \
ln -sf /hush/src/wallet-utility /usr/bin/hush-wallet-utility && \
ln -sf /hush/src/hush-smart-chain /usr/bin/hush-smart-chain && \
ln -sf /hush/zcutil/docker-entrypoint.sh /usr/bin/entrypoint && \
ln -sf /hush/zcutil/docker-hush-cli.sh /usr/bin/hush-cli
ln -sf /hush/util/docker-entrypoint.sh /usr/bin/entrypoint && \
ln -sf /hush/util/docker-hush-cli.sh /usr/bin/hush-cli
CMD ["entrypoint"]

View File

@@ -233,7 +233,7 @@ endif
endif
dist_bin_SCRIPTS =
dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh
dist_noinst_SCRIPTS = autogen.sh util/build-debian-package.sh util/build.sh
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/hush $(DIST_DOCS) $(BIN_CHECKS)

View File

@@ -4,4 +4,4 @@
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
set -eu -o pipefail
./zcutil/build.sh --disable-tests $@
./util/build.sh --disable-tests $@

22
util/afl/afl-build.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Copyright (c) 2016-2021 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
# A wrapper around ./util/build.sh for instrumenting the build with AFL:
# ./util/afl/afl-build.sh <directory where AFL is installed> <fuzz case>
# You may obtain a copy of AFL using ./util/afl/afl-get.sh.
set -eu -o pipefail
export AFL_INSTALL_DIR=$(realpath "$1")
FUZZ_CASE="$2"
shift 2
export AFL_LOG_DIR="$(pwd)"
export UTIL=$(realpath "./util")
cp "./src/fuzzing/$FUZZ_CASE/fuzz.cpp" src/fuzz.cpp
CONFIGURE_FLAGS="--enable-tests=no --enable-fuzz-main" "$UTIL/build.sh" "CC=$UTIL/afl/hush-wrapper-gcc" "CXX=$UTIL/afl/hush-wrapper-g++" AFL_HARDEN=1 "$@"
echo "You can now run AFL as follows:"
echo "$ ./util/afl/afl-run.sh '$AFL_INSTALL_DIR' '$FUZZ_CASE'"

View File

@@ -3,7 +3,7 @@
# Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
# Obtains and builds a copy of AFL from source.
# ./zcutil/afl/afl-get.sh <directory to build and install AFL in>
# ./util/afl/afl-get.sh <directory to build and install AFL in>
set -eu -o pipefail
@@ -32,5 +32,5 @@ make
echo "You can now build hushd with AFL instrumentation as follows:"
echo "$ make clean # if you've already built hushd without AFL instrumentation"
echo "$ ./zcutil/afl/afl-build.sh '$(pwd)' <fuzz case> -j\$(nproc)"
echo "$ ./util/afl/afl-build.sh '$(pwd)' <fuzz case> -j\$(nproc)"
echo "...where <fuzz case> is the name of a directory in src/fuzzing."

View File

@@ -16,8 +16,8 @@ export AFL_INSTALL_DIR=$(realpath "./afl-temp")
if [ ! -d "$AFL_INSTALL_DIR" ]; then
mkdir "$AFL_INSTALL_DIR"
./zcutil/afl/afl-get.sh "$AFL_INSTALL_DIR"
./util/afl/afl-get.sh "$AFL_INSTALL_DIR"
fi
./zcutil/afl/afl-build.sh "$AFL_INSTALL_DIR" "$FUZZ_CASE" -j$(nproc)
./zcutil/afl/afl-run.sh "$AFL_INSTALL_DIR" "$FUZZ_CASE" "$@"
./util/afl/afl-build.sh "$AFL_INSTALL_DIR" "$FUZZ_CASE" -j$(nproc)
./util/afl/afl-run.sh "$AFL_INSTALL_DIR" "$FUZZ_CASE" "$@"

View File

@@ -22,7 +22,7 @@ EOF
if [ "x$*" = 'x--help' ]
then
cat ./zcutil/dragon.txt
cat ./util/dragon.txt
cat <<EOF
Welcome To The Hush Build System, Here Be Dragons!
Usage:

View File

@@ -4,7 +4,7 @@
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
#
# Remix for SBC (Single Board Computer) like PineBook, Rock64, Raspberry Pi, etc.
## Usage: ./zcutil/build-debian-package-ARM.sh
## Usage: ./util/build-debian-package-ARM.sh
# Pre-requisite checks
# Check if lintian is installed and exit if it is not

View File

@@ -2,7 +2,7 @@
# Copyright (c) 2016-2021 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
## Usage: ./zcutil/build-debian-package.sh
## Usage: ./util/build-debian-package.sh
echo "Let There Be Hush Debian Packages"

View File

@@ -40,13 +40,13 @@ gprefix READLINK readlink
cd "$(dirname "$("$READLINK" -f "$0")")/.."
# Allow user overrides to $MAKE. Typical usage for users who need it:
# MAKE=gmake ./zcutil/build.sh -j$(nproc)
# MAKE=gmake ./util/build.sh -j$(nproc)
if [[ -z "${MAKE-}" ]]; then
MAKE=make
fi
# Allow overrides to $BUILD and $HOST for porters. Most users will not need it.
# BUILD=i686-pc-linux-gnu ./zcutil/build.sh
# BUILD=i686-pc-linux-gnu ./util/build.sh
if [[ -z "${BUILD-}" ]]; then
BUILD="$(./depends/config.guess)"
fi
@@ -61,7 +61,7 @@ fi
if [ "x$*" = 'x--help' ]
then
cat ./zcutil/dragon.txt
cat ./util/dragon.txt
cat <<EOF
Welcome To The Hush Build System, Here Be Dragons!
Usage:

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2016-2021 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
# A wrapper around ./zcutil/build.sh for instrumenting the build with AFL:
# ./zcutil/afl/afl-build.sh <directory where AFL is installed> <fuzz case>
# You may obtain a copy of AFL using ./zcutil/afl/afl-get.sh.
set -eu -o pipefail
export AFL_INSTALL_DIR=$(realpath "$1")
FUZZ_CASE="$2"
shift 2
export AFL_LOG_DIR="$(pwd)"
export ZCUTIL=$(realpath "./zcutil")
cp "./src/fuzzing/$FUZZ_CASE/fuzz.cpp" src/fuzz.cpp
CONFIGURE_FLAGS="--enable-tests=no --enable-fuzz-main" "$ZCUTIL/build.sh" "CC=$ZCUTIL/afl/hush-wrapper-gcc" "CXX=$ZCUTIL/afl/hush-wrapper-g++" AFL_HARDEN=1 "$@"
echo "You can now run AFL as follows:"
echo "$ ./zcutil/afl/afl-run.sh '$AFL_INSTALL_DIR' '$FUZZ_CASE'"