90 Commits

Author SHA1 Message Date
John Audia
ab1f60b74d lxc: update to 6.0.5
6.0.5 is a bug fix release, see:
https://discuss.linuxcontainers.org/t/lxc-6-0-5-lts-has-been-released/24438

Full changelog: https://github.com/lxc/lxc/compare/v6.0.4...v6.0.5

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc (Intel N150 based box)

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-08-19 19:25:39 +03:00
John Audia
343f1151f9 lxc: update to 6.0.4
Added upstream patch to fix starting containers with complex hooks.
No existing patches needed to be rebased/simple version bump to 6.0.4.

Build system: x86/64
Build-tested: x86/64
Run-tested: x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-04-16 18:53:16 +02:00
John Audia
6fe80f5586 lxc: add two files to default backup list
Users running unprivileged containers will need to create
/etc/subgid and /etc/subuid and want to have them preserved
across updates. This commit adds them to the default backup set.

Signed-off-by: John Audia <therealgraysky@proton.me>
Co-authored-by: Tianling Shen <cnsztl@gmail.com>
2025-03-15 21:32:58 +08:00
John Audia
f32083fa27 lxc: lxc-checkconfig fix typo
Fix a typo introduced in fd686a3220
which partially broke lxc-checkconfig

Build system: x86/64
Build-tested: bcm27xx/bcm2712
Run-tested: bcm27xx/bcm2712

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-03-15 20:38:08 +08:00
John Audia
96c96fe041 lxc: fix decompression of rootfs tarballs
Modified 025-remove-unsupported-option.patch to both remove
the bsdtar command as it ends in errors, see below, and to
circumvent an error when extracting to overlayfs[1].

Error when extracting rootfs tarball with bsdtar:
tar --absolute-names --numeric-owner '--xattrs-include=*' -xpJf /var/cache/lxc//download/archlinux/current/amd64//default/rootfs.tar.xz -C /mnt/data/lxc/test/rootfs
./usr/bin/newgidmap: Cannot restore extended attributes on this system: Illegal byte sequence
lxc-create: test: ../src/lxc/lxccontainer.c: create_run_template: 1589 Failed to create container from template
lxc-create: test: ../src/lxc/tools/lxc_create.c: lxc_create_main: 318 Failed to create container test

1. https://github.com/openwrt/openwrt/issues/15888

Signed-off-by: John Audia <therealgraysky@proton.me>

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-02-25 00:20:14 +08:00
John Audia
b74dc8a119 lxc: add gnu-tar as a depends to fix lxc-create
Add gnu-tar as a dependency for lxc-create which is needed to
properly extract the root file system tarball. Without it,
symlink target of /bin/tar is busybox and it lacks proper
support to extract with xattrs.  The default gnu-tar is actually
built without this support as well, but it is able to extract
the rootfs tarballs with a warning not an error which is not the
case with busybox which ends in an error.

Signed-off-by: John Audia <therealgraysky@proton.me>

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne
2025-02-25 00:20:14 +08:00
John Audia
ba7e4dccec lxc: add missing deps
Several deps are missing based the output of lxc-checkconfig shown below
before this commit is applied.

CONFIG_IP_NF_TARGET_MASQUERADE and CONFIG_IP6_NF_TARGET_MASQUERADE are
only needed for lxc-net which we do not package.

% lxc-checkconfig | grep missing
Cgroup device: missing
CONFIG_IP_NF_TARGET_MASQUERADE: missing
CONFIG_IP6_NF_TARGET_MASQUERADE: missing
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: missing
FUSE (for use with lxcfs): missing
checkpoint restore: missing
CONFIG_UNIX_DIAG: missing
CONFIG_INET_DIAG: missing
CONFIG_PACKET_DIAG: missing
CONFIG_NETLINK_DIAG: missing

Additionally, two new patches have been added which remove checks for
options that OpenWrt currently does not package and can serve are
false positives for missing items from our kernel config, namely:
lxc-net and lxc-checkpoint

After applying this commit, below is the output showing that the kernel
config[1] should pass all tests for functionality:

% CONFIG=config ./lxc-checkconfig
LXC version 6.0.3

--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Namespace limits:
  cgroup: 383849
  ipc: 383849
  mnt: 383849
  net: 383849
  pid: 383849
  time: 383849
  user: 383849
  uts: 383849

--- Control groups ---
Cgroups: enabled
Cgroup namespace: enabled
Cgroup v1 mount points:
Cgroup v2 mount points:
 - /sys/fs/cgroup
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled

