From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id iH3UNEWRLGRopwAASxT56A (envelope-from ) for ; Tue, 04 Apr 2023 23:06:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CJubNEWRLGR3vAAA9RJhRA (envelope-from ) for ; Tue, 04 Apr 2023 23:06:13 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A8B6B46032 for ; Tue, 4 Apr 2023 23:06:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjnqu-00068t-Ux; Tue, 04 Apr 2023 17:06:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjnqs-000664-PE for guix-patches@gnu.org; Tue, 04 Apr 2023 17:06:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pjnqs-000311-GC for guix-patches@gnu.org; Tue, 04 Apr 2023 17:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjnqr-00008K-SQ for guix-patches@gnu.org; Tue, 04 Apr 2023 17:06:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#61027] [PATCH 3/3] gnu: Add flatpak-builder. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 04 Apr 2023 21:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61027 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61027@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 61027-submit@debbugs.gnu.org id=B61027.1680642343485 (code B ref 61027); Tue, 04 Apr 2023 21:06:01 +0000 Received: (at 61027) by debbugs.gnu.org; 4 Apr 2023 21:05:43 +0000 Received: from localhost ([127.0.0.1]:50389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjnqY-00007k-3i for submit@debbugs.gnu.org; Tue, 04 Apr 2023 17:05:43 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:51808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjnqT-00007V-Py for 61027@debbugs.gnu.org; Tue, 04 Apr 2023 17:05:40 -0400 From: Jelle Licht DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1680642334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tvJl2gHRBt0noWRUT8c+ddcKwokwm2CahliSmwNDjbk=; b=IvT5EpYP51q36/AjcIMtXwKhdtSLKF195giD211k/wngr8kIU8EEy9e8zuzPbWqWAobet+ b89iL+JaPUuwY0kO6aDWFaaOLS5m7LaKcJ0hLR7FvsMLht3+73AUivR5mEceKcdkvc1DFA ttdR4BP5kO6aq/DIA/CgCXCqnFkNDS8= In-Reply-To: <20230123122152.5115-3-ngraves@ngraves.fr> References: <20230123122152.5115-1-ngraves@ngraves.fr> <20230123122152.5115-3-ngraves@ngraves.fr> Date: Tue, 04 Apr 2023 23:05:33 +0200 Message-ID: <87zg7n73z6.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680642373; a=rsa-sha256; cv=none; b=msPw7E3qc7m76bvH1r2ibyXckYYXykNLI6jaIzyoZcnN8uCwHiTNHyqisTJb0bJ9Bp/mmn BymyIDIjNPumK01YKNg7hRvTMElm4q7Q7M3D8Ccer18wBhwHZa2ueb0KqsauFg0Pi8h0Uh MF1JOp8/i4Jpx1vIdck7YiEJjBN3L+0++kEBHaj4AwXGBHXHEBvB+NLek3AE8TExOC0VUp 3pHpG0d1E0RVrNBAuzGvFPoT65Rp03KWdPjbcY3oP1zc+oL7V0Tz+Inqy1SswOFMaXJmZI 2k/ErGUO1RvZp+zyX2rSYxQ2EhV0QnwB3x9sHqOHk3Bi/XvNwccSZMLine4ZKA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=IvT5EpYP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680642373; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=tvJl2gHRBt0noWRUT8c+ddcKwokwm2CahliSmwNDjbk=; b=OherID1nbca7jy5uE8PSRSz5vudzfYjII6gcOX0YbGEmPaY1zjo/k7WkuojkfHQvOHe1F9 0SLPVRLeHzzzRjA2KNkleQq1Q+MAyBRdSsHV0JBd0ZY31TPtTOIoRIZ1J1H14mhzOZ3F98 Kyc4REwlQtDYn8PjanzDDhjbw1YCUsuV8Zxqccg9BC3xApo2CGxY95hQOUuBnC889asH/X gKk3kZjUuEyKkITjr7Dd7Ri4qmyOS7zVYubUpproqzGcVN1LxG7WWDuOm++Sd9ngyVSHQW ZGDKPPaAqYUomcwXFJznIX2C9lyiwxzazB7fRI2EWKSFn+6HHvQAiBJavSrJbQ== X-Migadu-Spam-Score: 7.28 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=IvT5EpYP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Spam-Score: 7.28 X-Migadu-Queue-Id: A8B6B46032 X-TUID: jJ4lO+RlJurc Hi Nicolas, This particular patch does not apply cleanly (anymore). I think it may introduce module import cycles as well; any chance you could have a look at that? If it becomes too much of a mess, moving this package (and eventually other packages as well) into a new 'gnu/packages/flatpak.scm' file could work. Some additional nitpicks follow inline. Nicolas Graves via Guix-patches via writes: > * gnu/packages/package-management.scm (flatpak-builder): New variable. > --- > gnu/packages/package-management.scm | 103 ++++++++++++++++++++++++++++ > 1 file changed, 103 insertions(+) > > diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm > index 6210be4d5c..bfba2eeacf 100644 > --- a/gnu/packages/package-management.scm > +++ b/gnu/packages/package-management.scm You are missing a copyright line :-) > @@ -59,9 +59,11 @@ (define-module (gnu packages package-management) > #:use-module (gnu packages crypto) > #:use-module (gnu packages curl) > #:use-module (gnu packages databases) > + #:use-module (gnu packages debug) > #:use-module (gnu packages dejagnu) > #:use-module (gnu packages dbm) > #:use-module (gnu packages docbook) > + #:use-module (gnu packages elf) > #:use-module (gnu packages file) > #:use-module (gnu packages freedesktop) > #:use-module (gnu packages flex) > @@ -83,6 +85,7 @@ (define-module (gnu packages package-management) > #:use-module (gnu packages lisp) > #:use-module (gnu packages lua) > #:use-module (gnu packages man) > + #:use-module (gnu packages m4) > #:use-module (gnu packages markup) > #:use-module (gnu packages nettle) > #:use-module (gnu packages networking) > @@ -2077,6 +2080,106 @@ (define-public flatpak > sandboxed desktop applications on GNU/Linux.") > (license license:lgpl2.1+))) > > +(define-public flatpak-builder > + (package > + (name "flatpak-builder") > + (version "1.2.3") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/flatpak/flatpak-builder.git") > + (commit version))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 "07pih8v2i3jzyy8zccdljgi3pgj52bgycrh4h5s20lwdxgnh2hb3")))) > + (build-system gnu-build-system) > + (arguments > + '(#:configure-flags > + (list > + "--enable-documentation=no" Enabling documentation should be workable in a way similar to what we do for gtk-doc, and I've noticed nix already has a similar patch as well as the one both us and them use for gtk-doc [1]. Adding docbook-xsl, docbook-xml-4.3, libxslt and libxml2 to native-inputs should do the trick afterwards (untested). > + "--with-system-debugedit") > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'disable-submodules > + (lambda* (#:key inputs #:allow-other-keys) > + (let ((llibglnx (assoc-ref inputs "libglnx"))) > + (substitute* "autogen.sh" > + (("^if ! test -f libglnx/README.md; then") > + "if test -f libglnx/README.md; then") Instead of inverting the test, why not substitute with something like "if false; then" (untested)? > + ((".*subprojects/libglnx.*") "")) > + (substitute* "configure.ac" > + (("LIBGLNX_CONFIGURE") "")) > + (substitute* "src/Makefile.am.inc" > + (("libglnx.la") "-lglnx")) > + (substitute* "Makefile.am" > + (("^include subprojects/libglnx/Makefile-libglnx.am.inc") > + "") > + ((".*libglnx_srcpath.*") "") > + ((".*/subprojects/debugedit.*") "") > + (("-I subprojects/libglnx") > + (string-append "-I " llibglnx "/include")) > + ((".*subprojects/libglnx.*") > + (string-append " -I " llibglnx "/include")) > + (("noinst_LTLIBRARIES .=.*") "") > + (("libglnx_libs :=.*") > + (string-append "LDFLAGS += -L" llibglnx " -lglnx -static" "\n")) > + (("libglnx_cflags :=") "LIBGLNX_CFLAGS = -lglnx")) > + (substitute* > + '("src/builder-cache.c" > + "src/builder-cache.h" > + "src/builder-extension.c" > + "src/builder-flatpak-utils.c" > + "src/builder-flatpak-utils.h" > + "src/builder-main.c" > + "src/builder-manifest.c" > + "src/builder-module.c" > + "src/builder-post-process.c") > + (("\"libglnx/libglnx.h\"") "") > + (("") ""))))) > + ;; Test are supposed to be done in /var/tmp because of the need for > + ;; xattrs. Nonetheless, moving it back to /tmp makes tests suceed. > + (add-before 'check 'allow-tests > + (lambda _ > + (substitute* '("buildutil/tap-test" "tests/libtest.sh") > + (("\\/var\\/tmp\\/") > + "/tmp/"))))))) > + (propagated-inputs (list flatpak debugedit libglnx elfutils)) > + (inputs > + (list libsoup-minimal-2 > + libostree > + json-glib > + curl > + libyaml)) > + (native-inputs > + (list autoconf > + automake > + m4 > + libtool > + pkg-config > + gettext-minimal > + which)) > + (home-page "https://github.com/flatpak/flatpak-builder.git") > + (synopsis "Tool to build flatpaks from source") > + (description "@code{flatpak-builder} is a wrapper around the flatpak build > +command that automates the building of applications and their dependencies. > +It is one option you can use to build applications. This > + > +The goal of flatpak-builder is to push as much knowledge about how to build > +modules to the individual upstream projects. An invocation of flatpak-builder > +proceeds in these stages, each being specified in detail in json format in > +the file MANIFEST : > + > +@itemize > +@item Download all sources > +@item Initialize the application directory with flatpak build-init > +@item Build and install each module with flatpak build > +@item Clean up the final build tree by removing unwanted files and > +e.g. stripping binaries > +@item Finish the application directory with flatpak build-finish > +@end itemize") > + (license license:lgpl2.1))) > + > (define-public akku > (package > (name "akku") > -- > 2.39.1 [1]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/flatpak-builder/respect-xml-catalog-files-var.patch.