summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMubashshir2021-06-02 21:22:27 +0600
committerMubashshir2021-06-02 21:22:27 +0600
commit3575e9088f8e5c2bfb949d460cf03073a3a9234d (patch)
treeb001dc7c6302f0d9cfcc26569e265cdb3a61d617
downloadaur-3575e9088f8e5c2bfb949d460cf03073a3a9234d.tar.gz
Init
-rw-r--r--.SRCINFO41
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD79
-rw-r--r--lxc-auto.service14
-rw-r--r--lxc.service14
-rw-r--r--lxc.tmpfiles.d1
6 files changed, 155 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ca06d256fff1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,41 @@
+pkgbase = lxc-anbox
+ pkgdesc = Linux Containers
+ pkgver = 4.0.6
+ pkgrel = 1
+ url = https://linuxcontainers.org
+ arch = x86_64
+ license = LGPL
+ makedepends = docbook2x
+ makedepends = lua
+ makedepends = python-setuptools
+ makedepends = apparmor
+ depends = bash
+ depends = perl
+ depends = libseccomp
+ depends = libcap
+ depends = python
+ depends = rsync
+ depends = wget
+ optdepends = dnsmasq: lxc-net.service
+ optdepends = lua
+ optdepends = lua-filesystem: lxc-top
+ optdepends = lua-alt-getopt: lxc-top
+ provides = lxc=1:4.0.6
+ conflicts = lxc
+ conflicts = lxc-git
+ options = emptydirs
+ backup = etc/lxc/default.conf
+ backup = etc/default/lxc
+ source = https://linuxcontainers.org/downloads/lxc/lxc-4.0.6.tar.gz
+ source = https://linuxcontainers.org/downloads/lxc/lxc-4.0.6.tar.gz.asc
+ source = lxc.tmpfiles.d
+ source = lxc.service
+ source = lxc-auto.service
+ validpgpkeys = 602F567663E593BCBD14F338C638974D64792D67
+ sha256sums = 9165dabc0bb6ef7f2fda2009aee90b20fbefe77ed8008347e9f06048eba1e463
+ sha256sums = SKIP
+ sha256sums = 10e4f661872f773bf3122a2f9f2cb13344fea86a4ab72beecb4213be4325c479
+ sha256sums = bbe7e0447bc3bf5f75f312c34d647f5218024731628a5e8633b1ea1801ebe16b
+ sha256sums = b31f8d6b301ab9901b43f2696bcd0babb32b96e4a59fab63a2d642e43bf26bb3
+
+pkgname = lxc-anbox
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..5ffe3580c76a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*
+!.SRCINFO
+!PKGBUILD
+!lxc-auto.service
+!lxc.service
+!lxc.tmpfiles.d
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..412034062989
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,79 @@
+# Maintainer: Mubashshir <ahmubashshir@gmail.com>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Andrea Zucchelli <zukka77@gmail.com>
+# Contributor: Daniel Micay <danielmicay@gmail.com>
+# Contributor: Jonathan Liu <net147@gmail.com>
+# Contributor: Jon Nordby <jononor@gmail.com>
+
+pkgname=lxc-anbox
+pkgver=4.0.6
+pkgrel=1
+pkgdesc="Linux Containers"
+arch=('x86_64')
+url="https://linuxcontainers.org"
+provides=('lxc=1:4.0.6')
+conflicts=('lxc' 'lxc-git')
+depends=('bash' 'perl' 'libseccomp' 'libcap' 'python' 'rsync' 'wget')
+makedepends=('docbook2x' 'lua' 'python-setuptools' 'apparmor')
+optdepends=('dnsmasq: lxc-net.service'
+ 'lua'
+ 'lua-filesystem: lxc-top'
+ 'lua-alt-getopt: lxc-top')
+license=('LGPL')
+options=('emptydirs')
+backup=('etc/lxc/default.conf'
+ 'etc/default/lxc')
+validpgpkeys=('602F567663E593BCBD14F338C638974D64792D67')
+source=("https://linuxcontainers.org/downloads/${pkgname%-*}/${pkgname%-*}-${pkgver}.tar.gz"{,.asc}
+ "lxc.tmpfiles.d"
+ "lxc.service"
+ "lxc-auto.service")
+sha256sums=('9165dabc0bb6ef7f2fda2009aee90b20fbefe77ed8008347e9f06048eba1e463'
+ 'SKIP'
+ '10e4f661872f773bf3122a2f9f2cb13344fea86a4ab72beecb4213be4325c479'
+ 'bbe7e0447bc3bf5f75f312c34d647f5218024731628a5e8633b1ea1801ebe16b'
+ 'b31f8d6b301ab9901b43f2696bcd0babb32b96e4a59fab63a2d642e43bf26bb3')
+
+prepare() {
+ cd "$srcdir/${pkgname%-*}-${pkgver/_/-}"
+ sed -i \
+ -e 's|"\\"-//Davenport//DTD DocBook V3.0//EN\\""|"\\"-//OASIS//DTD DocBook XML\\" \\"https://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\\""|' \
+ configure.ac
+}
+
+build() {
+ cd "$srcdir/${pkgname%-*}-${pkgver/_/-}"
+ ./autogen.sh
+ bashcompdir=/usr/share/bash-completion/completions ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib \
+ --libdir=/usr/lib \
+ --sysconfdir=/etc \
+ --enable-apparmor \
+ --enable-seccomp \
+ --enable-capabilities \
+ --with-init-script=systemd \
+ --with-systemdsystemunitdir=/usr/lib/systemd/system \
+ --enable-pam \
+ --disable-werror \
+ --with-pamdir=/usr/lib/security
+ make
+}
+
+package() {
+ cd "$srcdir/${pkgname%-*}-${pkgver/_/-}"
+
+ make DESTDIR="$pkgdir" install
+ install -d -m755 "$pkgdir/var/lib/lxc"
+ install -d -m755 "$pkgdir/usr/lib/lxc/rootfs/dev"
+ install -D -m644 "$srcdir"/lxc.service "$pkgdir"/usr/lib/systemd/system/lxc@.service
+ install -D -m644 "$srcdir"/lxc-auto.service "$pkgdir"/usr/lib/systemd/system/lxc-auto.service
+ install -D -m644 "$srcdir"/lxc.tmpfiles.d "$pkgdir"/usr/lib/tmpfiles.d/lxc.conf
+
+ cd doc
+ find . -type f -name '*.1' -exec install -D -m644 "{}" "$pkgdir/usr/share/man/man1/{}" \;
+ find . -type f -name '*.5' -exec install -D -m644 "{}" "$pkgdir/usr/share/man/man5/{}" \;
+ find . -type f -name '*.7' -exec install -D -m644 "{}" "$pkgdir/usr/share/man/man7/{}" \;
+}
diff --git a/lxc-auto.service b/lxc-auto.service
new file mode 100644
index 000000000000..01b9a6d81857
--- /dev/null
+++ b/lxc-auto.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Autostart LXC Container
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/lxc-autostart
+ExecStop=/usr/bin/lxc-autostart -s
+Delegate=true
+TasksMax=32768
+RemainAfterExit=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/lxc.service b/lxc.service
new file mode 100644
index 000000000000..6feb68006ec5
--- /dev/null
+++ b/lxc.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=%i LXC
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/lxc-start -d -n %i -p /run/lxc-%i.pid
+PIDFile=/run/lxc-%i.pid
+ExecStop=/usr/bin/lxc-stop -n %i
+Delegate=true
+TasksMax=32768
+
+[Install]
+WantedBy=multi-user.target
diff --git a/lxc.tmpfiles.d b/lxc.tmpfiles.d
new file mode 100644
index 000000000000..04bac4db4581
--- /dev/null
+++ b/lxc.tmpfiles.d
@@ -0,0 +1 @@
+w /sys/fs/cgroup/memory/memory.use_hierarchy - - - - 1