Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Curiosity
fah-client-bastet-beta
lib-search-path.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lib-search-path.patch of Package fah-client-bastet-beta
diff --git a/src/fah/client/App.cpp b/src/fah/client/App.cpp index 9a6d55d..4de1d14 100644 --- a/src/fah/client/App.cpp +++ b/src/fah/client/App.cpp @@ -157,6 +157,10 @@ App::App() : options.popCategory(); + options.pushCategory("Core Settings"); + options.add("lib-path", "Prepend library search paths to library search path.")->setType(Option::STRINGS_TYPE); + options.popCategory(); + options["allow"].setDefault("127.0.0.1"); options["deny"].setDefault("0/0"); diff --git a/src/fah/client/Unit.cpp b/src/fah/client/Unit.cpp index 388edd6..a4780d0 100644 --- a/src/fah/client/Unit.cpp +++ b/src/fah/client/Unit.cpp @@ -601,12 +601,25 @@ void Unit::run() { string execPath = SystemUtilities::getExecutablePath(); paths.push_back(SystemUtilities::dirname(execPath)); #endif + // user specific lib search path to be prepended + auto &myoptions = app.getOptions(); + if (myoptions["lib-path"].isSet() && + ! myoptions["lib-path"].toStrings().empty()) { + auto pre_paths = myoptions["lib-path"].toStrings(); + for (unsigned i = 0; i < pre_paths.size(); i++) { + paths.push_back(pre_paths[i]); + } + } + // add path to core string corePath = SystemUtilities::absolute(core->getPath()); paths.push_back(SystemUtilities::dirname(corePath)); + // add LD_LIBRARY_PATH const string &ldPath = SystemUtilities::library_path; if (SystemUtilities::getenv(ldPath)) SystemUtilities::splitPaths(SystemUtilities::getenv(ldPath), paths); + // set new LD_LIBRARY_PATH process->set(ldPath, SystemUtilities::joinPaths(paths)); + LOG_INFO(3, ldPath << ": " << SystemUtilities::joinPaths(paths)); // Args vector<string> args;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor