New Upstream Release - golang-glide
Ready changes
Summary
Merged new upstream version: 0.13.3 (was: 0.13.1).
Resulting package
Built on 2022-03-16T06:39 (took 2m43s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-releases golang-glide
Lintian Result
Diff
diff --git a/.travis.yml b/.travis.yml
index bac4233..a83f297 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,12 @@
language: go
go:
- - 1.5.x
- - 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
+ - 1.10.x
+ - 1.11.x
+ - 1.12.x
- tip
# Setting sudo access to false will let Travis CI use containers rather than
@@ -18,7 +19,7 @@ sudo: false
# in the vendor directory. We don't need to test all dependent packages.
# Only testing this project.
script:
- - GO15VENDOREXPERIMENT=1 make test integration-test verify-version
+ - make test integration-test verify-version
notifications:
webhooks:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d039c1..4fa4345 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,17 @@
+# Release 0.13.3 (2019-07-12)
+
+## Fixed
+
+- #1056: Fixed issue where Glide is not detecting crypto/ed25519, now in the stdlib (thanks @martinkunc)
+- #1033: Fixed segfault with Glide 0.13.2 when stripping Godep workspace (thanks @databus23)
+
+# Release 0.13.2 (2018-09-26)
+
+## Fixed
+
+- #956: Fixed Error handling nested vendor folders (thanks @apynes2)
+- #953: Fixed issue where error was not propagating
+
# Release 0.13.1 (2017-11-07)
## Fixed
diff --git a/README.md b/README.md
index edf89c0..b5cf500 100644
--- a/README.md
+++ b/README.md
@@ -14,15 +14,12 @@ distributed with the package.
[![Build Status](https://travis-ci.org/Masterminds/glide.svg)](https://travis-ci.org/Masterminds/glide)
[![Build status](https://ci.appveyor.com/api/projects/status/3pl4ytgdlfj852li?svg=true&passingText=windows%20build%20passing&failingText=windows%20build%20failing)](https://ci.appveyor.com/project/mattfarina/glide-a8xtg)
-[![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/glide)](https://goreportcard.com/report/github.com/Masterminds/glide) [![GoDoc](https://godoc.org/github.com/Masterminds/glide?status.svg)](https://godoc.org/github.com/Masterminds/glide) [![Documentation Status](https://readthedocs.org/projects/glide/badge/?version=stable)](http://glide.readthedocs.org/en/stable/?badge=stable) [![Documentation Status](https://readthedocs.org/projects/glide/badge/?version=latest)](http://glide.readthedocs.org/en/latest/?badge=latest) [![Join the chat at https://gitter.im/Masterminds/glide](https://badges.gitter.im/Masterminds/glide.svg)](https://gitter.im/Masterminds/glide?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/glide)](https://goreportcard.com/report/github.com/Masterminds/glide) [![GoDoc](https://godoc.org/github.com/Masterminds/glide?status.svg)](https://godoc.org/github.com/Masterminds/glide) [![Documentation Status](https://readthedocs.org/projects/glide/badge/?version=stable)](http://glide.readthedocs.org/en/stable/?badge=stable) [![Documentation Status](https://readthedocs.org/projects/glide/badge/?version=latest)](http://glide.readthedocs.org/en/latest/?badge=latest)
-### Golang Dep
+### Go Modules
-The Go community now has the [dep](https://github.com/golang/dep) project to
-manage dependencies. Please consider trying to migrate from Glide to dep. If there
-is an issue preventing you from migrating please file an issue with dep so the
-problem can be corrected. Glide will continue to be supported for some time but
-is considered to be in a state of support rather than active feature development.
+The Go community is now using Go Modules to handle dependencies. Please consider
+using that instead of Glide. Glide is now mostly unmaintained.
### Features
diff --git a/debian/changelog b/debian/changelog
index 66e12cb..705aaf2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-glide (0.13.3-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk> Wed, 16 Mar 2022 06:37:33 -0000
+
golang-glide (0.13.1-3) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/disable-network-tests.patch b/debian/patches/disable-network-tests.patch
index 8018f41..652faa2 100644
--- a/debian/patches/disable-network-tests.patch
+++ b/debian/patches/disable-network-tests.patch
@@ -26,11 +26,11 @@ Index: golang-glide/util/util_test.go
urlList := map[string]string{
"github.com/Masterminds/VCSTestRepo": "github.com/Masterminds/VCSTestRepo",
"bitbucket.org/mattfarina/testhgrepo": "bitbucket.org/mattfarina/testhgrepo",
-diff --git a/dependency/resolver_test.go b/dependency/resolver_test.go
-index f4b44d938547..73b1325d538a 100644
---- a/dependency/resolver_test.go
-+++ b/dependency/resolver_test.go
-@@ -42,6 +42,7 @@ func TestResolveLocalShallow(t *testing.T) {
+Index: golang-glide/dependency/resolver_test.go
+===================================================================
+--- golang-glide.orig/dependency/resolver_test.go
++++ golang-glide/dependency/resolver_test.go
+@@ -42,6 +42,7 @@ func TestResolveLocalShallow(t *testing.
}
func TestResolveLocalDeep(t *testing.T) {
@@ -38,7 +38,7 @@ index f4b44d938547..73b1325d538a 100644
r, err := NewResolver("../")
if err != nil {
t.Fatal(err)
-@@ -60,6 +61,7 @@ func TestResolveLocalDeep(t *testing.T) {
+@@ -60,6 +61,7 @@ func TestResolveLocalDeep(t *testing.T)
}
func TestResolve(t *testing.T) {
diff --git a/dependency/resolver.go b/dependency/resolver.go
index 35bd474..f0b5495 100644
--- a/dependency/resolver.go
+++ b/dependency/resolver.go
@@ -5,6 +5,7 @@ import (
"errors"
"runtime"
"sort"
+
//"go/build"
"os"
"path/filepath"
@@ -975,6 +976,10 @@ var PackagesAddedToStdlib = map[string]struct{}{
// Some packages, such as github.com/RoaringBitmap/roaring are importing
// it with build flags in files for go1.9.
"math/bits": struct{}{},
+
+ // crypto/ed25519 is a package being added to the Go 1.13 standard library.
+ // It is importing itself with build flags in files for go1.13.
+ "crypto/ed25519": struct{}{},
}
// FindPkg takes a package name and attempts to find it on the filesystem
diff --git a/glide.go b/glide.go
index 58ab964..1de865e 100644
--- a/glide.go
+++ b/glide.go
@@ -34,7 +34,7 @@ import (
"os"
)
-var version = "0.13.0-dev"
+var version = "0.13.2-dev"
const usage = `Vendor Package Management for your Go projects.
diff --git a/glide.lock b/glide.lock
index 430edf9..8f3a367 100644
--- a/glide.lock
+++ b/glide.lock
@@ -1,14 +1,14 @@
-hash: 1f13d16b2759f4c698bf1fa66a55ef06a42ba86859153c478f903e60502a1273
-updated: 2017-10-04T10:27:41.570512797-04:00
+hash: b9e4643253d2170374b095ae0f19f71c3ef5c0549ba32a7148a6797e99a95144
+updated: 2019-07-09T18:35:06.713855-04:00
imports:
- name: github.com/codegangsta/cli
version: cfb38830724cc34fedffe9a2a29fb54fa9169cd1
- name: github.com/Masterminds/semver
- version: 15d8430ab86497c5c0da827b748823945e1cf1e1
+ version: c7af12943936e8c39859482e61f0574c2fd7fc75
- name: github.com/Masterminds/vcs
- version: 6f1c6d150500e452704e9863f68c2559f58616bf
+ version: f94282d8632a0620f79f0c6ff0e82604e8c5c85b
- name: github.com/mitchellh/go-homedir
version: b8bc1bf767474819792c23f32d8286a45736f1c6
- name: gopkg.in/yaml.v2
- version: a3f3340b5840cee44f372bddb5880fcbc419b46a
+ version: 670d4cfef0544295bc27a114dbac37980d83185a
testImports: []
diff --git a/glide.yaml b/glide.yaml
index 5b6c079..73f1119 100644
--- a/glide.yaml
+++ b/glide.yaml
@@ -11,7 +11,7 @@ owners:
import:
- package: gopkg.in/yaml.v2
- package: github.com/Masterminds/vcs
- version: ^1.12.0
+ version: ^1.13.1
- package: github.com/codegangsta/cli
version: ^1.16.0
- package: github.com/Masterminds/semver
diff --git a/godep/strip/strip.go b/godep/strip/strip.go
index 39d54e1..23e25d1 100644
--- a/godep/strip/strip.go
+++ b/godep/strip/strip.go
@@ -70,7 +70,10 @@ func stripGodepWorkspaceHandler(path string, info os.FileInfo, err error) error
godepMark[pp] = true
msg.Info("Removing: %s", path)
- return os.RemoveAll(path)
+ if err := os.RemoveAll(path); err != nil {
+ return err
+ }
+ return filepath.SkipDir
}
msg.Debug("%s is not a directory. Skipping removal", path)
diff --git a/path/strip.go b/path/strip.go
index 67aba6f..bae8777 100644
--- a/path/strip.go
+++ b/path/strip.go
@@ -8,6 +8,30 @@ import (
"github.com/Masterminds/glide/msg"
)
+func getWalkFunction(searchPath string, removeAll func(p string) error) func(path string,
+ info os.FileInfo, err error) error {
+ return func(path string, info os.FileInfo, err error) error {
+ if err != nil {
+ return err
+ }
+
+ // Skip the base vendor directory
+ if path == searchPath {
+ return nil
+ }
+
+ if info.Name() == "vendor" && info.IsDir() {
+ msg.Info("Removing: %s", path)
+ err = removeAll(path)
+ if nil != err {
+ return err
+ }
+ return filepath.SkipDir
+ }
+ return nil
+ }
+}
+
// StripVendor removes nested vendor and Godeps/_workspace/ directories.
func StripVendor() error {
searchPath, _ := Vendor()
@@ -19,26 +43,8 @@ func StripVendor() error {
return err
}
- err := filepath.Walk(searchPath, func(path string, info os.FileInfo, err error) error {
- // Skip the base vendor directory
- if path == searchPath {
- return nil
- }
-
- name := info.Name()
- if name == "vendor" {
- if _, err := os.Stat(path); err == nil {
- if info.IsDir() {
- msg.Info("Removing: %s", path)
- return CustomRemoveAll(path)
- }
+ err := filepath.Walk(searchPath, getWalkFunction(searchPath, CustomRemoveAll))
- msg.Debug("%s is not a directory. Skipping removal", path)
- return nil
- }
- }
- return nil
- })
if err != nil {
return err
}
diff --git a/path/strip_int_test.go b/path/strip_int_test.go
new file mode 100644
index 0000000..a6ad4bc
--- /dev/null
+++ b/path/strip_int_test.go
@@ -0,0 +1,44 @@
+package path
+
+import (
+ "io/ioutil"
+ "os"
+ "path"
+ "testing"
+)
+
+func generateTestDirectory(t *testing.T) string {
+ baseDir, err := ioutil.TempDir(os.TempDir(), "mgt")
+ if nil != err {
+ t.Error("Unable to create temp directory: ", err.Error())
+ }
+ paths := map[string][]string{
+ "github.com/fake/log": {"log.go"},
+ "github.com/phoney/foo": {"bar.go"},
+ "github.com/phoney/foo/vendor": {"test.go", "foo.bar"},
+ "github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor": {},
+ "github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil": {"allpackages.go", "tags.go", "fakecontext.go"},
+ "github.com/aws/aws-sdk-go/vendor": {"key_test.go", "key.go"},
+ "github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini": {"struct_test.go", "error.go", "ini_test.go"},
+ }
+ os.OpenFile(path.Join(baseDir, "glide.yaml"), os.O_RDONLY|os.O_CREATE, 0666)
+ for p, files := range paths {
+ p = path.Join(baseDir, "vendor", p)
+ if err = os.MkdirAll(p, 0777); nil != err {
+ t.Errorf("Unable to create vendor dir: %s\n%s", p, err.Error())
+ }
+ for _, f := range files {
+ os.OpenFile(path.Join(p, f), os.O_RDONLY|os.O_CREATE, 0666)
+ }
+ }
+ return baseDir
+}
+
+func TestNestVendorNoError(t *testing.T) {
+ workingDir := generateTestDirectory(t)
+ os.Chdir(workingDir)
+ err := StripVendor()
+ if nil != err {
+ t.Errorf("Unexpected error in StripVendor: %s", err.Error())
+ }
+}
diff --git a/path/strip_test.go b/path/strip_test.go
new file mode 100644
index 0000000..3ce2497
--- /dev/null
+++ b/path/strip_test.go
@@ -0,0 +1,141 @@
+package path
+
+import (
+ "errors"
+ "os"
+ "path/filepath"
+ "reflect"
+ "testing"
+ "time"
+)
+
+type mockFileInfo struct {
+ name string
+ isDir bool
+}
+
+func (mfi *mockFileInfo) Name() string {
+ return mfi.name
+}
+
+func (mfi *mockFileInfo) Size() int64 {
+ panic("not implemented")
+}
+
+func (mfi *mockFileInfo) Mode() os.FileMode {
+ panic("not implemented")
+}
+
+func (mfi *mockFileInfo) ModTime() time.Time {
+ panic("not implemented")
+}
+
+func (mfi *mockFileInfo) IsDir() bool {
+ return mfi.isDir
+}
+
+func (mfi *mockFileInfo) Sys() interface{} {
+ panic("not implemented")
+}
+
+type removeAll struct {
+ calledWith string
+ err error
+}
+
+func (rah *removeAll) removeAll(p string) error {
+ rah.calledWith = p
+ return rah.err
+}
+
+func TestWalkFunction(t *testing.T) {
+ type args struct {
+ searchPath string
+ removeAll *removeAll
+ path string
+ info os.FileInfo
+ err error
+ }
+ tests := []struct {
+ name string
+ args args
+ want error
+ wantCalledWith string
+ }{
+ {
+ name: "WalkFunctionSkipsNonVendor",
+ args: args{searchPath: "foo",
+ removeAll: &removeAll{},
+ path: "foo/bar",
+ info: &mockFileInfo{name: "bar", isDir: true},
+ err: nil,
+ },
+ want: nil,
+ wantCalledWith: "",
+ },
+ {
+ name: "WalkFunctionSkipsNonDir",
+ args: args{searchPath: "foo",
+ removeAll: &removeAll{},
+ path: "foo/vendor",
+ info: &mockFileInfo{name: "vendor", isDir: false},
+ err: nil,
+ },
+ want: nil,
+ wantCalledWith: "",
+ },
+ {
+ name: "WalkFunctionDeletesVendor",
+ args: args{searchPath: "foo",
+ removeAll: &removeAll{},
+ path: "foo/vendor",
+ info: &mockFileInfo{name: "vendor", isDir: true},
+ err: nil,
+ },
+ want: filepath.SkipDir,
+ wantCalledWith: "foo/vendor",
+ },
+ {
+ name: "WalkFunctionReturnsPassedError",
+ args: args{searchPath: "foo",
+ removeAll: &removeAll{},
+ path: "foo/vendor",
+ info: &mockFileInfo{name: "vendor", isDir: true},
+ err: errors.New("expected"),
+ },
+ want: errors.New("expected"),
+ wantCalledWith: "",
+ },
+ {
+ name: "WalkFunctionReturnsRemoveAllError",
+ args: args{searchPath: "foo",
+ removeAll: &removeAll{err: errors.New("expected")},
+ path: "foo/vendor",
+ info: &mockFileInfo{name: "vendor", isDir: true},
+ err: nil,
+ },
+ want: errors.New("expected"),
+ wantCalledWith: "foo/vendor",
+ },
+ {
+ name: "WalkFunctionSkipsBaseDir",
+ args: args{searchPath: "vendor",
+ removeAll: &removeAll{},
+ path: "vendor",
+ info: &mockFileInfo{name: "vendor", isDir: true},
+ err: nil,
+ },
+ want: nil,
+ wantCalledWith: "",
+ },
+ }
+ for _, test := range tests {
+ walkFunction := getWalkFunction(test.args.searchPath, test.args.removeAll.removeAll)
+ if actual := walkFunction(test.args.path, test.args.info, test.args.err); !reflect.DeepEqual(actual, test.want) {
+ t.Errorf("walkFunction() = %v, want %v", actual, test.want)
+ }
+ if test.args.removeAll.calledWith != test.wantCalledWith {
+ t.Errorf("removeAll argument = \"%s\", want \"%s\"", test.args.removeAll.calledWith, test.wantCalledWith)
+ }
+ }
+}
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/share/gocode/src/github.com/Masterminds/glide/path/strip_int_test.go -rw-r--r-- root/root /usr/share/gocode/src/github.com/Masterminds/glide/path/strip_test.go
No differences were encountered in the control files