Skip to content

Commit

Permalink
feat: do not use bash to execute ldconfig
Browse files Browse the repository at this point in the history
在制作flatpak的base时发现, flatpak的动态链接器 (ld-linux-x86-64.so.2)
只包含了/usr/lib/x86_64-linux-gnu这一个动态库搜索路径, 导致bash在运行ldconfig之前是无法启动的
所以在容器钩子中不再通过bash运行ldconfig而是直接启动ldconfig, 以兼容复杂的base环境

note: org.gnome.Platform/x86_64/43 和 org.kde.Platform/x86_64/5.15-23.08 都有这个问题

Log:
  • Loading branch information
myml authored and dengbo11 committed Oct 24, 2024
1 parent 54ab744 commit b955f9c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/generators/40-host-ipc/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ int main()
localtimePath = "/run/host/rootfs" + absoluteTarget;
}
}
// 为 /run/linglong/etc/ld.so.cache 创建父目录
mounts.push_back({
{ "destination", "/run/linglong/etc" },
{ "options", nlohmann::json::array({ "nodev", "nosuid", "mode=700" }) },
{ "source", "tmpfs" },
{ "type", "tmpfs" },
});

auto pwd = std::filesystem::current_path();
// [name, destination, target]
Expand Down

0 comments on commit b955f9c

Please sign in to comment.