diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/changelog golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/changelog --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/changelog 2018-02-06 04:32:52.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/changelog 2020-07-12 18:18:32.000000000 +0000 @@ -1,3 +1,24 @@ +golang-github-mitchellh-go-fs (0.0~git20180402.b7b9ca4-1) unstable; urgency=medium + + [ Debian Janitor ] + * Use secure copyright file specification URI. + * Bump debhelper from deprecated 9 to 12. + * Set debhelper-compat version in Build-Depends. + * Set upstream metadata fields: + Bug-Database, Bug-Submit, Repository, Repository-Browse. + + [ Shengjing Zhu ] + * Add uscan watch file + * New upstream version 0.0~git20180402.b7b9ca4 + * Update maintainer address to team+pkg-go@tracker.debian.org + * Add Rules-Requires-Root + * Add myself to uploaders (Closes: #940389) + * Replace golang-go with golang-any + * Update Standards-Version to 4.5.0 (no changes) + * Bump debhelper-compat to 13 + + -- Shengjing Zhu Mon, 13 Jul 2020 02:18:32 +0800 + golang-github-mitchellh-go-fs (0.0~git20161108.7bae45d-3) unstable; urgency=medium * Team upload. diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/compat golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/compat --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/compat 2018-02-06 04:32:52.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -9 diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/control golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/control --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/control 2018-02-06 04:32:52.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/control 2020-07-12 18:18:32.000000000 +0000 @@ -1,23 +1,23 @@ Source: golang-github-mitchellh-go-fs Section: devel Priority: optional -Maintainer: Debian Go Packaging Team -Uploaders: Alexandre Viau -Build-Depends: debhelper (>= 9), +Maintainer: Debian Go Packaging Team +Uploaders: Shengjing Zhu , +Build-Depends: debhelper-compat (= 13), dh-golang, - golang-go -Standards-Version: 3.9.6 + golang-any, +Standards-Version: 4.5.0 Homepage: https://github.com/mitchellh/go-fs Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-mitchellh-go-fs Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-mitchellh-go-fs.git XS-Go-Import-Path: github.com/mitchellh/go-fs +Rules-Requires-Root: no Testsuite: autopkgtest-pkg-go Package: golang-github-mitchellh-go-fs-dev Architecture: all -Depends: ${shlibs:Depends}, - ${misc:Depends}, - golang-go +Depends: ${misc:Depends}, + ${shlibs:Depends}, Description: Filesystem library for Go, implementing FAT filesystems so far This library implements the ability to create, read, and write FAT filesystems using pure Go. In this library's current state, it is diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/copyright golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/copyright --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/copyright 2018-02-06 04:32:52.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/copyright 2020-07-12 18:18:32.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: go-fs Source: https://github.com/mitchellh/go-fs diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/gitlab-ci.yml golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/gitlab-ci.yml --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/gitlab-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/gitlab-ci.yml 2020-07-12 18:18:32.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-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/upstream/metadata golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/upstream/metadata --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/upstream/metadata 2020-07-12 18:18:32.000000000 +0000 @@ -0,0 +1,5 @@ +--- +Bug-Database: https://github.com/mitchellh/go-fs/issues +Bug-Submit: https://github.com/mitchellh/go-fs/issues/new +Repository: https://github.com/mitchellh/go-fs.git +Repository-Browse: https://github.com/mitchellh/go-fs diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/watch golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/watch --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/debian/watch 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/debian/watch 2020-07-12 18:18:32.000000000 +0000 @@ -0,0 +1,4 @@ +version=4 +opts="mode=git, pgpmode=none" \ + https://github.com/mitchellh/go-fs/ \ + HEAD diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/add_file_test.go golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/add_file_test.go --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/add_file_test.go 2017-12-30 07:18:40.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/add_file_test.go 2018-04-02 23:53:30.000000000 +0000 @@ -1,13 +1,14 @@ package fat import ( - "github.com/mitchellh/go-fs" "io" "io/ioutil" "os" "path/filepath" "strings" "testing" + + "github.com/mitchellh/go-fs" ) func TestAddFile(t *testing.T) { diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/boot_sector.go golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/boot_sector.go --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/boot_sector.go 2017-12-30 07:18:40.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/boot_sector.go 2018-04-02 23:53:30.000000000 +0000 @@ -4,8 +4,9 @@ "encoding/binary" "errors" "fmt" - "github.com/mitchellh/go-fs" "unicode" + + "github.com/mitchellh/go-fs" ) type MediaType uint8 @@ -99,7 +100,7 @@ for i, r := range b.OEMName { if r > unicode.MaxASCII { - return nil, fmt.Errorf("'%s' in OEM name not a valid ASCII char. Must be ASCII.", r) + return nil, fmt.Errorf("%#U in OEM name not a valid ASCII char. Must be ASCII.", r) } sector[0x3+i] = byte(r) @@ -245,7 +246,7 @@ for i, r := range b.VolumeLabel { if r > unicode.MaxASCII { - return nil, fmt.Errorf("'%s' in VolumeLabel not a valid ASCII char. Must be ASCII.", r) + return nil, fmt.Errorf("%#U in VolumeLabel not a valid ASCII char. Must be ASCII.", r) } sector[43+i] = byte(r) @@ -258,7 +259,7 @@ for i, r := range b.FileSystemTypeLabel { if r > unicode.MaxASCII { - return nil, fmt.Errorf("'%s' in FileSystemTypeLabel not a valid ASCII char. Must be ASCII.", r) + return nil, fmt.Errorf("%#U in FileSystemTypeLabel not a valid ASCII char. Must be ASCII.", r) } sector[54+i] = byte(r) @@ -324,7 +325,7 @@ for i, r := range b.VolumeLabel { if r > unicode.MaxASCII { - return nil, fmt.Errorf("'%s' in VolumeLabel not a valid ASCII char. Must be ASCII.", r) + return nil, fmt.Errorf("%#U in VolumeLabel not a valid ASCII char. Must be ASCII.", r) } sector[71+i] = byte(r) @@ -337,7 +338,7 @@ for i, r := range b.FileSystemTypeLabel { if r > unicode.MaxASCII { - return nil, fmt.Errorf("'%s' in FileSystemTypeLabel not a valid ASCII char. Must be ASCII.", r) + return nil, fmt.Errorf("%#U in FileSystemTypeLabel not a valid ASCII char. Must be ASCII.", r) } sector[82+i] = byte(r) diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/cluster_chain.go golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/cluster_chain.go --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/cluster_chain.go 2017-12-30 07:18:40.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/cluster_chain.go 2018-04-02 23:53:30.000000000 +0000 @@ -1,9 +1,10 @@ package fat import ( - "github.com/mitchellh/go-fs" "io" "math" + + "github.com/mitchellh/go-fs" ) type ClusterChain struct { diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/directory_cluster.go golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/directory_cluster.go --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/directory_cluster.go 2017-12-30 07:18:40.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/directory_cluster.go 2018-04-02 23:53:30.000000000 +0000 @@ -5,11 +5,12 @@ "encoding/binary" "errors" "fmt" - "github.com/mitchellh/go-fs" "math" "strings" "time" "unicode/utf16" + + "github.com/mitchellh/go-fs" ) type DirectoryAttr uint8 @@ -126,7 +127,7 @@ // Create the "." and ".." entries cluster.entries = []*DirectoryClusterEntry{ - &DirectoryClusterEntry{ + { accessTime: t, attr: AttrDirectory, cluster: start, @@ -134,7 +135,7 @@ name: ".", writeTime: t, }, - &DirectoryClusterEntry{ + { accessTime: t, attr: AttrDirectory, cluster: parent, diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/directory.go golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/directory.go --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/directory.go 2017-12-30 07:18:40.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/directory.go 2018-04-02 23:53:30.000000000 +0000 @@ -2,9 +2,10 @@ import ( "fmt" - "github.com/mitchellh/go-fs" "strings" "time" + + "github.com/mitchellh/go-fs" ) // Directory implements fs.Directory and is used to interface with @@ -16,9 +17,9 @@ } // DirectoryEntry implements fs.DirectoryEntry and represents a single -// file/folder within a directory in a FAT filesystem. Note that the -// underlying directory entry data structures on the disk may be more -// than one to accomodate for long filenames. +// file/folder within a directory in a FAT filesystem. Note that there may be +// more than one underlying directory entry data structure on the disk to +// account for long filenames. type DirectoryEntry struct { dir *Directory lfnEntries []*DirectoryClusterEntry diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/fat.go golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/fat.go --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/fat.go 2017-12-30 07:18:40.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/fat.go 2018-04-02 23:53:30.000000000 +0000 @@ -3,8 +3,9 @@ import ( "errors" "fmt" - "github.com/mitchellh/go-fs" "math" + + "github.com/mitchellh/go-fs" ) // The first cluster that can really hold user data is always 2 diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/filesystem_test.go golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/filesystem_test.go --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/filesystem_test.go 2017-12-30 07:18:40.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/filesystem_test.go 2018-04-02 23:53:30.000000000 +0000 @@ -1,8 +1,9 @@ package fat import ( - "github.com/mitchellh/go-fs" "testing" + + "github.com/mitchellh/go-fs" ) func TestFileSystemImplementsFileSystem(t *testing.T) { diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/short_name.go golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/short_name.go --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/short_name.go 2017-12-30 07:18:40.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/short_name.go 2018-04-02 23:53:30.000000000 +0000 @@ -30,11 +30,11 @@ if dotIdx == -1 { dotIdx = len(longName) } else { - ext = longName[dotIdx+1 : len(longName)] + ext = longName[dotIdx+1:] } ext = cleanShortString(ext) - ext = ext[0:len(ext)] + ext = ext[0:] rawName := longName[0:dotIdx] name := cleanShortString(rawName) simpleName := fmt.Sprintf("%s.%s", name, ext) @@ -42,7 +42,7 @@ simpleName = simpleName[0 : len(simpleName)-1] } - doSuffix := name != rawName || len(name) > 8 + doSuffix := name != rawName || len(name) > 8 || len(ext) > 3 if !doSuffix { for _, usedSingle := range used { if strings.ToUpper(usedSingle) == simpleName { @@ -53,6 +53,9 @@ } if doSuffix { + if len(ext) > 3 { + ext = ext[:3] + } found := false for i := 1; i < 99999; i++ { serial := fmt.Sprintf("~%d", i) diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/short_name_test.go golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/short_name_test.go --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/short_name_test.go 2017-12-30 07:18:40.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/short_name_test.go 2018-04-02 23:53:30.000000000 +0000 @@ -62,6 +62,46 @@ if result != ".BIG" { t.Fatalf("unexpected: %s", result) } + + // Test valid extension + result, err = generateShortName("proxy.psm", []string{}) + if err != nil { + t.Fatalf("err should be nil: %s", err) + } + + if result != "PROXY.PSM" { + t.Fatalf("unexpected: %s", result) + } + + // Test long extension + result, err = generateShortName("proxy.psm1", []string{}) + if err != nil { + t.Fatalf("err should be nil: %s", err) + } + + if result != "PROXY~1.PSM" { + t.Fatalf("unexpected: %s", result) + } + + // Test short extension + result, err = generateShortName("proxy.x", []string{}) + if err != nil { + t.Fatalf("err should be nil: %s", err) + } + + if result != "PROXY.X" { + t.Fatalf("unexpected: %s", result) + } + + // Test double shortname + result, err = generateShortName("proxy.x", []string{"PROXY.X", "PROXY~1.X"}) + if err != nil { + t.Fatalf("err should be nil: %s", err) + } + + if result != "PROXY~2.X" { + t.Fatalf("unexpected: %s", result) + } } func TestShortNameEntryValue(t *testing.T) { diff -Nru golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/super_floppy.go golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/super_floppy.go --- golang-github-mitchellh-go-fs-0.0~git20161108.7bae45d/fat/super_floppy.go 2017-12-30 07:18:40.000000000 +0000 +++ golang-github-mitchellh-go-fs-0.0~git20180402.b7b9ca4/fat/super_floppy.go 2018-04-02 23:53:30.000000000 +0000 @@ -3,8 +3,9 @@ import ( "errors" "fmt" - "github.com/mitchellh/go-fs" "time" + + "github.com/mitchellh/go-fs" ) // SuperFloppyConfig is the configuration for various properties of