mirror of
https://github.com/truenas/core-build.git
synced 2026-02-15 07:36:18 +00:00
145 lines
5.3 KiB
Plaintext
145 lines
5.3 KiB
Plaintext
#+
|
|
# Copyright (c) 2010-2015 iXsystems, Inc., All rights reserved.
|
|
#
|
|
# 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 iXsystems, Inc. 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.
|
|
#
|
|
|
|
PRODUCT = PRODUCT or "TrueNAS"
|
|
COMPANY = COMPANY or "iXsystems"
|
|
OS_ROOT = "${BE_ROOT}/os"
|
|
PORTS_ROOT = "${BE_ROOT}/ports"
|
|
TESTS_ROOT = "${BUILD_ROOT}/tests"
|
|
|
|
BUILD_PROFILES = "${BUILD_ROOT}/build/profiles"
|
|
PROFILE_ROOT = "${BUILD_PROFILES}/${PROFILE}"
|
|
|
|
PORTS_OVERLAY = "${OBJDIR}/ports-overlay"
|
|
POUDRIERE_ROOT = "${OBJDIR}/poudriere"
|
|
JAIL_DESTDIR = "${OBJDIR}/jail"
|
|
WORLD_DESTDIR = "${OBJDIR}/world"
|
|
PACKAGES_DESTDIR = "${OBJDIR}/packages"
|
|
INSTUFS_DESTDIR = "${OBJDIR}/instufs"
|
|
ISO_DESTDIR = "${OBJDIR}/iso"
|
|
CDROM_LABEL = PRODUCT.upper()
|
|
FREEBSD_RELEASE_VERSION = "13.2-RELEASE"
|
|
BUILD_ARCH = "amd64"
|
|
BUILD_ARCH_SHORT = "x64"
|
|
PRODUCTION = PRODUCTION or "no"
|
|
SDK = SDK or "no"
|
|
BUILD_SDK = BUILD_SDK or "no"
|
|
|
|
# if a port was given the `install` key and it was set
|
|
# to False, then we don't install that port but we save
|
|
# the associated built *.txz to this directory
|
|
NON_INSTALLED_DIR = "non_installed_ports"
|
|
|
|
# Any env variable that is profile specific should go in the file(s)
|
|
# below and not in this common env.pyd file.
|
|
# Also note that do not refer to any profile specific variable before
|
|
# the file below can be included
|
|
# Lastly, PLEASE LOOK AT THE PROFILE SPECIFIC FILE BEFORE YOU ADD THINGS HERE!
|
|
if exists("${PROFILE_ROOT}/env.pyd"):
|
|
# Include any profile specific variable in the file(s) below.
|
|
include("${PROFILE_ROOT}/env.pyd")
|
|
|
|
if MILESTONE is None:
|
|
MILESTONE = "MASTER"
|
|
|
|
if BUILD_SDK.lower() == "yes":
|
|
SDK = "yes"
|
|
|
|
if MILESTONE.lower() in ["master", "freebsd-stable", "freebsd-head"]:
|
|
# Version
|
|
VERSION = VERSION or "${VERSION_NUMBER}-${MILESTONE}-${BUILD_TIMESTAMP}"
|
|
# Build Type (Nightlies)
|
|
BUILD_TYPE = VERSION.split('-')[1]
|
|
else:
|
|
# Build Type (RELEASE/STABLE)
|
|
BUILD_TYPE = MILESTONE
|
|
|
|
# If our milestone is freebsd-stable or freebsd-head force BUILD_TYPE
|
|
if MILESTONE.lower() in ["freebsd-stable", "freebsd-head"]:
|
|
BUILD_TYPE = MILESTONE
|
|
|
|
# Name for ISO and such
|
|
if BUILD_TYPE.lower() in ["master", "freebsd-stable", "freebsd-head"]:
|
|
NAME = "${PRODUCT}-${VERSION}-${GIT_REVISION}"
|
|
else:
|
|
NAME = "${PRODUCT}-${VERSION}"
|
|
|
|
# Specify location for saving production build.
|
|
SAVED_BUILD_ENV_DESTDIR = "/builds/${PRODUCT}/build_env/${VERSION}/"
|
|
|
|
# This is needed for buildkernels
|
|
KERNCONF = "${PRODUCT}.${BUILD_ARCH}"
|
|
KERNCONFDIR = OBJDIR
|
|
|
|
|
|
# Various path shortcuts
|
|
BUILD_CONFIG = "${BUILD_ROOT}/build/config"
|
|
BUILD_TOOLS = "${BUILD_ROOT}/build/tools"
|
|
DISTFILES_CACHE = "${OBJDIR}/ports/distfiles"
|
|
XZ = XZ or "pxz"
|
|
|
|
# URLs
|
|
PROJECT_SITE = "http://www.freenas.org"
|
|
SUPPORT_SITE = "http://bugs.freenas.org"
|
|
|
|
# Release bits
|
|
TRAIN = TRAIN or "${PRODUCT}-${VERSION_NUMBER}-Nightlies"
|
|
RELEASE_STAGEDIR = "${BE_ROOT}/release/${PRODUCT}-${VERSION}"
|
|
UPGRADE_STAGEDIR = "${BE_ROOT}/release/${TRAIN}-${BUILD_TIMESTAMP}-Update"
|
|
LATEST = "${OBJDIR}/LATEST"
|
|
RELEASE_DOCS_PATH = "${BUILD_ROOT}/release/${PRODUCT}/${VERSION_NUMBER}/RELEASE/"
|
|
|
|
# release-push settings
|
|
# Check whether it is an internal update or not
|
|
INTERNAL_UPDATE = INTERNAL_UPDATE or "NO"
|
|
# Check for garbage values provided by user
|
|
if INTERNAL_UPDATE.lower() not in ["yes", "no"]:
|
|
print("Malformed Value provided for INTERNAL_UPDATE: {0}. Use 'YES'or 'NO'".format(INTERNAL_UPDATE))
|
|
INTERNAL_UPDATE = "NO"
|
|
if INTERNAL_UPDATE.lower() == "yes":
|
|
update_host_user_pair = ("update-int.ixsystems.com", "releng")
|
|
else:
|
|
update_host_user_pair = ("update-master.tn.ixsystems.net", "sef")
|
|
|
|
UPDATE_HOST = UPDATE_HOST or update_host_user_pair[0]
|
|
UPDATE_USER = UPDATE_USER or update_host_user_pair[1]
|
|
UPDATE_DB = UPDATE_DB or "sqlite:${PRODUCT}-updates.db"
|
|
UPDATE_DEST = "/tank/www/${PRODUCT}"
|
|
FREENAS_KEYFILE = FREENAS_KEYFILE or "/dev/null"
|
|
DOWNLOAD_BASEDIR = "/downloads"
|
|
DOWNLOAD_PREFIX = "${DOWNLOAD_BASEDIR}/${VERSION_NUMBER}"
|
|
IX_INTERNAL_PATH_PREFIX = "/builds/${PRODUCT}"
|
|
|
|
DOWNLOAD_HOST = "download-master.freenas.org"
|
|
|
|
# Debug info location
|
|
DEBUG_ROOT = "${OBJDIR}/debug"
|
|
|
|
# Calculate make jobs number, PXZ acceleration and so on
|
|
HW_NCPU = sh("sysctl -n hw.ncpu")
|
|
HW_PHYSMEM = sh("sysctl -n hw.physmem")
|
|
MAKE_JOBS = str(int(HW_NCPU) + 1)
|
|
PXZ_ACCEL = "-T${HW_NCPU}"
|