Created
December 2, 2012 09:06
-
-
Save matsimon/4187828 to your computer and use it in GitHub Desktop.
Set up and maintain a clean pfSense build environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For those who are not so savy with Jails but do have possibility to run a full VM | |
# Install a default system | |
# - No ports -> We'll use portsnap later anyway | |
# - No packages -> The instructions are requiring fresh ports | |
# | |
# Based on: http://devwiki.pfsense.org/DevelopersBootStrapAndDevIso | |
# Edit /etc/ssh/sshd_config | |
# -> PermitRootLogin = yes | |
/etc/rc.d/sshd restart | |
# No you can SSH into the VM as root (locally this is ok) | |
# And copy-paste ... | |
# Update our system and the ports tree | |
freebsd-update fetch install | |
portsnap fetch extract | |
# Start to set up the build env... | |
echo "WITHOUT_X11=yo" >> /etc/make.conf | |
echo "BATCH=yo" >> /etc/make.conf | |
mkdir -p /home/pfsense/pfSenseGITREPO /usr/pfSensesrc | |
# We can use portmaster, but not yet pkgng | |
# as the build tools of pfsense rely on the old pkg. | |
cd /usr/ports/ports-mgmt/portmaster | |
make depends install | |
rehash | |
# Now we can use portmaster which is | |
# more pleasant to use thant plain ports | |
portmaster textproc/expat2 | |
portmaster devel/git | |
portmaster devel/subversion | |
portmaster sysutils/fastest_cvsup | |
# For those like me who are not that much of vi-ists: | |
portmaster editors/nano | |
rehash | |
# If installed... | |
# Don't need this to be installed, has dependencies if | |
# portmaster wants to update it. | |
# pkg_delete en-freebsd-doc | |
# Time to get the pfSense as required to the guide: | |
cd /home/pfsense && git clone git://github.com/bsdperimeter/pfsense-tools.git tools | |
cd /home/pfsense && git clone https://github.com/sullrich/pfSense-freesbie2.git freesbie2 | |
cd /home/pfsense/tools/builder_scripts && chmod a+rx *.sh | |
# Get the source of our current RELENG branch, but don't use csup, it's deprecated | |
# We use the github mirror, since using SVN from ports might get broken since we will | |
# overwrite sqlite3 (SVN depends on sqlite3 port) | |
cd /usr && git clone git://github.com/freebsd/freebsd.git src | |
cd /usr/src && git checkout -b releng/8.3 origin/releng/8.3 | |
# Now save your environment before it gets "messed up" / contains overlayed ports | |
--- | |
# To update the clean environment | |
freebsd-update fetch install | |
portsnap fetch update | |
portmaster -a | |
cd /usr/src && git fetch | |
cd /usr/src && git merge origin/releng/8.3 | |
cd /home/pfsense/tools && git fetch | |
cd /home/pfsense/tools && git merge origin/master | |
cd /home/pfsense/freesbie2 && git fetch | |
cd /home/pfsense/freesbie2 && git merge origin/master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment