From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: nspawn-tramp Date: Sat, 19 Feb 2022 10:05:15 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13597"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Brian Cully Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 19 16:08:42 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nLRLl-0003MU-Ej for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Feb 2022 16:08:41 +0100 Original-Received: from localhost ([::1]:56176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLRLk-0000go-88 for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Feb 2022 10:08:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLRJi-00085Q-41 for emacs-devel@gnu.org; Sat, 19 Feb 2022 10:06:37 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLRIr-0005ey-8e for emacs-devel@gnu.org; Sat, 19 Feb 2022 10:06:32 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6CCAD440A47; Sat, 19 Feb 2022 10:05:18 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A1278440A41; Sat, 19 Feb 2022 10:05:16 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1645283116; bh=q6ZjqJHfjvPGPlc71nvxfgQVmi5t3OL8I0+pZOg0UAM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=TD35Ur92novCOKhQmknkS4+lRbDxjQgsTLzSWwIfNBOXuKwjQlkgXpw/WfkiuL3qw hb92zN5CgIqJlazN/1e/GeBXIZaNDpWHK+txwkUXKjWUBJ5OvKVjdlEjSiBwxFURD0 MP2Zmaw2YShMC3j1FleyuVuBtmajiOWfugeL5lLEov1jyQnM7cwuuBGMr9ajkyvtb1 RkqhgQ/EjFo4fEt2QkS8bMjSxa+/Yhu7FOMJxXm9BV/MJfWI+BJWgbNCuVSDd+ehYn gBG1QpDQae+Php+21WfiagIaguQ4L9mwkJDSGxg5JvQ5w3pVNYBwN2j9H3eiXG95yU 1uyFgXsHZ55VA== Original-Received: from pastel (unknown [45.72.237.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6769612037B; Sat, 19 Feb 2022 10:05:16 -0500 (EST) In-Reply-To: (Brian Cully's message of "Sat, 19 Feb 2022 09:09:22 -0500") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286470 Archived-At: > This is a package that allows TRAMP to use systemd-nspawn based > containers (typically used with machinectl). > > I've been dogfooding this myself for about a year now, and I hope > that others in the community will find it useful. > > The package source can be found at: https://github.com/bjc/nspawn-tramp > > If it gets accepted to ELPA, I'll adjust the README.org to include > instructions for how to install it from there. I'd be happy to add it to GNU ELPA, but I have a few questions/comments some of which may affect this decision, so I haven't done it yet: - It's usually spelled "Tramp" rather than "TRAMP", AFAIK. - I suggest you clarify that this is not about Tramp using (internally) nspawnd to increase its security. So instead of "allows TRAMP to work with containers", I'd say something like "teaches Tramp to access nspawnd containers"? - `nspawnd-tramp` suggests this adds Tramp support to nspawnd rather than the reverse. - Any reason why you want to have it as a separate package rather than add it to Tramp? - `nspawn-tramp-machinectl-path` does not hold a "path" (like $PATH and `load-path`) but a "file name", please follow the GNU convention. Stefan diff --git a/nspawn-tramp.el b/nspawn-tramp.el index e5233406fe..9b1cb0c795 100644 --- a/nspawn-tramp.el +++ b/nspawn-tramp.el @@ -1,6 +1,6 @@ ;;; nspawn-tramp.el -- TRAMP integration for systemd-nspawn containers -*= - lexical-binding: t; -*- =20 -;; Copyright =C2=A9 2021 Free Software Foundation, Inc. +;; Copyright =C2=A9 2021-2022 Free Software Foundation, Inc. =20 ;; Author: Brian Cully ;; Maintainer: Brian Cully @@ -39,11 +39,11 @@ ;; ;; Open a file on a running systemd-nspawn container: ;; -;; C-x C-f /nspawn:user@container:/path/to/file +;; C-x C-f /nspawn:USER@CONTAINER:/path/to/file ;; ;; Where: -;; =E2=80=98user=E2=80=99 is the user on the container to con= nect as (optional) -;; =E2=80=98container=E2=80=99 is the container to connect to +;; USER is the user on the container to connect as (optional) +;; CONTAINER is the container to connect to ;; ;; ## Privileges ;; @@ -70,7 +70,7 @@ :link '(emacs-commentary-link :tag "Commentary" "nspawn-tramp")) =20 (defcustom nspawn-tramp-machinectl-path "machinectl" - "Path to machinectl executable." + "File name of machinectl executable." :type 'string :group 'nspawn-tramp) =20 @@ -93,7 +93,7 @@ see its function help for a description of the format." =20 =20 (defun nspawn-tramp--add-method () - "Add TRAMP method handler for nspawn conainers." + "Add TRAMP method handler for nspawn containers." (push `(,nspawn-tramp-method (tramp-login-program ,nspawn-tramp-machinectl-path) (tramp-login-args (("shell")