Skip to content

Commit

Permalink
ci: build packages without fpm (#7915)
Browse files Browse the repository at this point in the history
For now, run alongside the `fpm` build and create `boulder-newpkg-*`
packages. If these packages work, we'll eliminate the `fpm` build.
  • Loading branch information
jsha authored Jan 7, 2025
1 parent 9b3c882 commit cefa709
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion tools/make-assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,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" .

0 comments on commit cefa709

Please sign in to comment.