From list at eworm.de Wed Mar 1 21:09:18 2023 From: list at eworm.de (Christian Hesse) Date: Wed, 1 Mar 2023 22:09:18 +0100 Subject: [PATCH 1/1] RFC: git: update to v2.40.0-rc1 Message-ID: <20230301210918.57020-1-list@eworm.de> From: Christian Hesse Update to git version v2.40.0-rc1, no additional changes required. Signed-off-by: Christian Hesse --- Makefile | 4 ++-- git | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 97b870b..d086bb0 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = -GIT_VER = 2.39.2 -GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz +GIT_VER = 2.40.0.rc1 +GIT_URL = https://www.kernel.org/pub/software/scm/git/testing/git-$(GIT_VER).tar.xz INSTALL = install COPYTREE = cp -r MAN5_TXT = $(wildcard *.5.txt) diff --git a/git b/git index cbf0493..ef7d4f5 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit cbf04937d5b9fcf0a76c28f69e6294e9e3ecd7e6 +Subproject commit ef7d4f53c2fd9e8186d093dea6d45a91ce57110e -- 2.39.2 From andreas.mahling at googlemail.com Mon Mar 6 10:13:10 2023 From: andreas.mahling at googlemail.com (Andreas Mahling) Date: Mon, 6 Mar 2023 11:13:10 +0100 Subject: cgit with busybox httpd Message-ID: hello, I'm in the process to configure a cgit instance for my private network at home. Because my internet router will be the host for git and cgit, I'm looking for a ligthweight setup. I would like to use busybox httpd as webserver, which has a very low footprint and supports cgi, but no other fancy bells and whistles, especially no url rewrite. It works in principle, but there is a problem with the URLs generated by cgit: they seem always containing a trailing slash. This leads to a 404 error thrown by httpd. If I manually remove the slash, everyting is OK. Example given: http://git/cgi-bin/cgit.cgi/linuxadmin.git/ -> 404 http://git/cgi-bin/cgit.cgi/linuxadmin.git -> Page ist shown Is there a way to tell cgit to give up the trailing slash? I'm running cgit-1.2.3-r3 on Alpine 3.17.2 Any help greatly appreciated! BTW: I've also tried lighttp, which had no problem with trailing slashes, but is more heavyweight than busybox. Best Regards Andreas From john at keeping.me.uk Mon Mar 6 11:41:18 2023 From: john at keeping.me.uk (John Keeping) Date: Mon, 6 Mar 2023 11:41:18 +0000 Subject: cgit with busybox httpd In-Reply-To: References: Message-ID: On Mon, Mar 06, 2023 at 11:13:10AM +0100, Andreas Mahling wrote: > I'm in the process to configure a cgit instance for my private network at home. > Because my internet router will be the host for git and cgit, I'm > looking for a ligthweight setup. > I would like to use busybox httpd as webserver, which has a very low > footprint and supports cgi, but no other fancy bells and whistles, > especially no url rewrite. > > It works in principle, but there is a problem with the URLs generated > by cgit: they seem always containing a trailing slash. This leads to a > 404 error thrown by httpd. If I manually remove the slash, everyting > is OK. > > Example given: > http://git/cgi-bin/cgit.cgi/linuxadmin.git/ -> 404 > http://git/cgi-bin/cgit.cgi/linuxadmin.git -> Page ist shown > > Is there a way to tell cgit to give up the trailing slash? I'm running > cgit-1.2.3-r3 on Alpine 3.17.2 I don't think it's possible to change that behaviour without patching CGit. Given how URLs are constructed, it looks a bit complicated to fix in all cases, but you could remove the setting of "virtual_root" in cmd_main() to force using query parameters instead of virtual paths in URLs. Can you tell where the 404 is generated? Is this a case of httpd returning an error when it shouldn't, or is it a behaviour difference that CGit isn't handling correctly - maybe other CGI hosts strip trailing slashes before passing a path to CGit but httpd doesn't? From andreas.mahling at googlemail.com Mon Mar 6 14:31:19 2023 From: andreas.mahling at googlemail.com (Andreas Mahling) Date: Mon, 6 Mar 2023 15:31:19 +0100 Subject: cgit with busybox httpd Message-ID: sorry, I've missed sending to the list address I wrote a script test.sh which prints the environment. When called as http://git/cgi-bin/test.sh/xyz PATH_INFO ist set to '/xyz' When called as http://git/cgi-bin/test.sh/xyz/ 404 is thrown. So the problem seems to be caused by httpd hello John, It seems the 404 is generated by httpd, I think because the url ends with a slash httpd treats the part after cgit.cgi not as PATH_INFO (as it should) but as a directory. So this seems more a fault of httpd to me. Sorry, but I don't understand how to put into QUERY_STRING what now goes into PATH_INFO. Do you mean the virtual-root option in cgitrc? It is already commented out in my setup, but cgit builds the url with PATH_INFO part anyway. best regards Andreas Am Mo., 6. M?rz 2023 um 12:41 Uhr schrieb John Keeping : > > On Mon, Mar 06, 2023 at 11:13:10AM +0100, Andreas Mahling wrote: > > I'm in the process to configure a cgit instance for my private network at home. > > Because my internet router will be the host for git and cgit, I'm > > looking for a ligthweight setup. > > I would like to use busybox httpd as webserver, which has a very low > > footprint and supports cgi, but no other fancy bells and whistles, > > especially no url rewrite. > > > > It works in principle, but there is a problem with the URLs generated > > by cgit: they seem always containing a trailing slash. This leads to a > > 404 error thrown by httpd. If I manually remove the slash, everyting > > is OK. > > > > Example given: > > http://git/cgi-bin/cgit.cgi/linuxadmin.git/ -> 404 > > http://git/cgi-bin/cgit.cgi/linuxadmin.git -> Page ist shown > > > > Is there a way to tell cgit to give up the trailing slash? I'm running > > cgit-1.2.3-r3 on Alpine 3.17.2 > > I don't think it's possible to change that behaviour without patching > CGit. Given how URLs are constructed, it looks a bit complicated to fix > in all cases, but you could remove the setting of "virtual_root" in > cmd_main() to force using query parameters instead of virtual paths in > URLs. > > Can you tell where the 404 is generated? Is this a case of httpd > returning an error when it shouldn't, or is it a behaviour difference > that CGit isn't handling correctly - maybe other CGI hosts strip > trailing slashes before passing a path to CGit but httpd doesn't? > From john at keeping.me.uk Mon Mar 6 14:42:30 2023 From: john at keeping.me.uk (John Keeping) Date: Mon, 6 Mar 2023 14:42:30 +0000 Subject: cgit with busybox httpd In-Reply-To: References: Message-ID: [Cc: add the mailing list back in] On Mon, Mar 06, 2023 at 01:01:50PM +0100, Andreas Mahling wrote: > It seems the 404 is generated by httpd, I think because the url ends with a > slash httpd treats the part after cgit.cgi not as PATH_INFO (as it should) > but as a directory. So this seems more a fault of httpd to me. > > Sorry, but I don't understand how to put into QUERY_STRING what now goes > into PATH_INFO. Do you mean the virtual-root option in cgitrc? > It is already commented out in my setup, but cgit builds the url with > PATH_INFO part anyway. To disable that feature you would have the patch the CGit source and build your own cgit binary. There is code in cmd_main() which automatically calculates the virtual root from other environment variables if they are provided (and it seems that httpd does provide this detail to CGI scripts). > Am Mo., 6. M?rz 2023 um 12:41 Uhr schrieb John Keeping : > > > On Mon, Mar 06, 2023 at 11:13:10AM +0100, Andreas Mahling wrote: > > > I'm in the process to configure a cgit instance for my private network > > at home. > > > Because my internet router will be the host for git and cgit, I'm > > > looking for a ligthweight setup. > > > I would like to use busybox httpd as webserver, which has a very low > > > footprint and supports cgi, but no other fancy bells and whistles, > > > especially no url rewrite. > > > > > > It works in principle, but there is a problem with the URLs generated > > > by cgit: they seem always containing a trailing slash. This leads to a > > > 404 error thrown by httpd. If I manually remove the slash, everyting > > > is OK. > > > > > > Example given: > > > http://git/cgi-bin/cgit.cgi/linuxadmin.git/ -> 404 > > > http://git/cgi-bin/cgit.cgi/linuxadmin.git -> Page ist shown > > > > > > Is there a way to tell cgit to give up the trailing slash? I'm running > > > cgit-1.2.3-r3 on Alpine 3.17.2 > > > > I don't think it's possible to change that behaviour without patching > > CGit. Given how URLs are constructed, it looks a bit complicated to fix > > in all cases, but you could remove the setting of "virtual_root" in > > cmd_main() to force using query parameters instead of virtual paths in > > URLs. > > > > Can you tell where the 404 is generated? Is this a case of httpd > > returning an error when it shouldn't, or is it a behaviour difference > > that CGit isn't handling correctly - maybe other CGI hosts strip > > trailing slashes before passing a path to CGit but httpd doesn't? > > From andreas.mahling at googlemail.com Tue Mar 7 19:16:35 2023 From: andreas.mahling at googlemail.com (Andreas Mahling) Date: Tue, 7 Mar 2023 20:16:35 +0100 Subject: cgit with busybox httpd In-Reply-To: References: Message-ID: I've preferred to patch busybox httpd. http://lists.busybox.net/pipermail/busybox/2023-March/090197.html thanks for your help Andreas Am Mo., 6. M?rz 2023 um 15:42 Uhr schrieb John Keeping : > > [Cc: add the mailing list back in] > > On Mon, Mar 06, 2023 at 01:01:50PM +0100, Andreas Mahling wrote: > > It seems the 404 is generated by httpd, I think because the url ends with a > > slash httpd treats the part after cgit.cgi not as PATH_INFO (as it should) > > but as a directory. So this seems more a fault of httpd to me. > > > > Sorry, but I don't understand how to put into QUERY_STRING what now goes > > into PATH_INFO. Do you mean the virtual-root option in cgitrc? > > It is already commented out in my setup, but cgit builds the url with > > PATH_INFO part anyway. > > To disable that feature you would have the patch the CGit source and > build your own cgit binary. > > There is code in cmd_main() which automatically calculates the virtual > root from other environment variables if they are provided (and it seems > that httpd does provide this detail to CGI scripts). > From list at eworm.de Mon Mar 13 19:40:18 2023 From: list at eworm.de (Christian Hesse) Date: Mon, 13 Mar 2023 20:40:18 +0100 Subject: [PATCH 1/1] git: update to v2.40.0 Message-ID: <20230313194018.17862-1-list@eworm.de> From: Christian Hesse Update to git version v2.40.0, no additional changes required. Signed-off-by: Christian Hesse --- Makefile | 2 +- git | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 97b870b..5cc4a9d 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = -GIT_VER = 2.39.2 +GIT_VER = 2.40.0 GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz INSTALL = install COPYTREE = cp -r diff --git a/git b/git index cbf0493..73876f4 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit cbf04937d5b9fcf0a76c28f69e6294e9e3ecd7e6 +Subproject commit 73876f4861cd3d187a4682290ab75c9dccadbc56 -- 2.39.2