From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uEiRNn7oL2RRBgAASxT56A (envelope-from ) for ; Fri, 07 Apr 2023 11:55:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KDrHNX7oL2QCZAEAG6o9tA (envelope-from ) for ; Fri, 07 Apr 2023 11:55:10 +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 243B117840 for ; Fri, 7 Apr 2023 11:55:08 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkinp-0002E4-JF; Fri, 07 Apr 2023 05:54:41 -0400 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 1pkinn-0002Du-SV for guix-devel@gnu.org; Fri, 07 Apr 2023 05:54:39 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkinl-0004Wf-9J for guix-devel@gnu.org; Fri, 07 Apr 2023 05:54:39 -0400 Received: by mail-wm1-x332.google.com with SMTP id j1-20020a05600c1c0100b003f04da00d07so4246466wms.1 for ; Fri, 07 Apr 2023 02:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680861275; x=1683453275; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9ly0nYqdZDNnGCzLsCvWO5BLVoRcOMNI948CwIavV3E=; b=pqb3kY3SvqXnZfgmqL3gczYkwk/hdyw55teDOoNFTCp2Wu/NrT2nbqAcg6txNcsUwv HCMi9XWf3RwYOX2BLPB3Nei/5gx3o7ugonjYiLZs5uIVb+yu8sWEuS6FcWt21uXnGcK9 WkrWraI0czXVIg2u5qK4cS2sgQY00f7mi4fsFGnIrPqHmWRCtbuL4+6dWJHEhAAJPNyH OxzBcLIBsHAXc3Zny9aD5Onf9MenU4Y+JesPSLT+6acqvvApa2Wtndjc7QavPZqj/BDn LkYyYs/8G4H5fUNTm6imuRsG6CbKrjW/g4glQr+NS/8xZemeX7kOIIhL23TmbyBgrw8t O7yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680861275; x=1683453275; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9ly0nYqdZDNnGCzLsCvWO5BLVoRcOMNI948CwIavV3E=; b=FpGz8pjYjNQyHEa17NvSSLv+TAJaaEKraCsOQqdJ016Y9k29ZMZDbMt/jNMb59D5e+ TbVPX5Ti1stERoeIKwn+YEffc02RSw2x7dOVeto4oNQGcI89w9OBK3zY07BFEQzjE6RR dGeMUifxUGH5ggL5O7oghSuqqJz2/d4JWawDqvWyx3jG1hWAUzRbXpaQSGe7iniCsaLz 6GcxWZKjn3RlU11HBo3kYymnUPpKT1vo69vt2qEW1os2ICD4tYz9rlLtQigrF2/m7/SJ lGrQXtPZugm+dsqfAAwNe+W7hu1teW58RpDg7Qlx2f76cRLX0W4HxVrfm1nxn8CYmIuu kwRA== X-Gm-Message-State: AAQBX9dTrx9mZ4KzFMr1M6WK7yLXs2k8JDKL0hhouWf1k4c4kiiZybCh oSy7tfa8uikagw7ioPubTO2HSSvshwzjaAnO324= X-Google-Smtp-Source: AKy350Zyk770KaqvnGCEkIwcWaSu6r/sgsrG8ntCdtYW0QV6dbO5cFQ3/7bdoXqolM62mz7bHofB8tFXtr4uHt4qPyc= X-Received: by 2002:a05:600c:ca:b0:3e2:1a3f:4ea2 with SMTP id u10-20020a05600c00ca00b003e21a3f4ea2mr245889wmm.7.1680861274835; Fri, 07 Apr 2023 02:54:34 -0700 (PDT) MIME-Version: 1.0 References: <86sfdnrhn1.fsf@posteo.net> <87zg7lx0n4.fsf@riseup.net> In-Reply-To: <87zg7lx0n4.fsf@riseup.net> From: Shivam Madlani Date: Fri, 7 Apr 2023 15:24:23 +0530 Message-ID: Subject: Re: Hello GUIX To: Csepp Cc: pukkamustard , Attila Lendvai , Christopher Baines , guix-devel@gnu.org Content-Type: multipart/alternative; boundary="000000000000340e3105f8bc0375" Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=shivammadlani5@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=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: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680861310; a=rsa-sha256; cv=none; b=o5LrvUlzi41OPpUY/m65y6WaYYQQv64bmZc/YroU+O7iHWnRYRD/dnzWjz0IfN667fRfO4 R4Fvi1/hgwt6myReX++lDzULBqeU2I2uuO1xb+pKGoCr8jm78p7Qcsw58DVQCRyr/mjVhc AlmiTqWwSMH2gHna83vei19f/q3kvcQUQnRiaM/yY1NjCaDpqMEDG7h0cFP/EQa48FI27T umPN9KbGBv2KH5cntaOdkbzOXb9IuiaEUvvh0rewmYaTDdNqqgzRog9GPQxRUFdcgxLLKV kQwfVwz7/GAGQHCPEzHHwJSs64RPNO4WpwNPMEz3Opx1gct+p7tFeA6CtMop3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pqb3kY3S; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680861310; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9ly0nYqdZDNnGCzLsCvWO5BLVoRcOMNI948CwIavV3E=; b=pfwDLdoP4+N/kKQLmw3VaoCIUh43eqLTNMDU+v8RUwg6vs0CdPWBNT1WGUYUHzDYb36WLM /aoPf/y+JGlG5f3rwXc6CPuzncYz+Q4mDGeEVOet22AA8HJ7xkdyVBPgC4nlozCfhCtByh vZeC3FMKM7avTzYfvMmNpOOxo037CMtof2fV20+7mLY9Yl8TVitCZuOD6ncpyKcu9fq+2y n4mpy0HxoTvnEc3XjABTU2Z0Uy5Yf5dQBBYTdC7IBr6a5qxB+1ouQupxvwgRWxacyMu29+ rn6CED3DQmfM0DLk3u/53wUoDqIajj1XXmBoeVi5zf7nkem0syQAvWUXhVD0FA== X-Migadu-Spam-Score: -4.95 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pqb3kY3S; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Spam-Score: -4.95 X-Migadu-Queue-Id: 243B117840 X-TUID: tT/E6oLlrcXl --000000000000340e3105f8bc0375 Content-Type: text/plain; charset="UTF-8" > The NNCP utility might be worth taking a look at. There is a way to set > it up alongside udev to automatically transfer files from connected USB > storage. I did a bit of research at the NNCP util and yes, this can be used for automatic file transfers. We can create a new udev rule that would trigger nncp when a USB device is connected. The directories where the files need to be transferred can be done by creating a config file for NNCP and setting the 'nncpdir' variable as the desired path. Further customization can be done by altering the nncp config and udev rules. I also took a look at the rsync utility which is more widely used but does not provide features like encryption and compression. Although, it does have a feature that transfers only the changes within the file instead of the whole file (better transfer speeds). Personally, I think nncp is a better choice here as it provides more features and the tradeoff for using rsync is not that much. Regards, Shivam On Thu, 6 Apr 2023 at 06:55, Csepp wrote: > > Shivam Madlani writes: > > > Thanks a lot for the feedback!! > > > >> Reading from a disk maybe should happen automagically if it can be > >> detected (and is enabled in some configuration). This might also > >> require some integration with udisks. The complexity of this should > >> not be underestimated. > > > > We can set it up in such a way that on running `guix install {xyz}` it > will first check for mounted drives in /media > > directory and install {xyz} if it's present in the drive. > > > >> Writing packages to a USB stick seems to be closer to a `guix > >> publish` or `guix deploy`. Maybe you can read up on those commands > >> and think of a nice way to publish or deploy a set of packages to a > >> USB stick. This is also relevant for publishing to other p2p > >> networks (IPFS, GNUnet, etc.). > > > > Perhaps, We can introduce a new utility? (maybe something like `guix > sneak`). This will scan for external drives > > and on detecting a drive it will encode and store the nars into it. > > The size of the drive can cause an issue here in case the content to be > encoded is very large. In this case an > > appropriate error message will be displayed. Although this is rare as > flash drives/hard drives have a lot of storage > > capacity these days but it's still a thing to consider. > > > > Another way would be to use `guix publish` itself to do all of this. We > can introduce a flag `--sneak` which instead > > of spawning an HTTP server, encodes and stored into the drive. But i > don't think we should modify an already > > existing utility for this. I would like to hear your thoughts on this. > > The NNCP utility might be worth taking a look at. There is a way to set > it up alongside udev to automatically transfer files from connected USB > storage. > --000000000000340e3105f8bc0375 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> The NNCP utility might be worth taking a look at.=C2= =A0 There is a way to set
> it up alongside udev to automatically tra= nsfer files from connected USB
> storage.

