1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 11:19:50 +03:00
aports/testing/libtree/alpine-skip-default.patch
2021-12-11 23:54:43 +01:00

37 lines
1.9 KiB
Diff

From: Jakub Jirutka <jakub@jirutka.cz>
Date: Sat, 11 Dec 2021 13:49:00 +0100
Subject: [PATCH] Add option --skip-default
The built-in skip/exclude list (include/libtree/excludelist.hpp) has been
taken [1] from the AppImages project [2] and it's quite
major-glibc-distros-centric, so not very useful on Alpine Linux.
This patch disables the usage of this list, unless --skip-default is used.
[1]: https://github.com/haampie/libtree/commit/6f5e6bb3aa69f73d8ba0c02c11a876280f78497f
[2]: https://raw.githubusercontent.com/probonopd/AppImages/master/excludelist
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -38,7 +38,8 @@
("l,ldconf", "Path to custom ld.conf to test settings", cxxopts::value<std::string>()->default_value("/etc/ld.so.conf"))
("s,skip", "Skip library and its dependencies from being deployed or inspected", cxxopts::value<std::vector<std::string>>())
("platform", "Platform used for interpolation in rpaths", cxxopts::value<std::string>()->default_value(default_platform))
- ("b,binary", "Binary to inspect", cxxopts::value<std::vector<std::string>>());
+ ("b,binary", "Binary to inspect", cxxopts::value<std::vector<std::string>>())
+ ("skip-default", "Skip libraries on the AppImages' exclude list (Alpine-specific option; this is always enabled in the original libtree)", cxxopts::value<bool>()->default_value("false"));
options.add_options("B. Copying libs")
("d,destination", "OPTIONAL: When a destination is set to a folder, all binaries and their dependencies are copied over", cxxopts::value<std::string>())
@@ -79,6 +80,11 @@
return 0;
}
+ if (!result["skip-default"].count())
+ generatedExcludelist.clear();
+
+ generatedExcludelist.insert(std::string("libc.musl-") + platform + ".so.1");
+
if (result["skip"].count()) {
auto const &list = result["skip"].as<std::vector<std::string>>();
for (auto const &lib : list)