From df7b338478d8db328cb2b28d0510d8c2adcb338b Mon Sep 17 00:00:00 2001 From: Simson Garfinkel Date: Tue, 26 Oct 2021 20:23:28 -0400 Subject: [PATCH 1/2] updated installation scripts. removed bison, we were not using it. --- configure.ac | 2 +- etc/CONFIGURE_AMAZON_LINUX.bash | 2 +- etc/CONFIGURE_CENTOS7.bash | 2 +- etc/CONFIGURE_DEBIAN9.bash | 2 +- etc/CONFIGURE_FEDORA34.bash | 2 +- etc/CONFIGURE_MACOS.bash | 25 +++++++++++++++ etc/CONFIGURE_MACOS_BSDPORTS.bash | 51 ------------------------------- 7 files changed, 30 insertions(+), 56 deletions(-) create mode 100755 etc/CONFIGURE_MACOS.bash delete mode 100755 etc/CONFIGURE_MACOS_BSDPORTS.bash diff --git a/configure.ac b/configure.ac index 608235ad..27890fb7 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ # and http://www.bioinf.uni-freiburg.de/~mmann/HowTo/automake.html AC_PREREQ([2.69]) -AC_INIT([BULK_EXTRACTOR],[2.0.0-dev],[bugs@digitalcorpora.org]) +AC_INIT([BULK_EXTRACTOR],[2.0.0-beta2],[bugs@digitalcorpora.org]) AC_CONFIG_MACRO_DIR(m4) AC_CONFIG_AUX_DIR([build-aux]) ################################################################ diff --git a/etc/CONFIGURE_AMAZON_LINUX.bash b/etc/CONFIGURE_AMAZON_LINUX.bash index f15bc0b5..4cb7563a 100755 --- a/etc/CONFIGURE_AMAZON_LINUX.bash +++ b/etc/CONFIGURE_AMAZON_LINUX.bash @@ -31,7 +31,7 @@ fi cd $DIR MPKGS="autoconf automake flex gcc gcc-c++ git libtool " -MPKGS+="md5deep wget bison zlib-devel " +MPKGS+="md5deep wget zlib-devel " MPKGS+="libewf libewf-devel java-1.8.0-openjdk-devel " MPKGS+="libxml2-devel libxml2-static openssl-devel " MPKGS+="sqlite-devel expat-devel " diff --git a/etc/CONFIGURE_CENTOS7.bash b/etc/CONFIGURE_CENTOS7.bash index 2764446d..f8931cae 100755 --- a/etc/CONFIGURE_CENTOS7.bash +++ b/etc/CONFIGURE_CENTOS7.bash @@ -31,7 +31,7 @@ fi cd $DIR MPKGS="autoconf automake flex gcc gcc-c++ git libtool " -MPKGS+="md5deep wget bison zlib-devel " +MPKGS+="md5deep wget zlib-devel " MPKGS+="libewf libewf-devel java-1.8.0-openjdk-devel " MPKGS+="libxml2-devel libxml2-static openssl-devel " MPKGS+="sqlite-devel expat-devel " diff --git a/etc/CONFIGURE_DEBIAN9.bash b/etc/CONFIGURE_DEBIAN9.bash index 67b5ef03..22d15035 100755 --- a/etc/CONFIGURE_DEBIAN9.bash +++ b/etc/CONFIGURE_DEBIAN9.bash @@ -27,7 +27,7 @@ fi cd $DIR MPKGS="autoconf automake flex gcc git libtool " -MPKGS+="md5deep openssl patch wget bison g[+][+] libssl-dev zlib1g-dev libxml2-dev libjson-c-dev" +MPKGS+="md5deep openssl patch wget g[+][+] libssl-dev zlib1g-dev libxml2-dev libjson-c-dev" if [ ! -r /etc/os-release ]; then echo This requires Debian Linux. diff --git a/etc/CONFIGURE_FEDORA34.bash b/etc/CONFIGURE_FEDORA34.bash index c493850b..1f7a89bb 100755 --- a/etc/CONFIGURE_FEDORA34.bash +++ b/etc/CONFIGURE_FEDORA34.bash @@ -40,7 +40,7 @@ fi # cd to the directory where the script is cd "$( dirname "${BASH_SOURCE[0]}" )" -MPKGS="autoconf automake make flex gcc gcc-c++ git libtool wget bison zlib-devel " +MPKGS="autoconf automake make flex gcc gcc-c++ git libtool wget zlib-devel " MPKGS+="java-1.8.0-openjdk-devel libxml2-devel libxml2-static openssl-devel " MPKGS+="sqlite-devel expat-devel " diff --git a/etc/CONFIGURE_MACOS.bash b/etc/CONFIGURE_MACOS.bash new file mode 100755 index 00000000..6298dbe1 --- /dev/null +++ b/etc/CONFIGURE_MACOS.bash @@ -0,0 +1,25 @@ +#!/bin/bash +if [ -r /usr/local/bin/brew ]; then + WHICH=/usr/local/bin/brew +elif [ -r /opt/local/bin/port ]; then + WHICH="sudo /opt/local/bin/port -Nc" +else + echo Cannot find brew or macports executable. + exit 1 +fi + +cat < Date: Tue, 26 Oct 2021 20:36:16 -0400 Subject: [PATCH 2/2] shortened test output --- src/test_be.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/test_be.cpp b/src/test_be.cpp index 5041bcdc..259644fe 100644 --- a/src/test_be.cpp +++ b/src/test_be.cpp @@ -112,7 +112,7 @@ bool requireFeature(const std::vector &lines, const std::string fea } std::cerr << "feature not found: " << feature << "\nfeatures found (perhaps one of these is the feature you are looking for?):\n"; for (const auto &it : lines) { - std::cerr << " " << it << "\n"; + std::cerr << " " << it << std::endl; } return false; } @@ -142,9 +142,9 @@ std::filesystem::path test_scanners(const std::vector & scanners, s REQUIRE (ss.get_enabled_scanners().size() == scanners.size()); // the one scanner if (ss.get_enabled_scanners().size()>0){ - std::cerr << "\n## output in " << sc.outdir << " for " << ss.get_enabled_scanners()[0] << std::endl; + std::cerr << "## output in " << sc.outdir << " for " << ss.get_enabled_scanners()[0] << std::endl; } else { - std::cerr << "\n## output in " << sc.outdir << " but no enabled scanner! " << std::endl; + std::cerr << "## output in " << sc.outdir << " but no enabled scanner! " << std::endl; } REQUIRE(sbuf->children == 0); ss.phase_scan(); @@ -510,7 +510,7 @@ bool feature_match(const Check &exp, const std::string &line) auto words = split(line, '\t'); if (words.size() <2 || words.size() > 3) return false; - if (debug) std::cerr << "check line=" << line << "\n"; + if (debug) std::cerr << "check line=" << line << std::endl; std::string pos = exp.feature.pos.str(); if ( pos.size() > 2 ){ @@ -567,7 +567,7 @@ std::filesystem::path validate(std::string image_fname, std::vector &expe sc.scanner_commands = enable_all_scanners; sc.allow_recurse = recurse; - std::cerr << "================ validate " << image_fname << " (outdir: " << sc.outdir << ") ================\n"; + std::cerr << "## image_fname: " << image_fname << " outdir: " << sc.outdir << std::endl; if (offset==0) { sc.input_fname = test_dir() / image_fname; @@ -607,7 +607,7 @@ std::filesystem::path validate(std::string image_fname, std::vector &expe phase1.phase1_run(); delete p; } catch (image_process::NoSuchFile &e) { - std::cerr << "sc.input_fname=" << sc.input_fname << " no such file: " << e.what() << "\n"; + std::cerr << "sc.input_fname=" << sc.input_fname << " no such file: " << e.what() << std::endl; bool file_found=false; REQUIRE(file_found); } @@ -637,7 +637,7 @@ std::filesystem::path validate(std::string image_fname, std::vector &expe } break; case 1: - std::cerr << fname << ":" << line << "\n"; // print the file the second time through + std::cerr << fname << ":" << line << std::endl; // print the file the second time through break; } @@ -669,10 +669,10 @@ bool validate_files(const std::filesystem::path &fn0, const std::filesystem::pat in1 >> ch1; if (ch0 != ch1 ){ if (errors==0) { - std::cerr << "file 0 " << fn0 << "\n"; - std::cerr << "file 1 " << fn1 << "\n"; + std::cerr << "file 0 " << fn0 << std::endl; + std::cerr << "file 1 " << fn1 << std::endl; } - std::cerr << "i=" << i << " ch0=" << static_cast(ch0) << " ch1=" << static_cast(ch1) << "\n"; + std::cerr << "i=" << i << " ch0=" << static_cast(ch0) << " ch1=" << static_cast(ch1) << std::endl; errors += 1; } if (in0.eof() || in1.eof()) break;