Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2024 17:42:17 +0000
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Cc:        FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: port shares same binary and manual names with base ztest (ZFS)
Message-ID:  <CAFDf7UJpqQCUuOMTCcQffAqJ4yxTOKuB3sCiuTQwOvDa=x-fDw@mail.gmail.com>
In-Reply-To: <20240208231949.3d38ff7dced1b49a4d2e1938@dec.sakura.ne.jp>
References:  <CAFDf7UJyJwdeq_-PBk9a3ZqGrEJLBDzQ83jEAvH7eR=QNrCO=w@mail.gmail.com> <20240201230526.07da35af24e2723b14ebe240@dec.sakura.ne.jp> <CAFDf7U%2BPeOYwjqVze8rwD_ujOBiLU2tMCHKvmDLQfd5b_fXBKg@mail.gmail.com> <20240208231949.3d38ff7dced1b49a4d2e1938@dec.sakura.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello!

I've e-mailed upstream about it and this is getting interesting.
I will paste complete reply here.

######
Hello Nuno,

Nuno Teixeira wrote:
> I'm about to maintain Zutils FreeBSD port (
> https://www.freshports.org/archivers/zutils/ ) and I'm dealing with
> conflicts with base gzip and ZFS ztest.

Thank you! :-)

> Currently, port has set:
> CONFLICTS_INSTALL=3D      gzip # bin/zcat bin/zcmp bin/zdiff bin/zgrep
> man/man1/ztest.1.gz

My opinion about the conflict with the scripts packaged with GNU gzip is
that they should be renamed to gzcat, gzcmp, gzdiff, and gzgrep because the=
y
just understand the formats supported by gzip. This would be in line with
other scripts like bzcat, xzdiff, zstdgrep, and even with the lzdiff and
lzgrep scripts distributed with early versions of lzip.

But meanwhile someone convinces gzip upstream of renaming their scripts, I
have copied from gzip's configure to the INSTALL file of zutils the way of
renaming the scripts:

------------------------------
-------------------------------------------
If you are installing zutils along with GNU gzip and want to keep the
gzip scripts, the recommended method is to configure gzip as follows:

    ./configure --program-transform-name=3D's/^z/gz/'

This renames, at installation time, the gzip scripts and man pages to
'gzcat', 'gzcat.1', etc, avoiding the name clashing with the programs and
man pages from zutils.
-------------------------------------------------------------------------

About the conflict with man/man1/ztest.1.gz, my opinion is that it should b=
e
renamed to something like zfstest or zfs_unit_test, in line with dosfsck,
e2fsck, jfs_fsck, and reiserfsck, because it is not at all obvious that
ztest refers to a ZFS unit test.

Note that the environment variables used by ZFS's ztest already have
sensible names: ZFS_HOSTID ZFS_STACK_SIZE.

> void linux pkg renames binary names to capitals on first letter to
> deal with this.

FWIW, I don't like this idea. I find it fragile and confusing.

Hope this helps.

Antonio.
######

Tomoaki AOKI <junchoon@dec.sakura.ne.jp> escreveu (quinta, 8/02/2024
=C3=A0(s) 14:19):
>
> If you don't consider FAT filesystem or shares on Windows servers
> completely, not so bad.
>
> But once you want carrying files on such as SD cards or USB memstick
> formatted with FAT* filesystem, you cannot sanely save both Zcat and
> zcat, at least by filesystem definition (case-preserving but not
> case-sensitive. Descriptions on Wikipedia [3] seems to be partially
> wrong, as filemanager like original fd on DOS [by A.Idei) could
> rename files including both upper and lower cases and it was
> displayed as saved later on, but could not create Ztst and zTst on
> the same directory).
>
> Not sure FreeBSD implementation of FAT* filesystems (aka msdosfs), but
> on Windoze, basically upper and lower cases are NOT distincted as
> different character on filesystems. (LFN is an extended feature, not
> the filesystem itself.) [2]
>
> [2] https://en.wikipedia.org/wiki/Long_filename
>
> [3] https://en.wikipedia.org/wiki/Filename
>
>
> On Thu, 8 Feb 2024 12:42:29 +0000
> Nuno Teixeira <eduardo@freebsd.org> wrote:
>
> > I've found that void linux rename binaries to first letter as capital:
> > from
> > https://github.com/void-linux/void-packages/tree/master/srcpkgs/zutils/=
files
> > :
> >
> > zutils in Void use a capital first letter:
> > Zcat Zcmp Zdiff Zegrep Zfgrep Zgrep Ztest Zupdate
> >
> > This way we could solve:
> > 1- CONFLICTS_INSTALL=3D      gzip # bin/zcat bin/zcmp bin/zdiff bin/zgr=
ep
> > man/man1/ztest.1.gz
> > and
> > 2- ZFS ztest
> >
> > What's your opinion to introduce this change?
> >
> > Cheers,
> >
> >
> >
> >
> > Tomoaki AOKI <junchoon@dec.sakura.ne.jp> escreveu (quinta, 1/02/2024 =
=C3=A0(s)
> > 14:05):
> >
> > > On Thu, 1 Feb 2024 13:06:15 +0000
> > > Nuno Teixeira <eduardo@freebsd.org> wrote:
> > >
> > > > Hello all,
> > > >
> > > > archivers/ztools shares binary ztest and manual ztest.1 with base Z=
FS.
> > > > Is there a policy to deal with it?
> > > >
> > > > If someone knows a port that shares same issue, please let me know.
> > > >
> > > > /usr/bin/ztest
> > > > /usr/share/man/man1/ztest.1.gz
> > > >
> > > > PREFIX/bin/ztest
> > > > PREFIX/man/man1/ztest.1.gz
> > > >
> > > > Thanks,
> > > >
> > > > --
> > > > Nuno Teixeira
> > > > FreeBSD Committer (ports)
> > >
> > > AFAIK, at least archivers/unzip [1] has the same issue.
> > > But base unzip and its manpage is now a symlink to bsdunzip.
> > >
> > > FYI: command other than `man /usr/local/share/man/man1/unzip.1.gz` fo=
r
> > > unzip shows `man 1 bsdunzip`. even `man -M /usr/local/share/man/man1
> > > unzip` shown bsdunzip's one.
> > >
> > >
> > > [1] https://www.freshports.org/archivers/unzip/
> > >
> > > --
> > > Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>
> > >
> > >
> >
> > --
> > Nuno Teixeira
> > FreeBSD Committer (ports)
>
>
> --
> Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>



--=20
Nuno Teixeira
FreeBSD Committer (ports)



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