--- Misc ---
Veth pair device: enabled, loaded
Macvlan: enabled, not loaded
Vlan: enabled, not loaded
Bridges: enabled, loaded
Advanced netfilter: enabled, loaded
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled, not loaded
CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled, loaded

--- Checkpoint/Restore ---
checkpoint restore: missing
CONFIG_FHANDLE: enabled
CONFIG_EVENTFD: enabled
CONFIG_EPOLL: enabled
CONFIG_UNIX_DIAG: enabled
CONFIG_INET_DIAG: enabled
CONFIG_PACKET_DIAG: enabled
CONFIG_NETLINK_DIAG: enabled
File capabilities: enabled

1. Generated on 23-Feb-2025 running bcm27xx/bcm2712 on r28869+1

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-02-24 16:08:31 +08:00
John Audia
57434a290d lxc: remove check for options we do not package
We do not package lxc-net or lxcfs so remove the lines within
lxc-checkconfig that looks forCONFIG_IP_NF_TARGET_MASQUERADE and
CONFIG_IP6_NF_TARGET_MASQUERADE which, as far as I know, is the only
part of lxc that needs them. Also remove the check for FUSE since we do
not pakcage lxcfs.

Without this commit, users will see these two as missing.

Signed-off-by: John Audia <therealgraysky@proton.me>
2025-02-24 16:08:31 +08:00
John Audia
f8587b9ec4 lxc: update to 6.0.3
No patches needed to be rebased/simple version bump.

Build system: x86/64
Build-tested: x86/64
Run-tested: x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-12-22 13:47:13 +01:00
John Audia
50bd101f2e lxc: update to 6.0.2
No patches needed to be rebased, simple version bump.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-09-17 12:01:32 +02:00
John Audia
3e331ddcc0 lxc: update to 6.0.1
Changelog: https://discuss.linuxcontainers.org/t/lxc-6-0-lts-has-been-released/19567

Required libdbus as a depends for liblxc.  I verified that both
lxc-create and lxc-checkconfig work with the rebases to the
following patches but do please review:

  020-lxc-checkconfig.patch
  025-remove-unsupported-option.patch

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-06-29 11:56:46 -07:00
Fabrice Fontaine
5afe5c9031 treewide: assign PKG_CPE_ID
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2024-02-04 16:16:10 -08:00
John Audia
1b5ee689f3 lxc: update to 5.0.3
Bump to latest upstream release.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-08-04 01:46:14 +08:00
Rafał Miłecki
90fef036fe lxc: set RUNTIME_PATH define to the /var/run path
The default runtime directory used by LXC is /run which doesn't exist
in OpenWrt. It causes errors like:

Failed to create lock for foo
lxc-create: foo: tools/lxc_create.c: main: 260 Failed to create lxc container

There has been workaround for that in the lxc-auto.init but it requires
installing "lxc-auto" package. Replacing that "ln -s" workaround with
Makefile specifying RUNTIME_PATH define allows using pure "lxc" in
OpenWrt (without the "lxc-auto").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-05-11 18:23:23 +03:00
Andre Heider
565866a472 treewide: refactor to use PKG_BUILD_FLAGS:=no-mips16
See commit 5c545bdb "treewide: replace PKG_USE_MIPS16:=0 with
PKG_BUILD_FLAGS:=no-mips16" on the main repository.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-04-08 08:38:54 +02:00
John Audia
11cac71248 lxc: update to 5.0.2
Bump to latest upstream release.

Removed upstreamed patches:
	001-build-detect-where-struct-mount_attr-is-declared.patch[1]
	002-build-detect-sys-pidfd.h-availability.patch[2]
	003-build-check-for-FS_CONFIG_-header-symbol-in-sys-moun.patch[3]
	011-tree-wide-wipe-direct-or-indirect-linux-mount.h-incl.patch[4]
	012-tree-wide-use-struct-clone_args-directly.patch[5]
	013-tree-wide-use-struct-open_how-directly.patch[6]

1. b7b269680f
2. e510d6bd87
3. 02f4bd00f5
4. 497479ea3b
5. c9bca33263
6. d1dfce9c59

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-04-06 19:45:36 +02:00
Hauke Mehrtens
8e2dcf4d75 lxc: Remove AUTORELEASE
The previous version used PKG_RELEASE:=3.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-22 16:27:54 -08:00
Hauke Mehrtens
c2edafb66f lxc: Fix compilation with glibc 2.36
Backport patches from upstream lxc master to fix compilation against
glibc 2.36.

