Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2024 05:53:22 -0800
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        Renato Botelho <garga@FreeBSD.org>
Cc:        Cy Schubert <Cy.Schubert@cschubert.com>, Kyle Evans <kevans@FreeBSD.org>, freebsd-arch@freebsd.org
Subject:   Re: Removing shar(1)
Message-ID:  <20241219135322.47993177@slippy.cwsent.com>
In-Reply-To: <1df5d06a-14e9-4268-995e-72e504b5d70a@FreeBSD.org>
References:  <0d63a94d-2773-4efd-b789-0b753ab38b91@FreeBSD.org>  <20241218221323.9EA84179@slippy.cwsent.com> <1df5d06a-14e9-4268-995e-72e504b5d70a@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <1df5d06a-14e9-4268-995e-72e504b5d70a@FreeBSD.org>, Renato 
Botelho w
rites:
> On 18/12/24 19:13, Cy Schubert wrote:
> > In message <0d63a94d-2773-4efd-b789-0b753ab38b91@FreeBSD.org>, Kyle Evans
> > write
> > s:
> >> Hi,
> >>
> >> I was reminded the other day that shar(1) exists, though it's use is no
> >> longer recommended in ports.  The same functionality can be found in
> >> tar(1) instead, so I think we should deorbit /usr/bin/shar and stop
> >> promoting it entirely.  sh(1) archives are really problematic from a
> >> user standpoint for at least one reason best explained by the manpage:
> >>
> >>    It is easy to insert trojan horses into shar files.  It is strongly
> >>    recommended that all shell archive files be examined before running
> >>    them through sh(1).  Archives produced using this implementation of
> >>    shar may be easily examined with the command:
> >>
> >>         egrep -av '^[X#]' shar.file
> >>
> >> It's hard to advocate for their use in good conscience, much like it's
> >> hard to advocate curl|sh pipes.
> >>
> >> Review: https://reviews.freebsd.org/D48130
> > 
> > I use it at $JOB, produce a shar file, cut/paste into a terminal.
> > 
> > Should it be removed I'll perform the repo surgery to base a port on it.
>
> As mentioned in this thread, you can use `tar` to create shar file:
>
> # tar -cf file.share --format shar ./foo

And there's GNU sharutils as well.

I've simply extracted it into its own repo for use in a port. Seems the 
consensus of the reviewers of https://reviews.freebsd.org/D48130 agree. As 
I said before, this is not the proper place to discuss the removal. There 
is active discussion on FreeBSD-arch.

>
> -- 
> Renato Botelho


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e^(i*pi)+1=0





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