From 6aeeb326dbce3c9694744b3ea3ef1b109e86a5c5 Mon Sep 17 00:00:00 2001 From: Unit 193 <unit193@unit193.net> Date: Sun, 11 Dec 2022 22:58:09 -0500 Subject: [PATCH] d/p/force_tests_32bit.patch: Lower number used to not overflow on 32bit arches. --- debian/changelog | 8 +++ debian/patches/force_tests_32bit.patch | 93 ++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 102 insertions(+) create mode 100644 debian/patches/force_tests_32bit.patch create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 062546b1..068acc07 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +golang-github-xanzy-go-gitlab (0.73.1-2) unstable; urgency=medium + + * Team upload. + * d/p/force_tests_32bit.patch: + - Lower number used to not overflow on 32bit arches. + + -- Unit 193 <unit193@debian.org> Sun, 11 Dec 2022 22:05:10 -0500 + golang-github-xanzy-go-gitlab (0.73.1-1) unstable; urgency=medium * New upstream version 0.73.1 (Closes: #1010125) diff --git a/debian/patches/force_tests_32bit.patch b/debian/patches/force_tests_32bit.patch new file mode 100644 index 00000000..b791c024 --- /dev/null +++ b/debian/patches/force_tests_32bit.patch @@ -0,0 +1,93 @@ +Description: Lower number used to not overflow on 32bit arches. + This is not a proper fix, but at least allows tests to pass on 32bit arches + until upstream properly fixes the int overflow. + +Bug: https://github.com/xanzy/go-gitlab/issues/880 +Forwarded: not-needed + +--- + plan_limits_test.go | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) + +--- a/plan_limits_test.go 2022-12-11 21:26:31.000000000 -0500 ++++ b/plan_limits_test.go 2022-12-11 21:26:31.000000000 -0500 +@@ -30,13 +30,13 @@ + mux.HandleFunc("/api/v4/application/plan_limits", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, http.MethodGet) + fmt.Fprintf(w, `{ +- "conan_max_file_size": 3221225472, +- "generic_packages_max_file_size": 5368709120, ++ "conan_max_file_size": 2147483647, ++ "generic_packages_max_file_size": 2147483647, + "helm_max_file_size": 5242880, +- "maven_max_file_size": 3221225472, ++ "maven_max_file_size": 2147483647, + "npm_max_file_size": 524288000, + "nuget_max_file_size": 524288000, +- "pypi_max_file_size": 3221225472, ++ "pypi_max_file_size": 2147483647, + "terraform_module_max_file_size": 1073741824 + }`) + }) +@@ -50,13 +50,13 @@ + } + + want := &PlanLimit{ +- ConanMaxFileSize: 3221225472, +- GenericPackagesMaxFileSize: 5368709120, ++ ConanMaxFileSize: 2147483647, ++ GenericPackagesMaxFileSize: 2147483647, + HelmMaxFileSize: 5242880, +- MavenMaxFileSize: 3221225472, ++ MavenMaxFileSize: 2147483647, + NPMMaxFileSize: 524288000, + NugetMaxFileSize: 524288000, +- PyPiMaxFileSize: 3221225472, ++ PyPiMaxFileSize: 2147483647, + TerraformModuleMaxFileSize: 1073741824, + } + +@@ -72,20 +72,20 @@ + mux.HandleFunc("/api/v4/application/plan_limits", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, http.MethodPut) + fmt.Fprintf(w, `{ +- "conan_max_file_size": 3221225472, +- "generic_packages_max_file_size": 5368709120, ++ "conan_max_file_size": 2147483647, ++ "generic_packages_max_file_size": 2147483647, + "helm_max_file_size": 5242880, +- "maven_max_file_size": 3221225472, ++ "maven_max_file_size": 2147483647, + "npm_max_file_size": 524288000, + "nuget_max_file_size": 524288000, +- "pypi_max_file_size": 3221225472, ++ "pypi_max_file_size": 2147483647, + "terraform_module_max_file_size": 1073741824 + }`) + }) + + opt := &ChangePlanLimitOptions{ + PlanName: String("default"), +- ConanMaxFileSize: Int(3221225472), ++ ConanMaxFileSize: Int(2147483647), + } + planlimit, _, err := client.PlanLimits.ChangePlanLimits(opt) + if err != nil { +@@ -93,13 +93,13 @@ + } + + want := &PlanLimit{ +- ConanMaxFileSize: 3221225472, +- GenericPackagesMaxFileSize: 5368709120, ++ ConanMaxFileSize: 2147483647, ++ GenericPackagesMaxFileSize: 2147483647, + HelmMaxFileSize: 5242880, +- MavenMaxFileSize: 3221225472, ++ MavenMaxFileSize: 2147483647, + NPMMaxFileSize: 524288000, + NugetMaxFileSize: 524288000, +- PyPiMaxFileSize: 3221225472, ++ PyPiMaxFileSize: 2147483647, + TerraformModuleMaxFileSize: 1073741824, + } + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..78dfbe0e --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +force_tests_32bit.patch -- GitLab