From patchwork Mon Jun 6 21:07:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 39763 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 D186D27BBEA; Mon, 6 Jun 2022 22:08:15 +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 0CD7227BBE9 for ; Mon, 6 Jun 2022 22:08:15 +0100 (BST) Received: from localhost ([::1]:39456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyJxO-0003yc-4x for patchwork@mira.cbaines.net; Mon, 06 Jun 2022 17:08:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyJxD-0003yG-Rs for guix-patches@gnu.org; Mon, 06 Jun 2022 17:08:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43110) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyJxD-0002yD-Io for guix-patches@gnu.org; Mon, 06 Jun 2022 17:08:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nyJxC-0006hJ-CS for guix-patches@gnu.org; Mon, 06 Jun 2022 17:08:02 -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, 06 Jun 2022 21:08: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.165454964925705 (code B ref 49577); Mon, 06 Jun 2022 21:08:02 +0000 Received: (at 49577) by debbugs.gnu.org; 6 Jun 2022 21:07:29 +0000 Received: from localhost ([127.0.0.1]:37007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyJwY-0006gQ-4U for submit@debbugs.gnu.org; Mon, 06 Jun 2022 17:07:29 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:57337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyJwU-0006gA-Pt for 49577@debbugs.gnu.org; Mon, 06 Jun 2022 17:07:20 -0400 Date: Mon, 06 Jun 2022 21:07:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1654549632; x=1654808832; bh=En5p8Yzraqjo/Y6Q4xYgyTSzX1dwtakVeTTAAzD0Tp8=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=ZZQQHBMnJ9KksoYjXzBxO/N5JrJKJy7Ordb4ZclSBKlFbIU9BceCyQPIcNgQZH8A9 xUNgqIcqI0qn2swNxAIf4vSZOCrTpiJoYBR+hDfb+AbQQzySny55k9E2UUQ1LDSFQZ APA2igwZjRNOheyTbPJOnbVTkBogojRoUY+BbBiPQFUUmWyfcim96oTnttkjQ5AXGY k6iGGuuPfuZP5tvnVOfrHXzEJDOPtQNPSFS7hxN5ajBCWAD1QpEbAeUKxso4FixENV xg4rBEJkugvVTC2Dyb18F2B3bPZMnmo/rQqIoLkznxDmqj1wLmF3zvF/6xh7Wop6Ce /50FWiBlPMiEA== Message-ID: In-Reply-To: <875ym4hrc7.fsf_-_@gmail.com> 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches Hi, here's an updated version of the patch + 2 more tools around PMOS. However, there is some issue with the sanity-check phase in pmbootstrap which I disabled as I didn't know how to fix it. ---- Petr From 8b1c26dfddf10200dbd72be13322fdd835d257aa Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Sun, 9 Jan 2022 19:22:51 +0100 Subject: [PATCH 2/3] gnu: Add pmos-installer. * gnu/packages/android.scm (pmos-installer): New variable. diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index 04dc4b6499..aa9b0e0fe6 100644 --- a/gnu/packages/android.scm +++ b/gnu/packages/android.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2020 Sergey Trofimov ;;; Copyright © 2021 Guillaume Le Vaillant -;;; Copyright © 2021 Petr Hodina +;;; Copyright © 2021, 2022 Petr Hodina ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,16 +32,25 @@ (define-module (gnu packages android) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix gexp) + #:use-module (guix utils) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:use-module (guix git-download) #:use-module (guix build-system android-ndk) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python) + #:use-module (guix build-system copy) #:use-module (guix build-system trivial) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) + #:use-module (gnu packages admin) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cpio) #:use-module (gnu packages docker) #:use-module (gnu packages gcc) #:use-module (gnu packages gnupg) @@ -1268,3 +1277,64 @@ (define-public enjarify applications. Enjarify can translate the Dalvik bytecode back to equivalent Java bytecode, which simplifies the analysis of Android applications.") (license license:asl2.0))) + +(define-public pmos-installer + (package + (name "pmos-installer") + (version "1.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/sdm845-mainline/pmos-installer") + (recursive? #t) + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0lbdk2453bywdibys35zyf1j27a1m11a7q8jvmgjf99v77l9rrbx")))) + (build-system copy-build-system) + (arguments + `(#:install-plan '(("makeinstaller.sh" "bin/makeinstaller.sh") ("initrd" + "initrd")) + #:phases + (modify-phases %standard-phases + (add-after 'install 'wrap-shellscript + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* (string-append out "/bin/makeinstaller.sh") + ;; Typo in name + ;; https://gitlab.com/sdm845-mainline/pmos-installer/-/issues/5 + (("vmlinuz-") "vmlinuz") + ;; Path to initrd + (("\"\\$\\(dirname \"\\$0\"\\)\"") (string-append out))) + (wrap-program (string-append out "/bin/makeinstaller.sh") + `("PATH" ":" prefix + ,(append (map (lambda (dir) + (string-append (assoc-ref + inputs dir) + "/bin")) + '("coreutils" "cpio" + "grep" + "zip" + "mkbootimg" + "pmbootstrap" + "sudo" + "sed" + "util-linux" + "which"))))))))))) + (inputs (list bash-minimal + coreutils + pmbootstrap + grep + util-linux + mkbootimg + cpio + zip + sed + which + sudo)) + (home-page "https://gitlab.com/sdm845-mainline/pmos-installer") + (synopsis "Flashable installer for postmarketOS") + (description "This package provides a flashable installer for + postmarketOS.") + (license license:gpl3+))) -- 2.35.1