dch revised this gist . Go to revision
No changes
dch revised this gist . Go to revision
5 files changed, 159 insertions
amdbuild.sh(file created)
| @@ -0,0 +1,57 @@ | |||
| 1 | + | #!/bin/sh -eu | |
| 2 | + | export __MAKE_CONF=/dev/null | |
| 3 | + | ||
| 4 | + | umask 0022 | |
| 5 | + | COMMIT=g$(git rev-parse --verify --short=7 HEAD) | |
| 6 | + | NCPU=3.0 | |
| 7 | + | NOW=$(date -u +%Y%m%d-%H%M) | |
| 8 | + | QUIET=' -s' | |
| 9 | + | RELEASE=/usr/obj/usr/src/amd64.amd64/release | |
| 10 | + | REVISION=$(sh ./sys/conf/newvers.sh -V REVISION | egrep -o '1[0-9]+') | |
| 11 | + | ||
| 12 | + | chflags -R noschg ${RELEASE} || /usr/bin/true | |
| 13 | + | chown -R dch:wheel ${RELEASE} || /usr/bin/true | |
| 14 | + | rm -rf ${RELEASE} | |
| 15 | + | git reset --hard | |
| 16 | + | git clean -fdx | |
| 17 | + | ||
| 18 | + | doas zfs snapshot \ | |
| 19 | + | -r zroot/usr/src@${NOW}:bebuild-${COMMIT} \ | |
| 20 | + | || /usr/bin/true | |
| 21 | + | ||
| 22 | + | time make TARGET_ARCH=amd64 TARGET=amd64 -j${NCPU} buildworld ${QUIET} | |
| 23 | + | echo DONE BW | |
| 24 | + | date -u +%Y%m%d-%H%M | |
| 25 | + | ||
| 26 | + | time make TARGET_ARCH=amd64 TARGET=amd64 -j${NCPU} buildkernel ${QUIET} | |
| 27 | + | echo DONE BK | |
| 28 | + | date -u +%Y%m%d-%H%M | |
| 29 | + | ||
| 30 | + | PACKAGER="time make TARGET_ARCH=amd64 TARGET=amd64 -j${NCPU}" | |
| 31 | + | if [ -L /var/www/pkgbase/FreeBSD:${REVISION}:amd64/latest ]; then | |
| 32 | + | ${PACKAGER} update-packages ${QUIET} | |
| 33 | + | else | |
| 34 | + | ${PACKAGER} packages ${QUIET} | |
| 35 | + | fi | |
| 36 | + | ||
| 37 | + | echo DONE PKG | |
| 38 | + | date -u +%Y%m%d-%H%M | |
| 39 | + | ||
| 40 | + | doas ln -sf /var/www/pkgbase /usr/obj/usr/src | |
| 41 | + | (cd release && \ | |
| 42 | + | time make TARGET_ARCH=amd64 TARGET=amd64 WITH_OCIIMAGES=yes ${QUIET} oci-release) | |
| 43 | + | echo DONE OCI | |
| 44 | + | date -u +%Y%m%d-%H%M | |
| 45 | + | ||
| 46 | + | . /usr/local/etc/poudriere.d/hooks/config | |
| 47 | + | /usr/local/bin/s5cmd \ | |
| 48 | + | --endpoint-url ${S3_ENDPOINT_URL} \ | |
| 49 | + | --credentials-file ${S3_CREDENTIALS_FILE} \ | |
| 50 | + | --profile ${S3_PROFILE} \ | |
| 51 | + | sync --delete /var/www/pkgbase/FreeBSD:${REVISION}:amd64/latest/ \ | |
| 52 | + | s3://pkg/base/FreeBSD:${REVISION}:amd64/ | |
| 53 | + | ||
| 54 | + | date -u +%Y%m%d-%H%M | |
| 55 | + | curl -d amd64 https://ntfy.sh/skunkwerks | |
| 56 | + | date -u +%Y%m%d-%H%M | |
| 57 | + | echo DONE ALL | wall | |
armbuild.sh(file created)
| @@ -0,0 +1,58 @@ | |||
| 1 | + | #!/bin/sh -eu | |
| 2 | + | export __MAKE_CONF=/dev/null | |
| 3 | + | ||
| 4 | + | umask 0022 | |
| 5 | + | cd /usr/src | |
| 6 | + | COMMIT=g$(git rev-parse --verify --short=7 HEAD) | |
| 7 | + | NCPU=3.0 | |
| 8 | + | NOW=$(date -u +%Y%m%d-%H%M) | |
| 9 | + | QUIET=' -s' | |
| 10 | + | RELEASE=/usr/obj/usr/src/arm64.aarch64/release | |
| 11 | + | REVISION=$(sh ./sys/conf/newvers.sh -V REVISION | egrep -o '1[0-9]+') | |
| 12 | + | ||
| 13 | + | chflags -R noschg ${RELEASE} || /usr/bin/true | |
| 14 | + | chown -R dch:wheel ${RELEASE} || /usr/bin/true | |
| 15 | + | rm -rf ${RELEASE} | |
| 16 | + | git reset --hard | |
| 17 | + | git clean -fdx | |
| 18 | + | ||
| 19 | + | doas zfs snapshot \ | |
| 20 | + | -r zroot/usr/src@${NOW}:bebuild-${COMMIT} \ | |
| 21 | + | || /usr/bin/true | |
| 22 | + | ||
| 23 | + | time make TARGET_ARCH=aarch64 TARGET=arm64 -j${NCPU} buildworld ${QUIET} | |
| 24 | + | echo DONE BW | |
| 25 | + | date -u +%Y%m%d-%H%M | |
| 26 | + | ||
| 27 | + | time make TARGET_ARCH=aarch64 TARGET=arm64 -j${NCPU} buildkernel ${QUIET} | |
| 28 | + | echo DONE BK | |
| 29 | + | date -u +%Y%m%d-%H%M | |
| 30 | + | ||
| 31 | + | PACKAGER="time make TARGET_ARCH=aarch64 TARGET=arm64 -j${NCPU}" | |
| 32 | + | if [ -L /var/www/pkgbase/FreeBSD:${REVISION}:aarch64/latest ]; then | |
| 33 | + | ${PACKAGER} update-packages ${QUIET} | |
| 34 | + | else | |
| 35 | + | ${PACKAGER} packages ${QUIET} | |
| 36 | + | fi | |
| 37 | + | ||
| 38 | + | echo DONE PKG | |
| 39 | + | date -u +%Y%m%d-%H%M | |
| 40 | + | ||
| 41 | + | doas ln -sf /var/www/pkgbase /usr/obj/usr/src | |
| 42 | + | (cd release && \ | |
| 43 | + | time make TARGET_ARCH=aarch64 TARGET=arm64 WITH_OCIIMAGES=yes ${QUIET} oci-release) | |
| 44 | + | echo DONE OCI | |
| 45 | + | date -u +%Y%m%d-%H%M | |
| 46 | + | ||
| 47 | + | . /usr/local/etc/poudriere.d/hooks/config | |
| 48 | + | /usr/local/bin/s5cmd \ | |
| 49 | + | --endpoint-url ${S3_ENDPOINT_URL} \ | |
| 50 | + | --credentials-file ${S3_CREDENTIALS_FILE} \ | |
| 51 | + | --profile ${S3_PROFILE} \ | |
| 52 | + | sync --delete /var/www/pkgbase/FreeBSD:${REVISION}:aarch64/latest/ \ | |
| 53 | + | s3://pkg/base/FreeBSD:${REVISION}:aarch64/ | |
| 54 | + | ||
| 55 | + | date -u +%Y%m%d-%H%M | |
| 56 | + | curl -d arm64 https://ntfy.sh/skunkwerks | |
| 57 | + | date -u +%Y%m%d-%H%M | |
| 58 | + | echo DONE ALL | wall | |
make.conf(file created)
| @@ -0,0 +1,15 @@ | |||
| 1 | + | # /etc/make.conf | |
| 2 | + | # ansible managed /etc/make.conf /usr/local/etc/poudriere.d/make.conf | |
| 3 | + | BATCH=yes | |
| 4 | + | # DEVELOPER=yes | |
| 5 | + | PROXYDEPS_FATAL=yes | |
| 6 | + | KEEP_OLD_PACKAGES=yes | |
| 7 | + | USE_TMPFS=all | |
| 8 | + | CCACHE_DIR=/var/cache/ccache | |
| 9 | + | DISTDIR=/var/cache/distfiles | |
| 10 | + | DISTFILES_CACHE=/var/cache/distfiles | |
| 11 | + | # some ports require acceptance of licenses such as security/vault | |
| 12 | + | LICENSES_ACCEPTED+=APACHE20 BSD2CLAUSE BSD3CLAUSE CDDL EPL EUPL11 EUPL12 GPLv2+ LGPL2+ LGPLV3 MIT MPL MPL20 NONE Proprietary | |
| 13 | + | # warning | |
| 14 | + | # IGNORE_OSVERSION=yes | |
| 15 | + | WRKDIRPREFIX=/wrkdirs | |
src-env.conf(file created)
| @@ -0,0 +1,3 @@ | |||
| 1 | + | # /src/src-env.conf | |
| 2 | + | WITH_META_MODE=yes | |
| 3 | + | REPODIR=/var/www/pkgbase | |
src.conf(file created)
| @@ -0,0 +1,26 @@ | |||
| 1 | + | # /etc/src.conf | |
| 2 | + | # ccache | |
| 3 | + | WITH_CCACHE_BUILD=yes | |
| 4 | + | CCACHE_DIR=/var/cache/ccache | |
| 5 | + | # sensible stuff | |
| 6 | + | WITH_REPRODUCIBLE_BUILD=yes | |
| 7 | + | ||
| 8 | + | # high performance FreeBSD | |
| 9 | + | MALLOC_PRODUCTION=yes | |
| 10 | + | # KERNCONF=GENERIC GENERIC-NODEBUG | |
| 11 | + | KERNCONF=GENERIC | |
| 12 | + | # for ports only | |
| 13 | + | # https://lists.freebsd.org/archives/freebsd-hackers/2025-August/004859.html | |
| 14 | + | # WITHOUT_LLVM_ASSERTIONS=yes | |
| 15 | + | ||
| 16 | + | # KERNCONF=GENERIC | |
| 17 | + | # | |
| 18 | + | # skip re-re-rebuilding llvm each time | |
| 19 | + | # WITHOUT_CLANG_BOOTSTRAP=yes | |
| 20 | + | # WITHOUT_LLD_BOOTSTRAP=yes | |
| 21 | + | ||
| 22 | + | WITHOUT_LIB32=yes | |
| 23 | + | WITHOUT_LLVM_TARGET_MIPS=yes | |
| 24 | + | WITHOUT_LLVM_TARGET_POWERPC=yes | |
| 25 | + | WITHOUT_LLVM_TARGET_RISCV=yes | |
| 26 | + | WITHOUT_LLVM_TARGET_SPARC=yes | |