Bug 245863 - www/gitea: Fix viewing of branches with a slash in the name
Summary: www/gitea: Fix viewing of branches with a slash in the name
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kyle Evans
URL:
Keywords:
Depends on:
Blocks: 246353
  Show dependency treegraph
 
Reported: 2020-04-24 00:29 UTC by Kyle Evans
Modified: 2020-05-11 16:57 UTC (History)
4 users (show)

See Also:
stb: maintainer-feedback+
koobs: merge-quarterly?


Attachments
svn(1) diff against the ports tree (2.23 KB, patch)
2020-04-24 00:29 UTC, Kyle Evans
koobs: maintainer-approval+
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer 2020-04-24 00:29:17 UTC
Created attachment 213736 [details]
svn(1) diff against the ports tree

An issue[0] was filed upstream in January that branches with a slash in their name (e.g. stable/11) result in a 500 error when attempting to view them.

I tracked down the issue to the fact that read(2) on a directory fd in FreeBSD will actually succeed, while it will not on Linux/other OS. I have filed a PR[1] with go-git to remedy the problem there, and then we (hopefully) convince gitea maintainers to accept the patch as well once it's upstreamed.

The attached patch brings it into the ports tree as well, so that FreeBSD users can more immediately get the fix. It should still apply to the version in 2020Q2, more or less, with version numbers changed to protect the innocent.

[0] https://github.com/go-gitea/gitea/issues/9938
[1] https://github.com/go-git/go-git/pull/39
Comment 1 stb 2020-04-24 11:29:26 UTC
I'm happy with this change.

I would really like to see this fixed upstreaminb go-git, but I'm not holding my breath.
Comment 2 Adam Weinberger freebsd_committer 2020-04-24 12:07:06 UTC
I haven't tested this personally, but the patch makes sense.

Kyle, if Stefan gives his approval, you definitely have mine.
Comment 3 Kyle Evans freebsd_committer 2020-04-24 13:47:18 UTC
go-git merged my PR this morning, but I'll still need to figure out how to plumb that through to gitea/whether they'll accept a one-off patch to import this specifically into their vendor/ environment.

(In reply to Adam Weinberger from comment #2)

Awesome, thanks! I'm a mentored ports committer at the moment, so I'll still need mentor approval, yeah? CC koobs@ =-)
Comment 4 Adam Weinberger freebsd_committer 2020-04-24 14:17:28 UTC
Geez, I don't know how I forgot that you were being ports mentored, given that I was involved in granting it!

You are correct, you still needs koobs's blessing.

I assume this is worth merging to quarterly?
Comment 5 Kyle Evans freebsd_committer 2020-04-24 22:58:41 UTC
(In reply to Adam Weinberger from comment #4)

=)

Indeed, I intend to:

MFH: 2020Q2 (minor bugfix patch)
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2020-04-26 07:30:23 UTC
Only things I need to do here were add see also references and set flags (issue meta) and ask about explicit QA
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2020-04-26 07:31:14 UTC
Comment on attachment 213736 [details]
svn(1) diff against the ports tree

