aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawrkbait <sjohnson@axiomega.com>2018-10-09 13:55:30 -0500
committerLeo <thinkabit.ukim@gmail.com>2019-06-14 11:38:26 -0300
commit1874d82fc679aa7971980674adb504990b160105 (patch)
tree117b980d11a3a41fde199c38b543e5e276dde8c9
parent7f88679db793d27e0a94b78a1c19b784426744e3 (diff)
downloadaports-1874d82fc679aa7971980674adb504990b160105.tar.gz
aports-1874d82fc679aa7971980674adb504990b160105.tar.bz2
aports-1874d82fc679aa7971980674adb504990b160105.tar.xz
testing/bwrap-oci: new aport
https://github.com/projectatomic/bwrap-oci Run an OCI container using Bubblewrap
-rw-r--r--testing/bwrap-oci/APKBUILD39
-rw-r--r--testing/bwrap-oci/musl.patch116
2 files changed, 155 insertions, 0 deletions
diff --git a/testing/bwrap-oci/APKBUILD b/testing/bwrap-oci/APKBUILD
new file mode 100644
index 0000000000..4e1515bf93
--- /dev/null
+++ b/testing/bwrap-oci/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Shawn Johnson <sjohnson@axiomega.com>
+# Maintainer: Shawn Johnson <sjohnson@axiomega.com>
+pkgname=bwrap-oci
+pkgver=0.2
+pkgrel=0
+pkgdesc="Run an OCI container using Bubblewrap"
+url="https://github.com/projectatomic/bwrap-oci"
+arch="all"
+license="LGPL-2.0-or-later"
+options="!check" # there is no test suite/unit tests
+makedepends="autoconf automake libcap-dev json-glib-dev libseccomp-dev docbook-xsl"
+depends="bubblewrap"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/projectatomic/bwrap-oci/archive/$pkgname-$pkgver.tar.gz
+ musl.patch"
+builddir="$srcdir/$pkgname-$pkgname-$pkgver"
+
+prepare() {
+ default_prepare
+ NOCONFIGURE=1 ./autogen.sh
+}
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var
+ make
+}
+
+package() {
+ make install DESTDIR="$pkgdir"
+}
+
+sha512sums="28b7dc753650ccaa5aca84d37d4a7e8ff21ad6b16321c17a4b41dbd3537ed578ec8a350b5da14afce176d56524640abde976d53f022662dcb89125c684581013 bwrap-oci-0.2.tar.gz
+2baea5576fdcaf7ae4d37e212d2084f466ad8a1d3e265c2087404e11fb2453c94a0e70d33c8ceeb5557810f8766f5c0117473a320c5bfca7d151d76b5d34af67 musl.patch"
diff --git a/testing/bwrap-oci/musl.patch b/testing/bwrap-oci/musl.patch
new file mode 100644
index 0000000000..7b95dc78b2
--- /dev/null
+++ b/testing/bwrap-oci/musl.patch
@@ -0,0 +1,116 @@
+diff --git a/bwrap-oci.c b/bwrap-oci.c
+index a37fea1..1686b0d 100644
+--- a/bwrap-oci.c
++++ b/bwrap-oci.c
+@@ -19,7 +19,9 @@
+ #include <config.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#ifdef HAVE_ERROR_H
+ #include <error.h>
++#endif
+ #include <stdio.h>
+ #include <glib.h>
+ #include <glib-object.h>
+diff --git a/configure.ac b/configure.ac
+index db26633..9b37286 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -18,10 +18,32 @@ PKG_CHECK_MODULES(JSON_GLIB, [json-glib-1.0])
+ PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0])
+ AC_CHECK_LIB(seccomp, seccomp_rule_add)
+
++AC_CHECK_HEADERS([error.h])
++
+ AC_PATH_PROG(BWRAP, [bwrap])
+ AC_DEFINE_UNQUOTED([BWRAP], ["$BWRAP"], [Path to bwrap])
+
+ AC_CONFIG_FILES([
+ Makefile
+ ])
++
++AH_BOTTOM([
++#ifndef HAVE_ERROR_H
++#ifndef _ERROR_LOCAL
++#define _ERROR_LOCAL 1
++#include <string.h>
++#include <stdio.h>
++#include <stdlib.h>
++
++static void error(int status, int errnum, const char *msg, ...) {
++ if (errnum)
++ fprintf(stderr, ": %s\n", strerror(errnum));
++ else
++ fputc('\n', stderr);
++ if (status)
++ exit(status);
++}
++#endif
++#endif
++])
+ AC_OUTPUT
+diff --git a/kill.c b/kill.c
+index c180098..03527ce 100644
+--- a/kill.c
++++ b/kill.c
+@@ -19,7 +19,9 @@
+ #include <config.h>
+ #include "util.h"
+ #include "kill.h"
++#ifdef HAVE_ERROR_H
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+
+diff --git a/list.c b/list.c
+index f0260ec..6b216a1 100644
+--- a/list.c
++++ b/list.c
+@@ -19,7 +19,9 @@
+ #include <config.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#ifdef HAVE_ERROR_H
+ #include <error.h>
++#endif
+ #include <stdio.h>
+ #include <glib.h>
+ #include <glib-object.h>
+diff --git a/run.c b/run.c
+index 1407299..d81bb51 100644
+--- a/run.c
++++ b/run.c
+@@ -19,7 +19,9 @@
+ #include <config.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#ifdef HAVE_ERROR_H
+ #include <error.h>
++#endif
+ #include <stdio.h>
+ #include <glib.h>
+ #include <glib-object.h>
+diff --git a/util.c b/util.c
+index 8f3a1d4..b56d5ec 100644
+--- a/util.c
++++ b/util.c
+@@ -20,7 +20,9 @@
+ #include "util.h"
+ #include <unistd.h>
+ #include <stdlib.h>
++#ifdef HAVE_ERROR_H
+ #include <error.h>
++#endif
+ #include <stdio.h>
+ #include <glib.h>
+ #include <glib-object.h>
+@@ -359,7 +361,7 @@ get_bundle_path (const char *rootfs)
+ {
+ gchar *ret;
+ cleanup_free gchar *tmp = g_strdup (rootfs);
+- ret = canonicalize_file_name(dirname (tmp));
++ ret = realpath(dirname (tmp), NULL);
+ return ret;
+ }
+