View previous topic :: View next topic |
Author |
Message |
pa4wdh l33t
Joined: 16 Dec 2005 Posts: 881
|
Posted: Mon Sep 02, 2024 5:31 pm Post subject: [solved] Incomplete cgit output |
|
|
Hi All,
I'm using cgit to publish some git repos, and i'm having trouble with it. The problem is that it generates incomplete responses.
A good example can be seen on this url:
https://code.pa4wdh.nl.eu.org/gentoo/unmatched-patchwork/tree/media-video/mplayer/mplayer-1.5_p20231206.ebuild#n456
You can see the line numbers still go on, but the actual content stops at line 461. Troubles don't end there. Cgit also services tar,gz, tar.bz2 and zip's for tagged commits, and also those files are limited in their size, leading to incomplete files which can't be decompressed properly. This can be observed using URL: https://code.pa4wdh.nl.eu.org/tools/cputemp2maxfreq/
If you try to download the 0.6 tag it results in an incomplete file.
To troubleshoot this i created a small script to test cgit, it sets some environment variables CGI expects and runs CGIT:
Code: | #!/bin/sh
DOCUMENT_ROOT=/var/www/code.pa4wdh.nl.eu.org
CGIT=$DOCUMENT_ROOT/cgi-bin/cgit.cgi
URL="/gentoo/unmatched-patchwork/tree/media-video/mplayer/mplayer-1.5_p20231206.ebuild"
export REQUEST_URI="$URL"
export SCRIPT_FILENAME="$DOCUMENT_ROOT/$URL"
export SCRIPT_FILE="$URL"
export PATH_INFO="$URL"
export GATEWAY_INTERFACE="CGI/1.1"
$CGIT
|
This gives a strange result:
When i run the script with output on the terminal, it works perfectly and gives the complete output.
When i run the script and pipe the output through anything (even if it's just cat), the output stops at the same point as can be seen from first link in this post.
I've checked cgit's configuration options but can't find anything related, does anyone have an idea on how to solve this?
For completeness, cgit is build with:
Code: |
[ebuild R ] www-apps/cgit-1.2.3-r203::gentoo USE="doc highlight lua vhosts -test" LUA_SINGLE_TARGET="lua5-1 -lua5-3 -lua5-4 -luajit" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11" 0 KiB
|
_________________ The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world
My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Last edited by pa4wdh on Tue Sep 03, 2024 5:34 pm; edited 1 time in total |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 489
|
|
Back to top |
|
|
pa4wdh l33t
Joined: 16 Dec 2005 Posts: 881
|
Posted: Tue Sep 03, 2024 5:34 pm Post subject: |
|
|
Thanks for the link to the bug, that's indeed exactly what's happening here.
In the mean time, as a test, i have updated to the latest version in their git repo and that works perfectly. _________________ The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world
My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|