diff -Nru rdfind-1.4.1/aclocal.m4 rdfind-1.5.0/aclocal.m4 --- rdfind-1.4.1/aclocal.m4 2018-11-12 21:18:47.000000000 +0000 +++ rdfind-1.5.0/aclocal.m4 2021-08-13 19:22:47.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,990 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) -# -# DESCRIPTION -# -# Check for baseline language coverage in the compiler for the specified -# version of the C++ standard. If necessary, add switches to CXX and -# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) -# or '14' (for the C++14 standard). -# -# The second argument, if specified, indicates whether you insist on an -# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -# -std=c++11). If neither is specified, you get whatever works, with -# preference for an extended mode. -# -# The third argument, if specified 'mandatory' or if left unspecified, -# indicates that baseline support for the specified C++ standard is -# required and that the macro should error out if no mode with that -# support is found. If specified 'optional', then configuration proceeds -# regardless, after defining HAVE_CXX${VERSION} if and only if a -# supporting mode is found. -# -# LICENSE -# -# Copyright (c) 2008 Benjamin Kosnik -# Copyright (c) 2012 Zack Weinberg -# Copyright (c) 2013 Roy Stogner -# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov -# Copyright (c) 2015 Paul Norman -# Copyright (c) 2015 Moritz Klammler -# Copyright (c) 2016 Krzesimir Nowak -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 7 - -dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro -dnl (serial version number 13). - -AX_REQUIRE_DEFINED([AC_MSG_WARN]) -AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl - m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], - [$1], [14], [ax_cxx_compile_alternatives="14 1y"], - [$1], [17], [ax_cxx_compile_alternatives="17 1z"], - [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$2], [], [], - [$2], [ext], [], - [$2], [noext], [], - [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl - m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], - [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], - [$3], [optional], [ax_cxx_compile_cxx$1_required=false], - [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) - AC_LANG_PUSH([C++])dnl - ac_success=no - AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, - ax_cv_cxx_compile_cxx$1, - [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [ax_cv_cxx_compile_cxx$1=yes], - [ax_cv_cxx_compile_cxx$1=no])]) - if test x$ax_cv_cxx_compile_cxx$1 = xyes; then - ac_success=yes - fi - - m4_if([$2], [noext], [], [dnl - if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - switch="-std=gnu++${alternative}" - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - fi]) - - m4_if([$2], [ext], [], [dnl - if test x$ac_success = xno; then - dnl HP's aCC needs +std=c++11 according to: - dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf - dnl Cray's crayCC needs "-h std=c++11" - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - if test x$ac_success = xyes; then - break - fi - done - fi]) - AC_LANG_POP([C++]) - if test x$ax_cxx_compile_cxx$1_required = xtrue; then - if test x$ac_success = xno; then - AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) - fi - fi - if test x$ac_success = xno; then - HAVE_CXX$1=0 - AC_MSG_NOTICE([No compiler with C++$1 support was found]) - else - HAVE_CXX$1=1 - AC_DEFINE(HAVE_CXX$1,1, - [define if the compiler supports basic C++$1 syntax]) - fi - AC_SUBST(HAVE_CXX$1) - m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])]) -]) - - -dnl Test body for checking C++11 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 -) - - -dnl Test body for checking C++14 support - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 -) - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 -) - -dnl Tests for new features in C++11 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual void f() {} - }; - - struct Derived : public Base - { - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - -]]) - - -dnl Tests for new features in C++14 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ - -// If the compiler admits that it is not ready for C++14, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201402L - -#error "This is not a C++14 compiler" - -#else - -namespace cxx14 -{ - - namespace test_polymorphic_lambdas - { - - int - test() - { - const auto lambda = [](auto&&... args){ - const auto istiny = [](auto x){ - return (sizeof(x) == 1UL) ? 1 : 0; - }; - const int aretiny[] = { istiny(args)... }; - return aretiny[0]; - }; - return lambda(1, 1L, 1.0f, '1'); - } - - } - - namespace test_binary_literals - { - - constexpr auto ivii = 0b0000000000101010; - static_assert(ivii == 42, "wrong value"); - - } - - namespace test_generalized_constexpr - { - - template < typename CharT > - constexpr unsigned long - strlen_c(const CharT *const s) noexcept - { - auto length = 0UL; - for (auto p = s; *p; ++p) - ++length; - return length; - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("x") == 1UL, ""); - static_assert(strlen_c("test") == 4UL, ""); - static_assert(strlen_c("another\0test") == 7UL, ""); - - } - - namespace test_lambda_init_capture - { - - int - test() - { - auto x = 0; - const auto lambda1 = [a = x](int b){ return a + b; }; - const auto lambda2 = [a = lambda1(x)](){ return a; }; - return lambda2(); - } - - } - - namespace test_digit_separators - { - - constexpr auto ten_million = 100'000'000; - static_assert(ten_million == 100000000, ""); - - } - - namespace test_return_type_deduction - { - - auto f(int& x) { return x; } - decltype(auto) g(int& x) { return x; } - - template < typename T1, typename T2 > - struct is_same - { - static constexpr auto value = false; - }; - - template < typename T > - struct is_same - { - static constexpr auto value = true; - }; - - int - test() - { - auto x = 0; - static_assert(is_same::value, ""); - static_assert(is_same::value, ""); - return x; - } - - } - -} // namespace cxx14 - -#endif // __cplusplus >= 201402L - -]]) - - -dnl Tests for new features in C++17 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ - -// If the compiler admits that it is not ready for C++17, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus <= 201402L - -#error "This is not a C++17 compiler" - -#else - -#if defined(__clang__) - #define REALLY_CLANG -#else - #if defined(__GNUC__) - #define REALLY_GCC - #endif -#endif - -#include -#include -#include - -namespace cxx17 -{ - -#if !defined(REALLY_CLANG) - namespace test_constexpr_lambdas - { - - // TODO: test it with clang++ from git - - constexpr int foo = [](){return 42;}(); - - } -#endif // !defined(REALLY_CLANG) - - namespace test::nested_namespace::definitions - { - - } - - namespace test_fold_expression - { - - template - int multiply(Args... args) - { - return (args * ... * 1); - } - - template - bool all(Args... args) - { - return (args && ...); - } - - } - - namespace test_extended_static_assert - { - - static_assert (true); - - } - - namespace test_auto_brace_init_list - { - - auto foo = {5}; - auto bar {5}; - - static_assert(std::is_same, decltype(foo)>::value); - static_assert(std::is_same::value); - } - - namespace test_typename_in_template_template_parameter - { - - template typename X> struct D; - - } - - namespace test_fallthrough_nodiscard_maybe_unused_attributes - { - - int f1() - { - return 42; - } - - [[nodiscard]] int f2() - { - [[maybe_unused]] auto unused = f1(); - - switch (f1()) - { - case 17: - f1(); - [[fallthrough]]; - case 42: - f1(); - } - return f1(); - } - - } - - namespace test_extended_aggregate_initialization - { - - struct base1 - { - int b1, b2 = 42; - }; - - struct base2 - { - base2() { - b3 = 42; - } - int b3; - }; - - struct derived : base1, base2 - { - int d; - }; - - derived d1 {{1, 2}, {}, 4}; // full initialization - derived d2 {{}, {}, 4}; // value-initialized bases - - } - - namespace test_general_range_based_for_loop - { - - struct iter - { - int i; - - int& operator* () - { - return i; - } - - const int& operator* () const - { - return i; - } - - iter& operator++() - { - ++i; - return *this; - } - }; - - struct sentinel - { - int i; - }; - - bool operator== (const iter& i, const sentinel& s) - { - return i.i == s.i; - } - - bool operator!= (const iter& i, const sentinel& s) - { - return !(i == s); - } - - struct range - { - iter begin() const - { - return {0}; - } - - sentinel end() const - { - return {5}; - } - }; - - void f() - { - range r {}; - - for (auto i : r) - { - [[maybe_unused]] auto v = i; - } - } - - } - - namespace test_lambda_capture_asterisk_this_by_value - { - - struct t - { - int i; - int foo() - { - return [*this]() - { - return i; - }(); - } - }; - - } - - namespace test_enum_class_construction - { - - enum class byte : unsigned char - {}; - - byte foo {42}; - - } - - namespace test_constexpr_if - { - - template - int f () - { - if constexpr(cond) - { - return 13; - } - else - { - return 42; - } - } - - } - - namespace test_selection_statement_with_initializer - { - - int f() - { - return 13; - } - - int f2() - { - if (auto i = f(); i > 0) - { - return 3; - } - - switch (auto i = f(); i + 4) - { - case 17: - return 2; - - default: - return 1; - } - } - - } - -#if !defined(REALLY_CLANG) - namespace test_template_argument_deduction_for_class_templates - { - - // TODO: test it with clang++ from git - - template - struct pair - { - pair (T1 p1, T2 p2) - : m1 {p1}, - m2 {p2} - {} - - T1 m1; - T2 m2; - }; - - void f() - { - [[maybe_unused]] auto p = pair{13, 42u}; - } - - } -#endif // !defined(REALLY_CLANG) - - namespace test_non_type_auto_template_parameters - { - - template - struct B - {}; - - B<5> b1; - B<'a'> b2; - - } - -#if !defined(REALLY_CLANG) - namespace test_structured_bindings - { - - // TODO: test it with clang++ from git - - int arr[2] = { 1, 2 }; - std::pair pr = { 1, 2 }; - - auto f1() -> int(&)[2] - { - return arr; - } - - auto f2() -> std::pair& - { - return pr; - } - - struct S - { - int x1 : 2; - volatile double y1; - }; - - S f3() - { - return {}; - } - - auto [ x1, y1 ] = f1(); - auto& [ xr1, yr1 ] = f1(); - auto [ x2, y2 ] = f2(); - auto& [ xr2, yr2 ] = f2(); - const auto [ x3, y3 ] = f3(); - - } -#endif // !defined(REALLY_CLANG) - -#if !defined(REALLY_CLANG) - namespace test_exception_spec_type_system - { - - // TODO: test it with clang++ from git - - struct Good {}; - struct Bad {}; - - void g1() noexcept; - void g2(); - - template - Bad - f(T*, T*); - - template - Good - f(T1*, T2*); - - static_assert (std::is_same_v); - - } -#endif // !defined(REALLY_CLANG) - - namespace test_inline_variables - { - - template void f(T) - {} - - template inline T g(T) - { - return T{}; - } - - template<> inline void f<>(int) - {} - - template<> int g<>(int) - { - return 5; - } - - } - -} // namespace cxx17 - -#endif // __cplusplus <= 201402L - -]]) - -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1015,10 +32,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15.1], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -1034,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15.1])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1093,7 +110,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1124,7 +141,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1315,13 +332,12 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -1329,49 +345,41 @@ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -1380,18 +388,17 @@ # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1478,8 +485,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -1546,7 +553,7 @@ Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -1588,7 +595,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1609,7 +616,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2017 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1630,7 +637,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1638,49 +645,42 @@ # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2017 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1719,7 +719,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1748,9 +748,26 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1831,7 +848,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2017 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1891,7 +908,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1919,7 +936,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2017 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1938,7 +955,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2017 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru rdfind-1.4.1/bootstrap.sh rdfind-1.5.0/bootstrap.sh --- rdfind-1.4.1/bootstrap.sh 2018-11-12 20:58:31.000000000 +0000 +++ rdfind-1.5.0/bootstrap.sh 2021-08-13 19:15:33.000000000 +0000 @@ -1,18 +1,25 @@ #!/bin/sh # a script to get the source up and running with automake # -# copyright 20016-2017 Paul Dreik (earlier Paul Sundvall) +# copyright 2016-2019 Paul Dreik (earlier Paul Sundvall) # Distributed under GPL v 2.0 or later, at your option. # See LICENSE for further details. #bail out on error set -e -aclocal -autoheader -automake --add-missing -autoconf +me=$(basename $0) -echo "it seems like everything went fine. now try -./configure && make" +for prog in aclocal autoheader automake autoconf make; do + if ! which $prog >/dev/null 2>&1 ; then + echo $me: please install $prog + exit 1 + fi +done +aclocal --warnings=all +autoheader --warnings=all +automake --add-missing --warnings=all +autoconf --warnings=all + +echo "it seems like everything went fine. now try ./configure && make" diff -Nru rdfind-1.4.1/ChangeLog rdfind-1.5.0/ChangeLog --- rdfind-1.4.1/ChangeLog 2018-11-12 21:08:54.000000000 +0000 +++ rdfind-1.5.0/ChangeLog 2021-08-13 19:15:45.000000000 +0000 @@ -1,3 +1,7 @@ +2021-08-12 Paul Dreik + * release 1.5.0 +2021-08-12 Paul Dreik + * add option -maxsize N to ignore files with size>=N bytes 2018-11-12 Paul Dreik * release of 1.4.1 * fixes build failure on 32 bit platforms @@ -11,7 +15,7 @@ * cleanup of source to remove compiler warnings and switch to c++11 * failure of making hard links will not delete the deduplicated - file, if pssible. See Github bug #5. + file, if possible. See Github bug #5. * failure of making symlinks will not delete the deduplicated file, if possible. See Github bug #5. * added option -minsize to optionally ignore files under a @@ -102,77 +106,73 @@ 2009-01-13 Paul Sundvall * updated with new option outputname * added names from people who helped - * clarified licens here and there + * clarified license here and there * added svn id keyword in file * updated man page 2008-10-03 Paul Sundvall * minor changes for being able to compile with new compiler - + 2008-09-01 Paul Sundvall * spelling error corrected - -2006-03-21 Paul Sundvall + +2006-03-21 Paul Sundvall * new version 1.2.2 * sleep introduced, to reduce load. * examples in the manual introduced. * new formatting on usage() to not get line breaks. * new structure in configure.in, to get error messages from nettle quicker. * symlinks now work better, as they are made absolute. -2006-03-19 Paul Sundvall +2006-03-19 Paul Sundvall * version 1.2.1 * Changed to auto-tools. - -2006-03-02 Paul Sundvall + +2006-03-02 Paul Sundvall *version 1.2.0 *Moved nettleclass to rdfind, to ease up installation. *finalized configure.in so that autoconf works. -2006-03-02 Paul Sundvall - *version 1.1.2 +2006-03-02 Paul Sundvall + *version 1.1.2 *spelling error (and a test of version numbers...) -2006-03-02 Paul Sundvall +2006-03-02 Paul Sundvall * version 1.1.1 *added VERSION as #define. *added flags --version etc *added install for make install. -2006-02-28 Paul Sundvall +2006-02-28 Paul Sundvall *now possible to specify also files as input arguments. *added possibility to use sha1 checksum. *changed ints to enums on default args to make it compile even on gcc 4.03 prerelease - -2006-02-25 Paul Sundvall +2006-02-25 Paul Sundvall *moved into cvs. changed from RSA md5 to nettle. -2006-01-17 Paul Sundvall +2006-01-17 Paul Sundvall *replacing name "Bulk" with "Fileinfo" *INSTALL COPYRIGHT etc created. *calling this one 1.0.1 -2006-01-16 Paul Sundvall +2006-01-16 Paul Sundvall *release version 1.0.0 -2006-01-13 Paul Sundvall +2006-01-13 Paul Sundvall *hard links -2006-01-12 Paul Sundvall +2006-01-12 Paul Sundvall *using memcmp for comparison on byte. - *dont read file if it already has been read and m_nbytes is longer + *don't read file if it already has been read and m_nbytes is longer than the file itself. - -2006-01-11 Paul Sundvall +2006-01-11 Paul Sundvall *parsing of input args before starting to add files added nice *output of size in Gb etc. fixed bug on char comparison. -2006-01-10 Paul Sundvall +2006-01-10 Paul Sundvall *wrote man page. - -2006-01-05 Paul Sundvall +2006-01-05 Paul Sundvall *started. first version. - CHANGELOG $Revision: 825 $ diff -Nru rdfind-1.4.1/Checksum.cc rdfind-1.5.0/Checksum.cc --- rdfind-1.4.1/Checksum.cc 2018-11-12 20:23:09.000000000 +0000 +++ rdfind-1.5.0/Checksum.cc 2021-08-13 19:15:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - copyright 20016-2017 Paul Dreik (earlier Paul Sundvall) + copyright 2006-2017 Paul Dreik (earlier Paul Sundvall) Distributed under GPL v 2.0 or later, at your option. See LICENSE for further details. */ @@ -10,22 +10,14 @@ #include #include #include -#include //for memcpy +#include // project #include "Checksum.hh" -int -Checksum::init(int checksumtype) +Checksum::Checksum(checksumtypes type) + : m_checksumtype(type) { - - m_checksumtype = checksumtype; - - // one may not init to something stupid - if (m_checksumtype == NOTSET) { - return -2; - } - switch (m_checksumtype) { case SHA1: { sha1_init(&m_state.sha1); @@ -38,9 +30,8 @@ } break; default: // not allowed to have something that is not recognized. - return -1; + throw std::runtime_error("wrong checksum type - programming error"); } - return 0; } int @@ -107,6 +98,7 @@ return 0; } #endif + int Checksum::getDigestLength() const { diff -Nru rdfind-1.4.1/Checksum.hh rdfind-1.5.0/Checksum.hh --- rdfind-1.4.1/Checksum.hh 2018-11-12 20:23:09.000000000 +0000 +++ rdfind-1.5.0/Checksum.hh 2021-08-13 19:15:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - copyright 20016-2017 Paul Dreik (earlier Paul Sundvall) + copyright 2006-2017 Paul Dreik (earlier Paul Sundvall) Distributed under GPL v 2.0 or later, at your option. See LICENSE for further details. */ @@ -27,10 +27,7 @@ SHA256, }; - // hmm, why not a constructor? - - // init the object - int init(int checksumtype); + explicit Checksum(checksumtypes type); int update(std::size_t length, const unsigned char* buffer); int update(std::size_t length, const char* buffer); @@ -45,11 +42,11 @@ // returns the number of bytes that the buffer needs to be // returns negative if something is wrong. - int getDigestLength() const; + [[gnu::pure]] int getDigestLength() const; private: // to know what type of checksum we are doing - int m_checksumtype = NOTSET; + const int m_checksumtype = NOTSET; // the checksum calculation internal state union ChecksumStruct { diff -Nru rdfind-1.4.1/CmdlineParser.hh rdfind-1.5.0/CmdlineParser.hh --- rdfind-1.4.1/CmdlineParser.hh 2018-10-18 18:45:15.000000000 +0000 +++ rdfind-1.5.0/CmdlineParser.hh 2021-08-13 19:15:33.000000000 +0000 @@ -36,7 +36,7 @@ bool try_parse_string(const char* arg); bool get_parsed_bool() const { return m_last_bool_result; } const char* get_parsed_string() const { return m_last_str_result; } - bool parsed_string_is(const char* value) const; + [[gnu::pure]] bool parsed_string_is(const char* value) const; /** * advances to the next argument * @return diff -Nru rdfind-1.4.1/config.h.in rdfind-1.5.0/config.h.in --- rdfind-1.4.1/config.h.in 2018-11-12 21:18:49.000000000 +0000 +++ rdfind-1.5.0/config.h.in 2021-08-13 19:22:47.000000000 +0000 @@ -3,9 +3,6 @@ /* "support for c++17 fallthrough" */ #undef FALLTHROUGH -/* define if the compiler supports basic C++11 syntax */ -#undef HAVE_CXX11 - /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H diff -Nru rdfind-1.4.1/configure rdfind-1.5.0/configure --- rdfind-1.4.1/configure 2018-11-12 21:18:48.000000000 +0000 +++ rdfind-1.5.0/configure 2021-08-13 19:22:47.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for rdfind 1.4.1. +# Generated by GNU Autoconf 2.69 for rdfind 1.5.0. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='rdfind' PACKAGE_TARNAME='rdfind' -PACKAGE_VERSION='1.4.1' -PACKAGE_STRING='rdfind 1.4.1' +PACKAGE_VERSION='1.5.0' +PACKAGE_STRING='rdfind 1.5.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -623,7 +623,6 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS -HAVE_CXX11 EGREP GREP CXXCPP @@ -634,7 +633,6 @@ AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -709,7 +707,8 @@ PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -718,7 +717,6 @@ enable_debug enable_assert enable_largefile -enable_cppstandardcheck enable_warnings ' ac_precious_vars='build_alias @@ -1281,7 +1279,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures rdfind 1.4.1 to adapt to many kinds of systems. +\`configure' configures rdfind 1.5.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1348,7 +1346,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rdfind 1.4.1:";; + short | recursive ) echo "Configuration of rdfind 1.5.0:";; esac cat <<\_ACEOF @@ -1365,9 +1363,6 @@ --enable-debug enable debug printouts in program (default=no) --disable-assert turn off assertions --disable-largefile omit support for large files - --disable-cppstandardcheck - disable checking for C++11 and trust CXX and - CXXFLAGS instead --enable-warnings enable compiler warnings (default=no) Some influential environment variables: @@ -1446,7 +1441,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rdfind configure 1.4.1 +rdfind configure 1.5.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1811,7 +1806,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by rdfind $as_me 1.4.1, which was +It was created by rdfind $as_me 1.5.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2163,7 +2158,7 @@ ac_config_headers="$ac_config_headers config.h" -am__api_version='1.15' +am__api_version='1.16' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2678,7 +2673,7 @@ # Define the identity of the package. PACKAGE='rdfind' - VERSION='1.4.1' + VERSION='1.5.0' cat >>confdefs.h <<_ACEOF @@ -2708,8 +2703,8 @@ # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -2760,7 +2755,7 @@ Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -3283,45 +3278,45 @@ ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -3952,7 +3947,7 @@ first. If you have already done so and get this error message anyway, it may be installed somewhere else, maybe because you don't have root access. Pass CPPFLAGS=-I/your/path/to/nettle to configure - and try again. The path should be so that #include \"nettle/sha.h\" works. + and try again. The path should be so that \#include \"nettle/sha.h\" works. On Debian-ish systems, use \"apt-get install nettle-dev\" to get a system wide nettle install. " "$LINENO" 5 @@ -4218,687 +4213,26 @@ fi -# Check whether --enable-cppstandardcheck was given. -if test "${enable_cppstandardcheck+set}" = set; then : - enableval=$enable_cppstandardcheck; ENABLECPPSTANDARDCHECK=$enableval -else - ENABLECPPSTANDARDCHECK=yes -fi - -if test "$ENABLECPPSTANDARDCHECK" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c++ 11, disable with --disable-cppstandardcheck" >&5 -$as_echo "$as_me: checking for c++ 11, disable with --disable-cppstandardcheck" >&6;} - ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ac_success=no - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 -$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } -if ${ax_cv_cxx_compile_cxx11+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 -{ - - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual void f() {} - }; - - struct Derived : public Base - { - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - - - -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv_cxx_compile_cxx11=yes -else - ax_cv_cxx_compile_cxx11=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 -$as_echo "$ax_cv_cxx_compile_cxx11" >&6; } - if test x$ax_cv_cxx_compile_cxx11 = xyes; then - ac_success=yes - fi - - - - if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 -$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } -if eval \${$cachevar+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_CXX="$CXX" - CXX="$CXX $switch" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++11 support or better" >&5 +$as_echo_n "checking for C++11 support or better... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - - -// If the compiler admits that it is not ready for C++11, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus < 201103L - -#error "This is not a C++11 compiler" - -#else - -namespace cxx11 +int f() { auto a=1;} +int +main () { - namespace test_static_assert - { - - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - } - - namespace test_final_override - { - - struct Base - { - virtual void f() {} - }; - - struct Derived : public Base - { - virtual void f() override {} - }; - - } - - namespace test_double_right_angle_brackets - { - - template < typename T > - struct check {}; - - typedef check single_type; - typedef check> double_type; - typedef check>> triple_type; - typedef check>>> quadruple_type; - - } - - namespace test_decltype - { - - int - f() - { - int a = 1; - decltype(a) b = 2; - return a + b; - } - - } - - namespace test_type_deduction - { - - template < typename T1, typename T2 > - struct is_same - { - static const bool value = false; - }; - - template < typename T > - struct is_same - { - static const bool value = true; - }; - - template < typename T1, typename T2 > - auto - add(T1 a1, T2 a2) -> decltype(a1 + a2) - { - return a1 + a2; - } - - int - test(const int c, volatile int v) - { - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == false, ""); - auto ac = c; - auto av = v; - auto sumi = ac + av + 'x'; - auto sumf = ac + av + 1.0; - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == true, ""); - static_assert(is_same::value == false, ""); - static_assert(is_same::value == true, ""); - return (sumf > 0.0) ? sumi : add(c, v); - } - - } - - namespace test_noexcept - { - - int f() { return 0; } - int g() noexcept { return 0; } - - static_assert(noexcept(f()) == false, ""); - static_assert(noexcept(g()) == true, ""); - - } - - namespace test_constexpr - { - - template < typename CharT > - unsigned long constexpr - strlen_c_r(const CharT *const s, const unsigned long acc) noexcept - { - return *s ? strlen_c_r(s + 1, acc + 1) : acc; - } - - template < typename CharT > - unsigned long constexpr - strlen_c(const CharT *const s) noexcept - { - return strlen_c_r(s, 0UL); - } - - static_assert(strlen_c("") == 0UL, ""); - static_assert(strlen_c("1") == 1UL, ""); - static_assert(strlen_c("example") == 7UL, ""); - static_assert(strlen_c("another\0example") == 7UL, ""); - - } - - namespace test_rvalue_references - { - - template < int N > - struct answer - { - static constexpr int value = N; - }; - - answer<1> f(int&) { return answer<1>(); } - answer<2> f(const int&) { return answer<2>(); } - answer<3> f(int&&) { return answer<3>(); } - - void - test() - { - int i = 0; - const int c = 0; - static_assert(decltype(f(i))::value == 1, ""); - static_assert(decltype(f(c))::value == 2, ""); - static_assert(decltype(f(0))::value == 3, ""); - } - - } - - namespace test_uniform_initialization - { - - struct test - { - static const int zero {}; - static const int one {1}; - }; - - static_assert(test::zero == 0, ""); - static_assert(test::one == 1, ""); - - } - - namespace test_lambdas - { - - void - test1() - { - auto lambda1 = [](){}; - auto lambda2 = lambda1; - lambda1(); - lambda2(); - } - - int - test2() - { - auto a = [](int i, int j){ return i + j; }(1, 2); - auto b = []() -> int { return '0'; }(); - auto c = [=](){ return a + b; }(); - auto d = [&](){ return c; }(); - auto e = [a, &b](int x) mutable { - const auto identity = [](int y){ return y; }; - for (auto i = 0; i < a; ++i) - a += b--; - return x + identity(a + b); - }(0); - return a + b + c + d + e; - } - - int - test3() - { - const auto nullary = [](){ return 0; }; - const auto unary = [](int x){ return x; }; - using nullary_t = decltype(nullary); - using unary_t = decltype(unary); - const auto higher1st = [](nullary_t f){ return f(); }; - const auto higher2nd = [unary](nullary_t f1){ - return [unary, f1](unary_t f2){ return f2(unary(f1())); }; - }; - return higher1st(nullary) + higher2nd(nullary)(unary); - } - - } - - namespace test_variadic_templates - { - - template - struct sum; - - template - struct sum - { - static constexpr auto value = N0 + sum::value; - }; - - template <> - struct sum<> - { - static constexpr auto value = 0; - }; - - static_assert(sum<>::value == 0, ""); - static_assert(sum<1>::value == 1, ""); - static_assert(sum<23>::value == 23, ""); - static_assert(sum<1, 2>::value == 3, ""); - static_assert(sum<5, 5, 11>::value == 21, ""); - static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); - - } - - // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae - // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function - // because of this. - namespace test_template_alias_sfinae - { - - struct foo {}; - - template - using member = typename T::member_type; - - template - void func(...) {} - - template - void func(member*) {} - - void test(); - - void test() { func(0); } - - } - -} // namespace cxx11 - -#endif // __cplusplus >= 201103L - - - + ; + return 0; +} _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : - eval $cachevar=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - eval $cachevar=no + as_fn_error $? "no c++11 support, please set CXXFLAGS properly" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXX="$ac_save_CXX" -fi -eval ac_res=\$$cachevar - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break - fi - done - if test x$ac_success = xyes; then - break - fi - done - fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - if test x$ax_cxx_compile_cxx11_required = xtrue; then - if test x$ac_success = xno; then - as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 - fi - fi - if test x$ac_success = xno; then - HAVE_CXX11=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 -$as_echo "$as_me: No compiler with C++11 support was found" >&6;} - else - HAVE_CXX11=1 - -$as_echo "#define HAVE_CXX11 1" >>confdefs.h - - fi - - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: not checking for c++11 support." >&5 -$as_echo "$as_me: not checking for c++11 support." >&6;} -fi - - @@ -4912,12 +4246,12 @@ if test "x$set_more_warnings" != xno; then - uwoption="-Werror=unknown-warning-option" - SAVE_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $uwoption" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler understands $uwoption" >&5 + uwoption="-Werror=unknown-warning-option" + SAVE_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $uwoption" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler understands $uwoption" >&5 $as_echo_n "checking whether compiler understands $uwoption... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4934,36 +4268,50 @@ has_unknown_warning_option=no; uwoption="" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_unknown_warning_option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_unknown_warning_option" >&5 $as_echo "$has_unknown_warning_option" >&6; } - CXXFLAGS="$SAVE_CXXFLAGS" + CXXFLAGS="$SAVE_CXXFLAGS" - warning_options="-Wall -Wextra -pedantic \ - -Wshadow \ - -Wold-style-cast \ - -Wnon-virtual-dtor \ - -Wold-style-cast \ - -Wcast-align \ - -Wunused \ - -Woverloaded-virtual \ - -Wconversion \ - -Wsign-conversion \ - -Wmisleading-indentation \ - -Wduplicated-cond \ - -Wduplicated-branches \ - -Wlogical-op \ - -Wnull-dereference \ - -Wuseless-cast \ - -Wdouble-promotion \ - -Wformat=2 \ - -Wlifetime \ - -Wbiznafronck" - for option in $warning_options ; do - SAVE_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $uwoption $option" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler understands $option" >&5 + warning_options="-Wall -Wextra -pedantic \ + -Wshadow \ + -Wold-style-cast \ + -Wnon-virtual-dtor \ + -Wold-style-cast \ + -Wcast-align \ + -Wunused \ + -Woverloaded-virtual \ + -Wconversion \ + -Wsign-conversion \ + -Wmisleading-indentation \ + -Wduplicated-cond \ + -Wduplicated-branches \ + -Wlogical-op \ + -Wnull-dereference \ + -Wuseless-cast \ + -Wdouble-promotion \ + -Wformat=2 \ + -Wlifetime \ + -Wsuggest-attribute=const \ + -Wsuggest-attribute=pure \ + -Wsuggest-final-types \ + -Wsuggest-final-methods \ + -Wsuggest-override \ + -Wcast-qual -Wcast-align=strict \ + -Wzero-as-null-pointer-constant \ + -Wparentheses \ + -Wdate-time \ + -Wextra-semi \ + -Wbiznafronck" + + #these warnings were tried but deemed unuseful for this project: + # -Wunsafe-loop-optimizations \ + + for option in $warning_options ; do + SAVE_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $uwoption $option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler understands $option" >&5 $as_echo_n "checking whether compiler understands $option... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -4980,16 +4328,16 @@ has_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS="$SAVE_CXXFLAGS" - if test $has_option = yes; then - CXXFLAGS="$CXXFLAGS $option" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: got result $has_option" >&5 + CXXFLAGS="$SAVE_CXXFLAGS" + if test $has_option = yes; then + CXXFLAGS="$CXXFLAGS $option" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: got result $has_option" >&5 $as_echo "got result $has_option" >&6; } - unset has_option - unset SAVE_CXXFLAGS - done - unset option + unset has_option + unset SAVE_CXXFLAGS + done + unset option fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking check for fallthrough support" >&5 @@ -5565,7 +4913,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by rdfind $as_me 1.4.1, which was +This file was extended by rdfind $as_me 1.5.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5631,7 +4979,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -rdfind config.status 1.4.1 +rdfind config.status 1.5.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -5750,7 +5098,7 @@ # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" _ACEOF @@ -6362,29 +5710,35 @@ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -6402,53 +5756,48 @@ q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)$/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; diff -Nru rdfind-1.4.1/configure.ac rdfind-1.5.0/configure.ac --- rdfind-1.4.1/configure.ac 2018-11-12 21:06:29.000000000 +0000 +++ rdfind-1.5.0/configure.ac 2021-08-13 19:15:45.000000000 +0000 @@ -1,20 +1,20 @@ dnl configure.in for rdfind. -dnl copyright 2016-2018 Paul Dreik (earlier Paul Sundvall) +dnl copyright 2016-2019 Paul Dreik (earlier Paul Sundvall) dnl Distributed under GPL v 2.0 or later, at your option. dnl See LICENSE for further details. -VERSION="1.4.1" -AC_INIT([rdfind],[1.4.1]) +VERSION="1.5.0" +AC_INIT([rdfind],[1.5.0]) AC_CONFIG_SRCDIR([rdfind.cc]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE -dnl find and test the C compiler +dnl find and test the C++ compiler AC_PROG_CXX -AC_LANG_CPLUSPLUS - +AC_LANG([C++]) + AC_PROG_MAKE_SET AC_HEADER_STDC @@ -22,15 +22,15 @@ dnl see if we should run a debug build with lots of output showdebugmessages=no AC_ARG_ENABLE(debug, - AC_HELP_STRING( - [--enable-debug], - [enable debug printouts in program (default=no)] - ), - showdebugmessages="$enableval" + AS_HELP_STRING( + [--enable-debug], + [enable debug printouts in program (default=no)] + ), + showdebugmessages="$enableval" ) AC_MSG_RESULT($showdebugmessages) if test x"$showdebugmessages" = x"yes"; then - AC_DEFINE([RDFIND_DEBUG],[1],[Enable debug printouts in program]) + AC_DEFINE([RDFIND_DEBUG],[1],[Enable debug printouts in program]) fi dnl for assert() support @@ -42,8 +42,8 @@ first. If you have already done so and get this error message anyway, it may be installed somewhere else, maybe because you don't have root access. Pass CPPFLAGS=-I/your/path/to/nettle to configure - and try again. The path should be so that #include \"nettle/sha.h\" works. - On Debian-ish systems, use \"apt-get install nettle-dev\" to get a system + and try again. The path should be so that \#include "nettle/sha.h" works. + On Debian-ish systems, use "apt-get install nettle-dev" to get a system wide nettle install. ])]) AC_CHECK_LIB(nettle,main,,[AC_MSG_ERROR([ @@ -63,20 +63,10 @@ AC_SYS_LARGEFILE dnl make sure we have c++11 or better, -dnl allow for disabling this check on older systems like Ubuntu 14.04 -AC_ARG_ENABLE(cppstandardcheck, - [AS_HELP_STRING([--disable-cppstandardcheck], [disable checking for C++11 and trust CXX and CXXFLAGS instead ])], - [ ENABLECPPSTANDARDCHECK=$enableval ], - [ ENABLECPPSTANDARDCHECK=yes] ) -if test "$ENABLECPPSTANDARDCHECK" = "yes"; then - AC_MSG_NOTICE([checking for c++ 11, disable with --disable-cppstandardcheck]) - dnl AX_CXX_COMPILE_STDCXX_11([noext], [mandatory]) - AX_CXX_COMPILE_STDCXX([11],[noext],[mandatory]) -else - AC_MSG_NOTICE([not checking for c++11 support.]) -fi - - +AC_MSG_CHECKING([for C++11 support or better]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int f() { auto a=1;}])], + [AC_MSG_RESULT([yes])], + [AC_MSG_ERROR([no c++11 support, please set CXXFLAGS properly])]) AC_SUBST(VERSION) @@ -84,70 +74,84 @@ dnl check for how to set warning flags set_more_warnings=no AC_ARG_ENABLE(warnings, - AC_HELP_STRING( - [--enable-warnings], - [enable compiler warnings (default=no)] - ), - set_more_warnings="$enableval" + AS_HELP_STRING( + [--enable-warnings], + [enable compiler warnings (default=no)] + ), + set_more_warnings="$enableval" ) dnl the following warning related paragraph is from the gnumeric project, which dnl is gpl-v2 licensed. I modified and expanded it a bit. if test "x$set_more_warnings" != xno; then - dnl Clang needs this option, or else it will appear to support any - dnl warning option, only to spew warnings about them later. - uwoption="-Werror=unknown-warning-option" - SAVE_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $uwoption" - AC_MSG_CHECKING([whether compiler understands $uwoption]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([], [])], - [has_unknown_warning_option=yes], - [has_unknown_warning_option=no; uwoption=""]) - AC_MSG_RESULT($has_unknown_warning_option) - CXXFLAGS="$SAVE_CXXFLAGS" - - dnl see https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#compilers for a list of suggestions. Let's start - dnl small to begin with, and gradually increase. - warning_options="-Wall -Wextra -pedantic \ - -Wshadow \ - -Wold-style-cast \ - -Wnon-virtual-dtor \ - -Wold-style-cast \ - -Wcast-align \ - -Wunused \ - -Woverloaded-virtual \ - -Wconversion \ - -Wsign-conversion \ - -Wmisleading-indentation \ - -Wduplicated-cond \ - -Wduplicated-branches \ - -Wlogical-op \ - -Wnull-dereference \ - -Wuseless-cast \ - -Wdouble-promotion \ - -Wformat=2 \ - -Wlifetime \ - -Wbiznafronck" - for option in $warning_options ; do - SAVE_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $uwoption $option" - AC_MSG_CHECKING([whether compiler understands $option]) - dnl Include a system header so we ignore Werror=... flags - dnl that cause trouble. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include ]], [])], - [has_option=yes], - [has_option=no]) - CXXFLAGS="$SAVE_CXXFLAGS" - if test $has_option = yes; then - CXXFLAGS="$CXXFLAGS $option" - fi - AC_MSG_RESULT(got result $has_option) - unset has_option - unset SAVE_CXXFLAGS - done - unset option + dnl Clang needs this option, or else it will appear to support any + dnl warning option, only to spew warnings about them later. + uwoption="-Werror=unknown-warning-option" + SAVE_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $uwoption" + AC_MSG_CHECKING([whether compiler understands $uwoption]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([], [])], + [has_unknown_warning_option=yes], + [has_unknown_warning_option=no; uwoption=""]) + AC_MSG_RESULT($has_unknown_warning_option) + CXXFLAGS="$SAVE_CXXFLAGS" + + dnl see https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#compilers for a list of suggestions. Let's start + dnl small to begin with, and gradually increase. + warning_options="-Wall -Wextra -pedantic \ + -Wshadow \ + -Wold-style-cast \ + -Wnon-virtual-dtor \ + -Wold-style-cast \ + -Wcast-align \ + -Wunused \ + -Woverloaded-virtual \ + -Wconversion \ + -Wsign-conversion \ + -Wmisleading-indentation \ + -Wduplicated-cond \ + -Wduplicated-branches \ + -Wlogical-op \ + -Wnull-dereference \ + -Wuseless-cast \ + -Wdouble-promotion \ + -Wformat=2 \ + -Wlifetime \ + -Wsuggest-attribute=const \ + -Wsuggest-attribute=pure \ + -Wsuggest-final-types \ + -Wsuggest-final-methods \ + -Wsuggest-override \ + -Wcast-qual -Wcast-align=strict \ + -Wzero-as-null-pointer-constant \ + -Wparentheses \ + -Wdate-time \ + -Wextra-semi \ + -Wbiznafronck" + + #these warnings were tried but deemed unuseful for this project: + # -Wunsafe-loop-optimizations \ + + for option in $warning_options ; do + SAVE_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $uwoption $option" + AC_MSG_CHECKING([whether compiler understands $option]) + dnl Include a system header so we ignore Werror=... flags + dnl that cause trouble. + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], [])], + [has_option=yes], + [has_option=no]) + CXXFLAGS="$SAVE_CXXFLAGS" + if test $has_option = yes; then + CXXFLAGS="$CXXFLAGS $option" + fi + AC_MSG_RESULT(got result $has_option) + unset has_option + unset SAVE_CXXFLAGS + done + unset option fi dnl check for fallthrough. this is tricky to use, because it may give a warning @@ -181,4 +185,5 @@ dnl dnl instead, just use "VALGRIND=valgrind make check" to test with valgrind dnl read Makefile.in and write Makefile -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff -Nru rdfind-1.4.1/debian/changelog rdfind-1.5.0/debian/changelog --- rdfind-1.4.1/debian/changelog 2020-06-29 21:36:14.000000000 +0000 +++ rdfind-1.5.0/debian/changelog 2021-10-27 10:10:56.000000000 +0000 @@ -1,20 +1,19 @@ -rdfind (1.4.1-1build3) groovy; urgency=medium +rdfind (1.5.0-1.1) unstable; urgency=medium - * No change rebuild against new libnettle8 and libhogweed6 ABI. + * Non-maintainer upload + * Add patch from upstream to fix compilation with g++-11 (Closes: #997256) - -- Dimitri John Ledkov Mon, 29 Jun 2020 22:36:14 +0100 + -- Simon McVittie Wed, 27 Oct 2021 11:10:56 +0100 -rdfind (1.4.1-1build2) focal; urgency=medium +rdfind (1.5.0-1) unstable; urgency=medium - * No-change rebuild for libgcc-s1 package name change. + * d/copyright: Switch to https + * add CI config + * New upstream version 1.5.0 + * Bump Standards-Version to 4.6.0 + * update debian-compat to 13 - -- Matthias Klose Sun, 22 Mar 2020 16:56:08 +0100 - -rdfind (1.4.1-1build1) focal; urgency=medium - - * No-change rebuild against libnettle7 - - -- Steve Langasek Thu, 31 Oct 2019 22:14:37 +0000 + -- TANIGUCHI Takaki Sat, 11 Sep 2021 17:53:16 +0900 rdfind (1.4.1-1) unstable; urgency=medium diff -Nru rdfind-1.4.1/debian/compat rdfind-1.5.0/debian/compat --- rdfind-1.4.1/debian/compat 2018-11-13 02:18:32.000000000 +0000 +++ rdfind-1.5.0/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -11 diff -Nru rdfind-1.4.1/debian/control rdfind-1.5.0/debian/control --- rdfind-1.4.1/debian/control 2019-10-31 22:14:37.000000000 +0000 +++ rdfind-1.5.0/debian/control 2021-10-27 10:10:56.000000000 +0000 @@ -1,10 +1,9 @@ Source: rdfind Section: utils Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: TANIGUCHI Takaki -Build-Depends: debhelper (>= 11), nettle-dev, autoconf-archive -Standards-Version: 4.2.1 +Maintainer: TANIGUCHI Takaki +Build-Depends: debhelper-compat (= 13), nettle-dev, autoconf-archive +Standards-Version: 4.6.0 Homepage: https://rdfind.pauldreik.se/ Vcs-Git: https://salsa.debian.org/debian/rdfind.git Vcs-Browser: https://salsa.debian.org/debian/rdfind diff -Nru rdfind-1.4.1/debian/copyright rdfind-1.5.0/debian/copyright --- rdfind-1.4.1/debian/copyright 2018-11-13 02:18:32.000000000 +0000 +++ rdfind-1.5.0/debian/copyright 2021-10-27 10:10:56.000000000 +0000 @@ -1,6 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: rdfind -Source: http://rdfind.pauldreik.se/ +Source: https://rdfind.pauldreik.se/ Files: * Copyright: 2006 Paul Sundvall @@ -21,7 +21,7 @@ GNU General Public License for more details. . You should have received a copy of the GNU General Public License - along with this program. If not, see + along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff -Nru rdfind-1.4.1/debian/patches/include-limits-thanks-to-tastytea.patch rdfind-1.5.0/debian/patches/include-limits-thanks-to-tastytea.patch --- rdfind-1.4.1/debian/patches/include-limits-thanks-to-tastytea.patch 1970-01-01 00:00:00.000000000 +0000 +++ rdfind-1.5.0/debian/patches/include-limits-thanks-to-tastytea.patch 2021-10-27 10:10:56.000000000 +0000 @@ -0,0 +1,24 @@ +From: Paul Dreik +Date: Sun, 15 Aug 2021 20:31:31 +0200 +Subject: include (thanks to tastytea) + +This fixes compilation with g++-11. + +Origin: upstream, 1.5.1, commit:https://github.com/pauldreik/rdfind/commit/61877de88d782b63b17458a61fcc078391499b29 +Bug-Debian: https://bugs.debian.org/997256 +--- + rdfind.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rdfind.cc b/rdfind.cc +index fbd6cb8..64dd8f6 100644 +--- a/rdfind.cc ++++ b/rdfind.cc +@@ -9,6 +9,7 @@ + // std + #include + #include ++#include + #include + #include + diff -Nru rdfind-1.4.1/debian/patches/series rdfind-1.5.0/debian/patches/series --- rdfind-1.4.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ rdfind-1.5.0/debian/patches/series 2021-10-27 10:10:56.000000000 +0000 @@ -0,0 +1 @@ +include-limits-thanks-to-tastytea.patch diff -Nru rdfind-1.4.1/debian/salsa-ci.yml rdfind-1.5.0/debian/salsa-ci.yml --- rdfind-1.4.1/debian/salsa-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ rdfind-1.5.0/debian/salsa-ci.yml 2021-10-27 10:10:56.000000000 +0000 @@ -0,0 +1,4 @@ +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml diff -Nru rdfind-1.4.1/depcomp rdfind-1.5.0/depcomp --- rdfind-1.4.1/depcomp 2018-03-25 23:44:27.000000000 +0000 +++ rdfind-1.5.0/depcomp 2018-11-05 04:03:34.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2016-01-11.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -783,7 +783,7 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" diff -Nru rdfind-1.4.1/Dirlist.cc rdfind-1.5.0/Dirlist.cc --- rdfind-1.4.1/Dirlist.cc 2018-11-09 20:01:15.000000000 +0000 +++ rdfind-1.5.0/Dirlist.cc 2021-08-13 19:15:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - copyright 20016-2017 Paul Dreik (earlier Paul Sundvall) + copyright 2006-2017 Paul Dreik (earlier Paul Sundvall) Distributed under GPL v 2.0 or later, at your option. See LICENSE for further details. */ @@ -38,18 +38,18 @@ // open the directory DIR* dirp = opendir(dir.c_str()); - if (dirp == NULL) { + if (dirp == nullptr) { // failed to open directory RDDEBUG("failed to open directory" << std::endl); // this can be due to rights, or some other error. handlepossiblefile(dir, recursionlevel); - return 1; // its a file (or something else) + return 1; // it's a file (or something else) } // we opened the directory. let us read the content. RDDEBUG("opened directory" << std::endl); - struct dirent* dp = NULL; - while (NULL != (dp = readdir(dirp))) { + struct dirent* dp{}; + while (nullptr != (dp = readdir(dirp))) { // is the directory . or ..? if (0 == strcmp(".", dp->d_name) || 0 == strcmp("..", dp->d_name)) { continue; @@ -71,8 +71,6 @@ // symlink if (m_followsymlinks) { (*m_callback)(dir, std::string(dp->d_name), recursionlevel); - } - if (m_followsymlinks) { dowalk = true; } } else if (S_ISDIR(info.st_mode)) { @@ -92,7 +90,7 @@ // close the directory (void)closedir(dirp); - return 2; // its a directory + return 2; // it's a directory } // splits inputstring into path and filename. if no / character is found, @@ -120,7 +118,6 @@ int Dirlist::handlepossiblefile(const std::string& possiblefile, int recursionlevel) { - struct stat info; RDDEBUG("Now in handlepossiblefile with name " << possiblefile.c_str() << " and recursionlevel " << recursionlevel @@ -135,6 +132,7 @@ // investigate what kind of file it is, dont follow symlink int statval = 0; + struct stat info; do { statval = lstat(possiblefile.c_str(), &info); } while (statval < 0 && errno == EINTR); diff -Nru rdfind-1.4.1/Dirlist.hh rdfind-1.5.0/Dirlist.hh --- rdfind-1.4.1/Dirlist.hh 2018-10-16 13:30:48.000000000 +0000 +++ rdfind-1.5.0/Dirlist.hh 2021-08-13 19:15:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - copyright 20016-2017 Paul Dreik (earlier Paul Sundvall) + copyright 2006-2017 Paul Dreik (earlier Paul Sundvall) Distributed under GPL v 2.0 or later, at your option. See LICENSE for further details. */ diff -Nru rdfind-1.4.1/do_clang_format.sh rdfind-1.5.0/do_clang_format.sh --- rdfind-1.4.1/do_clang_format.sh 2018-03-26 11:45:53.000000000 +0000 +++ rdfind-1.5.0/do_clang_format.sh 2021-08-13 19:15:33.000000000 +0000 @@ -11,11 +11,11 @@ CLANGFORMAT=$(find /usr/local/bin /usr/bin -executable -name "clang-format*" |grep -v -- -diff |sort -g |tail -n1) if [ ! -x "$CLANGFORMAT" ] ; then - echo failed finding clangformat - exit 1 + echo failed finding clangformat + exit 1 else - echo found clang format: $CLANGFORMAT + echo found clang format: $CLANGFORMAT fi find . -maxdepth 1 -type f \( -name "*.h" -o -name "*.cpp" -o -name "*.cc" -o -name "*.hh" \) -print0 | \ - xargs -0 -n1 $CLANGFORMAT -i + xargs -0 -n1 $CLANGFORMAT -i diff -Nru rdfind-1.4.1/EasyRandom.cc rdfind-1.5.0/EasyRandom.cc --- rdfind-1.4.1/EasyRandom.cc 2018-11-09 20:01:15.000000000 +0000 +++ rdfind-1.5.0/EasyRandom.cc 2021-08-13 19:15:33.000000000 +0000 @@ -14,7 +14,7 @@ // project #include "EasyRandom.hh" -class EasyRandom::GlobalRandom +class EasyRandom::GlobalRandom final { public: char randomFileChar() { return getChar(m_dist(m_gen)); } @@ -52,15 +52,13 @@ std::uniform_int_distribution m_dist{ 0, nchars - 1 }; }; -namespace { EasyRandom::GlobalRandom& -getGlobalObject() +EasyRandom::getGlobalObject() { // thread safe (magic static) - static EasyRandom::GlobalRandom global{}; + static GlobalRandom global{}; return global; } -} EasyRandom::EasyRandom() : m_rand(getGlobalObject()) diff -Nru rdfind-1.4.1/EasyRandom.hh rdfind-1.5.0/EasyRandom.hh --- rdfind-1.4.1/EasyRandom.hh 2018-10-18 18:41:23.000000000 +0000 +++ rdfind-1.5.0/EasyRandom.hh 2021-08-13 19:15:33.000000000 +0000 @@ -14,10 +14,9 @@ * The state is global, and not held in the class * This class is not thread safe. */ -class EasyRandom +class EasyRandom final { public: - class GlobalRandom; EasyRandom(); /** * makes N random characters, suitable to use for a random filename. @@ -27,9 +26,12 @@ std::string makeRandomFileString(std::size_t N = 16); private: + class GlobalRandom; // keep a reference to the global magic static, to avoid the cost of thread // safe initialization. GlobalRandom& m_rand; + + static GlobalRandom& getGlobalObject(); }; #endif /* RDFIND_EASYRANDOM_HH_ */ diff -Nru rdfind-1.4.1/Fileinfo.cc rdfind-1.5.0/Fileinfo.cc --- rdfind-1.4.1/Fileinfo.cc 2018-11-12 21:04:17.000000000 +0000 +++ rdfind-1.5.0/Fileinfo.cc 2021-08-13 19:15:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - copyright 20016-2017 Paul Dreik (earlier Paul Sundvall) + copyright 2006-2017 Paul Dreik (earlier Paul Sundvall) Distributed under GPL v 2.0 or later, at your option. See LICENSE for further details. */ @@ -48,7 +48,7 @@ return -1; } - int checksumtype = Checksum::NOTSET; + auto checksumtype = Checksum::NOTSET; // read some bytes switch (filltype) { case readtobuffermode::READ_FIRST_BYTES: @@ -75,10 +75,8 @@ } if (checksumtype != Checksum::NOTSET) { - Checksum chk; - if (chk.init(checksumtype)) { - std::cerr << "error in checksum init" << std::endl; - } + Checksum chk(checksumtype); + char buffer[4096]; while (f1) { f1.read(buffer, sizeof(buffer)); @@ -146,7 +144,7 @@ case duptype::DUPTYPE_OUTSIDE_TREE: return "DUPTYPE_OUTSIDE_TREE"; default: - assert("we should not get here!" != nullptr); + assert("we should not get here!" == nullptr); } return "error-error"; @@ -260,7 +258,7 @@ return 0; } -} // anon. namespace +} // namespace // makes a symlink that points to A int diff -Nru rdfind-1.4.1/Fileinfo.hh rdfind-1.5.0/Fileinfo.hh --- rdfind-1.4.1/Fileinfo.hh 2018-10-18 19:47:47.000000000 +0000 +++ rdfind-1.5.0/Fileinfo.hh 2021-08-13 19:15:33.000000000 +0000 @@ -62,12 +62,12 @@ * @param A * @return */ - static const char* getduptypestring(const Fileinfo& A); + [[gnu::pure]] static const char* getduptypestring(const Fileinfo& A); void setduptype(enum duptype duptype_) { m_duptype = duptype_; } std::int64_t getidentity() const { return m_identity; } static std::int64_t identity(const Fileinfo& A) { return A.getidentity(); } - void setidentity(std::int64_t id) { m_identity = id; }; + void setidentity(std::int64_t id) { m_identity = id; } /** * reads info about the file, by querying the filesystem. @@ -75,7 +75,7 @@ */ bool readfileinfo(); - duptype getduptype() const { return m_duptype; }; + duptype getduptype() const { return m_duptype; } /// makes a symlink of "this" that points to A. int makesymlink(const Fileinfo& A); diff -Nru rdfind-1.4.1/INSTALL rdfind-1.5.0/INSTALL --- rdfind-1.4.1/INSTALL 2018-03-26 11:45:53.000000000 +0000 +++ rdfind-1.5.0/INSTALL 2021-08-13 19:15:33.000000000 +0000 @@ -1,33 +1,19 @@ -INSTALL for rdfind. By Paul Dreik. +You will need nettle (https://www.lysator.liu.se/~nisse/nettle/). -To install rdfind: -rdfind needs the library nettle by Niels Möller. +If you are building from a tarball and have nettle installed system wide, +building and installing should be as easy as +./configure +make +make install -If you alread have nettle installed properly and on a standard place, -the installation goes quite smooth. Proceed to section 2 below. +If you are building from git you may need to install autotools. +On a debian or ubuntu system, please install the following packages: +nettle-dev build-essential -1) -If you have nettle installed somewhere else (non-standard place, maybe -because you do not have root access), you have to supply the -paths to configure, for instance: -./configure CPPFLAGS=-I../nettle/ LDFLAGS=-L../nettle/nettle - -If you do not have nettle installed, you may install it either the -standard way (going to https://www.lysator.liu.se/~nisse/nettle/, -downloading and installing after instructions found there), or -with the small helper scripts in directory nettle provided with this -package. See the INSTALL file in that directory. - -2) -compile rdfind with -./configure (or ./configure CPPFLAGS=-I./nettle/ LDFLAGS=-L./nettle/nettle) -make -make install (optionally) +after that, +./bootstrap.sh && ./configure && make + +should do the trick -3) -rdfind should now work properly. Try man rdfind to check that the installation -was succesful. -Author Paul Dreik 2006 -see LICENSE for details. diff -Nru rdfind-1.4.1/install-sh rdfind-1.5.0/install-sh --- rdfind-1.4.1/install-sh 2018-03-25 23:44:27.000000000 +0000 +++ rdfind-1.5.0/install-sh 2018-11-05 04:03:34.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2014-09-12.12; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -271,15 +271,18 @@ fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,6 +291,11 @@ fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then @@ -324,14 +332,16 @@ # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) - # $RANDOM is not portable (e.g. dash); use it when possible to - # lower collision chance + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - # As "mkdir -p" follows symlinks and we work in /tmp possibly; so - # create the $tmpdir first (and fail if unsuccessful) to make sure - # that nobody tries to guess the $tmpdir name. + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 @@ -434,8 +444,8 @@ else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 @@ -500,9 +510,9 @@ done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru rdfind-1.4.1/Makefile.am rdfind-1.5.0/Makefile.am --- rdfind-1.4.1/Makefile.am 2018-10-28 08:44:18.000000000 +0000 +++ rdfind-1.5.0/Makefile.am 2021-08-13 19:15:33.000000000 +0000 @@ -12,6 +12,7 @@ testcases/hardlink_fails.sh \ testcases/symlinking_action.sh \ testcases/verify_filesize_option.sh \ + testcases/verify_maxfilesize_option.sh \ testcases/verify_dryrun_option.sh \ testcases/verify_ranking.sh \ testcases/verify_deterministic_operation.sh \ diff -Nru rdfind-1.4.1/Makefile.in rdfind-1.5.0/Makefile.in --- rdfind-1.4.1/Makefile.in 2018-11-12 21:18:47.000000000 +0000 +++ rdfind-1.5.0/Makefile.in 2021-08-13 19:22:47.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -122,7 +122,12 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/Checksum.Po \ + ./$(DEPDIR)/CmdlineParser.Po ./$(DEPDIR)/Dirlist.Po \ + ./$(DEPDIR)/EasyRandom.Po ./$(DEPDIR)/Fileinfo.Po \ + ./$(DEPDIR)/Rdutil.Po ./$(DEPDIR)/UndoableUnlink.Po \ + ./$(DEPDIR)/rdfind.Po am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -413,7 +418,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ -HAVE_CXX11 = @HAVE_CXX11@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -496,6 +500,7 @@ testcases/hardlink_fails.sh \ testcases/symlinking_action.sh \ testcases/verify_filesize_option.sh \ + testcases/verify_maxfilesize_option.sh \ testcases/verify_dryrun_option.sh \ testcases/verify_ranking.sh \ testcases/verify_deterministic_operation.sh \ @@ -552,8 +557,8 @@ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -632,14 +637,20 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Checksum.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CmdlineParser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Dirlist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EasyRandom.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Fileinfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rdutil.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UndoableUnlink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfind.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Checksum.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CmdlineParser.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Dirlist.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EasyRandom.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Fileinfo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rdutil.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UndoableUnlink.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfind.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -877,7 +888,7 @@ fi; \ $$success || exit 1 -check-TESTS: +check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @@ -926,6 +937,13 @@ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +testcases/verify_maxfilesize_option.sh.log: testcases/verify_maxfilesize_option.sh + @p='testcases/verify_maxfilesize_option.sh'; \ + b='testcases/verify_maxfilesize_option.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) testcases/verify_dryrun_option.sh.log: testcases/verify_dryrun_option.sh @p='testcases/verify_dryrun_option.sh'; \ b='testcases/verify_dryrun_option.sh'; \ @@ -983,7 +1001,10 @@ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -1193,7 +1214,14 @@ distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/Checksum.Po + -rm -f ./$(DEPDIR)/CmdlineParser.Po + -rm -f ./$(DEPDIR)/Dirlist.Po + -rm -f ./$(DEPDIR)/EasyRandom.Po + -rm -f ./$(DEPDIR)/Fileinfo.Po + -rm -f ./$(DEPDIR)/Rdutil.Po + -rm -f ./$(DEPDIR)/UndoableUnlink.Po + -rm -f ./$(DEPDIR)/rdfind.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags @@ -1241,7 +1269,14 @@ maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/Checksum.Po + -rm -f ./$(DEPDIR)/CmdlineParser.Po + -rm -f ./$(DEPDIR)/Dirlist.Po + -rm -f ./$(DEPDIR)/EasyRandom.Po + -rm -f ./$(DEPDIR)/Fileinfo.Po + -rm -f ./$(DEPDIR)/Rdutil.Po + -rm -f ./$(DEPDIR)/UndoableUnlink.Po + -rm -f ./$(DEPDIR)/rdfind.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -1263,14 +1298,14 @@ .MAKE: all check-am install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ - check-am clean clean-binPROGRAMS clean-cscope clean-generic \ - cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-compile distclean-generic \ - distclean-hdr distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \ + check-TESTS check-am clean clean-binPROGRAMS clean-cscope \ + clean-generic cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ diff -Nru rdfind-1.4.1/missing rdfind-1.5.0/missing --- rdfind-1.4.1/missing 2018-03-25 23:44:27.000000000 +0000 +++ rdfind-1.5.0/missing 2018-11-05 04:03:34.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru rdfind-1.4.1/NEWS rdfind-1.5.0/NEWS --- rdfind-1.4.1/NEWS 2018-04-08 18:50:19.000000000 +0000 +++ rdfind-1.5.0/NEWS 2021-08-13 19:15:33.000000000 +0000 @@ -1,4 +1,4 @@ -1.4.0alph +1.4.0alpha now requires a c++11 capable compiler 1.3.5 Capitalization of bytes is now more correct in the console output. diff -Nru rdfind-1.4.1/rdfind.1 rdfind-1.5.0/rdfind.1 --- rdfind-1.4.1/rdfind.1 2018-11-12 21:07:00.000000000 +0000 +++ rdfind-1.5.0/rdfind.1 2021-08-13 19:15:45.000000000 +0000 @@ -3,7 +3,7 @@ .\" .\" Author Paul Dreik 2006 .\" see LICENSE for details. -.TH rdfind "1" 1.4.1 "Nov 2018" rdfind +.TH rdfind "1" 1.5.0 "Aug 2021" rdfind .SH NAME rdfind \- finds duplicate files .SH SYNOPSIS @@ -41,7 +41,7 @@ an original has been found. Given two files A and B which have equal size and content, the ranking is as follows: -If A was found while scanning an input argument earlier than than B, A +If A was found while scanning an input argument earlier than B, A is higher ranked. If A was found at a directory depth lower than B, A is higher ranked @@ -65,6 +65,10 @@ Ignores files with less than N bytes. Default is 1, meaning empty files are ignored. .TP +.BR \-maxsize " "\fIN\fR +Ignores files with N bytes or more. Default is 0, which means this check +is disabled. +.TP .BR \-followsymlinks " " \fItrue\fR|\fIfalse\fR Follow symlinks. Default is false. .TP @@ -91,7 +95,8 @@ .TP .BR \-makeresultsfile " " \fItrue\fR|\fIfalse\fR Make a results file in the current directory. Default is true. If the -file exists, it is overwritten. +file exists, it is overwritten. This does not affect whether items are +deleted. See -dryrun for how to disable deletions. .TP .BR \-outputname " " \fIname\fR Make the results file name to be "name" instead of the default @@ -152,7 +157,7 @@ duplicates. This might not be what you want. The symlink creates absolute links. This might not be what you -want. To create relative links instead, you may use the symlinks (2) +want. To create relative links instead, you may use the symlink (2) command, which is able to convert absolute links to relative links. Older versions unfortunately contained a misspelling on the word @@ -176,7 +181,7 @@ Niels Möller, Carl Payne and Salvatore Ansani. Thanks also to you who tested the program and sent me feedback. .SH VERSION -1.4.1 (release date 2018-11-12) +1.5.0 (release date 2021-08-13) .SH COPYRIGHT This program is distributed under GPLv2 or later, at your option. .SH "SEE ALSO" diff -Nru rdfind-1.4.1/rdfind.cc rdfind-1.5.0/rdfind.cc --- rdfind-1.4.1/rdfind.cc 2018-11-12 21:13:53.000000000 +0000 +++ rdfind-1.5.0/rdfind.cc 2021-08-13 19:15:33.000000000 +0000 @@ -1,5 +1,5 @@ /** - copyright 20016-2017 Paul Dreik (earlier Paul Sundvall) + copyright 2006-2017 Paul Dreik (earlier Paul Sundvall) Distributed under GPL v 2.0 or later, at your option. See LICENSE for further details. */ @@ -55,6 +55,8 @@ << " false implies -minsize 0)\n" << " -minsize N (N=1) ignores files with size less than N " "bytes\n" + << " -maxsize N (N=0) ignores files with size N " + "bytes and larger (use 0 to disable this check).\n" << " -followsymlinks true |(false) follow symlinks\n" << " -removeidentinode (true)| false ignore files with nonunique " "device and inode\n" @@ -94,9 +96,11 @@ bool makeresultsfile = true; // write a results file Fileinfo::filesizetype minimumfilesize = 1; // minimum file size to be noticed (0 - include empty files) + Fileinfo::filesizetype maximumfilesize = + 0; // if nonzero, files this size or larger are ignored bool deleteduplicates = false; // delete duplicate files bool followsymlinks = false; // follow symlinks - bool dryrun = false; // only dryrun, dont destroy anything + bool dryrun = false; // only dryrun, don't destroy anything bool remove_identical_inode = true; // remove files with identical inodes bool usemd5 = false; // use md5 checksum to check for similarity bool usesha1 = false; // use sha1 checksum to check for similarity @@ -144,6 +148,12 @@ throw std::runtime_error("negative value of minsize not allowed"); } o.minimumfilesize = minsize; + } else if (parser.try_parse_string("-maxsize")) { + const long long maxsize = std::stoll(parser.get_parsed_string()); + if (maxsize < 0) { + throw std::runtime_error("negative value of maxsize not allowed"); + } + o.maximumfilesize = maxsize; } else if (parser.try_parse_bool("-deleteduplicates")) { o.deleteduplicates = parser.get_parsed_bool(); } else if (parser.try_parse_bool("-followsymlinks")) { @@ -170,25 +180,25 @@ } } else if (parser.try_parse_string("-sleep")) { const auto nextarg = std::string(parser.get_parsed_string()); - if (nextarg == "1ms") + if (nextarg == "1ms") { o.nsecsleep = 1000000; - else if (nextarg == "2ms") + } else if (nextarg == "2ms") { o.nsecsleep = 2000000; - else if (nextarg == "3ms") + } else if (nextarg == "3ms") { o.nsecsleep = 3000000; - else if (nextarg == "4ms") + } else if (nextarg == "4ms") { o.nsecsleep = 4000000; - else if (nextarg == "5ms") + } else if (nextarg == "5ms") { o.nsecsleep = 5000000; - else if (nextarg == "10ms") + } else if (nextarg == "10ms") { o.nsecsleep = 10000000; - else if (nextarg == "25ms") + } else if (nextarg == "25ms") { o.nsecsleep = 25000000; - else if (nextarg == "50ms") + } else if (nextarg == "50ms") { o.nsecsleep = 50000000; - else if (nextarg == "100ms") + } else if (nextarg == "100ms") { o.nsecsleep = 100000000; - else { + } else { std::cerr << "sorry, can only understand a few sleep values for " "now. \"" << nextarg << "\" is not among them.\n"; @@ -209,6 +219,20 @@ std::exit(EXIT_FAILURE); } } + + // fix default values + if (o.maximumfilesize == 0) { + o.maximumfilesize = std::numeric_limits::max(); + } + + // verify conflicting arguments + if (!(o.minimumfilesize < o.maximumfilesize)) { + std::cerr << "maximum filesize " << o.maximumfilesize + << " must be larger than minimum filesize " << o.minimumfilesize + << "\n"; + std::exit(EXIT_FAILURE); + } + // done with parsing of options. remaining arguments are files and dirs. // decide what checksum to use - if no checksum is set, force sha1! @@ -232,7 +256,9 @@ Fileinfo tmp(std::move(expandedname), current_cmdline_index, depth); if (tmp.readfileinfo()) { if (tmp.isRegularFile()) { - if (tmp.size() >= global_options->minimumfilesize) { + const auto size = tmp.size(); + if (size >= global_options->minimumfilesize && + size < global_options->maximumfilesize) { filelist.emplace_back(std::move(tmp)); } } @@ -319,7 +345,7 @@ gswd.totalsize(std::cout) << std::endl; std::cout << "Removed " << gswd.removeUniqueSizes() - << " files due to unique sizes from list."; + << " files due to unique sizes from list. "; std::cout << filelist.size() << " files left." << std::endl; // ok. we now need to do something stronger to disambiguate the duplicate @@ -344,20 +370,21 @@ for (auto it = modes.begin() + 1; it != modes.end(); ++it) { std::cout << dryruntext << "Now eliminating candidates based on " - << it->second << ":" << std::flush; + << it->second << ": " << std::flush; // read bytes (destroys the sorting, for disk reading efficiency) gswd.fillwithbytes(it[0].first, it[-1].first, o.nsecsleep); // remove non-duplicates std::cout << "removed " << gswd.removeUniqSizeAndBuffer() - << " files from list."; + << " files from list. "; std::cout << filelist.size() << " files left." << std::endl; } // What is left now is a list of duplicates, ordered on size. - // We also know the list is ordered on size, then bytes, and all unique files - // are gone so it contains sequences of duplicates. Go ahead and mark them. + // We also know the list is ordered on size, then bytes, and all unique + // files are gone so it contains sequences of duplicates. Go ahead and mark + // them. gswd.markduplicates(); std::cout << dryruntext << "It seems like you have " << filelist.size() diff -Nru rdfind-1.4.1/RdfindDebug.hh rdfind-1.5.0/RdfindDebug.hh --- rdfind-1.4.1/RdfindDebug.hh 2018-11-09 20:01:15.000000000 +0000 +++ rdfind-1.5.0/RdfindDebug.hh 2021-08-13 19:15:33.000000000 +0000 @@ -1,9 +1,12 @@ /* - copyright 20016-2017 Paul Dreik (earlier Paul Sundvall) + copyright 2006-2017 Paul Dreik (earlier Paul Sundvall) Distributed under GPL v 2.0 or later, at your option. See LICENSE for further details. */ +#ifndef RDFINDDEBUG_HH_INCLUDED +#define RDFINDDEBUG_HH_INCLUDED + #include "config.h" // debug macros. pass --enable-debug=yes to configure to enable it @@ -18,3 +21,5 @@ if (0) { \ } #endif + +#endif // RDFINDDEBUG_HH_INCLUDED diff -Nru rdfind-1.4.1/Rdutil.cc rdfind-1.5.0/Rdutil.cc --- rdfind-1.4.1/Rdutil.cc 2018-11-09 20:01:15.000000000 +0000 +++ rdfind-1.5.0/Rdutil.cc 2021-08-13 19:15:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - copyright 20016-2017 Paul Dreik (earlier Paul Sundvall) + copyright 2006-2017 Paul Dreik (earlier Paul Sundvall) Distributed under GPL v 2.0 or later, at your option. See LICENSE for further details. */ @@ -95,7 +95,7 @@ } break; default: - assert("file with bad duptype at this stage. Programming error!" != + assert("file with bad duptype at this stage. Programming error!" == nullptr); } } @@ -112,7 +112,8 @@ /// @param m2 may be null explicit dryrun_helper(const char* m1, const char* m2 = nullptr) : m_m1(m1) - , m_m2(m2){}; + , m_m2(m2) + {} const char* const m_m1; const char* const m_m2; @@ -132,7 +133,7 @@ return 0; } }; // class -} // anon. namespace +} // namespace std::size_t Rdutil::deleteduplicates(bool dryrun) const @@ -171,8 +172,9 @@ const auto ret = applyactiononfile(m_list, obj); std::cout.flush(); return ret; - } else + } else { return applyactiononfile(m_list, &Fileinfo::static_makehardlink); + } } // mark files with a unique number @@ -279,7 +281,7 @@ } } } -} // anon. namespace +} // namespace int Rdutil::sortOnDeviceAndInode() { @@ -450,6 +452,7 @@ return size_before - m_list.size(); } #endif + Fileinfo::filesizetype Rdutil::totalsizeinbytes(int opmode) const { @@ -515,7 +518,7 @@ return "!way too much!"; } } -} +} // namespace littlehelper std::ostream& Rdutil::totalsize(std::ostream& out, int opmode) const diff -Nru rdfind-1.4.1/Rdutil.hh rdfind-1.5.0/Rdutil.hh --- rdfind-1.4.1/Rdutil.hh 2018-10-25 04:31:54.000000000 +0000 +++ rdfind-1.5.0/Rdutil.hh 2021-08-13 19:15:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - copyright 20016-2017 Paul Dreik (earlier Paul Sundvall) + copyright 2006-2017 Paul Dreik (earlier Paul Sundvall) Distributed under GPL v 2.0 or later, at your option. See LICENSE for further details. @@ -17,7 +17,8 @@ { public: explicit Rdutil(std::vector& list) - : m_list(list){}; + : m_list(list) + {} /** * print file names to a file, with extra information. @@ -105,7 +106,7 @@ * m_duptype=Fileinfo::DUPTYPE_FIRST_OCCURRENCE * @return */ - Fileinfo::filesizetype totalsizeinbytes(int opmode = 0) const; + [[gnu::pure]] Fileinfo::filesizetype totalsizeinbytes(int opmode = 0) const; /** * outputs a nicely formatted string "45 bytes" or "3 Gibytes" diff -Nru rdfind-1.4.1/testcases/checksum_options.sh rdfind-1.5.0/testcases/checksum_options.sh --- rdfind-1.4.1/testcases/checksum_options.sh 2018-10-15 07:00:23.000000000 +0000 +++ rdfind-1.5.0/testcases/checksum_options.sh 2021-08-13 19:15:33.000000000 +0000 @@ -10,13 +10,13 @@ for checksumtype in md5 sha1 sha256; do - reset_teststate - dbgecho "trying checksum $checksumtype" - echo checksumtest >a - echo checksumtest >b - $rdfind -checksum $checksumtype -deleteduplicates true a b - [ -e a ] - [ ! -e b ] + reset_teststate + dbgecho "trying checksum $checksumtype" + echo checksumtest >a + echo checksumtest >b + $rdfind -checksum $checksumtype -deleteduplicates true a b + [ -e a ] + [ ! -e b ] done dbgecho "all is good in this test!" diff -Nru rdfind-1.4.1/testcases/common_funcs.sh rdfind-1.5.0/testcases/common_funcs.sh --- rdfind-1.4.1/testcases/common_funcs.sh 2018-10-15 19:14:40.000000000 +0000 +++ rdfind-1.5.0/testcases/common_funcs.sh 2021-08-13 19:15:33.000000000 +0000 @@ -6,19 +6,23 @@ #bail out on the first error set -e -/bin/echo -n "checking for rdfind ..." -rdfind=$(readlink -f $(dirname $0)/../rdfind) +me=$(basename $0) + + +/bin/echo -n "$me: checking for rdfind ..." +rdfind=$PWD/rdfind if [ ! -x "$rdfind" ]; then - echo "could not find $rdfind" + echo "could not find $rdfind" + exit 1 fi echo " OK." /bin/echo -n "checking for valgrind ..." if [ -z $VALGRIND ] ; then - echo "not used." + echo "not used." else - echo "active! here is the command: $VALGRIND" -fi + echo "active! here is the command: $VALGRIND" +fi rdfind="$VALGRIND $rdfind" @@ -27,7 +31,7 @@ dbgecho() { - echo "$0 debug: " "$@" + echo "$0 debug: " "$@" } @@ -40,9 +44,12 @@ datadir=$(mktemp -d -t rdfindtestcases.d.XXXXXXXXXXXX) dbgecho "temp dir is $datadir" + + + cleanup () { -cd / -rm -rf "$datadir" + cd / + rm -rf "$datadir" } if [ -z $KEEPTEMPDIR ] ; then @@ -53,11 +60,31 @@ cd $datadir reset_teststate() { - cd / - rm -rf "$datadir" - mkdir -p $datadir - cd "$datadir" + cd / + rm -rf "$datadir" + mkdir -p $datadir + cd "$datadir" } +verify() { + if ! $@ ; then + echo "failed asserting $@" + exit 1 + fi +} +# where to mount disorderfs for the determinism tests +DISORDERED_MNT=$datadir/disordered_mnt +DISORDERED_ROOT=$datadir/disordered_root + +# do we have a working disorder fs? +hasdisorderfs=false +if which disorderfs fusermount >/dev/null 2>&1; then + mkdir -p $DISORDERED_MNT $DISORDERED_ROOT + if disorderfs $DISORDERED_ROOT $DISORDERED_MNT >/dev/null 2>&1 ; then + # "Sälj inte skinnet förrän björnen är skjuten - Don't count your chickens until they're hatched" + fusermount -z -u $DISORDERED_MNT + hasdisorderfs=true + fi +fi diff -Nru rdfind-1.4.1/testcases/hardlink_fails.sh rdfind-1.5.0/testcases/hardlink_fails.sh --- rdfind-1.4.1/testcases/hardlink_fails.sh 2018-11-12 20:24:22.000000000 +0000 +++ rdfind-1.5.0/testcases/hardlink_fails.sh 2021-08-13 19:15:33.000000000 +0000 @@ -13,8 +13,8 @@ files="a subdir/b c some/deeply/nested/subdir/d" nfiles=4 for n in $files ; do - mkdir -p $(dirname $datadir/$n) - echo "hello hardlink" > $datadir/$n + mkdir -p $(dirname $datadir/$n) + echo "hello hardlink" > $datadir/$n done #eliminate them. @@ -22,11 +22,11 @@ #make sure one is a hard link to the other. for n in $files ; do - nhardlinks=$(stat -c %h $datadir/$n) - if [ $nhardlinks -ne $nfiles ] ; then - dbgecho "expected $nfiles hardlinks, got $nhardlinks" - exit 1 - fi + nhardlinks=$(stat -c %h $datadir/$n) + if [ $nhardlinks -ne $nfiles ] ; then + dbgecho "expected $nfiles hardlinks, got $nhardlinks" + exit 1 + fi done dbgecho passed the happy path @@ -37,8 +37,8 @@ #trying to hardlink something we do not have access to. #unless run as root which would be horrible. if [ "$(id -u)" -eq 0 ]; then - dbgecho "running as root or through sudo, dangerous! Will not proceed with this unit tests." - exit 1 + dbgecho "running as root or through sudo, dangerous! Will not proceed with this unit tests." + exit 1 fi reset_teststate @@ -52,8 +52,8 @@ #make sure that our own copy is still there if [ ! -e $(basename $system_file) ] ; then - dbgecho file is missing, rdfind should not have removed it! - exit 1 + dbgecho file is missing, rdfind should not have removed it! + exit 1 fi dbgecho "all is good in this test!" diff -Nru rdfind-1.4.1/testcases/sha1collisions.sh rdfind-1.5.0/testcases/sha1collisions.sh --- rdfind-1.4.1/testcases/sha1collisions.sh 2018-10-15 06:39:06.000000000 +0000 +++ rdfind-1.5.0/testcases/sha1collisions.sh 2021-08-13 19:15:33.000000000 +0000 @@ -8,7 +8,7 @@ reset_teststate -#unpack collisions exampel from https://shattered.it/static/shattered.pdf +#unpack collisions example from https://shattered.it/static/shattered.pdf base64 --decode <$testscriptsdir/sha1collisions/coll.tar.bz2.b64 |tar xvfj - #make sure nothing happens when using sha256 diff -Nru rdfind-1.4.1/testcases/symlinking_action.sh rdfind-1.5.0/testcases/symlinking_action.sh --- rdfind-1.4.1/testcases/symlinking_action.sh 2018-10-12 19:14:05.000000000 +0000 +++ rdfind-1.5.0/testcases/symlinking_action.sh 2021-08-13 19:15:33.000000000 +0000 @@ -12,8 +12,8 @@ files="first subdir/b c some/deeply/nested/subdir/d" nfiles=4 for n in $files ; do - mkdir -p $(dirname $datadir/$n) - echo "hello symlink" > $datadir/$n + mkdir -p $(dirname $datadir/$n) + echo "hello symlink" > $datadir/$n done #eliminate them. @@ -23,31 +23,31 @@ export LANG= for n in $files ; do -if [ $n = "first" ]; then - inodeforfirst=$(stat -c %i "$datadir/first") - if [ x"$(stat -c %F "$datadir/first")" != x"regular file" ] ; then - dbgecho "expected first to be a regular file" - exit 1 - fi -else - if [ x"$(stat -c %F "$datadir/$n")" != x"symbolic link" ] ; then - dbgecho "expected file $n to be a symbolic link" - exit 1 + if [ $n = "first" ]; then + inodeforfirst=$(stat -c %i "$datadir/first") + if [ x"$(stat -c %F "$datadir/first")" != x"regular file" ] ; then + dbgecho "expected first to be a regular file" + exit 1 + fi + else + if [ x"$(stat -c %F "$datadir/$n")" != x"symbolic link" ] ; then + dbgecho "expected file $n to be a symbolic link" + exit 1 + fi + inodeforn=$(stat --dereference -c %i "$datadir/$n") + if [ $inodeforfirst != $inodeforn ] ; then + dbgecho "$n does not refer to first - inode mismatch $inodeforfirst vs $inodeforn" + exit 1 + fi + fi - inodeforn=$(stat --dereference -c %i "$datadir/$n") - if [ $inodeforfirst != $inodeforn ] ; then - dbgecho "$n does not refer to first - inode mismatch $inodeforfirst vs $inodeforn" - exit 1 - fi - -fi done dbgecho passed the happy path #now try to make a symlink somewhere where it fails. if [ "$(id -u)" -eq 0 ]; then - dbgecho "running as root or through sudo, dangerous! Will not proceed with this unit tests." - exit 1 + dbgecho "running as root or through sudo, dangerous! Will not proceed with this unit tests." + exit 1 fi reset_teststate @@ -57,12 +57,12 @@ if ! grep -iq "failed to make symlink" rdfind.out ; then dbgecho "did not get the expected error message. see for yourself above." exit 1 -fi +fi #make sure that our own copy is still there if [ ! -e $(basename $system_file) ] ; then - dbgecho file is missing, rdfind should not have removed it! - exit 1 + dbgecho file is missing, rdfind should not have removed it! + exit 1 fi dbgecho passed the test with trying to write to a system directory @@ -72,40 +72,40 @@ # etc. # argument 1 is path to file 1. argument 2 is path to file 2. pathsimplification() { -reset_teststate -mkdir -p $(dirname $1) && echo "simplification test" >$1 -mkdir -p $(dirname $2) && echo "simplification test" >$2 - -#dbgecho "state before (args $1 $2)" -#tree - -$rdfind -makesymlinks true $1 $2 2>&1 |tee rdfind.out -# $2 should be a symlink to $1 -if [ x"$(stat -c %F "$1")" != x"regular file" ] ; then - dbgecho "expected file $1 to be a regular file" - exit 1 -fi -if [ x"$(stat -c %F "$2")" != x"symbolic link" ] ; then - dbgecho "expected file $1 to be a symbolic link" - exit 1 -fi -inodefor1=$(stat -c %i "$1") -inodefor2=$(stat --dereference -c %i "$2") -if [ $inodefor1 != $inodefor2 ] ; then - dbgecho "inode mismatch $inodefor1 vs $inodefor2" - exit 1 -fi -#switching directory should still give the correct answer -cd $(dirname $2) -inodefor2=$(stat --dereference -c %i $(basename "$2")) -if [ $inodefor1 != $inodefor2 ] ; then - dbgecho "inode mismatch $inodefor1 vs $inodefor2" - exit 1 -fi -#dbgecho "state after $1 $2" -#sync -#tree -echo ----------------------------------------------------------- + reset_teststate + mkdir -p $(dirname $1) && echo "simplification test" >$1 + mkdir -p $(dirname $2) && echo "simplification test" >$2 + + #dbgecho "state before (args $1 $2)" + #tree + + $rdfind -makesymlinks true $1 $2 2>&1 |tee rdfind.out + # $2 should be a symlink to $1 + if [ x"$(stat -c %F "$1")" != x"regular file" ] ; then + dbgecho "expected file $1 to be a regular file" + exit 1 + fi + if [ x"$(stat -c %F "$2")" != x"symbolic link" ] ; then + dbgecho "expected file $1 to be a symbolic link" + exit 1 + fi + inodefor1=$(stat -c %i "$1") + inodefor2=$(stat --dereference -c %i "$2") + if [ $inodefor1 != $inodefor2 ] ; then + dbgecho "inode mismatch $inodefor1 vs $inodefor2" + exit 1 + fi + #switching directory should still give the correct answer + cd $(dirname $2) + inodefor2=$(stat --dereference -c %i $(basename "$2")) + if [ $inodefor1 != $inodefor2 ] ; then + dbgecho "inode mismatch $inodefor1 vs $inodefor2" + exit 1 + fi + #dbgecho "state after $1 $2" + #sync + #tree + echo ----------------------------------------------------------- } pathsimplification a b @@ -114,7 +114,7 @@ pathsimplification subdir1/a subdir2/b pathsimplification subdir1/../a subdir2/b pathsimplification subdir1/../a subdir2/./././b -pathsimplification subdir2/./././b subdir1/../a +pathsimplification subdir2/./././b subdir1/../a pathsimplification a subdir2/./././b pathsimplification $(pwd)/a b pathsimplification a $(pwd)/b @@ -137,4 +137,3 @@ dbgecho passed the test with variants of paths dbgecho "all is good for the symlinks test!" - diff -Nru rdfind-1.4.1/testcases/verify_deterministic_operation.sh rdfind-1.5.0/testcases/verify_deterministic_operation.sh --- rdfind-1.4.1/testcases/verify_deterministic_operation.sh 2018-10-26 09:39:08.000000000 +0000 +++ rdfind-1.5.0/testcases/verify_deterministic_operation.sh 2021-08-13 19:15:33.000000000 +0000 @@ -6,17 +6,21 @@ set -e . "$(dirname "$0")/common_funcs.sh" - -DISORDERED_MNT=$datadir/disordered_mnt -DISORDERED_ROOT=$datadir/disordered_root +if $hasdisorderfs ; then + echo "$me: found a working disorderfs setup. unit test will be properly executed" +else + echo "$me: please install disorderfs to execute this test properly!" + echo "$me: falsely exiting with success now" + exit 0 +fi #unmount disordered unmount_disordered() { - if [ -d $DISORDERED_MNT ]; then - if ! fusermount -u $DISORDERED_MNT ; then - dbgecho failed unmounting disordered - fi - fi + if [ -d $DISORDERED_MNT ]; then + if ! fusermount --quiet -u $DISORDERED_MNT ; then + dbgecho failed unmounting disordered + fi + fi } DISORDERED_FLAGS_RANDOM="--shuffle-dirents=yes --sort-dirents=no --reverse-dirents=no" @@ -24,52 +28,42 @@ DISORDERED_FLAGS_DESC="--shuffle-dirents=no --sort-dirents=yes --reverse-dirents=yes" DISORDERED_FLAGS=$DISORDERED_FLAGS_RANDOM mount_disordered() { - mkdir -p $DISORDERED_MNT - mkdir -p $DISORDERED_ROOT - disorderfs $DISORDERED_FLAGS $DISORDERED_ROOT $DISORDERED_MNT >/dev/null + mkdir -p $DISORDERED_MNT + mkdir -p $DISORDERED_ROOT + disorderfs $DISORDERED_FLAGS $DISORDERED_ROOT $DISORDERED_MNT >/dev/null } #create cr8() { - while [ $# -gt 0 ] ; do - mkdir -p $(dirname $1) - # make sure the file is longer than what fits in the byte buffer - head -c1000 /dev/zero >$1 - shift - done + while [ $# -gt 0 ] ; do + mkdir -p $(dirname $1) + # make sure the file is longer than what fits in the byte buffer + head -c1000 /dev/zero >$1 + shift + done } local_reset() { - if which disorderfs >/dev/null ; then - unmount_disordered - reset_teststate - mount_disordered - else - reset_teststate - fi - cr8 $@ + unmount_disordered + reset_teststate + mount_disordered + cr8 $@ } #sets global variable outcome to which file was preserved, a or b. #$1 - value of -deterministic flag (true or false) run_outcome() { - local_reset $DISORDERED_MNT/a $DISORDERED_MNT/b - $rdfind -deterministic $1 -deleteduplicates true $DISORDERED_MNT >rdfind.out - if [ -f $DISORDERED_MNT/a -a ! -e $DISORDERED_MNT/b ] ; then - outcome=a - elif [ ! -e $DISORDERED_MNT/a -a -f $DISORDERED_MNT/b ] ; then - outcome=b - else - dbgecho "bad result! test failed!" - exit 1 - fi + local_reset $DISORDERED_MNT/a $DISORDERED_MNT/b + $rdfind -deterministic $1 -deleteduplicates true $DISORDERED_MNT >rdfind.out + if [ -f $DISORDERED_MNT/a -a ! -e $DISORDERED_MNT/b ] ; then + outcome=a + elif [ ! -e $DISORDERED_MNT/a -a -f $DISORDERED_MNT/b ] ; then + outcome=b + else + dbgecho "bad result! test failed!" + exit 1 + fi } - -if ! which disorderfs >/dev/null ; then - dbgecho "could not execute tests for deterministic behaviour - please install disorderfs" - exit 0 -fi - trap "unmount_disordered;cleanup" INT QUIT EXIT #verify that with deterministic disabled, results depend on ordering. @@ -77,13 +71,13 @@ run_outcome false outcome_asc=$outcome -DISORDERED_FLAGS=$DISORDERED_FLAGS_DESC +DISORDERED_FLAGS=$DISORDERED_FLAGS_DESC run_outcome false outcome_desc=$outcome -if [ $outcome_desc = $outcome_asc ] ; then - dbgecho "fail! \"-deterministic false\" should have given the same outcome regardless of ordering" - exit 1 +if [ $outcome_desc = $outcome_asc ] ; then + dbgecho "fail! \"-deterministic false\" should have given the same outcome regardless of ordering" + exit 1 fi dbgecho "tests for deterministic false passed ok (non-randomized)" @@ -94,34 +88,35 @@ run_outcome false last_outcome=$outcome for i in $(seq 128) ; do - run_outcome false - if [ $last_outcome != $outcome ] ; then - #proved that both outcomes can happen. good! - break - else - if [ $i -eq 64 ] ; then - dbgecho "reached max number of iterations without getting different results". - exit 1 - fi - fi - last_outcome=$outcome + run_outcome false + if [ $last_outcome != $outcome ] ; then + #proved that both outcomes can happen. good! + dbgecho "got a different outcome after $i random tries" + break + else + if [ $i -eq 64 ] ; then + dbgecho "reached max number of iterations without getting different results". + exit 1 + fi + fi + last_outcome=$outcome done dbgecho "tests for \"-deterministic false\" passed ok on randomized filesystem order" -#verify that with determinstic enabled, we get the same results regardless of ordering +#verify that with deterministic enabled, we get the same results regardless of ordering DISORDERED_FLAGS=$DISORDERED_FLAGS_ASC run_outcome true outcome_asc=$outcome -DISORDERED_FLAGS=$DISORDERED_FLAGS_DESC +DISORDERED_FLAGS=$DISORDERED_FLAGS_DESC run_outcome true outcome_desc=$outcome -if [ $outcome_desc != $outcome_asc ] ; then - dbgecho "fail! \"-deterministic true\" should have given the same outcome regardless of ordering" - exit 1 +if [ $outcome_desc != $outcome_asc ] ; then + dbgecho "fail! \"-deterministic true\" should have given the same outcome regardless of ordering" + exit 1 fi dbgecho "tests for deterministic true passed ok" @@ -129,4 +124,3 @@ dbgecho "all is good for the ranking tests!" - diff -Nru rdfind-1.4.1/testcases/verify_dryrun_option.sh rdfind-1.5.0/testcases/verify_dryrun_option.sh --- rdfind-1.4.1/testcases/verify_dryrun_option.sh 2018-10-15 12:18:49.000000000 +0000 +++ rdfind-1.5.0/testcases/verify_dryrun_option.sh 2021-08-13 19:15:33.000000000 +0000 @@ -7,97 +7,94 @@ . "$(dirname "$0")/common_funcs.sh" local_reset() { -reset_teststate -echo "dryrun" >a -echo "dryrun" >b + reset_teststate + echo "dryrun" >a + echo "dryrun" >b } for dryrunopt in -dryrun -n ; do -local_reset -$rdfind $dryrunopt true -deleteduplicates true a b >rdfind.out -[ -f a ] -[ -f b ] -dbgecho "files still there, good" - -local_reset -$rdfind $dryrunopt false -deleteduplicates true a b >rdfind.out -[ -f a ] -[ ! -e b ] -dbgecho "b was removed, good" - - -local_reset -$rdfind $dryrunopt true -makesymlinks true a b >rdfind.out -[ -f a ] -[ -f b ] -[ $(stat -c %i a) != $(stat --dereference -c %i b) ] -dbgecho "files still there, good" -$rdfind $dryrunopt false -makesymlinks true a b >rdfind.out -[ -f a ] -[ -L b ] -[ $(stat -c %i a) = $(stat --dereference -c %i b) ] -dbgecho "b was replaced with a symlink, good" - - - -local_reset -$rdfind $dryrunopt true -makehardlinks true a b >rdfind.out -[ -f a ] -[ -f b ] -[ $(stat -c %i a) != $(stat -c %i b) ] -[ $(stat -c %h a) -eq 1 ] -dbgecho "files still there, good" -$rdfind $dryrunopt false -makehardlinks true a b >rdfind.out -[ -f a ] -[ -f b ] -[ $(stat -c %i a) = $(stat -c %i b) ] -[ $(stat -c %h a) -eq 2 ] -[ $(stat -c %h b) -eq 2 ] -dbgecho "b was replaced with a hard link, good" - - -#make sure users who forget the boolean argument after -#dryrun get something comprehensible. see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754663 -local_reset -if $rdfind $dryrunopt a b >rdfind.out 2>&1 ; then - dbgecho "this should have failed, but did not!" - exit 1 -fi -dbgecho "rdfind exited with error status after \"rdfind $dryrunopt a b\", good." -if ! grep -iq "^expected true or false after $dryrunopt" rdfind.out ; then - dbgecho "got unexpected response after \"rdfind $dryrunopt a b\":" - tail rdfind.out - exit 1 -fi - -#dryrun on it's own: "rdfind -dryrun" -local_reset -if $rdfind $dryrunopt >rdfind.out 2>&1 ; then - dbgecho "this should have failed, but did not!" - exit 1 -fi -dbgecho "rdfind exited with error status after \"rdfind $dryrunopt\", good." -if grep -iq "^did not understand option 1:" rdfind.out ; then - dbgecho "got the old non-helpful answer:" - tail rdfind.out - exit 1 -fi - -#dryrun with single argument: "rdfind -dryrun ." -local_reset -if $rdfind $dryrunopt a >rdfind.out 2>&1 ; then - dbgecho "this should have failed, but did not!" - exit 1 -fi -dbgecho "rdfind exited with error status after \"rdfind $dryrunopt\", good." -if grep -iq "^did not understand option 1:" rdfind.out ; then - dbgecho "got the old non-helpful answer:" - tail rdfind.out - exit 1 -fi - - + local_reset + $rdfind $dryrunopt true -deleteduplicates true a b >rdfind.out + [ -f a ] + [ -f b ] + dbgecho "files still there, good" + + local_reset + $rdfind $dryrunopt false -deleteduplicates true a b >rdfind.out + [ -f a ] + [ ! -e b ] + dbgecho "b was removed, good" + + + local_reset + $rdfind $dryrunopt true -makesymlinks true a b >rdfind.out + [ -f a ] + [ -f b ] + [ $(stat -c %i a) != $(stat --dereference -c %i b) ] + dbgecho "files still there, good" + $rdfind $dryrunopt false -makesymlinks true a b >rdfind.out + [ -f a ] + [ -L b ] + [ $(stat -c %i a) = $(stat --dereference -c %i b) ] + dbgecho "b was replaced with a symlink, good" + + + + local_reset + $rdfind $dryrunopt true -makehardlinks true a b >rdfind.out + [ -f a ] + [ -f b ] + [ $(stat -c %i a) != $(stat -c %i b) ] + [ $(stat -c %h a) -eq 1 ] + dbgecho "files still there, good" + $rdfind $dryrunopt false -makehardlinks true a b >rdfind.out + [ -f a ] + [ -f b ] + [ $(stat -c %i a) = $(stat -c %i b) ] + [ $(stat -c %h a) -eq 2 ] + [ $(stat -c %h b) -eq 2 ] + dbgecho "b was replaced with a hard link, good" + + + #make sure users who forget the boolean argument after + #dryrun get something comprehensible. see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754663 + local_reset + if $rdfind $dryrunopt a b >rdfind.out 2>&1 ; then + dbgecho "this should have failed, but did not!" + exit 1 + fi + dbgecho "rdfind exited with error status after \"rdfind $dryrunopt a b\", good." + if ! grep -iq "^expected true or false after $dryrunopt" rdfind.out ; then + dbgecho "got unexpected response after \"rdfind $dryrunopt a b\":" + tail rdfind.out + exit 1 + fi + + #dryrun on it's own: "rdfind -dryrun" + local_reset + if $rdfind $dryrunopt >rdfind.out 2>&1 ; then + dbgecho "this should have failed, but did not!" + exit 1 + fi + dbgecho "rdfind exited with error status after \"rdfind $dryrunopt\", good." + if grep -iq "^did not understand option 1:" rdfind.out ; then + dbgecho "got the old non-helpful answer:" + tail rdfind.out + exit 1 + fi + + #dryrun with single argument: "rdfind -dryrun ." + local_reset + if $rdfind $dryrunopt a >rdfind.out 2>&1 ; then + dbgecho "this should have failed, but did not!" + exit 1 + fi + dbgecho "rdfind exited with error status after \"rdfind $dryrunopt\", good." + if grep -iq "^did not understand option 1:" rdfind.out ; then + dbgecho "got the old non-helpful answer:" + tail rdfind.out + exit 1 + fi done dbgecho "all is good for the dryrun tests!" - diff -Nru rdfind-1.4.1/testcases/verify_filesize_option.sh rdfind-1.5.0/testcases/verify_filesize_option.sh --- rdfind-1.4.1/testcases/verify_filesize_option.sh 2018-10-13 15:26:50.000000000 +0000 +++ rdfind-1.5.0/testcases/verify_filesize_option.sh 2021-08-13 19:15:33.000000000 +0000 @@ -6,74 +6,64 @@ set -e . "$(dirname "$0")/common_funcs.sh" -reset_teststate - #make pairs of files, with specific sizes -for i in $(seq 0 4) ; do - head -c$i /dev/zero >a$i - head -c$i /dev/zero >b$i -done +makefiles() { + for i in $(seq 0 4) ; do + head -c$i /dev/zero >a$i + head -c$i /dev/zero >b$i + done +} + + +reset_teststate +makefiles #try eliminate them, but they are correctly ignored. $rdfind -ignoreempty true -deleteduplicates true a* b* -[ -e a0 ] -[ -e b0 ] +verify [ -e a0 ] +verify [ -e b0 ] for i in $(seq 1 4) ; do - [ -e a$i ] - [ ! -e b$i ] + verify [ -e a$i ] + verify [ ! -e b$i ] done dbgecho "passed ignoreempty true test case" reset_teststate - -#make pairs of files, with specific sizes -for i in $(seq 0 4) ; do - head -c$i /dev/zero >a$i - head -c$i /dev/zero >b$i -done +makefiles #eliminate also the empty ones $rdfind -ignoreempty false -deleteduplicates true a* b* -[ -e a0 ] -[ ! -e b0 ] +verify [ -e a0 ] +verify [ ! -e b0 ] for i in $(seq 1 4) ; do - [ -e a$i ] - [ ! -e b$i ] + verify [ -e a$i ] + verify [ ! -e b$i ] done dbgecho "passed ignoreempty false test case" reset_teststate - -#make pairs of files, with specific sizes -for i in $(seq 0 4) ; do - head -c$i /dev/zero >a$i - head -c$i /dev/zero >b$i -done +makefiles $rdfind -minsize 0 -deleteduplicates true a* b* -[ -e a0 ] -[ ! -e b0 ] +verify [ -e a0 ] +verify [ ! -e b0 ] for i in $(seq 1 4) ; do - [ -e a$i ] - [ ! -e b$i ] + verify [ -e a$i ] + verify [ ! -e b$i ] done dbgecho "passed -minsize 0 test case" reset_teststate +makefiles -#make pairs of files, with specific sizes -for i in $(seq 0 4) ; do - head -c$i /dev/zero >a$i - head -c$i /dev/zero >b$i -done $rdfind -minsize 1 -deleteduplicates true a* b* -[ -e a0 ] -[ -e b0 ] +verify [ -e a0 ] +verify [ -e b0 ] for i in $(seq 1 4) ; do - [ -e a$i ] - [ ! -e b$i ] + verify [ -e a$i ] + verify [ ! -e b$i ] done dbgecho "passed -minsize 1 test case" @@ -81,30 +71,24 @@ for cutoff in $(seq 0 4) ; do -reset_teststate - -#make pairs of files, with specific sizes -for i in $(seq 0 4) ; do - head -c$i /dev/zero >a$i - head -c$i /dev/zero >b$i -done -$rdfind -minsize $cutoff -deleteduplicates true a* b* -for i in $(seq 0 4) ; do - [ -e a$i ] - if [ $i -lt $cutoff ] ; then - [ -e b$i ] - else - [ ! -e b$i ] - fi + reset_teststate + makefiles + $rdfind -minsize $cutoff -deleteduplicates true a* b* + for i in $(seq 0 4) ; do + verify [ -e a$i ] + if [ $i -lt $cutoff ] ; then + verify [ -e b$i ] + else + verify [ ! -e b$i ] + fi + done + dbgecho "passed -minsize $cutoff test case" done -dbgecho "passed -minsize $cutoff test case" -done - -dbgecho "all is good for the symlinks test!" +dbgecho "all is good for the min filesize test!" diff -Nru rdfind-1.4.1/testcases/verify_maxfilesize_option.sh rdfind-1.5.0/testcases/verify_maxfilesize_option.sh --- rdfind-1.4.1/testcases/verify_maxfilesize_option.sh 1970-01-01 00:00:00.000000000 +0000 +++ rdfind-1.5.0/testcases/verify_maxfilesize_option.sh 2021-08-13 19:15:33.000000000 +0000 @@ -0,0 +1,53 @@ +#!/bin/sh +# Ensures the exclusion of empty files work as intended. +# + + +set -e +. "$(dirname "$0")/common_funcs.sh" + + + +makefiles() { + #make pairs of files, with specific sizes + for i in $(seq 0 4) ; do + head -c$i /dev/zero >a$i + head -c$i /dev/zero >b$i + done +} + + +#negative value should be reported as misusage +reset_teststate +makefiles +if $rdfind -deleteduplicates true -maxsize -1 a* b* ; then + dbgecho "negative value should have been detected" + exit 1 +fi +dbgecho "passed negative value test" + +#conflict between min and max should be reported as misusage +reset_teststate +makefiles +if $rdfind -deleteduplicates true -minsize 123 -maxsize 123 a* b* ; then + dbgecho "conflicting values should have been detected" + exit 1 +fi +dbgecho "passed conflicting value test" + + +reset_teststate +makefiles +#try eliminate them, but they are correctly ignored. +$rdfind -deleteduplicates true -minsize 2 -maxsize 3 a* b* +verify [ -e a2 ] +verify [ ! -e b2 ] +for i in $(seq 0 1) $(seq 3 4); do + verify [ -e a$i ] + verify [ -e b$i ] +done + +dbgecho "passed specific size test" + + +dbgecho "all is good for the max filesize test!" diff -Nru rdfind-1.4.1/testcases/verify_ranking.sh rdfind-1.5.0/testcases/verify_ranking.sh --- rdfind-1.4.1/testcases/verify_ranking.sh 2018-10-18 07:27:52.000000000 +0000 +++ rdfind-1.5.0/testcases/verify_ranking.sh 2021-08-13 19:15:33.000000000 +0000 @@ -1,4 +1,5 @@ #!/bin/sh +# # Ensures that ranking works as intended. # @@ -6,51 +7,57 @@ set -e . "$(dirname "$0")/common_funcs.sh" - -DISORDERED_MNT=$datadir/disordered_mnt -DISORDERED_ROOT=$datadir/disordered_root - #unmount disordered unmount_disordered() { -if [ -d $DISORDERED_MNT ]; then - if ! fusermount -u $DISORDERED_MNT ; then - dbgecho failed unmounting disordered - fi -fi + if ! $hasdisorderfs ; then + return + fi + if [ -d $DISORDERED_MNT ]; then + if ! fusermount --quiet -z -u $DISORDERED_MNT ; then + dbgecho failed unmounting disordered + fi + fi } mount_disordered() { -mkdir -p $DISORDERED_MNT -mkdir -p $DISORDERED_ROOT -disorderfs --sort-dirents=yes --reverse-dirents=no $DISORDERED_ROOT $DISORDERED_MNT >/dev/null + mkdir -p $DISORDERED_MNT $DISORDERED_ROOT + if ! $hasdisorderfs ; then + return + fi + disorderfs --sort-dirents=yes --reverse-dirents=no $DISORDERED_ROOT $DISORDERED_MNT >/dev/null } #create cr8() { -while [ $# -gt 0 ] ; do - mkdir -p $(dirname $1) - # make sure the file is longer than what fits in the byte buffer - head -c1000 /dev/zero >$1 - shift -done + while [ $# -gt 0 ] ; do + mkdir -p $(dirname $1) + # make sure the file is longer than what fits in the byte buffer + head -c1000 /dev/zero >$1 + shift + done } + local_reset() { -if which disorderfs >/dev/null ; then - unmount_disordered - reset_teststate - mount_disordered -else - reset_teststate -fi -cr8 $@ + unmount_disordered + reset_teststate + mount_disordered + cr8 $@ } #enforce the rules form RANKING in the man page. -#Rule 1: If A was found while scanning an input argument earlier than than B, A is higher ranked. +if $hasdisorderfs ; then + echo "$me: found a working disorderfs setup. unit test will be properly executed" +else + echo "$me: no working disorderfs setup, unit test will be partially executed" +fi + +trap "unmount_disordered;cleanup" INT QUIT EXIT + +#Rule 1: If A was found while scanning an input argument earlier than B, A is higher ranked. -local_reset a b +local_reset a b $rdfind -deleteduplicates true a b >rdfind.out [ -f a ] [ ! -f b ] @@ -78,7 +85,7 @@ [ -f sd0/a ] [ ! -e sd0/sd1/sd2/a ] -local_reset sd0/a sd0/sd1/b0 sd0/sd1/b1 sd0/sd1/sd2/c +local_reset sd0/a sd0/sd1/b0 sd0/sd1/b1 sd0/sd1/sd2/c $rdfind -deleteduplicates true sd0>rdfind.out [ -f sd0/a ] [ ! -e sd0/sd1/sd2/a ] @@ -88,24 +95,21 @@ #Rule 3: If A was found earlier than B, A is higher ranked. #We will have to test this using a tool from the reproducible builds project. #apt install disorderfs, and make sure you are member of the fuse group. -if which disorderfs >/dev/null ; then +if $hasdisorderfs ; then -trap "unmount_disordered;cleanup" INT QUIT EXIT - -local_reset $DISORDERED_MNT/a $DISORDERED_MNT/b -$rdfind -deleteduplicates true $DISORDERED_MNT >rdfind.out -[ -f $DISORDERED_MNT/a ] -[ ! -e $DISORDERED_MNT/b ] -dbgecho "tests for rule 3 passed ok" - -local_reset $DISORDERED_MNT/b $DISORDERED_MNT/a -$rdfind -deleteduplicates true $DISORDERED_MNT >rdfind.out -[ -f $DISORDERED_MNT/a ] -[ ! -e $DISORDERED_MNT/b ] -dbgecho "tests for rule 3 passed ok" + local_reset $DISORDERED_MNT/a $DISORDERED_MNT/b + $rdfind -deleteduplicates true $DISORDERED_MNT >rdfind.out + [ -f $DISORDERED_MNT/a ] + [ ! -e $DISORDERED_MNT/b ] + dbgecho "tests for rule 3 passed ok" + + local_reset $DISORDERED_MNT/b $DISORDERED_MNT/a + $rdfind -deleteduplicates true $DISORDERED_MNT >rdfind.out + [ -f $DISORDERED_MNT/a ] + [ ! -e $DISORDERED_MNT/b ] + dbgecho "tests for rule 3 passed ok" else - dbgecho "could not execute tests for rule 3 - please install disorderfs" + dbgecho "could not execute tests for rule 3 - please install disorderfs" fi dbgecho "all is good for the ranking tests!" - diff -Nru rdfind-1.4.1/test-driver rdfind-1.5.0/test-driver --- rdfind-1.4.1/test-driver 2018-03-25 23:44:27.000000000 +0000 +++ rdfind-1.5.0/test-driver 2018-11-05 04:03:34.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -140,9 +140,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru rdfind-1.4.1/TODO rdfind-1.5.0/TODO --- rdfind-1.4.1/TODO 2018-03-26 11:45:53.000000000 +0000 +++ rdfind-1.5.0/TODO 2021-08-13 19:15:33.000000000 +0000 @@ -2,7 +2,7 @@ 20060603 What happens when items are being removed because of duplicate inode, -is the correct precedence preservered? +is the correct precedence preserved? 20060315: it removes depending on priority and depth, as it should. 20060603