diff --git a/ChangeLog b/ChangeLog index cf4aede..b3c14db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,66 @@ -Changes in version 1.16.3 - Christmas Release +Changes in version 1.16.4 - "Korbielow" release +Sat Jul 13 2013 Madrisan + ++ bugfix + * lib/libtest.lib - Davide Madrisan: + Replace 'notify --error' by 'notify.error'. + + * tests/test01_pkgquality - Davide Madrisan: + Test for bad BuildArch tags: modify regexp to catch OCaml library files. + + * tests/test01_pkgquality - Davide Madrisan: + Check for wrong file attributes in bin and lib directories: + Do ignore files with name matching '*.so.owner'. These are text files + used by OCaml. + ++ update + * conf/02-specfile-rpm-groups.conf - Davide Madrisan: + Add specific rpm groups for OCaml libraries and development packages. + ++ improvement + * templates/ocaml-libs, templates/Makefile - Davide Madrisan: + New autospec template for OCaml libraries. + + * plugins/spec-create - Davide Madrisan: + Add support for the new template ocaml-libs. + + * conf/02-specfile-rpm-macros-ocaml.conf - Davide Madrisan: + New configuration file for the OCaml (library) modules. + ++ update + + * po/it/pck-update.po - Davide Madrisan: + Update the italian translation strings. + + * italian manpage - Davide Madrisan: + Document the new template ocaml-libs. + + * test00_specsyntax - Davide Madrisan: + Remove the test about the provided infopages because it's a duplicate of + the test implemented in 'test01_pkgquality'. + ++ improvement + * test01_pkgquality - Davide Madrisan: + Improve the test for not or badly installed infopages and make a better + help message. + ++ bugfix + * pck-update - Silvan Calarco: + Don't clone from git repository at every build is source with current + version already exists. + + * pck-update - Silvan Calarco: + Fix update of git urls starting with and https:// + Source URLs from git don't just end with '.git', btw they can be detected + by searching for '.git/'. + + * lib/libnetwork.lib - Silvan Calarco: + Fix necessary and tested with code.google.com + Additionally print full 'git clone ..' command line used in debug output. + +------------------------------------------------------------------------------- + +Changes in version 1.16.3 Mon Mar 04 2013 Madrisan + bugfix diff --git a/conf/02-specfile-rpm-groups.conf b/conf/02-specfile-rpm-groups.conf index 258b928..d8d5bf2 100644 --- a/conf/02-specfile-rpm-groups.conf +++ b/conf/02-specfile-rpm-groups.conf @@ -36,6 +36,7 @@ Development/Kernel Development/Languages Development/Libraries Development/Libraries/Java +Development/Libraries/OCaml Development/Libraries/Perl Development/Libraries/Python Development/Tools @@ -85,6 +86,7 @@ System/Hardware System/Internationalization System/Libraries System/Libraries/Java +System/Libraries/OCaml System/Libraries/Perl System/Libraries/PHP System/Libraries/Python diff --git a/conf/02-specfile-rpm-macros-ocaml.conf b/conf/02-specfile-rpm-macros-ocaml.conf new file mode 100644 index 0000000..2e684c2 --- /dev/null +++ b/conf/02-specfile-rpm-macros-ocaml.conf @@ -0,0 +1,5 @@ +## Macros for OCaml packages -------------------------------------------------- + +# Force a name structure for OCaml packages +# Set to "" if you don't want to fix a structure +ocaml_module_name_structure="^ocaml-" diff --git a/lib/libtest.lib.in b/lib/libtest.lib.in index 972ff04..f2d7beb 100644 --- a/lib/libtest.lib.in +++ b/lib/libtest.lib.in @@ -93,11 +93,11 @@ can't create temporary directory"": $tmpextractdir/$i" pushd $tmpextractdir/$i >/dev/null rpm2cpio $pck > rpm_extract_tmp.cpio [ $? -eq 0 ] || - notify --error $"cannot extract files from rpm archive" + notify.error $"cannot extract files from rpm archive" cpio --quiet --extract --make-directories < rpm_extract_tmp.cpio [ $? -eq 0 ] || - notify --error $"cannot extract files from cpio archive" + notify.error $"cannot extract files from cpio archive" rm -f rpm_extract_tmp.cpio popd >/dev/null diff --git a/man/it/autospec.1.in b/man/it/autospec.1.in index f7c50b1..58de2fe 100644 --- a/man/it/autospec.1.in +++ b/man/it/autospec.1.in @@ -24,7 +24,7 @@ \fBlibtest.lib\fR - libreria con le funzioni del framework di test. .SH VERSIONE -Questo documento e' aggiornato alla versione 1.16.3 di +Questo documento e' aggiornato alla versione 1.16.4 di .B @package@. .SH DESCRIZIONE @@ -204,6 +204,8 @@ categoria dello specfile da generare: .br \fIlibrary\fR : specfile per librerie .br +\fIocaml-libs\fR : specfile per librerie OCaml +.br \fIperl\fR : specfile per singoli moduli perl .br \fIpython\fR : specfile per moduli python diff --git a/plugins/pck-update.in b/plugins/pck-update.in index 4bddc41..305ccb0 100644 --- a/plugins/pck-update.in +++ b/plugins/pck-update.in @@ -2263,7 +2263,7 @@ $(echo $solibpath | sed "s|-[0-9.]*\.so|.so|")" elif [[ "$req" =~ .*\(.*\) || "$req" =~ .*\.so ]]; then # a(b) requirement or *.so library rpm -q --qf %{name} --whatprovides "$req" &>/dev/null && - buildreq="$(rpm -q --qf %{name} --whatprovides "$req")" || + buildreq="$(rpm -q --qf "%{name}\n" --whatprovides "$req"|head -n1)" || echo "#$req: unidentified build requirement" else # other requirements probably coming from static 'Requires:' diff --git a/plugins/spec-create.in b/plugins/spec-create.in index 4b310d6..72cc7ed 100644 --- a/plugins/spec-create.in +++ b/plugins/spec-create.in @@ -82,7 +82,7 @@ or FITNESS FOR A PARTICULAR PURPOSE." function version() { echo "\ ${me[0]} ${me[1]} -Copyright (C) 2004-2012 Davide Madrisan " +Copyright (C) 2004-2013 Davide Madrisan " } # $1: optional exit code (default is '1') @@ -106,6 +106,7 @@ function usage() { kde3 : "$"specfile for kde3 packages"" kde4 : "$"specfile for kde4 packages"" library : "$"specfile for common library packages"" + ocaml-libs : "$"specfile for OCaml library packages"" perl : "$"specfile for single-package perl modules"" python : "$"specfile for python modules"" standard-daemon : "$"standard specfile for system/network services"" @@ -404,6 +405,10 @@ $FUNCNAME: buildrequires_buildtool = \"$buildrequires_buildtool\"" [ -r "$templatefile" ] || notify.error $"file not found"": $templatefile" + local pck_name_tail="" + case "$pck_name" in *-*) pck_name_tail="${pck_name#*-}" ;; esac + notify.debug "$FUNCNAME: pck_name_tail = \"$pck_name_tail\"" + local currvar line if_value if_level=0 # FIXME: at most two nested @if statements are supported if_value[0]='N/A'; if_value[1]='1'; if_value[2]='1'; @@ -454,6 +459,7 @@ s,@packager_fullname@,${packager_fullname:-?packager_fullname?}, s,@packager_email@,${packager_email:-?packager_email?}, s,@rpm_default_buildroot@,${rpm_default_buildroot:-?rpm_default_buildroot?}, s,@pck_name@,$pck_name, +s,@pck_name_tail@,$pck_name_tail, s,@pck_version@,$pck_version, s,@spec_first_release@,${spec_first_release:-1}, s,@spec_run_ldconfig@,$spec_run_ldconfig, @@ -591,6 +597,11 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \ [[ "$pck_name" =~ $library_name_structure ]] || notify.error $"\ libraries must have this name structure (use \`-n'):"" \ \`$library_name_structure'" + ;; + ocaml-libs) + [[ "$pck_name" =~ $ocaml_module_name_structure ]] || notify.error $"\ +ocaml modules must have this name structure (use \`-n'):"" \ +\`$ocaml_module_name_structure'" ;; perl) [[ "$pck_name" =~ $perl_module_name_structure ]] || notify.error $"\ @@ -701,7 +712,8 @@ looks like a python module (use \`-t python' if this is true)" ;; # 2. set 'spec_summary' local spec_summary="$spec_default_summary" local perl_pckname_from_makefile="" - case "$spec_type" in perl) + case "$spec_type" in + perl) if [ -e $tmpdir/$pck_rootdir/Makefile.PL ]; then # look for the variable `NAME' in Makefile.PL inside the # 'WriteMakefile(' ... ')' block @@ -717,6 +729,26 @@ looks like a python module (use \`-t python' if this is true)" ;; fi [ -n "$perl_pckname_from_makefile" ] && spec_summary="$perl_pckname_from_makefile - ..." + ;; + ocaml-libs) + local metafile + metafile=$(find $tmpdir/$pck_rootdir/ -type f -name "META" 2>/dev/null) + [ "$metafile" ] || metafile="$(\ +find $tmpdir/$pck_rootdir/ -type f -name "META.in" 2>/dev/null)" + if [ "$metafile" ]; then + #notify.debug "$FUNCNAME: OCaml META file found" + while read line; do + if [[ "$line" =~ ^description[\ \t]*=[\ \t]*\".*\"$ ]]; then + spec_summary="... $(\ +echo "$line" | sed "s|.*=[\ \t]*\"\(.*\)\"|\1|") ..." # vim highlight need a " + notify.debug "$FUNCNAME: spec_summary = \"$spec_summary\"" + break + fi + #if [[ "$line" =~ ^description[\ \t]*=[\ \t]*$ ]]; then + # ... FIXME + done < $metafile + fi + ;; esac # 3. set 'spec_license' diff --git a/po/it/autospec.po b/po/it/autospec.po index fd5aec9..d4ec706 100644 --- a/po/it/autospec.po +++ b/po/it/autospec.po @@ -1,3 +1,21 @@ +# Italian translation. +# Copyright (C) 2004-2013 Davide Madrisan +# This file is distributed under the same license as the autospec package. +# Davide Madrisan , 2004-2013. +# + +msgid "" +msgstr "Project-Id-Version: autospec 1.16.4\n" + "Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n" + "POT-Creation-Date: 2013-07-13 19:30+0100\n" + "PO-Revision-Date: 2013-07-13 19:30+0100\n" + "Last-Translator: Davide Madrisan \n" + "Language-Team: \n" + "Language: Italian \n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + msgid "this script requires bash version 2 or better" msgstr "questo script richiede bash versione 2 o superiore" @@ -817,6 +835,9 @@ msgstr "specfile per pacchetti kde4" msgid "specfile for common library packages" msgstr "specfile per librerie" +msgid "specfile for OCaml library packages" +msgstr "specfile per pacchetti librerie OCaml" + msgid "specfile for single-package perl modules" msgstr "specfile per singoli moduli perl" @@ -886,6 +907,9 @@ msgstr "modo" msgid "libraries must have this name structure (use \\`-n'):" msgstr "i nomi delle librerie devono avere questa struttura (usare \\`-n'):" +msgid "ocaml modules must have this name structure (use \\`-n'):" +msgstr "i nomi dei moduli ocaml devono avere questa struttura (usare \\`-n'):" + msgid "perl modules must have this name structure (use \\`-n'):" msgstr "i nomi dei moduli perl devono avere questa struttura (usare \\`-n'):" @@ -923,23 +947,6 @@ msgstr "manca almeno una direttiva \\`%defattr'" msgid "use rpm macros if possible:" msgstr "utilizzare le macro rpm quando possibile:" -# Italian translation. -# Copyright (C) 2004-2012 Davide Madrisan -# This file is distributed under the same license as the autospec package. -# Davide Madrisan , 2004-2012. -# -msgid "" -msgstr "Project-Id-Version: autospec 1.16.0\n" - "Report-Msgid-Bugs-To: davide.madrisan@gmail.com\n" - "POT-Creation-Date: 2012-11-23 22:50+0100\n" - "PO-Revision-Date: 2012-11-19 23:37+0100\n" - "Last-Translator: Davide Madrisan \n" - "Language-Team: \n" - "Language: Italian \n" - "MIME-Version: 1.0\n" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" - msgid "localization files must be packaged via \\`%find_lang'" msgstr "trovati file di localizzazione non gestiti da \\`%find_lang'" diff --git a/templates/Makefile b/templates/Makefile index ed4a51b..4c9ede6 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -1,5 +1,5 @@ # Makefile for autospec -# Copyright (C) 2008,2011 by Davide Madrisan +# Copyright (C) 2008,2011,2013 by Davide Madrisan # This program is free software; you can redistribute it and/or modify it under # the terms of version 2 of the GNU General Public License as published by the @@ -18,7 +18,7 @@ srcdir = .. include $(srcdir)/Makefile.env -pck_templates := gnome kde3 kde4 library perl python standard standard-daemon web +pck_templates := gnome kde3 kde4 library ocaml-libs perl python standard standard-daemon web all: diff --git a/templates/ocaml-libs b/templates/ocaml-libs new file mode 100644 index 0000000..06c4a09 --- /dev/null +++ b/templates/ocaml-libs @@ -0,0 +1,102 @@ +## this macro only works for packages with name matching the regexp "ocaml-.*" +%define ocamlpck @pck_name_tail@ + +Name: @pck_name@ +Version: @pck_version@ +Release: @spec_first_release@@DISTRO_rpm@ +Summary: ... +Group: System/Libraries/OCaml +Vendor: @VENDOR@ +Distribution: @DISTRO@ +Packager: @packager_fullname@ <@packager_email@> +URL: ... +Source: ... +License: ... +## AUTOBUILDREQ-BEGIN +## note: run 'autospec -u -a6 @pck_name@' to get the list of build requirements. +## AUTOBUILDREQ-END +BuildRequires: ocaml +BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib +## remove the following build requirement if this package is compiled +## by using the OCaml native-code compiler (ocamlopt) +Requires: ocaml-runtime +BuildRoot: @rpm_default_buildroot@ + +%description +... + +@if:pck_devel +## remove the following two blocks if there's no devel files +%package devel +Group: Development/Libraries/OCaml +Summary: Development files for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +This package contains libraries and signature files for developing applications that use %{name}. +@fi:pck_devel + +%prep +%setup -q + +%build +## remove the unsupported options (no real standard exists...) +./configure \\ +\ --prefix %{_prefix} \\ +\ --localstatedir %{_localstatedir} \\ +\ --sharedstatedir %{_sharedstatedir} \\ +\ --sysconfdir %{_sysconfdir} \\ +\ --enable-tests \\ +\ --enable-docs \\ +\ --enable-examples \\ +\ --disable-ldconf +## extra arguments that sometimes can be passed to './configure' +## -host %{_host} +## -cc "gcc ${RPM_OPT_FLAGS/-fomit-frame-pointer/}" +## --destdir %{buildroot} + +%make all +%make opt + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +export OCAMLFIND_DESTDIR=%{buildroot}$(ocamlfind printconf destdir) +export DLLDIR=$OCAMLFIND_DESTDIR/stublibs + +install -d $OCAMLFIND_DESTDIR/%{ocamlpck} +install -d $OCAMLFIND_DESTDIR/stublibs + +make install + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +## note: this list is just an example; modify as required +# %dir %{_libdir}/ocaml/%{ocamlpck} +# %{_libdir}/ocaml/%{ocamlpck}/META +# %{_libdir}/ocaml/%{ocamlpck}/*.cma +# %{_libdir}/ocaml/%{ocamlpck}/*.cmi +# %{_libdir}/ocaml/%{ocamlpck}/*.cmxs +# %{_libdir}/ocaml/stublibs/*.so* +# %doc COPYING + +@if:pck_devel +## remove this block if there are no devel files +## note: this list is just an example; modify as required +%files devel +%defattr(-,root,root) +# %{_libdir}/ocaml/%{ocamlpck}/*.a +# %{_libdir}/ocaml/%{ocamlpck}/*.cmx +# %{_libdir}/ocaml/%{ocamlpck}/*.cmxa +# %{_libdir}/ocaml/%{ocamlpck}/*.mli +# %doc CHANGES README +# %doc doc/html/ +# %doc examples/ +@fi:pck_devel + +%changelog +* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@ +- @spec_changelog_comment@ diff --git a/tests/test00_specsyntax.in b/tests/test00_specsyntax.in index dd680ab..ff43c1e 100644 --- a/tests/test00_specsyntax.in +++ b/tests/test00_specsyntax.in @@ -1,6 +1,6 @@ #!/bin/bash # test00_specsyntax -- @package@ test (syntax checks of a specfile) -# Copyright (C) 2012 Davide Madrisan +# Copyright (C) 2012-2013 Davide Madrisan [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] && echo $"this script requires bash version 2 or better" >&2 && exit 1 @@ -182,62 +182,7 @@ ${NOTE}"$"Hint"":${NORM} } test_number=$(($test_number + 1)) - # 7. check if the install/uninstall code is present - test.skip $test_number || { - notify.note "$(test.num2str). ${NOTE}"\ -$"info pages""${NORM}..." - - local infopages errors - # FIXME: non LSB compliant systems are unsupported - infopages="$(\ -grep "/share/info/\|^[ ]*%_infodir\|^[ ]*%{_infodir}" $specfile | \ -grep -v "^[ ]*#\|^[a-zA-Z]")" - - if [[ "$infopages" ]]; then - let "errors = 0" - if [ "$rpm_macro_installinfo" ]; then - grep -q "$rpm_macro_installinfo" $specfile || - { let "errors += 1" - notify.debug "rpm_macro_installinfo check failed"; } - fi - if [ "$rpm_macro_uninstallinfo" ]; then - grep -q "$rpm_macro_uninstallinfoo" $specfile || - { let "errors += 1" - notify.debug "rpm_macro_uninstallinfo check failed"; } - fi - if [ "$rpm_macro_installinfo_binary" ]; then - grep -q "\ -Requires(post)[ \t]*:[ \t]*${rpm_macro_installinfo_binary}" $specfile || - { let "errors += 1" - notify.debug "rpm_macro_installinfo_binary check failed"; } - fi - - [ "$errors" = "0" ] || - { notify.error "\ -"$"info pages are not installed/uninstalled in the correct way""${NORM} ---------------------------------------- -${NOTE}"$"Hint"":${NORM} -$([[ "$rpm_macro_installinfo_binary" ]] && - echo "Requires(post): $rpm_macro_installinfo_binary" || - echo "Requires(post): ${path_installinfo:-/sbin/install-info}") - -%post [] -$([[ "$rpm_macro_installinfo" ]] && - echo "$rpm_macro_installinfo %{name}.info" || - echo "${path_installinfo:-/sbin/install-info} %{name}.info") - -%preun [] -$([[ "$rpm_macro_uninstallinfo" ]] && - echo "$rpm_macro_uninstallinfo %{name}.info" || - echo "${path_installinfo:-/sbin/install-info} --delete %{name}.info") -exit 0 ---------------------------------------- -" - let "total_issues += $errors"; } - fi; } - test_number=$(($test_number + 1)) - - # 8. check for illegal 'Group's (see configuration file) + # 7. check for illegal 'Group's (see configuration file) test.skip $test_number || { if [ "${#rpm_allowed_groups[*]}" = 0 ]; then # 'rpm_allowed_groups' unset in the configuration files @@ -274,7 +219,7 @@ ${NOTE}@package@ --eval=rpm_allowed_groups${NORM} fi; } test_number=$(($test_number + 1)) - # 9. check for no approved 'License's (see configuration file) + # 8. check for no approved 'License's (see configuration file) test.skip $test_number || { if [ "${#rpm_approved_licenses[*]}" = 0 ]; then # 'rpm_approved_licenses' unset in the configuration files diff --git a/tests/test01_pkgquality.in b/tests/test01_pkgquality.in index 481bc72..d196ea2 100644 --- a/tests/test01_pkgquality.in +++ b/tests/test01_pkgquality.in @@ -1,6 +1,6 @@ #!/bin/bash # test01_pkgquality -- @package@ test (rpm quality checks) -# Copyright (C) 2008,2012 Davide Madrisan +# Copyright (C) 2008,2012,2013 Davide Madrisan [ -z "$BASH" ] || [ ${BASH_VERSION:0:1} -lt 2 ] && echo $"this script requires bash version 2 or better" >&2 && exit 1 @@ -21,7 +21,7 @@ me=("test01_pkgquality" "@version@" "@date@") notify.debug $"loading"": \`test01_pkgquality'..." # check if all the needed tools are available -for tool in file find getopt grep ls ldd; do +for tool in file find getopt grep ls ldd wc; do [ "$(type -p $tool)" ] || notify.error $"utility not found"": \`$tool'" done @@ -218,8 +218,9 @@ $"checking for wrong file attributes in bin and lib directories""${NORM}..." for pck in ${rpmpkg_name[@]}; do pushd $tmpextractdir/$i >/dev/null for f in $( find . -type f \( \ - \( -name '*.so.*' -not -perm 755 \) -or \ - \( -name '*.so' -not -perm 755 \) -or \ + \( -name '*.so.*' -and -not -name '*.so.owner' \ + -and -not -perm 755 \) -or \ + \( -name '*.so' -and -not -perm 755 \) -or \ \( \( -path './bin/*' -or \ -path './sbin/*' -or \ -path './usr/bin/*' -or \ @@ -326,26 +327,36 @@ $"checking if the info catalog is updated when necessary""${NORM}..." { let "i += 1"; continue; } # no info pages found #notify.debug "$FUNCNAME: info page(s) found" - [[ "$(rpm -p -q --scripts $pck | sed -n ' -/postinstall /,${/\/sbin\/install-info \/.*/p}')" ]] || let "error+=1" + [[ "$(rpm -p -q --requires $pck 2>/dev/null | sed -n ' +/^[ \t]*\/sbin\/install-info/p')" ]] || let "error+=1" - [[ "$(rpm -p -q --scripts $pck | sed -n ' -/preuninstall /,${/\/sbin\/install-info.*--[delete\|remove].*/p}')" ]] || \ - let "error+=1" + # note: we just check for at list two occurences of the command + # '/sbin/install-info' in the package scriptlets + [[ "$(rpm -p -q --scripts $pck 2>/dev/null | sed -n ' +/^[ \t]*\/sbin\/install-info/p' | wc -l)" -ge 2 ]] || let "error+=1" [ "$error" = "0" ] || { notify.warning "${NOTE}${pck##*/}${NORM}" notify.note $"info pages should be installed/uninstalled""${NORM} --------------------------------------- ${NOTE}"$"Hint"":${NORM} -$([[ "$rpm_macro_installinfo_binary" ]] && - echo "Requires(post):$rpm_macro_installinfo_binary" || - echo "Requires(post):${path_installinfo:-/sbin/install-info}") +%package [] +... +$(if [[ "$rpm_macro_installinfo_binary" ]]; then + echo "\ +Requires(post):$rpm_macro_installinfo_binary +Requires(preun):$rpm_macro_installinfo_binary" + else + echo "\ +Requires(post):${path_installinfo:-/sbin/install-info} +Requires(preun):${path_installinfo:-/sbin/install-info}" + fi) %post [] $([[ "$rpm_macro_installinfo" ]] && echo "$rpm_macro_installinfo %{name}.info" || echo "${path_installinfo:-/sbin/install-info} %{name}.info") +exit 0 %preun [] $([[ "$rpm_macro_uninstallinfo" ]] && @@ -423,9 +434,11 @@ $"checking for packages with bad BuildArch tag""${NORM}..." let "i = 0" for pck in ${rpmpkg_name[@]}; do pushd $tmpextractdir/$i >/dev/null - for f in $(find -mindepth 2 -perm +111 -type f \ - -exec file {} \; | grep -E "( ELF | library )"); do - notify.debug "found a ELF file: \`${NOTE}${f/./}${NORM}'" + for f in $(LC_ALL=C find -mindepth 2 -type f \ + -exec file {} \; 2>/dev/null | grep -E "(\ + ELF | OCaml library | ar archive |\ + dynamically linked | statically linked )"); do + notify.debug "found binary or library file: \`${NOTE}${f/./}${NORM}'" let "warning = 1" break done