From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gKG7J6jd7mP57QAAbAwnHQ (envelope-from ) for ; Fri, 17 Feb 2023 02:51:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cAqkJ6jd7mNLoQAA9RJhRA (envelope-from ) for ; Fri, 17 Feb 2023 02:51:36 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1BF1C1C55B for ; Fri, 17 Feb 2023 02:51:35 +0100 (CET) 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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676598696; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pc7DYR9EYvStuKFlbzx9jHDF2Zc+ORyfaMTQC+N1Q/0=; b=TevwagkXjpwjxm/nSufbZv8ZLsZ2XqmtMCVLURc3m5cJYI8Qeg84oeCzAqbf8+tgMy1r+r znoGhQLeUozBLyBPEeHO7bj4d2a46EuHYmCRaVSqkT1u/0NSe8t8fvvaDcIJKAQg80RuYA RfdNL3WZGTQW9n5Gqvmhcj6MK4seENdxxp6FkjsavpgGJ7y65jdfF3CxbdyKle9LcnSJBf avxEPSwijhpKPmXBTeoJ5hOOKEMHajfiELNckycZ8Od4Z62n90mYYXBo3Rp7xzL/T3yhnb Tsd1ct2aLcyXJXqjy7DCPMbrY09/muY0AMr15LGRVAHCzMwGnbD120PuujTiTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=eGc+K1w2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676598696; a=rsa-sha256; cv=none; b=fjt2LdrYv9wANulS9p5/eqMBVR1jJl+SchKVfI5RfTGz1fpuM6FeRXVEQ6+ylh1K8sQaZC QQv7cIKWHrNm5vq9BN2/DUluiTkj0wwpXbPZrws/HkxjdGEq/E3PpnriEd9ZxfAp7Mxtrh AET9dV066jPGm5eT+xv1i7NyCmTld1uBANS3X3ogg02/NZdwyIzVN4jduJMvD6X5tsDvNk rMGlQ3D/IRuU321bS4nQNLhkIROhUfu3NRriseqiOXoysRlmKv39y3cltkVDfKo01OlweB DUVpIylrFvPYDGsE1U5Q8gXzRVdDrNbi0PGOu4ayecTR5MShUDK4rhktFJllZw== X-Migadu-Spam-Score: -0.77 X-Spam-Score: -0.77 X-Migadu-Queue-Id: 1BF1C1C55B X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=eGc+K1w2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-TUID: sebkn76EeRkF 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 -- 2.39.1