Skip to content

Instantly share code, notes, and snippets.

@directhex
Created August 16, 2019 19:21
Show Gist options
  • Save directhex/6c14ab20d43a8a6ceabb263c93538db5 to your computer and use it in GitHub Desktop.
Save directhex/6c14ab20d43a8a6ceabb263c93538db5 to your computer and use it in GitHub Desktop.
pkg install -y bash openjdk8 git gmake autoconf automake libtool cmake gettext libgdiplus unixODBC sqlite
mkdir -p /mnt/jenkins/pbuilder /mnt/scratch /mnt/jenkins/buildplace
chown builder /mnt/jenkins /mnt/jenkins/pbuilder /mnt/scratch
ln -s /usr/local/bin/bash /bin/bash
rm -f /bin/make && ln -s /usr/local/bin/gmake /bin/make
@rootwyrm
Copy link

rootwyrm commented Aug 17, 2019

## Critical supporting packages
pkg install -y bash git gmake autoconf automake cmake libtool python36 ca_root_nss
if [ $? -ne 0 ]; then
	echo "[FATAL] Error installing critical packages."
	exit 1
fi
## Supplemental packages
pkg install -y openjdk8 libgdiplus unixODBC sqlite3 xorgproto pango libinotify
if [ $? -ne 0 ]; then
	echo "[WARNING] Error installing supplemental packages."
	exit 1
fi

## Add support for ports mode
if [[ ${FREEBSD_PORTS} == 'true' ]]; then
	portsnap fetch > /dev/null 2&>1
	if [ $? -ne 0 ]; then
		echo "[FATAL] Failed in portsnap fetch"
		exit 1
	fi
	portsnap extract > /dev/null 2>&1
	if [ $? -ne 0 ]; then
		echo "[FATAL] Failed in portsnap extract"
		exit 1
	fi
	## XXX: Actual CI goes here
fi

## XXX: For testing against llvm90, incomplete at this time
if [[ ${LLVM90_TEST} == 'true' ]]; then
	pkg install -y llvm90
fi

## XXX: Should instead fix build to not look for /bin/bash
if [ ! -f /bin/bash ]; then
	ln -s /usr/local/bin/bash /bin/bash
fi

## XXX: Do NOT delete system make! Need a better fix here.
mv /bin/make /bin/bsdmake
ln -s /usr/local/bin/gmake /usr/local/bin/make

## Fix up some filesystem stuff
echo "fdesc /dev/fd fdescfs rw 0 0" >> /etc/fstab
echo "proc /proc procfs rw 0 0" >> /etc/fstab
if [ ! -d /compat/linux ]; then
    mkdir -p /compat/linux/proc
fi
echo "linprocfs /compat/linux/proc linprocfs rw 0 0" >> /etc/fstab
mount -a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment