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

268 commits

Author SHA1 Message Date
8bcd48e401
bump master back to dev
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-09-29 11:43:50 -04:00
020cebaa52
release: v0.4.1
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-09-29 11:43:18 -04:00
7023b74563
vscode: adding IDE tasks
making it easier to have consistent build and test across machines with
vscode editor

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-09-29 11:38:12 -04:00
6fec2c6177 Merge pull request #141 from cyphar/xattr-correct-prefix-handling
compare: correctly use .Prefix() during comparisons
2017-09-29 11:33:45 -04:00
Aleksa Sarai
8e5c54f51d
compare: correctly use .Prefix() during comparisons
During the rework of how xattr fields are handled, the comparison code
was not correctly updated. As a result, changes to xattrs would not be
detected in any form. This was detected in the umoci integration suite.
In addition, fix the dh.UsedKeywords logic so auto-detection works
correctly with prefix-based xattrs.

Fixes: ed464af779 ("*: xattr can Update()")
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-09-29 21:05:45 +10:00
ba49f2f918
version: master back to -dev
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-30 15:44:18 -04:00
85fac2fc14
version: bump to v0.4.0
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-30 15:43:46 -04:00
2ede6ecf20 Merge pull request #138 from vbatts/match_update_behavior
*: update `-u` behavior
2017-06-30 15:42:06 -04:00
f271d65127
cli.test: don't have -k in the print
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-30 15:34:53 -04:00
73be830998
*: update -u behavior
Fixes #16

In attempt to close https://github.com/vbatts/go-mtree/issues/16 I've
uncovered that the update was missing a function for symlink.
Additionally the update was not even opperating on the correct directory
hierarchy.

I've uncovered that os.Chtimes follows the symlink, and presumably only
Linux has an obscure way to set the mtime/atime on a symlink itself. So
I've made a custom lchtimes().

Also Mode follows through the symlink, and symlinks only ever have a
mode of 0777, so don't set them.

Lastly, directories need to have their mtime/atime set in a reverse
order after all other updates have been done. This is going to require
something like a `container/heap` to be unwound.

Also, each updateFunc will _only_ perform the update if it is needed. Much less
invasive this way.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-30 15:34:44 -04:00
a393e171c4 Merge pull request #139 from vbatts/lint
govis: comment for lint
2017-06-30 15:18:49 -04:00
04230dccdc
govis: comment for lint
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-30 15:06:50 -04:00
593cfb68b8 Merge pull request #136 from vbatts/updatefunc_sig
updatefunc: simplify the function signature
2017-06-26 14:45:45 -04:00
9408f0f4c0
updatefunc: simplify the function signature
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-26 14:24:10 -04:00
0b5038d0bc Merge pull request #135 from vbatts/xattr-updates
*: xattr can Update()
2017-06-26 14:14:00 -04:00
ed464af779
*: xattr can Update()
This is a gnarly patchset that has been mashed together.
It uncovered that some aspects of Check were never really working
correctly for `xattr` keywords, but also the `Update()` had been left
undone for a while.

This includes some API changes around the `Keyword` and `KeyVal` types.

Also I would like to update the signature for the `UpdateKeywordFunc` to
just accept a `KeyVal` as an argugment, rather than a keyword AND the
value. with this context there would be no need to guess on the value of
what's passed to the xattr update function of whether it needs or
already is base64 encoded.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-24 15:05:24 -04:00
fb4ec19981 Merge pull request #134 from vbatts/vendor
vendor: updating dependencies
2017-06-24 14:52:17 -04:00
50d22c5135 vendor: updating dependencies
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-24 14:45:05 -04:00
c5b7548e35 Merge pull request #133 from vbatts/keyval
keyval: cleaner struct functions
2017-06-24 07:09:27 -04:00
14721e6869 keyval: cleaner struct functions
KeyVal specific functions can be a part of the struct.
Also add tests and fix the NewValue functions for suffixes

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-24 07:01:29 -04:00
64ecdb40ec Merge pull request #132 from vbatts/no_nsec_in_test
fseval: not nanosecond for mock test
2017-06-15 23:11:47 -05:00
9533b02a8e fseval: not nanosecond for mock test
while testing on osx, it seems that it doesn't support nanoseconds so it
fails this check because the mockFsEval returns the nsec precision, but
the actual expected results is:

		        "old": "1337888911.288518233"
			"new": "1337888911.000000000"

