From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uHzeBd3Zrl/+RgAA0tVLHw (envelope-from ) for ; Fri, 13 Nov 2020 19:09:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sD3eAd3Zrl9eaQAA1q6Kng (envelope-from ) for ; Fri, 13 Nov 2020 19:09:17 +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 6949C9401BF for ; Fri, 13 Nov 2020 19:09:16 +0000 (UTC) Received: from localhost ([::1]:39648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdeRd-0006Q7-Hg for larch@yhetil.org; Fri, 13 Nov 2020 14:09:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdeRS-0006Pw-8J for bug-guix@gnu.org; Fri, 13 Nov 2020 14:09:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdeRR-0000Kr-T7 for bug-guix@gnu.org; Fri, 13 Nov 2020 14:09:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdeRR-0003K3-M8 for bug-guix@gnu.org; Fri, 13 Nov 2020 14:09:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#44612: Read standard input in `guix repl' Resent-From: Bengt Richter Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 13 Nov 2020 19:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44612 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Pierre Neidhardt Received: via spool by 44612-submit@debbugs.gnu.org id=B44612.160529452712751 (code B ref 44612); Fri, 13 Nov 2020 19:09:01 +0000 Received: (at 44612) by debbugs.gnu.org; 13 Nov 2020 19:08:47 +0000 Received: from localhost ([127.0.0.1]:49355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdeRD-0003Jb-Ac for submit@debbugs.gnu.org; Fri, 13 Nov 2020 14:08:47 -0500 Received: from imta-38.everyone.net ([216.200.145.38]:39920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdeRB-0003JS-3s for 44612@debbugs.gnu.org; Fri, 13 Nov 2020 14:08:46 -0500 Received: from pps.filterd (omta003.sj2.proofpoint.com [127.0.0.1]) by imta-38.everyone.net (8.16.0.43/8.16.0.43) with SMTP id 0ADJ3XGo009649; Fri, 13 Nov 2020 11:08:41 -0800 X-Eon-Originating-Account: pJlhn3Oo52uqFzjuKefgTIpEBnsHdJz0LVKjLg3qO4E X-Eon-Dm: m0116293.ppops.net Received: by m0116293.mta.everyone.net (EON-AUTHRELAY2 - 5a81d37d) id m0116293.5f8a0270.49e42a; Fri, 13 Nov 2020 11:08:39 -0800 X-Eon-Sig: AQMHrIJfrtm3hTU9hwIAAAAC,e9daf5eae201bd50a0c3fbd3792ce9ba X-Eip: xHPpAksFyr-34p-k0eiM0RPZelzGhecmn2oTH2p0oQE Date: Fri, 13 Nov 2020 20:08:30 +0100 From: Bengt Richter Message-ID: <20201113190830.GA2995@LionPure> References: <87h7ptzj8t.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87h7ptzj8t.fsf@ambrevar.xyz> User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-13_17:2020-11-13, 2020-11-13 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 impostorscore=0 malwarescore=0 mlxlogscore=651 adultscore=0 phishscore=0 mlxscore=0 suspectscore=0 clxscore=1034 lowpriorityscore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011130123 X-Spam-Score: 3.5 (+++) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: 2.5 (++) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bengt Richter Cc: 44612@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -0.51 X-TUID: FWPCFf63UuWU Hi Pierre, On +2020-11-13 10:41:38 +0100, Pierre Neidhardt wrote: > `guix repl` is a fantastic, hassle-free tool to bind Guix with > third-party languages. I've done it here: > > https://github.com/atlas-engineer/nyxt/blob/2-pre-release-4/libraries/ospama/ospama-guix.lisp > > It just works! > > The only issue is that it needs to be passed a file, so I must create a > temporary file so that I can call `guix repl` on it. > > It'd be better if we could send Guile code to the standard input of the > `guix repl -` process to bypass file generation. > > Thoughts? > Would this enable people to type something like wget -O - http:try.this.for.example.com/fun.mischief|guix repl - and if so, can you suggest some options for automatic hash or signature checking so that a paranoid could feel safe using a file pointed to by a friend? (I know one can already do silly stuff ... :) I was hoping for a concise option that would enable a standard way of doing integrity/trust checks by the stdin bufferful within guix. (Which I guess implies designing fun.mischief file syntax as some kind of container packet stream, with individually verifiable packets -- what would that mean for input to guix repl?). Maybe a --paranoid option at the level of --dry-run or -n ? (maybe configurable as default --paranoid=on :) As far as avoiding file generation, a pipeline that needs file-size chunks to do validation checks would only avoid file inode supply limits, right? I guess YMMV per platform? IPC also has supply limits, IIRC. Hm, what about an option for guix like guix --trust-manifest="file-containing-sufficient-verification-info-for-what-happens-next" repl - meaning e.g., sha256sum value for what would be passed via '-' and if that contains references to other files etc., than hashes or signatures etc for everything entailed. > -- > Pierre Neidhardt > https://ambrevar.xyz/ -- Regards, Bengt Richter