Unverified Commit 7aa3f2f3 authored by Shawn Webb's avatar Shawn Webb
Browse files

Various changes



Clean the release artifacts prior to building. This ensures that the
build artifacts properly reflect the source.

Do not double-compress distsets.

Provide a revision.txt file that contains the git commit as given by
`git rev-list -n 1 HEAD`.

Do not attempt to publish to a mirror if no mirror is set.
Signed-off-by: Shawn Webb's avatarShawn Webb <shawn.webb@hardenedbsd.org>
parent 4efc4489
......@@ -63,6 +63,7 @@ main() {
assert_unlocked && \
lock_build && \
update_codebase && \
clean_build && \
build_hardenedbsd && \
build_release && \
stage_release && \
......
......@@ -24,6 +24,20 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
clean_build() {
(
set -ex
cd ${HBSD_SRC}/release
make \
TARGET=${HBSD_TARGET} \
TARGET_ARCH=${HBSD_TARGET_ARCH} \
clean
)
return 0
}
build_hardenedbsd() {
(
set -ex
......@@ -81,7 +95,6 @@ stage_release() {
for file in $(find ${HBSD_OBJRELDIR} -maxdepth 1 \
-name '*.iso' \
-o -name '*.img' \
-o -name '*.txz' \
-o -name 'MANIFEST'); do
f=${file##*/}
mv ${file} ${HBSD_STAGEDIR}/${f}
......@@ -95,6 +108,23 @@ stage_release() {
return ${res}
fi
done
# No need to compress the .txz files
for file in $(find ${HBSD_OBJRELDIR} -maxdepth 1 \
-name '*.txz'); do
f=${file##*/}
mv ${file} ${HBSD_STAGEDIR}/${f}
res=${?}
if [ ${res} -gt 0 ]; then
return ${res}
fi
done
(
cd ${HBSD_SRC}
git rev-list -n 1 HEAD > ${HBSD_STAGEDIR}/revision.txt
)
return 0
}
......@@ -107,8 +137,9 @@ sign_release() {
-name '*.txz' \
-o -name '*.img' \
-o -name '*.iso' \
-o -name '*.xz' \
-o -name 'MANIFEST'); do
-o -name '*xz' \
-o -name 'MANIFEST' \
-o -name 'revision.txt'); do
f=${file##*/}
sha256 ${f} >> CHECKSUMS.SHA256
sha512 ${f} >> CHECKSUMS.SHA512
......
......@@ -30,8 +30,8 @@ publish_release() {
}
kick_publisher_tires() {
# This function is for those mirrors that require push rather
# than pull. For now: nothing to see here; move along.
[ -z "${HBSD_MIRROR_MASTER}" ] && return 0
rsync -a ${HBSD_PUBDIR}/${HBSD_BUILDNUMBER}/ \
${HBSD_MIRROR_MASTER}:${HBSD_MIRROR_PUBDIR}/build-${HBSD_BUILDNUMBER}
return ${?}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment