The package rpms/golang-github-denisenkom-go-mssqldb.git has added or updated architecture
specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/golang-github-denisenkom-go-mssql....
Change:
-ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
Thanks.
Full change:
============
commit a7b8fd15aaabc3c8399ee60881ab6ffcd4f941cc
Author: Ed Marshall <esm(a)logic.net>
Date: Wed Jul 25 18:59:54 2018 -0700
Update to latest upstream, switch to forge-specific packaging, fix build failure.
diff --git a/.gitignore b/.gitignore
index e7f84ac..daae9f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/go-mssqldb-c7ee415.tar.gz
/go-mssqldb-b2a6258.tar.gz
/go-mssqldb-94099f0.tar.gz
+/go-mssqldb-242fa5aa1b45aeb9fcdfeee88822982e3f548e22.tar.gz
diff --git a/go-mssqldb-badStreamPanicf-args.patch
b/go-mssqldb-badStreamPanicf-args.patch
new file mode 100644
index 0000000..abe6774
--- /dev/null
+++ b/go-mssqldb-badStreamPanicf-args.patch
@@ -0,0 +1,29 @@
+From 627def1ab77c51f630cda3dac68b4b074d242ae4 Mon Sep 17 00:00:00 2001
+From: Ed Marshall <esm(a)logic.net>
+Date: Wed, 25 Jul 2018 18:40:05 -0700
+Subject: [PATCH] Type error with Go 1.11
+
+Building with Go 1.11 beta 2 in Fedora Rawhide threw a type error during a naive test
run:
+
+```
+[...]
+./token.go:216: badStreamPanicf format %s has arg collationSize of wrong type uint8
+FAIL
github.com/denisenkom/go-mssqldb [build failed]
+```
+---
+ token.go | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/token.go b/token.go
+index 67fdcc2..f7e17b3 100644
+--- a/token.go
++++ b/token.go
+@@ -213,7 +213,7 @@ func processEnvChg(sess *tdsSession) {
+
+ // SQL Collation data should contain 5 bytes in length
+ if collationSize != 5 {
+- badStreamPanicf("Invalid SQL Collation size value returned from server:
%s", collationSize)
++ badStreamPanicf("Invalid SQL Collation size value returned from server:
%d", collationSize)
+ }
+
+ // 4 bytes, contains: LCID ColFlags Version
diff --git a/golang-github-denisenkom-go-mssqldb.spec
b/golang-github-denisenkom-go-mssqldb.spec
index 03ab311..4fa4bf0 100644
--- a/golang-github-denisenkom-go-mssqldb.spec
+++ b/golang-github-denisenkom-go-mssqldb.spec
@@ -1,197 +1,66 @@
-# If any of the following macros should be set otherwise,
-# you can wrap any of them with the following conditions:
-# - %%if 0%%{centos} == 7
-# - %%if 0%%{?rhel} == 7
-# - %%if 0%%{?fedora} == 23
-# Or just test for particular distribution:
-# - %%if 0%%{centos}
-# - %%if 0%%{?rhel}
-# - %%if 0%%{?fedora}
-#
-# Be aware, on centos, both %%rhel and %%centos are set. If you want to test
-# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0
condition.
-# (Don't forget to replace double percentage symbol with single one in order to apply
a condition)
-
-# Generate devel rpm
-%global with_devel 1
-# Build project from bundled dependencies
-%global with_bundled 0
-# Build with debug info rpm
-%global with_debug 0
-# Run tests in check section
-# Don't run on i686/armv7hl, there are 64-bit assumptions in the unit tests
-%ifarch %{ix86} %{arm}
-%global with_check 0
-%else
-%global with_check 1
-%endif
-# Generate unit-test rpm
-%global with_unit_test 1
-
-%if 0%{?with_debug}
-%global _dwz_low_mem_die_limit 0
-%else
-%global debug_package %{nil}
-%endif
-
-
-%global provider github
-%global provider_tld com
-%global project denisenkom
-%global repo go-mssqldb
#
https://github.com/denisenkom/go-mssqldb
-%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
-%global import_path %{provider_prefix}
-%global commit 94099f01fe83bbe7ae8fb453e4fd3d208456da19
-%global commitdate 20180314
-%global shortcommit %(c=%{commit}; echo ${c:0:7})
-Name: golang-%{provider}-%{project}-%{repo}
-Version: 0
-Release: 0.3.%{commitdate}git%{shortcommit}%{?dist}
-Summary: Microsoft SQL server driver for Go (golang)
-# Detected licences
-# - BSD (3 clause) at 'LICENSE.txt'
-License: BSD
-URL: https://%{provider_prefix}
-Source0:
https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
+%global goipath
github.com/denisenkom/go-mssqldb
+%global commit 242fa5aa1b45aeb9fcdfeee88822982e3f548e22
+
+%global common_description %{expand:
+A pure Go MSSQL driver for the database/sql package.}
-# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
-ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
-# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
-BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
+%gometa -i
+Name: %{goname}
+Version: 0
+Release: 0.4%{?dist}
+Summary: Microsoft SQL server driver for Go
+License: BSD
+URL: %{gourl}
+Source: %{gosource}
+#
https://github.com/denisenkom/go-mssqldb/pull/403
+Patch0: go-mssqldb-badStreamPanicf-args.patch
%description
-%{summary}
+%{common_description}
+
-%if 0%{?with_devel}
%package devel
Summary: %{summary}
-BuildArch: noarch
-%if 0%{?with_check} && ! 0%{?with_bundled}
BuildRequires:
golang(golang.org/x/crypto/md4)
-BuildRequires:
golang(golang.org/x/net/context)
-%endif
-
-Requires:
golang(golang.org/x/crypto/md4)
-Requires:
golang(golang.org/x/net/context)
-
-Provides: golang(%{import_path}) = %{version}-%{release}
-Provides: golang(%{import_path}/batch) = %{version}-%{release}
+BuildRequires:
golang(cloud.google.com/go/civil)
%description devel
-%{summary}
+%{common_description}
This package contains library source intended for
building other packages which use import path with
-%{import_path} prefix.
-%endif
-
-%if 0%{?with_unit_test} && 0%{?with_devel}
-%package unit-test-devel
-Summary: Unit tests for %{name} package
-%if 0%{?with_check}
-#Here comes all BuildRequires: PACKAGE the unit tests
-#in %%check section need for running
-%endif
-
-# test subpackage tests code from devel subpackage
-Requires: %{name}-devel = %{version}-%{release}
-
-%if 0%{?with_check} && ! 0%{?with_bundled}
-%endif
+%{goipath} prefix.
-%description unit-test-devel
-%{summary}
-
-This package contains unit tests for project
-providing packages with %{import_path} prefix.
-%endif
-
%prep
-%setup -q -n %{repo}-%{commit}
-
-%build
-%install
-# source codes for building projects
-%if 0%{?with_devel}
-install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
-echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list
-# find all *.go but no *_test.go files and generate devel.file-list
-for file in $(find . \( -iname "*.go" -or -iname "*.s" \) \! -iname
"*_test.go") ; do
- dirprefix=$(dirname $file)
- install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix
- cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
- echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
-
- while [ "$dirprefix" != "." ]; do
- echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >>
devel.file-list
- dirprefix=$(dirname $dirprefix)
- done
-done
-%endif
-
-# testing files for this project
-%if 0%{?with_unit_test} && 0%{?with_devel}
-install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
-# find all *_test.go files and generate unit-test-devel.file-list
-for file in $(find . -iname "*_test.go") ; do
- dirprefix=$(dirname $file)
- install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix
- cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
- echo "%%{gopath}/src/%%{import_path}/$file" >>
unit-test-devel.file-list
-
- while [ "$dirprefix" != "." ]; do
- echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >>
devel.file-list
- dirprefix=$(dirname $dirprefix)
- done
-done
-%endif
-
-%if 0%{?with_devel}
-sort -u -o devel.file-list devel.file-list
-%endif
-
-%check
-%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
-%if ! 0%{?with_bundled}
-export GOPATH=%{buildroot}/%{gopath}:%{gopath}
-%else
-# No dependency directories so far
+%forgeautosetup
-export GOPATH=%{buildroot}/%{gopath}:%{gopath}
-%endif
-%if ! 0%{?gotest:1}
-%global gotest go test
-%endif
+%install
+%goinstall
-%gotest %{import_path}
-%gotest %{import_path}/batch
-%endif
-#define license tag if not already defined
-%{!?_licensedir:%global license %doc}
+%check
+# Sadly, tests expect a running MSSQL instance.
+%gochecks -d .
-%if 0%{?with_devel}
%files devel -f devel.file-list
%license LICENSE.txt
%doc README.md examples
-%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
-%endif
-%if 0%{?with_unit_test} && 0%{?with_devel}
-%files unit-test-devel -f unit-test-devel.file-list
-%license LICENSE.txt
-%doc README.md
-%endif
%changelog
+* Wed Jul 25 2018 Ed Marshall <esm(a)logic.net> - 0-0.4.20180725git242fa5a
+- Switch to forge-specific packaging.
+- Update to latest upstream commit.
+- Fix build failure with Go 1.11 beta.
+
* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
0-0.3.20180314git94099f0
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
diff --git a/sources b/sources
index f837aaa..5368764 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (go-mssqldb-94099f0.tar.gz) =
d50117fa566b1ce2d1b6f3076d2abd3c4be763ae9c0404de8f4c91f62263dc22469c3baa3e9366034c6ffb141b8e8cd389cd3bbb8b4684db31e14fa5d38fcdc1
+SHA512 (go-mssqldb-242fa5aa1b45aeb9fcdfeee88822982e3f548e22.tar.gz) =
a9778e6d195bd14cde9f48f336374a0c1001eac40d313dd3d57fdcb7be5be1f156a798d6e0cdf4b108bd8729e92bf6554f3b02982b087613783e2b91dba2fe0a