Skip to content

Instantly share code, notes, and snippets.

@dch dch/bebuild.sh
Created Feb 24, 2018

Embed
What would you like to do?
#!/bin/sh -ex
# /root/bin/bebuild.sh
date -u +%Y%m%d-%H%M
sudo kldload filemon || /usr/bin/true
echo 'WITH_CCACHE_BUILD=yes' > /etc/src.conf
echo 'WITH_META_MODE=yes' > /etc/src-env.conf
# echo 'WITH_DIRDEPS_BUILD=yes' >> /etc/src-env.conf
NCPU=$(sysctl -n hw.ncpu)
cd /usr/src
sudo zfs rollback -rRf embiggen/usr/obj/release@empty
git reset --hard
git clean -fdx
sudo zfs snapshot \
-r envy/usr/src@$(date -u +%Y%m%d-%H%M:bebuild-$(git rev-parse --verify --short=7 HEAD)) \
|| /usr/bin/true
time make -j${NCPU} buildworld -s
echo DONE BW
date -u +%Y%m%d-%H%M
time make -j${NCPU} buildkernel -s
echo DONE BK
date -u +%Y%m%d-%H%M
sudo time /usr/bin/env NO_PKG_UPGRADE=1 /usr/src/tools/build/beinstall.sh
sudo zfs set canmount=noauto \
envy/ROOT/$(beadm list -H | egrep '\bN*R\b' | cut -f 1)
echo DONE BE
date -u +%Y%m%d-%H%M
cd /usr/src/release
time make -DNOPORTS -s memstick ftp cdrom
echo DONE IMG
echo y| poudriere jail -d -j current_amd64
poudriere jail -c -j current_amd64 -v 12.0-CURRENT -a amd64 -m \
tar=/usr/obj/usr/src/amd64.amd64/release/base.txz
echo DONE POUDRIERE
date -u +%Y%m%d-%H%M
echo DONE ALL
#!/bin/sh -ex
# /root/bin/benfs.sh
test -f /usr/src/README || mount build:/usr/src
test -d /usr/obj/usr/src || mount build:/usr/obj
test -f /usr/obj/usr/src/amd64.amd64/release/MANIFEST || mount build:/usr/obj/usr/src/amd64.amd64/release
test -f /usr/ports/README || mount build:/usr/ports
date -u +%Y%m%d-%H%M
kldload filemon || /usr/bin/true
echo 'WITH_CCACHE_BUILD=yes' > /etc/src.conf
echo 'WITH_META_MODE=yes' > /etc/src-env.conf
# echo 'WITH_DIRDEPS_BUILD=yes' >> /etc/src-env.conf
cd /usr/src
time /usr/bin/env /usr/src/tools/build/beinstall.sh | tee /var/log/benfs.log 2>&1
sudo zfs set canmount=noauto zroot/ROOT/`beadm list -H | egrep '\bN*R\b' | cut -f 1`
echo DONE BE
# fstab requirements for benfs.sh script
# wintermute
build:/usr/obj /usr/obj nfs ro,soft,intr,noatime,noauto 0 0
build:/usr/obj/usr/src/amd64.amd64/release /usr/obj/usr/src/amd64.amd64/release nfs ro,soft,intr,noatime,noauto 0 0
build:/usr/obj /usr/obj nfs ro,soft,intr,noatime,noauto 0 0
build:/usr/ports /usr/ports nfs ro,soft,intr,noatime,noauto 0 0
build:/usr/ports/distfiles /usr/ports/distfiles nfs ro,soft,intr,noatime,noauto 0 0
build:/usr/src /usr/src nfs ro,soft,intr,noatime,noauto 0 0
BATCH=yes
DEVELOPER=yes
PROXYDEPS_FATAL=yes
KEEP_OLD_PACKAGES=yes
USE_TMPFS=all
TMPFS_LIMIT=2
WRKDIRPREFIX=/tmp
CCACHE_DIR=/var/cache/ccache
# Erlang/OTP with DTrace
STRIP=
WITH_CTF=1
CFLAGS+=-fno-omit-frame-pointer
# OpenSSL avoidance
####### DEFAULT_VERSIONS+=ssl=libressl
OPTIONS_UNSET= GSSAPI_BASE
OPTIONS_SET= GSSAPI_MIT
# enable our custom ports category
VALID_CATEGORIES+=ideegeo
LICENSES_ACCEPTED+=MIT BSD3CLAUSE APACHE20 LGPLV3 BSD2CLAUSE MPL MPL20 NONE
# Enable Tahoma in x11-fonts/webfonts if you have a Windows license
.if ${.CURDIR:M*/x11-fonts/webfonts}
WITH_MSWINDOWS_LICENSE=yes
.endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.