From: Nick Clifton Date: Thu, 31 May 2018 15:01:00 +0000 (+0100) Subject: Remove .sh extension from scripts X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=bef10cb381b7d91fcf2a61ecf0896a68f4548b6e;p=annobin.git Remove .sh extension from scripts --- diff --git a/doc/annobin.1 b/doc/annobin.1 index d89bd71..a31efdb 100644 --- a/doc/annobin.1 +++ b/doc/annobin.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ANNOBIN 1" -.TH ANNOBIN 1 "2018-04-20" "annobin-1" "RPM Development Tools" +.TH ANNOBIN 1 "2018-05-31" "annobin-1" "RPM Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/annobin.info b/doc/annobin.info index 9c9e318..a3be856 100644 --- a/doc/annobin.info +++ b/doc/annobin.info @@ -416,18 +416,18 @@ the binary information can be used. The scripts are: * Menu: -* Who Built Me:: The built-by.sh script -* ABI Checking:: The check-abi.sh script -* Hardening Checks:: The hardened.sh script -* Checking Archives:: The run-on-binaries-in.sh script +* Who Built Me:: The built-by script +* ABI Checking:: The check-abi script +* Hardening Checks:: The hardened script +* Checking Archives:: The run-on-binaries-in script  File: annobin.info, Node: Who Built Me, Next: ABI Checking, Up: Using -4.1 The built-by.sh script -========================== +4.1 The built-by script +======================= - built-by.sh + built-by [-help] [-version] [-verbose] @@ -445,8 +445,8 @@ File: annobin.info, Node: Who Built Me, Next: ABI Checking, Up: Using [-] FILE... - The 'built-by.sh' script reports the name and version of the tool -used to build the specified file(s). This script also demonstrates how + The 'built-by' script reports the name and version of the tool used +to build the specified file(s). This script also demonstrates how information can be extracted from other other locations in the file, not just the binary annotation notes. @@ -526,10 +526,10 @@ version of a tool that was built between a range of dates.  File: annobin.info, Node: ABI Checking, Next: Hardening Checks, Prev: Who Built Me, Up: Using -4.2 The check-abi.sh script -=========================== +4.2 The check-abi script +======================== - check-abi.sh + check-abi [-help] [-version] [-verbose] @@ -543,7 +543,7 @@ File: annobin.info, Node: ABI Checking, Next: Hardening Checks, Prev: Who Bui [-] FILE... - The 'check-abi.sh' script reports any potential ABI conflicts in the + The 'check-abi' script reports any potential ABI conflicts in the files specified. This includes the use of the '-fshort-enums' option, the '-fstack-protector' option and the '-D_FORTIFY_SOURCE' option. All of these can affect passing data between functions and hence should be @@ -611,10 +611,10 @@ used uniformly throughout the binary.  File: annobin.info, Node: Hardening Checks, Next: Checking Archives, Prev: ABI Checking, Up: Using -4.3 The hardened.sh script -========================== +4.3 The hardened script +======================= - hardened.sh + hardened [-help] [-version] [-verbose] @@ -631,7 +631,7 @@ File: annobin.info, Node: Hardening Checks, Next: Checking Archives, Prev: AB [-] FILE... - The 'hardened.sh' script reports on the hardening status of the + The 'hardened' script reports on the hardening status of the specified file(s). In particular it checks that the whole file was compiled with '-O2' or higher and the '-fstack-protector-strong', '-D_FORTIFY_SOURCE=2', '-Wl,-z,now', '-Wl,-z,relro', '-fPIE', @@ -758,10 +758,10 @@ compiled with '-O2' or higher and the '-fstack-protector-strong',  File: annobin.info, Node: Checking Archives, Prev: Hardening Checks, Up: Using -4.4 The run-on-binaries-in.sh script -==================================== +4.4 The run-on-binaries-in script +================================= - run-on-binaries-in.sh + run-on-binaries-in [-help] [-version] [-verbose] @@ -776,14 +776,14 @@ File: annobin.info, Node: Checking Archives, Prev: Hardening Checks, Up: Usin [program-options] FILE... - The 'run-on-binaries-in.sh' script allows other scripts, or programs, -to be run on the executable files contained inside archives. This -includes 'rpm' files, 'tar' and 'ar' files and compressed files. + The 'run-on-binaries-in' script allows other scripts, or programs, to +be run on the executable files contained inside archives. This includes +'rpm' files, 'tar' and 'ar' files and compressed files. The script does not recurse into directories, but this can be handled by the 'find' command, like this: - find . -type f -exec run-on-binaries-in.sh {} \; + find . -type f -exec run-on-binaries-in {} \; The script accepts the following command line options: @@ -1340,10 +1340,10 @@ Node: The CF Encoding13400 Node: The CET Encoding14470 Node: The ENUM Encoding15264 Node: Using15621 -Node: Who Built Me16136 -Node: ABI Checking18899 -Node: Hardening Checks21016 -Node: Checking Archives25105 -Node: GNU FDL27533 +Node: Who Built Me16124 +Node: ABI Checking18875 +Node: Hardening Checks20980 +Node: Checking Archives25057 +Node: GNU FDL27470  End Tag Table diff --git a/doc/annobin.texi b/doc/annobin.texi index 6e5ecb8..268c688 100644 --- a/doc/annobin.texi +++ b/doc/annobin.texi @@ -480,21 +480,21 @@ The @command{annobin} package includes some example scripts that demonstrate how the binary information can be used. The scripts are: @menu -* Who Built Me:: The built-by.sh script -* ABI Checking:: The check-abi.sh script -* Hardening Checks:: The hardened.sh script -* Checking Archives:: The run-on-binaries-in.sh script +* Who Built Me:: The built-by script +* ABI Checking:: The check-abi script +* Hardening Checks:: The hardened script +* Checking Archives:: The run-on-binaries-in script @end menu @c ----------------------------------------------------------------- @node Who Built Me -@section The built-by.sh script +@section The built-by script @c man title built-by Who Built Me @smallexample @c man begin SYNOPSIS built-by -built-by.sh +built-by [@b{--help}] [@b{--version}] [@b{--verbose}] @@ -516,7 +516,7 @@ built-by.sh @c man begin DESCRIPTION built-by -The @file{built-by.sh} script reports the name and version of the tool +The @file{built-by} script reports the name and version of the tool used to build the specified file(s). This script also demonstrates how information can be extracted from other other locations in the file, not just the binary annotation notes. @@ -600,13 +600,13 @@ run on files whose names starts with a dash. @c ----------------------------------------------------------------- @node ABI Checking -@section The check-abi.sh script +@section The check-abi script @c man title check-abi ABI Checking @smallexample @c man begin SYNOPSIS check-abi -check-abi.sh +check-abi [@b{--help}] [@b{--version}] [@b{--verbose}] @@ -624,7 +624,7 @@ check-abi.sh @c man begin DESCRIPTION check-abi -The @file{check-abi.sh} script reports any potential ABI conflicts in +The @file{check-abi} script reports any potential ABI conflicts in the files specified. This includes the use of the @option{-fshort-enums} option, the @option{-fstack-protector} option and the @option{-D_FORTIFY_SOURCE} option. All of these can affect @@ -698,13 +698,13 @@ run on files whose names starts with a dash. @c ----------------------------------------------------------------- @node Hardening Checks -@section The hardened.sh script +@section The hardened script @c man title hardened Hardening Checks @smallexample @c man begin SYNOPSIS hardened -hardened.sh +hardened [@b{--help}] [@b{--version}] [@b{--verbose}] @@ -725,7 +725,7 @@ hardened.sh @c man begin DESCRIPTION hardened -The @file{hardened.sh} script reports on the hardening status of the +The @file{hardened} script reports on the hardening status of the specified file(s). In particular it checks that the whole file was compiled with @option{-O2} or higher and the @option{-fstack-protector-strong}, @option{-D_FORTIFY_SOURCE=2}, @@ -860,13 +860,13 @@ run on files whose names starts with a dash. @c ----------------------------------------------------------------- @node Checking Archives -@section The run-on-binaries-in.sh script +@section The run-on-binaries-in script @c man title run-on-binries Checking Archives @smallexample @c man begin SYNOPSIS run-on-binaries -run-on-binaries-in.sh +run-on-binaries-in [@b{--help}] [@b{--version}] [@b{--verbose}] @@ -885,7 +885,7 @@ run-on-binaries-in.sh @c man begin DESCRIPTION run-on-binaries -The @file{run-on-binaries-in.sh} script allows other scripts, or +The @file{run-on-binaries-in} script allows other scripts, or programs, to be run on the executable files contained inside archives. This includes @samp{rpm} files, @samp{tar} and @samp{ar} files and compressed files. @@ -894,7 +894,7 @@ The script does not recurse into directories, but this can be handled by the @code{find} command, like this: @smallexample - find . -type f -exec run-on-binaries-in.sh @{@} \; + find . -type f -exec run-on-binaries-in @{@} \; @end smallexample The script accepts the following command line options: diff --git a/doc/built-by.1 b/doc/built-by.1 index 129a580..d42955e 100644 --- a/doc/built-by.1 +++ b/doc/built-by.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BUILT-BY 1" -.TH BUILT-BY 1 "2018-04-20" "annobin-1" "RPM Development Tools" +.TH BUILT-BY 1 "2018-05-31" "annobin-1" "RPM Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -138,7 +138,7 @@ built\-by \- Who Built Me .SH "SYNOPSIS" .IX Header "SYNOPSIS" -built\-by.sh +built-by [\fB\-\-help\fR] [\fB\-\-version\fR] [\fB\-\-verbose\fR] @@ -157,7 +157,7 @@ built\-by.sh \fIfile\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" -The \fIbuilt\-by.sh\fR script reports the name and version of the tool +The \fIbuilt-by\fR script reports the name and version of the tool used to build the specified file(s). This script also demonstrates how information can be extracted from other other locations in the file, not just the binary annotation notes. diff --git a/doc/check-abi.1 b/doc/check-abi.1 index c9911b6..129137c 100644 --- a/doc/check-abi.1 +++ b/doc/check-abi.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "CHECK-ABI 1" -.TH CHECK-ABI 1 "2018-04-20" "annobin-1" "RPM Development Tools" +.TH CHECK-ABI 1 "2018-05-31" "annobin-1" "RPM Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -138,7 +138,7 @@ check\-abi \- ABI Checking .SH "SYNOPSIS" .IX Header "SYNOPSIS" -check\-abi.sh +check-abi [\fB\-\-help\fR] [\fB\-\-version\fR] [\fB\-\-verbose\fR] @@ -153,7 +153,7 @@ check\-abi.sh \fIfile\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" -The \fIcheck\-abi.sh\fR script reports any potential \s-1ABI\s0 conflicts in +The \fIcheck-abi\fR script reports any potential \s-1ABI\s0 conflicts in the files specified. This includes the use of the \&\fB\-fshort\-enums\fR option, the \fB\-fstack\-protector\fR option and the \fB\-D_FORTIFY_SOURCE\fR option. All of these can affect diff --git a/doc/hardened.1 b/doc/hardened.1 index 17fb615..afe5f83 100644 --- a/doc/hardened.1 +++ b/doc/hardened.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "HARDENED 1" -.TH HARDENED 1 "2018-05-30" "annobin-1" "RPM Development Tools" +.TH HARDENED 1 "2018-05-31" "annobin-1" "RPM Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -138,7 +138,7 @@ hardened \- Hardening Checks .SH "SYNOPSIS" .IX Header "SYNOPSIS" -hardened.sh +hardened [\fB\-\-help\fR] [\fB\-\-version\fR] [\fB\-\-verbose\fR] @@ -156,7 +156,7 @@ hardened.sh \fIfile\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" -The \fIhardened.sh\fR script reports on the hardening status of the +The \fIhardened\fR script reports on the hardening status of the specified file(s). In particular it checks that the whole file was compiled with \fB\-O2\fR or higher and the \&\fB\-fstack\-protector\-strong\fR, \fB\-D_FORTIFY_SOURCE=2\fR, diff --git a/doc/run-on-binaries.1 b/doc/run-on-binaries.1 index d8ba306..33d8ced 100644 --- a/doc/run-on-binaries.1 +++ b/doc/run-on-binaries.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RUN-ON-BINARIES 1" -.TH RUN-ON-BINARIES 1 "2018-04-20" "annobin-1" "RPM Development Tools" +.TH RUN-ON-BINARIES 1 "2018-05-31" "annobin-1" "RPM Development Tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -138,7 +138,7 @@ annobin \- Annobin .SH "SYNOPSIS" .IX Header "SYNOPSIS" -run\-on\-binaries\-in.sh +run-on-binaries-in [\fB\-\-help\fR] [\fB\-\-version\fR] [\fB\-\-verbose\fR] @@ -154,7 +154,7 @@ run\-on\-binaries\-in.sh \fIfile\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" -The \fIrun\-on\-binaries\-in.sh\fR script allows other scripts, or +The \fIrun-on-binaries-in\fR script allows other scripts, or programs, to be run on the executable files contained inside archives. This includes \fBrpm\fR files, \fBtar\fR and \fBar\fR files and compressed files. @@ -163,7 +163,7 @@ The script does not recurse into directories, but this can be handled by the \f(CW\*(C`find\*(C'\fR command, like this: .PP .Vb 1 -\& find . \-type f \-exec run\-on\-binaries\-in.sh {} \e; +\& find . \-type f \-exec run\-on\-binaries\-in {} \e; .Ve .PP The script accepts the following command line options: diff --git a/scripts/Makefile.am b/scripts/Makefile.am index cc9111a..7f2aef1 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -6,4 +6,4 @@ ## Process this file with automake to produce Makefile.in. -dist_bin_SCRIPTS = built-by.sh check-abi.sh hardened.sh run-on-binaries-in.sh +dist_bin_SCRIPTS = built-by check-abi hardened run-on-binaries-in diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 3edc9d1..e4aa098 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -240,7 +240,7 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -dist_bin_SCRIPTS = built-by.sh check-abi.sh hardened.sh run-on-binaries-in.sh +dist_bin_SCRIPTS = built-by check-abi hardened run-on-binaries-in all: all-am .SUFFIXES: diff --git a/scripts/built-by.sh b/scripts/built-by similarity index 99% rename from scripts/built-by.sh rename to scripts/built-by index a6fb7d6..9ce7435 100755 --- a/scripts/built-by.sh +++ b/scripts/built-by @@ -22,7 +22,7 @@ # It is intended that if recursion is needed then it will be # invoked from find, like this: # -# find . -type f -exec built-by.sh {} \; +# find . -type f -exec built-by {} \; version=3.1 diff --git a/scripts/check-abi.sh b/scripts/check-abi similarity index 99% rename from scripts/check-abi.sh rename to scripts/check-abi index 09498f8..996e8e1 100755 --- a/scripts/check-abi.sh +++ b/scripts/check-abi @@ -16,13 +16,13 @@ # GNU General Public License for more details. # # Usage: -# check-abi.sh [switches] file(s) +# check-abi [switches] file(s) # # This script does not handle directories. This is deliberate. # It is intended that if recursion is needed then it will be # invoked from find, like this: # -# find . -type f -exec check-abi.sh {} \; +# find . -type f -exec check-abi {} \; version=3.2 diff --git a/scripts/hardened.sh b/scripts/hardened similarity index 99% rename from scripts/hardened.sh rename to scripts/hardened index 26a019b..77ec3bd 100755 --- a/scripts/hardened.sh +++ b/scripts/hardened @@ -17,13 +17,13 @@ # Usage: -# hardened.sh [switches] file(s) +# hardened [switches] file(s) # # This script does not handle directories. This is deliberate. # It is intended that if recursion is needed then it will be # invoked from find, like this: # -# find . -type f -exec hardened.sh {} \; +# find . -type f -exec hardened {} \; # To Do: # * Allow arguments to command line options to be separated from the diff --git a/scripts/run-on-binaries-in.sh b/scripts/run-on-binaries-in similarity index 97% rename from scripts/run-on-binaries-in.sh rename to scripts/run-on-binaries-in index 0e34752..0ab1a08 100755 --- a/scripts/run-on-binaries-in.sh +++ b/scripts/run-on-binaries-in @@ -22,7 +22,7 @@ # It is intended that if recursion is needed then it will be # invoked from find, like this: # -# find . -name "*.rpm" -exec run-on-binaries-in.sh {} \; +# find . -name "*.rpm" -exec run-on-binaries-in {} \; version=1.0 @@ -56,14 +56,14 @@ Usage: $prog {options} program {options-for-the-program} files(s) Examples: - $prog hardened.sh foo.rpm - Runs the hardened.sh script on the executable + $prog hardened foo.rpm + Runs the hardened script on the executable files inside foo.rpm. - $prog check-abi.sh -v fred.tar.xz - Runs the check-abi.sh script on the decompressed + $prog check-abi -v fred.tar.xz + Runs the check-abi script on the decompressed contents of the fred.tar.xz archive, passing the - -v option to check-abi.sh as it does so. + -v option to check-abi as it does so. $prog -V -f=list.txt readelf -a Runs the readelf program, with the -a option on diff --git a/tests/abi-test b/tests/abi-test index 0a99d19..c03618a 100755 --- a/tests/abi-test +++ b/tests/abi-test @@ -73,7 +73,7 @@ $GCC -fplugin=$PLUGIN \ # annobin notes, but crti.o dies not. Thus *any* program built with normal # startup code will contain a gap. # FIXME: Remove once we have the assembler generating notes. -$srcdir/../scripts/check-abi.sh --readelf=$READELF --inconsistencies \ +$srcdir/../scripts/check-abi --readelf=$READELF --inconsistencies \ --ignore-FORTIFY --ignore-stack-prot \ --ignore-gaps --ignore-ABI \ abi-test.exe diff --git a/tests/hardening-fail-test b/tests/hardening-fail-test index 3d83c84..0320590 100755 --- a/tests/hardening-fail-test +++ b/tests/hardening-fail-test @@ -63,5 +63,5 @@ $GCC -fplugin=$PLUGIN \ # $OBJCOPY --merge-notes hardening-fail-test.exe hardening-fail-test-merged.exe -$srcdir/../scripts/hardened.sh --readelf=$READELF --all hardening-fail-test.exe +$srcdir/../scripts/hardened --readelf=$READELF --all hardening-fail-test.exe diff --git a/tests/hardening-test b/tests/hardening-test index bc00df0..1e109eb 100755 --- a/tests/hardening-test +++ b/tests/hardening-test @@ -41,7 +41,7 @@ $GCC -fplugin=$PLUGIN \ # 2.30 (or later) readelf, and which were generated by a plugin attached to # a version 8 (or later) gcc. Since neither of these versions of the tools # are in common use (yet) the checks are disabled. -# The other hardening properties can be deduced by the hardened.sh script +# The other hardening properties can be deduced by the hardened script # without needing the notes produced by annobin, so that is why the test is # allowed to proceed. # FIXME: Remove the --skip= options once readelf and gcc have been updated. @@ -50,7 +50,7 @@ $GCC -fplugin=$PLUGIN \ # is built with -fPIC and -fno-stack-protection. /usr/lib64/Scrti.o is built # with -fpie which makes the pic test impossible. -$srcdir/../scripts/hardened.sh --readelf=$READELF \ +$srcdir/../scripts/hardened --readelf=$READELF \ --skip=fort -k=operator --skip=clash --skip=cf -k=cet \ --skip=pic --skip=stack --skip=realign \ hardening-test.exe