new package: lxc

This commit is contained in:
Leonid Plyushch 2019-07-13 19:21:43 +03:00 committed by Yaksh Bariya
parent a487be9d3d
commit 45882652f9
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
6 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,17 @@
TERMUX_PKG_HOMEPAGE=http://linuxcontainers.org/
TERMUX_PKG_DESCRIPTION="Linux Containers"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
TERMUX_PKG_VERSION=3.1.0
TERMUX_PKG_SRCURL=https://linuxcontainers.org/downloads/lxc-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=4d8772c25baeaea2c37a954902b88c05d1454c91c887cb6a0997258cfac3fdc5
TERMUX_PKG_DEPENDS="dirmngr, gnupg, libcap, rsync, wget"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-distro=termux
--with-runtime-path=$TERMUX_PREFIX/var/run
"
termux_step_pre_configure() {
export LIBS="-llog"
}

View File

@ -0,0 +1,11 @@
diff -uNr lxc-3.1.0/src/include/lxcmntent.c lxc-3.1.0.mod/src/include/lxcmntent.c
--- lxc-3.1.0/src/include/lxcmntent.c 2018-12-14 01:13:51.000000000 +0200
+++ lxc-3.1.0.mod/src/include/lxcmntent.c 2019-07-13 19:04:12.908102863 +0300
@@ -25,6 +25,7 @@
#include <mntent.h>
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
#include "../lxc/macro.h"
/* Since the values in a line are separated by spaces, a name cannot

View File

@ -0,0 +1,11 @@
diff -uNr lxc-3.1.0/src/lxc/conf.c lxc-3.1.0.mod/src/lxc/conf.c
--- lxc-3.1.0/src/lxc/conf.c 2018-12-14 01:13:51.000000000 +0200
+++ lxc-3.1.0.mod/src/lxc/conf.c 2019-07-13 19:02:58.727793440 +0300
@@ -4104,6 +4104,7 @@
free(conf->init_cmd);
free(conf->init_cwd);
free(conf->unexpanded_config);
+#undef syslog
free(conf->syslog);
lxc_free_networks(&conf->network);
free(conf->lsm_aa_profile);

View File

@ -0,0 +1,15 @@
diff -uNr lxc-3.1.0/templates/lxc-download.in lxc-3.1.0.mod/templates/lxc-download.in
--- lxc-3.1.0/templates/lxc-download.in 2018-12-14 01:13:51.000000000 +0200
+++ lxc-3.1.0.mod/templates/lxc-download.in 2019-07-13 19:44:31.096490724 +0300
@@ -312,10 +312,7 @@
# Trap all exit signals
trap cleanup EXIT HUP INT TERM
-# /tmp may be mounted in tmpfs or noexec
-if mountpoint -q /tmp; then
- DOWNLOAD_TEMP="${LXC_PATH}"
-fi
+DOWNLOAD_TEMP="${LXC_PATH}"
if ! command -V mktemp >/dev/null 2>&1; then
DOWNLOAD_TEMP="${DOWNLOAD_TEMP}/tmp/lxc-download.$$"

View File

@ -0,0 +1,12 @@
diff -uNr lxc-3.1.0/templates/lxc-local.in lxc-3.1.0.mod/templates/lxc-local.in
--- lxc-3.1.0/templates/lxc-local.in 2018-12-14 01:13:51.000000000 +0200
+++ lxc-3.1.0.mod/templates/lxc-local.in 2019-07-13 19:37:11.128180850 +0300
@@ -146,7 +146,7 @@
# Create temporary directory to
if ! command -V mktemp >/dev/null 2>&1; then
- LOCAL_TEMP=/tmp/lxc-local.$$
+ LOCAL_TEMP=@TERMUX_PREFIX@/tmp/lxc-local.$$
mkdir -p "${LOCAL_TEMP}"
else
LOCAL_TEMP=$(mktemp -d)

View File

@ -0,0 +1,12 @@
diff -uNr lxc-3.1.0/templates/lxc-oci.in lxc-3.1.0.mod/templates/lxc-oci.in
--- lxc-3.1.0/templates/lxc-oci.in 2018-12-14 01:13:51.000000000 +0200
+++ lxc-3.1.0.mod/templates/lxc-oci.in 2019-07-13 19:37:43.884968892 +0300
@@ -291,7 +291,7 @@
DOWNLOAD_BASE="${LOCALSTATEDIR}/cache/lxc"
fi
else
- DOWNLOAD_BASE=/tmp
+ DOWNLOAD_BASE=@TERMUX_PREFIX@/tmp
fi
mkdir -p "${DOWNLOAD_BASE}"