Package: golang-github-ajg-form
Version: 1.5+git20160822.523a5da-1.1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu impish ubuntu-patch

Dear Maintainer,

As of Go 1.17, the ';' character is not accepted as a valid separator
by net/http or net/url. This causes some of the tests in this package
to fail during the build. Changing the tests cases that use ';' to use
'&' instead fixes the build failures


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

Build golang-github-ajg-form with Go 1.17

  * Change semicolons to ampersands to enable building with go 1.17
    (LP: #1942131)


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-31-generic (SMP w/32 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_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 
golang-github-ajg-form-1.5+git20160822.523a5da/debian/patches/change-semicolon-to-ampersand.patch
 
golang-github-ajg-form-1.5+git20160822.523a5da/debian/patches/change-semicolon-to-ampersand.patch
--- 
golang-github-ajg-form-1.5+git20160822.523a5da/debian/patches/change-semicolon-to-ampersand.patch
   1969-12-31 18:00:00.000000000 -0600
+++ 
golang-github-ajg-form-1.5+git20160822.523a5da/debian/patches/change-semicolon-to-ampersand.patch
   2021-08-30 15:44:10.000000000 -0500
@@ -0,0 +1,23 @@
+Description: Change ';' to '&' when used as a separator
+ As of Go 1.17, ';' is no longer a valid separator in the net/url
+ and net/http packages. This causes some of the test cases in this
+ package to fail. Since '&' is still valid, we change the test cases
+ to use '&' as a separator instead.
+ See https://golang.org/doc/go1.17#semicolons for more information
+Author: William 'jawn-smith' Wilson
+Bug-Ubuntu: 
https://bugs.launchpad.net/ubuntu/+source/golang-github-ajg-form/+bug/1942131
+Applied-Upstream: https://github.com/ajg/form/pull/26
+Last-Update: 2021-08-30
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/form_test.go
++++ b/form_test.go
+@@ -126,7 +126,7 @@
+       var T time.Time
+       var U url.URL
+       const canonical = 
`A.0=x&A.1=y&A.2=z&B=true&C=42%2B6.6i&E.Bytes1=%00%01%02&E.Bytes2=%03%04%05&F=6.6&M.Bar=8&M.Foo=7&M.Qux=9&P%5C.D%5C%5CQ%5C.B.A=P%2FD&P%5C.D%5C%5CQ%5C.B.B=Q-B&R=8734&S=Hello%2C+there.&T=2013-10-01T07%3A05%3A34.000000088Z&U=http%3A%2F%2Fexample.org%2Ffoo%23bar&Zs.0.Q=11_22&Zs.0.Qp=33_44&Zs.0.Z=2006-12-01&life=42`
+-      const variation = 
`;C=42%2B6.6i;A.0=x;M.Bar=8;F=6.6;A.1=y;R=8734;A.2=z;Zs.0.Qp=33_44;B=true;M.Foo=7;T=2013-10-01T07:05:34.000000088Z;E.Bytes1=%00%01%02;Bytes2=%03%04%05;Zs.0.Q=11_22;Zs.0.Z=2006-12-01;M.Qux=9;life=42;S=Hello,+there.;P\.D\\Q\.B.A=P/D;P\.D\\Q\.B.B=Q-B;U=http%3A%2F%2Fexample.org%2Ffoo%23bar;`
++      const variation = 
`&C=42%2B6.6i&A.0=x&M.Bar=8&F=6.6&A.1=y&R=8734&A.2=z&Zs.0.Qp=33_44&B=true&M.Foo=7&T=2013-10-01T07:05:34.000000088Z&E.Bytes1=%00%01%02&Bytes2=%03%04%05&Zs.0.Q=11_22&Zs.0.Z=2006-12-01&M.Qux=9&life=42&S=Hello,+there.&P\.D\\Q\.B.A=P/D&P\.D\\Q\.B.B=Q-B&U=http%3A%2F%2Fexample.org%2Ffoo%23bar&`
+ 
+       for _, c := range []testCase{
+               // Bools
diff -Nru golang-github-ajg-form-1.5+git20160822.523a5da/debian/patches/series 
golang-github-ajg-form-1.5+git20160822.523a5da/debian/patches/series
--- golang-github-ajg-form-1.5+git20160822.523a5da/debian/patches/series        
1969-12-31 18:00:00.000000000 -0600
+++ golang-github-ajg-form-1.5+git20160822.523a5da/debian/patches/series        
2021-08-30 15:43:16.000000000 -0500
@@ -0,0 +1 @@
+change-semicolon-to-ampersand.patch

Reply via email to