Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package Bear for openSUSE:Factory checked in at 2022-10-18 12:45:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/Bear (Old) and /work/SRC/openSUSE:Factory/.Bear.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "Bear" Tue Oct 18 12:45:20 2022 rev:7 rq:1029602 version:3.0.20 Changes: -------- --- /work/SRC/openSUSE:Factory/Bear/Bear.changes 2022-01-31 22:58:17.293191203 +0100 +++ /work/SRC/openSUSE:Factory/.Bear.new.2275/Bear.changes 2022-10-18 12:45:43.349822446 +0200 @@ -1,0 +2,13 @@ +Mon Oct 17 13:00:02 UTC 2022 - Martin Li??ka <mli...@suse.cz> + +- Update to version 3.0.20: + * Set errno to zero after libexec's on_load (#470, @Absolucy) + * Add C compiler argument for dependencies (#462, @arturo-salinas) + * Update dependency versions. + * Fix build failure with fmt-9.0.0 (#471) + + * Temp workaround note for old 2.4 release (#440 @ZuseZ4) + * Build: local dependencies get first in the search path (#453 @ton) + * Fix cannot execute binary file (#439 @marxin) + +------------------------------------------------------------------- Old: ---- Bear-3.0.18.tar.gz New: ---- Bear-3.0.20.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ Bear.spec ++++++ --- /var/tmp/diff_new_pack.sqHn7o/_old 2022-10-18 12:45:43.781823430 +0200 +++ /var/tmp/diff_new_pack.sqHn7o/_new 2022-10-18 12:45:43.789823448 +0200 @@ -18,7 +18,7 @@ %bcond_without tests Name: Bear -Version: 3.0.18 +Version: 3.0.20 Release: 0 Summary: Tool to generate compilation database for clang tooling License: GPL-3.0-or-later ++++++ Bear-3.0.18.tar.gz -> Bear-3.0.20.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/CMakeLists.txt new/Bear-3.0.20/CMakeLists.txt --- old/Bear-3.0.18/CMakeLists.txt 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/CMakeLists.txt 2022-07-19 11:51:05.000000000 +0200 @@ -2,7 +2,7 @@ cmake_policy(VERSION 3.12) project(Bear - VERSION 3.0.18 + VERSION 3.0.20 DESCRIPTION "Bear is a tool to generate compilation database for clang tooling." LANGUAGES C CXX ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/README.md new/Bear-3.0.20/README.md --- old/Bear-3.0.18/README.md 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/README.md 2022-07-19 11:51:05.000000000 +0200 @@ -40,6 +40,9 @@ that if you want to pass parameter to Bear, pass those _before_ the `--` sign, everything after that will be the build command. +Please be aware that some package manager still ship our old 2.4.x release. +In that case please omit the extra `--` sign or consult your local documentation. + For more, read the man pages or [wiki][WIKI] of the project, which talks about limitations, known issues and platform specific usage. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/CMakeLists.txt new/Bear-3.0.20/source/CMakeLists.txt --- old/Bear-3.0.18/source/CMakeLists.txt 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/CMakeLists.txt 2022-07-19 11:51:05.000000000 +0200 @@ -29,6 +29,11 @@ find_package(PkgConfig REQUIRED) pkg_check_modules(gRPC REQUIRED IMPORTED_TARGET protobuf grpc++) +if (fmt_VERSION_MAJOR EQUAL 9) + set(FMT_NEEDS_OSTREAM_FORMATTER 1) + set(HAVE_FMT_STD_H 1) # FIXME: this should be done with `check_include_file` +endif () + if (UNIX AND NOT APPLE) set(SUPPORT_PRELOAD 1) endif() @@ -44,7 +49,9 @@ check_include_file(sys/utsname.h HAVE_SYS_UTSNAME_H) check_include_file(sys/wait.h HAVE_SYS_WAIT_H) check_include_file(sys/time.h HAVE_SYS_TIME_H) +check_include_file(sys/stat.h HAVE_SYS_STAT_H) check_include_file(gnu/lib-names.h HAVE_GNU_LIB_NAMES_H) +#check_include_file(fmt/std.h HAVE_FMT_STD_H) include(CheckSymbolExists) set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS}) set(CMAKE_REQUIRED_FLAGS -D_GNU_SOURCE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/citnames/source/Application.cc new/Bear-3.0.20/source/citnames/source/Application.cc --- old/Bear-3.0.18/source/citnames/source/Application.cc 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/citnames/source/Application.cc 2022-07-19 11:51:05.000000000 +0200 @@ -28,12 +28,19 @@ #include <filesystem> +#ifdef HAVE_FMT_STD_H +#include <fmt/std.h> +#endif +#include <fmt/ostream.h> #include <spdlog/spdlog.h> -#include <spdlog/fmt/ostr.h> namespace fs = std::filesystem; namespace db = ic::collect::db; +#ifdef FMT_NEEDS_OSTREAM_FORMATTER +template <> struct fmt::formatter<cs::Configuration> : ostream_formatter {}; +#endif + namespace { std::list<fs::path> to_abspath(const std::list<fs::path> &paths, const fs::path &root) { @@ -162,22 +169,16 @@ } size_t transform(cs::semantic::Build &build, const db::EventsDatabaseReader::Ptr& events, std::list<cs::Entry> &output) { - size_t count = 0; - for (auto event = events->next(); event.has_value(); event = events->next()) { - event.value() - .and_then<cs::semantic::SemanticPtr>([&build](const auto &event) { - return build.recognize(*event); + for (const auto &event : *events) { + const auto entries = build.recognize(event) + .map<std::list<cs::Entry>>([](const auto &semantic) -> std::list<cs::Entry> { + const auto candidate = dynamic_cast<const cs::semantic::CompilerCall *>(semantic.get()); + return (candidate != nullptr) ? candidate->into_entries() : std::list<cs::Entry>(); }) - .on_success([&output, &count](const auto &semantic) { - auto candidate = dynamic_cast<const cs::semantic::CompilerCall *>(semantic.get()); - if (candidate != nullptr) { - auto entries = candidate->into_entries(); - count += entries.size(); - std::copy(entries.begin(), entries.end(), std::back_inserter(output)); - } - }); + .unwrap_or({}); + std::copy(entries.begin(), entries.end(), std::back_inserter(output)); } - return count; + return output.size(); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/citnames/source/semantic/Build.cc new/Bear-3.0.20/source/citnames/source/semantic/Build.cc --- old/Bear-3.0.18/source/citnames/source/semantic/Build.cc 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/citnames/source/semantic/Build.cc 2022-07-19 11:51:05.000000000 +0200 @@ -29,8 +29,12 @@ #include <memory> #include <utility> +#include <fmt/ostream.h> #include <spdlog/spdlog.h> -#include <spdlog/fmt/ostr.h> + +#ifdef FMT_NEEDS_OSTREAM_FORMATTER +template <> struct fmt::formatter<domain::Execution> : ostream_formatter {}; +#endif namespace { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/config.h.in new/Bear-3.0.20/source/config.h.in --- old/Bear-3.0.18/source/config.h.in 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/config.h.in 2022-07-19 11:51:05.000000000 +0200 @@ -31,6 +31,7 @@ #cmakedefine HAVE_SYS_UTSNAME_H #cmakedefine HAVE_SYS_WAIT_H #cmakedefine HAVE_SYS_TIME_H +#cmakedefine HAVE_SYS_STAT_H #cmakedefine HAVE_GNU_LIB_NAMES_H // OSX specific (needs to be deprecated) @@ -60,6 +61,10 @@ #cmakedefine HAVE_CS_GNU_LIBC_VERSION #cmakedefine HAVE_CS_GNU_LIBPTHREAD_VERSION +// fmt version +#cmakedefine HAVE_FMT_STD_H +#cmakedefine FMT_NEEDS_OSTREAM_FORMATTER + // macros to disable compiler generated methods #define NON_DEFAULT_CONSTRUCTABLE(T) \ T() noexcept = delete; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/intercept/source/collect/SessionWrapper.cc new/Bear-3.0.20/source/intercept/source/collect/SessionWrapper.cc --- old/Bear-3.0.18/source/intercept/source/collect/SessionWrapper.cc 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/intercept/source/collect/SessionWrapper.cc 2022-07-19 11:51:05.000000000 +0200 @@ -25,8 +25,12 @@ #include "libsys/Os.h" #include "libsys/Path.h" +#ifdef HAVE_FMT_STD_H +#include <fmt/std.h> +#endif +#include <fmt/ostream.h> +#include <fmt/ranges.h> #include <spdlog/spdlog.h> -#include <spdlog/fmt/ostr.h> #include <algorithm> #include <iterator> @@ -69,24 +73,6 @@ { "CTANGLE", "ctangle" } }; - struct MapHolder { - const std::map<std::string, fs::path>& values; - }; - - std::ostream& operator<<(std::ostream& os, const MapHolder& arguments) - { - os << '['; - for (auto it = arguments.values.begin(); it != arguments.values.end(); ++it) { - if (it != arguments.values.begin()) { - os << ", "; - } - os << "{ \"" << it->first << "\": \"" << it->second.string() << "\" }"; - } - os << ']'; - - return os; - } - rust::Result<std::list<fs::path>> list_dir(const fs::path& path) { std::list<fs::path> result; @@ -171,8 +157,8 @@ , override_(std::move(override)) { spdlog::debug("session initialized with: wrapper_dir: {}", wrapper_dir_); - spdlog::debug("session initialized with: mapping: {}", MapHolder { mapping_ }); - spdlog::debug("session initialized with: override: {}", MapHolder { override_ }); + spdlog::debug("session initialized with: mapping: {}", mapping_); + spdlog::debug("session initialized with: override: {}", override_); } rust::Result<ic::Execution> WrapperSession::resolve(const ic::Execution &execution) const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/intercept/source/collect/db/EventsDatabaseReader.cc new/Bear-3.0.20/source/intercept/source/collect/db/EventsDatabaseReader.cc --- old/Bear-3.0.18/source/intercept/source/collect/db/EventsDatabaseReader.cc 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/intercept/source/collect/db/EventsDatabaseReader.cc 2022-07-19 11:51:05.000000000 +0200 @@ -48,6 +48,13 @@ , file_(std::move(file)) { } + EventsDatabaseReader::Iterator EventsDatabaseReader::begin() noexcept { + return EventsDatabaseReader::Iterator(*this, false); + } + + EventsDatabaseReader::Iterator EventsDatabaseReader::end() noexcept { + return EventsDatabaseReader::Iterator(*this, true); + } std::optional<rust::Result<EventPtr>> EventsDatabaseReader::next() noexcept { const auto line = next_line(); @@ -57,7 +64,7 @@ return from_json(line); }); } - return std::optional<rust::Result<EventPtr>>(); + return {}; } std::optional<rust::Result<std::string>> EventsDatabaseReader::next_line() noexcept { @@ -88,4 +95,56 @@ } return rust::Ok(event); } + + EventsDatabaseReader::Iterator::Iterator(EventsDatabaseReader &reader, bool end) noexcept + : reader_(reader) + { + if (!end) { + auto candidate = reader_.next(); + while (candidate) { + if (candidate.value().is_ok()) { + current = candidate.value().unwrap(); + break; + } + candidate = reader_.next(); + } + } + } + + const EventsDatabaseReader::Iterator::value_type &EventsDatabaseReader::Iterator::operator*() const { + return current.operator*(); + } + + EventsDatabaseReader::Iterator::pointer EventsDatabaseReader::Iterator::operator->() const { + return current.operator->(); + } + + EventsDatabaseReader::Iterator &EventsDatabaseReader::Iterator::operator++() { + if (current) { + current = nullptr; + auto candidate = reader_.next(); + while (candidate) { + if (candidate.value().is_ok()) { + current = candidate.value().unwrap(); + break; + } + candidate = reader_.next(); + } + } + return *this; + } + + EventsDatabaseReader::Iterator EventsDatabaseReader::Iterator::operator++(int) { + auto result(*this); + this->operator++(); + return result; + } + + bool operator==(const EventsDatabaseReader::Iterator &lhs, const EventsDatabaseReader::Iterator &rhs) { + return (&lhs.reader_ == &rhs.reader_) && (lhs.current == rhs.current); + } + + bool operator!=(const EventsDatabaseReader::Iterator &lhs, const EventsDatabaseReader::Iterator &rhs) { + return !(lhs == rhs); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/intercept/source/collect/db/EventsDatabaseReader.h new/Bear-3.0.20/source/intercept/source/collect/db/EventsDatabaseReader.h --- old/Bear-3.0.18/source/intercept/source/collect/db/EventsDatabaseReader.h 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/intercept/source/collect/db/EventsDatabaseReader.h 2022-07-19 11:51:05.000000000 +0200 @@ -36,14 +36,19 @@ class EventsDatabaseReader { public: + class Iterator; + friend class Iterator; + using Ptr = std::shared_ptr<EventsDatabaseReader>; using StreamPtr = std::unique_ptr<std::istream>; [[nodiscard]] static rust::Result<EventsDatabaseReader::Ptr> from(const fs::path &path); - [[nodiscard]] std::optional<rust::Result<EventPtr>> next() noexcept; + [[nodiscard]] Iterator begin() noexcept; + [[nodiscard]] Iterator end() noexcept; private: + [[nodiscard]] std::optional<rust::Result<EventPtr>> next() noexcept; [[nodiscard]] std::optional<rust::Result<std::string>> next_line() noexcept; [[nodiscard]] rust::Result<EventPtr> from_json(const std::string &) noexcept; @@ -57,4 +62,30 @@ fs::path path_; StreamPtr file_; }; + + class EventsDatabaseReader::Iterator { + public: + using value_type = rpc::Event; + using difference_type = std::ptrdiff_t; + using reference = const value_type &; + using pointer = const value_type *; + using iterator_category = std::forward_iterator_tag; + + explicit Iterator(EventsDatabaseReader &reader, bool end) noexcept; + + reference operator*() const; + pointer operator->() const; + + Iterator &operator++(); + Iterator operator++(int); + + NON_DEFAULT_CONSTRUCTABLE(Iterator) + + friend bool operator==(const Iterator &lhs, const Iterator &rhs); + friend bool operator!=(const Iterator &lhs, const Iterator &rhs); + + private: + EventsDatabaseReader &reader_; + EventPtr current; + }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/intercept/source/report/libexec/Resolver.cc new/Bear-3.0.20/source/intercept/source/report/libexec/Resolver.cc --- old/Bear-3.0.18/source/intercept/source/report/libexec/Resolver.cc 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/intercept/source/report/libexec/Resolver.cc 2022-07-19 11:51:05.000000000 +0200 @@ -29,6 +29,9 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif namespace { @@ -48,6 +51,12 @@ rust::Result<const char*, int> Resolver::from_current_directory(std::string_view const &file) { // copy the input to result. array::copy(file.begin(), file.end() + 1, result_, result_ + PATH_MAX); + // check if this is a file + struct stat sb {}; + ::stat(result_, &sb); + if ((sb.st_mode & S_IFMT) != S_IFREG) { + return rust::Err(ENOENT); + } // check if it's okay to execute. if (0 == ::access(result_, X_OK)) { const char *ptr = result_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/intercept/source/report/libexec/lib.cc new/Bear-3.0.20/source/intercept/source/report/libexec/lib.cc --- old/Bear-3.0.18/source/intercept/source/report/libexec/lib.cc 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/intercept/source/report/libexec/lib.cc 2022-07-19 11:51:05.000000000 +0200 @@ -111,6 +111,7 @@ el::log::set(level); LOGGER.debug("on_load"); + errno = 0; } /** @@ -126,6 +127,7 @@ return; LOGGER.debug("on_unload"); + errno = 0; } extern "C" int execve(const char* path, char* const argv[], char* const envp[]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/intercept/source/report/wrapper/Application.cc new/Bear-3.0.20/source/intercept/source/report/wrapper/Application.cc --- old/Bear-3.0.18/source/intercept/source/report/wrapper/Application.cc 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/intercept/source/report/wrapper/Application.cc 2022-07-19 11:51:05.000000000 +0200 @@ -27,8 +27,8 @@ #include "libsys/Process.h" #include "libsys/Signal.h" +#include <fmt/ostream.h> #include <spdlog/spdlog.h> -#include <spdlog/fmt/ostr.h> #include <filesystem> #include <memory> @@ -37,6 +37,10 @@ namespace fs = std::filesystem; +#ifdef FMT_NEEDS_OSTREAM_FORMATTER +template <> struct fmt::formatter<flags::Arguments> : ostream_formatter {}; +#endif + namespace { struct ApplicationLogConfig : ps::ApplicationLogConfig { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/libmain/source/ApplicationFromArgs.cc new/Bear-3.0.20/source/libmain/source/ApplicationFromArgs.cc --- old/Bear-3.0.18/source/libmain/source/ApplicationFromArgs.cc 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/libmain/source/ApplicationFromArgs.cc 2022-07-19 11:51:05.000000000 +0200 @@ -19,10 +19,14 @@ #include "libmain/ApplicationFromArgs.h" +#include <fmt/ostream.h> #include <spdlog/spdlog.h> -#include <spdlog/fmt/ostr.h> #include <spdlog/sinks/stdout_sinks.h> +#ifdef FMT_NEEDS_OSTREAM_FORMATTER +template <> struct fmt::formatter<flags::Arguments> : ostream_formatter {}; +#endif + namespace ps { ApplicationFromArgs::ApplicationFromArgs(const ApplicationLogConfig &log_config) noexcept diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/libmain/source/ApplicationLogConfig.cc new/Bear-3.0.20/source/libmain/source/ApplicationLogConfig.cc --- old/Bear-3.0.18/source/libmain/source/ApplicationLogConfig.cc 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/libmain/source/ApplicationLogConfig.cc 2022-07-19 11:51:05.000000000 +0200 @@ -17,11 +17,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "config.h" #include "libmain/ApplicationLogConfig.h" +#include "config.h" +#include <fmt/ranges.h> #include <spdlog/spdlog.h> -#include <spdlog/fmt/ostr.h> #include <spdlog/sinks/stdout_sinks.h> #ifdef HAVE_SYS_UTSNAME_H @@ -30,22 +30,21 @@ namespace { - struct PointerArray { - const char **values; - }; + struct Array { + const char** ptr; - std::ostream &operator<<(std::ostream &os, const PointerArray &arguments) { - os << '['; - for (const char **it = arguments.values; *it != nullptr; ++it) { - if (it != arguments.values) { - os << ", "; - } - os << '"' << *it << '"'; + const char** begin() const { + return ptr; } - os << ']'; - return os; - } + const char** end() const { + const char** it = ptr; + while (*it != nullptr) { + ++it; + } + return it; + } + }; } namespace ps { @@ -72,8 +71,8 @@ void ApplicationLogConfig::record(const char** argv, const char** envp) const { spdlog::debug("{0}: {1}", name_, cmd::VERSION); - spdlog::debug("arguments: {0}", PointerArray { argv }); - spdlog::debug("environment: {0}", PointerArray { envp }); + spdlog::debug("arguments: {0}", Array { argv }); + spdlog::debug("environment: {0}", Array { envp }); } void ApplicationLogConfig::context() const { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/source/libsys/source/Process.cc new/Bear-3.0.20/source/libsys/source/Process.cc --- old/Bear-3.0.18/source/libsys/source/Process.cc 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/source/libsys/source/Process.cc 2022-07-19 11:51:05.000000000 +0200 @@ -44,32 +44,14 @@ # include "libsys/lib-names.h" #endif +#include <fmt/ranges.h> #include <spdlog/spdlog.h> -#include <spdlog/fmt/ostr.h> #include <spdlog/sinks/stdout_sinks.h> namespace { constexpr char PATH_TO_SH[] = "/bin/sh"; - struct Arguments { - const std::list<std::string>& value; - }; - - std::ostream& operator<<(std::ostream& os, const Arguments& arguments) - { - os << '['; - for (auto it = arguments.value.begin(); it != arguments.value.end(); ++it) { - if (it != arguments.value.begin()) { - os << ", "; - } - os << *it; - } - os << ']'; - - return os; - } - using posix_spawn_t = int (*)( pid_t * pid, const char* path, @@ -158,8 +140,7 @@ return sys::Process(pid); }) .on_success([¶meters](const auto& process) { - spdlog::debug("Process spawned. [pid: {}, command: {}]", - process.get_pid(), Arguments { parameters }); + spdlog::debug("Process spawned. [pid: {}, command: {}]", process.get_pid(), parameters); }) .on_error([](const auto& error) { spdlog::debug("Process spawn failed. {}", error.what()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/test/cases/compilation/output/bug439.mk new/Bear-3.0.20/test/cases/compilation/output/bug439.mk --- old/Bear-3.0.18/test/cases/compilation/output/bug439.mk 1970-01-01 01:00:00.000000000 +0100 +++ new/Bear-3.0.20/test/cases/compilation/output/bug439.mk 2022-07-19 11:51:05.000000000 +0200 @@ -0,0 +1,24 @@ +#!/usr/bin/env make + +# REQUIRES: make, shell +# RUN: mkdir -p %T/make +# RUN: %{make} -C %T -f %s clean +# RUN: %{shell} -c "PATH=%T:$PATH %{bear} --verbose --output %t.json -- %{make} -C %T -f %s" +# RUN: assert_compilation %t.json count -eq 2 +# RUN: assert_compilation %t.json contains -file %T/bug439.c -directory %T -arguments %{c_compiler} -S -o bug439.s bug439.c +# RUN: assert_compilation %t.json contains -file %T/bug439.s -directory %T -arguments %{c_compiler} -c -o bug439.o bug439.s + +bug439: bug439.o + $(CC) $< -o $@ + +bug439.s: bug439.c + $(CC) -S $< -o $@ + +bug439.o: bug439.s + $(CC) -c $< -o $@ + +bug439.c: + echo "int main() { return 0; }" > $@ + +clean: + rm -f bug439 bug439.o bug439.s bug439.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/test/cases/compilation/output/empty_env.sh new/Bear-3.0.20/test/cases/compilation/output/empty_env.sh --- old/Bear-3.0.18/test/cases/compilation/output/empty_env.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/Bear-3.0.20/test/cases/compilation/output/empty_env.sh 2022-07-19 11:51:05.000000000 +0200 @@ -0,0 +1,21 @@ +#!/usr/bin/env sh + +# REQUIRES: preload, shell +# RUN: %{shell} %s %t +# RUN: cd %T; /usr/bin/env - %{bear} --verbose --output %t.json -- %{shell} %t/build.sh +# RUN: assert_compilation %t.json count -eq 2 +# RUN: assert_compilation %t.json contains -file %t/source_1.c -directory %T -arguments %{c_compiler} -c -o %t/source_1.o %t/source_1.c +# RUN: assert_compilation %t.json contains -file %t/source_2.c -directory %T -arguments %{c_compiler} -c -o %t/source_2.o %t/source_2.c + +TEST=$1 + +mkdir -p $TEST; +touch $TEST/source_1.c; +touch $TEST/source_2.c; + +cat > "$TEST/build.sh" << EOF +#!/usr/bin/env sh + +$CC -c -o $TEST/source_1.o $TEST/source_1.c; +$CC -c -o $TEST/source_2.o $TEST/source_2.c; +EOF diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/test/cases/intercept/preload/errno_reset.c new/Bear-3.0.20/test/cases/intercept/preload/errno_reset.c --- old/Bear-3.0.18/test/cases/intercept/preload/errno_reset.c 1970-01-01 01:00:00.000000000 +0100 +++ new/Bear-3.0.20/test/cases/intercept/preload/errno_reset.c 2022-07-19 11:51:05.000000000 +0200 @@ -0,0 +1,13 @@ +// REQUIRES: preload +// RUN: %{compile} -o %t %s +// RUN: %{intercept} --verbose --output %t.json -- %t + +#include <stdlib.h> +#include <errno.h> +#include <string.h> + +int main() +{ + printf("error %i: %s\n", errno, strerror(errno)); + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/third_party/fmt/CMakeLists.txt new/Bear-3.0.20/third_party/fmt/CMakeLists.txt --- old/Bear-3.0.18/third_party/fmt/CMakeLists.txt 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/third_party/fmt/CMakeLists.txt 2022-07-19 11:51:05.000000000 +0200 @@ -10,9 +10,9 @@ include(ExternalProject) ExternalProject_Add(fmt_dependency URL - https://github.com/fmtlib/fmt/archive/8.0.1.tar.gz + https://github.com/fmtlib/fmt/archive/9.0.0.tar.gz URL_HASH - MD5=7d5af964c6633ef90cd6a47be3afe6a0 + MD5=d56c8b0612b049bb1854f07c8b133f3c DOWNLOAD_NO_PROGRESS 1 UPDATE_COMMAND @@ -29,11 +29,24 @@ -DFMT_FUZZ:BOOL=OFF -DFMT_DOC:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=${DEPENDENCIES_INSTALL_PREFIX}/fmt_dependency + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE} + -DCMAKE_FIND_ROOT_PATH:PATH=${CMAKE_FIND_ROOT_PATH} + -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} + -DCMAKE_C_COMPILER_TARGET:STRING=${CMAKE_C_COMPILER_TARGET} + -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} + -DCMAKE_CXX_COMPILER_TARGET:STRING=${CMAKE_CXX_COMPILER_TARGET} + -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} + -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED} + -DCMAKE_CXX_EXTENSIONS:BOOL=${CMAKE_CXX_EXTENSIONS} + -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} + -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} ) include(GNUInstallDirs) list(APPEND PREFIX_PATH "${DEPENDENCIES_INSTALL_PREFIX}/fmt_dependency") - set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH};${PREFIX_PATH} + set(CMAKE_PREFIX_PATH ${PREFIX_PATH};${CMAKE_PREFIX_PATH} CACHE PATH "append fmt library into the search path" FORCE) endif () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/third_party/googletest/CMakeLists.txt new/Bear-3.0.20/third_party/googletest/CMakeLists.txt --- old/Bear-3.0.18/third_party/googletest/CMakeLists.txt 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/third_party/googletest/CMakeLists.txt 2022-07-19 11:51:05.000000000 +0200 @@ -12,9 +12,9 @@ include(ExternalProject) ExternalProject_Add(googletest_dependency URL - https://github.com/google/googletest/archive/release-1.11.0.tar.gz + https://github.com/google/googletest/archive/release-1.12.1.tar.gz URL_HASH - MD5=e8a8df240b6938bb6384155d4c37d937 + MD5=e82199374acdfda3f425331028eb4e2a DOWNLOAD_NO_PROGRESS 1 UPDATE_COMMAND @@ -28,11 +28,24 @@ CMAKE_ARGS -DINSTALL_GTEST:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=${DEPENDENCIES_INSTALL_PREFIX}/googletest_dependency + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE} + -DCMAKE_FIND_ROOT_PATH:PATH=${CMAKE_FIND_ROOT_PATH} + -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} + -DCMAKE_C_COMPILER_TARGET:STRING=${CMAKE_C_COMPILER_TARGET} + -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} + -DCMAKE_CXX_COMPILER_TARGET:STRING=${CMAKE_CXX_COMPILER_TARGET} + -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} + -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED} + -DCMAKE_CXX_EXTENSIONS:BOOL=${CMAKE_CXX_EXTENSIONS} + -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} + -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} ) include(GNUInstallDirs) list(APPEND PREFIX_PATH "${DEPENDENCIES_INSTALL_PREFIX}/googletest_dependency") - set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH};${PREFIX_PATH} + set(CMAKE_PREFIX_PATH ${PREFIX_PATH};${CMAKE_PREFIX_PATH} CACHE PATH "append googletest library into the search path" FORCE) endif () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/third_party/grpc/CMakeLists.txt new/Bear-3.0.20/third_party/grpc/CMakeLists.txt --- old/Bear-3.0.18/third_party/grpc/CMakeLists.txt 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/third_party/grpc/CMakeLists.txt 2022-07-19 11:51:05.000000000 +0200 @@ -29,7 +29,7 @@ GIT_REPOSITORY https://github.com/grpc/grpc GIT_TAG - v1.41.1 + v1.46.4 GIT_SUBMODULES GIT_SHALLOW 1 @@ -46,17 +46,24 @@ -DgRPC_BUILD_TESTS:BOOL=OFF -DgRPC_BUILD_CSHARP_EXT:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=${DEPENDENCIES_INSTALL_PREFIX}/grpc_dependency - -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} - -DCMAKE_CXX_STANDARD_REQUIRED=${CMAKE_CXX_STANDARD_REQUIRED} - -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS} - -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE} + -DCMAKE_FIND_ROOT_PATH:PATH=${CMAKE_FIND_ROOT_PATH} + -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} + -DCMAKE_C_COMPILER_TARGET:STRING=${CMAKE_C_COMPILER_TARGET} -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} + -DCMAKE_CXX_COMPILER_TARGET:STRING=${CMAKE_CXX_COMPILER_TARGET} + -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} + -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED} + -DCMAKE_CXX_EXTENSIONS:BOOL=${CMAKE_CXX_EXTENSIONS} + -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} ) include(GNUInstallDirs) list(APPEND PREFIX_PATH "${DEPENDENCIES_INSTALL_PREFIX}/grpc_dependency") - set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH};${PREFIX_PATH} + set(CMAKE_PREFIX_PATH ${PREFIX_PATH};${CMAKE_PREFIX_PATH} CACHE PATH "append gRPC libraries and binaries into the search path" FORCE) endif () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/third_party/nlohmann_json/CMakeLists.txt new/Bear-3.0.20/third_party/nlohmann_json/CMakeLists.txt --- old/Bear-3.0.18/third_party/nlohmann_json/CMakeLists.txt 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/third_party/nlohmann_json/CMakeLists.txt 2022-07-19 11:51:05.000000000 +0200 @@ -9,9 +9,9 @@ include(ExternalProject) ExternalProject_Add(nlohmann_json_dependency URL - https://github.com/nlohmann/json/archive/v3.10.4.tar.gz + https://github.com/nlohmann/json/archive/v3.10.5.tar.gz URL_HASH - MD5=d1de947a7fe0030ce3f5f36304945563 + MD5=5b946f7d892fa55eabec45e76a20286b DOWNLOAD_NO_PROGRESS 1 UPDATE_COMMAND @@ -26,11 +26,24 @@ -DJSON_Install:BOOL=ON -DJSON_BuildTests:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=${DEPENDENCIES_INSTALL_PREFIX}/nlohmann_json_dependency + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE} + -DCMAKE_FIND_ROOT_PATH:PATH=${CMAKE_FIND_ROOT_PATH} + -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} + -DCMAKE_C_COMPILER_TARGET:STRING=${CMAKE_C_COMPILER_TARGET} + -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} + -DCMAKE_CXX_COMPILER_TARGET:STRING=${CMAKE_CXX_COMPILER_TARGET} + -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} + -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED} + -DCMAKE_CXX_EXTENSIONS:BOOL=${CMAKE_CXX_EXTENSIONS} + -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} + -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} ) include(GNUInstallDirs) list(APPEND PREFIX_PATH "${DEPENDENCIES_INSTALL_PREFIX}/nlohmann_json_dependency") - set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH};${PREFIX_PATH} + set(CMAKE_PREFIX_PATH ${PREFIX_PATH};${CMAKE_PREFIX_PATH} CACHE PATH "append JSON library into the search path" FORCE) endif () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Bear-3.0.18/third_party/spdlog/CMakeLists.txt new/Bear-3.0.20/third_party/spdlog/CMakeLists.txt --- old/Bear-3.0.18/third_party/spdlog/CMakeLists.txt 2022-01-01 03:47:18.000000000 +0100 +++ new/Bear-3.0.20/third_party/spdlog/CMakeLists.txt 2022-07-19 11:51:05.000000000 +0200 @@ -10,9 +10,9 @@ include(ExternalProject) ExternalProject_Add(spdlog_dependency URL - https://github.com/gabime/spdlog/archive/v1.9.2.tar.gz + https://github.com/gabime/spdlog/archive/v1.10.0.tar.gz URL_HASH - MD5=cee7f3d31178a00791d7a22c6738df6d + MD5=effea813cd81cfb5588806c5754e14f1 DOWNLOAD_NO_PROGRESS 1 UPDATE_COMMAND @@ -33,11 +33,24 @@ -DSPDLOG_BUILD_EXAMPLE:BOOL=OFF -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH} -DCMAKE_INSTALL_PREFIX:PATH=${DEPENDENCIES_INSTALL_PREFIX}/spdlog_dependency + CMAKE_CACHE_ARGS + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE} + -DCMAKE_FIND_ROOT_PATH:PATH=${CMAKE_FIND_ROOT_PATH} + -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} + -DCMAKE_C_COMPILER_TARGET:STRING=${CMAKE_C_COMPILER_TARGET} + -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} + -DCMAKE_CXX_COMPILER_TARGET:STRING=${CMAKE_CXX_COMPILER_TARGET} + -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} + -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED} + -DCMAKE_CXX_EXTENSIONS:BOOL=${CMAKE_CXX_EXTENSIONS} + -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} + -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} ) include(GNUInstallDirs) list(APPEND PREFIX_PATH "${DEPENDENCIES_INSTALL_PREFIX}/spdlog_dependency") - set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH};${PREFIX_PATH} + set(CMAKE_PREFIX_PATH ${PREFIX_PATH};${CMAKE_PREFIX_PATH} CACHE PATH "append spdlog library into the search path" FORCE) endif ()