Ideally there will be a way to detect when the fs supports nsecs

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-15 22:54:59 -05:00
bc45166bfc Merge pull request #131 from vbatts/firmer_test_time
check: test times weren't different enough
2017-06-15 20:10:43 -05:00
0ee52f7faf check: test times weren't different enough
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-15 18:02:14 -05:00
abdee6fe11 Merge pull request #129 from vbatts/fix_gname
keyword: add missing `gname` keyword functions
2017-06-15 12:42:29 -05:00
bbedbb3eaa lookupGroupId: add implementation for go1.6
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-15 12:36:11 -05:00
f09463164c Merge pull request #130 from vbatts/fix_block_device_value
keyworrd: fix block device value for `type=`
2017-06-15 12:08:27 -05:00
5db2376250 keyworrd: fix block device value for type=
Fixes: #127

Reported-by: Lennart Poettering lennart@poettering.net
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-15 11:51:26 -05:00
68651d77d6 keyword: add missing gname keyword functions
Fixes: #128

Reported-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-15 10:59:57 -05:00
469590a575 Merge pull request #126 from mjg59/master
test: Allow using an environment variable to override the test dir
2017-04-13 15:14:15 -04:00
Matthew Garrett
cb1fb5dded test: Allow using an environment variable to override the test dir
Some build systems may not permit writing to . during build, so allow
that path to be overridden with an environment variable.
2017-04-13 11:35:01 -07:00
93776cd69e Merge pull request #125 from vbatts/restore
add an update/restore functionality
2017-03-17 12:51:27 -04:00
fc5450ed71
*: add an update/restore functionality
This allows for restoring some attributes of files from the state in an
mtree Manifest

Reported-by: Matthew Garrett <Matthewgarrett@google.com>
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-03-17 12:42:57 -04:00
0b9f227e4e
README: adding a go report card
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-03-13 18:30:01 -04:00
e359fa7d2d Merge pull request #124 from vbatts/comment_update
Comment update
2017-02-16 07:51:21 -08:00
6e336a525d
git: add an ignores
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-02-16 10:45:15 -05:00
eca64ff621
walk: update the comment
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-02-16 10:44:52 -05:00
f165f4b7cc Merge pull request #123 from cyphar/test-unicode-integration
test: cli: add unicode verification test
2017-02-15 17:42:38 -08:00
Aleksa Sarai
f6c295f2e9
test: cli: add unicode verification test
This wraps up the govis changes. While umoci has much more hardcore
tests for unicode, this is done to ensure that go-mtree won't break
before its vendored into umoci.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-16 09:28:21 +11:00
711a89aa4c Merge pull request #122 from cyphar/remove-govis-travis
pkg: govis: remove travis-ci files
2017-02-15 13:37:36 -05:00
Aleksa Sarai
4ad871ca46
pkg: govis: remove travis-ci files
Since govis is now a subpackage, drop references to the project as a
govis package.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-16 05:18:02 +11:00
7b6f89f33d Merge pull request #121 from cyphar/switch-to-govis
*: switch everything to govis
2017-02-15 13:14:38 -05:00
Aleksa Sarai
c5ec1c9f3a
*: switch everything to govis
Now that we have govis, move everything to using govis.{Vis,Unvis} and
then remove the cvis build tags (because that code no longer exists).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-16 03:21:43 +11:00
Aleksa Sarai
91d7ec8c89
subtree merge: cyphar/govis
govis is a reimplementation of vis(3) and unvis(3) specifically made to
be unicode aware. It was specifically rewritten to replace cvis and the
other go vis reimplementation we have in go-mtree.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-16 03:08:51 +11:00
Aleksa Sarai
c889416068
*: fix go-vet errors
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-16 03:08:07 +11:00
Aleksa Sarai
c9551d5820
README: add travis-ci build
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-16 01:11:32 +11:00
Aleksa Sarai
cbe20d4292
govis: extend roundtrip testing
This is necessary to ensure that strings I don't have examples of work
properly. The same thing applies for double-encode and double-decode
usecases.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-16 01:07:51 +11:00
Aleksa Sarai
4045484afb
vis: rewrite to use byte slices
This results in all multi-byte characters to be encoded in a way that
naive unvis(3) implementations will not bork up the encoding. In
addition, it also ensures that the output of Vis will always be ASCII
*only*.

Also test far more cases in *_test.go when it comes to different flags,
and do far more tests to ensure that the output of Vis() makes sense.
These outputs come directly from vis(3) and so are useful regression
tests to ensure that the handling of Vis() is identical to the original.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-16 01:07:16 +11:00
Aleksa Sarai
c2a9f1a56d
flags -> govis
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-14 02:11:41 +11:00
Aleksa Sarai
de223ffc92
unvis: implement meta and ctrl characters ('\M__' and '\^_')
While these characters are really weird to handle, here is a fairly
simple implementation that need some more testing (and a proper
secondary source to compare against).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-13 08:03:04 +11:00