diff --git a/.docker/build-linux.sh b/.docker/build-linux.sh index 542966c7..e42c165b 100755 --- a/.docker/build-linux.sh +++ b/.docker/build-linux.sh @@ -171,7 +171,7 @@ case "-$BUILD_TYPE-" in *-minimal-*) CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_PERFMON=0 -DWITH_MAN_OPTION=0 -DENABLE_RICEPP=0" CMAKE_ARGS="${CMAKE_ARGS} -DTRY_ENABLE_BROTLI=0 -DTRY_ENABLE_LZ4=0 -DTRY_ENABLE_FLAC=0" - CMAKE_ARGS="${CMAKE_ARGS} -DDWARFSEXTRACT_MINIMAL=1 -DDISABLE_FILESYSTEM_EXTRACTOR_FORMAT=1" + CMAKE_ARGS="${CMAKE_ARGS} -DDISABLE_FILESYSTEM_EXTRACTOR_FORMAT=1" ;; esac diff --git a/CMakeLists.txt b/CMakeLists.txt index dd844224..f8d15f1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,6 @@ option(WITH_FUSE_EXTRACT_BINARY "build with fuse-extract binary" OFF) option(WITH_PXATTR "build with pxattr binary" OFF) option(WITH_EXAMPLE "build with example binary" OFF) option(ENABLE_STACKTRACE "build with stack trace support" OFF) -option(DWARFSEXTRACT_MINIMAL "disable patterns support in dwarfsextract" OFF) option(DISABLE_FILESYSTEM_EXTRACTOR_FORMAT "disable filesystem extractor format support" OFF) if(APPLE) option(USE_HOMEBREW_LIBARCHIVE "use libarchive from homebrew" ON) @@ -300,9 +299,6 @@ if(WITH_TOOLS) target_link_libraries(mkdwarfs_main PRIVATE dwarfs_reader dwarfs_writer dwarfs_rewrite) target_link_libraries(dwarfsck_main PRIVATE dwarfs_reader) target_link_libraries(dwarfsextract_main PRIVATE dwarfs_extractor) - target_compile_definitions(dwarfsextract_main PRIVATE - $<$:DWARFSEXTRACT_MINIMAL> - ) if(WITH_UNIVERSAL_BINARY) add_executable(dwarfsuniversal tools/src/universal.cpp) @@ -582,9 +578,6 @@ if(WITH_TESTS) if(TARGET tool_main_test) target_link_libraries(tool_main_test PRIVATE mkdwarfs_main dwarfsck_main dwarfsextract_main PkgConfig::LIBARCHIVE) - target_compile_definitions(tool_main_test PRIVATE - $<$:DWARFSEXTRACT_MINIMAL> - ) endif() if(TARGET manpage_test) @@ -596,9 +589,6 @@ if(WITH_TESTS) target_compile_definitions(manpage_test PRIVATE DWARFS_WITH_FUSE_DRIVER) target_link_libraries(manpage_test PRIVATE dwarfs_main) endif() - target_compile_definitions(manpage_test PRIVATE - $<$:DWARFSEXTRACT_MINIMAL> - ) endif() if(TARGET tools_test) diff --git a/test/manpage_test.cpp b/test/manpage_test.cpp index 562dfc4b..5382c41a 100644 --- a/test/manpage_test.cpp +++ b/test/manpage_test.cpp @@ -195,9 +195,7 @@ TEST_P(manpage_coverage_test, options) { #ifdef DWARFS_FILESYSTEM_EXTRACTOR_NO_OPEN_FORMAT man_opts.erase("format"); #endif -#ifdef DWARFSEXTRACT_MINIMAL man_opts.erase("pattern"); -#endif } for (auto const& [opt, short_opt] : man_opts) { diff --git a/test/tool_main_test.cpp b/test/tool_main_test.cpp index 973f1307..2068d605 100644 --- a/test/tool_main_test.cpp +++ b/test/tool_main_test.cpp @@ -2159,7 +2159,6 @@ TEST(dwarfsextract_test, mtree) { EXPECT_THAT(out, ::testing::HasSubstr("type=file")); } -#ifndef DWARFSEXTRACT_MINIMAL TEST(dwarfsextract_test, patterns) { auto mkdt = mkdwarfs_tester::create_empty(); mkdt.add_test_file_tree(); @@ -2190,7 +2189,6 @@ TEST(dwarfsextract_test, patterns) { } EXPECT_EQ(expected, actual); } -#endif TEST(dwarfsextract_test, stdout_progress_error) { auto t = dwarfsextract_tester::create_with_image(); diff --git a/tools/src/dwarfsextract_main.cpp b/tools/src/dwarfsextract_main.cpp index 34ce0482..ab53be0a 100644 --- a/tools/src/dwarfsextract_main.cpp +++ b/tools/src/dwarfsextract_main.cpp @@ -90,11 +90,9 @@ int dwarfsextract_main(int argc, sys_char** argv, iolayer const& iol) { ("output,o", po_sys_value(&output), "output file or directory") -#ifndef DWARFSEXTRACT_MINIMAL ("pattern", po::value>(), "only extract files matching these patterns") -#endif ("image-offset,O", po::value(&image_offset)->default_value("auto"), "filesystem image offset in bytes") @@ -132,9 +130,7 @@ int dwarfsextract_main(int argc, sys_char** argv, iolayer const& iol) { tool::add_common_options(opts, logopts); po::positional_options_description pos; -#ifndef DWARFSEXTRACT_MINIMAL pos.add("pattern", -1); -#endif po::variables_map vm; @@ -172,12 +168,10 @@ int dwarfsextract_main(int argc, sys_char** argv, iolayer const& iol) { std::unique_ptr matcher; -#ifndef DWARFSEXTRACT_MINIMAL if (vm.contains("pattern")) { matcher = std::make_unique( vm["pattern"].as>()); } -#endif int rv = 0;