From a1351f6a75829be7d3a6bcd22165bc4f28ac4d00 Mon Sep 17 00:00:00 2001 From: John Zimmermann Date: Fri, 27 Aug 2021 21:22:32 +0200 Subject: [PATCH] flatpak-builder: update to 1.1.1. --- .../files/hard-disable-rofiles-fuse.patch | 29 +++++++++++++++++++ .../patches/fix-temp-failure-retry.patch | 2 +- srcpkgs/flatpak-builder/template | 15 ++++++++-- 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/flatpak-builder/files/hard-disable-rofiles-fuse.patch diff --git a/srcpkgs/flatpak-builder/files/hard-disable-rofiles-fuse.patch b/srcpkgs/flatpak-builder/files/hard-disable-rofiles-fuse.patch new file mode 100644 index 000000000000..dd6d5a418d91 --- /dev/null +++ b/srcpkgs/flatpak-builder/files/hard-disable-rofiles-fuse.patch @@ -0,0 +1,29 @@ +Source: Rasmus Thomsen +Upstream: No, Alpine/Musl specific hack +Reason: rofiles-fuse is always broken on musl as of now, so +disable it for know so users don't get (very weird) failures +when building flatpaks if they forget to specify that opt. +See https://github.com/flatpak/flatpak-builder/issues/329 +for more info. +diff --git a/src/builder-main.c b/src/builder-main.c +index a5f6601..f63c42f 100644 +--- a/src/builder-main.c ++++ b/src/builder-main.c +@@ -98,7 +98,7 @@ static GOptionEntry entries[] = { + { "ccache", 0, 0, G_OPTION_ARG_NONE, &opt_ccache, "Use ccache", NULL }, + { "disable-cache", 0, 0, G_OPTION_ARG_NONE, &opt_disable_cache, "Disable cache lookups", NULL }, + { "disable-tests", 0, 0, G_OPTION_ARG_NONE, &opt_disable_tests, "Don't run tests", NULL }, +- { "disable-rofiles-fuse", 0, 0, G_OPTION_ARG_NONE, &opt_disable_rofiles, "Disable rofiles-fuse use", NULL }, ++ { "disable-rofiles-fuse", 0, 0, G_OPTION_ARG_NONE, &opt_disable_rofiles, "Disable rofiles-fuse use (Note: This is ALWAYS disabled on VoidLinux with Musl due to https://github.com/flatpak/flatpak-builder/issues/329)", NULL }, + { "disable-download", 0, 0, G_OPTION_ARG_NONE, &opt_disable_download, "Don't download any new sources", NULL }, + { "disable-updates", 0, 0, G_OPTION_ARG_NONE, &opt_disable_updates, "Only download missing sources, never update to latest vcs version", NULL }, + { "download-only", 0, 0, G_OPTION_ARG_NONE, &opt_download_only, "Only download sources, don't build", NULL }, +@@ -508,7 +508,7 @@ main (int argc, + + build_context = builder_context_new (cwd_dir, app_dir, opt_state_dir); + +- builder_context_set_use_rofiles (build_context, !opt_disable_rofiles); ++ builder_context_set_use_rofiles (build_context, 0); + builder_context_set_run_tests (build_context, !opt_disable_tests); + builder_context_set_no_shallow_clone (build_context, opt_no_shallow_clone); + builder_context_set_keep_build_dirs (build_context, opt_keep_build_dirs); diff --git a/srcpkgs/flatpak-builder/patches/fix-temp-failure-retry.patch b/srcpkgs/flatpak-builder/patches/fix-temp-failure-retry.patch index 995275946382..ae4b1bb55de9 100644 --- a/srcpkgs/flatpak-builder/patches/fix-temp-failure-retry.patch +++ b/srcpkgs/flatpak-builder/patches/fix-temp-failure-retry.patch @@ -1,6 +1,6 @@ index 0000000..878bd82 --- /dev/null -+++ b/libglnx/config.h ++++ b/subprojects/libglnx/config.h @@ -0,0 +1,9 @@ +/* taken from glibc unistd.h and fixes musl */ +#ifndef TEMP_FAILURE_RETRY diff --git a/srcpkgs/flatpak-builder/template b/srcpkgs/flatpak-builder/template index 208481c58b25..7b51a18cb491 100644 --- a/srcpkgs/flatpak-builder/template +++ b/srcpkgs/flatpak-builder/template @@ -1,20 +1,29 @@ # Template file for 'flatpak-builder' pkgname=flatpak-builder -version=1.0.12 +version=1.1.1 revision=1 build_style=gnu-configure hostmakedepends="pkg-config xmlto" makedepends="flatpak-devel json-glib-devel libcap-devel libsoup-devel - libyaml-devel libcurl-devel" + libyaml-devel libcurl-devel elfutils" short_desc="Tool to build flatpaks from source" maintainer="Enno Boland " license="LGPL-2.1-or-later" homepage="https://github.com/flatpak/flatpak-builder" distfiles="${homepage}/releases/download/${version}/${pkgname}-${version}.tar.xz" -checksum=4780c1b8e0838ffb64e9639bd7801417964fd818c7c6d5e9afca4d5511ded2c8 +checksum=13c5ccc8765f4724ad286a8eff8aad191a417b73a03eab7c3ae53a2e9eb22140 # Tests expects a Debian derivate hosts to build a flatpak container from. make_check=no if [ "$CROSS_BUILD" ]; then hostmakedepends+=" flatpak-devel" fi +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + makedepends+=" musl-legacy-compat" +fi + +post_patch() { + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + patch -Np1 < $FILESDIR/hard-disable-rofiles-fuse.patch + fi +}