When setting flags to ? where a specific persons +/- is needed, add their email to the flag value (otherwise they wont get the note, and they cant set the flags value
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2020-04-26 07:33:53 UTC
Comment on attachment 213736 [details]
svn(1) diff against the ports tree

Maintainer set maintainer-feedback flag (to +), ack'ing the issue. Assume this was approval, and set the maintainer-approval (attachment flag) accordingly.

Approved by: <stb lassitu de> (maintainer)
Approved by: koobs (mentor, ports)

Pending QA confirmation

Minor future suggestion: when adding patches with upstream references, try to comment patches for our future selves, along with any explicit future actions needed, eg: # TODO: Upstream)
Comment 9 Kyle Evans freebsd_committer 2020-04-26 23:09:13 UTC
(In reply to Kubilay Kocak from comment #8)

Sure, I'll throw a comment in prior to commit; this bad boy should be able to go away with any kind of merge conflict being hit, because it's been accepted upstream and gitea is just waiting on a release to merge it in.

Q/A:
 * portlint (pre-existing issues; none related to this patch and to be addressed independently)
 * testport (13.0-CURRENT, amd64)
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2020-04-27 01:12:17 UTC
Comment on attachment 213736 [details]
svn(1) diff against the ports tree

Approved by: koobs (mentor, ports)
Comment 11 stb 2020-05-10 09:55:50 UTC
Gitea 1.11.5 has been released, but it doesn't include the newer version of gi-git. If you'd like the fix to be applied as a local patch, please coordinate with adamw@ to ahve it added to the port.
Comment 12 stb 2020-05-10 09:57:04 UTC
That's bug 246353 for the update.
Comment 13 commit-hook freebsd_committer 2020-05-11 16:53:09 UTC
A commit references this bug:

Author: kevans
Date: Mon May 11 16:52:29 UTC 2020
New revision: 534921
URL: https://svnweb.freebsd.org/changeset/ports/534921

Log:
  www/gitea: Fix viewing of branches with a slash in the name

  An issue[0] was filed upstream in January that branches with a slash in
  their name (e.g. stable/11) result in a 500 error when attempting to view
  them.

  I tracked down the issue to the fact that read(2) on a directory fd in
  FreeBSD will actually succeed, while it will not on Linux/other OS. I have
  filed a PR[1] with go-git to remedy the problem there, and then we
  (hopefully) convince gitea maintainers to accept the patch as well once it's
  upstreamed.

  The attached patch brings it into the ports tree as well, so that FreeBSD
  users can more immediately get the fix. It should still apply to the version
  in 2020Q2, more or less, with version numbers changed to protect the
  innocent.

  [0] https://github.com/go-gitea/gitea/issues/9938
  [1] https://github.com/go-git/go-git/pull/39

  PR:		245863
  Approved by:	<stb lassitu de> (maintainer)
  Aoorived by:	koobs (mentor, ports)
  MFH:		2020Q2 (minor bugfix patch)

Changes:
  head/www/gitea/Makefile
  head/www/gitea/files/patch-vendor_github.com_go-git_go-git_v5_storage_filesystem_dotgit_dotgit.go
Comment 14 commit-hook freebsd_committer 2020-05-11 16:56:11 UTC
A commit references this bug:

Author: kevans
Date: Mon May 11 16:56:03 UTC 2020
New revision: 534922
URL: https://svnweb.freebsd.org/changeset/ports/534922

Log:
  MFH: r534921

  www/gitea: Fix viewing of branches with a slash in the name

  An issue[0] was filed upstream in January that branches with a slash in
  their name (e.g. stable/11) result in a 500 error when attempting to view
  them.

  I tracked down the issue to the fact that read(2) on a directory fd in
  FreeBSD will actually succeed, while it will not on Linux/other OS. I have
  filed a PR[1] with go-git to remedy the problem there, and then we
  (hopefully) convince gitea maintainers to accept the patch as well once it's
  upstreamed.

  The attached patch brings it into the ports tree as well, so that FreeBSD
  users can more immediately get the fix. It should still apply to the version
  in 2020Q2, more or less, with version numbers changed to protect the
  innocent.

  [0] https://github.com/go-gitea/gitea/issues/9938
  [1] https://github.com/go-git/go-git/pull/39

  PR:		245863
  Approved by:	<stb lassitu de> (maintainer)
  Aoorived by:	koobs (mentor, ports)

  Approved by:	ports-secteam (blanket: minor bugfix patch)

Changes:
_U  branches/2020Q2/
  branches/2020Q2/www/gitea/Makefile
  branches/2020Q2/www/gitea/files/patch-vendor_github.com_go-git_go-git_v5_storage_filesystem_dotgit_dotgit.go
Comment 15 Kyle Evans freebsd_committer 2020-05-11 16:57:19 UTC
Applied to both head and quarterly; thanks!