Browse Source

build: make DEVELBRANCH optional; closes #117

pull/120/head
Franco Fichtner 1 year ago
parent
commit
563165ede2
6 changed files with 24 additions and 25 deletions
  1. +7
    -2
      Makefile
  2. +4
    -1
      build/common.sh
  3. +2
    -3
      build/core.sh
  4. +2
    -2
      build/plugins.sh
  5. +6
    -8
      build/rewind.sh
  6. +3
    -9
      build/update.sh

+ 7
- 2
Makefile View File

@ -81,10 +81,12 @@ MIRRORS?= https://opnsense.c0urier.net \
http://mirror.fra10.de.leaseweb.net/opnsense \
http://mirror.ams1.nl.leaseweb.net/opnsense
SERVER?= user@does.not.exist
UPLOADDIR?=
UPLOADDIR?= # empty
_VERSION!= date '+%Y%m%d%H%M'
VERSION?= ${_VERSION}
STAGEDIRPREFIX?=/usr/obj
# XXX GITBASE modifier
PORTSREFBASE?= https://github.com/hardenedbsd
PORTSREFDIR?= /usr/hardenedbsd-ports
PORTSREFBRANCH?=master
PLUGINSENV?= PLUGIN_PHP=${PHP} PLUGIN_ABI=${SETTINGS}
@ -98,6 +100,9 @@ COREENV?= CORE_PHP=${PHP} CORE_ABI=${SETTINGS}
SRCDIR?= /usr/src
SRCBRANCH?= master
# for ports and core
DEVELBRANCH?= #master
# A couple of meta-targets for easy use and ordering:
ports distfiles: base
@ -146,7 +151,7 @@ ${STEP}: lint-steps
-H "${COREENV}" -Q "${QUICK}" -u "${UEFI:tl}" -U "${SUFFIX}" \
-V "${ADDITIONS}" -O "${GITBASE}" -r "${SERVER}" \
-q "${VERSIONS}" -h "${PLUGINENV}" -I "${UPLOADDIR}" \
${${STEP}_ARGS}
-D "${DEVELBRANCH}" ${${STEP}_ARGS}
.endfor
.for SCRIPT in ${SCRIPTS}

+ 4
- 1
build/common.sh View File

@ -28,7 +28,7 @@
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
case ${OPT} in
@ -52,6 +52,9 @@ while getopts ${OPTS} OPT; do
d)
export PRODUCT_DEVICE=${OPTARG}
;;
D)
export DEVELBRANCH=${OPTARG}
;;
E)
export COREBRANCH=${OPTARG}
;;

+ 2
- 3
build/core.sh View File

@ -1,6 +1,6 @@
#!/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
# modification, are permitted provided that the following conditions
@ -41,11 +41,10 @@ setup_chroot ${STAGEDIR}
extract_packages ${STAGEDIR}
remove_packages ${STAGEDIR} ${@}
# register persistent packages to avoid bouncing
install_packages ${STAGEDIR} pkg git
lock_packages ${STAGEDIR}
for BRANCH in master ${COREBRANCH}; do
for BRANCH in ${DEVELBRANCH} ${COREBRANCH}; do
setup_copy ${STAGEDIR} ${COREDIR}
git_reset ${STAGEDIR}${COREDIR} ${BRANCH}

+ 2
- 2
build/plugins.sh View File

@ -1,6 +1,6 @@
#!/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
# modification, are permitted provided that the following conditions
@ -79,7 +79,7 @@ remove_packages ${STAGEDIR} ${@}
install_packages ${STAGEDIR} pkg git
lock_packages ${STAGEDIR}
for BRANCH in master ${PLUGINSBRANCH}; do
for BRANCH in ${DEVELBRANCH} ${PLUGINSBRANCH}; do
setup_copy ${STAGEDIR} ${PLUGINSDIR}
git_reset ${STAGEDIR}${PLUGINSDIR} ${BRANCH}

+ 6
- 8
build/rewind.sh View File

@ -1,6 +1,6 @@
#!/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
# modification, are permitted provided that the following conditions
@ -31,6 +31,11 @@ SELF=rewind
. ./common.sh
if [ -n "${DEVELBRANCH}" ]; then
echo ">>> Cannot rewind, please unset DEVELBRANCH=${DEVELBRANCH}"
exit 1
fi
ARGS="src ports plugins core tools"
for ARG in ${ARGS}; do
@ -60,14 +65,7 @@ for ARG in ${ARGS}; do
;;
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}
continue; # XXX here be dragons
git_pull ${DIR} ${BRANCH}
git_reset ${DIR}
done

+ 3
- 9
build/update.sh View File

@ -1,6 +1,6 @@
#!/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
# modification, are permitted provided that the following conditions
@ -39,18 +39,12 @@ fi
for ARG in ${ARGS}; do
case ${ARG} in
core)
BRANCHES=${COREBRANCH}
BRANCHES="${DEVELBRANCH} ${COREBRANCH}"
DIR=${COREDIR}
if [ ${BRANCHES} != master ]; then
BRANCHES="master ${BRANCHES}"
fi
;;
plugins)
BRANCHES=${PLUGINSBRANCH}
BRANCHES="${DEVELBRANCH} ${PLUGINSBRANCH}"
DIR=${PLUGINSDIR}
if [ ${BRANCHES} != master ]; then
BRANCHES="master ${BRANCHES}"
fi
;;
ports)
BRANCHES=${PORTSBRANCH}

Loading…
Cancel
Save