2014-12-19 14:13:30 -05:00
|
|
|
#####################################################
|
|
|
|
## BUILD.CONF SAMPLE FILE ##
|
|
|
|
#####################################################
|
|
|
|
#
|
|
|
|
# This file is used to define various variables/settings used by the build script.
|
|
|
|
#
|
|
|
|
|
|
|
|
# This should be an alpha-numeric string less than 8 characters. No spaces, etc.
|
|
|
|
# Used for metainfo
|
|
|
|
DISTNAME="BDISK"
|
|
|
|
|
|
|
|
# This should be the lowercase format of ${DISTNAME} but it can be different.
|
|
|
|
# Used for filenames etc. so no spaces
|
|
|
|
UXNAME="bdisk"
|
|
|
|
|
|
|
|
# Used for "pretty-formatted" version of the project. It can contain spaces etc.
|
|
|
|
PNAME="BDisk"
|
|
|
|
|
|
|
|
# Your/your organization's name
|
|
|
|
DISTPUB="r00t^2"
|
|
|
|
|
|
|
|
# What's this distro used for?
|
|
|
|
DISTDESC="j00 got 0wnz0r3d lulz."
|
|
|
|
|
|
|
|
# This should be the directory of the root of the project, e.g. the git's project/working directory.
|
|
|
|
# This can be left as-is as long as you're running everything from the project directory root.
|
|
|
|
BASEDIR="$(pwd)"
|
|
|
|
|
|
|
|
# This is the output directory of the ISO files when done building. This also should not be checked into git.
|
|
|
|
ISODIR="${BASEDIR}/iso"
|
|
|
|
|
|
|
|
# Where source code is kept.
|
2015-06-27 21:07:24 -04:00
|
|
|
SRCDIR="${BASEDIR}/extrasrc"
|
2014-12-19 14:13:30 -05:00
|
|
|
|
|
|
|
# Where we mount for chroots etc.
|
|
|
|
MOUNTPT="/mnt/${UXNAME}"
|
|
|
|
|
|
|
|
# This is where an http webroot can be specified. Very useful for PXE setups
|
|
|
|
# (the resulting kernel/initrd can be set to boot from HTTP initiated by PXE).
|
|
|
|
# These files will be generated whether you use them or not, so it's recommended to keep this a sane path.
|
|
|
|
HTTPDIR="${BASEDIR}/http"
|
|
|
|
|
|
|
|
# This is the root for where tftp files should be put for PXE booting.
|
|
|
|
TFTPDIR="${BASEDIR}/tftpboot"
|
|
|
|
|
|
|
|
# This is the user and group your web daemon will use. The webroot is automatically chowned.
|
|
|
|
HTTPUSR="http"
|
|
|
|
HTTPGRP="http"
|
|
|
|
|
|
|
|
# This is the user and group that your tftp files should be chowned as.
|
|
|
|
TFTPUSR="root"
|
|
|
|
TFTPGRP="root"
|
|
|
|
|
|
|
|
# If set to "no", build separate ISOs for different hardware structures.
|
|
|
|
# E.g. a separate i686 and x86_64 ISO. Note that it's TOTALLY supported to
|
|
|
|
# build a dual-architecture ISO (and is the default), it's just that it tends to be over 700MB
|
|
|
|
# (and thus doesn't fit on a normal CD. Still fits on DVDs and USBs though!)
|
|
|
|
MULTIARCH="yes"
|
|
|
|
|
2015-07-01 04:00:34 -04:00
|
|
|
# If you would like to build an iPXE-enabled *mini* ISO *in addition to* the ful ISO,
|
|
|
|
# set this to "yes". Otherwise, just build the full ISO.
|
|
|
|
BUILDMINI="no"
|
|
|
|
|
2014-12-19 14:13:30 -05:00
|
|
|
# set to "yes" to enable pushing new changes to a git repo/committing to a local repo
|
|
|
|
GIT="no"
|
|
|
|
|
|
|
|
# If this is set, use rsync to copy the http and iso files. This is the rsync destination host.
|
|
|
|
# This is *great* for iPXE.
|
|
|
|
RSYNC_HOST=""
|
|
|
|
|
|
|
|
# Only used if RSYNC_HOST is set. The destination directory on the destination host to copy files to.
|
|
|
|
RSYNC_DEST="${BASEDIR}"
|
|
|
|
|
|
|
|
# Where the log should go, and how it should be prefixed.
|
|
|
|
# Note that the code appends, rather than replaces, logs- hence the timestamp in EPOCH time format.
|
|
|
|
LOGFILE="${BASEDIR}/logs/$(date +%s)"
|
|
|
|
|
2015-01-12 20:27:41 -05:00
|
|
|
# What should the regular username be? (Can be automatically logged in on boot; see below)
|
2014-12-19 14:13:30 -05:00
|
|
|
REGUSR="${UXNAME}"
|
|
|
|
|
2014-12-22 15:29:52 -05:00
|
|
|
# Should the REGUSR have a password? IF THIS IS NOT SET, PASSWORD LOGIN WILL BE DISABLED!
|
|
|
|
# If you wish to have a blank password, use the string '{[BLANK]}'.
|
|
|
|
# You MUST USE SINGLE-QUOTES, OR ESCAPE SHELL-EXPANDED CHARACTERS (e.g. $,*,etc.)
|
2014-12-21 11:41:49 -05:00
|
|
|
# Do NOT use a plaintext password here. You will need to generate a salted and hashed string
|
|
|
|
# in a shadow-compatible format.
|
|
|
|
# Debian can do this with the mkpasswd utility (it's in Arch's AUR as debian-whois-mkpasswd):
|
|
|
|
# mkpasswd --method=sha-512 --salt=aBcDeFgHiJ PASSWORD
|
|
|
|
# (If a salt is not provided, one will be automatically generated. That is is the suggested method.)
|
|
|
|
# Or perl:
|
|
|
|
# perl -e 'print crypt("PASSWORD","\$6\$aBcDeFgHiJ\$") . "\n"'
|
|
|
|
# Or python:
|
|
|
|
# python -c "import crypt, getpass, pwd; print crypt.crypt('PASSWORD', '\$6\$aBcDeFgHiJ\$')"
|
|
|
|
# Or grub-crypt, even:
|
|
|
|
# /sbin/grub-crypt --sha-512
|
|
|
|
# The end-product should look something like this:
|
|
|
|
# $6$aBcDeFgHiJ$Yh342vFH7MOjPNu9InFymD1Dd42i5cFsr1cTWdpKGNIkbRGR/ZKQDRPJ1ZeeGb7y894Tfh3iWZIJKu3phlsqQ1
|
2014-12-22 15:29:52 -05:00
|
|
|
#
|
|
|
|
# Note that if you want an automatic login, this is *not* where it would be set.
|
|
|
|
# It should instead be controlled via overlay/etc/systemd/system/getty@ttyN.service.d/autologin.conf
|
|
|
|
# In the following format:
|
|
|
|
# [Service]
|
|
|
|
# Type=idle
|
|
|
|
# ExecStart=
|
|
|
|
# ExecStart=-/usr/bin/agetty --autologin <USERNAME> --noclear %I 38400 linux
|
|
|
|
# (where N is the TTY number). Alternatively, if booting to a GUI, it can be set as according
|
|
|
|
# to that GUI (e.g. for LXDE, overlay/etc/lxdm/lxdm.conf, "autologin=<USERNAME>")
|
|
|
|
REGUSR_PASS=''
|
|
|
|
|
|
|
|
# Same exact thing as REGUSR_PASS, but for the root password (i.e. if no password hash is
|
|
|
|
# specified, password login will be disabled, etc.).
|
|
|
|
ROOT_PASS=''
|
2014-12-21 11:41:49 -05:00
|
|
|
|
2014-12-19 14:13:30 -05:00
|
|
|
# Do we have enough horsepower on the build system to jack up the resources we throw at building?
|
|
|
|
# Enabling this will give absolute CPU preference to building the kernels and do make-time
|
|
|
|
# enhancements/optimizations (i.e. use the maximum number of CPU cores detected).
|
|
|
|
# I wouldn't enable this unless you have a dedicated build-box that isn't running much else.
|
|
|
|
I_AM_A_RACECAR="no"
|
|
|
|
|
|
|
|
|
|
|
|
# ________________________________________________________________________________________________
|
|
|
|
## RECOMMENDED DEFALTS ##
|
|
|
|
# The following shoult not be changed unless you are ABSOLUTELY, 100% SURE and COMPLETELY POSITIVE
|
|
|
|
# about what you are doing!!!
|
|
|
|
|
|
|
|
# Legacy support.
|
|
|
|
ROOTDIR="${BASEDIR}"
|
|
|
|
|
|
|
|
# This used to be defined statically (e.g. CHROOTDIR="${ROOTDIR}/chroot"),
|
|
|
|
# but is now dynamically appended. Please don't alter this unless you renamed the chroot directory paths.
|
|
|
|
CHROOTDIR="${BASEDIR}/"
|
|
|
|
CHROOTDIR32="${CHROOTDIR}root.i686"
|
|
|
|
CHROOTDIR64="${CHROOTDIR}root.x86_64"
|
|
|
|
|
|
|
|
# This is a directory we use for staging. It definitely should not be checked into git.
|
|
|
|
# It used to be defined statically (e.g. BUILDDIR="${ROOTDIR}/build"),
|
|
|
|
# but is now dynamically appended. Please don't alter this unless you renamed the chroot directory paths.
|
|
|
|
BUILDDIR="${BASEDIR}/build"
|
|
|
|
|
|
|
|
# More staging.
|
|
|
|
TEMPDIR="${ROOTDIR}/temp"
|
|
|
|
|
|
|
|
# This is where we stage the boot files.
|
|
|
|
ARCHBOOT="${TEMPDIR}/${DISTNAME}"
|
|
|
|
|
|
|
|
# Lockfile for checking for concurrent/failed builds
|
|
|
|
LOCKFILE="${ROOTDIR}/lockfile.lck"
|
|
|
|
|
|
|
|
|
|
|
|
## VARIABLE PROCESSING ##
|
|
|
|
# In order to make cleaner code, we need to make sure we can standardize some input.
|
|
|
|
# Don't even think about touching these unless you know what you're doing.
|
|
|
|
|
|
|
|
# MULTIARCH
|
|
|
|
if [ -z "${MULTIARCH}" ];
|
|
|
|
then
|
|
|
|
MULTIARCH="y"
|
|
|
|
fi
|
|
|
|
MULTIARCH=${MULTIARCH:0:1}
|
|
|
|
MULTIARCH=$(echo ${MULTIARCH} | tr [[:upper:]] [[:lower:]])
|
|
|
|
|
|
|
|
# OPTIMIZATIONS?
|
|
|
|
if [ -z "${I_AM_A_RACECAR}" ];
|
|
|
|
then
|
|
|
|
I_AM_A_RACECAR="n"
|
|
|
|
fi
|
|
|
|
I_AM_A_RACECAR=${I_AM_A_RACECAR:0:1}
|
|
|
|
I_AM_A_RACECAR=$(echo ${I_AM_A_RACECAR} | tr [[:upper:]] [[:lower:]])
|
2015-07-01 04:00:34 -04:00
|
|
|
|
|
|
|
# BUILD MINI?
|
|
|
|
if [ -z "${BUILDMINI}" ];
|
|
|
|
then
|
|
|
|
BUILDMINI="n"
|
|
|
|
fi
|
|
|
|
BUILDMINI=${BUILDMINI:0:1}
|
|
|
|
BUILDMINI=$(echo ${BUILDMINI} | tr [[:upper:]] [[:lower:]])
|