From patchwork Mon May 29 10:31:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 50420 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 4386927BBE9; Mon, 29 May 2023 11:32:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 5FDE527BBE2 for ; Mon, 29 May 2023 11:32:12 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3aAW-0006B5-Tc; Mon, 29 May 2023 06:32: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 1q3aAU-0006Aw-KJ for guix-patches@gnu.org; Mon, 29 May 2023 06:32:03 -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 1q3aAU-0000Gd-C9 for guix-patches@gnu.org; Mon, 29 May 2023 06:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q3aAT-0007xe-TI for guix-patches@gnu.org; Mon, 29 May 2023 06:32:01 -0400 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: Mon, 29 May 2023 10:32:01 +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, Jorge Gomez , Sarah Morgensen Received: via spool by 49577-submit@debbugs.gnu.org id=B49577.168535630130566 (code B ref 49577); Mon, 29 May 2023 10:32:01 +0000 Received: (at 49577) by debbugs.gnu.org; 29 May 2023 10:31:41 +0000 Received: from localhost ([127.0.0.1]:57131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3aA8-0007ww-FK for submit@debbugs.gnu.org; Mon, 29 May 2023 06:31:40 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:24593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q3aA5-0007wg-CD for 49577@debbugs.gnu.org; Mon, 29 May 2023 06:31:38 -0400 Date: Mon, 29 May 2023 10:31:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1685356291; x=1685615491; bh=dc4TVO20GlioxLNVqA16+awhtJ5Zi9V9lfU4DwcX56k=; 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=liTvF1vOKSZ7a1f2L9gKbnn70Scjp2XO8LOBffGSuPxsvOaar8lc1vRLIiAy6UkF9 ez46yMQqTslcR71AzyYG3wG/1AKcNyibZj1Rwt6KohKWUTXFKGAr1S/OeeHfwJZAvm IM04AyRisMlqu84HZ2u+T6ZU+iIqgDpmyxh/p29Cu0n39lXxJiQC1zWGpmKA16pYPq O5ApDqaRDyPKwy3mwhKyXlgj7gwbymDw6JhmwL0x6IovQ9adhiFtTlgZxIhI0Pt9Nz b5cH9BFvGnxuBn8jneD/r3lrDjT/gZeIf/Fqqe/afolxHSC/dAKptSrjpSZrz7/Dv/ XytJm7ubcYuLw== Message-ID: <-p1E1t5bZbM1CFVLmQ8v8VDEsQf-BOs5FP5kO69Mj5UqSwIMEpU1Y5wNexbx80wVoHo-t7g6eDhkj9p_u630_159NhbXcYYC1eWw_qBSK0E=@protonmail.com> In-Reply-To: <87jzwxgt9q.fsf_-_@gmail.com> References: <86lf5zrt0a.fsf_-_@mgsn.dev> <875ym4hrc7.fsf_-_@gmail.com> <875yecc5mw.fsf@gmail.com> <87jzwxgt9q.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 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 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 From ec3193bfa3320b6b282926807bfb2501362fe11d Mon Sep 17 00:00:00 2001 From: Petr Hodina 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