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, Jorge Gomez <jgart@dismail.de>,
	Sarah Morgensen <iskarian@mgsn.dev>
Subject: [bug#49577] [PATCH] Add python-pmbootstrap
Date: Mon, 29 May 2023 10:31:26 +0000	[thread overview]
Message-ID: <-p1E1t5bZbM1CFVLmQ8v8VDEsQf-BOs5FP5kO69Mj5UqSwIMEpU1Y5wNexbx80wVoHo-t7g6eDhkj9p_u630_159NhbXcYYC1eWw_qBSK0E=@protonmail.com> (raw)
In-Reply-To: <87jzwxgt9q.fsf_-_@gmail.com>

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

Hi Jorge and Maxim,

unfreezing this patch. So I've modified the patch to list the tests that should not be run based on the Nix example.

The package is also updated to the latest version.

However, I'm struggling with the import of the `pmb_test` module.

I've modified the variable `PYTHONPATH` accordingly to fix the error:
```
E   ModuleNotFoundError: No module named 'pmb_test'
``` 

But now I get the following error:
```
wrong-type-arg "string-append" "Wrong type (expecting ~A): ~S" ("string" #f) (#f)
```

So it seems the `PYTHONPATH` env variable is not set. Do you know how to fix this?


----
Petr




Sent with Proton Mail secure email.

------- Original Message -------
On Thursday, May 25th, 2023 at 2:16 AM, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:


> tags 49577 +moreinfo
> quit
> 
> Hi Jorge,
> 
> Maxim Cournoyer maxim.cournoyer@gmail.com writes:
> 
> > Hi Petr,
> > 
> > phodina phodina@protonmail.com writes:
> > 
> > > Hi Maxim,
> > > 
> > > here's update of the package. I moved to git repo as it has test suite packaged.
> > 
> > Thank you!
> > 
> > > 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).
> > 
> > Oh. That's more than half the tests failing. I guess the whole test
> > suite could be disabled with a comment, if possible with a link
> > requesting upstream to make it easy to skip network-requiring tests via
> > a flag or something.
> 
> 
> The status is unchanged; the ball is in Petr's camp, or someone
> interested enough in the patch to make the changes suggested.
> 
> I'm using this opportunity to gently ping Petr :-).
> 
> --
> Thanks,
> Maxim

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

From ec3193bfa3320b6b282926807bfb2501362fe11d Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 18 Jul 2021 12:33:07 +0200
Subject: [PATCH v2] 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 f7e3f6f538..b14637af73 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -158,6 +158,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)
@@ -1744,6 +1745,115 @@ (define-public python-shortuuid
 module and then similar looking characters are removed.")
     (license license:bsd-3)))
 
+(define-public pmbootstrap
+  (package
+    (name "pmbootstrap")
+    (version "1.53.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pmbootstrap" version))
+              (sha256
+               (base32
+                "13nyjrwi5r8ma9i58cz6qbgy2xyjzs708nq65kdmhrw3ba5z3jgj"))))
+    (build-system python-build-system)
+    (arguments
+     (list #: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?
+                              (setenv "PYTHONPATH"
+                                      (string-append (getcwd) "/test:"
+                                                     (getenv "PYTHONPATH")))
+                              (invoke "pytest" "-k"
+                                      (string-append "not test_apk_static"
+                                       " and not test_aportgen"
+                                       "test_aportgen_device_wizard"
+                                       " and not test_bootimg"
+                                       " and not test_build_depends_binary_outdated"
+                                       " and not test_build_depends_high_level"
+                                       " and not test_build_depends_no_binary_error"
+                                       " and not test_build_is_necessary"
+                                       " and not test_build_local_source_high_level"
+                                       " and not test_build_src_invalid_path"
+                                       " and not test_can_fast_forward"
+                                       " and not test_check_build_for_arch"
+                                       " and not test_chroot_arguments"
+                                       " and not test_chroot_interactive_shell"
+                                       " and not test_chroot_interactive_shell_user"
+                                       " and not test_clean_worktree"
+                                       " and not test_config_user"
+                                       " and not test_cross_compile_distcc"
+                                       " and not test_crossdirect"
+                                       " and not test_file"
+                                       " and not test_filter_aport_packages"
+                                       " and not test_filter_missing_packages_binary_exists"
+                                       " and not test_filter_missing_packages_invalid"
+                                       " and not test_filter_missing_packages_pmaports"
+                                       " and not test_finish"
+                                       " and not test_folder_size"
+                                       " and not test_get_apkbuild"
+                                       " and not test_get_depends"
+                                       " and not test_get_upstream_remote"
+                                       " and not test_helpers_lint"
+                                       " and not test_helpers_package_get_apkindex"
+                                       " and not test_helpers_repo"
+                                       " and not test_helpers_ui"
+                                       " and not test_init_buildenv"
+                                       " and not test_kconfig_check"
+                                       " and not test_keys"
+                                       " and not test_newapkbuild"
+                                       " and not test_package"
+                                       " and not test_package_from_aports"
+                                       " and not test_pkgrel_bump"
+                                       " and not test_pmbootstrap_status"
+                                       " and not test_print_checks_git_repo"
+                                       " and not test_pull"
+                                       " and not test_qemu_running_processes"
+                                       " and not test_questions_additional_options"
+                                       " and not test_questions_bootimg"
+                                       " and not test_questions_channel"
+                                       " and not test_questions_keymaps"
+                                       " and not test_questions_work_path"
+                                       " and not test_read_config_channel"
+                                       " and not test_recurse_invalid"
+                                       " and not test_run_abuild"
+                                       " and not test_run_core"
+                                       " and not test_shell_escape"
+                                       " and not test_skip_already_built"
+                                       " and not test_switch_to_channel_branch"
+                                       " and not test_version")))))
+                        ;; Circular dependency with pmbootstrap
+                        (delete 'sanity-check))))
+    (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.39.1


  reply	other threads:[~2023-05-29 10:32 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
2022-12-16  4:52           ` Maxim Cournoyer
2023-05-25  0:16             ` Maxim Cournoyer
2023-05-29 10:31               ` phodina via Guix-patches via [this message]
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='-p1E1t5bZbM1CFVLmQ8v8VDEsQf-BOs5FP5kO69Mj5UqSwIMEpU1Y5wNexbx80wVoHo-t7g6eDhkj9p_u630_159NhbXcYYC1eWw_qBSK0E=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=49577@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    --cc=jgart@dismail.de \
    --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.