git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC PATCH] NonStop port changes for git 2.16.0.
@ 2018-01-18 22:42 randall.s.becker
  2018-01-18 22:50 ` Stefan Beller
  0 siblings, 1 reply; 4+ messages in thread
From: randall.s.becker @ 2018-01-18 22:42 UTC (permalink / raw)
  To: git; +Cc: Randall S. Becker

From: "Randall S. Becker" <rsbecker@nexbridge.com>

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 <rsbecker@nexbridge.com>
---
 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
    <http://www.gnu.org/licenses/>.  */
 
+#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
+	RM = /bin/rm -f
 	# As detected by './configure'.
 	# Missdetected, hence commented out, see below.
 	#NO_CURL = YesPlease
 	# Added manually, see above.
 	NEEDS_SSL_WITH_CURL = YesPlease
+	NEEDS_CRYPTO_WITH_SSL = YesPlease
+	HAVE_DEV_TTY = YesPlease
 	HAVE_LIBCHARSET_H = YesPlease
 	HAVE_STRINGS_H = YesPlease
 	NEEDS_LIBICONV = YesPlease
 	NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease
 	NO_SYS_SELECT_H = UnfortunatelyYes
 	NO_D_TYPE_IN_DIRENT = YesPlease
+	NO_GETTEXT = YesPlease
 	NO_HSTRERROR = YesPlease
 	NO_STRCASESTR = YesPlease
 	NO_MEMMEM = YesPlease
@@ -458,8 +468,13 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
 	NO_MKDTEMP = YesPlease
 	# Currently libiconv-1.9.1.
 	OLD_ICONV = UnfortunatelyYes
-	NO_REGEX = YesPlease
+	NO_REGEX=NeedsStartEnd
 	NO_PTHREADS = UnfortunatelyYes
+	ifdef NO_PTHREADS
+	else # WIP, use Posix User Threads
+		PTHREAD_CFLAGS = -D_PUT_MODEL_ -I/usr/include
+		PTHREAD_LIBS = -lput
+	endif
 
 	# Not detected (nor checked for) by './configure'.
 	# We don't have SA_RESTART on NonStop, unfortunalety.
@@ -477,9 +492,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL)
 	# RFE 10-120912-4693 submitted to HP NonStop development.
 	NO_SETITIMER = UnfortunatelyYes
 	SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin
-	SHELL_PATH = /usr/local/bin/bash
-	# as of H06.25/J06.14, we might better use this
-	#SHELL_PATH = /usr/coreutils/bin/bash
+	SHELL_PATH = /usr/coreutils/bin/bash
 endif
 ifneq (,$(findstring MINGW,$(uname_S)))
 	pathsep = ;
diff --git a/git-compat-util.h b/git-compat-util.h
index 68b2ad531..5fc6b259d 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -378,6 +378,15 @@ static inline char *git_find_last_dir_sep(const char *path)
 #define find_last_dir_sep git_find_last_dir_sep
 #endif
 
+#ifdef __TANDEM
+#if !defined(_THREAD_SUPPORT_FUNCTIONS) && !defined(_PUT_MODEL_)
+/* #include <floss.h(floss_read,floss_write,floss_fsync,floss_fork)> */
+/* #include <floss.h(floss_fork)> */
+#endif
+#include <floss.h(floss_execl,floss_execlp,floss_execv,floss_execvp)>
+#include <floss.h(floss_getpwuid)>
+#endif
+
 #if defined(__HP_cc) && (__HP_cc >= 61000)
 #define NORETURN __attribute__((noreturn))
 #define NORETURN_PTR
diff --git a/hashmap.h b/hashmap.h
index 7ce79f3f7..d375d9cce 100644
--- a/hashmap.h
+++ b/hashmap.h
@@ -400,7 +400,6 @@ static inline void hashmap_disable_item_counting(struct hashmap *map)
  */
 static inline void hashmap_enable_item_counting(struct hashmap *map)
 {
-	void *item;
 	unsigned int n = 0;
 	struct hashmap_iter iter;
 
@@ -408,7 +407,7 @@ static inline void hashmap_enable_item_counting(struct hashmap *map)
 		return;
 
 	hashmap_iter_init(map, &iter);
-	while ((item = hashmap_iter_next(&iter)))
+	while (hashmap_iter_next(&iter))
 		n++;
 
 	map->do_count_items = 1;
diff --git a/remote.c b/remote.c
index 4e93753e1..c18f9de7f 100644
--- a/remote.c
+++ b/remote.c
@@ -11,6 +11,10 @@
 #include "mergesort.h"
 #include "argv-array.h"
 
+#if defined (__TANDEM)
+#define __attribute(a)
+#endif
+
 enum map_direction { FROM_SRC, FROM_DST };
 
 static struct refspec s_tag_refspec = {
diff --git a/run-command.c b/run-command.c
index 31fc5ea86..aaae8b54d 100644
--- a/run-command.c
+++ b/run-command.c
@@ -7,6 +7,11 @@
 #include "strbuf.h"
 #include "string-list.h"
 
+#if defined __TANDEM && ! defined NSIG
+/* See platform kill -l for list is all signals */
+# define NSIG 100
+#endif
+
 void child_process_init(struct child_process *child)
 {
 	memset(child, 0, sizeof(*child));
diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh
index 987d40680..955beecd9 100644
--- a/t/lib-git-daemon.sh
+++ b/t/lib-git-daemon.sh
@@ -68,6 +68,7 @@ start_git_daemon() {
 		test_skip_or_die $GIT_TEST_GIT_DAEMON \
 			"git daemon failed to start"
 	fi
+	trap '' EXIT
 }
 
 stop_git_daemon() {
@@ -89,4 +90,6 @@ stop_git_daemon() {
 	fi
 	GIT_DAEMON_PID=
 	rm -f git_daemon_output
+
+	trap '' EXIT
 }
diff --git a/transport-helper.c b/transport-helper.c
index 508015023..d48be722a 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -1207,7 +1207,7 @@ static int udt_do_read(struct unidirectional_transfer *t)
 		return 0;	/* No space for more. */
 
 	transfer_debug("%s is readable", t->src_name);
-	bytes = read(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse);
+	bytes = xread(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse);
 	if (bytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN &&
 		errno != EINTR) {
 		error_errno("read(%s) failed", t->src_name);
diff --git a/wrapper.c b/wrapper.c
index d20356a77..671cbb4b4 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -403,6 +403,9 @@ FILE *xfdopen(int fd, const char *mode)
 	FILE *stream = fdopen(fd, mode);
 	if (stream == NULL)
 		die_errno("Out of memory? fdopen failed");
+#ifdef __TANDEM
+	setbuf(stream,0);
+#endif
 	return stream;
 }
 
-- 
2.16.0.31.gf1a482c


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] NonStop port changes for git 2.16.0.
  2018-01-18 22:42 [RFC PATCH] NonStop port changes for git 2.16.0 randall.s.becker
@ 2018-01-18 22:50 ` Stefan Beller
  2018-01-19  0:10   ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Beller @ 2018-01-18 22:50 UTC (permalink / raw)
  To: randall.s.becker, Ævar Arnfjörð Bjarmason
  Cc: git, Randall S. Becker

