Skip to content

Commit

Permalink
bump to v7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed Jan 9, 2025
1 parent 58d0060 commit 5b2024f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.clang
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ENV DEBIAN_FRONTEND noninteractive
ENV TERM xterm

ARG ZEEK_DIST=Debian_12
ARG ZEEK_BRANCH=v7.0.5
ARG ZEEK_BRANCH=v7.1.0
ARG ZEEK_RELEASE_NUM=0
ARG ZEEK_RC=0
ARG ZEEK_DBG=0
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ENV DEBIAN_FRONTEND noninteractive
ENV TERM xterm

ARG ZEEK_DIST=Debian_12
ARG ZEEK_BRANCH=v7.0.5
ARG ZEEK_BRANCH=v7.1.0
ARG ZEEK_RELEASE_NUM=0
ARG ZEEK_RC=0
ARG ZEEK_DBG=0
Expand Down
52 changes: 36 additions & 16 deletions zeek-deb-download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ unset VERBOSE
command -v dpkg >/dev/null 2>&1 && ARCH="$(dpkg --print-architecture)" || ARCH=amd64
DISTRO=Debian_12
OUTPUT_DIR=/tmp
ZEEK_VERSION=7.0.5-0
ZEEK_VERSION=7.1.0-0
PRESERVE_HIERARCHY=false
ZEEK_DEB_ALTERNATE_DOWNLOAD_URL=${ZEEK_DEB_ALTERNATE_DOWNLOAD_URL:-}
ZEEK_DEB_ALTERNATE_DOWNLOAD_URL_FILE=${ZEEK_DEB_ALTERNATE_DOWNLOAD_URL_FILE:-}

while getopts a:d:o:vz: opts; do
while getopts a:d:f:ho:u:vz: opts; do
case ${opts} in
a) ARCH=${OPTARG} ;;
d) DISTRO=${OPTARG} ;;
f) ZEEK_DEB_ALTERNATE_DOWNLOAD_URL_FILE=${OPTARG} ;;
h) PRESERVE_HIERARCHY=true ;;
o) OUTPUT_DIR=${OPTARG} ;;
u) ZEEK_DEB_ALTERNATE_DOWNLOAD_URL=${OPTARG} ;;
v) VERBOSE=1 ;;
z) ZEEK_VERSION=${OPTARG} ;;
esac
Expand All @@ -21,23 +27,37 @@ if [[ -n $VERBOSE ]]; then
set -x
fi

URL_PREFIX="https://downloadcontentcdn.opensuse.org/repositories/security:/zeek/${DISTRO}"
URLS=(
"${URL_PREFIX}/${ARCH}/libbroker-dev_${ZEEK_VERSION}_${ARCH}.deb"
"${URL_PREFIX}/${ARCH}/zeek-core-dev_${ZEEK_VERSION}_${ARCH}.deb"
"${URL_PREFIX}/${ARCH}/zeek-core_${ZEEK_VERSION}_${ARCH}.deb"
"${URL_PREFIX}/${ARCH}/zeek-spicy-dev_${ZEEK_VERSION}_${ARCH}.deb"
"${URL_PREFIX}/${ARCH}/zeek_${ZEEK_VERSION}_${ARCH}.deb"
"${URL_PREFIX}/${ARCH}/zeekctl_${ZEEK_VERSION}_${ARCH}.deb"
"${URL_PREFIX}/all/zeek-client_${ZEEK_VERSION}_all.deb"
"${URL_PREFIX}/all/zeek-zkg_${ZEEK_VERSION}_all.deb"
"${URL_PREFIX}/all/zeek-btest_${ZEEK_VERSION}_all.deb"
"${URL_PREFIX}/all/zeek-btest-data_${ZEEK_VERSION}_all.deb"
if [[ -z "${ZEEK_DEB_ALTERNATE_DOWNLOAD_URL}" ]] && [[ -f "${ZEEK_DEB_ALTERNATE_DOWNLOAD_URL_FILE}" ]]; then
ZEEK_DEB_ALTERNATE_DOWNLOAD_URL="$(head -n 1 "${ZEEK_DEB_ALTERNATE_DOWNLOAD_URL_FILE}")"
fi

URL_PREFIXES=(
"https://downloadcontentcdn.opensuse.org/repositories/security:/zeek"
)
[[ -n "$ZEEK_DEB_ALTERNATE_DOWNLOAD_URL" ]] && URL_PREFIXES+=( "$ZEEK_DEB_ALTERNATE_DOWNLOAD_URL" )

URL_SUFFIXES=(
"${DISTRO}/${ARCH}/libbroker-dev_${ZEEK_VERSION}_${ARCH}.deb"
"${DISTRO}/${ARCH}/zeek-core-dev_${ZEEK_VERSION}_${ARCH}.deb"
"${DISTRO}/${ARCH}/zeek-core_${ZEEK_VERSION}_${ARCH}.deb"
"${DISTRO}/${ARCH}/zeek-spicy-dev_${ZEEK_VERSION}_${ARCH}.deb"
"${DISTRO}/${ARCH}/zeek_${ZEEK_VERSION}_${ARCH}.deb"
"${DISTRO}/${ARCH}/zeekctl_${ZEEK_VERSION}_${ARCH}.deb"
"${DISTRO}/all/zeek-client_${ZEEK_VERSION}_all.deb"
"${DISTRO}/all/zeek-zkg_${ZEEK_VERSION}_all.deb"
"${DISTRO}/all/zeek-btest_${ZEEK_VERSION}_all.deb"
"${DISTRO}/all/zeek-btest-data_${ZEEK_VERSION}_all.deb"
)

pushd "$OUTPUT_DIR" >/dev/null 2>&1
for URL in ${URLS[@]}; do
curl -fsSL -O -J "${URL}"
for URL_SUFFIX in ${URL_SUFFIXES[@]}; do
[[ "$PRESERVE_HIERARCHY" == "true" ]] && OUTPUT_DIR_REL="$(dirname "$URL_SUFFIX")" || OUTPUT_DIR_REL=.
mkdir -p "$OUTPUT_DIR_REL"
pushd "$OUTPUT_DIR_REL" >/dev/null 2>&1
for URL_PREFIX in ${URL_PREFIXES[@]}; do
curl -fsSL -O -J "${URL_PREFIX%/}/${URL_SUFFIX}" && break
done
popd >/dev/null 2>&1
done
popd >/dev/null 2>&1

Expand Down

0 comments on commit 5b2024f

Please sign in to comment.