* add lxc
This commit is contained in:
parent
eb9635515a
commit
4ca7cc27eb
84
lxc/PKGBUILD
Normal file
84
lxc/PKGBUILD
Normal file
@ -0,0 +1,84 @@
|
||||
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
||||
# 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>
|
||||
|
||||
pkgname=lxc
|
||||
epoch=1
|
||||
pkgver=3.2.1
|
||||
pkgrel=1
|
||||
pkgdesc="Linux Containers"
|
||||
arch=(x86_64 powerpc64le)
|
||||
url="https://linuxcontainers.org"
|
||||
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-${pkgver}.tar.gz"{,.asc}
|
||||
"lxc.tmpfiles.d"
|
||||
"lxc.service"
|
||||
"lxc-auto.service")
|
||||
sha256sums=('5f903986a4b17d607eea28c0aa56bf1e76e8707747b1aa07d31680338b1cc3d4'
|
||||
'SKIP'
|
||||
'10e4f661872f773bf3122a2f9f2cb13344fea86a4ab72beecb4213be4325c479'
|
||||
'711fb84c87b143cb0098e095fdebb040b15f553a854efbe846a00100bdb9ae88'
|
||||
'4174fcc0a664108f1884920930a3dbec0aeceed1fc24f00c200a583c06d447d0')
|
||||
|
||||
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
|
||||
sed -i \
|
||||
-e 's|\${prefix}/||g' \
|
||||
lxc.pc.in
|
||||
sed -i \
|
||||
-e 's|dirlen,|dirlen=0,|' \
|
||||
src/lxc/storage/overlay.c
|
||||
# patch -p1 <"$srcdir"/71174d464fd3798a181d7768441f80f1952d93e9.patch
|
||||
}
|
||||
|
||||
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 \
|
||||
--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/{}" \;
|
||||
}
|
13
lxc/lxc-auto.service
Normal file
13
lxc/lxc-auto.service
Normal file
@ -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
|
13
lxc/lxc.service
Normal file
13
lxc/lxc.service
Normal file
@ -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
|
1
lxc/lxc.tmpfiles.d
Normal file
1
lxc/lxc.tmpfiles.d
Normal file
@ -0,0 +1 @@
|
||||
w /sys/fs/cgroup/memory/memory.use_hierarchy - - - - 1
|
Loading…
x
Reference in New Issue
Block a user