diff options
author | André Klitzing <aklitzing@gmail.com> | 2017-03-10 21:22:56 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-03-14 14:50:36 +0000 |
commit | 40b4d47218c385db9d903b880d27a72043372860 (patch) | |
tree | a0307d371f6cad9b152d5ca97537326ec2cec136 | |
parent | 82251a29667835e7e9f877ab39e392ae808f3dbd (diff) | |
download | aports-40b4d47218c385db9d903b880d27a72043372860.tar.bz2 aports-40b4d47218c385db9d903b880d27a72043372860.tar.xz |
testing/flatpak: new aport
-rw-r--r-- | testing/flatpak/APKBUILD | 49 | ||||
-rw-r--r-- | testing/flatpak/musl-fixes.patch | 60 |
2 files changed, 109 insertions, 0 deletions
diff --git a/testing/flatpak/APKBUILD b/testing/flatpak/APKBUILD new file mode 100644 index 0000000000..a037d95581 --- /dev/null +++ b/testing/flatpak/APKBUILD @@ -0,0 +1,49 @@ +# Contributor: André Klitzing <aklitzing@gmail.com> +# Maintainer: André Klitzing <klitzing@gmail.com> + +pkgname=flatpak +pkgver=0.8.4 +pkgrel=0 +pkgdesc="Application deployment framework for desktop apps" +url="http://flatpak.org" +arch="all" +license="GPL" +depends="bubblewrap" +makedepends="glib-dev libarchive-dev libsoup-dev elfutils-dev libdwarf-dev + libcap-dev polkit-dev libxau-dev ostree-dev fuse-dev json-glib-dev + libseccomp-dev libxslt-dev bubblewrap" +subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" +source="https://github.com/flatpak/flatpak/releases/download/$pkgver/flatpak-$pkgver.tar.xz + musl-fixes.patch" +options="!check suid" +builddir="$srcdir/$pkgname-$pkgver" + +build() { + cd "$builddir" + + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --sbindir=/usr/bin \ + --libexecdir=/usr/lib/$pkgname \ + --disable-static \ + --disable-documentation \ + --with-priv-mode=setuid \ + --with-dwarf-header=/usr/include/libdwarf \ + --with-system-bubblewrap \ + || return 1 + + make || return 1 +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install || return 1 + install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +sha512sums="6981c8edcd387ecab5d2c2f6008a6463a3be51186c6c36d9f0fc437795334c51d96af99f54e776261c2220a6473295a98b44e0507a7077ea7381924fcb4561a4 flatpak-0.8.4.tar.xz +7c37149149c902dcb64eae616e7a5dde188aa2ea3d614c5c79ba5d3c61de1dc5d8ff9112ce7618b9405816b5e5795b4007d6cb095076ef59bf0df536db846e9f musl-fixes.patch" diff --git a/testing/flatpak/musl-fixes.patch b/testing/flatpak/musl-fixes.patch new file mode 100644 index 0000000000..0a84cf374e --- /dev/null +++ b/testing/flatpak/musl-fixes.patch @@ -0,0 +1,60 @@ +--- a/common/flatpak-utils.c ++++ b/common/flatpak-utils.c +@@ -36,6 +36,7 @@ + #include <fcntl.h> + #include <string.h> + #include <sys/stat.h> ++#include <sys/file.h> + #include <sys/types.h> + #include <sys/utsname.h> + +--- a/config.h.in ++++ b/config.h.in +@@ -140,3 +140,14 @@ + + /* Define to 1 if you need to in order for `stat' and other things to work. */ + #undef _POSIX_SOURCE ++ ++/* taken from glibc unistd.h and fixes musl */ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ +--- a/builder/builder-module.c ++++ b/builder/builder-module.c +@@ -771,7 +771,7 @@ + g_ptr_array_add (args, g_strdup ("flatpak")); + g_ptr_array_add (args, g_strdup ("build")); + +- source_dir_path_canonical = canonicalize_file_name (source_dir_path); ++ source_dir_path_canonical = realpath (source_dir_path, NULL); + + if (builder_context_get_build_runtime (context)) + builddir = "/run/build-runtime/"; +--- a/builder/builder-source-shell.c ++++ b/builder/builder-source-shell.c +@@ -130,7 +130,7 @@ + g_ptr_array_add (args, g_strdup ("flatpak")); + g_ptr_array_add (args, g_strdup ("build")); + +- source_dir_path_canonical = canonicalize_file_name (source_dir_path); ++ source_dir_path_canonical = realpath (source_dir_path, NULL); + + g_ptr_array_add (args, g_strdup ("--nofilesystem=host")); + g_ptr_array_add (args, g_strdup_printf ("--filesystem=%s", source_dir_path_canonical)); +--- a/common/flatpak-dir.c ++++ b/common/flatpak-dir.c +@@ -2862,7 +2862,7 @@ + somewhere the bind mount will be on the target of that, not + at that exact path. */ + g_autofree char *basedir_orig = g_file_get_path (self->basedir); +- g_autofree char *basedir = canonicalize_file_name (basedir_orig); ++ g_autofree char *basedir = realpath (basedir_orig, NULL); + + g_debug ("running trigger %s", name); + |