{"thread":{"id":"19545","subject":"[PATCH 1/4] Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall","startedAt":"2009-05-28T02:17:05Z","lastAt":"2009-05-29T05:13:54Z","messageCount":10,"participants":["Brandon Casey","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"114867","messageId":"8D9Pn2N3FZLQcyxrPABrG-rVdsP-X00e6c8oj-YzYQzWI-MvSy5AAzVjbQS0XsK76Ax9XKaLBbU@cipher.nrlssc.navy.mil","threadId":"19545","inReplyTo":null,"subject":"[PATCH 1/4] Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-28T02:17:05Z","receivedAt":"2009-05-28T02:17:05Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nWe can avoid a GNU dependency by using /usr/ucb/install.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n\n\nThis works for me on Solaris 7 and 10.  Any reason not to use it instead\nof ginstall?\n\n-brandon\n\n\n Makefile |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex eaae45d..ba78077 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -715,7 +715,7 @@ ifeq ($(uname_S),SunOS)\n \t\tNO_C99_FORMAT = YesPlease\n \t\tNO_STRTOUMAX = YesPlease\n \tendif\n-\tINSTALL = ginstall\n+\tINSTALL = /usr/ucb/install\n \tTAR = gtar\n \tBASIC_CFLAGS += -D__EXTENSIONS__\n endif\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114868","messageId":"8D9Pn2N3FZLQcyxrPABrG3rdrFXFL1OddmlhE77V4q-K8NSzkS8xbqdJw0C0CnqkCcLEUU_UEIs@cipher.nrlssc.navy.mil","threadId":"19545","inReplyTo":"8D9Pn2N3FZLQcyxrPABrG-rVdsP-X00e6c8oj-YzYQzWI-MvSy5AAzVjbQS0XsK76Ax9XKaLBbU@cipher.nrlssc.navy.mil","subject":"[PATCH 2/4] Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-28T02:17:06Z","receivedAt":"2009-05-28T02:17:06Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nThis library is required on Solaris since hstrerror resides in libresolv.\nAdditionally, on Solaris 7, inet_ntop and inet_pton reside there too.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n Makefile |    9 ++++++++-\n 1 files changed, 8 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex ba78077..32b28ea 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -91,6 +91,10 @@ all::\n # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,\n # Patrick Mauritz).\n #\n+# Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.\n+# Notably on Solaris hstrerror resides in libresolv and on Solaris 7\n+# inet_ntop and inet_pton additionally reside there.\n+#\n # Define NO_MMAP if you want to avoid mmap.\n #\n # Define NO_PTHREADS if you do not have or do not want to use Pthreads.\n@@ -697,10 +701,10 @@ endif\n ifeq ($(uname_S),SunOS)\n \tNEEDS_SOCKET = YesPlease\n \tNEEDS_NSL = YesPlease\n+\tNEEDS_RESOLV = YesPlease\n \tSHELL_PATH = /bin/bash\n \tNO_STRCASESTR = YesPlease\n \tNO_MEMMEM = YesPlease\n-\tNO_HSTRERROR = YesPlease\n \tNO_MKDTEMP = YesPlease\n \tOLD_ICONV = UnfortunatelyYes\n \tifeq ($(uname_R),5.8)\n@@ -956,6 +960,9 @@ endif\n ifdef NEEDS_NSL\n \tEXTLIBS += -lnsl\n endif\n+ifdef NEEDS_RESOLV\n+\tEXTLIBS += -lresolv\n+endif\n ifdef NO_D_TYPE_IN_DIRENT\n \tBASIC_CFLAGS += -DNO_D_TYPE_IN_DIRENT\n endif\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114869","messageId":"8D9Pn2N3FZLQcyxrPABrG-BSSbTCg9PE0lVG9rBAr5BVQibQYcIzXrxDf4S0P9Pb6AZO5MBuasg@cipher.nrlssc.navy.mil","threadId":"19545","inReplyTo":"8D9Pn2N3FZLQcyxrPABrG3rdrFXFL1OddmlhE77V4q-K8NSzkS8xbqdJw0C0CnqkCcLEUU_UEIs@cipher.nrlssc.navy.mil","subject":"[PATCH 3/4] Makefile: add section for SunOS 5.7","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-28T02:17:07Z","receivedAt":"2009-05-28T02:17:07Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n Makefile |    9 +++++++++\n 1 files changed, 9 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 32b28ea..8b377f3 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -707,6 +707,15 @@ ifeq ($(uname_S),SunOS)\n \tNO_MEMMEM = YesPlease\n \tNO_MKDTEMP = YesPlease\n \tOLD_ICONV = UnfortunatelyYes\n+\tifeq ($(uname_R),5.7)\n+\t\tNO_IPV6 = YesPlease\n+\t\tNO_SOCKADDR_STORAGE = YesPlease\n+\t\tNO_UNSETENV = YesPlease\n+\t\tNO_SETENV = YesPlease\n+\t\tNO_STRLCPY = YesPlease\n+\t\tNO_C99_FORMAT = YesPlease\n+\t\tNO_STRTOUMAX = YesPlease\n+\tendif\n \tifeq ($(uname_R),5.8)\n \t\tNO_UNSETENV = YesPlease\n \t\tNO_SETENV = YesPlease\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114870","messageId":"8D9Pn2N3FZLQcyxrPABrGxTLa3Dlq25WDqK5xSJyY6cvQv4mphIUXvRu59EA7ewVS-vbi5IZUc4@cipher.nrlssc.navy.mil","threadId":"19545","inReplyTo":"8D9Pn2N3FZLQcyxrPABrG-BSSbTCg9PE0lVG9rBAr5BVQibQYcIzXrxDf4S0P9Pb6AZO5MBuasg@cipher.nrlssc.navy.mil","subject":"[PATCH 4/4] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-28T02:17:08Z","receivedAt":"2009-05-28T02:17:08Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Junio C Hamano <gitster@pobox.com>\n\nSome platforms (like SunOS and family) have kept their common binaries at\nsome historical moment in time, and introduced new binaries with modern\nfeatures in a special location like /usr/xpg4/bin or /usr/ucb.  Some of the\nfeatures provided by these modern binaries are expected and required by git.\nIf the featureful binaries are not in the users path, then git could end up\nusing the less featureful binary and fail.\n\nSo provide a mechanism to prepend elements to the users PATH at runtime so\nthe modern binaries will be found.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n\n\nI liked this patch.  Seems like the right thing to do on Solaris.\n\n-brandon\n\n\n Makefile        |   14 ++++++++++++++\n git-sh-setup.sh |    2 ++\n 2 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 8b377f3..3f4708f 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3,6 +3,11 @@ all::\n \n # Define V=1 to have a more verbose compile.\n #\n+# Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.\n+#\n+# Define SANE_TOOL_PATH to a colon-separated list of paths to prepend\n+# to PATH if your tools in /usr/bin are broken.\n+#\n # Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf()\n # or vsnprintf() return -1 instead of number of characters which would\n # have been written to the final string if enough space had been available.\n@@ -703,6 +708,7 @@ ifeq ($(uname_S),SunOS)\n \tNEEDS_NSL = YesPlease\n \tNEEDS_RESOLV = YesPlease\n \tSHELL_PATH = /bin/bash\n+\tSANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin\n \tNO_STRCASESTR = YesPlease\n \tNO_MEMMEM = YesPlease\n \tNO_MKDTEMP = YesPlease\n@@ -871,6 +877,13 @@ endif\n -include config.mak.autogen\n -include config.mak\n \n+ifdef SANE_TOOL_PATH\n+BROKEN_PATH_FIX = s|^. @@PATH@@|PATH=$(SANE_TOOL_PATH)|\n+PATH := $(SANE_TOOL_PATH):${PATH}\n+else\n+BROKEN_PATH_FIX = d\n+endif\n+\n ifeq ($(uname_S),Darwin)\n \tifndef NO_FINK\n \t\tifeq ($(shell test -d /sw/lib && echo y),y)\n@@ -1272,6 +1285,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \t    -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n+\t    -e '/^# @@PATH@@/$(BROKEN_PATH_FIX)' \\\n \t    $@.sh >$@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex 8382339..7802581 100755\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -11,6 +11,8 @@\n # exporting it.\n unset CDPATH\n \n+# @@PATH@@:$PATH\n+\n die() {\n \techo >&2 \"$@\"\n \texit 1\n-- \n1.6.3.1.24.g152f4\n"},{"id":"114943","messageId":"20090528185736.GD13499@coredump.intra.peff.net","threadId":"19545","inReplyTo":"8D9Pn2N3FZLQcyxrPABrG-rVdsP-X00e6c8oj-YzYQzWI-MvSy5AAzVjbQS0XsK76Ax9XKaLBbU@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 1/4] Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-05-28T18:57:36Z","receivedAt":"2009-05-28T18:57:36Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 27, 2009 at 09:17:05PM -0500, Brandon Casey wrote:\n\n> We can avoid a GNU dependency by using /usr/ucb/install.\n> [...]\n> This works for me on Solaris 7 and 10.  Any reason not to use it instead\n> of ginstall?\n\nCertainly it works on Solaris 8; I've been setting it manually to\n/usr/ucb/install (though I admit my auto-test script doesn't actually do\nthe install, I do occasionally run the install manually). I think it is\na sane default.\n\n-Peff\n"},{"id":"114944","messageId":"20090528191051.GE13499@coredump.intra.peff.net","threadId":"19545","inReplyTo":"8D9Pn2N3FZLQcyxrPABrG3rdrFXFL1OddmlhE77V4q-K8NSzkS8xbqdJw0C0CnqkCcLEUU_UEIs@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 2/4] Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-05-28T19:10:51Z","receivedAt":"2009-05-28T19:10:51Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 27, 2009 at 09:17:06PM -0500, Brandon Casey wrote:\n\n> This library is required on Solaris since hstrerror resides in libresolv.\n> Additionally, on Solaris 7, inet_ntop and inet_pton reside there too.\n\nPatch works for me on Solaris 8, though it is largely a non-issue:\nhstrerror is only used at all if NO_IPV6 is set, and I don't set that\nfor my build.\n\n-Peff\n"},{"id":"114945","messageId":"20090528191342.GF13499@coredump.intra.peff.net","threadId":"19545","inReplyTo":"8D9Pn2N3FZLQcyxrPABrGxTLa3Dlq25WDqK5xSJyY6cvQv4mphIUXvRu59EA7ewVS-vbi5IZUc4@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 4/4] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-05-28T19:13:43Z","receivedAt":"2009-05-28T19:13:43Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 27, 2009 at 09:17:08PM -0500, Brandon Casey wrote:\n\n> Some platforms (like SunOS and family) have kept their common binaries at\n> some historical moment in time, and introduced new binaries with modern\n> features in a special location like /usr/xpg4/bin or /usr/ucb.  Some of the\n> features provided by these modern binaries are expected and required by git.\n> If the featureful binaries are not in the users path, then git could end up\n> using the less featureful binary and fail.\n> \n> So provide a mechanism to prepend elements to the users PATH at runtime so\n> the modern binaries will be found.\n\nMy concern with this is that the PATH bleeds over into things we execute\non behalf of the user, like GIT_EDITOR or snippets in git-filter-branch.\nSo we can end up surprising users that way.\n\nOn the other hand, I don't know how big a problem that is in practice. I\nfeel like any sane Solaris user is going to have xpg4 in their PATH\nthese days.\n\n-Peff\n"},{"id":"114947","messageId":"vVyKoW1VAw2ieNPkJ-SGMNqgFzp_toRpDdk-ZeAp3qzdczSzN4yckg@cipher.nrlssc.navy.mil","threadId":"19545","inReplyTo":"20090528191051.GE13499@coredump.intra.peff.net","subject":"Re: [PATCH 2/4] Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-05-28T19:32:20Z","receivedAt":"2009-05-28T19:32:20Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Jeff King wrote:\n> On Wed, May 27, 2009 at 09:17:06PM -0500, Brandon Casey wrote:\n> \n>> This library is required on Solaris since hstrerror resides in libresolv.\n>> Additionally, on Solaris 7, inet_ntop and inet_pton reside there too.\n> \n> Patch works for me on Solaris 8, though it is largely a non-issue:\n> hstrerror is only used at all if NO_IPV6 is set, and I don't set that\n> for my build.\n\nAh, in that case I guess NEED_RESOLV should only go in the 5.7 specific\nconfiguration section.\n\n-brandon\n"},{"id":"114948","messageId":"20090528193537.GA14324@coredump.intra.peff.net","threadId":"19545","inReplyTo":"vVyKoW1VAw2ieNPkJ-SGMNqgFzp_toRpDdk-ZeAp3qzdczSzN4yckg@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 2/4] Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-05-28T19:35:37Z","receivedAt":"2009-05-28T19:35:37Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 28, 2009 at 02:32:20PM -0500, Brandon Casey wrote:\n\n> >> This library is required on Solaris since hstrerror resides in libresolv.\n> >> Additionally, on Solaris 7, inet_ntop and inet_pton reside there too.\n> > \n> > Patch works for me on Solaris 8, though it is largely a non-issue:\n> > hstrerror is only used at all if NO_IPV6 is set, and I don't set that\n> > for my build.\n> \n> Ah, in that case I guess NEED_RESOLV should only go in the 5.7 specific\n> configuration section.\n\nWell, not exactly. Getting rid of NO_HSTRERROR and then compiling with\nNO_IPV6 still requires NEED_RESOLV. It's just that NO_HSTRERROR isn't\neven useful unless NO_IPV6 is defined.\n\n-Peff\n"},{"id":"114981","messageId":"7v63fkh4od.fsf@alter.siamese.dyndns.org","threadId":"19545","inReplyTo":"20090528191342.GF13499@coredump.intra.peff.net","subject":"Re: [PATCH 4/4] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-05-29T05:13:54Z","receivedAt":"2009-05-29T05:13:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Wed, May 27, 2009 at 09:17:08PM -0500, Brandon Casey wrote:\n>\n>> Some platforms (like SunOS and family) have kept their common binaries at\n>> some historical moment in time, and introduced new binaries with modern\n>> features in a special location like /usr/xpg4/bin or /usr/ucb.  Some of the\n>> features provided by these modern binaries are expected and required by git.\n>> If the featureful binaries are not in the users path, then git could end up\n>> using the less featureful binary and fail.\n>> \n>> So provide a mechanism to prepend elements to the users PATH at runtime so\n>> the modern binaries will be found.\n>\n> My concern with this is that the PATH bleeds over into things we execute\n> on behalf of the user, like GIT_EDITOR or snippets in git-filter-branch.\n> So we can end up surprising users that way.\n>\n> On the other hand, I don't know how big a problem that is in practice. I\n> feel like any sane Solaris user is going to have xpg4 in their PATH\n> these days.\n\nI share that feeling, in which case the patch should be no-op.\n\nBut I recall the \"how about this\" patch was done as an illustration of a\npossible approach to solve breakage in _tests_; the patch actually does\nnot touch t/Makefile and would not help tests.\n"}]}