From patchwork Thu Dec 15 21:51:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 45338 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2BE1027BBED; Thu, 15 Dec 2022 21:52:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6177B27BBEB for ; Thu, 15 Dec 2022 21:52:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5w96-0007WB-Hr; Thu, 15 Dec 2022 16:52:04 -0500 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 1p5w94-0007W2-VJ for guix-patches@gnu.org; Thu, 15 Dec 2022 16:52:03 -0500 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 1p5w94-0007cs-Ab for guix-patches@gnu.org; Thu, 15 Dec 2022 16:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5w94-0004GU-6Y for guix-patches@gnu.org; Thu, 15 Dec 2022 16:52:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49577] [PATCH] Add python-pmbootstrap Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Dec 2022 21:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49577 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 49577@debbugs.gnu.org, Sarah Morgensen Received: via spool by 49577-submit@debbugs.gnu.org id=B49577.167114108916369 (code B ref 49577); Thu, 15 Dec 2022 21:52:02 +0000 Received: (at 49577) by debbugs.gnu.org; 15 Dec 2022 21:51:29 +0000 Received: from localhost ([127.0.0.1]:45131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5w8W-0004Fx-H5 for submit@debbugs.gnu.org; Thu, 15 Dec 2022 16:51:28 -0500 Received: from mail-4322.protonmail.ch ([185.70.43.22]:28105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5w8S-0004Fr-MX for 49577@debbugs.gnu.org; Thu, 15 Dec 2022 16:51:27 -0500 Date: Thu, 15 Dec 2022 21:51:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1671141077; x=1671400277; bh=9/yO93wq95LmqLnaZy1T5ekRN7WiWmfekvdDGAYTuSk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=fovhriGdyvmxi8VZ9hCf9lYIdTGF1UQH8xXaoz3iPG10Qa24X5XqTLsc9+l9L27xX dfCRiu5AM0RB6t+OcyuaLlZjd4uSORjdYqAQQIRYWt2cYqTS9XCjqQa2uWjEWSXvKY +qWY4uFHyXzgvaZySpTzcUx60bDNPXF30YUDIseAYWPoy5nMNIR+85dVX1WUL5XT6U UZZza2UNMALUME+8NWwPhwKpTaGYHLSSN5D/OO1ChhbnT6K4UOvzBVJtNWxL9HNEnp Gp/pnoIT/KU+Wdk2vZYJyFDawPN32h7EZgIFRBcVEFPEoGPN1Aju97ZQjOMbhBja4w ymD4NdPsYeUyw== Message-ID: In-Reply-To: References: <86lf5zrt0a.fsf_-_@mgsn.dev> <875ym4hrc7.fsf_-_@gmail.com> Feedback-ID: 14143818:user:proton MIME-Version: 1.0 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: , Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi Maxim, here's update of the package. I moved to git repo as it has test suite packaged. However, currently 44 tests fail, 80 pass. The reason is they require network connectivity (mostly git tests, can be added to list of dependencies), then some require chroot (that might be dropped and run in guix isolated environment), sudo (again remove and use TMP location). The tool is able to produce working PostmarketOS image which can be run on mobile device. Not sure about the time it will take to patch all the tests. What do you think? ---- Petr From 5443a12dc08936a7facab4b1b85953624a29df24 Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Sun, 18 Jul 2021 12:33:07 +0200 Subject: [PATCH v4] gnu: Add pmbootstrap. * gnu/packages/python-xyz.scm (pmbootstrap): New variable. diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 17fbd9de9e..7f409cf118 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -153,6 +153,7 @@ (define-module (gnu packages python-xyz) #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages adns) + #:use-module (gnu packages admin) #:use-module (gnu packages aidc) #:use-module (gnu packages attr) #:use-module (gnu packages backup) @@ -1458,6 +1459,56 @@ (define-public python-shortuuid module and then similar looking characters are removed.") (license license:bsd-3))) +(define-public pmbootstrap + (package + (name "pmbootstrap") + (version "1.50.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/postmarketOS/pmbootstrap") + (commit version))) + (sha256 + (base32 + "0n26zbpw7nhyh9gq0ydgij7m4pgv2n5wlmyc7g2sr7gqhqv04j2j")))) + (build-system python-build-system) + (arguments + (list #:tests? #f ; TODO: many test fail + #:phases #~(modify-phases %standard-phases + (add-after 'install 'fix-paths + (lambda* _ + (let ((git (string-append #$git "/bin/")) + (procps (string-append #$procps "/bin")) + (openssl (string-append #$openssl "/bin")) + (sudo "/run/setuid-programs")) + (wrap-program (string-append #$output + "/bin/pmbootstrap") + `("PATH" ":" suffix + ,(list git procps openssl sudo)))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest"))))))) + (native-inputs (list python-pytest python-pyopenssl)) + (inputs (list git procps openssl sudo)) + (home-page "https://postmarketos.org") + (synopsis "Build and flash tool for postmarketOS") + (description + "Bootstrap program that abstracts everything in chroots and therefore +basically runs on top of any Linux distribution. Features: +@enumerate +@item chroot setup (distro-independent QEMU user emulation +@item clean chroot shutdown (umount) and zapping +@item build software as packages +@item cross-compile all armhf-packages +@item effective caching out of the box (survives chroot zaps) +@item installation targets +@item flasher abstractions +@item logging +@item security +@end enumerate") + (license license:gpl3+))) + (define-public python-logwrap (package (name "python-logwrap") -- 2.37.2