diff --git a/ChangeLog b/ChangeLog index 1deb6b6..3537193 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ Changes in version 1.12.1 * conf/02-specfile-formatting-rules.conf - Davide Madrisan: Update 'source0_name_structure' to allow *.tar.xz archives. + * test/*, pck-update - Davide Madrisan: + Update/add the code to check for the required external tools. + ------------------------------------------------------------------------------- Changes in version 1.12.0 diff --git a/plugins/pck-update.in b/plugins/pck-update.in index 12fc4f5..2af0602 100644 --- a/plugins/pck-update.in +++ b/plugins/pck-update.in @@ -310,7 +310,7 @@ fi # check if all the needed tools are available for tool in cat chmod cpio date file find fold ftp getopt grep \ - mktemp objdump readlink rpm rpmbuild rpm2cpio sed seq sort strings; do + mktemp readlink rpm rpmbuild rpm2cpio sed seq sort strings; do [ "$(type -p $tool)" ] || notify.error $"utility not found"": \`$tool'" done diff --git a/tests/test00_specsyntax.in b/tests/test00_specsyntax.in index 06114ed..60f51fa 100644 --- a/tests/test00_specsyntax.in +++ b/tests/test00_specsyntax.in @@ -17,6 +17,12 @@ if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then fi TEXTDOMAIN="test00_specsyntax"; export TEXTDOMAIN +# check if all the needed tools are available +for tool in cat file getopt grep sed; do + [ "$(type -p $tool)" ] || + notify.error $"utility not found"": \`$tool'" +done + # function specfile.checksyntax() # do some syntax checks in the specfile of the building package # args: diff --git a/tests/test01_pkgquality.in b/tests/test01_pkgquality.in index 7cc2359..6e0f858 100644 --- a/tests/test01_pkgquality.in +++ b/tests/test01_pkgquality.in @@ -18,8 +18,7 @@ fi TEXTDOMAIN="test01_pkgquality"; export TEXTDOMAIN # check if all the needed tools are available -for tool in cat chmod cpio date file find fold ftp getopt grep \ - mktemp ldd objdump; do +for tool in file find getopt grep ls ldd; do [ "$(type -p $tool)" ] || notify.error $"utility not found"": \`$tool'" done diff --git a/tests/test02_pkgsecurity.in b/tests/test02_pkgsecurity.in index 0c17889..f1fbe15 100644 --- a/tests/test02_pkgsecurity.in +++ b/tests/test02_pkgsecurity.in @@ -17,6 +17,12 @@ if [[ -z "$LANG" && -r /etc/sysconfig/i18n ]]; then fi TEXTDOMAIN="test02_pkgsecurity"; export TEXTDOMAIN +# check if all the needed tools are available +for tool in file find getopt grep objdump sed; do + [ "$(type -p $tool)" ] || + notify.error $"utility not found"": \`$tool'" +done + function alltests() { # FIXME: add to 'po' file notify.note " ${NOTE}"$"performing security checks""${NORM}""..."