-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mtree: prepend "./" to all entries other than "." #267
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
44f2234
to
3fa12c2
Compare
As an example of the problem, in the
And any other non-Full path (which is any other top-level entry) will be treated as a child of one of these directories. |
casync attempts to output all entries as a Full entry but for top-level entries, there is no "/" in the escaped pathname, resulting in the entry being treated as a Relative entry. As per the specification[1], this results in any subsequent Relative entries (such as top-level files) being treated as children of the directory which causes manifests produced by casync to fail. The simplest solution (and the one that "nmtree -C" does) is to prefix every path with "./". However, nmtree does not like "./." (internally it requires every entry referenced in an Full entry's path to already have been referenced in the spec) and so we have to special-case the "." path. [1]: https://man.netbsd.org/mtree.5 Ref: vbatts/go-mtree#146 Signed-off-by: Aleksa Sarai <[email protected]>
3fa12c2
to
9a71693
Compare
Looking at Now the output of
That being said, if you adjust the output slightly, now
Though I think that it would make sense to output the filesystem resolution timestamp if available since that is how every other |
@poettering Sorry for pinging you directly. This fixes the issue we discussed when we met a few weeks ago (you were right that the format is valid, but casync's output is not what you would want when there's only one path component). The semaphore test failure is some issue with the PPA used by the tests. |
OOC: Should there be a new test to flag this issue? |
casync attempts to output all entries as a Full entry but for top-level
entries, there is no "/" in the escaped pathname, resulting in the entry
being treated as a Relative entry.
As per the specification1, this results in any subsequent Relative
entries (such as top-level files) being treated as children of the
directory which causes manifests produced by casync to fail.
The simplest solution (and the one that "nmtree -C" does) is to prefix
every path with "./". However, nmtree does not like "./." (internally it
requires every entry referenced in an Full entry's path to already have
been referenced in the spec) and so we have to special-case the "."
path.
Ref: vbatts/go-mtree#146
Fixes #167
Fixes #168
Signed-off-by: Aleksa Sarai [email protected]