lxc: downgrade to 3.1.0 as newer versions may have issues
This commit is contained in:
parent
e8ca6738e6
commit
14bfbeb4c9
@ -1,18 +1,16 @@
|
|||||||
TERMUX_PKG_HOMEPAGE=http://linuxcontainers.org/
|
TERMUX_PKG_HOMEPAGE=http://linuxcontainers.org/
|
||||||
TERMUX_PKG_DESCRIPTION="Linux Containers"
|
TERMUX_PKG_DESCRIPTION="Linux Containers"
|
||||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
|
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||||
TERMUX_PKG_VERSION=4.0.1
|
# v3.1.0 is the last version confirmed to work.
|
||||||
TERMUX_PKG_SRCURL=https://linuxcontainers.org/downloads/lxc-$TERMUX_PKG_VERSION.tar.gz
|
# Do not update it unless you tested it on your device.
|
||||||
TERMUX_PKG_SHA256=70bbaac1df097f32ee5493a5e67a52365f7cdda28529f40197d6160bbec4139d
|
TERMUX_PKG_VERSION=1:3.1.0
|
||||||
|
TERMUX_PKG_SRCURL=https://linuxcontainers.org/downloads/lxc-${TERMUX_PKG_VERSION:2}.tar.gz
|
||||||
|
TERMUX_PKG_SHA256=4d8772c25baeaea2c37a954902b88c05d1454c91c887cb6a0997258cfac3fdc5
|
||||||
TERMUX_PKG_DEPENDS="gnupg, libcap, libseccomp, rsync, wget"
|
TERMUX_PKG_DEPENDS="gnupg, libcap, libseccomp, rsync, wget"
|
||||||
TERMUX_PKG_BREAKS="lxc-dev"
|
TERMUX_PKG_BREAKS="lxc-dev"
|
||||||
TERMUX_PKG_REPLACES="lxc-dev"
|
TERMUX_PKG_REPLACES="lxc-dev"
|
||||||
|
|
||||||
# Do not build for ARM due to
|
|
||||||
# error: /home/builder/.termux-build/_cache/android-r20-api-24-v1/bin/../lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb/libgcc_real.a(pr-support.o): multiple definition of '__gnu_unwind_frame'
|
|
||||||
TERMUX_PKG_BLACKLISTED_ARCHES="arm"
|
|
||||||
|
|
||||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||||
--with-distro=termux
|
--with-distro=termux
|
||||||
--with-runtime-path=$TERMUX_PREFIX/var/run
|
--with-runtime-path=$TERMUX_PREFIX/var/run
|
||||||
|
@ -1,53 +1,68 @@
|
|||||||
--- ./src/lxc/cgroups/cgfsng.c.orig 2020-04-07 13:18:11.768499944 +0200
|
diff -uNr lxc-3.1.0/src/lxc/cgroups/cgfsng.c lxc-3.1.0.mod/src/lxc/cgroups/cgfsng.c
|
||||||
+++ ./src/lxc/cgroups/cgfsng.c 2020-04-07 13:22:05.304800371 +0200
|
--- lxc-3.1.0/src/lxc/cgroups/cgfsng.c 2018-12-14 01:13:51.000000000 +0200
|
||||||
@@ -348,7 +348,7 @@
|
+++ lxc-3.1.0.mod/src/lxc/cgroups/cgfsng.c 2019-07-13 20:47:37.511164109 +0300
|
||||||
ssize_t maxisol = 0, maxoffline = 0, maxposs = 0;
|
@@ -395,7 +395,7 @@
|
||||||
bool flipped_bit = false;
|
}
|
||||||
|
oldv = *lastslash;
|
||||||
- fpath = must_make_path(parent_cgroup, "cpuset.cpus", NULL);
|
*lastslash = '\0';
|
||||||
+ fpath = must_make_path(parent_cgroup, "cpus", NULL);
|
- fpath = must_make_path(path, "cpuset.cpus", NULL);
|
||||||
|
+ fpath = must_make_path(path, "cpus", NULL);
|
||||||
posscpus = read_file(fpath);
|
posscpus = read_file(fpath);
|
||||||
if (!posscpus)
|
if (!posscpus) {
|
||||||
return log_error_errno(false, errno, "Failed to read file \"%s\"", fpath);
|
SYSERROR("Failed to read file \"%s\"", fpath);
|
||||||
@@ -439,10 +439,10 @@
|
@@ -412,7 +412,7 @@
|
||||||
|
DEBUG("The path \""__ISOL_CPUS"\" to read isolated cpus from does not exist");
|
||||||
|
cpulist = posscpus;
|
||||||
|
/* No isolated cpus but we weren't already initialized by
|
||||||
|
- * someone. We should simply copy the parents cpuset.cpus
|
||||||
|
+ * someone. We should simply copy the parents cpus
|
||||||
|
* values.
|
||||||
|
*/
|
||||||
|
if (!am_initialized) {
|
||||||
|
@@ -434,7 +434,7 @@
|
||||||
|
TRACE("No isolated cpus detected");
|
||||||
|
cpulist = posscpus;
|
||||||
|
/* No isolated cpus but we weren't already initialized by
|
||||||
|
- * someone. We should simply copy the parents cpuset.cpus
|
||||||
|
+ * someone. We should simply copy the parents cpus
|
||||||
|
* values.
|
||||||
|
*/
|
||||||
|
if (!am_initialized) {
|
||||||
|
@@ -491,7 +491,7 @@
|
||||||
copy_parent:
|
copy_parent:
|
||||||
if (!am_initialized) {
|
*lastslash = oldv;
|
||||||
- ret = lxc_write_openat(child_cgroup, "cpuset.cpus", cpulist, strlen(cpulist));
|
free(fpath);
|
||||||
+ ret = lxc_write_openat(child_cgroup, "cpus", cpulist, strlen(cpulist));
|
- fpath = must_make_path(path, "cpuset.cpus", NULL);
|
||||||
if (ret < 0)
|
+ fpath = must_make_path(path, "cpus", NULL);
|
||||||
return log_error_errno(false,
|
ret = lxc_write_to_file(fpath, cpulist, strlen(cpulist), false, 0666);
|
||||||
- errno, "Failed to write cpu list to \"%s/cpuset.cpus\"",
|
if (ret < 0) {
|
||||||
+ errno, "Failed to write cpu list to \"%s/cpus\"",
|
SYSERROR("Failed to write cpu list to \"%s\"", fpath);
|
||||||
child_cgroup);
|
@@ -606,7 +606,7 @@
|
||||||
|
return false;
|
||||||
TRACE("Copied cpu settings of parent cgroup");
|
}
|
||||||
@@ -542,7 +542,7 @@
|
|
||||||
if (ret < 0)
|
|
||||||
return log_error_errno(-1, errno, "Failed to read file \"%s/cgroup.clone_children\"", child_cgroup);
|
|
||||||
|
|
||||||
- /* Make sure any isolated cpus are removed from cpuset.cpus. */
|
- /* Make sure any isolated cpus are removed from cpuset.cpus. */
|
||||||
+ /* Make sure any isolated cpus are removed from cpus. */
|
+ /* Make sure any isolated cpus are removed from cpus. */
|
||||||
if (!cg_legacy_filter_and_set_cpus(parent_cgroup, child_cgroup, v == '1'))
|
if (!cg_legacy_filter_and_set_cpus(cgpath, v == '1')) {
|
||||||
return log_error_errno(-1, errno, "Failed to remove isolated cpus");
|
SYSERROR("Failed to remove isolated cpus");
|
||||||
|
free(clonechildrenpath);
|
||||||
@@ -551,8 +551,8 @@
|
@@ -623,8 +623,8 @@
|
||||||
TRACE("\"cgroup.clone_children\" was already set to \"1\"");
|
}
|
||||||
|
|
||||||
/* copy parent's settings */
|
/* copy parent's settings */
|
||||||
- if (!copy_parent_file(parent_cgroup, child_cgroup, "cpuset.mems"))
|
- if (!copy_parent_file(cgpath, "cpuset.mems")) {
|
||||||
- return log_error_errno(-1, errno, "Failed to copy \"cpuset.mems\" settings");
|
- SYSERROR("Failed to copy \"cpuset.mems\" settings");
|
||||||
+ if (!copy_parent_file(parent_cgroup, child_cgroup, "mems"))
|
+ if (!copy_parent_file(cgpath, "mems")) {
|
||||||
+ return log_error_errno(-1, errno, "Failed to copy \"mems\" settings");
|
+ SYSERROR("Failed to copy \"mems\" settings");
|
||||||
|
free(cgpath);
|
||||||
/* Set clone_children so children inherit our settings */
|
free(clonechildrenpath);
|
||||||
ret = lxc_writeat(cgroup_fd, "cgroup.clone_children", "1", 1);
|
return false;
|
||||||
@@ -653,7 +653,7 @@
|
@@ -742,7 +742,7 @@
|
||||||
* verify /sys/fs/cgroup/ in this field.
|
* verify /sys/fs/cgroup/ in this field.
|
||||||
*/
|
*/
|
||||||
if (strncmp(p, DEFAULT_CGROUP_MOUNTPOINT "/", 15) != 0)
|
if (strncmp(p, "/sys/fs/cgroup/", 15) != 0) {
|
||||||
- return log_error(NULL, "Found hierarchy not under " DEFAULT_CGROUP_MOUNTPOINT ": \"%s\"", p);
|
- ERROR("Found hierarchy not under /sys/fs/cgroup: \"%s\"", p);
|
||||||
+ return log_warn(NULL, "Found hierarchy not under " DEFAULT_CGROUP_MOUNTPOINT ": \"%s\"", p);
|
+ WARN("Found hierarchy not under /sys/fs/cgroup: \"%s\"", p);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
p += 15;
|
|
||||||
p2 = strchr(p, ' ');
|
|
||||||
|
Loading…
Reference in New Issue
Block a user