all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: phodina via Guix-patches via <guix-patches@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 49577@debbugs.gnu.org, Sarah Morgensen <iskarian@mgsn.dev>
Subject: [bug#49577] [PATCH] Add python-pmbootstrap
Date: Thu, 15 Dec 2022 21:51:11 +0000	[thread overview]
Message-ID: <R_J3VIodlpluXe4-_dQhbwDxpNLstpfXuz7NsCxhcv8vOhn24R9w5LbxnqaCymTU3jmu_CfDqGYqWN5YfNMueVQO8VFoce4UhLy4RIOQpV8=@protonmail.com> (raw)
In-Reply-To: <WUfW-YNF6KwD8sb_18og6t9o-GBvFQTqOqnxuKFHFlPqM1BK0MvOFQoL3roKbItbu4Xk3jZUaWqtRkKHBhN7nhdfmgbbMk6Gw7VzKQBjVTI=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v4-0001-gnu-Add-pmbootstrap.patch --]
[-- Type: text/x-patch; name=v4-0001-gnu-Add-pmbootstrap.patch, Size: 3195 bytes --]

From 5443a12dc08936a7facab4b1b85953624a29df24 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
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


  reply	other threads:[~2022-12-15 21:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 16:31 [bug#49577] [PATCH] Add python-pmbootstrap phodina via Guix-patches via
2021-07-18 10:35 ` phodina via Guix-patches via
2021-07-22  2:18   ` Sarah Morgensen
2022-05-17 19:49     ` Maxim Cournoyer
2022-06-06 21:07       ` phodina via Guix-patches via
2022-12-15 21:51         ` phodina via Guix-patches via [this message]
2022-12-16  4:52           ` Maxim Cournoyer
2023-05-25  0:16             ` Maxim Cournoyer
2023-05-29 10:31               ` phodina via Guix-patches via
2023-06-14  2:46                 ` Maxim Cournoyer
2023-06-14  3:06                 ` jgart via Guix-patches via
2023-03-13  5:21 ` [bug#49577] jgart via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='R_J3VIodlpluXe4-_dQhbwDxpNLstpfXuz7NsCxhcv8vOhn24R9w5LbxnqaCymTU3jmu_CfDqGYqWN5YfNMueVQO8VFoce4UhLy4RIOQpV8=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=49577@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    --cc=maxim.cournoyer@gmail.com \
    --cc=phodina@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.