Unverified Commit 039c3001 authored by Shawn Webb's avatar Shawn Webb
Browse files

Separate out the config variables



Still provide sensible (debug) defaults. "Sensible" is defined as per my
environment.
Signed-off-by: Shawn Webb's avatarShawn Webb <shawn.webb@hardenedbsd.org>
parent b1b9109a
...@@ -24,27 +24,38 @@ ...@@ -24,27 +24,38 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE. # SUCH DAMAGE.
. ./lib/build.sh get_topdir() {
. ./lib/log.sh local self
. ./lib/publish.sh
. ./lib/util.sh self=${1}
echo $(realpath $(dirname ${self}))
return ${?}
}
TOPDIR=$(get_topdir ${0})
. ${TOPDIR}/../lib/build.sh
. ${TOPDIR}/../lib/config.sh
. ${TOPDIR}/../lib/log.sh
. ${TOPDIR}/../lib/publish.sh
. ${TOPDIR}/../lib/util.sh
main() { main() {
HBSD_INDEX_FILE=/build/index local self
HBSD_KERNEL=HARDENEDBSD
HBSD_LOCKFILE=/tmp/13-current.amd64.lock self=${0}
HBSD_NJOBS=4 shift
HBSD_OBJRELDIR=/usr/obj/scratch/src/hbsd-13/amd64.amd64/release
HBSD_PUBDIR=/build/pub config_set_defaults
HBSD_SRC=/scratch/src/hbsd-13
HBSD_STAGEDIR=/build/stage
HBSD_TARGET=amd64
HBSD_TARGET_ARCH=amd64
HBSD_NOCLEAN="-DNO_CLEAN"
HBSD_LOGDIR=/build/logs/13-current.amd64
HBSD_BUILDNUMBER=$(build_number) while getopts 'c:' o; do
HBSD_BUILD_LOG=${HBSD_LOGDIR}/${HBSD_BUILDNUMBER}.log case "${o}" in
c)
source "${OPTARG}"
;;
esac
done
( (
assert_unlocked && \ assert_unlocked && \
...@@ -57,7 +68,7 @@ main() { ...@@ -57,7 +68,7 @@ main() {
publish_release && \ publish_release && \
kick_publisher_tires && \ kick_publisher_tires && \
unlock_build unlock_build
) | build_log ) | build_log 2>&1
return ${?} return ${?}
} }
......
#!/bin/sh
#-
# Copyright (c) 2019 HardenedBSD
# Author: Shawn Webb <shawn.webb@hardenedbsd.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
config_set_defaults() {
HBSD_GPG_KEY=""
#HBSD_GPG_KEY="BB53388D3BD9892815CB9E30819B11A26FFD188D"
HBSD_INDEX_FILE=/build/index
HBSD_KERNEL=HARDENEDBSD
HBSD_LOCKFILE=/tmp/13-current.amd64.lock
HBSD_NJOBS=4
HBSD_OBJRELDIR=/usr/obj/scratch/src/hbsd-13/amd64.amd64/release
HBSD_PUBDIR=/build/pub
HBSD_SRC=/scratch/src/hbsd-13
HBSD_STAGEDIR=/build/stage
HBSD_TARGET=amd64
HBSD_TARGET_ARCH=amd64
HBSD_NOCLEAN="-DNO_CLEAN"
HBSD_LOGDIR=/build/logs/13-current.amd64
HBSD_BUILDNUMBER=$(build_number)
HBSD_BUILD_LOG=${HBSD_LOGDIR}/${HBSD_BUILDNUMBER}.log
return 0
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment