{"thread":{"id":"21962","subject":"Git on QNX","startedAt":"2009-12-15T21:23:37Z","lastAt":"2009-12-17T01:37:39Z","messageCount":7,"participants":["Tarmigan","Junio C Hamano","Alex Riesen","Sean Boudreau"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"129961","messageId":"905315640912151323s4b158565o2e74ce018b64dc72@mail.gmail.com","threadId":"21962","inReplyTo":null,"subject":"Git on QNX","fromName":"Tarmigan","fromEmail":"tarmigan+git@gmail.com","sentAt":"2009-12-15T21:23:37Z","receivedAt":"2009-12-15T21:23:37Z","isPatch":false,"sender":{"key":"tarmigan+git@gmail.com","avatar":null},"body":"Is anyone running git on QNX?\n\nI have compiled and installed it (see config below) but it is failing\na number of the tests.  I suspect that many of the later failures are\nrelated to the earlier ones, so I think the earlier ones are probably\nmore interesting.  Am I missing some makefile options?\n\nDespite the test failures, I have been running the binaries\nsuccessfully for a couple days.  I'm not planning on using git on QNX\nvery heavily or for very long, but as long as I'm on QNX I figured I\ntry to get git to work on it.\n\nHere's the tests that are currently failing:\n\tt0000.42  absolute path works as expected\n\tt0006.14  parse date (2008-02-14 20:30:45)\n\tt1002-read-tree-m-u-2way.sh lots of failures\n\tt1100.4 compare commit\n\tt1400.22,27,38,41\n\tt1410.8 reflog delete\n\tt2300.4,5 cd-to-toplevel\n\tt3200.5,30 branch (maybe same as date in t0006.14?)\n\tt3900.10,18 NO_ICONV?\n\tt3901 NO_ICONV?\n\tt4013-diff-various.sh lots of failures\n\tt4201.3 shortlog encoding (NO_ICONV?)\n\tt5000.13 tar tree validate file modification time\n\tt5100-mailinfo.sh\n\tt5510-fetch.sh\n\nI got impatient after about t5600 because QNX in a virtual machine is\nvery slow.  If anyone else wants to try it, you can download a QNX\n.iso, get a free 30-day evaluation license and install and run in a\nvirtual machine.\n\nI have started to look into t0000.42 a little.  The symlinks seem to\nget setup properly but make_absolute_path gives incorrect results:\n# ls -l second/other\nlrwxrwxrwx 1 root root 8 Dec 15 12:27 second/other -> ../first\n# ../../test-path-utils make_absolute_path third/../second/other/.git/syml\n/root/git/t/trash directory.t0000-basic/second/other/.git/syml\n# ../../test-path-utils make_absolute_path second/other/.git/syml\n/root/git/t/trash directory.t0000-basic/second/other/.git/syml\n# ../../test-path-utils make_absolute_path second/other\n/root/git/t/trash directory.t0000-basic/second/first   <---- THIS LOOKS WRONG\n# ../../test-path-utils make_absolute_path second/other/\n/root/git/t/trash directory.t0000-basic/second/first   <---- THIS LOOKS WRONG\n# ../../test-path-utils make_absolute_path second/other/.git\n../.git <---- THIS LOOKS WRONG\n\nIf anyone has any ideas or interest in the other failing tests, I can\nprovide more specific information.\n\nHere's the diff that I applied to make git compile (cut-n-paste +\ngmail warning) and it's on top of 9a424b27.  I would like to properly\nsubmit some bits of it once the tests are passing.\n\nThanks,\nTarmigan\n\n--------\n\ndiff --git a/Makefile b/Makefile\nindex 4a1e5bc..ca78dcd 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -934,6 +934,30 @@ ifeq ($(uname_S),HP-UX)\n \tNO_SYS_SELECT_H = YesPlease\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n endif\n+ifeq ($(uname_S),QNX)\n+\tNO_OPENSSL=YesPlease\n+\tNO_CURL=YesPlease\n+\tNEEDS_SOCKET=YesPlease\n+\tNO_D_TYPE_IN_DIRENT=YesPlease\n+\tNO_STRCASESTR=YesPlease\n+\tNO_MEMMEM = YesPlease\n+\tNO_STRLCPY = YesPlease\n+\tNO_MKDTEMP = YesPlease\n+\tNO_MKSTEMPS = YesPlease\n+\t#NO_ICONV=YesPlease\n+\tOLD_ICONV=UnfortunatelyYes\n+\tNEEDS_LIBICONV=yes\n+\tICONVDIR=/opt\n+\tNO_R_TO_GCC_LINKER=UnfortunatelyYes\n+\tNO_DEFLATE_BOUND=yes\n+\tFREAD_READS_DIRECTORIES=UnfortunatelyYes\n+\tNO_PTHREADS=UnfortunatelyYes\n+\tNO_MMAP=YesPlease\n+\tNO_NSEC=YesPlease\n+\tPERL_PATH=/opt/bin/perl\n+\t#NO_HSTRERROR = YesPlease\n+\t#NO_SYS_SELECT_H = YesPlease\n+endif\n ifeq ($(uname_S),Windows)\n \tGIT_VERSION := $(GIT_VERSION).MSVC\n \tpathsep = ;\ndiff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c\nindex 8ed4a6f..5cbc16c 100644\n--- a/builtin-fetch-pack.c\n+++ b/builtin-fetch-pack.c\n@@ -778,7 +778,7 @@ static int fetch_pack_config(const char *var,\nconst char *value, void *cb)\n \treturn git_default_config(var, value, cb);\n }\n\n-static struct lock_file lock;\n+static struct lock_file lockfile;\n\n static void fetch_pack_setup(void)\n {\n@@ -958,14 +958,14 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,\n \t\t\t  )\n \t\t\tdie(\"shallow file was changed during fetch\");\n\n-\t\tfd = hold_lock_file_for_update(&lock, shallow,\n+\t\tfd = hold_lock_file_for_update(&lockfile, shallow,\n \t\t\t\t\t       LOCK_DIE_ON_ERROR);\n \t\tif (!write_shallow_commits(&sb, 0)\n \t\t || write_in_full(fd, sb.buf, sb.len) != sb.len) {\n \t\t\tunlink_or_warn(shallow);\n-\t\t\trollback_lock_file(&lock);\n+\t\t\trollback_lock_file(&lockfile);\n \t\t} else {\n-\t\t\tcommit_lock_file(&lock);\n+\t\t\tcommit_lock_file(&lockfile);\n \t\t}\n \t\tstrbuf_release(&sb);\n \t}\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 5c59687..857e938 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -42,6 +42,11 @@\n /* Approximation of the length of the decimal representation of this type. */\n #define decimal_length(x)\t((int)(sizeof(x) * 2.56 + 0.5) + 1)\n\n+#if defined(__QNX__)\n+#define getpagesize() sysconf(_SC_PAGESIZE)\n+#define SA_RESTART 0\n+#endif\n+\n #if defined(__sun__)\n  /*\n   * On Solaris, when _XOPEN_EXTENDED is set, its header file\n@@ -55,7 +60,7 @@\n # else\n # define _XOPEN_SOURCE 500\n # endif\n-#elif !defined(__APPLE__) && !defined(__FreeBSD__)  &&\n!defined(__USLC__) && !defined(_M_UNIX) && !defined(sgi)\n+#elif !defined(__APPLE__) && !defined(__FreeBSD__)  &&\n!defined(__USLC__) && !defined(_M_UNIX) && !defined(sgi) &&\n!defined(__QNX__)\n #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD\nneeds 600 for S_ISLNK() */\n #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */\n #endif\n@@ -79,6 +84,7 @@\n #include <stdlib.h>\n #include <stdarg.h>\n #include <string.h>\n+#include <strings.h>\n #include <errno.h>\n #include <limits.h>\n #include <sys/param.h>\n"},{"id":"129963","messageId":"7v6387zzfi.fsf@alter.siamese.dyndns.org","threadId":"21962","inReplyTo":"905315640912151323s4b158565o2e74ce018b64dc72@mail.gmail.com","subject":"Re: Git on QNX","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-15T21:42:57Z","receivedAt":"2009-12-15T21:42:57Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tarmigan <tarmigan+git@gmail.com> writes:\n\n> diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c\n> index 8ed4a6f..5cbc16c 100644\n> --- a/builtin-fetch-pack.c\n> +++ b/builtin-fetch-pack.c\n> @@ -778,7 +778,7 @@ static int fetch_pack_config(const char *var,\n> const char *value, void *cb)\n>  \treturn git_default_config(var, value, cb);\n>  }\n>\n> -static struct lock_file lock;\n> +static struct lock_file lockfile;\n>\n>  static void fetch_pack_setup(void)\n>  {\n> @@ -958,14 +958,14 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,\n>  \t\t\t  )\n>  \t\t\tdie(\"shallow file was changed during fetch\");\n>\n> -\t\tfd = hold_lock_file_for_update(&lock, shallow,\n> +\t\tfd = hold_lock_file_for_update(&lockfile, shallow,\n>  \t\t\t\t\t       LOCK_DIE_ON_ERROR);\n>  \t\tif (!write_shallow_commits(&sb, 0)\n>  \t\t || write_in_full(fd, sb.buf, sb.len) != sb.len) {\n>  \t\t\tunlink_or_warn(shallow);\n> -\t\t\trollback_lock_file(&lock);\n> +\t\t\trollback_lock_file(&lockfile);\n>  \t\t} else {\n> -\t\t\tcommit_lock_file(&lock);\n> +\t\t\tcommit_lock_file(&lockfile);\n>  \t\t}\n>  \t\tstrbuf_release(&sb);\n>  \t}\n\nIs this because QNX uses \"lock\" as some global identifier for some other\npurpose?  I think moving the file-scope-static definition to the scope\nit is used in without renaming would make a cleaner patch.\n\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index 5c59687..857e938 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -79,6 +84,7 @@\n>  #include <stdlib.h>\n>  #include <stdarg.h>\n>  #include <string.h>\n> +#include <strings.h>\n>  #include <errno.h>\n>  #include <limits.h>\n>  #include <sys/param.h>\n\nOther hunks are QNX specific enough but this hunk is worrisome; you cannot\ntell how you are hurting other platforms with this change.  Can you tell\ndeclarations of which functions are missing on QNX without this change?\n"},{"id":"129965","messageId":"905315640912151413g10ee5befh58fbd171237e7659@mail.gmail.com","threadId":"21962","inReplyTo":"7v6387zzfi.fsf@alter.siamese.dyndns.org","subject":"Re: Git on QNX","fromName":"Tarmigan","fromEmail":"tarmigan+git@gmail.com","sentAt":"2009-12-15T22:13:53Z","receivedAt":"2009-12-15T22:13:53Z","isPatch":false,"sender":{"key":"tarmigan+git@gmail.com","avatar":null},"body":"On Tue, Dec 15, 2009 at 1:42 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Tarmigan <tarmigan+git@gmail.com> writes:\n>\n>> diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c\n>> index 8ed4a6f..5cbc16c 100644\n>> --- a/builtin-fetch-pack.c\n>> +++ b/builtin-fetch-pack.c\n>> @@ -778,7 +778,7 @@ static int fetch_pack_config(const char *var,\n>> const char *value, void *cb)\n>>       return git_default_config(var, value, cb);\n>>  }\n>>\n>> -static struct lock_file lock;\n>> +static struct lock_file lockfile;\n>>\n>>  static void fetch_pack_setup(void)\n>>  {\n>> @@ -958,14 +958,14 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,\n>>                         )\n>>                       die(\"shallow file was changed during fetch\");\n>>\n>> -             fd = hold_lock_file_for_update(&lock, shallow,\n>> +             fd = hold_lock_file_for_update(&lockfile, shallow,\n>>                                              LOCK_DIE_ON_ERROR);\n>>               if (!write_shallow_commits(&sb, 0)\n>>                || write_in_full(fd, sb.buf, sb.len) != sb.len) {\n>>                       unlink_or_warn(shallow);\n>> -                     rollback_lock_file(&lock);\n>> +                     rollback_lock_file(&lockfile);\n>>               } else {\n>> -                     commit_lock_file(&lock);\n>> +                     commit_lock_file(&lockfile);\n>>               }\n>>               strbuf_release(&sb);\n>>       }\n>\n> Is this because QNX uses \"lock\" as some global identifier for some other\n> purpose?  I think moving the file-scope-static definition to the scope\n> it is used in without renaming would make a cleaner patch.\n\nYes, exactly that reason.  I agree the declaration should just move\ninto fetch_pack() as a static, but I didn't realize that until after I\nhad renamed all of the uses, and I was lazy as this was not for\nsubmission.\n\n>\n>> diff --git a/git-compat-util.h b/git-compat-util.h\n>> index 5c59687..857e938 100644\n>> --- a/git-compat-util.h\n>> +++ b/git-compat-util.h\n>> @@ -79,6 +84,7 @@\n>>  #include <stdlib.h>\n>>  #include <stdarg.h>\n>>  #include <string.h>\n>> +#include <strings.h>\n>>  #include <errno.h>\n>>  #include <limits.h>\n>>  #include <sys/param.h>\n>\n> Other hunks are QNX specific enough but this hunk is worrisome; you cannot\n> tell how you are hurting other platforms with this change.  Can you tell\n> declarations of which functions are missing on QNX without this change?\n\nstrcasecmp()\nhttp://www.opengroup.org/onlinepubs/000095399/functions/strcasecmp.html\n\nI agree that this change could affect other platforms and they've\ngotten along fine without it so far.  I'm surprised no others have\nneeded it.  Would it be better wrapped in a #ifdef?\n\nThanks,\nTarmigan\n"},{"id":"129990","messageId":"81b0412b0912160620v1556fd12i17897269f4101128@mail.gmail.com","threadId":"21962","inReplyTo":"905315640912151413g10ee5befh58fbd171237e7659@mail.gmail.com","subject":"Re: Git on QNX","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2009-12-16T14:20:16Z","receivedAt":"2009-12-16T14:20:16Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Tue, Dec 15, 2009 at 23:13, Tarmigan <tarmigan+git@gmail.com> wrote:\n> On Tue, Dec 15, 2009 at 1:42 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Tarmigan <tarmigan+git@gmail.com> writes:\n>>> diff --git a/git-compat-util.h b/git-compat-util.h\n>>> index 5c59687..857e938 100644\n>>> --- a/git-compat-util.h\n>>> +++ b/git-compat-util.h\n>>> @@ -79,6 +84,7 @@\n>>>  #include <stdlib.h>\n>>>  #include <stdarg.h>\n>>>  #include <string.h>\n>>> +#include <strings.h>\n>>>  #include <errno.h>\n>>>  #include <limits.h>\n>>>  #include <sys/param.h>\n>>\n>> Other hunks are QNX specific enough but this hunk is worrisome; you cannot\n>> tell how you are hurting other platforms with this change.  Can you tell\n>> declarations of which functions are missing on QNX without this change?\n>\n> strcasecmp()\n> http://www.opengroup.org/onlinepubs/000095399/functions/strcasecmp.html\n\nJust for completeness:\nhttp://www.qnx.com/developers/docs/6.4.1/neutrino/lib_ref/s/strcasecmp.html\nhttp://www.qnx.com/developers/docs/6.4.1/neutrino/lib_ref/s/strcmpi.html\n\n> I agree that this change could affect other platforms and they've\n> gotten along fine without it so far.  I'm surprised no others have\n> needed it.  Would it be better wrapped in a #ifdef?\n\nIf you put the ifdef in git-compat-util.h\n"},{"id":"130003","messageId":"loom.20091216T233122-388@post.gmane.org","threadId":"21962","inReplyTo":"905315640912151413g10ee5befh58fbd171237e7659@mail.gmail.com","subject":"Re: Git on QNX","fromName":"Sean Boudreau","fromEmail":"seanb@qnx.com","sentAt":"2009-12-16T22:38:39Z","receivedAt":"2009-12-16T22:38:39Z","isPatch":false,"sender":{"key":"seanb@qnx.com","avatar":null},"body":"Tarmigan <tarmigan+git <at> gmail.com> writes:\n\n\n> >\n> > Other hunks are QNX specific enough but this hunk is worrisome; you cannot\n> > tell how you are hurting other platforms with this change.  Can you tell\n> > declarations of which functions are missing on QNX without this change?\n> \n> strcasecmp()\n> http://www.opengroup.org/onlinepubs/000095399/functions/strcasecmp.html\n> \n> I agree that this change could affect other platforms and they've\n> gotten along fine without it so far.  I'm surprised no others have\n> needed it.  Would it be better wrapped in a #ifdef?\n> \n> Thanks,\n> Tarmigan\n> \n\nWhat version of qnx is this on.  <strings.h> is\nnow brought in by <string.h> and the lock() /\nunlock() prototypes have been removed from <unistd.h>\nAS OF 6.4.1 (the current release).\n\nThere's a package for git-4.3.20 here that also has a work around\nfor the SA_RESTART issue.\n\nftp://ftp.netbsd.org/pub/pkgsrc/packages/QNX/i386/6.4.1_head_20090724/All\n\n-seanb\n"},{"id":"130012","messageId":"905315640912161703u3920178cm93851ddc8480ac8@mail.gmail.com","threadId":"21962","inReplyTo":"loom.20091216T233122-388@post.gmane.org","subject":"Re: Git on QNX","fromName":"Tarmigan","fromEmail":"tarmigan+git@gmail.com","sentAt":"2009-12-17T01:03:16Z","receivedAt":"2009-12-17T01:03:16Z","isPatch":false,"sender":{"key":"tarmigan+git@gmail.com","avatar":null},"body":"On Wed, Dec 16, 2009 at 2:38 PM, Sean Boudreau <seanb@qnx.com> wrote:\n> What version of qnx is this on.  <strings.h> is\n> now brought in by <string.h> and the lock() /\n> unlock() prototypes have been removed from <unistd.h>\n> AS OF 6.4.1 (the current release).\n\nAhh, that's nice.  At a client's request, I have been working on QNX 6.3.2.\n\nI just installed 6.4.1 in another VM, and it's a bit different.  The\ncommon way to handle binary packages (iconv and perl) seems to have\nchanged to pkg_add so the PATHs I had set might not make sense\nanymore.\n\nAlso the weird failing test at t0000.42 seems to be fixed.  Funny.\n\nAs I might be the only person to run git on 6.3.2 instead of a more\nmodern QNX, it might make sense for me to just submit the minimum\npatches needed for QNX 6.4.1 and then carry the strings.h,\ngetpagesize, and lock() changes for 6.3.2 on my own.\n\n> There's a package for git-4.3.20 here that also has a work around\n> for the SA_RESTART issue.\n\nI think that might be a different program that also used to be named\n\"git\".  I think it has now been renamed gnuit.\n\nThanks,\nTarmigan\n"},{"id":"130014","messageId":"20091217013739.GG17970@qnx.com","threadId":"21962","inReplyTo":"905315640912161703u3920178cm93851ddc8480ac8@mail.gmail.com","subject":"Re: Git on QNX","fromName":"Sean Boudreau","fromEmail":"seanb@qnx.com","sentAt":"2009-12-17T01:37:39Z","receivedAt":"2009-12-17T01:37:39Z","isPatch":false,"sender":{"key":"seanb@qnx.com","avatar":null},"body":"On Wed, Dec 16, 2009 at 05:03:16PM -0800, Tarmigan wrote:\n> On Wed, Dec 16, 2009 at 2:38 PM, Sean Boudreau <seanb@qnx.com> wrote:\n> > What version of qnx is this on.  <strings.h> is\n> > now brought in by <string.h> and the lock() /\n> > unlock() prototypes have been removed from <unistd.h>\n> > AS OF 6.4.1 (the current release).\n> \n> Ahh, that's nice.  At a client's request, I have been working on QNX 6.3.2.\n> \n> I just installed 6.4.1 in another VM, and it's a bit different.  The\n> common way to handle binary packages (iconv and perl) seems to have\n> changed to pkg_add so the PATHs I had set might not make sense\n> anymore.\n> \n> Also the weird failing test at t0000.42 seems to be fixed.  Funny.\n> \n> As I might be the only person to run git on 6.3.2 instead of a more\n> modern QNX, it might make sense for me to just submit the minimum\n> patches needed for QNX 6.4.1 and then carry the strings.h,\n> getpagesize, and lock() changes for 6.3.2 on my own.\n\nThat's why I spoke up :)\n\n> \n> > There's a package for git-4.3.20 here that also has a work around\n> > for the SA_RESTART issue.\n> \n> I think that might be a different program that also used to be named\n> \"git\".  I think it has now been renamed gnuit.\n\nYou're probably right, try this one:\n\nftp://ftp.netbsd.org/pub/pkgsrc/packages/QNX/i386/6.4.1_head_20090724/All/scmgit-base-1.6.2.5.tgz\n\n\n-seanb \n"}]}