From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AFVTFlZd22BuHgAAgWs5BA (envelope-from ) for ; Tue, 29 Jun 2021 19:50:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YMcCElZd22BfaAAAB5/wlQ (envelope-from ) for ; Tue, 29 Jun 2021 17:50:14 +0000 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 AF71E3175B for ; Tue, 29 Jun 2021 19:50:13 +0200 (CEST) Received: from localhost ([::1]:50314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyHsC-0000YM-F9 for larch@yhetil.org; Tue, 29 Jun 2021 13:50:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyHs2-0000Ts-QG for guix-patches@gnu.org; Tue, 29 Jun 2021 13:50:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyHs2-0000to-Hj for guix-patches@gnu.org; Tue, 29 Jun 2021 13:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lyHs2-0003Y4-Ct for guix-patches@gnu.org; Tue, 29 Jun 2021 13:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49149] [PATCH 0/7] Add deb format for guix pack. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Jun 2021 17:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49149 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 49149@debbugs.gnu.org Received: via spool by 49149-submit@debbugs.gnu.org id=B49149.162498896713593 (code B ref 49149); Tue, 29 Jun 2021 17:50:02 +0000 Received: (at 49149) by debbugs.gnu.org; 29 Jun 2021 17:49:27 +0000 Received: from localhost ([127.0.0.1]:55268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyHrT-0003XA-1L for submit@debbugs.gnu.org; Tue, 29 Jun 2021 13:49:27 -0400 Received: from mail-qt1-f182.google.com ([209.85.160.182]:40810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyHrR-0003Wv-C2 for 49149@debbugs.gnu.org; Tue, 29 Jun 2021 13:49:25 -0400 Received: by mail-qt1-f182.google.com with SMTP id t9so16726420qtw.7 for <49149@debbugs.gnu.org>; Tue, 29 Jun 2021 10:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=L6ca82scihmb1jsxvcTgxMHO6XrFaHsMzadKlDoMPGk=; b=FB3Jid1Lzfdr4AFKyzI6yivHtMWZJxpZk/MqnkVgvWuG4ZNt7V2/yk1uZgDhX3B/K+ YVo1l4pT4O+12njqrhoSU9xm2rwDcLAoCgXwHn4QO1MTYZKTgVDAmqpcbL7pb8aR6uYu Qgmu3kMH0Y0ds5p1WlBo0c3MNDWKf72kCeRibhiS2kiqSttI1Y02CGLiyyt4c3CLgshJ waLCPIOmUyQG+zrTuPR1M6sjvkDKxuzetadmMo0RfdJ0WP/RnThlIrb7AZ6gSTvKEOiJ MYuFolCz69xCRIrit/zhrX08aFxS469ezjaVx1QcsCufXzItWIgAW7kqUNr2hdQsr2qb w4UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=L6ca82scihmb1jsxvcTgxMHO6XrFaHsMzadKlDoMPGk=; b=rqDUGzPDLsQdEthHlIlWaq6M6xpqEPod7BWggyMZW4bCKcMEtfAFo0RYMU5bqUiE3L 5XUbxTo9sJBdj4jyP9zR5CkUu0NKwFXUNmAHiJVpioKfu5iulm7VC8pURDdFlDdUY6hj xCXv3MTWv9xRYoOZsqGZmh1dAbC+ujtuRYBPB4Sxf18EBCQqX73hgvUHmqm83R/e8UuL 47WedAWXhQUYeX9ET7iM+ppkuy90Dc/boCIwec02YeX3F1uN3oqvEiNAU9oDm0nHwaCK InpI1iqlCzetOLPh07mvfYBqiPV6T7tlfMlxBEhFJdkKRDifS/d4d7BJifxfL3Dt4/cm LbQg== X-Gm-Message-State: AOAM533AFBBnuSj9BF+Wam1ChyQXYSLCOxZkSAFNCu04RzY0hPayrKOn UUzRpmjBMFErjYHV3nmR5voJ67Ad6+1JBA== X-Google-Smtp-Source: ABdhPJwpQqIjSuRor6oae9bin4pj2AnBkmxRLy2lkenQNuvpk5MhrRhp9A/HKEbP1CvFYEU34SwlBA== X-Received: by 2002:a05:622a:170d:: with SMTP id h13mr27587305qtk.264.1624988959627; Tue, 29 Jun 2021 10:49:19 -0700 (PDT) Received: from hurd (dsl-10-148-155.b2b2c.ca. [72.10.148.155]) by smtp.gmail.com with ESMTPSA id h1sm4107957qkm.50.2021.06.29.10.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 10:49:19 -0700 (PDT) From: Maxim Cournoyer References: <20210621061039.31557-1-maxim.cournoyer@gmail.com> <87eecsuv85.fsf@gnu.org> Date: Tue, 29 Jun 2021 13:49:18 -0400 In-Reply-To: <87eecsuv85.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 23 Jun 2021 23:28:10 +0200") Message-ID: <87k0mcv9wh.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624989014; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=L6ca82scihmb1jsxvcTgxMHO6XrFaHsMzadKlDoMPGk=; b=YWPkfpJMrpYt3CQzGqCvrSDTxE9LQ/iwb7sK+jfI69G0pIzcktieP2fphU1REqhSJYuYKu ntyareoUmtoViO6UIcs27zieLjgmMWgZMxiPpGT6AMTNPb74BEjlHKKcu7eoZkNfAkEn9y YI39AzkGrZs9z2oQ/QRxpqRP6EfuVaNCalPPx5F5o5HNaQm+0u7G1M21N3oTuVE/B0C63n fBihEWJiSLUmT+DIJ/3g16larAScSIOenzGM7/Krdyssxuvpj0WuHQ03b0doAunVnpX+/B lzhmEHC10PgKxMxtZkB+rvxCAp0q9lqBWjX/kjDfH6o0wnrPs8RlR9+mQSY+Pg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624989014; a=rsa-sha256; cv=none; b=p/c3bvw0l4lY70wRp2IIi4GsdoA3ay+ViM7k7xgUu5SPzVHk8OIvTEqKXywbhzCdKMNW+t 93x885XEigFYCi9ClTNM9R15TE89Z7lrGBABn2NKOISgSDm7TioyT5gKxvTB7c8asTQyql SoY9R5ebGbnI6Jgzt2Dpa/PX4fMc5Tc0YxgnXapOnhBmDNiDEEQmPq1kzbPczJfKgUn/sK r5nfKR1aKd9BWrPGIE04+mSe6CV8okfxFU7llETLcJQ+MuU1qPKMbV7/ERy08mDPtSIjE6 +XQHHZmLvEZPU7ruKSoEIeFrtQ+yNqd+kNpaftN2fx1mOH8g8jbUH1qN1Yg1wA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=FB3Jid1L; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=FB3Jid1L; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: AF71E3175B X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZMh66/UORq0U Hello! Seems this one had fallen into the cracks of my hundred something long mailbox. Sorry! Ludovic Court=C3=A8s writes: > Hello! > > Maxim Cournoyer skribis: > >> This patch set adds support to produce Debian archives (.deb packages) v= ia >> guix pack. It's rudimentary but functional. You can try a simple examp= le >> like so: >> >> $ ./pre-inst-env guix pack -f deb -C xz hello -S /usr/bin/hello=3Dbin/he= llo >> >> Copy the generated .deb to your dpkg-based distribution of choice, then: >> >> $ sudo apt install ./91ypmi1j5py9qk034kki5wrgy0n52yz9-hello-deb-pack.deb >> >> $ realpath $(which hello) >> /gnu/store/lk9cmjjhgxpkxxi7m54y0jlv3rqvpb2n-hello-2.10/bin/hello >> $ hello >> Hello, world! >> >> Fun, no? We can now distribute software built with Guix transparently t= o any >> Debian-based distribution. > > Definitely fun. :-) > > As briefly discussed on IRC, I wonder what happens when installing > multiple such .deb files, and removing them selectively. There=E2=80=99s= of > course going to be overlapping store items. > Apparently, dpkg will happily overwrite them when you install (and > that=E2=80=99s fine, if they have the same name, they=E2=80=99re identica= l), but what > happens when you remove one of them? Does it, for instance, remove > /gnu/store/=E2=80=A6-glibc just because it =E2=80=9Cbelongs=E2=80=9D to t= hat package, without > noticing that it also belongs to other installed packages? Actually, dpkg will error with a conflict message if two distinct packages try to install the same file. Only a package with the same name can overwrite itself. > If dpkg cannot deal with that, it=E2=80=99s equivalent to a tarball pack = for all > practical purposes, except you=E2=80=99d run =E2=80=9Csudo apt=E2=80=9D i= nstead of =E2=80=9Csudo tar=E2=80=9D. Given you can't install two conflicting packages, the issue of removing the files of another package cannot arise. In practice that means that the current implementation of 'guix pack -f deb' would only allow installing *one* such .deb package on a system at a time (most applications will carry the glibc and thus conflict for example). For a multi deb-pack scenario, we could have each .deb install their own files under for example /opt/guix/deb-packs/$name/gnu/store... via the relocatable option. > WDYT? Is our official Debian ambassador around? :-) > > A complementary approach would be to transparently build Guix packages > in a Debian VM, with an FHS layout, and with dependencies on Debian > packages. I remember there were tools for that in Nixpkgs back in the > day, using Checkinstall to generate the actual .deb file. It could be fun! Although my next 'guix pack' hack will have to be --format=3Drpm, to complement this one ;-). Thanks! Maxim