The changes were added in these pull requests:
https://github.com/lxc/lxc/pull/4179
https://github.com/lxc/lxc/pull/4181

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-22 16:27:54 -08:00
Marc Benoit
e70844a9ca lxc-auto: made init script compatible with image builder
Signed-off-by: Marc Benoit <marcb62185@gmail.com>
2022-11-04 13:15:57 -07:00
John Audia
d957a2293b lxc: update to 5.0.1
Bump to latest and update Makefile to use meson which is upstream's standard.
Deleted unneeded 010-Remove-distro-check.patch (reference to configure).

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-09-09 10:25:43 -07:00
Michal Vasilek
7da7356539 lxc: export systemd cgroups after install
otherwise, a user would have to either manually run /etc/init.d/lxc-auto
boot or reboot the system to start using lxc.

originally committed in 2cde10b950
reverted in 039912dec5

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
2022-06-24 12:16:43 +02:00
Stijn Tintel
039912dec5 Revert "lxc: export systemd cgroups after install"
The postinst script is sourced during image build, which causes the
follow failure:
/home/stijn/Development/OpenWrt/openwrt/build_dir/target-x86_64_musl/root-x86/etc/init.d/lxc-auto: line 3: /lib/functions.sh: No such file or directory
postinst script ./usr/lib/opkg/info/lxc-auto.postinst has failed with exit code 1

Sourcing /lib/functions.sh is not needed, as /etc/rc.common does so
already. Unfortunately removing that line from the init script is not
enough to fix the problem. The postinst script should also check
IPKG_INSTROOT. As these two changes are unrelated, they should go in
separate commits, and the solution to the image build problem is to
revert the commit that introduced the breakage.

This reverts commit 2cde10b950.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-05-18 17:19:22 +03:00
Michal Vasilek
2cde10b950 lxc: export systemd cgroups after install
otherwise, a user would have to either manually run /etc/init.d/lxc-auto
boot or reboot the system to start using lxc.

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
2022-05-14 21:28:48 -07:00
Marko Ratkaj
a4f6d6d33a lxc: update maintainer email
Signed-off-by: Marko Ratkaj <markoratkaj@gmail.com>
2022-03-31 12:50:58 +02:00
John Audia
e80835b4bb lxc-create: update depends to include getopt
Fixes https://github.com/openwrt/packages/issues/16684

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <graysky@archlinux.us>
2022-02-07 18:37:26 +01:00
John Audia
115bf07f6c lxc: update to 4.10.12
Bump to latest upstream release and rebase:
  010-Remove-distro-check.patch
  025-remove-unsupported-option.patch

After updating ran `make package/lxc/refresh` to clean dirty patches

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <graysky@archlinux.us>
2022-02-07 17:43:50 +01:00
John Audia
7984d2d74a lxc-auto: step by 1 sec up to $max_timeout
If the user defines a $max_timeout of 30, the service will wait 30 seconds
before it considers lxc-stop complete even though lxc-stop might actually
finish much sooner.  This introduces an unneeded delay.

This commit changes the behavior to check once per second to see when lxc-stop
actually stops doing so up to $max_timeout.  It also slightly simplifies the
code with logic to append the -t $max_timeout to the script.

Signed-off-by: John Audia <graysky@archlinux.us>
2021-09-25 12:37:06 -07:00
John Audia
049cf1e1b0 lxc: remove legacy cgroups from common.conf
I am unaware of any kernel currently provided that retains cgroup v1 support.
This patch removes these lines in /usr/share/lxc/config/common.conf to allow
for error free usage.

Providing common.conf as-is will result in failure to start. One solution is to
comment out the legacy lines.[1] This requires users to either provide a custom
version of this file on their builds or to manually edit it with each update.

Since many do not build their own, the first option is not available to them.
Manually editing the file with each update will cause a failure to start
containers set to auto-start upon rebooting into the update.

1. https://forum.openwrt.org/t/openwrt-arm64-quick-lxc-howto-guide-lms-in-debian-system-in-lxc-container/99835

Signed-off-by: John Audia <graysky@archlinux.us>
2021-09-18 15:04:46 -07:00
Rosen Penev
3df43e2f66 lxc: update to 4.0.10
Remove getline patch. It seems to be for uClibc, which is no longer in
the tree.

Remove commands patch. Issue was fixed upstream. Same with the tests
patch.

Remove gpg patch. It's an upstream backport.

Refreshed others.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-08-28 16:47:22 -07:00
Josef Schlehofer
70e06afd07 lxc: add patch to switch GPG server
By default, there was used sks-keyservers.net pool, which has invalid
SSL certificate and they also announced that their service is deprecate
and no longer maintained.

