From patchwork Fri Feb 17 01:49:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 1265 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 5E85316952; Fri, 17 Feb 2023 01:51:36 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,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 DC5771693E for ; Fri, 17 Feb 2023 01:51:35 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSptz-0007eO-UK; Thu, 16 Feb 2023 20:51:08 -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 1pSptu-0007dU-Jt for guix-patches@gnu.org; Thu, 16 Feb 2023 20:51:02 -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 1pSptu-0004Ms-B5 for guix-patches@gnu.org; Thu, 16 Feb 2023 20:51:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSptt-0007V2-TG for guix-patches@gnu.org; Thu, 16 Feb 2023 20:51:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61255] [PATCH v2 0/8] Add support for the RPM format to "guix pack" References: <20230203161926.26886-1-maxim.cournoyer@gmail.com> In-Reply-To: <20230203161926.26886-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Feb 2023 01:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61255 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61255@debbugs.gnu.org Cc: Josselin Poiret , Tobias Geerinckx-Rice , Maxim Cournoyer , Simon Tournier , Mathieu Othacehe , ludo@gnu.org, Christopher Baines , Julien Lepiller , Florian Pelz , Ricardo Wurmus , Thiago Jung Bauermann Received: via spool by 61255-submit@debbugs.gnu.org id=B61255.167659860828655 (code B ref 61255); Fri, 17 Feb 2023 01:51:01 +0000 Received: (at 61255) by debbugs.gnu.org; 17 Feb 2023 01:50:08 +0000 Received: from localhost ([127.0.0.1]:38065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSpt2-0007S6-7K for submit@debbugs.gnu.org; Thu, 16 Feb 2023 20:50:08 -0500 Received: from mail-qt1-f179.google.com ([209.85.160.179]:41948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSpt0-0007RV-Gg for 61255@debbugs.gnu.org; Thu, 16 Feb 2023 20:50:07 -0500 Received: by mail-qt1-f179.google.com with SMTP id z5so4150078qtn.8 for <61255@debbugs.gnu.org>; Thu, 16 Feb 2023 17:50:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=pc7DYR9EYvStuKFlbzx9jHDF2Zc+ORyfaMTQC+N1Q/0=; b=eGc+K1w29XV+mEmJqmMFApqkyVj+nmWCs0ASaXrXKvYUOrpe5jPrat8A87oTwhtOpg s7YurGT7vnCB7IKw842SBI+Z64NMkwzs+BrGyh/NcL0nGaw4lIWPz88AS7AwYsDNorQ3 6/qK2f6vIdaecodtPA2xLfukg6BaS+ri7whWJQ14SSBWpM6TroXWufQYteEywfPkc6lf prFc7qi+sVN7ZGEF6cstrJayRdHobD4yVnYn+5wf19kI3lCL62k6UcBTamcizot5PSDR J+cCjgqnGgpFn7IN9WQPBZXSP53PYT9bnuKH5cEi4W5AqSLPkUelV0ZqyMAa4HXKfNhr RjUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pc7DYR9EYvStuKFlbzx9jHDF2Zc+ORyfaMTQC+N1Q/0=; b=xXyb2mnNHDgmw5AhCpKVMcFc1YIEB8hORMiLgkT4mUPhVD0g9OBmaw8zLnvQNUmgcp C8OYNpR1IaJS0SNF2daCAxmYHJ+1WgUXZa/Bg1jTKcEe36GGzeEt7zfgPVmzkUxUA8CO hj9W/A0VYjkxFiajhNiuT0ET1qbKgQaJSPpWz0Nispt4PPGX4axLhmpohhEui7e3pdid isM/r5hwHFn5TxegrEt3mcti8hHmZ31B3DZlWmrXeczUP8YKNRqy4zozyo6/ZEPzK+4y tSANZ0jczg6yFvMk5gXu40qLKHNclt9S24SbRk7GHUAUEPKSfq3lKRYZgw9w4lA8qh8Z 8soQ== X-Gm-Message-State: AO0yUKUpOVxAO5RpezPIX2b2z9fTJW4ydwX0onfHUves8cEnOxmEunh9 lOpgZ6REc6cX1vZnzsyZeD2T9IQCqak6lhf9 X-Google-Smtp-Source: AK7set8Lxuu/vT2nKtwV3NvFGQTC10ABD2HFG3wJyI4fPWzHHh9j0uvZxfWoEdjxnH4pN0i+gVOcsw== X-Received: by 2002:a05:622a:1990:b0:3b8:691f:271 with SMTP id u16-20020a05622a199000b003b8691f0271mr13161103qtc.63.1676598600625; Thu, 16 Feb 2023 17:50:00 -0800 (PST) Received: from localhost.localdomain (dsl-152-188.b2b2c.ca. [66.158.152.188]) by smtp.gmail.com with ESMTPSA id g66-20020a37b645000000b0073b425f6e33sm2316242qkf.100.2023.02.16.17.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 17:50:00 -0800 (PST) From: Maxim Cournoyer Date: Fri, 17 Feb 2023 02:49:29 +0100 Message-Id: <20230217014938.20919-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello, I've addressed most of Ludovic's comments in this v2 rework (thanks!). Below is the original cover letter. This series adds support for the RPM format to "guix pack", so that one can generate an RPM archive via e.g. "guix pack -f rpm hello", and install it on their favorite RPM-based GNU/Linux distribution. With the exception of the payload compression, the generation of the archive is fully handled in Scheme, which ended up being tricky, with the documentation about the RPM binary format being scarce. Most of the problems encountered were figured out stepping an 'rpm' command invocation in GDB, which felt a bit like reverse engineering! Anyway, the end result appears to work well and has few dependencies (compared to using 'rpmbuild', as most other projects do), so I think it was worth the effort. Thanks! Changes in v2: - New commit - Use let-keywords instead of custom keyword-ref - Better make use of the new indentation rule - Use let-keywords instead of custom keyword-ref - Adjust commentary block in (guix rpm) - Adjust long define indentation in (guix scripts pack) - Separate guix pack / rpm --install example blocks - New commit - New commit Maxim Cournoyer (8): .dir-locals: Add let-keywords indentation rules. pack: Use let-keywords instead of keyword-ref. gexp: computed-file: Honor %guile-for-build. pack: Extract populate-profile-root from self-contained-tarball/builder. tests: pack: Fix indentation. pack: Add RPM format. etc: Add a news entry snippet. news: Add entry for the new 'rpm' guix pack format. .dir-locals.el | 3 + Makefile.am | 2 + doc/guix.texi | 48 +- etc/news.scm | 17 +- etc/snippets/yas/scheme-mode/guix-news-entry | 9 + guix/gexp.scm | 6 +- guix/rpm.scm | 623 +++++++++++++++++++ guix/scripts/pack.scm | 555 ++++++++++++----- tests/pack.scm | 336 +++++----- tests/rpm.scm | 86 +++ 10 files changed, 1379 insertions(+), 306 deletions(-) create mode 100644 etc/snippets/yas/scheme-mode/guix-news-entry create mode 100644 guix/rpm.scm create mode 100644 tests/rpm.scm base-commit: c1303a914c172dc80166be22389e7032c5ea5e09