From 882153f0e5575503e8c97ceec5c8d7ac8e09996c Mon Sep 17 00:00:00 2001 From: Daniel Nicoletti Date: Thu, 13 Jun 2024 12:08:40 -0300 Subject: [PATCH 1/2] Add LINUXDEPLOY_EXCLUDED_LIBRARIES env Excluding libraries doesn't properly work as of now because plugins are not notified of such exclusions, by passing the env var and automatically reading it plugins just need to be recompiled or read it. --- include/linuxdeploy/util/misc.h | 12 +++++++++++- src/core/appdir.cpp | 8 +++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/include/linuxdeploy/util/misc.h b/include/linuxdeploy/util/misc.h index f954ce7f..7ac7d948 100644 --- a/include/linuxdeploy/util/misc.h +++ b/include/linuxdeploy/util/misc.h @@ -135,7 +135,17 @@ namespace linuxdeploy { } return {}; - }; + } + + // returns a string vector splitted from envVar + static std::vector splitEnv(const char *envVar, char delimiter) { + std::vector result; + const auto ret = getenv(envVar); + if (ret) { + result = split(ret, delimiter); + } + return result; + } } } } diff --git a/src/core/appdir.cpp b/src/core/appdir.cpp index 4a77b3ca..6f918e51 100644 --- a/src/core/appdir.cpp +++ b/src/core/appdir.cpp @@ -123,9 +123,11 @@ namespace linuxdeploy { bool disableCopyrightFilesDeployment = false; public: - PrivateData() : copyOperationsStorage(), stripOperations(), setElfRPathOperations(), visitedFiles(), appDirPath(), excludeLibraryPatterns() { + PrivateData() : copyOperationsStorage(), stripOperations(), setElfRPathOperations(), visitedFiles(), appDirPath() { copyrightFilesManager = copyright::ICopyrightFilesManager::getInstance(); - }; + + excludeLibraryPatterns = util::misc::splitEnv("LINUXDEPLOY_EXCLUDED_LIBRARIES", ';'); + } public: // calculate library directory name for given ELF file, taking system architecture into account @@ -656,7 +658,7 @@ namespace linuxdeploy { AppDir::AppDir(const std::string& path) : AppDir(fs::path(path)) {} void AppDir::setExcludeLibraryPatterns(const std::vector &excludeLibraryPatterns) { - d->excludeLibraryPatterns = excludeLibraryPatterns; + d->excludeLibraryPatterns.insert(d->excludeLibraryPatterns.end(), excludeLibraryPatterns.begin(), excludeLibraryPatterns.end()); } bool AppDir::createBasicStructure() const { From 801582ab4940809726c12ccfa4ea480a55c98efd Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Tue, 12 Aug 2025 02:29:13 +0200 Subject: [PATCH 2/2] Remove obsolete dependency --- ci/docker/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/docker/Dockerfile b/ci/docker/Dockerfile index b647a7af..7a603dc0 100644 --- a/ci/docker/Dockerfile +++ b/ci/docker/Dockerfile @@ -33,7 +33,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ git \ autoconf \ automake \ - libfuse2 \ cimg-dev \ cmake \ googletest \