From: Kyohei Kadota <lufia@lufia.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
lufia via GitGitGadget <gitgitgadget@gmail.com>,
Git List <git@vger.kernel.org>
Subject: Re: [PATCH 3/4] Fit to Plan 9's ANSI/POSIX compatibility layer
Date: Mon, 10 Aug 2020 19:53:46 +0900 [thread overview]
Message-ID: <CAFMepckAe9r1O8xrQemytHoZKeyLSjEpfdH=yP=+SzKPoCOf8w@mail.gmail.com> (raw)
In-Reply-To: <xmqq5z9vlk5q.fsf@gitster.c.googlers.com>
>
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
>
> > I will note that usually the project prefers to have a human's personal
> > name here and in the commit metadata instead of a username. Junio may
> > chime in here with an opinion.
>
> Thanks, I just did.
>
> >> command_list () {
> >> - eval "grep -ve '^#' $exclude_programs" <"$1"
> >> + eval "grep -v -e '^#' $exclude_programs" <"$1"
> >
> > Is it really the case that Plan 9's grep cannot deal with bundled short
> > options? That seems to be a significant departure from POSIX and Unix
> > behavior. Regardless, this should be explained in the commit message.
>
> I am not interested in this ball of wax, but there are some pieces
> that are worth salvaging. This is one of those good bits.
>
> diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
> index 9db2f4feab..a7cc01caf9 100755
> --- a/GIT-VERSION-GEN
> +++ b/GIT-VERSION-GEN
> @@ -26,7 +26,7 @@ else
> VN="$DEF_VER"
> fi
>
> -VN=$(expr "$VN" : v*'\(.*\)')
> +VN=${VN#v}
>
> if test -r $GVF
> then
>
> BUT.
>
> Dealing with "grep" that cannot take "-ve" and forces developers to
> spell it as "-v -e" is not one of them. So is forbidding use of
> "cut".
I see. I will rewrite Plan 9's ape/grep to handle bundled options well.
> >> get_categories () {
> >> - tr ' ' '\n'|
> >> + tr ' ' '\012'|
> >
> > Okay, I guess. Is this something we need to handle elsewhere as well?
> > The commit message should tell us why this is necessary, and what Plan 9
> > does and doesn't support.
>
> Yeah, POSIX does want you to understand '\n' and others, but this is
> within reason for portability that I think we could swallow.
I'm happy, thanks.
> >> +if test -z "$(echo -n)"
> >> +then
> >> + alias print='echo -n'
> >> +else
> >> + alias print='printf %s'
> >> +fi
> >
> > Let's avoid an alias here (especially with a common builtin name) and
> > instead use a shell function. Maybe like this (not tab-indented):
> >
> > print_nonl () {
> > if command -v printf >/dev/null 2>&1
> > then
> > printf "%s" "$@"
> > else
> > echo -n "$@"
> > fi
> > }
>
> I'd rather not to see this done; "echo -n" and "echo '...\c'" are
> not portable and we do want people to use 'printf'. This directly
> goes against it.
>
> > This is also going to need some patching in the testsuite, since we use
> > printf extensively (more than 1300 times). I do hope you have perl
> > available.
>
> Eh, so what would Plan9 people do with Perl? Write a single-liner
> 'printf' script and put it in a directory on their $PATH?
>
> I am not sure if it is worth crippling the toolset our developers
> are allowed to choose from and use in our scripts and tests like
> this patch tries to do.
Like other topics, I decide to implement printf(1).
These new POSIX tools will be installed to Plan 9 systems
from other repo or patches before building git.
> If this were Windows, it might have been a different story, but what
> we are talking about is Plan 9, which had the last "fourth edition"
> in 2002, right? During the 18 years since then, none of its users
> and developers work on porting many OSS packages, whose primary user
> base are on POSIXy systems, to it and we need to apply patches like
> these to each and every OSS packages of interest? I would have
> expected that any exotic-minority-but-thriving-platform would be
> able to tell its users "here are ports of POSIXy programs---install
> them and it can become usable by those who only know Linux"?
>
> So, I dunno.
Final official distribution from Bell labs was released in Jan 2015.
Now, There are some distributions that forked from official Plan 9 and
are maintained by that community,
such as 9legacy, 9front or others.
I will try to implement POSIX toolsets if it is needed because POSIX
is a large spec.
Thanks for your advice.
next prev parent reply other threads:[~2020-08-10 10:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 1:05 [PATCH 0/4] Fit the building tools to Plan 9 environment KADOTA, Kyohei via GitGitGadget
2020-08-06 1:05 ` [PATCH 1/4] Use $(SHELL_PATH) instead of sh in Makefile lufia via GitGitGadget
2020-08-06 2:13 ` brian m. carlson
2020-08-06 4:10 ` Eric Sunshine
2020-08-06 14:39 ` Kyohei Kadota
2020-08-06 17:30 ` Junio C Hamano
2020-08-10 9:04 ` Kyohei Kadota
2020-08-06 1:05 ` [PATCH 2/4] Define TAR_CF and TAR_XF variables " lufia via GitGitGadget
2020-08-06 17:50 ` Junio C Hamano
2020-08-06 1:05 ` [PATCH 3/4] Fit to Plan 9's ANSI/POSIX compatibility layer lufia via GitGitGadget
2020-08-06 2:04 ` brian m. carlson
2020-08-06 13:49 ` Kyohei Kadota
2020-08-06 23:51 ` brian m. carlson
2020-08-06 23:57 ` Eric Sunshine
2020-08-06 18:10 ` Junio C Hamano
2020-08-10 10:53 ` Kyohei Kadota [this message]
2020-08-06 1:05 ` [PATCH 4/4] Use $(LD) instead of $(CC) for linking the object files lufia via GitGitGadget
2020-08-06 2:23 ` [PATCH 0/4] Fit the building tools to Plan 9 environment brian m. carlson
2020-09-09 19:47 ` [PATCH v2 0/2] " KADOTA, Kyohei via GitGitGadget
2020-09-09 19:47 ` [PATCH v2 1/2] Fit to Plan 9's ANSI/POSIX compatibility layer Kyohei Kadota via GitGitGadget
2020-09-09 19:56 ` Eric Sunshine
2020-09-09 20:34 ` Junio C Hamano
2020-09-10 0:35 ` Kyohei Kadota
2020-09-09 19:47 ` [PATCH v2 2/2] Use $(LD) instead of $(CC) for linking the object files Kyohei Kadota via GitGitGadget
2020-09-10 2:17 ` [PATCH v3 0/2] Fit the building tools to Plan 9 environment KADOTA, Kyohei via GitGitGadget
2020-09-10 2:17 ` [PATCH v3 1/2] Fit to Plan 9's ANSI/POSIX compatibility layer Kyohei Kadota via GitGitGadget
2020-09-10 5:13 ` Junio C Hamano
2020-09-10 2:17 ` [PATCH v3 2/2] Use $(LD) instead of $(CC) for linking the object files Kyohei Kadota via GitGitGadget
2020-09-10 5:31 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFMepckAe9r1O8xrQemytHoZKeyLSjEpfdH=yP=+SzKPoCOf8w@mail.gmail.com' \
--to=lufia@lufia.org \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).