diff --git a/tools/make-assets.sh b/tools/make-assets.sh index 0826c37a07d..ba7ba7d81cf 100755 --- a/tools/make-assets.sh +++ b/tools/make-assets.sh @@ -38,5 +38,47 @@ export ARCHIVEDIR="${PWD}" # Set $VERSION to be a simulacrum of what is set in other build environments. export VERSION="${GO_VERSION}.$(date +%s)" -# Build Boulder and produce a .deb and a tar.gz file in $PWD. +# Build Boulder. +make + +# Produce a .deb and a tar.gz file in $PWD. make deb tar + +# Produce a .deb and .tar.gz in $PWD without using `make` or `fpm`. The +# resulting files will be named `boulder-newpkg-*`. Eventually this code +# will be used to produce the regular `boulder-*` packages. +BOULDER="${PWD}" +BUILD="$(mktemp -d)" +TARGET="${BUILD}/opt/boulder" + +COMMIT_ID="$(git rev-parse --short=8 HEAD)" + +mkdir -p "${TARGET}/bin" +for NAME in admin boulder ceremony ct-test-srv ; do + cp -a "bin/${NAME}" "${TARGET}/bin/" +done + +mkdir -p "${TARGET}/test" +cp -a "${BOULDER}/test/config/" "${TARGET}/test/config/" + +mkdir -p "${TARGET}/sa" +cp -a "${BOULDER}/sa/db/" "${TARGET}/sa/db/" + +cp -a "${BOULDER}/data/" "${TARGET}/data/" + +mkdir "${BUILD}/DEBIAN" +cat > "${BUILD}/DEBIAN/control" <<-EOF +Package: boulder +Version: 1:${VERSION} +License: Mozilla Public License v2.0 +Vendor: ISRG +Architecture: arm64 +Maintainer: Community +Section: default +Priority: extra +Homepage: https://github.com/letsencrypt/boulder +Description: Boulder is an ACME-compatible X.509 Certificate Authority +EOF + +dpkg-deb -Zgzip -b "${BUILD}" "${ARCHIVEDIR}/boulder-newpkg-${VERSION}-${COMMIT_ID}.x86_64.deb" +tar -C "${TARGET}" -cpzf "${ARCHIVEDIR}/boulder-newpkg-${VERSION}-${COMMIT_ID}.amd64.tar.gz" .