1 |
6f73c362
|
Renato Botelho
|
#!/bin/sh
|
2 |
|
|
#
|
3 |
98a4b7a0
|
Renato Botelho
|
# builder_defaults.sh
|
4 |
6f73c362
|
Renato Botelho
|
#
|
5 |
ac24dc24
|
Renato Botelho
|
# part of pfSense (https://www.pfsense.org)
|
6 |
38809d47
|
Renato Botelho do Couto
|
# Copyright (c) 2004-2013 BSD Perimeter
|
7 |
|
|
# Copyright (c) 2013-2016 Electric Sheep Fencing
|
8 |
8f585441
|
Luiz Souza
|
# Copyright (c) 2014-2021 Rubicon Communications, LLC (Netgate)
|
9 |
ac24dc24
|
Renato Botelho
|
# All rights reserved.
|
10 |
6f73c362
|
Renato Botelho
|
#
|
11 |
b12ea3fb
|
Renato Botelho
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
12 |
|
|
# you may not use this file except in compliance with the License.
|
13 |
|
|
# You may obtain a copy of the License at
|
14 |
6f73c362
|
Renato Botelho
|
#
|
15 |
b12ea3fb
|
Renato Botelho
|
# http://www.apache.org/licenses/LICENSE-2.0
|
16 |
6f73c362
|
Renato Botelho
|
#
|
17 |
b12ea3fb
|
Renato Botelho
|
# Unless required by applicable law or agreed to in writing, software
|
18 |
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
19 |
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
20 |
|
|
# See the License for the specific language governing permissions and
|
21 |
|
|
# limitations under the License.
|
22 |
6f73c362
|
Renato Botelho
|
|
23 |
|
|
###########################################
|
24 |
|
|
# Product builder configuration file #
|
25 |
|
|
# Please don't modify this file, you #
|
26 |
|
|
# can put your settings and options #
|
27 |
|
|
# in build.conf, which is sourced at the #
|
28 |
|
|
# beginning of this file #
|
29 |
|
|
###########################################
|
30 |
|
|
|
31 |
f36b26f8
|
Renato Botelho
|
if [ -z "${BUILDER_ROOT}" ]; then
|
32 |
|
|
echo ">>> ERROR: BUILDER_ROOT must be defined by script that includes builder_defaults.sh"
|
33 |
|
|
exit 1
|
34 |
|
|
fi
|
35 |
|
|
|
36 |
77308bce
|
Renato Botelho
|
if [ ! -d "${BUILDER_ROOT}" ]; then
|
37 |
f36b26f8
|
Renato Botelho
|
echo ">>> ERROR: BUILDER_ROOT is invalid"
|
38 |
|
|
exit 1
|
39 |
|
|
fi
|
40 |
|
|
|
41 |
|
|
export BUILDER_TOOLS=${BUILDER_TOOLS:-"${BUILDER_ROOT}/tools"}
|
42 |
a10a0e70
|
Renato Botelho
|
export BUILDER_SCRIPTS=${BUILDER_SCRIPTS:-"${BUILDER_ROOT}/build/scripts"}
|
43 |
4a6ea7b2
|
Renato Botelho
|
|
44 |
77308bce
|
Renato Botelho
|
if [ ! -d "${BUILDER_TOOLS}" ]; then
|
45 |
f36b26f8
|
Renato Botelho
|
echo ">>> ERROR: BUILDER_TOOLS is invalid"
|
46 |
|
|
exit 1
|
47 |
4a6ea7b2
|
Renato Botelho
|
fi
|
48 |
|
|
|
49 |
ae6e7a24
|
Luiz Otavio O Souza
|
BUILD_CONF=${BUILD_CONF:-"${BUILDER_ROOT}/build.conf"}
|
50 |
6f73c362
|
Renato Botelho
|
|
51 |
|
|
# Ensure file exists
|
52 |
|
|
if [ -f ${BUILD_CONF} ]; then
|
53 |
|
|
. ${BUILD_CONF}
|
54 |
|
|
fi
|
55 |
|
|
|
56 |
|
|
# Make sure pkg will not be interactive
|
57 |
|
|
export ASSUME_ALWAYS_YES=true
|
58 |
|
|
|
59 |
2ac4be3a
|
Renato Botelho
|
# Architecture
|
60 |
3154be54
|
Renato Botelho
|
export TARGET=${TARGET:-"$(uname -m)"}
|
61 |
|
|
export TARGET_ARCH=${TARGET_ARCH:-"$(uname -p)"}
|
62 |
6f73c362
|
Renato Botelho
|
|
63 |
934e3e04
|
Renato Botelho
|
# Directory to be used for writing temporary information
|
64 |
|
|
export SCRATCHDIR=${SCRATCHDIR:-"${BUILDER_ROOT}/tmp"}
|
65 |
|
|
if [ ! -d ${SCRATCHDIR} ]; then
|
66 |
|
|
mkdir -p ${SCRATCHDIR}
|
67 |
|
|
fi
|
68 |
6f73c362
|
Renato Botelho
|
|
69 |
|
|
# Product details
|
70 |
46f33ce5
|
Renato Botelho
|
export PRODUCT_NAME=${PRODUCT_NAME:-"nonSense"}
|
71 |
029098fe
|
Renato Botelho
|
export PRODUCT_NAME_SUFFIX=${PRODUCT_NAME_SUFFIX:-"-CE"}
|
72 |
97f3f602
|
Renato Botelho
|
export REPO_BRANCH_PREFIX=${REPO_BRANCH_PREFIX:-""}
|
73 |
774b0d82
|
Renato Botelho
|
export PRODUCT_URL=${PRODUCT_URL:-""}
|
74 |
694028d6
|
Renato Botelho
|
export PRODUCT_SRC=${PRODUCT_SRC:-"${BUILDER_ROOT}/src"}
|
75 |
a3bb036b
|
Renato Botelho
|
export PRODUCT_EMAIL=${PRODUCT_EMAIL:-"coreteam@pfsense.org"}
|
76 |
2f6260c5
|
Renato Botelho
|
export XML_ROOTOBJ=${XML_ROOTOBJ:-$(echo "${PRODUCT_NAME}" | tr '[[:upper:]]' '[[:lower:]]')}
|
77 |
6f73c362
|
Renato Botelho
|
|
78 |
81299b5c
|
Renato Botelho
|
if [ "${PRODUCT_NAME}" = "pfSense" -a "${BUILD_AUTHORIZED_BY_NETGATE}" != "yes" ]; then
|
79 |
|
|
echo ">>>ERROR: According the following license, only Netgate can build genuine pfSense® software"
|
80 |
46f33ce5
|
Renato Botelho
|
echo ""
|
81 |
b12ea3fb
|
Renato Botelho
|
cat ${BUILDER_ROOT}/LICENSE
|
82 |
46f33ce5
|
Renato Botelho
|
exit 1
|
83 |
|
|
fi
|
84 |
|
|
|
85 |
eb31cdf1
|
Renato Botelho
|
if [ -z "${PRODUCT_VERSION}" ]; then
|
86 |
|
|
if [ ! -f ${PRODUCT_SRC}/etc/version ]; then
|
87 |
|
|
echo ">>> ERROR: PRODUCT_VERSION is not defined and ${PRODUCT_SRC}/etc/version was not found"
|
88 |
|
|
print_error_pfS
|
89 |
|
|
fi
|
90 |
|
|
|
91 |
|
|
export PRODUCT_VERSION=$(head -n 1 ${PRODUCT_SRC}/etc/version)
|
92 |
|
|
fi
|
93 |
3c441c09
|
Renato Botelho
|
export PRODUCT_REVISION=${PRODUCT_REVISION:-""}
|
94 |
eb31cdf1
|
Renato Botelho
|
|
95 |
6f73c362
|
Renato Botelho
|
# Product repository tag to build
|
96 |
1b0a9747
|
Renato Botelho
|
_cur_git_repo_branch_or_tag=$(git -C ${BUILDER_ROOT} rev-parse --abbrev-ref HEAD)
|
97 |
d111360d
|
Renato Botelho
|
if [ "${_cur_git_repo_branch_or_tag}" = "HEAD" ]; then
|
98 |
|
|
# We are on a tag, lets find out its name
|
99 |
|
|
export GIT_REPO_BRANCH_OR_TAG=$(git -C ${BUILDER_ROOT} describe --tags)
|
100 |
|
|
else
|
101 |
|
|
export GIT_REPO_BRANCH_OR_TAG="${_cur_git_repo_branch_or_tag}"
|
102 |
|
|
fi
|
103 |
83354dea
|
Renato Botelho
|
# Use vX_Y instead of RELENG_X_Y for poudriere to make it shorter
|
104 |
54b84a3b
|
Renato Botelho
|
# Replace . by _ to make tag names look correct
|
105 |
|
|
POUDRIERE_BRANCH=$(echo "${GIT_REPO_BRANCH_OR_TAG}" | sed 's,RELENG_,v,; s,\.,_,g')
|
106 |
6f73c362
|
Renato Botelho
|
|
107 |
0a75e428
|
Renato Botelho
|
GIT_REPO_BASE=$(git -C ${BUILDER_ROOT} config --get remote.origin.url | sed -e 's,/[^/]*$,,')
|
108 |
04efa936
|
Renato Botelho
|
|
109 |
934e3e04
|
Renato Botelho
|
# This is used for using svn for retrieving src
|
110 |
04efa936
|
Renato Botelho
|
export FREEBSD_REPO_BASE=${FREEBSD_REPO_BASE:-"${GIT_REPO_BASE}/freebsd-src.git"}
|
111 |
fa0dc0f0
|
Renato Botelho do Couto
|
export FREEBSD_BRANCH=${FREEBSD_BRANCH:-"${REPO_BRANCH_PREFIX}RELENG_2_5_0"}
|
112 |
934e3e04
|
Renato Botelho
|
export FREEBSD_SRC_DIR=${FREEBSD_SRC_DIR:-"${SCRATCHDIR}/FreeBSD-src"}
|
113 |
|
|
|
114 |
91c40f25
|
Renato Botelho
|
export BUILD_KERNELS=${BUILD_KERNELS:-"${PRODUCT_NAME}"}
|
115 |
934e3e04
|
Renato Botelho
|
|
116 |
ac464524
|
Renato Botelho
|
# XXX: Poudriere doesn't like ssh short form
|
117 |
|
|
case "${FREEBSD_REPO_BASE}" in
|
118 |
|
|
git@*)
|
119 |
|
|
export FREEBSD_REPO_BASE_POUDRIERE="ssh://$(echo ${FREEBSD_REPO_BASE} | sed 's,:,/,')"
|
120 |
|
|
;;
|
121 |
|
|
*)
|
122 |
|
|
export FREEBSD_REPO_BASE_POUDRIERE="${FREEBSD_REPO_BASE}"
|
123 |
|
|
;;
|
124 |
|
|
esac
|
125 |
|
|
|
126 |
934e3e04
|
Renato Botelho
|
# Leave this alone.
|
127 |
8093ae17
|
Renato Botelho
|
export SRCCONF=${SRCCONF:-"${FREEBSD_SRC_DIR}/release/conf/${PRODUCT_NAME}_src.conf"}
|
128 |
b906e9c2
|
Renato Botelho
|
export SRC_ENV_CONF=${SRC_CONF:-"${FREEBSD_SRC_DIR}/release/conf/${PRODUCT_NAME}_src-env.conf"}
|
129 |
697cd601
|
Renato Botelho
|
export __MAKE_CONF=${__MAKE_CONF:-"${FREEBSD_SRC_DIR}/release/conf/${PRODUCT_NAME}_make.conf"}
|
130 |
934e3e04
|
Renato Botelho
|
|
131 |
|
|
# Extra tools to be added to ITOOLS
|
132 |
3c794eb6
|
Renato Botelho
|
export LOCAL_ITOOLS=${LOCAL_ITOOLS:-"uuencode uudecode ex"}
|
133 |
934e3e04
|
Renato Botelho
|
|
134 |
|
|
# Path to kernel files being built
|
135 |
|
|
export KERNEL_BUILD_PATH=${KERNEL_BUILD_PATH:-"${SCRATCHDIR}/kernels"}
|
136 |
|
|
|
137 |
3236b6f4
|
Renato Botelho
|
# Do not touch builder /usr/obj
|
138 |
|
|
export MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX:-"${SCRATCHDIR}/obj"}
|
139 |
|
|
|
140 |
9922914d
|
Renato Botelho do Couto
|
export MODULES_OVERRIDE=${MODULES_OVERRIDE:-"aesni amdtemp amdsmn blake2 coretemp cryptodev cpuctl drm2 fdescfs dummynet hwpmc i2c if_stf if_wg ipdivert ipfw ipfw_nat64 ipmi ix ixv ndis nmdm opensolaris sfxge vmm zfs usb/urndis usb/cdce usb/ipheth"}
|
141 |
6f73c362
|
Renato Botelho
|
|
142 |
0874c8f5
|
Renato Botelho
|
# gnid
|
143 |
a2e68d06
|
Renato Botelho
|
export GNID_REPO_BASE=${GNID_REPO_BASE:-"${GIT_REPO_BASE}/gnid.git"}
|
144 |
0874c8f5
|
Renato Botelho
|
export GNID_SRC_DIR=${GNID_SRC_DIR:-"${SCRATCHDIR}/gnid"}
|
145 |
|
|
export GNID_BRANCH=${GNID_BRANCH:-"master"}
|
146 |
295b0d2b
|
Renato Botelho
|
export GNID_INCLUDE_DIR=${GNID_INCLUDE_DIR:-"${MAKEOBJDIRPREFIX}${FREEBSD_SRC_DIR}/${TARGET}.${TARGET_ARCH}/tmp/usr/include"}
|
147 |
|
|
export GNID_LIBCRYPTO_DIR=${GNID_LIBCRYPTO_DIR:-"${MAKEOBJDIRPREFIX}${FREEBSD_SRC_DIR}/${TARGET}.${TARGET_ARCH}/secure/lib/libcrypto"}
|
148 |
0874c8f5
|
Renato Botelho
|
|
149 |
6f73c362
|
Renato Botelho
|
# Area that the final image will appear in
|
150 |
84331fdc
|
Renato Botelho
|
export IMAGES_FINAL_DIR=${IMAGES_FINAL_DIR:-"${SCRATCHDIR}/${PRODUCT_NAME}/"}
|
151 |
6f73c362
|
Renato Botelho
|
|
152 |
84331fdc
|
Renato Botelho
|
export BUILDER_LOGS=${BUILDER_LOGS:-"${BUILDER_ROOT}/logs"}
|
153 |
6f73c362
|
Renato Botelho
|
if [ ! -d ${BUILDER_LOGS} ]; then
|
154 |
|
|
mkdir -p ${BUILDER_LOGS}
|
155 |
|
|
fi
|
156 |
|
|
|
157 |
729c0c7a
|
Renato Botelho
|
# This is where files will be staged
|
158 |
|
|
export INSTALLER_CHROOT_DIR=${INSTALLER_CHROOT_DIR:-"${SCRATCHDIR}/installer-dir"}
|
159 |
|
|
|
160 |
6f73c362
|
Renato Botelho
|
# This is where files will be staged
|
161 |
328c4fb9
|
Renato Botelho
|
export STAGE_CHROOT_DIR=${STAGE_CHROOT_DIR:-"${SCRATCHDIR}/stage-dir"}
|
162 |
|
|
|
163 |
|
|
# Directory that will clone to in order to create
|
164 |
|
|
# iso staging area.
|
165 |
|
|
export FINAL_CHROOT_DIR=${FINAL_CHROOT_DIR:-"${SCRATCHDIR}/final-dir"}
|
166 |
6f73c362
|
Renato Botelho
|
|
167 |
|
|
# OVF/vmdk parms
|
168 |
|
|
# Name of ovf file included inside OVA archive
|
169 |
173fa93f
|
Renato Botelho
|
export OVFTEMPLATE=${OVFTEMPLATE:-"${BUILDER_TOOLS}/templates/ovf/${PRODUCT_NAME}.ovf"}
|
170 |
89a72b59
|
Renato Botelho
|
# / partition to be used by mkimg
|
171 |
f2d83cfb
|
Renato Botelho
|
export OVFUFS=${OVFUFS:-"${PRODUCT_NAME}${PRODUCT_NAME_SUFFIX}-disk1.ufs"}
|
172 |
679b5a66
|
Renato Botelho
|
# Raw disk to be converted to vmdk
|
173 |
f2d83cfb
|
Renato Botelho
|
export OVFRAW=${OVFRAW:-"${PRODUCT_NAME}${PRODUCT_NAME_SUFFIX}-disk1.raw"}
|
174 |
6f73c362
|
Renato Botelho
|
# On disk name of VMDK file included in OVA
|
175 |
f2d83cfb
|
Renato Botelho
|
export OVFVMDK=${OVFVMDK:-"${PRODUCT_NAME}${PRODUCT_NAME_SUFFIX}-disk1.vmdk"}
|
176 |
502db0bd
|
Renato Botelho
|
# 8 gigabyte on disk VMDK size
|
177 |
|
|
export VMDK_DISK_CAPACITY_IN_GB=${VMDK_DISK_CAPACITY_IN_GB:-"8"}
|
178 |
|
|
# swap partition size (freebsd-swap)
|
179 |
5213dbb8
|
Renato Botelho
|
export OVA_SWAP_PART_SIZE_IN_GB=${OVA_SWAP_PART_SIZE_IN_GB:-"0"}
|
180 |
89a72b59
|
Renato Botelho
|
# Temporary place to save files
|
181 |
|
|
export OVA_TMP=${OVA_TMP:-"${SCRATCHDIR}/ova_tmp"}
|
182 |
6f73c362
|
Renato Botelho
|
# end of OVF
|
183 |
|
|
|
184 |
|
|
# NOTE: Date string is used for creating file names of images
|
185 |
|
|
# The file is used for sharing the same value with build_snapshots.sh
|
186 |
84331fdc
|
Renato Botelho
|
export DATESTRINGFILE=${DATESTRINGFILE:-"$SCRATCHDIR/version.snapshots"}
|
187 |
6329e1eb
|
Renato Botelho
|
if [ -z "${DATESTRING}" ]; then
|
188 |
|
|
if [ -f "${DATESTRINGFILE}" -a -n "${_USE_OLD_DATESTRING}" ]; then
|
189 |
|
|
export DATESTRING=$(cat $DATESTRINGFILE)
|
190 |
6f73c362
|
Renato Botelho
|
else
|
191 |
cf31d8ae
|
Renato Botelho
|
export DATESTRING=$(date "+%Y%m%d-%H%M")
|
192 |
6f73c362
|
Renato Botelho
|
fi
|
193 |
|
|
fi
|
194 |
6329e1eb
|
Renato Botelho
|
echo "$DATESTRING" > $DATESTRINGFILE
|
195 |
6f73c362
|
Renato Botelho
|
|
196 |
|
|
# NOTE: Date string is placed on the final image etc folder to help detect new updates
|
197 |
|
|
# The file is used for sharing the same value with build_snapshots.sh
|
198 |
84331fdc
|
Renato Botelho
|
export BUILTDATESTRINGFILE=${BUILTDATESTRINGFILE:-"$SCRATCHDIR/version.buildtime"}
|
199 |
6329e1eb
|
Renato Botelho
|
if [ -z "${BUILTDATESTRING}" ]; then
|
200 |
|
|
if [ -f "${BUILTDATESTRINGFILE}" -a -n "${_USE_OLD_DATESTRING}" ]; then
|
201 |
|
|
export BUILTDATESTRING=$(cat $BUILTDATESTRINGFILE)
|
202 |
6f73c362
|
Renato Botelho
|
else
|
203 |
6329e1eb
|
Renato Botelho
|
export BUILTDATESTRING=$(date "+%a %b %d %T %Z %Y")
|
204 |
6f73c362
|
Renato Botelho
|
fi
|
205 |
|
|
fi
|
206 |
6329e1eb
|
Renato Botelho
|
echo "$BUILTDATESTRING" > $BUILTDATESTRINGFILE
|
207 |
6f73c362
|
Renato Botelho
|
|
208 |
934e3e04
|
Renato Botelho
|
# Poudriere
|
209 |
512ef80d
|
Renato Botelho
|
export ZFS_TANK=${ZFS_TANK:-"zroot"}
|
210 |
934e3e04
|
Renato Botelho
|
export ZFS_ROOT=${ZFS_ROOT:-"/poudriere"}
|
211 |
|
|
|
212 |
|
|
export POUDRIERE_BULK=${POUDRIERE_BULK:-"${BUILDER_TOOLS}/conf/pfPorts/poudriere_bulk"}
|
213 |
6c9689f4
|
Renato Botelho
|
if [ -z "${REPO_BRANCH_PREFIX}" ]; then
|
214 |
|
|
export POUDRIERE_PORTS_GIT_URL=${POUDRIERE_PORTS_GIT_URL:-"${GIT_REPO_BASE}/freebsd-ports.git"}
|
215 |
|
|
else
|
216 |
|
|
export POUDRIERE_PORTS_GIT_URL=${POUDRIERE_PORTS_GIT_URL:-"${GIT_REPO_BASE}/${REPO_BRANCH_PREFIX}ports.git"}
|
217 |
|
|
fi
|
218 |
3537f4a8
|
Renato Botelho do Couto
|
export POUDRIERE_PORTS_GIT_BRANCH=${POUDRIERE_PORTS_GIT_BRANCH:-"${REPO_BRANCH_PREFIX}RELENG_2_5_0"}
|
219 |
934e3e04
|
Renato Botelho
|
|
220 |
36dd19fb
|
Renato Botelho
|
# Use vX_Y instead of RELENG_X_Y for poudriere to make it shorter
|
221 |
|
|
POUDRIERE_PORTS_BRANCH=$(echo "${POUDRIERE_PORTS_GIT_BRANCH}" | sed 's,RELENG_,v,')
|
222 |
|
|
|
223 |
|
|
export POUDRIERE_PORTS_NAME=${POUDRIERE_PORTS_NAME:-"${PRODUCT_NAME}_${POUDRIERE_PORTS_BRANCH}"}
|
224 |
|
|
|
225 |
ac464524
|
Renato Botelho
|
# XXX: Poudriere doesn't like ssh short form
|
226 |
|
|
case "${POUDRIERE_PORTS_GIT_URL}" in
|
227 |
|
|
git@*)
|
228 |
|
|
POUDRIERE_PORTS_GIT_URL="ssh://$(echo ${POUDRIERE_PORTS_GIT_URL} | sed 's,:,/,')"
|
229 |
|
|
;;
|
230 |
|
|
esac
|
231 |
|
|
|
232 |
5fcc717d
|
Renato Botelho
|
unset _IS_RELEASE
|
233 |
ea9d2cd3
|
Renato Botelho
|
unset _IS_RC
|
234 |
5fcc717d
|
Renato Botelho
|
unset CORE_PKG_DATESTRING
|
235 |
|
|
export TIMESTAMP_SUFFIX="-${DATESTRING}"
|
236 |
|
|
# pkg doesn't like - as version separator, use . instead
|
237 |
|
|
export PKG_DATESTRING=$(echo "${DATESTRING}" | sed 's,-,.,g')
|
238 |
|
|
case "${PRODUCT_VERSION##*-}" in
|
239 |
|
|
RELEASE)
|
240 |
|
|
export _IS_RELEASE=yes
|
241 |
|
|
unset TIMESTAMP_SUFFIX
|
242 |
|
|
;;
|
243 |
|
|
ALPHA|DEVELOPMENT)
|
244 |
|
|
export CORE_PKG_DATESTRING=".a.${PKG_DATESTRING}"
|
245 |
|
|
;;
|
246 |
c96b2242
|
Renato Botelho
|
BETA*)
|
247 |
5fcc717d
|
Renato Botelho
|
export CORE_PKG_DATESTRING=".b.${PKG_DATESTRING}"
|
248 |
|
|
;;
|
249 |
c96b2242
|
Renato Botelho
|
RC*)
|
250 |
ea9d2cd3
|
Renato Botelho
|
export _IS_RC=yes
|
251 |
5fcc717d
|
Renato Botelho
|
export CORE_PKG_DATESTRING=".r.${PKG_DATESTRING}"
|
252 |
|
|
;;
|
253 |
|
|
*)
|
254 |
|
|
echo ">>> ERROR: Invalid PRODUCT_VERSION format ${PRODUCT_VERSION}"
|
255 |
|
|
exit 1
|
256 |
|
|
esac
|
257 |
f48a09c7
|
Renato Botelho
|
|
258 |
1386a2e4
|
Renato Botelho
|
export BUILDER_PKG_DEPENDENCIES="devel/git ftp/curl net/rsync sysutils/screen \
|
259 |
fa6f675e
|
Renato Botelho
|
sysutils/vmdktool security/sudo www/nginx emulators/qemu-user-static \
|
260 |
|
|
archivers/gtar textproc/xmlstarlet"
|
261 |
1b40e1a6
|
Renato Botelho
|
|
262 |
64564c4f
|
Renato Botelho
|
STAGING_HOSTNAME=${STAGING_HOSTNAME:-"release-staging.nyi.netgate.com"}
|
263 |
|
|
|
264 |
4dc9a6d0
|
Renato Botelho
|
# Host to rsync pkg repos from poudriere
|
265 |
64564c4f
|
Renato Botelho
|
export PKG_RSYNC_HOSTNAME=${PKG_RSYNC_HOSTNAME:-"nfs1.nyi.netgate.com"}
|
266 |
4dc9a6d0
|
Renato Botelho
|
export PKG_RSYNC_USERNAME=${PKG_RSYNC_USERNAME:-"wwwsync"}
|
267 |
|
|
export PKG_RSYNC_SSH_PORT=${PKG_RSYNC_SSH_PORT:-"22"}
|
268 |
64564c4f
|
Renato Botelho
|
export PKG_RSYNC_DESTDIR=${PKG_RSYNC_DESTDIR:-"/storage/files/release-staging/ce/packages"}
|
269 |
4dc9a6d0
|
Renato Botelho
|
|
270 |
|
|
# Final packages server
|
271 |
07884635
|
Renato Botelho
|
if [ -n "${_IS_RELEASE}" -o -n "${_IS_RC}" ]; then
|
272 |
bf4dd0e2
|
Renato Botelho
|
export PKG_FINAL_RSYNC_HOSTNAME=${PKG_FINAL_RSYNC_HOSTNAME:-"nfs1.nyi.netgate.com"}
|
273 |
|
|
export PKG_FINAL_RSYNC_DESTDIR=${PKG_FINAL_RSYNC_DESTDIR:-"/storage/files/pkg"}
|
274 |
4dc9a6d0
|
Renato Botelho
|
else
|
275 |
449a980f
|
Renato Botelho
|
export PKG_FINAL_RSYNC_HOSTNAME=${PKG_FINAL_RSYNC_HOSTNAME:-"nfs1.nyi.netgate.com"}
|
276 |
|
|
export PKG_FINAL_RSYNC_DESTDIR=${PKG_FINAL_RSYNC_DESTDIR:-"/storage/files/beta/packages"}
|
277 |
4dc9a6d0
|
Renato Botelho
|
fi
|
278 |
|
|
export PKG_FINAL_RSYNC_USERNAME=${PKG_FINAL_RSYNC_USERNAME:-"wwwsync"}
|
279 |
|
|
export PKG_FINAL_RSYNC_SSH_PORT=${PKG_FINAL_RSYNC_SSH_PORT:-"22"}
|
280 |
|
|
export SKIP_FINAL_RSYNC=${SKIP_FINAL_RSYNC:-}
|
281 |
|
|
|
282 |
74a4eefb
|
Renato Botelho
|
# pkg repo variables
|
283 |
6c045107
|
Renato Botelho
|
export USE_PKG_REPO_STAGING="1"
|
284 |
1557eac5
|
Renato Botelho
|
export PKG_REPO_SERVER_DEVEL=${PKG_REPO_SERVER_DEVEL:-"pkg+https://beta.pfsense.org/packages"}
|
285 |
43f00a68
|
Renato Botelho
|
export PKG_REPO_SERVER_RELEASE=${PKG_REPO_SERVER_RELEASE:-"pkg+https://pkg.pfsense.org"}
|
286 |
15333972
|
Renato Botelho
|
export PKG_REPO_SERVER_STAGING=${PKG_REPO_SERVER_STAGING:-"pkg+http://${STAGING_HOSTNAME}/ce/packages"}
|
287 |
74a4eefb
|
Renato Botelho
|
|
288 |
ea9d2cd3
|
Renato Botelho
|
if [ -n "${_IS_RELEASE}" -o -n "${_IS_RC}" ]; then
|
289 |
3537f4a8
|
Renato Botelho do Couto
|
export PKG_REPO_BRANCH_RELEASE=${PKG_REPO_BRANCH_RELEASE:-${POUDRIERE_BRANCH}}
|
290 |
|
|
export PKG_REPO_BRANCH_DEVEL=${PKG_REPO_BRANCH_DEVEL:-"${REPO_BRANCH_PREFIX}devel"}
|
291 |
b8e231af
|
Renato Botelho
|
export PKG_REPO_BRANCH_STAGING=${PKG_REPO_BRANCH_STAGING:-${PKG_REPO_BRANCH_RELEASE}}
|
292 |
933da73b
|
Renato Botelho
|
else
|
293 |
3537f4a8
|
Renato Botelho do Couto
|
export PKG_REPO_BRANCH_RELEASE=${PKG_REPO_BRANCH_RELEASE:-${POUDRIERE_BRANCH}}
|
294 |
|
|
export PKG_REPO_BRANCH_DEVEL=${PKG_REPO_BRANCH_DEVEL:-"${REPO_BRANCH_PREFIX}devel"}
|
295 |
b8e231af
|
Renato Botelho
|
export PKG_REPO_BRANCH_STAGING=${PKG_REPO_BRANCH_STAGING:-${PKG_REPO_BRANCH_DEVEL}}
|
296 |
933da73b
|
Renato Botelho
|
fi
|
297 |
|
|
|
298 |
f3800174
|
Renato Botelho
|
if [ -n "${_IS_RELEASE}" -o -n "${_IS_RC}" ]; then
|
299 |
bb7948b2
|
Renato Botelho
|
export PKG_REPO_SIGN_KEY=${PKG_REPO_SIGN_KEY:-"release${PRODUCT_NAME_SUFFIX}"}
|
300 |
|
|
else
|
301 |
|
|
export PKG_REPO_SIGN_KEY=${PKG_REPO_SIGN_KEY:-"beta${PRODUCT_NAME_SUFFIX}"}
|
302 |
|
|
fi
|
303 |
74a4eefb
|
Renato Botelho
|
# Command used to sign pkg repo
|
304 |
547d0883
|
Renato Botelho do Couto
|
: ${PKG_REPO_SIGNING_COMMAND="ssh -o StrictHostKeyChecking=no sign@codesigner.netgate.com sudo ./sign.sh ${PKG_REPO_SIGN_KEY}"}
|
305 |
574866f1
|
Renato Botelho
|
export PKG_REPO_SIGNING_COMMAND
|
306 |
94f7df8f
|
Renato Botelho
|
export DO_NOT_SIGN_PKG_REPO=${DO_NOT_SIGN_PKG_REPO:-}
|
307 |
74a4eefb
|
Renato Botelho
|
|
308 |
6f73c362
|
Renato Botelho
|
# Define base package version, based on date for snaps
|
309 |
3c441c09
|
Renato Botelho
|
export CORE_PKG_VERSION="${PRODUCT_VERSION%%-*}${CORE_PKG_DATESTRING}${PRODUCT_REVISION:+_}${PRODUCT_REVISION}"
|
310 |
83354dea
|
Renato Botelho
|
export CORE_PKG_PATH=${CORE_PKG_PATH:-"${SCRATCHDIR}/${PRODUCT_NAME}_${POUDRIERE_BRANCH}_${TARGET_ARCH}-core"}
|
311 |
1eb4344e
|
Renato Botelho
|
export CORE_PKG_REAL_PATH="${CORE_PKG_PATH}/.real_${DATESTRING}"
|
312 |
91039db4
|
Renato Botelho
|
export CORE_PKG_ALL_PATH="${CORE_PKG_PATH}/All"
|
313 |
6f73c362
|
Renato Botelho
|
|
314 |
c6a531b8
|
Renato Botelho
|
export PKG_REPO_BASE=${PKG_REPO_BASE:-"${BUILDER_TOOLS}/templates/pkg_repos"}
|
315 |
3537f4a8
|
Renato Botelho do Couto
|
export PFSENSE_DEFAULT_REPO="${PRODUCT_NAME}-repo"
|
316 |
15f12d8e
|
Renato Botelho
|
export PKG_REPO_DEFAULT=${PKG_REPO_DEFAULT:-"${PKG_REPO_BASE}/${PFSENSE_DEFAULT_REPO}.conf"}
|
317 |
dbd615c4
|
Renato Botelho
|
export PFSENSE_BUILD_REPO="${PFSENSE_DEFAULT_REPO}"
|
318 |
|
|
export PKG_REPO_BUILD=${PKG_REPO_BUILD:-"${PKG_REPO_BASE}/${PFSENSE_BUILD_REPO}.conf"}
|
319 |
52efc840
|
Renato Botelho
|
export PKG_REPO_PATH=${PKG_REPO_PATH:-"/usr/local/etc/pkg/repos/${PRODUCT_NAME}.conf"}
|
320 |
|
|
|
321 |
651f440c
|
Renato Botelho
|
export PRODUCT_SHARE_DIR=${PRODUCT_SHARE_DIR:-"/usr/local/share/${PRODUCT_NAME}"}
|
322 |
|
|
|
323 |
934e3e04
|
Renato Botelho
|
# Package overlay. This gives people a chance to build product
|
324 |
|
|
# installable image that already contains certain extra packages.
|
325 |
|
|
#
|
326 |
|
|
# Needs to contain comma separated package names. Of course
|
327 |
|
|
# package names must be valid. Using non existent
|
328 |
|
|
# package name would yield an error.
|
329 |
|
|
#
|
330 |
|
|
#export custom_package_list=""
|
331 |
|
|
|
332 |
6f73c362
|
Renato Botelho
|
# General builder output filenames
|
333 |
f68dc9f4
|
Renato Botelho
|
export ISOPATH=${ISOPATH:-"${IMAGES_FINAL_DIR}/installer/${PRODUCT_NAME}${PRODUCT_NAME_SUFFIX}-${PRODUCT_VERSION}${PRODUCT_REVISION:+-p}${PRODUCT_REVISION}-${TARGET}${TIMESTAMP_SUFFIX}.iso"}
|
334 |
|
|
export MEMSTICKPATH=${MEMSTICKPATH:-"${IMAGES_FINAL_DIR}/installer/${PRODUCT_NAME}${PRODUCT_NAME_SUFFIX}-memstick-${PRODUCT_VERSION}${PRODUCT_REVISION:+-p}${PRODUCT_REVISION}-${TARGET}${TIMESTAMP_SUFFIX}.img"}
|
335 |
|
|
export MEMSTICKSERIALPATH=${MEMSTICKSERIALPATH:-"${IMAGES_FINAL_DIR}/installer/${PRODUCT_NAME}${PRODUCT_NAME_SUFFIX}-memstick-serial-${PRODUCT_VERSION}${PRODUCT_REVISION:+-p}${PRODUCT_REVISION}-${TARGET}${TIMESTAMP_SUFFIX}.img"}
|
336 |
|
|
export MEMSTICKADIPATH=${MEMSTICKADIPATH:-"${IMAGES_FINAL_DIR}/installer/${PRODUCT_NAME}${PRODUCT_NAME_SUFFIX}-memstick-ADI-${PRODUCT_VERSION}${PRODUCT_REVISION:+-p}${PRODUCT_REVISION}-${TARGET}${TIMESTAMP_SUFFIX}.img"}
|
337 |
|
|
export OVAPATH=${OVAPATH:-"${IMAGES_FINAL_DIR}/virtualization/${PRODUCT_NAME}${PRODUCT_NAME_SUFFIX}-${PRODUCT_VERSION}${PRODUCT_REVISION:+-p}${PRODUCT_REVISION}-${TARGET}${TIMESTAMP_SUFFIX}.ova"}
|
338 |
b0d0498c
|
Renato Botelho
|
export MEMSTICK_VARIANTS=${MEMSTICK_VARIANTS:-}
|
339 |
|
|
export VARIANTIMAGES=""
|
340 |
|
|
export VARIANTUPDATES=""
|
341 |
6f73c362
|
Renato Botelho
|
|
342 |
a95458c2
|
Renato Botelho
|
# Rsync data to send snapshots
|
343 |
3c489426
|
Renato Botelho
|
if [ -n "${_IS_RELEASE}" -o -n "${SKIP_FINAL_RSYNC}" ]; then
|
344 |
64564c4f
|
Renato Botelho
|
export RSYNCIP=${RSYNCIP:-"nfs1.nyi.netgate.com"}
|
345 |
433a54ed
|
Renato Botelho
|
export RSYNCUSER=${RSYNCUSER:-"wwwsync"}
|
346 |
64564c4f
|
Renato Botelho
|
export RSYNCPATH=${RSYNCPATH:-"/storage/files/release-staging/ce/images"}
|
347 |
433a54ed
|
Renato Botelho
|
else
|
348 |
|
|
export RSYNCIP=${RSYNCIP:-"nfs1.nyi.netgate.com"}
|
349 |
|
|
export RSYNCUSER=${RSYNCUSER:-"wwwsync"}
|
350 |
|
|
export RSYNCPATH=${RSYNCPATH:-"/storage/files/snapshots/${TARGET}/${PRODUCT_NAME}_${GIT_REPO_BRANCH_OR_TAG}"}
|
351 |
|
|
fi
|
352 |
ab943fc9
|
Renato Botelho
|
|
353 |
|
|
export SNAPSHOTSLOGFILE=${SNAPSHOTSLOGFILE:-"${SCRATCHDIR}/snapshots-build.log"}
|
354 |
|
|
export SNAPSHOTSLASTUPDATE=${SNAPSHOTSLASTUPDATE:-"${SCRATCHDIR}/snapshots-lastupdate.log"}
|
355 |
919c8486
|
Renato Botelho
|
|
356 |
|
|
if [ -n "${POUDRIERE_SNAPSHOTS}" ]; then
|
357 |
|
|
export SNAPSHOTS_RSYNCIP=${PKG_RSYNC_HOSTNAME}
|
358 |
|
|
export SNAPSHOTS_RSYNCUSER=${PKG_RSYNC_USERNAME}
|
359 |
|
|
else
|
360 |
|
|
export SNAPSHOTS_RSYNCIP=${RSYNCIP}
|
361 |
|
|
export SNAPSHOTS_RSYNCUSER=${RSYNCUSER}
|
362 |
|
|
fi
|
363 |
adf82769
|
Renato Botelho
|
|
364 |
|
|
if [ "${PRODUCT_NAME}" = "pfSense" ]; then
|
365 |
81299b5c
|
Renato Botelho
|
export VENDOR_NAME=${VENDOR_NAME:-"Rubicon Communications, LLC (Netgate)"}
|
366 |
adf82769
|
Renato Botelho
|
export OVF_INFO=${OVF_INFO:-"pfSense is a free, open source customized distribution of FreeBSD tailored for use as a firewall and router. In addition to being a powerful, flexible firewalling and routing platform, it includes a long list of related features and a package system allowing further expandability without adding bloat and potential security vulnerabilities to the base distribution. pfSense is a popular project with more than 1 million downloads since its inception, and proven in countless installations ranging from small home networks protecting a PC and an Xbox to large corporations, universities and other organizations protecting thousands of network devices."}
|
367 |
|
|
else
|
368 |
|
|
export VENDOR_NAME=${VENDOR_NAME:-"nonSense"}
|
369 |
|
|
export OVF_INFO=${OVF_INFO:-"none"}
|
370 |
|
|
fi
|