From 6a7c2181fc38051c81f5382b948e49a2039e6a09 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Thu, 29 Jun 2017 17:01:00 +0000 Subject: [PATCH] merge trunk r3972-3973 --- BLFS/gen_pkg_book.sh | 2 +- CLFS/master.sh | 2 +- CLFS2/master.sh | 2 +- CLFS3/master.sh | 2 +- HLFS/master.sh | 2 +- LFS/master.sh | 2 +- common/create-sbu_du-report.sh | 6 ++++-- common/libs/func_book_parser | 16 ++++++++-------- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/BLFS/gen_pkg_book.sh b/BLFS/gen_pkg_book.sh index f0165d9..8a1589c 100755 --- a/BLFS/gen_pkg_book.sh +++ b/BLFS/gen_pkg_book.sh @@ -178,7 +178,7 @@ done echo -en "\n\tGenerating the build scripts ...\n" rm -rf scripts xsltproc --xinclude --nonet \ - --stringparam sudo $SUDO \ + --stringparam sudo "$SUDO" \ -o ./scripts/ ${MakeScripts} \ ${BookXml} # Make the scripts executable. diff --git a/CLFS/master.sh b/CLFS/master.sh index a3895c4..375aa08 100644 --- a/CLFS/master.sh +++ b/CLFS/master.sh @@ -1121,7 +1121,7 @@ CUSTOM_TOOLS: $custom_list create-sbu_du-report: mk_SYSTOOLS @\$(call echo_message, Building) @if [ "\$(ADD_REPORT)" = "y" ]; then \\ - ./create-sbu_du-report.sh logs $VERSION; \\ + ./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\ \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ fi; @touch \$@ diff --git a/CLFS2/master.sh b/CLFS2/master.sh index f85db31..96d5eda 100644 --- a/CLFS2/master.sh +++ b/CLFS2/master.sh @@ -502,7 +502,7 @@ ROOT: $chowning create-sbu_du-report: mk_LUSER @\$(call echo_message, Building) @if [ "\$(ADD_REPORT)" = "y" ]; then \\ - ./create-sbu_du-report.sh logs $VERSION; \\ + ./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\ \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ fi; @touch \$@ diff --git a/CLFS3/master.sh b/CLFS3/master.sh index aa50529..30ee0ff 100644 --- a/CLFS3/master.sh +++ b/CLFS3/master.sh @@ -551,7 +551,7 @@ ROOT: $chowning create-sbu_du-report: mk_LUSER @\$(call echo_message, Building) @if [ "\$(ADD_REPORT)" = "y" ]; then \\ - ./create-sbu_du-report.sh logs $VERSION; \\ + ./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\ \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ fi; @touch \$@ diff --git a/HLFS/master.sh b/HLFS/master.sh index 5d12ec4..21d3b74 100644 --- a/HLFS/master.sh +++ b/HLFS/master.sh @@ -616,7 +616,7 @@ BLFS_TOOL: $blfs_tool create-sbu_du-report: mk_BOOT @\$(call echo_message, Building) @if [ "\$(ADD_REPORT)" = "y" ]; then \\ - ./create-sbu_du-report.sh logs $VERSION; \\ + ./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\ \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ fi; @touch \$@ diff --git a/LFS/master.sh b/LFS/master.sh index 69ddc28..0272601 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -574,7 +574,7 @@ CUSTOM_TOOLS: $custom_list create-sbu_du-report: mk_BOOT @\$(call echo_message, Building) @if [ "\$(ADD_REPORT)" = "y" ]; then \\ - sudo ./create-sbu_du-report.sh logs $VERSION; \\ + sudo ./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\ \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ fi; @touch \$@ diff --git a/common/create-sbu_du-report.sh b/common/create-sbu_du-report.sh index cae693d..aac4a59 100755 --- a/common/create-sbu_du-report.sh +++ b/common/create-sbu_du-report.sh @@ -5,12 +5,13 @@ set -e LOGSDIR=$1 VERSION=$2 +DATE=$3 LINE="================================================================================" # Make sure that we have a directory as first argument [[ ! -d "$LOGSDIR" ]] && \ - echo -e "\nUSAGE: create-sbu_du-report.sh logs_directory [book_version]\n" && exit + echo -e "\nUSAGE: create-sbu_du-report.sh logs_directory [book_version] [date]\n" && exit # Make sure that the first argument is a jhalfs logs directory [[ ! -f "$LOGSDIR"/000-masterscript.log ]] && \ @@ -18,6 +19,7 @@ LINE="========================================================================== # If this script is run manually, the book version may be unknown [[ -z "$VERSION" ]] && VERSION=unknown +[[ -z "$DATE" ]] && DATE=$(date --iso-8601) # If there is iteration logs directories, copy the logs inside iteration-1 # to the top level dir @@ -25,7 +27,7 @@ LINE="========================================================================== cp $LOGSDIR/build_1/* $LOGSDIR # Set the report file -REPORT="$VERSION"-SBU_DU-$(date --iso-8601).report +REPORT="$VERSION"-SBU_DU-"$DATE".report [ -f $REPORT ] && : >$REPORT diff --git a/common/libs/func_book_parser b/common/libs/func_book_parser index cc49edb..2a493af 100644 --- a/common/libs/func_book_parser +++ b/common/libs/func_book_parser @@ -142,16 +142,16 @@ extract_commands() { # echo -n " ${L_arrow}${BOLD}$MODEL + $KERNEL${R_arrow} HLFS flavour... " xsltproc --nonet \ --xinclude \ - --stringparam model $MODEL \ - --stringparam kernel $KERNEL \ - --stringparam testsuite $TEST \ - --stringparam bomb-testsuite $BOMB_TEST \ + --stringparam model "$MODEL" \ + --stringparam kernel "$KERNEL" \ + --stringparam testsuite "$TEST" \ + --stringparam bomb-testsuite "$BOMB_TEST" \ --stringparam features \ x$SSP$ASLR$PAX$HARDENED_TMP$WARNINGS$MISC$BLOWFISH \ - --stringparam timezone $TIMEZONE \ - --stringparam page $PAGE \ - --stringparam lang $LANG \ - --stringparam grsecurity_host $GRSECURITY_HOST \ + --stringparam timezone "$TIMEZONE" \ + --stringparam page "$PAGE" \ + --stringparam lang "$LANG" \ + --stringparam grsecurity_host "$GRSECURITY_HOST" \ --output ./${PROGNAME}-commands/ \ $XSL \ $BOOK/index.xml >>$LOGDIR/$LOG 2>&1