mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 19:04:32 +04:00
LXC after the switch to the Meson build system increased the binary sizes significantly as each binary is basically static so shipping complete liblxc which should be linked dynamically. Upstream later fixed it with series of 10 commits and this fixes are available in LXC release v6.0.0. Since we can't upstep to that release, lets fix it by backporting those fixes only, basically making libxlc a shared library again. Package sizes before: 384K lxc-user-nic_5.0.3-1_aarch64_cortex-a53.ipk 383K lxc-ls_5.0.3-1_aarch64_cortex-a53.ipk 382K lxc-top_5.0.3-1_aarch64_cortex-a53.ipk 382K lxc-copy_5.0.3-1_aarch64_cortex-a53.ipk 381K lxc-unshare_5.0.3-1_aarch64_cortex-a53.ipk 380K lxc-start_5.0.3-1_aarch64_cortex-a53.ipk 380K lxc-monitor_5.0.3-1_aarch64_cortex-a53.ipk 380K lxc-info_5.0.3-1_aarch64_cortex-a53.ipk 380K lxc-create_5.0.3-1_aarch64_cortex-a53.ipk 380K lxc-autostart_5.0.3-1_aarch64_cortex-a53.ipk 380K lxc-attach_5.0.3-1_aarch64_cortex-a53.ipk 379K lxc-execute_5.0.3-1_aarch64_cortex-a53.ipk 378K lxc-wait_5.0.3-1_aarch64_cortex-a53.ipk 378K lxc-usernsexec_5.0.3-1_aarch64_cortex-a53.ipk 378K lxc-unfreeze_5.0.3-1_aarch64_cortex-a53.ipk 378K lxc-stop_5.0.3-1_aarch64_cortex-a53.ipk 378K lxc-freeze_5.0.3-1_aarch64_cortex-a53.ipk 378K lxc-device_5.0.3-1_aarch64_cortex-a53.ipk 378K lxc-destroy_5.0.3-1_aarch64_cortex-a53.ipk 378K lxc-console_5.0.3-1_aarch64_cortex-a53.ipk 378K lxc-cgroup_5.0.3-1_aarch64_cortex-a53.ipk 376K liblxc_5.0.3-1_aarch64_cortex-a53.ipk 375K lxc-config_5.0.3-1_aarch64_cortex-a53.ipk 12K lxc-hooks_5.0.3-1_aarch64_cortex-a53.ipk 11K lxc-templates_5.0.3-1_aarch64_cortex-a53.ipk 3.7K lxc-checkconfig_5.0.3-1_aarch64_cortex-a53.ipk 2.4K lxc-configs_5.0.3-1_aarch64_cortex-a53.ipk 1.9K lxc-auto_5.0.3-1_aarch64_cortex-a53.ipk 1.6K lxc-common_5.0.3-1_aarch64_cortex-a53.ipk 1.2K lxc-unprivileged_5.0.3-1_aarch64_cortex-a53.ipk 978 lxc_5.0.3-1_aarch64_cortex-a53.ipk Sizes after: 378K liblxc_5.0.3-2_aarch64_cortex-a53.ipk 27K lxc-user-nic_5.0.3-2_aarch64_cortex-a53.ipk 24K lxc-ls_5.0.3-2_aarch64_cortex-a53.ipk 21K lxc-usernsexec_5.0.3-2_aarch64_cortex-a53.ipk 21K lxc-top_5.0.3-2_aarch64_cortex-a53.ipk 20K lxc-unshare_5.0.3-2_aarch64_cortex-a53.ipk 20K lxc-copy_5.0.3-2_aarch64_cortex-a53.ipk 20K lxc-attach_5.0.3-2_aarch64_cortex-a53.ipk 18K lxc-start_5.0.3-2_aarch64_cortex-a53.ipk 18K lxc-info_5.0.3-2_aarch64_cortex-a53.ipk 18K lxc-execute_5.0.3-2_aarch64_cortex-a53.ipk 18K lxc-device_5.0.3-2_aarch64_cortex-a53.ipk 18K lxc-create_5.0.3-2_aarch64_cortex-a53.ipk 18K lxc-autostart_5.0.3-2_aarch64_cortex-a53.ipk 17K lxc-destroy_5.0.3-2_aarch64_cortex-a53.ipk 16K lxc-wait_5.0.3-2_aarch64_cortex-a53.ipk 16K lxc-unfreeze_5.0.3-2_aarch64_cortex-a53.ipk 16K lxc-stop_5.0.3-2_aarch64_cortex-a53.ipk 16K lxc-freeze_5.0.3-2_aarch64_cortex-a53.ipk 16K lxc-console_5.0.3-2_aarch64_cortex-a53.ipk 16K lxc-cgroup_5.0.3-2_aarch64_cortex-a53.ipk 15K lxc-monitor_5.0.3-2_aarch64_cortex-a53.ipk 13K lxc-config_5.0.3-2_aarch64_cortex-a53.ipk 12K lxc-hooks_5.0.3-2_aarch64_cortex-a53.ipk 11K lxc-templates_5.0.3-2_aarch64_cortex-a53.ipk 3.7K lxc-checkconfig_5.0.3-2_aarch64_cortex-a53.ipk 2.4K lxc-configs_5.0.3-2_aarch64_cortex-a53.ipk 1.9K lxc-auto_5.0.3-2_aarch64_cortex-a53.ipk 1.6K lxc-common_5.0.3-2_aarch64_cortex-a53.ipk 1.1K lxc-unprivileged_5.0.3-2_aarch64_cortex-a53.ipk 944 lxc_5.0.3-2_aarch64_cortex-a53.ipk Sum of Package Sizes: Before: 8758.78K After: 814.64K The total package size has decreased by approximately 90% after the fix. References: https://github.com/lxc/lxc/pull/4401 Signed-off-by: Petr Štetiar <ynezz@true.cz>
37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
|
|
Date: Sat, 17 Feb 2024 16:58:02 +0100
|
|
Subject: [PATCH] confile: unhide lxc_config_define*() helpers
|
|
|
|
Let's unhide lxc_config_define_add, lxc_config_define_load and
|
|
lxc_config_define_free helpers. These functions are safe enough
|
|
to be used by external tools. Semantic is also clear.
|
|
|
|
Reason is that we have lxc-start/lxc-execute tools which
|
|
use these symbols. Right now it works, because we just
|
|
link a whole liblxc statically to each lxc-* tool...
|
|
|
|
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
|
|
(cherry picked from commit b7591ad49d6051047371824bae6f19e37ba86dea)
|
|
---
|
|
src/lxc/confile.h | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
--- a/src/lxc/confile.h
|
|
+++ b/src/lxc/confile.h
|
|
@@ -77,11 +77,11 @@ __hidden extern int lxc_config_read(cons
|
|
|
|
__hidden extern int append_unexp_config_line(const char *line, struct lxc_conf *conf);
|
|
|
|
-__hidden extern int lxc_config_define_add(struct lxc_list *defines, char *arg);
|
|
+extern int lxc_config_define_add(struct lxc_list *defines, char *arg);
|
|
|
|
-__hidden extern bool lxc_config_define_load(struct lxc_list *defines, struct lxc_container *c);
|
|
+extern bool lxc_config_define_load(struct lxc_list *defines, struct lxc_container *c);
|
|
|
|
-__hidden extern void lxc_config_define_free(struct lxc_list *defines);
|
|
+extern void lxc_config_define_free(struct lxc_list *defines);
|
|
|
|
#define LXC_ARCH_UNCHANGED 0xffffffffL
|
|
/*
|