Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2022 09:59:41 +0100
From:      Baptiste Daroussin <bapt@freebsd.org>
To:        Chris <portmaster@bsdforge.com>
Cc:        "Patrick M. Hausen" <hausen@punkt.de>, ports@freebsd.org
Subject:   Re: [HEADSUP] Deprecation of the ftp support in pkg
Message-ID:  <20220124085941.lklzatk6u7dnqbuj@aniel.nours.eu>
In-Reply-To: <c36969e9fdd1772788562a06f4d53189@bsdforge.com>
References:  <20220120142519.a5juoe75oppmnyby@aniel.nours.eu> <f1aca07d3cedd30b9a1df6624e950ffb@bsdforge.com> <e10f85c4-ed28-4475-bcbf-d4e572a6b954@FreeBSD.org> <d284c4d5d415fc17d3d7fbed354ddc77@bsdforge.com> <c93d717c-a62e-44ab-b5bf-f109810d65c4@FreeBSD.org> <a517d06c2faeed9883d5da787e4307ed@bsdforge.com> <DEF3FF17-5F38-4E1E-A55C-7E7472826AB9@punkt.de> <c36969e9fdd1772788562a06f4d53189@bsdforge.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 24, 2022 at 12:12:20AM -0800, Chris wrote:
> On 2022-01-23 10:19, Patrick M. Hausen wrote:
> > Hi all,
> > 
> > I did not really have an opinion on this, since we never used FTP,
> > but I was a bit surprised by the suggestion to use SSH instead.
> > 
> > It never occurred to us that anything but HTTP(S) was possible.
> > We simply run Nginx in a jail serving the packages that Poudriere
> > produces for us. Setup time/effort: 5 minutes.
> > 
> > Now after this comment:
> > 
> > > Am 22.01.2022 um 09:35 schrieb Chris <portmaster@bsdforge.com>:
> > > I find it's less "housekeeping" to use ftp(1) setup through inetd(8)
> > > for pkg repos, than
> > > via ssh.
> > 
> > I understand the appeal of FTP.
> > Maybe this discussion is focusing on the wrong topic. Perhaps
> > we should consider including a light weight way to serve HTTP(S)
> > in base? Like Lighttpd, which as far as I know comes with a BSD
> > 3-clause equivalent license.
> > 
> > But then the general tendency has been to remove network services
> > from base rather than introduce them. Like e.g. BIND.
> > 
> > So I really have no idea what the general opinion is, just wanted
> > to throw in that IMHO HTTPS is the best protocol to the task and
> > if some way to serve that could be included in base, I for one would
> > appreciate that.
> > 
> > OTOH Chris, what's keeping you from installing a web server just
> > serving static files?
> Different environments/ different requirements. But habit as much as
> anything else.
> Ftp is trivial, has always been available. So I never even need to think
> about it.
> I perform mass installs/upgrades in large networks. There is no overhead
> using ftp
> either through a one-start | inetd. The clients are all started/used at will.
> It seems to me that removing features also removes value. IMHO the gain from
> the
> removal of transports as trivial as ftp(1) bring little to the table for all
> concerned. But that's just me. :-)
> 

based on the discussion I am adding right now, a new protocol: tcp:// which uses
the protocol we made on top of ssh way simple than ftp and capsicumized on the
server side), but without the requirement for a ssh connection.

This will enable people with performance concern but still willing to have data
encrypted to use spiped or socat for example as a transport.

And for other a simple inetd will work.

on inetd.conf

pkg stream tcp nowait nobody /usr/local/sbin/pkg -- -o SSH_RESTRICT_DIR=/mypackages ssh


and define in /etc/services "pkg" to the port you want pkg to be serving its
files to.

for the repo on the pkg side:

tcp://url:port/mypackages

What do you think?

For me as a maintainer it is very few lines of code to add, the protocol
itself being already written, way easier to suppoer and it provides an interesting feature
by the ability to serve via spiped or inetd.

Best regards,
Bapt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220124085941.lklzatk6u7dnqbuj>