composite: let scripts be scripts

This commit is contained in:
Franco Fichtner 2018-10-12 08:33:47 +02:00
parent c2b9f4ea87
commit 2f116d8a43
7 changed files with 91 additions and 22 deletions

View File

@ -27,7 +27,7 @@ STEPS= arm base boot chroot clean compress confirm core distfiles \
download dvd info kernel nano plugins ports prefetch print \
rebase release rename rewind serial sign skim test update \
upload verify vga vm xtools
SCRIPTS= batch nightly refresh pkg_fingerprint pkg_sign
SCRIPTS= batch nightly refresh
.PHONY: ${STEPS}
PAGER?= less
@ -40,12 +40,12 @@ lint-steps:
@sh -n ${.CURDIR}/build/${STEP}.sh
.endfor
lint-scripts:
lint-composite:
.for SCRIPT in ${SCRIPTS}
@sh -n ${.CURDIR}/scripts/${SCRIPT}.sh
@sh -n ${.CURDIR}/composite/${SCRIPT}.sh
.endfor
lint: lint-steps lint-scripts
lint: lint-steps lint-composite
# Special vars to load early build.conf settings:
@ -152,7 +152,7 @@ ${STEP}: lint-steps
.endfor
.for SCRIPT in ${SCRIPTS}
${SCRIPT}: lint-scripts
${SCRIPT}: lint-composite
${VERBOSE_HIDDEN} cd ${.CURDIR} && sh ${VERBOSE_FLAGS} \
./scripts/${SCRIPT}.sh ${${SCRIPT}_ARGS}
./composite/${SCRIPT}.sh ${${SCRIPT}_ARGS}
.endfor

32
composite/batch.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/sh
# Copyright (c) 2017 Franco Fichtner <franco@opnsense.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.
for FLAVOUR in OpenSSL LibreSSL; do
make clean-obj ${*} FLAVOUR=${FLAVOUR}
done
make clean-obj

View File

@ -1,6 +1,29 @@
#!/bin/sh
# nightly build script
# Copyright (c) 2017-2018 Franco Fichtner <franco@opnsense.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.
eval "$(make print-LOGSDIR,PRODUCT_ARCH,PRODUCT_VERSION,STAGEDIR,TARGETDIRPREFIX)"

28
composite/refresh.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/sh
# Copyright (c) 2017 Franco Fichtner <franco@opnsense.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.
make clean-obj,plugins,core packages

View File

@ -1,9 +0,0 @@
#!/bin/sh
# simple batch script for release builds
for FLAVOUR in OpenSSL LibreSSL; do
make clean-obj ${*} FLAVOUR=${FLAVOUR}
done
make clean-obj

View File

@ -56,4 +56,4 @@ for item in sorted(stats.items(), key=lambda x: x[1]['__total__']):
print ("%-40s %-5.0f seconds" % (package, stats[package]['__total__']))
total_time += stats[package]['__total__']
print ("%-40s %-5.0f seconds" % ("*", total_time))
print ("%-40s %-5.0f seconds" % ("*", total_time))

View File

@ -1,5 +0,0 @@
#!/bin/sh
# refresh plugins and core in packages
make clean-obj,plugins,core packages