From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EAAbB0Y03WN3NgAAbAwnHQ (envelope-from ) for ; Fri, 03 Feb 2023 17:20:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oIMcBkY03WPr5AAAG6o9tA (envelope-from ) for ; Fri, 03 Feb 2023 17:20:22 +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 A79F13BBDB for ; Fri, 3 Feb 2023 17:20:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNynE-0003vE-62; Fri, 03 Feb 2023 11:20:04 -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 1pNynC-0003ux-NC for guix-patches@gnu.org; Fri, 03 Feb 2023 11:20: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 1pNynC-0004Vb-Es for guix-patches@gnu.org; Fri, 03 Feb 2023 11:20:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pNynC-0004TX-7P for guix-patches@gnu.org; Fri, 03 Feb 2023 11:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61255] [PATCH 0/5] Add support for the RPM format to "guix pack" Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 03 Feb 2023 16:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61255 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61255@debbugs.gnu.org Cc: Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167544119017178 (code B ref -1); Fri, 03 Feb 2023 16:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Feb 2023 16:19:50 +0000 Received: from localhost ([127.0.0.1]:39853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNymz-0004T0-OY for submit@debbugs.gnu.org; Fri, 03 Feb 2023 11:19:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:32812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNymw-0004Sq-Dy for submit@debbugs.gnu.org; Fri, 03 Feb 2023 11:19:47 -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 1pNymw-0003ha-7z for guix-patches@gnu.org; Fri, 03 Feb 2023 11:19:46 -0500 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNymu-0004TM-Sz for guix-patches@gnu.org; Fri, 03 Feb 2023 11:19:46 -0500 Received: by mail-qv1-xf34.google.com with SMTP id e19so3132566qvw.13 for ; Fri, 03 Feb 2023 08:19:44 -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=ia3uWM/AKd3vhEqox1/sgaLPuPGiyan9BIXhFgfyrfM=; b=lsOKmf+2yCmtdyXpAa5WDPLF3qME8q9FJHlPrfzfam9FM39d2HB0cQ3UJM/081BbhL f5/Sy0CHzZKL7KBX0/E4NSSl93BpCThIHApXNK8FSTqTl3z89HiiFwo05psk71KuOCw/ 0jO+EH/WGgYc4u8w1//lc9oDzPJoFQ9GY5njy1OEuSB+vGMyA13ahliT5aioqKsVm2xD Vw8ZKOd/FH7u+o2ejGoimwd12Vour4l8Zft/MsZkY0fh0ry3UWZ7IW+gB2wHbaevRYo6 B1Lu3l7wITGRpQuERmf7onDa30IZ/bCMRVhrDWmOrPbArk1Jq1F/w+ldjfo3rJPVDZCI EEmg== 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=ia3uWM/AKd3vhEqox1/sgaLPuPGiyan9BIXhFgfyrfM=; b=im8iXOF9QBIskxvCUEm87OY+QvFm1MCray6Ic4C5Ls+qtRwruC5lnSHwnLJ7pfihIE 1b+QYvhaEFlNA/nK6Yh2xCQtfQG5rqZupYF3td4Rxo1iG+ETJhRUURSI0Tn0eT6y6UbR D3d8/uv5HW0Sd7PaXwFs8ELqPhOOPrYWrQ0r67tL1FkAg/QBW1X5uCzcvIbkFCQIzQV8 i+PPWYW+OO18aIxhFWZ6KX1ZuKqKA927Uui4k/lAqjls/mzk7AhTCIP0nnaChyUVCb5E tHiul03MSVsBfcjDfXtEJEty8sN1WFJM9MG0N/716qe2FkrUBnznJf7F57xA2lU1qnnR 7NlA== X-Gm-Message-State: AO0yUKWnYvX1IJ6JDjMGUUptPffxszmSqQbN22r+hAvJw3Hv8xJo9HNJ X30RZVxqke1iegp5mIPzLczzpcGiivnbUQ== X-Google-Smtp-Source: AK7set9WI7AqJYVjK3yEEvazblRG+VblNOb80tsNgZZfreZIjTBkGlUoT1eiL2pPscZR/8pwP4MKaw== X-Received: by 2002:a05:6214:234b:b0:568:f263:1c0c with SMTP id hu11-20020a056214234b00b00568f2631c0cmr4474069qvb.21.1675441183086; Fri, 03 Feb 2023 08:19:43 -0800 (PST) Received: from localhost.localdomain ([204.48.94.38]) by smtp.gmail.com with ESMTPSA id dw28-20020a05620a601c00b00728bbe45888sm2105632qkb.10.2023.02.03.08.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 08:19:42 -0800 (PST) From: Maxim Cournoyer Date: Fri, 3 Feb 2023 11:19:26 -0500 Message-Id: <20230203161926.26886-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::f34; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf34.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675441221; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ia3uWM/AKd3vhEqox1/sgaLPuPGiyan9BIXhFgfyrfM=; b=YQlpP5OBeFfLbdbknN6m1m5rqsrNFTyY9bQeBv7G/dH0B01uHKYrptdqW6QE7sDtsrpOSm +Haeo3ouvEbtOmp6S3OHuXThD9zNtbmzS2PM+EzCDL5VYoN6kORnxE0Ox1L8Yw4mJ5SFbL Utai0emJTBjDGZvGCgtXyHQssqH/ka95P6FUISMETRXbC537UfsQVQMx4FuYOo/gq4dLV4 9kPQXqN7u4Zk/1H98Pq/AyNwSp9XSEOdPSLas/MPaG3XUp7lgU8rHT+vzRulrpCezBi3YP NMdkAi4jywb70qbSWd11tkSmjY23sVe7AjL21trAjYfjfzJGPnXJmmHR7GltMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lsOKmf+2; 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=1675441221; a=rsa-sha256; cv=none; b=gEWUg/Hjnxa1q0D5a3DHJL7760qFVIp9BmN89spqzRPmSzgadUiuxxwpBjyyDN6Uc6i0zU 5S//Vt5tzlwPWsK/0dNhN/m5IFihDI5zRkO4YNXmPNThdA2mM799Pdv5SXzCRl8MgtaN90 PK/b7SekXFKV49YFQadoePFpDhz5n3EjVP4n6eUgjVlF2N8Y5tGAC1FIjGSyMHPZvfXb0y UFgA+W6gdsfqkWSNSno56OvUOvsNu5wG/kMxAwyH6Cf0svDlXmLe/6RzPs+A9Cutd5iZLz JdA9bOQYzYbTpSuNJxFogWzxRm94zoVFv4nk6iS2qH9FuRgD9oYGClVeMnzmDw== X-Migadu-Queue-Id: A79F13BBDB X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lsOKmf+2; 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-Migadu-Spam-Score: 4.63 X-Spam-Score: 4.63 X-TUID: 5IuID1Y/W+YW Hello Guix! 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! Maxim Cournoyer (5): pack: Extract keyword-ref procedure from debian-archive. 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. Makefile.am | 2 + doc/guix.texi | 45 +++- guix/gexp.scm | 3 +- guix/rpm.scm | 577 ++++++++++++++++++++++++++++++++++++++++++ guix/scripts/pack.scm | 478 +++++++++++++++++++++++++--------- tests/pack.scm | 331 ++++++++++++++---------- tests/rpm.scm | 86 +++++++ 7 files changed, 1258 insertions(+), 264 deletions(-) create mode 100644 guix/rpm.scm create mode 100644 tests/rpm.scm base-commit: a60c750eec73a2030b08b32af3b9f435c7ecca54 -- 2.39.1