From: Nick Clifton Date: Thu, 9 Sep 2021 13:49:53 +0000 (+0100) Subject: Update make-release script X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=721ccf8c3f84c67eb711b33ddb61ec6f0b66e27c;p=annobin.git Update make-release script --- diff --git a/annocheck/hardened.c b/annocheck/hardened.c index 71109f6..3a048f2 100644 --- a/annocheck/hardened.c +++ b/annocheck/hardened.c @@ -60,6 +60,7 @@ static bool fixed_format_messages = false; static bool enable_colour = true; static bool full_filenames_set = false; static bool full_filenames = false; +static bool provide_url_set = false; static bool provide_url = true; #define FIXED_FORMAT_STRING "%s: test: %s file: %s" @@ -458,6 +459,14 @@ skip (annocheck_data * data, uint testnum, const char * source, const char * rea einfo (PARTIAL, "\n"); } +static inline void +show_url (uint testnum, const char * filename) +{ + if (provide_url) + einfo (PARTIAL, "%s: %s: info: For more information visit: %s\n", + HARDENED_CHECKER_NAME, filename, tests[testnum].doc_url); +} + static void fail (annocheck_data * data, uint testnum, @@ -501,9 +510,7 @@ fail (annocheck_data * data, einfo (PARTIAL, "\n"); - if (provide_url) - einfo (INFO, "%s: For more information visit: %s", - filename, tests[testnum].doc_url); + show_url (testnum, filename); } tests[testnum].state = STATE_FAILED; @@ -547,9 +554,7 @@ maybe (annocheck_data * data, einfo (PARTIAL, "\n"); - if (provide_url) - einfo (INFO, "%s: For more information visit: %s", - filename, tests[testnum].doc_url); + show_url (testnum, filename); } if (tests[testnum].state != STATE_FAILED) @@ -1062,7 +1067,13 @@ start (annocheck_data * data) full_filenames = BE_VERBOSE ? true : false; full_filenames_set = true; } - + + if (! provide_url_set) + { + provide_url = BE_VERBOSE ? true : false; + provide_url_set = true; + } + /* Handle mutually exclusive tests. */ if (tests [TEST_BRANCH_PROTECTION].enabled && tests [TEST_NOT_BRANCH_PROTECTION].enabled) { @@ -4465,12 +4476,14 @@ process_arg (const char * arg, const char ** argv, const uint argc, uint * next) if (streq (arg, "provide-urls")) { provide_url = true; + provide_url_set = true; return true; } if (streq (arg, "no-urls")) { provide_url = false; + provide_url_set = true; return true; } diff --git a/doc/annobin.info b/doc/annobin.info index 3b2bbea..5e0bb2a 100644 --- a/doc/annobin.info +++ b/doc/annobin.info @@ -1943,11 +1943,11 @@ File: annobin.info, Node: Hardened Command Line Options, Next: Waiving Hardene '--no-urls' '--provide-urls' By default when a FAIL or MAYB result is displayed by the HARDENED - checker a URL to the online version of the relevant section in this - document is also provided. (Unless the '--fixed-format-messages' - option has been enabled). The '--no-urls' option disables the - display of the URLs and the '--provide-urls' re-enables the - display. + checker and '--verbose' is enabled, a URL to the online version of + the relevant section in this document is also displayed. (Unless + the '--fixed-format-messages' option has been enabled). The + '--no-urls' option disables the display of the URLs and the + '--provide-urls' re-enables the display (even in non-verbose mode).  File: annobin.info, Node: Waiving Hardened Results, Prev: Hardened Command Line Options, Up: Hardened @@ -3112,17 +3112,17 @@ Node: Test only go75538 Node: Test warnings76691 Node: Test instrumentation77529 Node: Hardened Command Line Options78282 -Node: Waiving Hardened Results81421 -Node: Notes82805 -Node: Size83441 -Node: Timing85584 -Node: Configure Options86223 -Node: Legacy Scripts88562 -Node: Who Built Me89337 -Node: ABI Checking92097 -Node: Hardening Checks94213 -Node: Checking Archives98299 -Node: GNU FDL100720 +Node: Waiving Hardened Results81477 +Node: Notes82861 +Node: Size83497 +Node: Timing85640 +Node: Configure Options86279 +Node: Legacy Scripts88618 +Node: Who Built Me89393 +Node: ABI Checking92153 +Node: Hardening Checks94269 +Node: Checking Archives98355 +Node: GNU FDL100776  End Tag Table diff --git a/doc/annobin.texi b/doc/annobin.texi index a29937f..cc569c2 100644 --- a/doc/annobin.texi +++ b/doc/annobin.texi @@ -2084,11 +2084,12 @@ enabled in @option{verbose} mode. This option and its inverse @item --no-urls @itemx --provide-urls By default when a FAIL or MAYB result is displayed by the -@var{hardened} checker a URL to the online version of the relevant -section in this document is also provided. (Unless the -@option{--fixed-format-messages} option has been enabled). The -@option{--no-urls} option disables the display of the URLs and the -@option{--provide-urls} re-enables the display. +@var{hardened} checker and @option{--verbose} is enabled, a URL to the +online version of the relevant section in this document is also +displayed. (Unless the @option{--fixed-format-messages} option has +been enabled). The @option{--no-urls} option disables the display of +the URLs and the @option{--provide-urls} re-enables the display (even +in non-verbose mode). @end table diff --git a/scripts/make-release.sh b/scripts/make-release.sh index a0d5073..c3ac5fb 100755 --- a/scripts/make-release.sh +++ b/scripts/make-release.sh @@ -1,7 +1,7 @@ #!/bin/bash version=`grep ANNOBIN_VERSION current/annobin-global.h | cut -f 3 -d ' '` -release=`echo $version | cut -b1`.`echo $version | cut -b2-3` +release=`echo $version | cut -b1-2`.`echo $version | cut -b3-4` rm -fr annobin-$release annobin-gcc-plugin-$release annobin-$release.tar.xz annobin-gcc-plugin-$release.tar.xz