On Thu, Jan 18, 2018 at 2:42 PM,  <randall.s.becker@rogers.com> wrote:
> From: "Randall S. Becker" <rsbecker@nexbridge.com>
>
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] NonStop port changes for git 2.16.0.
  2018-01-18 22:50 ` Stefan Beller
@ 2018-01-19  0:10   ` Ævar Arnfjörð Bjarmason
  2018-01-19  1:22     ` Randall S. Becker
  0 siblings, 1 reply; 4+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2018-01-19  0:10 UTC (permalink / raw)
  To: Stefan Beller; +Cc: randall.s.becker, git, Randall S. Becker


On Thu, Jan 18 2018, Stefan Beller jotted:

> On Thu, Jan 18, 2018 at 2:42 PM,  <randall.s.becker@rogers.com> 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...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [RFC PATCH] NonStop port changes for git 2.16.0.
  2018-01-19  0:10   ` Ævar Arnfjörð Bjarmason
@ 2018-01-19  1:22     ` Randall S. Becker
  0 siblings, 0 replies; 4+ messages in thread
From: Randall S. Becker @ 2018-01-19  1:22 UTC (permalink / raw)
  To: 'Ævar Arnfjörð Bjarmason',
	'Stefan Beller'
  Cc: randall.s.becker, 'git'

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,  <randall.s.becker@rogers.com> 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(211288444200000000)
  UNIX developer since approximately 421664400
-- In my real life, I talk too much.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-19  1:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 22:42 [RFC PATCH] NonStop port changes for git 2.16.0 randall.s.becker
2018-01-18 22:50 ` Stefan Beller
2018-01-19  0:10   ` Ævar Arnfjörð Bjarmason
2018-01-19  1:22     ` Randall S. Becker

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).