From 97cc04c881c7d4333803a2661fe8bb2b4c296a59 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sun, 4 Sep 2016 10:45:52 +1000 Subject: Initial addition of the RTEMS releasing scripts. --- .gitignore | 4 + README.txt | 11 +++ README.txt.in | 104 ++++++++++++++++++++++ rtems-release | 171 ++++++++++++++++++++++++++++++++++++ rtems-release-docs | 167 ++++++++++++++++++++++++++++++++++++ rtems-release-kernel | 106 +++++++++++++++++++++++ rtems-release-package | 98 +++++++++++++++++++++ rtems-release-package-end | 35 ++++++++ rtems-release-package-start | 87 +++++++++++++++++++ rtems-release-rsb-hashing | 84 ++++++++++++++++++ rtems-release-sources | 205 ++++++++++++++++++++++++++++++++++++++++++++ rtems-source-packages | 45 ++++++++++ 12 files changed, 1117 insertions(+) create mode 100644 .gitignore create mode 100644 README.txt create mode 100644 README.txt.in create mode 100755 rtems-release create mode 100755 rtems-release-docs create mode 100755 rtems-release-kernel create mode 100755 rtems-release-package create mode 100755 rtems-release-package-end create mode 100755 rtems-release-package-start create mode 100755 rtems-release-rsb-hashing create mode 100755 rtems-release-sources create mode 100755 rtems-source-packages diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0815fe4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +4.9* +4.10* +4.11* +4.12* diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..dd93fba --- /dev/null +++ b/README.txt @@ -0,0 +1,11 @@ +RTEMS Project Release Scripts. + +Chris Johns +Date: March 2016 + +These scripts release the RTEMS kernel. They are tested and run on the +RTEMS Project FreeBSD server. + +To run: + + $ ./rtems-release 4.11 0-rc1 diff --git a/README.txt.in b/README.txt.in new file mode 100644 index 0000000..1fcf3e2 --- /dev/null +++ b/README.txt.in @@ -0,0 +1,104 @@ +RTEMS Embedded Realtime Operating System +---------------------------------------- + +Release: @RELEASE@ +Date : @DATE@ + +The Real-Time Executive for Multiprocessor Systems or RTEMS is an open source +Real Time Operating System (RTOS) that supports open standard application +programming interfaces (API) such as POSIX. It is used in space flight, +medical, networking and many more embedded devices using processor +architectures including ARM, PowerPC, Intel, Blackfin, MIPS, Microblaze and +more. + +This directory contains the source code for the RTEMS @VERSION@ operating +system and tools. Please refer to the RTEMS Developers Wiki for the release +notes. + +Please drop by the Users mailing list (users@rtems.org) and let us know how you +are using RTEMS. We love hearing about user's projects. + +Many thanks to everyone who helped create this release. + +Regards +The RTEMS Development Team. + +RTEMS Web Sites +~~~~~~~~~~~~~~~ + + Home: https://www.rtems.org/ +Developers: https://devel.rtems.org/ + Docs: https://docs.rtems.org/ + Bug: https://devel.rtems.org/query + Lists: https://lists.rtems.org/ + GIT: https://git.rtems.org/ + +Release Files +~~~~~~~~~~~~~ + + - README.txt This document. + - contrib Directory contains extra release related files. + - rtems-@RELEASE@.tar.xz The RTEMS kernel source code. + - rtems-source-builder-@RELEASE@.tar.xz The RTEMS Source Builder source code. + - rtems-tools-@RELEASE@.tar.xz The RTEMS Tools source code. + - rtems-docs-@RELEASE@.tar.xz The RTEMS Documentation source. + - sha512sum.txt The SHA512 checksums for this directory. + - docs The generated RTEMS documentation. + - sources The source code the tools for this release. + +RTEMS Documentation +~~~~~~~~~~~~~~~~~~~ + +The generated documentation can be found in the `docs` directory. + +The following manuals are available as compress HTML tar files or PDF: + + - RTEMS User Manual + - docs/rtems-docs-@RELEASE@-user.pdf + - docs/rtems-docs-@RELEASE@-user-html.tar.xz + + - RTEMS C User Manual + - docs/rtems-docs-@RELEASE@-c-user.pdf + - docs/rtems-docs-@RELEASE@-c-user-html.tar.xz + + - RTEMS POSIX User Manual + - docs/rtems-docs-@RELEASE@-posix-user.pdf + - docs/rtems-docs-@RELEASE@-posix-user-html.tar.xz + + - RTEMS Networking User Manual + - docs/rtems-docs-@RELEASE@-networking.pdf + - docs/rtems-docs-@RELEASE@-networking-html.tar.xz + + - RTEMS Shell User Manual + - docs/rtems-docs-@RELEASE@-shell.pdf + - docs/rtems-docs-@RELEASE@-shell-html.tar.xz + +Quick Guide to Building +~~~~~~~~~~~~~~~~~~~~~~~ + +To build the tools and kernel for an archicture download: + + rtems-source-builder-@RELEASE@.tar.xz + +Please check to the RSB documentation (https://docs.rtems.org/rsb/) and the +Wiki (TBD) if you have any issues. + +If you encounter a problem please post to the user@rtems.org mailing list and +if you find a bug please raise a ticket (https://devel.rtems.org/newticket). + +The following builds RTEMS for the SPARC architecture: + + $ cd + $ mkdir development/rtems + $ cd development/rtems + $ tar Jxf rtems-source-builder-@RELEASE@.tar.xz + $ cd rtems-source-builder-@RELEASE@/rtems + $ ../source-builder/sb-set-builder \ + --prefix=$HOME/development/rtems/@RELEASE@ \ + @VERSION@/rtems-sparc + +To not build the RTEMS Kernel add to the command line '--without-rtems'. + +To build a single BSP add to the command line '--with-rtemsbsp'. You can +specify more than one BSP with quotes and a space delimiting the BSP names. By +default all BSPs for an architecture are built. diff --git a/rtems-release b/rtems-release new file mode 100755 index 0000000..00c164c --- /dev/null +++ b/rtems-release @@ -0,0 +1,171 @@ +#! /bin/sh +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2015-2016 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +# +# This is the top level RTEMS release script. Supply the version and and the +# release. +# + +echo "RTEMS Release, v0.1" + +# +# Stop on any error +# +set -e + +# +# Keep the top where we start. +# +top=${PWD} + +# +# Defaults. +# +rtems_doc=yes + +# +# Check for options +# +opts=yes +while [ $opts = yes ]; +do + case $1 in + -*) + case $1 in + --no-docs) + rtems_docs=no + ;; + *) + echo "error: invalid option: $1" + exit 1 + ;; + esac + shift + ;; + *) + opts=no + ;; + esac +done + +# +# The version and revision. +# +if [ $# -ne 2 ]; then + echo "error: must be 2 arguments, version and revision." + exit 1 +fi +version=$1 +revision=$2 + +release=${version}.${revision} + +checksum=sha512 + +build() +{ + echo "Package: $1" + ./rtems-release-package $* +} + +# +# Clean the release directory away. +# +rm -rf ${release} +mkdir ${release} + +# +# Package the RSB must be before the kernel. The kernel worker script uses the +# RSB to create autoconf and automake so it can bootstrap the kernel. +# +build rtems-source-builder ${version} ${revision} +build rtems-tools ${version} ${revision} +build rtems ${version} ${revision} rtems-release-kernel +build rtems-source-builder ${version} ${revision} rtems-release-rsb-hashing + +# +# Documentation currently uses a custom packaging script. It needs a branch. +# +if [ ${rtems_docs} = yes ]; then + ./rtems-release-docs rtems-docs ${version} ${revision} +fi + +# +# The sources is always last. +# +echo "Collect tools sources" +./rtems-release-sources ${version} ${revision} + +# +# Create the README.txt +# +now=$(date +"%d %B %Y") +cat README.txt.in | \ + sed -e "s/@RELEASE@/${release}/g" \ + -e "s/@VERSION@/${version}/g" \ + -e "s/@REVISION@/${revision}/g" \ + -e "s/@DATE@/${now}/g" > ${release}/README.txt +echo >> ${release}/README.txt +echo "RTEMS Architectures and BSPs" >> ${release}/README.txt +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> ${release}/README.txt +echo >> ${release}/README.txt +cat ARCH-BSP.txt >> ${release}/README.txt +rm ARCH-BSP.txt + +# +# Copy these release scripts to a contrib directory. +# +mkdir -p ${release}/contrib/releasing +for f in README.txt README.txt.in \ + rtems-release rtems-release-kernel \ + rtems-release-package rtems-release-rsb-hashing \ + rtems-release-sources +do + cp ${f} ${release}/contrib/releasing/ + csum=$(${checksum} -q ${f}) + echo "${csum} ${f}" >> ${release}/contrib/releasing/${checksum}sum.txt +done + +# +# Checksum the top level. +# +cd ${release} +rm -f ${checksum}sum.txt +for f in $(ls -1) +do + if [ ! -d ${f} ]; then + csum=$(${checksum} -q ${f}) + echo "${csum} ${f}" >> ${checksum}sum.txt + fi +done +cd .. + +exit 0 diff --git a/rtems-release-docs b/rtems-release-docs new file mode 100755 index 0000000..e958797 --- /dev/null +++ b/rtems-release-docs @@ -0,0 +1,167 @@ +#! /bin/sh +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2015-2016 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +# +# This worker script to build the doco. +# +echo "RTEMS Documentation Release builder, v0.1" + +# +# Stop on any error +# +set -e + +# +# Only build if sphinx-build is present on the system. +# +if [ "`command -v sphinx-build`"no = no ]; then + echo "warning: documentation not built" + exit 0 +fi + +# +# Common package start. +# +. ./rtems-release-package-start + +# +# The workspace pwd +# +ws_pwd=${PWD} + +# +# The manuals we are building. +# +manuals="c_user networking posix_users shell user" + +# +# Map the manual names in git to friendly names that are for download. +# +manual_map() +{ + case $1 in + c_user) echo "c-user" ;; + posix_users) echo "posix-user" ;; + *) echo "$1" ;; + esac +} + +# +# +# Get a copy of waf. +# +echo "Get waf ...." +curl https://waf.io/waf-1.8.20 > waf +chmod +x waf +waf=$PWD/waf + +# +# Get the documentation, create the tarball and stamp. +# +echo "git clone ${git_remote} ${git_local}" +git clone ${git_remote} ${git_local} + +cd ${git_local} +echo "git archive --format=tar --prefix=${prefix}/ origin/master" +git archive --format=tar --prefix=${prefix}/ origin/master | \ + xz > ../${prefix}-unstamped.tar.xz +cd .. + +# +# +# Build each manual. +# +cd ${git_local} +for m in ${manuals} +do + manual=$(manual_map $m) + echo "Configuring: $m ($manual)" + cd $m + ${waf} distclean + ${waf} configure + echo "Building HTML: $m" + ${waf} + echo "Building PDF: $m" + ${waf} --pdf + echo "Package ${prefix}-${manual}" + mkdir ${ws_pwd}/${prefix}-${manual} + cp -r build/html/* ${ws_pwd}/${prefix}-${manual}/. + echo "Package ${prefix}-${manual}.pdf" + cp -r build/latex/$m.pdf ${ws_pwd}/${prefix}-${manual}.pdf + cd .. +done +cd .. + +# +# Stamp the source and package, include the waf we use. +# +echo "tar Jxf ../${prefix}-unstamped.tar.xz" +tar Jxf ${prefix}-unstamped.tar.xz + +cd ${prefix} +echo "Creating VERSION: ${release}" +echo "[version]" > VERSION +echo "release = ${release}" >> VERSION +cp ${waf} . +cd .. + +echo "tar cf - ${prefix}" +tar cf - ${prefix} | xz > ../${prefix}.tar.xz + +echo "Created: ${release}/${prefix}.tar.xz" + +echo "Create: docs" +mkdir ../docs + +# +# Package all the documentation. Generated output in docs. +# +mkdir ${prefix}-docs-all-html + +for m in ${manuals} +do + manual=$(manual_map $m) + echo "Packaging: ${manual}" + echo "tar cf - ${prefix}-${manual}" + tar cf - ${prefix}-${manual} | xz > ../docs/${prefix}-${manual}-html.tar.xz + cp -r ${prefix}-${manual} ${prefix}-docs-all-html/${manual} + cp ${prefix}-${manual}.pdf ../docs/ +done + +echo "tar cf - ${prefix}-doc-all-html" +tar cf - ${prefix}-docs-all-html | xz > ../docs/${prefix}-docs-all-html.tar.xz + +# +# Comman package end. +# +. ${top}/rtems-release-package-end + +exit 0 diff --git a/rtems-release-kernel b/rtems-release-kernel new file mode 100755 index 0000000..a50cc86 --- /dev/null +++ b/rtems-release-kernel @@ -0,0 +1,106 @@ +#! /bin/sh +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2015-2016 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +# +# This worker script bootstraps the RTEMS kernel. +# +echo "RTEMS Release RTEMS Kernel, v0.1" + +# +# Stop on any error +# +set -e + +# +# Keep the top where we start. +# +top=${PWD} + +# +# The package, version and revision. +# +if [ $# -ne 4 ]; then + echo "error: must be arguments, the package, version," \ + "release and the top directory." + exit 1 +fi +package=$1 +version=$2 +revision=$3 +toptop=$4 + +release=${version}.${revision} +prefix=${package}-${release} + +echo "Package: ${package}" +echo "Release: ${release}" + +# +# Unpack the released RSB. +# +rsb=rtems-source-builder-${release} +echo "tar Jxf ../${rsb}.tar.xz" +tar Jxf ../${rsb}.tar.xz + +# +# Build autoconf and automake. +# +cd ${rsb}/rtems +../source-builder/sb-set-builder --without-release-url \ + --prefix=${top}/at ${version}/rtems-autotools +cd ../.. + +# +# Set the path to the autotools. +# +export XPATH=$PATH +export PATH=${top}/at/bin:$PATH + +# +# Bootstrap RTEMS. +# +echo "Bootstrapping RTEMS" +cd ${prefix} +./bootstrap -c +./bootstrap -p +${top}/${rsb}/source-builder/sb-bootstrap +./rtems-bsps > ARCH-BSP.txt +cp ARCH-BSP.txt ${toptop} +cd .. + +# +# Clean up. +# +rm -rf ${rsb} ${at} + +echo "Bootstrap complete." + +exit 0 diff --git a/rtems-release-package b/rtems-release-package new file mode 100755 index 0000000..6758270 --- /dev/null +++ b/rtems-release-package @@ -0,0 +1,98 @@ +#! /bin/sh +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2015-2016 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +# +# This script packages a package in a tar file. +# +echo "RTEMS Release Package, v0.1" + +# +# Stop on any error +# +set -e + +# +# Common package start. +# +. ./rtems-release-package-start + +# +# Work in a package specific directory in the release directory. +# +echo "git clone ${git_remote} ${git_local}" +git clone ${git_remote} ${git_local} + +stamped_tar=${prefix}-unstamped.tar.xz + +cd ${git_local} +echo "git fetch origin" +git fetch origin +echo "git archive --format=tar --prefix=${prefix}/ origin/${version}" +git archive --format=tar --prefix=${prefix}/ origin/${version} | \ + xz > ../${stamped_tar} +cd .. + +if [ ! -f ${stamped_tar} ]; then + echo "error: git archive failed, no tar file" + exit 1 +fi +echo "tar Jxf ${stamped_tar}" +tar Jxf ${stamped_tar} + +cd ${prefix} +echo "Creating VERSION: ${release}" +echo "[version]" > VERSION +echo "release = ${release}" >> VERSION +cd .. + +# +# Run the worker script if provided. It can perform any package +# specific set up functions. This is done before we finally +# package the release. +# +if [ -n "${worker}" ]; then + ${worker} ${package} ${version} ${revision} ${top} +fi + +# +# The '..' is the release directory. +# +echo "tar cf - ${prefix}" +tar cf - ${prefix} | xz > ../${prefix}.tar.xz + +echo "Created: ${release}/${prefix}.tar.xz" + +# +# Comman package end. +# +. ${top}/rtems-release-package-end + +exit 0 diff --git a/rtems-release-package-end b/rtems-release-package-end new file mode 100755 index 0000000..8dcff69 --- /dev/null +++ b/rtems-release-package-end @@ -0,0 +1,35 @@ +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2015-2016 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +# +# This script end packaging and cleans up. +# +cd ${top}/${release} +rm -rf ${workspace} +cd .. diff --git a/rtems-release-package-start b/rtems-release-package-start new file mode 100755 index 0000000..cfc4958 --- /dev/null +++ b/rtems-release-package-start @@ -0,0 +1,87 @@ +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2015-2016 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +# +# This script starts the packaging. +# + +# +# Keep the top where we start. +# +top=${PWD} + +# +# The package, version and revision amd maybe a worker script. +# +if [ $# -lt 3 -o $# -gt 4 ]; then + echo "error: must be 3 or 4 arguments, the package, version," \ + "release and optionally a worker script." + exit 1 +fi +package=$1 +version=$2 +revision=$3 +if [ $# -eq 4 ]; then + if [ ! -x ${top}/$4 ]; then + echo "error: cannot find the worker: $4" + exit 1 + fi + worker=${top}/$4 +else + worker= +fi + +release=${version}.${revision} +prefix=${package}-${release} + +git_remote=git://git.rtems.org/${package}.git +git_local=${package}-release-${release}.git + +workspace=ws-${package} + +echo "Package: ${package}" +echo "Release: ${release}" +echo "Repo : ${git_remote}" + +if [ ! -e ${release} ]; then + mkdir ${release} +else + if [ ! -d ${release} ]; then + echo "error: ${release} exists and is not a directory." + exit 1 + fi +fi + +# +# Work in a package specific directory in the release directory. +# +cd ${release} +rm -rf ${workspace} +mkdir ${workspace} +cd ${workspace} diff --git a/rtems-release-rsb-hashing b/rtems-release-rsb-hashing new file mode 100755 index 0000000..dba488e --- /dev/null +++ b/rtems-release-rsb-hashing @@ -0,0 +1,84 @@ +#! /bin/sh +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2015-2016 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +# +# This script adds the hashes to the release packages to the RSB. +# + +echo "RTEMS Release RSB Hashing, v0.1" + +# +# Stop on any error +# +set -e + +# +# Keep the top where we start. +# +top=${PWD} + +# +# The package, version and revision. +# +if [ $# -ne 4 ]; then + echo "error: must be arguments, the package, version," \ + "release and the top directory." + exit 1 +fi +package=$1 +version=$2 +revision=$3 +toptop=$4 + +release=${version}.${revision} +prefix=${package}-${release} + +echo "Package: ${package}" +echo "Release: ${release}" + +checksum=md5 + +# +# Add the hashes for the required packages in the RSB generated during an RTEMS +# release. +# +echo >> ${prefix}/VERSION +echo "[hashes]" >> ${prefix}/VERSION +for p in rtems-tools rtems +do + file=${p}-${release}.tar.xz + hash=$(${checksum} -q ${toptop}/${release}/${file}) + echo "${file} = ${checksum} ${hash}" >> ${prefix}/VERSION +done + +echo "RSB Hashing complete." + +exit 0 diff --git a/rtems-release-sources b/rtems-release-sources new file mode 100755 index 0000000..6c4cdf8 --- /dev/null +++ b/rtems-release-sources @@ -0,0 +1,205 @@ +#! /bin/sh +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2015-2016 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +# +# The script collects the sources for all the tools. +# + +echo "RTEMS Release Sources, v0.1" + +# +# Stop on any error +# +set -e + +# +# Keep the top where we start. +# +top=${PWD} + +# +# The version and revision. +# +if [ $# -ne 2 ]; then + echo "error: must be 2 arguments, the version, and release." + exit 1 +fi +version=$1 +revision=$2 + +package=rtems-source-builder + +release=${version}.${revision} +prefix=${package}-${release} + +checksum=sha512 + +workspace=ws-${package} + +# +# Source the source packages to package (haha) +# +. rtems-source-packages + +echo "Package: ${package}" +echo "Release: ${release}" + +if [ ! -e ${release} ]; then + mkdir ${release} +else + if [ ! -d ${release} ]; then + echo "error: ${release} exists and is not a directory." + exit 1 + fi +fi + +# +# Work in a package specific directory in the release directory. +# +cd ${release} +rm -rf ${workspace} +mkdir ${workspace} +cd ${workspace} + +echo "tar Jxf ../${prefix}.tar.xz" +tar Jxf ../${prefix}.tar.xz + +# +# Get the RSB to download the source we need to release. This is 100% os the +# actual sourced used. +# +cd ${prefix} + cd rtems + mkdir sources + # + # Copy in any source not present on the server. If these are not copied + # in the RSB does not find them. + # + for p in rtems-tools rtems + do + cp ${top}/${release}/${p}-${release}.tar.xz sources/ + done + + # + # Fetch the source for RTEMS tools. + # + echo "../source-builder/sb-set-builder --dry-run --with-download " \ + "--without-error-report --without-release-url " \ + "${rtems_pkgs}" + ../source-builder/sb-set-builder --dry-run --with-download \ + --without-error-report \ + --without-release-url \ + ${rtems_pkgs} + # + # If git, svn or cvs exist the release fails. + # + if [ -d sources/git -o -d sources/svn -o -d sources/cvs ]; then + echo "error: ${release} contains repositories and cannot be released." + exit 1 + fi + # + # Clean out the packages we do not places in 'sources' we copied in.. + # + for p in rtems-tools rtems + do + rm sources/${p}-${release}.tar.xz + done + cd .. + # + # Fetch the source for 3rd party packages tools. + # + cd bare + echo "../source-builder/sb-set-builder --dry-run --with-download " \ + "--without-error-report --without-release-url " \ + "${bare_pkgs}" + ../source-builder/sb-set-builder --dry-run --with-download \ + --without-error-report \ + --without-release-url \ + ${bare_pkgs} + # + # If svn or cvs exist the release fails. + # + if [ -d sources/svn -o -d sources/cvs ]; then + echo "error: ${release} contains repositories and cannot be released." + exit 1 + fi + # + # If there are git repos create packages of them as they are. + # + if [ -d sources/git ]; then + cd sources + cd git + for g in $(ls) + do + cd ${g} + hash=$(git status | grep '^HEAD detached at ' | sed 's/^HEAD detached at //') + prefix=$(echo ${g}-${hash} | sed 's/\./\-/') + echo "Packaging GIT repo: ${g} to ${prefix}" + git archive --format=tar --prefix=${prefix}/ ${hash} | xz > ../../${prefix}.tar.xz + cd .. + done + cd .. + rm -rf git + cd .. + fi + cd .. + # + # Export the sources and patches. + # + rm -rf ${top}/${release}/sources + mkdir ${top}/${release}/sources + for p in rtems bare + do + cp ${p}/sources/* ${top}/${release}/sources/ + cp ${p}/patches/* ${top}/${release}/sources/ + done + cd .. + +cd .. +rm -rf ${workspace} +cd .. + +cd ${release}/sources +rm -f ${checksum}sum.txt +for f in $(ls -1) +do + if [ ! -d ${f} ]; then + csum=$(${checksum} -q ${f}) + echo "${csum} ${f}" >> ${checksum}sum.txt + fi +done + +cd ../.. + +echo "Created: ${release}/sources/${checksum}sum.txt" +echo "Created: ${release}/sources" + +exit 0 diff --git a/rtems-source-packages b/rtems-source-packages new file mode 100755 index 0000000..90109ed --- /dev/null +++ b/rtems-source-packages @@ -0,0 +1,45 @@ +#! /bin/sh +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2015-2016 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +# + +# +# The script collects the sources packages for RTEMS. +# + +rtems_pkgs="${version}/rtems-all" +rtems_pkgs="${rtems_pkgs} ${version}/graphics/libjpeg" +rtems_pkgs="${rtems_pkgs} ${version}/databases/sqlite" +rtems_pkgs="${rtems_pkgs} ${version}/net-mgmt/net-snmp" +rtems_pkgs="${rtems_pkgs} ${version}/net/ntp" +rtems_pkgs="${rtems_pkgs} ${version}/net/protobuf" + +bare_pkgs="devel/dtc" +bare_pkgs="${bare_pkgs} devel/qemu" +bare_pkgs="${bare_pkgs} devel/or1ksim" -- cgit v1.2.3