RE: [RFC PATCH] NonStop port changes for git 2.16.0.

2018-01-18 Thread Randall S. Becker
On January 18, 2018 7:11 PM, Ævar Arnfjörð Bjarmason wrote:
> On Thu, Jan 18 2018, Stefan Beller jotted:
> > On Thu, Jan 18, 2018 at 2:42 PM,   wrote:
> >> Further: there are 6 known breakages that have been reported. The
> >> perl issues relating to completion codes are being examined at
> >> present by the platform support teams so are not addressed by this
> patch.
> >
> > For perl I'd suggest cc'ing Ævar (cc'd just now) as that seems his
> > field of expertise.
> 
> Just to make sure I'm keeping up, this refers to some breakage not detailed
> in the patch above, right?
> 
> The only perl-related change I see is undoing part of 6c109904bc ("Port to HP
> NonStop", 2012-09-19) having to do with how we find perl/python (which,
> not being at all familiar with NonStop, makes sense to me).
> 
> But sure, if there's some details about those 6 issues I might have time to
> take a look, but it sounds like it's being looked at by NonStop support...

The issue I found is that NonStop perl is reporting completion code 162/169 
when 'die "stuff";' is run from stdin, while reporting 255 when a real file is 
used. This isn't covered by the patch. The values are in the range 128+sig#, 
but no such signals are value on the platform (SIGABEND is 31 and SIGGUARDIAN 
is 99 with a gap between those). I had tried a few experiments mapping the 
wonky completion codes in run-command.c to something sane but that caused more 
breakages (60) in the test suite than leaving well enough alone (6). From what 
I can determine, git is behaving reasonably properly in the conditions tested, 
but the test suite structure in its use of perl is triggering artifacts that 
appear to be breakages when really not. This is currently being investigated by 
the HPE support team, so I'm leaving perl completion matters in their hands for 
now.

Cheers,
Randall

-- Brief whoami:
  NonStop developer since approximately NonStop(2112884442)
  UNIX developer since approximately 421664400
-- In my real life, I talk too much.





Re: [RFC PATCH] NonStop port changes for git 2.16.0.

2018-01-18 Thread Ævar Arnfjörð Bjarmason

On Thu, Jan 18 2018, Stefan Beller jotted:

> On Thu, Jan 18, 2018 at 2:42 PM,   wrote:
>> Further: there are 6 known breakages that have been reported. The perl
>> issues relating to completion codes are being examined at present by the
>> platform support teams so are not addressed by this patch.
>
> For perl I'd suggest cc'ing Ævar (cc'd just now) as that seems his
> field of expertise.

Just to make sure I'm keeping up, this refers to some breakage not
detailed in the patch above, right?

The only perl-related change I see is undoing part of 6c109904bc ("Port
to HP NonStop", 2012-09-19) having to do with how we find perl/python
(which, not being at all familiar with NonStop, makes sense to me).

But sure, if there's some details about those 6 issues I might have time
to take a look, but it sounds like it's being looked at by NonStop
support...


Re: [RFC PATCH] NonStop port changes for git 2.16.0.

2018-01-18 Thread Stefan Beller
On Thu, Jan 18, 2018 at 2:42 PM,   wrote:
> From: "Randall S. Becker" 
>
> Explanation: I'm looking for comments on how best to handle the changes
> below that are needed for the NonStop port.

Ideally you'd send them as single patches, each of them describing why it
makes sense generally (such as the s/read/xread/ line) or specifically for
your arch (these #ifdefs and Makefile changes).

> The hashmap.h and
> transport-helper.c will not be included in the final patch as they have
> already been communicated but did not make it into 2.16.0.
> It is likely that some of the changes below are in the wrong files
> (for example: NSIG, intptr_t) and should be moved. This is just the
> current state of the port, as it grew (and fortunately shrank a lot)
> over the past few years. My objective, as the platform maintainer, is
> to clean it up, and to try to get the platform's modifications
> included so that we can just (obviously) pull directly from the standard
> repository and not have to apply these mods in future and focus on
> any platform-related breakages.

Thanks for keeping up with the latest version! The xread issue sounds
like you found a bug across all platforms, which is valued by the wider
community. So feel free to send individual patches and the list will get
back to you. :)

> Further: there are 6 known breakages that have been reported. The perl
> issues relating to completion codes are being examined at present by the
> platform support teams so are not addressed by this patch.

For perl I'd suggest cc'ing Ævar (cc'd just now) as that seems his
field of expertise.

Thanks for such a report,
Stefan


[RFC PATCH] NonStop port changes for git 2.16.0.

2018-01-18 Thread randall . s . becker
From: "Randall S. Becker" 

Explanation: I'm looking for comments on how best to handle the changes
below that are needed for the NonStop port. The hashmap.h and
transport-helper.c will not be included in the final patch as they have 
already been communicated but did not make it into 2.16.0.
It is likely that some of the changes below are in the wrong files
(for example: NSIG, intptr_t) and should be moved. This is just the
current state of the port, as it grew (and fortunately shrank a lot)
over the past few years. My objective, as the platform maintainer, is
to clean it up, and to try to get the platform's modifications
included so that we can just (obviously) pull directly from the standard
repository and not have to apply these mods in future and focus on
any platform-related breakages.

Further: there are 6 known breakages that have been reported. The perl
issues relating to completion codes are being examined at present by the
platform support teams so are not addressed by this patch.

With Respect,
Randall

* Fixes platform issues not covered in the vanilla git code.

* Pulls previous ports forward into a single commit.

* Still has some known breaks based on platform limits and restrictions.

* Makefile: allows error codes during install. Change the options associated
  with the tar operation providing options required on platform. To be
  refactored into variables.

* regcomp.c: fixes missing intptr_t on NonStop.

* config.mak.uname: upgrades old options for current operating system
  requirements.

* git-compat-util.h: adds FLOSS definitions to allow platform support.

* remote.c: force ignoring of GCC __attribute construct not supported
  by c99.

* run_command.c: Added NSIG definition that is missing from NonStop
  signal.h.

* lib-git-daemon.sh: fixed incompatibilities with ksh traps not cleared
  automatically on platform.

* wrapper.c: added setbuf(stream,0) to force pipe flushes not enabled by
  default on platform.

Signed-off-by: Randall S. Becker 
---
 Makefile   |  4 ++--
 compat/regex/regcomp.c |  7 +++
 config.mak.uname   | 29 +
 git-compat-util.h  |  9 +
 hashmap.h  |  3 +--
 remote.c   |  4 
 run-command.c  |  5 +
 t/lib-git-daemon.sh|  3 +++
 transport-helper.c |  2 +-
 wrapper.c  |  3 +++
 10 files changed, 56 insertions(+), 13 deletions(-)

diff --git a/Makefile b/Makefile
index 1a9b23b67..c91602609 100644
--- a/Makefile
+++ b/Makefile
@@ -2567,9 +2567,9 @@ install: all
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
$(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
 ifndef NO_GETTEXT
-   $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(localedir_SQ)'
+   -$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(localedir_SQ)'
(cd po/build/locale && $(TAR) cf - .) | \
-   (cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR) xof -)
+   (cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR) xvof -)
 endif
 ifndef NO_PERL
$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
diff --git a/compat/regex/regcomp.c b/compat/regex/regcomp.c
index 51cd60baa..cb03fab78 100644
--- a/compat/regex/regcomp.c
+++ b/compat/regex/regcomp.c
@@ -17,6 +17,13 @@
License along with the GNU C Library; if not, see
.  */
 
+#if defined __TANDEM
+#ifdef NO_INTPTR_T
+typedef long intptr_t;
+typedef unsigned long uintptr_t;
+#endif
+#endif
+
 static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
  size_t length, reg_syntax_t syntax);
 static void re_compile_fastmap_iter (regex_t *bufp,
diff --git a/config.mak.uname b/config.mak.uname
index 685a80d13..d9f8d57e3 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -428,27 +428,37 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
# INLINE='' would just replace one set of warnings with another and
# still not compile in c89 mode, due to non-const array initializations.
CC = cc -c99
+   # Build down-rev compatible objects that don't use our new getopt_long.
+   ifeq ($(uname_R).$(uname_V),J06.21)
+   CC += -WRVU=J06.20
+   endif
+   ifeq ($(uname_R).$(uname_V),L17.02)
+   CC += -WRVU=L16.05
+   endif
# Disable all optimization, seems to result in bad code, with -O or -O2
# or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects
# abends on "git push". Needs more investigation.
-   CFLAGS = -g -O0
+   CFLAGS = -g -O0 -Winline
# We'd want it to be here.
prefix = /usr/local
# Our's are in ${prefix}/bin (perl might also be in /usr/bin/perl).
-   PERL_PATH = ${prefix}/bin/perl
-   PYTHON_PATH = ${prefix}/bin/python
-
+   PERL_PATH = /usr/bin/perl
+   PYTHON_PATH = /usr/bin/python
+