Problem is well described at https://lists.zx2c4.com/pipermail/cgit/2022-May/004720.html Effectively cgit output for bigger files is truncated at ~65kB. Applying attached patch (see link) addresses the issue. Reproducible: Always Steps to Reproduce: 1. Configure cgit and add a bigger file to the repository (35kB+ in my case) 2. Try to display content of that file using cgit 3. Actual Results: Webpage gets truncated Expected Results: Full webpage gets displayed
Created attachment 794549 [details, diff] sendfile patch
Please, can this patch finally be applied in the official ebuild?
This bug also hits me on www-apps/cgit-1.2.3-r203, only fetching first 65 KB of 10 MB or so photo. This only happens if caching is enabled. If the cache is disabled, the photo downloads just fine. This is supposedly fixed with 852cb3b0e267dd2ddfd2eeef6275435098c606e7 "cache: tolerate short writes in print_slot" in master, according to https://marc.info/?l=cgit&m=167146263402979&w=2. The master branch also has a fix for at least https://bugs.gentoo.org/919779 in fb87de795b9f1b1e21825243716ff1156097adf2 "fix building with clang", so I will drop a letter to upstream mailing list asking for a new release. If this doesn't work out, we can just fetch from the latest commit.
(In reply to zurabid2016 from comment #3) > This bug also hits me on www-apps/cgit-1.2.3-r203, only fetching first 65 KB > of 10 MB or so photo. This only happens if caching is enabled. If the cache > is disabled, the photo downloads just fine. > > This is supposedly fixed with 852cb3b0e267dd2ddfd2eeef6275435098c606e7 > "cache: tolerate short writes in print_slot" in master, according to > https://marc.info/?l=cgit&m=167146263402979&w=2. > > The master branch also has a fix for at least https://bugs.gentoo.org/919779 > in fb87de795b9f1b1e21825243716ff1156097adf2 "fix building with clang", so I > will drop a letter to upstream mailing list asking for a new release. If > this doesn't work out, we can just fetch from the latest commit. Feel free to send a PR doing that now (using a snapshot). I think others have asked before.
Sure
(In reply to Sam James from comment #4) > (In reply to zurabid2016 from comment #3) > > This bug also hits me on www-apps/cgit-1.2.3-r203, only fetching first 65 KB > > of 10 MB or so photo. This only happens if caching is enabled. If the cache > > is disabled, the photo downloads just fine. > > > > This is supposedly fixed with 852cb3b0e267dd2ddfd2eeef6275435098c606e7 > > "cache: tolerate short writes in print_slot" in master, according to > > https://marc.info/?l=cgit&m=167146263402979&w=2. > > > > The master branch also has a fix for at least https://bugs.gentoo.org/919779 > > in fb87de795b9f1b1e21825243716ff1156097adf2 "fix building with clang", so I > > will drop a letter to upstream mailing list asking for a new release. If > > this doesn't work out, we can just fetch from the latest commit. > > Feel free to send a PR doing that now (using a snapshot). I think others > have asked before. Made a PR: https://github.com/gentoo/gentoo/pull/41147
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b89cd8e5d9d999510537488f41d676b6967d738 commit 6b89cd8e5d9d999510537488f41d676b6967d738 Author: Zurab Kvachadze <zurabid2016@gmail.com> AuthorDate: 2025-03-18 01:18:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-18 13:57:19 +0000 www-apps/cgit: add 1.2.3_p20240802 There has not been any release of cgit since 2020. This commit adds the newest version of cgit which contains fixes for two bugs. The bug 919779 is a compilation failure with GCC 15 in bundled Git. This bug is probably fixed, as the bundled Git's version is bumped from 2.25 to 2.46. Bug: https://bugs.gentoo.org/919779 Closes: https://bugs.gentoo.org/919779 Closes: https://bugs.gentoo.org/861209 Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> www-apps/cgit/Manifest | 2 + www-apps/cgit/cgit-1.2.3_p20240802.ebuild | 121 ++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+)