Package: golang-github-aws-aws-sdk-go
Version: 1.36.33-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu impish ubuntu-patch

Dear Maintainer,

   * golang-github-aws-aws-sdk-go FTBFS with go 1.16
   * There is an upstream change to fix this

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

  Successfully building from source with go 1.16

  * Cherry pick minor upstream change to enable building with go 1.16
    (LP: #1933678)


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')
Architecture: arm64 (aarch64)

Kernel: Linux 5.11.0-1007-raspi (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CRAP, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.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 
golang-github-aws-aws-sdk-go-1.36.33/debian/patches/0003-fix-protocol-unit-test-for-go-1.16.patch
 
golang-github-aws-aws-sdk-go-1.36.33/debian/patches/0003-fix-protocol-unit-test-for-go-1.16.patch
--- 
golang-github-aws-aws-sdk-go-1.36.33/debian/patches/0003-fix-protocol-unit-test-for-go-1.16.patch
   1970-01-01 00:00:00.000000000 +0000
+++ 
golang-github-aws-aws-sdk-go-1.36.33/debian/patches/0003-fix-protocol-unit-test-for-go-1.16.patch
   2021-06-25 16:10:25.000000000 +0000
@@ -0,0 +1,26 @@
+Description: Enable building with go 1.16
+ Go 1.16 changes the behavior of SortXML in a way that causes some of this 
package's
+ unit tests to fail. The fix has already been applied upstream, so we pull in 
that minor change
+Origin: upstream, 
https://github.com/aws/aws-sdk-go/commit/8dfbe6f52e0cd75c2594178be73e8ab784feca32
+Bug: https://github.com/aws/aws-sdk-go/issues/3731
+Bug-Ubuntu: 
https://bugs.launchpad.net/ubuntu/+source/golang-github-aws-aws-sdk-go/+bug/1534346
+Last-Update: 2021-06-25
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: 
golang-github-aws-aws-sdk-go-1.36.33/private/protocol/restxml/build_test.go
+===================================================================
+--- 
golang-github-aws-aws-sdk-go-1.36.33.orig/private/protocol/restxml/build_test.go
++++ golang-github-aws-aws-sdk-go-1.36.33/private/protocol/restxml/build_test.go
+@@ -6830,8 +6830,10 @@ func TestInputService20ProtocolTestXMLAt
+       if r.Body == nil {
+               t.Errorf("expect body not to be nil")
+       }
+-      body := util.SortXML(r.Body)
+-      awstesting.AssertXML(t, `<Grant 
xmlns:XMLSchema-instance="http://www.w3.org/2001/XMLSchema-instance"; 
XMLSchema-instance:type="CanonicalUser" xmlns:_xmlns="xmlns" 
_xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><Grantee><EmailAddress>f...@example.com</EmailAddress></Grantee></Grant>`,
 util.Trim(body))
++      body, _ := ioutil.ReadAll(r.Body)
++      awstesting.AssertXML(t, `<Grant><Grantee 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="CanonicalUser"><EmailAddress>f...@example.com</EmailAddress></Grantee></Grant>`,
 util.Trim(string(body)))
++
++      // assert URL
+ 
+       // assert URL
+       awstesting.AssertURL(t, "https://test/";, r.URL.String())
diff -Nru golang-github-aws-aws-sdk-go-1.36.33/debian/patches/series 
golang-github-aws-aws-sdk-go-1.36.33/debian/patches/series
--- golang-github-aws-aws-sdk-go-1.36.33/debian/patches/series  2020-10-22 
21:35:03.000000000 +0000
+++ golang-github-aws-aws-sdk-go-1.36.33/debian/patches/series  2021-06-25 
15:37:26.000000000 +0000
@@ -1,2 +1,3 @@
 0001-dfsg-footer.erb.patch
 0002-dfsg-godoc.html.patch
+0003-fix-protocol-unit-test-for-go-1.16.patch

Reply via email to