From 5e16156b814762fa57ab049cfb80e4614124d04f Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Wed, 29 Apr 2020 14:02:38 +1000 Subject: Fix the paths in the README - Move URL path generation to the a separate script file - Move info generation to a separate script file - Add markdown to the README.txt.in but filter and do not generate HTML from MD. A lot more work is needed to have this right. Close #3813 --- README.txt.in | 64 +++++++++++++++++++++-------------------- rtems-release | 40 ++++---------------------- rtems-release-info | 72 +++++++++++++++++++++++++++++++++++++++++++++++ rtems-release-path | 52 ++++++++++++++++++++++++++++++++++ rtems-release-rsb-version | 19 +++---------- rtems-release-sources | 3 +- 6 files changed, 168 insertions(+), 82 deletions(-) create mode 100644 rtems-release-info create mode 100644 rtems-release-path diff --git a/README.txt.in b/README.txt.in index 90b5f11..2f95163 100644 --- a/README.txt.in +++ b/README.txt.in @@ -1,5 +1,5 @@ RTEMS Embedded Realtime Operating System ----------------------------------------- +======================================== Release: @RELEASE@ Date : @DATE@ @@ -15,7 +15,9 @@ This release directory contains the source code for the RTEMS @RELEASE@ operating system and tools. All the documenation provided in HTML and PDF formats. -The release note are contained in rtems-@RELEASE@-release-notes.pdf. +The release note are contained in: + + <@RELEASE_URL@/rtems-@RELEASE@-release-notes.pdf> 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. @@ -26,17 +28,19 @@ Regards The RTEMS Development Team. RTEMS Web Sites -~~~~~~~~~~~~~~~ +--------------- - Home: https://www.rtems.org/ - Wiki: 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/ + Home : + Download : + Wiki : + Docs : + Bugs : + Lists : + Developer : + GIT : Release Files -~~~~~~~~~~~~~ +------------- @TABLE-START@ - README.txt | This document. @@ -55,35 +59,35 @@ Release Files @TABLE-END@ 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 + - `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 + - `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 + - `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 + - `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 + - `docs/rtems-docs-@RELEASE@-shell.pdf` + - `docs/rtems-docs-@RELEASE@-shell-html.tar.xz` - RTEMS Doxygen - - docs/rtems-docs-@RELEASE@-shell.pdf - - docs/rtems-docs-@RELEASE@-shell-html.tar.xz + - `docs/rtems-docs-@RELEASE@-shell.pdf` + - `docs/rtems-docs-@RELEASE@-shell-html.tar.xz` Quick Guide to Building ~~~~~~~~~~~~~~~~~~~~~~~ @@ -91,31 +95,31 @@ Quick Guide to Building For new user rhe Quick Start in the User Manual contains a details Quick Start guide. Download the User Manual: - @RELEASE_URL@/docs/rtems-docs-@RELEASE@-user.pdf + <@RELEASE_URL@/docs/rtems-docs-@RELEASE@-user.pdf> and follow the instructions in the Quick Start section. If are familiar with RTEMS or just want to get going the following steps will download the RTEMS Source Builder: - +``` cd mkdir -p development/rtems cd development/rtems wget @RELEASE_URL@/sources/rtems-source-builder-@RELEASE@.tar.xz tar Jxf rtems-source-builder-@RELEASE@.tar.xz cd rtems-source-builder-@RELEASE@/rtems - +``` To build the tools for the ARM architecture: - +``` ../source-builder/sb-set-builder \ --prefix=$HOME/development/rtems/@RELEASE@ \ @VERSION@/rtems-arm - +``` To build the tools, kernel and all packages for the Beagleboneblack: - +``` ../source-builder/sb-set-builder \ --prefix=$HOME/development/rtems/@RELEASE@ \ @VERSION@/bsps/beagleboneblack - +``` If you encounter a problem please post to the user@rtems.org mailing list. You can join the Users mailing at https://lists.rtems.org/. diff --git a/rtems-release b/rtems-release index f4bbfe3..a498005 100755 --- a/rtems-release +++ b/rtems-release @@ -144,42 +144,12 @@ echo "Collect tools sources" ./rtems-release-sources ${version} ${revision} ${release_url} # -# Create the README.txt. -# -# The initial stage is done in a few steps where the release files table is cut -# out of the input template file and formatted using the column command and -# inserted back. -# -escaped_release_url=$(echo ${release_url} | sed -e 's/\//\\\//g') -cat ${rtems_readme} | \ - sed -e "s/@RELEASE_URL@/${escaped_release_url}/g" \ - -e "s/@RELEASE@/${release}/g" \ - -e "s/@VERSION@/${version}/g" \ - -e "s/@REVISION@/${revision}/g" \ - -e "s/@DATE@/${now}/g" > ${release}/README.1.txt -cat ${release}/README.1.txt | \ - sed -n '/^@TABLE-START@/,/^@TABLE-END@/p' | \ - sed -e 's/@TABLE-START@//g' -e 's/@TABLE-END@//g' | \ - column -s '|' -t | \ - sed -e 's/$/\\/' > ${release}/README.2.txt -cat ${release}/README.1.txt | \ - sed -e "/@TABLE-START@/,/@TABLE-END@/c\\ -$(cat ${release}/README.2.txt)" > ${release}/README.txt -rm -f ${release}/README.1.txt ${release}/README.2.txt -if [ -n "${rtems_readme_release_notes}" ]; then - echo >> ${release}/README.txt - echo "Release Notes" >> ${release}/README.txt - echo "~~~~~~~~~~~~~" >> ${release}/README.txt - echo >> ${release}/README.txt - echo "${rtems_readme_release_notes}" >> ${release}/README.txt -fi -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 +# Create the release information +# +echo "Create the release information" +. ${release_top}/rtems-release-info +# # # Copy these release scripts to a contrib directory. # diff --git a/rtems-release-info b/rtems-release-info new file mode 100644 index 0000000..d4a4f61 --- /dev/null +++ b/rtems-release-info @@ -0,0 +1,72 @@ +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2020 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. +# + +# +# RTEMS Release Site Information +# +. ${release_top}/rtems-release-path + +# +# Create the README.txt. +# +# The initial stage is done in a few steps where the release files table is cut +# out of the input template file and formatted using the column command and +# inserted back. +# +cat ${rtems_readme} | \ + sed -e "s/@RELEASE_URL@/${escaped_release_path}/g" \ + -e "s/@RELEASE@/${release}/g" \ + -e "s/@VERSION@/${version}/g" \ + -e "s/@REVISION@/${revision}/g" \ + -e "s/@DATE@/${now}/g" > ${release}/README.1.txt +cat ${release}/README.1.txt | \ + sed -n '/^@TABLE-START@/,/^@TABLE-END@/p' | \ + sed -e 's/@TABLE-START@//g' -e 's/@TABLE-END@//g' | \ + column -s '|' -t | \ + sed -e 's/$/\\/' > ${release}/README.2.txt +cat ${release}/README.1.txt | \ + sed -e "/@TABLE-START@/,/@TABLE-END@/c\\ +$(cat ${release}/README.2.txt)" > ${release}/README.3.txt +cat ${release}/README.3.txt | \ + sed -e "s/[\`\<\>]//g" -e 's/[[:space:]]*$//' > ${release}/README.txt +rm -f ${release}/README.1.txt ${release}/README.2.txt ${release}/README.3.txt +if [ -n "${rtems_readme_release_notes}" ]; then + echo >> ${release}/README.txt + echo "Release Notes" >> ${release}/README.txt + echo "~~~~~~~~~~~~~" >> ${release}/README.txt + echo >> ${release}/README.txt + echo "${rtems_readme_release_notes}" >> ${release}/README.txt +fi +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 diff --git a/rtems-release-path b/rtems-release-path new file mode 100644 index 0000000..5e006ff --- /dev/null +++ b/rtems-release-path @@ -0,0 +1,52 @@ +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2020 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. +# + +# +# RTEMS Release Path +# + +# +# Create the release path. If an RC release use a subdirectory. If a monthly +# snapshot use a release subdirectory. +# +if [ \( $(echo "${release}" | sed -e 's/.*rc.*/yes/') = "yes" \) -o \ + \( $(echo "${release}" | sed -e 's/.*RC.*/yes/') = "yes" \) ]; then + rp="${release_url}/${version}/rc/${release}" +elif [ \( $(echo "${release}" | sed -e 's/.*-m.*/yes/') = "yes" \) ]; then + revision=$(echo "${release}" | sed -e 's/-m.*//') + rp="${release_url}/${version}/${revision}/${release}" +else + rp="${release_url}/${version}/${release}" +fi + +rtems_release_path=${rp} +rtems_release_sources=${rp}/sources + +escaped_release_path=$(echo ${rp} | sed -e 's/\//\\\//g') diff --git a/rtems-release-rsb-version b/rtems-release-rsb-version index c960dfc..961037a 100755 --- a/rtems-release-rsb-version +++ b/rtems-release-rsb-version @@ -63,21 +63,10 @@ echo "Package: ${package}" echo "Release: ${release}" # -# Set the release path. If an RC release use a subdirectory. -# -if [ \( $(echo "${release}" | sed -e 's/.*rc.*/yes/') = "yes" \) -o \ - \( $(echo "${release}" | sed -e 's/.*RC.*/yes/') = "yes" \) ]; then - rp="${release_url}/${version}/rc/${release}" - rp="${rp},${release_url}/${version}/rc/${release}/sources" -elif [ \( $(echo "${release}" | sed -e 's/.*-m.*/yes/') = "yes" \) ]; then - revision=$(echo "${release}" | sed -e 's/-m.*//') - rp="${release_url}/${version}/${revision}/${release}" - rp="${rp},${release_url}/${version}/${revision}/${release}/sources" -else - rp="${release_url}/${version}/${release}" - rp="${rp},${release_url}/${version}/${release}/sources" -fi -echo "release_path = ${rp}" >> ${prefix}/VERSION +# Get the release sources path and add it to the VERSION. +# +. ${release_top}/rtems-release-path +echo "release_path = ${rtems_release_sources}" >> ${prefix}/VERSION checksum=sha512 diff --git a/rtems-release-sources b/rtems-release-sources index 3e3f0da..c47a6ee 100755 --- a/rtems-release-sources +++ b/rtems-release-sources @@ -222,8 +222,7 @@ cd ${release} rm -rf ${workspace} # - # Remove any copies from the sources, the top level ones are the correct - # version. + # Remove any copies from the sources. # ls -1 ${sources} for p in $(ls -1 | grep ${sources}/rtems-*.tar.${comp_ext}) -- cgit v1.2.3