1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-12-18 03:56:30 +00:00
Commit graph

377 commits

Author SHA1 Message Date
Aleksa Sarai
63dc31a80a
parse: do not allow FullType entries to affect the current directory
As per the spec[1], Full entries must not affect the current directory.
Handling this incorrectly caused us issues with certain manifests (ones
with mixed Relative and Full entries, which is something casync does by
accident).

This is a partial fix for the issues with verifying casync-mtree's
output but there are a few other issues to iron out (including one
within casync).

[1]: https://man.netbsd.org/mtree.5

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2023-06-04 20:13:30 +10:00
98ebe1868e
Merge pull request #187 from vbatts/version
*: move version from library to cmd, and generate it
2023-03-22 11:42:29 -04:00
630389965c
*: move version from library to cmd, and generate it
oh dang, I released 0.5.2 and 0.5.3 without correctly setting the
version string :-\
Ideally this "-dev" is attempting to be like the git.
So, ditch the version in the library.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-03-22 11:39:12 -04:00
84c498b361
Merge pull request #186 from vbatts/fix_180
main: add description output
2023-03-22 11:27:47 -04:00
7d745cbc31
main: add description output
fixes: #180

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-03-22 11:11:14 -04:00
192695a964
Merge pull request #185 from vbatts/go_updates
drop go1.17; go module updates
2023-03-22 11:03:05 -04:00
fa29fcb58d
go*: go get -u ./...
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-03-22 10:57:01 -04:00
ce5bddf35e
github/workflows: remove testing on go1.17
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-03-22 10:56:34 -04:00
249dc61329
Merge pull request #184 from vbatts/go_updates
go: updating modules
2023-03-22 10:49:02 -04:00
45591ed121
go: updating modules
It seems this may be the last update to urfave/cli for go1.17, as their
v2.25 uses generics of go1.18 and didn't partition it with build tags
😵😵😵

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-03-22 10:42:20 -04:00
c6a7295705
Merge pull request #183 from vbatts/test_matrix
github/workflows: test on multiple golang versions
2023-03-22 10:26:45 -04:00
d957cf3750
github/workflows: test on multiple golang versions
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-03-22 10:17:41 -04:00
9e437eee80
go: update modules
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-07-05 09:02:09 -04:00
00deb3ada6
Merge pull request #181 from vbatts/sums
Makefile: only make a single SUMS file, including sha1 and sha512
2022-04-23 13:45:26 -04:00
555e4c9e5f
comment: typo
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-23 13:44:57 -04:00
79927ba184
Merge pull request #182 from vbatts/not_a_directory
walk: directory is expected to be walked. A file is not.
2022-04-23 13:42:46 -04:00
020f2b9f5c
Makefile: only make a single SUMS file, including sha1 and sha512
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-23 13:42:29 -04:00
2627dbf5d7
Merge pull request #179 from vbatts/gofmt
*.go: updated go:build added via gofmt
2022-04-23 13:41:36 -04:00
5d7f6c36e0
walk: directory is expected to be walked. A file is not.
Fixes: #166

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-23 13:40:44 -04:00
94303e15af
*.go: updated go:build added via gofmt
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-23 12:59:26 -04:00
b9356e6843
Merge pull request #177 from vbatts/lint
linting and adding check for staticcheck
2022-04-08 23:15:48 -04:00
0337cb91ea
keywordfunc: ignore ripemd160 for compat sake
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-08 23:04:27 -04:00
dac969b14e
Makefile: staticcheck validation
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-08 23:03:04 -04:00
7b5bbd4eaa
keywords: tar.Xattrs is deprecated by PAXRecords
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-08 22:51:37 -04:00
3bc8e48538
*.go: go-staticcheck linting
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-08 22:51:37 -04:00
4760b77e54
Merge pull request #176 from vbatts/cyclo
Cyclomatic complexity
2022-04-08 22:39:27 -04:00
599ae15537
Makefile: check cyclomatic complexity
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-08 22:35:36 -04:00
53f42660ec
Merge pull request #175 from vbatts/remove_legacy
lookup: remove legacy lookup code
2022-04-08 22:31:24 -04:00
106c52de51
*_test.go: ignore cyclomatic complexity for test files
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-08 21:59:08 -04:00
1610f1a0c7
lookup: remove legacy lookup code
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-08 21:50:52 -04:00
7fed71e221
Merge pull request #173 from vbatts/compare-two-files
Compare two files
2022-04-04 18:17:07 -04:00
2d841d54bf
test: testing the double -f comparison
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-04 18:13:23 -04:00
b5e683dfc9
main: compare two files with two -f flags
Fixes: #159

```shell
vbatts@fogel:~/src/github.com/vbatts/go-mtree$ ./gomtree -c -f foo
vbatts@fogel:~/src/github.com/vbatts/go-mtree$ ./gomtree -c -f bar -K sha256
vbatts@fogel:~/src/github.com/vbatts/go-mtree$ ./gomtree -f foo -f bar
"foo": unexpected path
".": keyword "time": expected 1649109728.228935367; got 1649109734.412959677
FATA[0000] manifest validation failed
vbatts@fogel:~/src/github.com/vbatts/go-mtree$ echo $?
1
```

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-04 18:04:16 -04:00
bdace0aacf
main: --file flag can be repeated now
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-04 17:56:44 -04:00
fc2975ed32
Merge pull request #172 from vbatts/change-flag-parser
main: switch to urfave/cli/v2
2022-04-04 16:12:32 -04:00
17687d8c29
main: switch to urfave/cli/v2
For now this is a drop in replacement for all the flags curently
implemented

Fixes: #171

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-04 16:06:48 -04:00
bc8295f83e
compare: gofmt
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-04 14:57:29 -04:00
c758611dce
Merge pull request #168 from vbatts/linting
Linting
2022-04-03 23:22:17 -04:00
1e7a86c787
Merge pull request #169 from vbatts/build_badge
README: github workflow badge
2022-04-03 23:20:29 -04:00
f7c1f627aa
keyword_test: remove unused line
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 23:19:47 -04:00
a867d30251
check_test: check the error
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 23:19:47 -04:00
6fb913af99
compare_test: remove unused code
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 23:19:47 -04:00
742dd407b4
main: len() works on nil now
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 23:19:46 -04:00
b75d3dfcc8
README: github workflow badge
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 23:18:42 -04:00
7935b59876
Merge pull request #170 from vbatts/fix_build
*: rework the test tools, so no dep is ignored
2022-04-03 23:18:29 -04:00
f32ba81c5e
*: rework the test tools, so no dep is ignored
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 23:15:40 -04:00
588282d9ad
github: fix the branch
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 22:53:03 -04:00
0b831d07ce
github: update the golang workflow
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 22:47:42 -04:00
4bc25af053
*.go: spelling typos
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 22:29:36 -04:00
e1f0f056c7
README: markdown lint
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 22:24:36 -04:00