Skip to content

Instantly share code, notes, and snippets.

@dch
Created June 20, 2025 19:18
Show Gist options
  • Save dch/463c31f1c49d44abd0e7bb3445d981d8 to your computer and use it in GitHub Desktop.
Save dch/463c31f1c49d44abd0e7bb3445d981d8 to your computer and use it in GitHub Desktop.
building 14.3-RELEASE packages on 14.3-RELEASE
#!/bin/sh -eu
export __MAKE_CONF=/dev/null
umask 0022
cd /usr/src
NOW=$(date -u +%Y%m%d-%H%M)
NCPU=8
COMMIT=g$(git rev-parse --verify --short=7 HEAD)
RELEASE=/usr/obj/usr/src/amd64.amd64/release
chflags -R noschg ${RELEASE} || /usr/bin/true
chown -R dch:wheel ${RELEASE} || /usr/bin/true
rm -rf ${RELEASE}
git reset --hard
git clean -fdx
doas zfs snapshot \
-r envy/usr/src@${NOW}:bebuild-${COMMIT} \
|| /usr/bin/true
time make TARGET_ARCH=amd64 TARGET=amd64 -j${NCPU} buildworld -s
echo DONE BW
date -u +%Y%m%d-%H%M
curl -d WORLD https://ntfy.sh/skunkwerks
time make TARGET_ARCH=amd64 TARGET=amd64 -j${NCPU} buildkernel -s
echo DONE BK
date -u +%Y%m%d-%H%M
curl -d KERN https://ntfy.sh/skunkwerks
time make TARGET_ARCH=amd64 TARGET=amd64 -j${NCPU} packages
echo DONE PKG
date -u +%Y%m%d-%H%M
curl -d PKG https://ntfy.sh/skunkwerks
#. /usr/local/etc/poudriere.d/hooks/config
#/usr/local/bin/s5cmd \
# --endpoint-url ${S3_ENDPOINT_URL} \
# --credentials-file ${S3_CREDENTIALS_FILE} \
# --profile ${S3_PROFILE} \
# sync --delete /var/www/pkgbase/FreeBSD:15:amd64/latest/ \
# s3://pkg/base/FreeBSD:15:amd64/latest/
date -u +%Y%m%d-%H%M
curl -d neuromancer https://ntfy.sh/skunkwerks
date -u +%Y%m%d-%H%M
echo DONE ALL | wall
# ansible managed /etc/make.conf /usr/local/etc/poudriere.d/make.conf
BATCH=yes
# DEVELOPER=yes
PROXYDEPS_FATAL=yes
KEEP_OLD_PACKAGES=yes
USE_TMPFS=all
CCACHE_DIR=/var/cache/ccache
DISTDIR=/var/cache/distfiles
DISTFILES_CACHE=/var/cache/distfiles
# some ports require acceptance of licenses such as security/vault
LICENSES_ACCEPTED+=APACHE20 BSD2CLAUSE BSD3CLAUSE CDDL EPL EUPL11 EUPL12 GPLv2+ LGPL2+ LGPLV3 MIT MPL MPL20 NONE
# warning
# IGNORE_OSVERSION=yes
# WRKDIRPREFIX=/tmp
WITH_META_MODE=yes
#REPODIR=/var/www/pkgbase
# ccache
WITH_CCACHE_BUILD=yes
CCACHE_DIR=/var/cache/ccache
# sensible stuff
WITH_REPRODUCIBLE_BUILD=yes
# high performance FreeBSD
MALLOC_PRODUCTION=yes
# KERNCONF=GENERIC-NODEBUG
# KERNCONF=GENERIC
#
# skip re-re-rebuilding llvm each time
# WITHOUT_CLANG_BOOTSTRAP=yes
# WITHOUT_LLD_BOOTSTRAP=yes
WITHOUT_LIB32=yes
WITHOUT_LLVM_TARGET_MIPS=yes
WITHOUT_LLVM_TARGET_POWERPC=yes
WITHOUT_LLVM_TARGET_RISCV=yes
WITHOUT_LLVM_TARGET_SPARC=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment