Skip to content

Instantly share code, notes, and snippets.

@density215
Last active August 29, 2015 14:27
Show Gist options
  • Save density215/a3dc102391cfff33fd0d to your computer and use it in GitHub Desktop.
Save density215/a3dc102391cfff33fd0d to your computer and use it in GitHub Desktop.
Build samba4 with zfsacl module from blackdot repo in base-64-lts zone
#!/bin/sh
# get and install joyent pkgsrc repo
mkdir -p /content/{distfiles,packages}
cd /content
git clone git://github.com/joyent/pkgsrc.git
cd pkgsrc
git checkout joyent/release/2014Q4
# edit mk.conf
echo "DISTDIR= /content/distfiles" >> /opt/local/etc/mk.conf
echo "PACKAGES= /content/packages" >> /opt/local/etc/mk.conf
echo "WRKOBJDIR= /var/tmp/pkgsrc-build" >> /opt/local/etc/mk.conf
echo "ALLOW_VULNERABLE_PACKAGES= yes" >> /opt/local/etc/mk.conf
echo "SKIP_LICENSE_CHECK= yes" >> /opt/local/etc/mk.conf
echo "MAKE_JOBS= 8" >> /opt/local/etc/mk.conf
echo "FETCH_USING= curl" >> /opt/local/etc/mk.conf
echo "BINPKG_SITES= http://pkgsrc.joyent.com/packages/SmartOS/2014Q4/x86_64/" >> /opt/local/etc/mk.conf
echo "DEPENDS_TARGET= bin-install" >> /opt/local/etc/mk.conf
# get and install blackdot repo over joyent pkgsrc repo
wget http://pkg.blackdot.be/pbd-signature.key
gpg --no-default-keyring --keyring /opt/local/etc/gnupg/pkgsrc.gpg --import pbd-signature.key
PKG_VER=`$(awk -F/ '/SmartOS/ { print $6 }' /opt/local/etc/pkgin/repositories.conf)`
PKG_ARCH=`$(awk -F/ '/SmartOS/ { print $7 }' /opt/local/etc/pkgin/repositories.conf)`
echo "http://pkg.blackdot.be/packages/${PKG_VER}/${PKG_ARCH}/All" >> /opt/local/etc/pkgin/repositories.conf
pkgin -fy up
cd /content/pkgsrc
git clone https://github.com/sjorge/pkgsrc-blackdot
# and build samba4
cd /content/pkgsrc/pksrc-blackdot
bmake install 2>&1 | tee /var/tmp/samb4_with_zfs.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment