mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
added community/lxc
This commit is contained in:
parent
e5b7911d5c
commit
b7a26b3def
4 changed files with 98 additions and 0 deletions
69
community/lxc/PKGBUILD
Normal file
69
community/lxc/PKGBUILD
Normal file
|
@ -0,0 +1,69 @@
|
|||
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
|
||||
# Maintainer: Morten Linderud <foxboron@archlinux.org>
|
||||
# Contributor: Andrea Zucchelli <zukka77@gmail.com>
|
||||
# Contributor: Daniel Micay <danielmicay@gmail.com>
|
||||
# Contributor: Jonathan Liu <net147@gmail.com>
|
||||
# Contributor: Jon Nordby <jononor@gmail.com>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - upstream PR to fix FTBFS on ARM
|
||||
|
||||
pkgname=lxc
|
||||
epoch=1
|
||||
pkgver=5.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="Linux Containers"
|
||||
arch=('x86_64')
|
||||
url="https://linuxcontainers.org"
|
||||
depends=('bash' 'perl' 'libseccomp' 'libcap' 'python' 'rsync' 'wget')
|
||||
makedepends=('docbook2x' 'systemd' 'meson' 'lua' 'python-setuptools' 'apparmor')
|
||||
optdepends=('dnsmasq: lxc-net.service'
|
||||
'lua'
|
||||
'lua-filesystem: lxc-top'
|
||||
'lua-alt-getopt: lxc-top')
|
||||
license=('LGPL')
|
||||
options=('emptydirs' 'debug')
|
||||
backup=('etc/lxc/default.conf'
|
||||
'etc/default/lxc')
|
||||
validpgpkeys=('602F567663E593BCBD14F338C638974D64792D67')
|
||||
source=("https://linuxcontainers.org/downloads/lxc/$pkgname-${pkgver}.tar.gz"{,.asc}
|
||||
"https://patch-diff.githubusercontent.com/raw/lxc/lxc/pull/4187.patch"
|
||||
"lxc.tmpfiles.d"
|
||||
"lxc.service"
|
||||
"lxc-auto.service")
|
||||
sha256sums=('d8195423bb1e206f8521d24b6cde4789f043960c7cf065990a9cf741dcfd4222'
|
||||
'SKIP'
|
||||
'cd66dee51d8f693c45d24e7bf01e237c55fc2855c04ad06f3ca18b969320d720'
|
||||
'10e4f661872f773bf3122a2f9f2cb13344fea86a4ab72beecb4213be4325c479'
|
||||
'bbe7e0447bc3bf5f75f312c34d647f5218024731628a5e8633b1ea1801ebe16b'
|
||||
'b31f8d6b301ab9901b43f2696bcd0babb32b96e4a59fab63a2d642e43bf26bb3')
|
||||
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-${pkgver/_/-}"
|
||||
sed -i "s|if sanitize == 'none'|if false|g" src/lxc/cmd/meson.build
|
||||
patch -p1 -i ../4187.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname-${pkgver/_/-}"
|
||||
arch-meson build
|
||||
meson compile -C build -v
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-${pkgver/_/-}"
|
||||
|
||||
meson install -C build --destdir "$pkgdir"
|
||||
|
||||
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/{}" \;
|
||||
}
|
14
community/lxc/lxc-auto.service
Normal file
14
community/lxc/lxc-auto.service
Normal file
|
@ -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
|
14
community/lxc/lxc.service
Normal file
14
community/lxc/lxc.service
Normal file
|
@ -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
|
1
community/lxc/lxc.tmpfiles.d
Normal file
1
community/lxc/lxc.tmpfiles.d
Normal file
|
@ -0,0 +1 @@
|
|||
w /sys/fs/cgroup/memory/memory.use_hierarchy - - - - 1
|
Loading…
Reference in a new issue