Use the same GPG server as LXC is using by default in the newer
releases.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2021-07-10 18:16:52 +02:00
Eneas U de Queiroz
470176905d lxc: fix build without seccomp if libseccomp built
This fixes compiling lxc without seccomp support if libseccomp is
already installed to the staging dir.  Patches were applied upstream.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-02-25 22:51:08 -03:00
Rosen Penev
cbe4b726da lxc: update to 4.0.5
Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-11-19 16:16:43 -08:00
Paul Spooren
30ea917518 treewide: replace which with command -v
Fix shellcheck SC2230
> which is non-standard. Use builtin 'command -v' instead.

Once applied to everything concerning OpenWrt we can disable the busybox
feature `which` and save 3.8kB.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-08-09 13:58:14 -10:00
Martin Hammer
610f90b644 lxc: bump version
Signed-off-by: Martin Hammer <34623636+hammer-is@users.noreply.github.com>
Signed-off-by: martin <martin@DESKTOP-C822DHJ.lan>
2020-05-25 23:44:58 +02:00
Martin Hammer
dcfaef0da5 lxc: start() during boot()
Signed-off-by: Martin Hammer <34623636+hammer-is@users.noreply.github.com>
Signed-off-by: martin <martin@DESKTOP-C822DHJ.lan>
2020-05-25 22:23:59 +02:00
Eneas U de Queiroz
a1baf2eae0 lxc: use -minterlink-mips16 only with USE_MIPS16
The flag is either not supported or not needed unless there's mixed
mips/mips16 code.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-05-23 17:37:14 -03:00
Eneas U de Queiroz
a826bc17eb lxc: group everything under lxc menu
This makes every lxc-* package depend on lxc so that they are grouped
under the lxc menu.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-05-22 14:02:25 -07:00
Rosen Penev
29dd78c6fc lxc: don't build for ARC
Similar to libseccomp, ARC is completely unsupported.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-22 14:02:25 -07:00
Rosen Penev
4b9c819b02 lxc: cleanup Makefile and outdated configure options
Added PKG_NO_MIPS16 as MIPS16 is no longer supported.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-22 14:02:25 -07:00
Rosen Penev
50f17d3cf5 lxc: remove lua
Lua support seems to be gone from LXC 4.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-22 14:02:24 -07:00
Robert Marko
9f43594e3a lxc: bump to 4.0.2
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Marijan Svalina <marijan.svalina@sartura.hr>
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2020-05-19 00:19:15 +02:00
Rosen Penev
04e94b44b5 lxc: Fix pkgconfig file
It's pointing to the host.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-11-27 23:28:24 -08:00
Yousong Zhou
b6a3145df5 cgroups-mount,docker-ce,lxc: rework kernel feature dependency
Fix that KERNEL_CGROUPS is enabled (selected) automatically along with
cgroups-mount

Replace "if PACKAGE_docker-ce" with a menu to avoid circular denpendency
issue involving PACKAGE_docker-ce, PACKAGE_cgroups-mount and
KERNEL_CGRUOPS

docker-ce, lxc: replace KERNEL_LXC_MISC with more specific options

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-09-12 10:31:16 +08:00
Sven Eckelmann
bbb1ea7345 treewide: Change .*GPL.*+ licenses to SPDX compatible identifier
The CONTRIBUTING.md requests an (or multiple) SPDX identifier for GPL
licenses. But a lot of packages did use a different, non-SPDX style with a
"+" at the end instead of "-or-later".

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2019-09-10 07:45:15 +02:00
Rosen Penev
118926c852 Merge pull request #8999 from neheb/lx
lxc: Backport uClibc patch
2019-05-17 13:22:20 -07:00
Rosen Penev
189a170038 lxc: Backport uClibc patch
Fixes compilation

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-05-15 17:31:07 -07:00
Eneas U de Queiroz
57b4d94d98 lxc: hide seccomp support for arc
libseccomp does not compile for arc, so we can't show that option for
arc.

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
2019-05-15 09:48:42 -03:00
Daniel F. Dickinson
cc039d801e lxc: Disable use of unwanted libraries explicity
Otherwise one gets a failure if the libraries (e.g. Python
header file) exist in the build system.  Worse in some cases
is host headers being found if one doesn't specifically
disable a library search in autotools.  It is especially
important that Python is disabled by default.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2019-01-27 15:11:11 -05:00
Rafał Miłecki
6e1104cc6d lxc: bump PKG_RELEASE after backporting nl patch
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-07-29 21:18:06 +02:00
Rafał Miłecki
13d57a5e9f lxc: nl: avoid NULL pointer dereference
This backports upstream fix from the master branch.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2018-07-29 21:17:08 +02:00