Package: gitlab-workhorse
Version: 8.54.2+debian-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu impish ubuntu-patch

Dear Maintainer,

gitlab-workhorse FTBFS with Go 1.17. There is due to a build time test failing.
There is already an upstream change to the failing test case that succeeds with
Go 1.17. This patch applies the upstream change. This issue is still present in
the experimental version of gitlab-workhorse: 8.59.0-1

In Ubuntu, the attached patch was applied to achieve the following:

Build package from source with Go 1.17

  * Cherry pick upstream test case change to resolve FTBFS
    with Go 1.17 (LP: #1943475)


Thanks for considering the patch.


-- System Information:
Debian Release: bullseye/sid
  APT prefers hirsute-updates
  APT policy: (500, 'hirsute-updates'), (500, 'hirsute-security'), (500, 
'hirsute'), (100, 'hirsute-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.11.0-34-generic (SMP w/32 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru 
gitlab-workhorse-8.54.2+debian/debian/patches/cherry-pick-upstream-change-for-go-117.patch
 
gitlab-workhorse-8.54.2+debian/debian/patches/cherry-pick-upstream-change-for-go-117.patch
--- 
gitlab-workhorse-8.54.2+debian/debian/patches/cherry-pick-upstream-change-for-go-117.patch
  1969-12-31 18:00:00.000000000 -0600
+++ 
gitlab-workhorse-8.54.2+debian/debian/patches/cherry-pick-upstream-change-for-go-117.patch
  2021-09-13 10:22:26.000000000 -0500
@@ -0,0 +1,44 @@
+Description: Fix FTBFS with Go 1.17
+ One of the test cases in this package was broken due to changes in Go 1.17.
+ There is already an upstream change to this test case that resolves the issue,
+ so we pull it in.
+Origin: upstream, 
https://gitlab.com/gitlab-org/gitlab/-/commit/66c4fbb308c0f35db2505daee5dd776711f17eae
+Bug-Ubuntu: 
https://bugs.launchpad.net/ubuntu/+source/gitlab-workhorse/+bug/1943475
+Last-Update: 2021-09-13
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/internal/upload/uploads_test.go
++++ b/internal/upload/uploads_test.go
+@@ -325,14 +325,17 @@
+       defer os.RemoveAll(tempPath)
+ 
+       for _, testCase := range []struct {
+-              filename string
+-              code     int
++              filename       string
++              code           int
++              expectedPrefix string
+       }{
+-              {"foobar", 200}, // sanity check for test setup below
+-              {"foo/bar", 500},
+-              {"/../../foobar", 500},
+-              {".", 500},
+-              {"..", 500},
++              {"foobar", 200, "foobar"}, // sanity check for test setup below
++              {"foo/bar", 200, "bar"},
++              {"foo/bar/baz", 200, "baz"},
++              {"/../../foobar", 200, "foobar"},
++              {".", 500, ""},
++              {"..", 500, ""},
++              {"./", 500, ""},
+       } {
+               buffer := &bytes.Buffer{}
+ 
+@@ -354,6 +357,7 @@
+ 
+               HandleFileUploads(response, httpRequest, nilHandler, 
apiResponse, &SavedFileTracker{Request: httpRequest}, opts)
+               require.Equal(t, testCase.code, response.Code)
++              require.Equal(t, testCase.expectedPrefix, opts.TempFilePrefix)
+       }
+ }
+ 
diff -Nru gitlab-workhorse-8.54.2+debian/debian/patches/series 
gitlab-workhorse-8.54.2+debian/debian/patches/series
--- gitlab-workhorse-8.54.2+debian/debian/patches/series        2021-01-26 
08:40:00.000000000 -0600
+++ gitlab-workhorse-8.54.2+debian/debian/patches/series        2021-09-13 
10:22:26.000000000 -0500
@@ -1 +1,2 @@
 search-binaries-in-path.patch
+cherry-pick-upstream-change-for-go-117.patch
_______________________________________________
Pkg-go-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-go-maintainers

Reply via email to