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 6DiUE8dVaGJ/dAAAbAwnHQ (envelope-from ) for ; Tue, 26 Apr 2022 22:27:51 +0200 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 YNvJE8dVaGL5LwEA9RJhRA (envelope-from ) for ; Tue, 26 Apr 2022 22:27:51 +0200 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 CEA54387BC for ; Tue, 26 Apr 2022 22:27:50 +0200 (CEST) Received: from localhost ([::1]:48348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njRmn-00079I-F9 for larch@yhetil.org; Tue, 26 Apr 2022 16:27:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njRdK-0006FH-JM for guix-patches@gnu.org; Tue, 26 Apr 2022 16:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46724) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njRdK-00089R-52 for guix-patches@gnu.org; Tue, 26 Apr 2022 16:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1njRdK-00087p-0n for guix-patches@gnu.org; Tue, 26 Apr 2022 16:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54997] [PATCH 00/12] Add "least authority" program wrapper Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Apr 2022 20:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54997 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Thiago Jung Bauermann Cc: 54997@debbugs.gnu.org Received: via spool by 54997-submit@debbugs.gnu.org id=B54997.165100427631220 (code B ref 54997); Tue, 26 Apr 2022 20:18:01 +0000 Received: (at 54997) by debbugs.gnu.org; 26 Apr 2022 20:17:56 +0000 Received: from localhost ([127.0.0.1]:40621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njRdE-00087T-Af for submit@debbugs.gnu.org; Tue, 26 Apr 2022 16:17:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njRdB-00087E-Nc for 54997@debbugs.gnu.org; Tue, 26 Apr 2022 16:17:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39996) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njRd5-00088A-DE; Tue, 26 Apr 2022 16:17:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Vq/HzkxHuh1q9r5D+G5dNUMfsvOFNZg/beXmqq7DyGk=; b=mVnWnILQVRbq+UO+Qs5X 0ZYlEAGC5dfRvfeitaSzRIveLZSeoEHyFdbfwhM0X/zPGfiaCN8VR19TbVXcJ1k2JmPh/Vs6f3rJl 2PCxbx+ZyV/84UP379Vd37hInZDtgldFIQOrZHHe2uy61RcQNEV3uNqdlwHBIyxcbLyF3li7tEv+r wgWForJSI7kRi6QLlObK/Ynejq14N2pigeyNA9rGTWu8siQn7sCTTTbSpL7jkoGA9YsrU9PbSRNkU 5s9BtpkmpGbRRs46efrByJXqxdH2FITJPnnUwUYkW+PXjOkkbOY6ZCzwdGmkbxDK1yPoTSYJUZWgE lqJoVTEU+blQ3g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:64923 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njRd5-0003kb-1H; Tue, 26 Apr 2022 16:17:47 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220417210107.27263-1-ludo@gnu.org> <20220417210453.27884-1-ludo@gnu.org> <871qxpvh04.fsf@kolabnow.com> Date: Tue, 26 Apr 2022 22:17:44 +0200 In-Reply-To: <871qxpvh04.fsf@kolabnow.com> (Thiago Jung Bauermann's message of "Fri, 22 Apr 2022 02:01:39 -0300") Message-ID: <874k2flhuf.fsf_-_@gnu.org> 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 X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651004870; 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=Vq/HzkxHuh1q9r5D+G5dNUMfsvOFNZg/beXmqq7DyGk=; b=ZnQgRYAadR3+w/l33+kJ8pnuS1wKuL+iA1wivRmHpxRgVUl0xSiUXCiIL6hHKzaOosUVNU FvsRA+TwYX2Q0NdLcEp3l3yAfHvt4XtarOBd5mgPkUIHBSDf1oxMSf77BU2XeqxvDLviKA yl7m52XDjhvTmF+juZ+IrRnhxVHJFwMGNvkuXfwK6+KAd4duT+yepWY/GlPORhf2TvNcy+ q42RcNEg0K3Q7jkLHZtfltLb4BjrGkSY2vReqHN/0PEem2NJVG5QSIWshcMmxYfOZSocvl 04epX7upDjgN3Ho2IkYWt7QETrNiNNUGvIZkoI5hVRjxX8sP+jcfZBRFqxuWhA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651004870; a=rsa-sha256; cv=none; b=r8nlg1UVGwaRFaIZ6EKE/+m9/597RhFzCpwx7c5j8bC/8Mhr4ni6eexjrVdXOgOyiDc+/+ otKbQMQ5buh3zu5hmX/jo+8lEscVz3+mUH0mcZKEnETgqfIGFbvTTmE8dzwvfwrVEZKy69 KhsfAgfh2Qi9jskGwEPIQlOdk5l5XX5+J3U9CFC/qs2TWJG97Dt3yxO6RigQPfE+47I/KO QTcZO0Xp5c52rGTlt2e/4+Thy8uMmwdWWLa6GUggJGwThUk/woI/14c53MFBmj03OAR9Lm DqvLgREnnwAkugHxIadSDXpZ09vbKts6WfnPSZJ6cJHZM5flK7hteK1NPH03OQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=mVnWnILQ; dmarc=pass (policy=none) header.from=gnu.org; 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: -3.91 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=mVnWnILQ; dmarc=pass (policy=none) header.from=gnu.org; 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-Queue-Id: CEA54387BC X-Spam-Score: -3.91 X-Migadu-Scanner: scn1.migadu.com X-TUID: s3uyzmU5RWwq Hi Thiago, Thiago Jung Bauermann skribis: > This is an awesome series! It will be yet another strength of Guix to > have many services as possible (and even desktop apps, hopefully) > isolated. Thanks. :-) > Ludovic Court=C3=A8s writes: > >> + (define (read-graph port) >> + ;; Return the list of references read fr= om >> + ;; PORT. This is a stripped-down versio= n of >> + ;; 'read-reference-graph'. >> + (let loop ((items '())) >> + (match (read-line port) >> + ((? eof-object?) >> + items) >> + ((? string? item) >> + (let ((deriver (read-line port)) >> + (count >> + (string->number (read-line p= ort)))) >> + (drop-lines port count) >> + (loop (cons item items))))))) > > I'm sure I'm being dense, but I don't see how =E2=80=98item=E2=80=99 can = change between > iterations of this loop. Each iteration reads a new line from PORT, an input port on a text file. The file is created by guix-daemon and has a format like this: FILE DERIVER NUMBER-OF-REFERENCES REF1 ... REFN where each FILE is a store item (see store-copy.scm for details). Here we only care about FILE and REF*. > Which in my mind means that =E2=80=98read-graph=E2=80=99 can only return = a list where > the original =E2=80=98item=E2=80=99 argument from =E2=80=98references-fil= e=E2=80=99 is repeated many > times over. I ran the tests/gexp.scm test and all tests pass, so this > code must be working... I think it does! :-) It wouldn=E2=80=99t hurt to add a call to =E2=80=98delete-duplicates=E2=80=99 though. Ludo=E2=80=99.