summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoan Bruguera2022-03-22 22:19:46 +0100
committerJoan Bruguera2022-03-22 23:36:05 +0100
commit4a1f86460bd10e99a0710a8561017bf29ee8cd38 (patch)
tree915d0debef3e0cc5cf317de6ca89811c90b6fd7a
downloadaur-4a1f86460bd10e99a0710a8561017bf29ee8cd38.tar.gz
Initial commit.
-rw-r--r--.SRCINFO43
-rw-r--r--PKGBUILD80
-rw-r--r--install.sh26
3 files changed, 149 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..faab6a5af1dd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,43 @@
+pkgbase = sysbox-ce-git
+ pkgdesc = Container runtime with VM-like isolation (run Systemd, Docker, K8s in containers)
+ pkgver = r1500.4c3c20b
+ pkgrel = 1
+ url = https://github.com/nestybox/sysbox
+ install = install.sh
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ makedepends = go
+ makedepends = protobuf
+ makedepends = protobuf-go
+ makedepends = lsb-release
+ makedepends = inetutils
+ depends = rsync
+ depends = fuse2
+ optdepends = shiftfs: Operation without userns-remap
+ provides = sysbox-ce
+ conflicts = sysbox-ce
+ source = https://downloads.nestybox.com/sysbox/releases/v0.4.1/sysbox-ce_0.4.1-0.debian-buster_amd64.deb
+ source = git+https://github.com/nestybox/sysbox.git
+ source = git+https://github.com/nestybox/dockerfiles.git
+ source = git+https://github.com/nestybox/sysbox-fs.git
+ source = git+https://github.com/nestybox/fuse.git
+ source = git+https://github.com/nestybox/sysbox-ipc.git
+ source = git+https://github.com/nestybox/sysbox-libs.git
+ source = git+https://github.com/nestybox/libseccomp.git
+ source = git+https://github.com/nestybox/libseccomp-golang.git
+ source = git+https://github.com/nestybox/sysbox-mgr.git
+ source = git+https://github.com/nestybox/sysbox-runc.git
+ sha256sums = bd96866b52821338a859586f5e5bbf6954d56181e9ef77ab0fb9d05127e9bf97
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = sysbox-ce-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..29914cef54de
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Joan Bruguera Micó <joanbrugueram@gmail.com>
+pkgname=sysbox-ce-git
+pkgver=r1500.4c3c20b
+miscfiles_pkgver=0.4.1
+pkgrel=1
+pkgdesc="Container runtime with VM-like isolation (run Systemd, Docker, K8s in containers)"
+url="https://github.com/nestybox/sysbox"
+arch=('x86_64')
+license=('Apache')
+source=("https://downloads.nestybox.com/sysbox/releases/v${miscfiles_pkgver}/sysbox-ce_${miscfiles_pkgver}-0.debian-buster_amd64.deb"
+ "git+https://github.com/nestybox/sysbox.git"
+ "git+https://github.com/nestybox/dockerfiles.git"
+ "git+https://github.com/nestybox/sysbox-fs.git"
+ "git+https://github.com/nestybox/fuse.git"
+ "git+https://github.com/nestybox/sysbox-ipc.git"
+ "git+https://github.com/nestybox/sysbox-libs.git"
+ "git+https://github.com/nestybox/libseccomp.git"
+ "git+https://github.com/nestybox/libseccomp-golang.git"
+ "git+https://github.com/nestybox/sysbox-mgr.git"
+ "git+https://github.com/nestybox/sysbox-runc.git")
+sha256sums=('bd96866b52821338a859586f5e5bbf6954d56181e9ef77ab0fb9d05127e9bf97'
+ 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
+install=install.sh
+provides=('sysbox-ce')
+conflicts=('sysbox-ce')
+depends=('rsync' 'fuse2')
+makedepends=('git' 'go' 'protobuf' 'protobuf-go')
+# Those next makedepends are not *actually* needed but the build process tries to launch them anyway
+makedepends+=('lsb-release' 'inetutils')
+optdepends=('shiftfs: Operation without userns-remap')
+
+pkgver() {
+ cd sysbox
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ # Hook up submodules
+ git -C sysbox submodule init
+ git -C sysbox config submodule.sysbox-dockerfiles.url "$srcdir/dockerfiles"
+ git -C sysbox config submodule.sysbox-fs.url "$srcdir/sysbox-fs"
+ git -C sysbox config submodule.sysbox-ipc.url "$srcdir/sysbox-ipc"
+ git -C sysbox config submodule.sysbox-libs.url "$srcdir/sysbox-libs"
+ git -C sysbox config submodule.sysbox-mgr.url "$srcdir/sysbox-mgr"
+ git -C sysbox config submodule.sysbox-runc.url "$srcdir/sysbox-runc"
+ git -C sysbox submodule update
+
+ git -C sysbox/sysbox-fs submodule init
+ git -C sysbox/sysbox-fs config submodule.bazil.url "$srcdir/fuse"
+ git -C sysbox/sysbox-fs submodule update
+
+ git -C sysbox/sysbox-libs submodule init
+ git -C sysbox/sysbox-libs config submodule.libseccomp.url "$srcdir/libseccomp"
+ git -C sysbox/sysbox-libs config submodule.libseccomp-golang.url "$srcdir/libseccomp-golang"
+ git -C sysbox/sysbox-libs submodule update
+
+ # Get some non-binary files from the Debian package as they don't seem to be uploaded anywhere else
+ mkdir -p data
+ tar xf data.tar.xz -C data
+}
+
+build() {
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+ make -C sysbox sysbox-local
+}
+
+package() {
+ make -C sysbox DESTDIR="${pkgdir}/usr/bin" install
+
+ cd "data"
+ (cd usr/lib/modules-load.d && find . -type f -exec install -Dm644 "{}" "${pkgdir}/usr/lib/modules-load.d/{}" \; )
+ (cd lib/sysctl.d && find . -type f -exec install -Dm644 "{}" "${pkgdir}/usr/lib/sysctl.d/{}" \; )
+ (cd lib/systemd && find . -type f -exec install -Dm644 "{}" "${pkgdir}/usr/lib/systemd/{}" \; )
+ (cd usr/share/doc && find . -type f -exec install -Dm644 "{}" "${pkgdir}/usr/share/doc/{}" \; )
+}
diff --git a/install.sh b/install.sh
new file mode 100644
index 000000000000..de6b6635e70f
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env sh
+
+post_install() {
+ echo '------------------------'
+ echo '| READ VERY CAREFULLY! |'
+ echo '------------------------'
+ echo '1. Make sure to start the sysbox service (systemctl start sysbox)'
+ echo ''
+ echo '2. To use sysbox with Docker, add the following to /etc/docker/daemon.json:'
+ echo '{'
+ echo ' "runtimes": {'
+ echo ' "sysbox-runc": {'
+ echo ' "path": "/usr/bin/sysbox-runc",'
+ echo ' "runtimeArgs": ["--no-kernel-check"]'
+ echo ' }'
+ echo ' }'
+ echo '}'
+ echo 'Then restart the docker service (systemctl restart docker)'
+ echo ''
+ echo '3. You will need to either install the shiftfs kernel module,'
+ echo ' or configure Docker in userns-remap mode (see link below)'
+ echo ''
+ echo 'Note that Arch Linux is NOT officially supported.'
+ echo 'For more information, please check:'
+ echo 'https://github.com/nestybox/sysbox/blob/master/docs/user-guide/troubleshoot.md'
+}