I did a = bit of research at the NNCP util and yes, this can be used for automatic fi= le transfers.=C2=A0
We can create a new udev rule that would trig= ger nncp when a USB device is connected. The directories where the files ne= ed to be transferred=C2=A0can be done by creating a config file for NNCP an= d setting the 'nncpdir' variable as the desired path. Further custo= mization can be done by altering the nncp config and udev rules.
=
I also took a look at the rsync utility which is more widely= used but does not provide features like encryption and compression. Althou= gh, it does have a feature that transfers only the changes within the file = instead of the whole file (better transfer speeds).=C2=A0

Personally, I think nncp is a better choice here as it provides mor= e features and the tradeoff for using rsync is not that much.
Regards,
Shivam

On Thu, 6 Apr 2023 at 06:55, Cse= pp <raingloom@riseup.net>= wrote:

Shivam Madlani <shivammadlani5@gmail.com> writes:

> Thanks a lot for the feedback!!
>
>>=C2=A0 Reading from a disk maybe should happen automagically if it = can be
>>=C2=A0 detected (and is enabled in some configuration). This might = also
>>=C2=A0 require some integration with udisks. The complexity of this= should
>>=C2=A0 not be underestimated.
>
> We can set it up in such a way that on running `guix install {xyz}` it= will first check for mounted drives in /media
> directory and install {xyz} if it's present in the drive.
>
>> Writing packages to a USB stick seems to be closer to a `guix
>>=C2=A0 publish` or `guix deploy`. Maybe you can read up on those co= mmands
>>=C2=A0 and think of a nice way to publish or deploy a set of packag= es to a
>>=C2=A0 USB stick. This is also relevant for publishing to other p2p=
>>=C2=A0 networks (IPFS, GNUnet, etc.).
>
> Perhaps, We can introduce a new utility? (maybe something like `guix s= neak`). This will scan for external drives
> and on detecting a drive it will encode and store the nars into it. > The size of the drive can cause an issue here in case the content to b= e encoded is very large. In this case an
> appropriate error message will be displayed. Although this is rare as = flash drives/hard drives have a lot of storage
> capacity these days but it's still a thing to consider.
>
> Another way would be to use `guix publish` itself to do all of this. W= e can introduce a flag `--sneak` which instead
> of spawning an HTTP server, encodes and stored into the drive. But i d= on't think we should modify an already
> existing utility for this. I would like to hear your thoughts on this.=

The NNCP utility might be worth taking a look at.=C2=A0 There is a way to s= et
it up alongside udev to automatically transfer files from connected USB
storage.
--000000000000340e3105f8bc0375--