LXC 7.0 dropped support for cgroup v1. Replace all
lxc.cgroup.devices.* keys with their lxc.cgroup2.devices.*
equivalents accordingly.
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
The variable `distro_codename` (introduced in previous commit) is a
better fit than `release` for places where we want to match a codename.
Signed-off-by: Arnaud Rebillout <arnaudr@debian.org>
isc-dhcp-client is being phased out in Debian, and it was recently
removed from forky/testing due to https://bugs.debian.org/1106121.
For releases with codename trixie and before select isc-dhcp-client,
otherwise select dhcpcd-base. This way the dhcp-client installed in the
container matches the one that comes with the respective release by default.
This change was discussed at https://bugs.debian.org/1125011.
Signed-off-by: Arnaud Rebillout <arnaudr@debian.org>
It is still possible to create containers for jessie and stretch, although you
need to manually specify the archive mirror and keyring:
lxc-create -t debian -n stretch -- -r stretch \
--mirror=http://archive.debian.org/debian \
--keyring=/usr/share/keyrings/debian-archive-removed-keys.gpg
While the jessie container starts up, it doesn't automatically get an IP -- I
didn't perform any further investigation. stretch works just fine.
Debian releases wheezy and earlier fail to create the container in various ways.
This commit just changes the presented list of releases; there is some existing
logic for handling archived releases, but I didn't want to risk breaking things
by tinkering with the existing code.
Signed-off-by: Mathias Gibbens <gibmat@debian.org>
Another commit, in the spirit of 0862ddf3, that doesn't really change
anything in terms of functionality, but brings the code in lxc-kali.in
closer to the code in lxc-debian.in, making it easier to compare the two
files.
Signed-off-by: Arnaud Rebillout <arnaudr@kali.org>
On a Debian sid system with lxc 5.0.3 and the latest snapshot of lxc-templates,
attempting to create an alpine container fails with the error "mknod:
dev/console: File exists". This had been reported a while back in Debian
bug #998095 and partially addressed in #46.
I performed some testing of the resulting alpine container, and things appear
to be working correctly.
Signed-off-by: Mathias Gibbens <gibmat@debian.org>
I think this is leftover from when lxc-templates was split out from lxc.
There's no need to install empty directories /var/cache/lxc/ and
/var/lib/lxc/.
Signed-off-by: Mathias Gibbens <gibmat@debian.org>
An official architecture is not always available in testing. New
architectures get added to unstable first, and only some time after that
they *may* get added to testing as well. This is just now happening with
riscv64, and checking whether it's available in testing will *not* give
the correct answer for the question "is this an official Debian
architecture?".
Also, since debian-ports only contain unstable, just refuse to use
debian-ports if not creating an unstable/sid container.
Signed-off-by: Antonio Terceiro <terceiro@debian.org>
When the --keyring option was added, the `,` between `mirror:` and
`keyring:` was omitted in the long option string passed to `getopt`.
This causes `--mirror` to be parsed as `--mirror:keyring`, matching
`*) break ;;` and prematurely terminating option parsing. To avoid
this, add the missing `,`. Also order `keyring:` before `mirror:` to
preserve lexical ordering of long options.
Fixes: eebcd76feb ("lxc-debian: allow using a custom keyring")
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Alpine started using https://git.alpinelinux.org/aports/plain/main/alpine-keys/ to publish their apk keys as of 3.15, so using the old URI will give errors about signature verification since a required key is missing
Remove old key
Fix#43 - let lxc config create character devices
Creating lxc containers will error out when trying to create character devices with "file exists". This does not appear to be necessary for most of them since they get created when you actually start the container.
Signed-off-by: 4oo4 <4oo4@users.noreply.github.com>