build: make DEVELBRANCH optional; closes #117
This commit is contained in:
parent
4355c16fa5
commit
563165ede2
9
Makefile
9
Makefile
|
@ -81,10 +81,12 @@ MIRRORS?= https://opnsense.c0urier.net \
|
||||||
http://mirror.fra10.de.leaseweb.net/opnsense \
|
http://mirror.fra10.de.leaseweb.net/opnsense \
|
||||||
http://mirror.ams1.nl.leaseweb.net/opnsense
|
http://mirror.ams1.nl.leaseweb.net/opnsense
|
||||||
SERVER?= user@does.not.exist
|
SERVER?= user@does.not.exist
|
||||||
UPLOADDIR?=
|
UPLOADDIR?= # empty
|
||||||
_VERSION!= date '+%Y%m%d%H%M'
|
_VERSION!= date '+%Y%m%d%H%M'
|
||||||
VERSION?= ${_VERSION}
|
VERSION?= ${_VERSION}
|
||||||
STAGEDIRPREFIX?=/usr/obj
|
STAGEDIRPREFIX?=/usr/obj
|
||||||
|
# XXX GITBASE modifier
|
||||||
|
PORTSREFBASE?= https://github.com/hardenedbsd
|
||||||
PORTSREFDIR?= /usr/hardenedbsd-ports
|
PORTSREFDIR?= /usr/hardenedbsd-ports
|
||||||
PORTSREFBRANCH?=master
|
PORTSREFBRANCH?=master
|
||||||
PLUGINSENV?= PLUGIN_PHP=${PHP} PLUGIN_ABI=${SETTINGS}
|
PLUGINSENV?= PLUGIN_PHP=${PHP} PLUGIN_ABI=${SETTINGS}
|
||||||
|
@ -98,6 +100,9 @@ COREENV?= CORE_PHP=${PHP} CORE_ABI=${SETTINGS}
|
||||||
SRCDIR?= /usr/src
|
SRCDIR?= /usr/src
|
||||||
SRCBRANCH?= master
|
SRCBRANCH?= master
|
||||||
|
|
||||||
|
# for ports and core
|
||||||
|
DEVELBRANCH?= #master
|
||||||
|
|
||||||
# A couple of meta-targets for easy use and ordering:
|
# A couple of meta-targets for easy use and ordering:
|
||||||
|
|
||||||
ports distfiles: base
|
ports distfiles: base
|
||||||
|
@ -146,7 +151,7 @@ ${STEP}: lint-steps
|
||||||
-H "${COREENV}" -Q "${QUICK}" -u "${UEFI:tl}" -U "${SUFFIX}" \
|
-H "${COREENV}" -Q "${QUICK}" -u "${UEFI:tl}" -U "${SUFFIX}" \
|
||||||
-V "${ADDITIONS}" -O "${GITBASE}" -r "${SERVER}" \
|
-V "${ADDITIONS}" -O "${GITBASE}" -r "${SERVER}" \
|
||||||
-q "${VERSIONS}" -h "${PLUGINENV}" -I "${UPLOADDIR}" \
|
-q "${VERSIONS}" -h "${PLUGINENV}" -I "${UPLOADDIR}" \
|
||||||
${${STEP}_ARGS}
|
-D "${DEVELBRANCH}" ${${STEP}_ARGS}
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
.for SCRIPT in ${SCRIPTS}
|
.for SCRIPT in ${SCRIPTS}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
OPTS="a:B:b:C:c:d:E:e:F:f:G:g:H:h:I:K:k:L:l:m:n:O:o:P:p:Q:q:R:r:S:s:T:t:U:u:v:V:"
|
OPTS="a:B:b:C:c:D:d:E:e:F:f:G:g:H:h:I:K:k:L:l:m:n:O:o:P:p:Q:q:R:r:S:s:T:t:U:u:v:V:"
|
||||||
|
|
||||||
while getopts ${OPTS} OPT; do
|
while getopts ${OPTS} OPT; do
|
||||||
case ${OPT} in
|
case ${OPT} in
|
||||||
|
@ -52,6 +52,9 @@ while getopts ${OPTS} OPT; do
|
||||||
d)
|
d)
|
||||||
export PRODUCT_DEVICE=${OPTARG}
|
export PRODUCT_DEVICE=${OPTARG}
|
||||||
;;
|
;;
|
||||||
|
D)
|
||||||
|
export DEVELBRANCH=${OPTARG}
|
||||||
|
;;
|
||||||
E)
|
E)
|
||||||
export COREBRANCH=${OPTARG}
|
export COREBRANCH=${OPTARG}
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Copyright (c) 2014-2017 Franco Fichtner <franco@opnsense.org>
|
# Copyright (c) 2014-2019 Franco Fichtner <franco@opnsense.org>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -41,11 +41,10 @@ setup_chroot ${STAGEDIR}
|
||||||
|
|
||||||
extract_packages ${STAGEDIR}
|
extract_packages ${STAGEDIR}
|
||||||
remove_packages ${STAGEDIR} ${@}
|
remove_packages ${STAGEDIR} ${@}
|
||||||
# register persistent packages to avoid bouncing
|
|
||||||
install_packages ${STAGEDIR} pkg git
|
install_packages ${STAGEDIR} pkg git
|
||||||
lock_packages ${STAGEDIR}
|
lock_packages ${STAGEDIR}
|
||||||
|
|
||||||
for BRANCH in master ${COREBRANCH}; do
|
for BRANCH in ${DEVELBRANCH} ${COREBRANCH}; do
|
||||||
setup_copy ${STAGEDIR} ${COREDIR}
|
setup_copy ${STAGEDIR} ${COREDIR}
|
||||||
git_reset ${STAGEDIR}${COREDIR} ${BRANCH}
|
git_reset ${STAGEDIR}${COREDIR} ${BRANCH}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Copyright (c) 2015-2018 Franco Fichtner <franco@opnsense.org>
|
# Copyright (c) 2015-2019 Franco Fichtner <franco@opnsense.org>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -79,7 +79,7 @@ remove_packages ${STAGEDIR} ${@}
|
||||||
install_packages ${STAGEDIR} pkg git
|
install_packages ${STAGEDIR} pkg git
|
||||||
lock_packages ${STAGEDIR}
|
lock_packages ${STAGEDIR}
|
||||||
|
|
||||||
for BRANCH in master ${PLUGINSBRANCH}; do
|
for BRANCH in ${DEVELBRANCH} ${PLUGINSBRANCH}; do
|
||||||
setup_copy ${STAGEDIR} ${PLUGINSDIR}
|
setup_copy ${STAGEDIR} ${PLUGINSDIR}
|
||||||
git_reset ${STAGEDIR}${PLUGINSDIR} ${BRANCH}
|
git_reset ${STAGEDIR}${PLUGINSDIR} ${BRANCH}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Copyright (c) 2018 Franco Fichtner <franco@opnsense.org>
|
# Copyright (c) 2018-2019 Franco Fichtner <franco@opnsense.org>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -31,6 +31,11 @@ SELF=rewind
|
||||||
|
|
||||||
. ./common.sh
|
. ./common.sh
|
||||||
|
|
||||||
|
if [ -n "${DEVELBRANCH}" ]; then
|
||||||
|
echo ">>> Cannot rewind, please unset DEVELBRANCH=${DEVELBRANCH}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
ARGS="src ports plugins core tools"
|
ARGS="src ports plugins core tools"
|
||||||
|
|
||||||
for ARG in ${ARGS}; do
|
for ARG in ${ARGS}; do
|
||||||
|
@ -60,14 +65,7 @@ for ARG in ${ARGS}; do
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# XXX When we start rewind set a marker
|
|
||||||
# for the build process to ignore master
|
|
||||||
# branch development package builds.
|
|
||||||
#
|
|
||||||
# This flag may be cleared by "make update".
|
|
||||||
|
|
||||||
git_tag ${DIR} ${PRODUCT_VERSION}
|
git_tag ${DIR} ${PRODUCT_VERSION}
|
||||||
continue; # XXX here be dragons
|
|
||||||
git_pull ${DIR} ${BRANCH}
|
git_pull ${DIR} ${BRANCH}
|
||||||
git_reset ${DIR}
|
git_reset ${DIR}
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Copyright (c) 2017 Franco Fichtner <franco@opnsense.org>
|
# Copyright (c) 2017-2019 Franco Fichtner <franco@opnsense.org>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -39,18 +39,12 @@ fi
|
||||||
for ARG in ${ARGS}; do
|
for ARG in ${ARGS}; do
|
||||||
case ${ARG} in
|
case ${ARG} in
|
||||||
core)
|
core)
|
||||||
BRANCHES=${COREBRANCH}
|
BRANCHES="${DEVELBRANCH} ${COREBRANCH}"
|
||||||
DIR=${COREDIR}
|
DIR=${COREDIR}
|
||||||
if [ ${BRANCHES} != master ]; then
|
|
||||||
BRANCHES="master ${BRANCHES}"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
plugins)
|
plugins)
|
||||||
BRANCHES=${PLUGINSBRANCH}
|
BRANCHES="${DEVELBRANCH} ${PLUGINSBRANCH}"
|
||||||
DIR=${PLUGINSDIR}
|
DIR=${PLUGINSDIR}
|
||||||
if [ ${BRANCHES} != master ]; then
|
|
||||||
BRANCHES="master ${BRANCHES}"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
ports)
|
ports)
|
||||||
BRANCHES=${PORTSBRANCH}
|
BRANCHES=${PORTSBRANCH}
|
||||||
|
|
Loading…
Reference in New Issue