diff -Nru golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/changelog golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/changelog --- golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/changelog 2017-07-27 19:01:22.000000000 +0000 +++ golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/changelog 2020-06-28 06:46:39.000000000 +0000 @@ -1,3 +1,20 @@ +golang-github-dylanmei-winrmtest (0.0~git20151226.0256178-3) unstable; urgency=medium + + [ Alexandre Viau ] + * Point Vcs-* urls to salsa.debian.org. + + [ Shengjing Zhu ] + * Update maintainer and uploader email address + * Change priority to optional + * Update Standards-Version to 4.5.0 + * Add Rules-Requires-Root + * Update debhelper-compat to 13 + * Stop converting markdown doc + * Update uscan watch file + * Add patch to build with new winrm + + -- Shengjing Zhu Sun, 28 Jun 2020 14:46:39 +0800 + golang-github-dylanmei-winrmtest (0.0~git20151226.0256178-2) unstable; urgency=medium * Team upload. diff -Nru golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/clean golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/clean --- golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/clean 2017-07-27 18:53:38.000000000 +0000 +++ golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/clean 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -README diff -Nru golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/compat golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/compat --- golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/compat 2017-07-27 18:53:38.000000000 +0000 +++ golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -10 diff -Nru golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/control golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/control --- golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/control 2017-07-27 19:01:16.000000000 +0000 +++ golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/control 2020-06-28 06:46:39.000000000 +0000 @@ -1,29 +1,29 @@ Source: golang-github-dylanmei-winrmtest Section: devel -Priority: extra -Maintainer: Debian Go Packaging Team -Uploaders: Shengjing Zhu -Build-Depends: debhelper (>= 10), +Priority: optional +Maintainer: Debian Go Packaging Team +Uploaders: Shengjing Zhu , +Build-Depends: debhelper-compat (= 13), dh-golang, golang-any, - golang-github-masterzen-winrm-dev, + golang-github-gofrs-uuid-dev, + golang-github-masterzen-simplexml-dev, golang-github-masterzen-xmlpath-dev, - golang-github-satori-go.uuid-dev, - pandoc -Standards-Version: 4.0.0 +Standards-Version: 4.5.0 Homepage: https://github.com/dylanmei/winrmtest -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-go/packages/golang-github-dylanmei-winrmtest.git -Vcs-Git: https://anonscm.debian.org/git/pkg-go/packages/golang-github-dylanmei-winrmtest.git +Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-dylanmei-winrmtest +Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-dylanmei-winrmtest.git XS-Go-Import-Path: github.com/dylanmei/winrmtest +Rules-Requires-Root: no Testsuite: autopkgtest-pkg-go Package: golang-github-dylanmei-winrmtest-dev Architecture: all -Depends: ${shlibs:Depends}, - ${misc:Depends}, - golang-github-masterzen-winrm-dev, +Depends: golang-github-gofrs-uuid-dev, + golang-github-masterzen-simplexml-dev, golang-github-masterzen-xmlpath-dev, - golang-github-satori-go.uuid-dev + ${misc:Depends}, + ${shlibs:Depends}, Description: testing addon for golang-github-masterzen-winrm This is an in-progress testing addon for the winrm library (remote command execution on Windows machines) for Google Go, diff -Nru golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/gitlab-ci.yml golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/gitlab-ci.yml --- golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/gitlab-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/gitlab-ci.yml 2020-06-28 06:46:39.000000000 +0000 @@ -0,0 +1,28 @@ + +# auto-generated, DO NOT MODIFY. +# The authoritative copy of this file lives at: +# https://salsa.debian.org/go-team/ci/blob/master/cmd/ci/gitlabciyml.go + +# TODO: publish under debian-go-team/ci +image: stapelberg/ci2 + +test_the_archive: + artifacts: + paths: + - before-applying-commit.json + - after-applying-commit.json + script: + # Create an overlay to discard writes to /srv/gopath/src after the build: + - "rm -rf /cache/overlay/{upper,work}" + - "mkdir -p /cache/overlay/{upper,work}" + - "mount -t overlay overlay -o lowerdir=/srv/gopath/src,upperdir=/cache/overlay/upper,workdir=/cache/overlay/work /srv/gopath/src" + - "export GOPATH=/srv/gopath" + - "export GOCACHE=/cache/go" + # Build the world as-is: + - "ci-build -exemptions=/var/lib/ci-build/exemptions.json > before-applying-commit.json" + # Copy this package into the overlay: + - "GBP_CONF_FILES=:debian/gbp.conf gbp buildpackage --git-no-pristine-tar --git-ignore-branch --git-ignore-new --git-export-dir=/tmp/export --git-no-overlay --git-tarball-dir=/nonexistant --git-cleaner=/bin/true --git-builder='dpkg-buildpackage -S -d --no-sign'" + - "pgt-gopath -dsc /tmp/export/*.dsc" + # Rebuild the world: + - "ci-build -exemptions=/var/lib/ci-build/exemptions.json > after-applying-commit.json" + - "ci-diff before-applying-commit.json after-applying-commit.json" diff -Nru golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/patches/0001-build-with-new-winrm.patch golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/patches/0001-build-with-new-winrm.patch --- golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/patches/0001-build-with-new-winrm.patch 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/patches/0001-build-with-new-winrm.patch 2020-06-28 06:46:39.000000000 +0000 @@ -0,0 +1,177 @@ +From: Shengjing Zhu +Date: Sun, 28 Jun 2020 14:23:37 +0800 +Subject: build with new winrm + +--- + namespaces.go | 24 ++++++++++++++++++++++++ + wsman.go | 11 +++++------ + wsman_test.go | 19 +++++++++---------- + 3 files changed, 38 insertions(+), 16 deletions(-) + create mode 100644 namespaces.go + +diff --git a/namespaces.go b/namespaces.go +new file mode 100644 +index 0000000..7816c8b +--- /dev/null ++++ b/namespaces.go +@@ -0,0 +1,24 @@ ++package winrmtest ++ ++import ( ++ "github.com/masterzen/simplexml/dom" ++ "github.com/masterzen/xmlpath" ++) ++ ++var ( ++ NS_SOAP_ENV = dom.Namespace{"env", "http://www.w3.org/2003/05/soap-envelope"} ++ NS_ADDRESSING = dom.Namespace{"a", "http://schemas.xmlsoap.org/ws/2004/08/addressing"} ++ NS_WSMAN_DMTF = dom.Namespace{"w", "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"} ++ NS_WSMAN_MSFT = dom.Namespace{"p", "http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"} ++ NS_WIN_SHELL = dom.Namespace{"rsp", "http://schemas.microsoft.com/wbem/wsman/1/windows/shell"} ++) ++ ++func getAllNamespaces() []xmlpath.Namespace { ++ var ns = []dom.Namespace{NS_WIN_SHELL, NS_ADDRESSING, NS_WSMAN_DMTF, NS_WSMAN_MSFT, NS_SOAP_ENV} ++ ++ var xmlpathNs = make([]xmlpath.Namespace, 0, 4) ++ for _, namespace := range ns { ++ xmlpathNs = append(xmlpathNs, xmlpath.Namespace{Prefix: namespace.Prefix, Uri: namespace.Uri}) ++ } ++ return xmlpathNs ++} +diff --git a/wsman.go b/wsman.go +index c6d1c24..cba3b23 100644 +--- a/wsman.go ++++ b/wsman.go +@@ -8,9 +8,8 @@ import ( + "strconv" + "strings" + +- "github.com/masterzen/winrm/soap" ++ "github.com/gofrs/uuid" + "github.com/masterzen/xmlpath" +- "github.com/satori/go.uuid" + ) + + type wsman struct { +@@ -25,7 +24,7 @@ type command struct { + } + + func (w *wsman) HandleCommand(m MatcherFunc, f CommandFunc) string { +- id := uuid.NewV4().String() ++ id := uuid.Must(uuid.NewV4()).String() + w.commands = append(w.commands, &command{ + id: id, + matcher: m, +@@ -132,7 +131,7 @@ func (w *wsman) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + + func readAction(env *xmlpath.Node) string { + xpath, err := xmlpath.CompileWithNamespace( +- "//a:Action", soap.GetAllNamespaces()) ++ "//a:Action", getAllNamespaces()) + + if err != nil { + return "" +@@ -144,7 +143,7 @@ func readAction(env *xmlpath.Node) string { + + func readCommand(env *xmlpath.Node) string { + xpath, err := xmlpath.CompileWithNamespace( +- "//rsp:Command", soap.GetAllNamespaces()) ++ "//rsp:Command", getAllNamespaces()) + + if err != nil { + return "" +@@ -159,7 +158,7 @@ func readCommand(env *xmlpath.Node) string { + + func readCommandIDFromDesiredStream(env *xmlpath.Node) string { + xpath, err := xmlpath.CompileWithNamespace( +- "//rsp:DesiredStream/@CommandId", soap.GetAllNamespaces()) ++ "//rsp:DesiredStream/@CommandId", getAllNamespaces()) + + if err != nil { + return "" +diff --git a/wsman_test.go b/wsman_test.go +index e9e4999..53e6a70 100644 +--- a/wsman_test.go ++++ b/wsman_test.go +@@ -8,9 +8,8 @@ import ( + "strings" + "testing" + +- "github.com/masterzen/winrm/soap" ++ "github.com/gofrs/uuid" + "github.com/masterzen/xmlpath" +- "github.com/satori/go.uuid" + ) + + func Test_creating_a_shell(t *testing.T) { +@@ -45,7 +44,7 @@ func Test_creating_a_shell(t *testing.T) { + } + + xpath, _ := xmlpath.CompileWithNamespace( +- "//rsp:ShellId", soap.GetAllNamespaces()) ++ "//rsp:ShellId", getAllNamespaces()) + + if _, found := xpath.String(env); !found { + t.Error("Expected a Shell identifier.") +@@ -80,7 +79,7 @@ func Test_executing_a_command(t *testing.T) { + } + + xpath, _ := xmlpath.CompileWithNamespace( +- "//rsp:CommandId", soap.GetAllNamespaces()) ++ "//rsp:CommandId", getAllNamespaces()) + + result, _ := xpath.String(env) + if result != id { +@@ -103,7 +102,7 @@ func Test_executing_a_regex_command(t *testing.T) { + + "echo %d >> C:\file.cmd" + +- `, uuid.NewV4().String()))) ++ `, uuid.Must(uuid.NewV4()).String()))) + + w.ServeHTTP(res, req) + if res.Code != http.StatusOK { +@@ -116,7 +115,7 @@ func Test_executing_a_regex_command(t *testing.T) { + } + + xpath, _ := xmlpath.CompileWithNamespace( +- "//rsp:CommandId", soap.GetAllNamespaces()) ++ "//rsp:CommandId", getAllNamespaces()) + + result, _ := xpath.String(env) + if result != id { +@@ -152,7 +151,7 @@ func Test_receiving_command_results(t *testing.T) { + t.Error("Couldn't compile the SOAP response.") + } + +- xpath, _ := xmlpath.CompileWithNamespace("//rsp:ReceiveResponse", soap.GetAllNamespaces()) ++ xpath, _ := xmlpath.CompileWithNamespace("//rsp:ReceiveResponse", getAllNamespaces()) + iter := xpath.Iter(env) + if !iter.Next() { + t.Error("Expected a ReceiveResponse element.") +@@ -160,7 +159,7 @@ func Test_receiving_command_results(t *testing.T) { + + xresp := iter.Node() + xpath, _ = xmlpath.CompileWithNamespace( +- fmt.Sprintf("rsp:Stream[@CommandId='%s']", id), soap.GetAllNamespaces()) ++ fmt.Sprintf("rsp:Stream[@CommandId='%s']", id), getAllNamespaces()) + iter = xpath.Iter(xresp) + + if !iter.Next() || !nodeHasAttribute(iter.Node(), "Name", "stdout") || iter.Node().String() != "dGFjb3M=" { +@@ -177,13 +176,13 @@ func Test_receiving_command_results(t *testing.T) { + + xpath, _ = xmlpath.CompileWithNamespace( + "//rsp:CommandState[@State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done']", +- soap.GetAllNamespaces()) ++ getAllNamespaces()) + + if _, found := xpath.String(env); !found { + t.Error("Expected CommandState=\"Done\"") + } + +- xpath, _ = xmlpath.CompileWithNamespace("//rsp:CommandState/rsp:ExitCode", soap.GetAllNamespaces()) ++ xpath, _ = xmlpath.CompileWithNamespace("//rsp:CommandState/rsp:ExitCode", getAllNamespaces()) + if code, _ := xpath.String(env); code != "0" { + t.Errorf("Expected ExitCode=0 but found \"%s\"\n", code) + } diff -Nru golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/patches/series golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/patches/series --- golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/patches/series 2020-06-28 06:46:39.000000000 +0000 @@ -0,0 +1 @@ +0001-build-with-new-winrm.patch diff -Nru golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/rules golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/rules --- golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/rules 2017-07-27 18:53:38.000000000 +0000 +++ golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/rules 2020-06-28 06:46:39.000000000 +0000 @@ -1,10 +1,4 @@ #!/usr/bin/make -f -#export DH_VERBOSE=1 -#export DEB_BUILD_OPTIONS=nocheck %: dh $@ --buildsystem=golang --with=golang - -override_dh_installdocs: - pandoc -f markdown -t plain -o README README.md - dh_installdocs README diff -Nru golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/watch golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/watch --- golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/watch 2017-07-27 18:53:38.000000000 +0000 +++ golang-github-dylanmei-winrmtest-0.0~git20151226.0256178/debian/watch 2020-06-28 06:46:39.000000000 +0000 @@ -1,3 +1,4 @@ version=4 -opts=dversionmangle=s/.*/0.No-Release/ \ -https://people.debian.org/~eriberto/ FakeWatchNoUpstreamReleaseForThisPackage-(\d\S+)\.gz +opts="mode=git, pgpmode=none" \ + https://github.com/dylanmei/winrmtest/ \ + HEAD