summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mettke2017-02-03 06:44:48 +0100
committerMarc Mettke2017-02-03 06:49:50 +0100
commitf6ab07e4235f06f044122942e5410a83fbe31d30 (patch)
treebcf14fa25224496e62546cc69d41299acfa57795
downloadaur-f6ab07e4235f06f044122942e5410a83fbe31d30.tar.gz
[lxc-selinux] 1:2.0.7-1
-rw-r--r--.SRCINFO43
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD92
-rw-r--r--lxc-auto.service13
-rw-r--r--lxc.service13
-rw-r--r--lxc.tmpfiles.d1
6 files changed, 169 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..8ee61808dbc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,43 @@
+pkgbase = lxc-selinux
+ pkgdesc = Linux Containers
+ pkgver = 2.0.7
+ pkgrel = 1
+ epoch = 1
+ url = http://linuxcontainers.org
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ makedepends = docbook2x
+ makedepends = lua
+ depends = bash
+ depends = perl
+ depends = libseccomp
+ depends = libcap
+ depends = python
+ depends = cgmanager
+ depends = rsync
+ depends = libselinux
+ optdepends = arch-install-scripts: for archlinux template
+ optdepends = dnsmasq: lxc-net.service
+ optdepends = lua
+ optdepends = lua-filesystem: lxc-top
+ optdepends = lua-alt-getopt: lxc-top
+ provides = lxc=2.0.7-1
+ conflicts = lxc
+ options = emptydirs
+ backup = etc/lxc/default.conf
+ backup = etc/default/lxc
+ source = https://linuxcontainers.org/downloads/lxc-selinux-2.0.7.tar.gz
+ source = https://linuxcontainers.org/downloads/lxc-selinux-2.0.7.tar.gz.asc
+ source = lxc.tmpfiles.d
+ source = lxc.service
+ source = lxc-auto.service
+ validpgpkeys = 602F567663E593BCBD14F338C638974D64792D67
+ sha256sums = 1c09c075f06ec029f86fa6370c7d379494ff4c66a129eda17af7b7b41e055f5d
+ sha256sums = SKIP
+ sha256sums = 10e4f661872f773bf3122a2f9f2cb13344fea86a4ab72beecb4213be4325c479
+ sha256sums = 711fb84c87b143cb0098e095fdebb040b15f553a854efbe846a00100bdb9ae88
+ sha256sums = 4174fcc0a664108f1884920930a3dbec0aeceed1fc24f00c200a583c06d447d0
+
+pkgname = lxc-selinux
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..8cad2d9a0b1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*
+!.gitignore
+!.SRCINFO
+!lxc-auto.service
+!lxc.service
+!lxc.tmpfiles.d
+!PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..74b57a7f1c5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,92 @@
+# $Id$
+# Maintainer: 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>
+# SELinux Maintainer: Marc Mettke (marc@itmettke.de)
+
+pkgname=lxc-selinux
+epoch=1
+pkgver=2.0.7
+pkgrel=1
+pkgdesc="Linux Containers"
+arch=('i686' 'x86_64')
+url="http://linuxcontainers.org"
+depends=('bash' 'perl' 'libseccomp' 'libcap' 'python' 'cgmanager' 'rsync' 'libselinux')
+provides=("${pkgname/-selinux}=${pkgver}-${pkgrel}")
+conflicts=("${pkgname/-selinux}")
+makedepends=('docbook2x' 'lua')
+optdepends=('arch-install-scripts: for archlinux template'
+ '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-${pkgver}.tar.gz"{,.asc}
+ "lxc.tmpfiles.d"
+ "lxc.service"
+ "lxc-auto.service")
+sha256sums=('1c09c075f06ec029f86fa6370c7d379494ff4c66a129eda17af7b7b41e055f5d'
+ 'SKIP'
+ '10e4f661872f773bf3122a2f9f2cb13344fea86a4ab72beecb4213be4325c479'
+ '711fb84c87b143cb0098e095fdebb040b15f553a854efbe846a00100bdb9ae88'
+ '4174fcc0a664108f1884920930a3dbec0aeceed1fc24f00c200a583c06d447d0')
+
+prepare() {
+ cd "$srcdir/$pkgname-${pkgver/_/-}"
+ sed -i \
+ -e 's|"\\"-//Davenport//DTD DocBook V3.0//EN\\""|"\\"-//OASIS//DTD DocBook XML\\"
+\\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\\""|' \
+ configure.ac
+ sed -i \
+ -e 's|$(sysconfdir)/bash_completion.d/|/usr/share/bash-completion/completions/|g' \
+ config/bash/Makefile.am
+ sed -i \
+ -e 's|\${prefix}/||g' \
+ lxc.pc.in
+ sed -i \
+ -e "s|name='_lxc'|name='lxc'|" \
+ src/python-lxc/setup.py.in
+}
+
+build() {
+ cd "$srcdir/$pkgname-${pkgver/_/-}"
+ ./autogen.sh
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib \
+ --libdir=/usr/lib \
+ --sysconfdir=/etc \
+ --disable-apparmor \
+ --enable-selinux \
+ --enable-seccomp \
+ --enable-cgmanager \
+ --enable-capabilities \
+ --enable-lua \
+ --with-init-script=systemd \
+ --with-systemdsystemunitdir=/usr/lib/systemd/system
+ 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 00000000000..ac93e5603eb
--- /dev/null
+++ b/lxc-auto.service
@@ -0,0 +1,13 @@
+[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
+
+[Install]
+WantedBy=multi-user.target
diff --git a/lxc.service b/lxc.service
new file mode 100644
index 00000000000..c82307a73cd
--- /dev/null
+++ b/lxc.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=%i LXC
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/lxc-start -d -n %i
+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 00000000000..04bac4db458
--- /dev/null
+++ b/lxc.tmpfiles.d
@@ -0,0 +1 @@
+w /sys/fs/cgroup/memory/memory.use_hierarchy - - - - 1