-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
deprecate ipfs tar add
/ ipfs tar cat
#7951
Comments
This can be deprecated, but people may be using the codec so we probably need to maintain it so people don't lose access to their data. I assume that the ask here is around the go-ipld-prime migration and converting codecs to the new form. Probably the best bet is to make a not particularly performant go-ipld-format-> go-ipld-prime wrapper, but I'm not sure what the workload for this is. EDIT: I removed the incorrect references to codecs, the tar commands use DagPb it's basically just a custom type with an importer/exporter |
The proposal i guess is that we have a version with import supported to unixfs. |
Well, UnixFS 1.0 can't handle any attributes, like users or groups IIRC. Importing a tar into UnixFS would basically destroy this information. To make this limitation clear a flag could be used like |
@RubenKelevra This is a good point. Are you making use of this representation of tar in order to store metadata? |
@willscott my point wasn't that I'm using it that way. But when we deprecate the When I'm extracting a tar to a filesystem - and IPFS UnixFS is exactly this - the expectation is, that the user/group read/write/execute rights are set as well. I'm running an ipfs cluster that stores compressed tars, but since the checksum must match I don't extract them and import them as tar. It's a bit sad since I think there would be quite a lot of redundancies between the files, but the compression of each file makes them inaccessible for IPFS. |
Would If so, we should do something similar to #8098 |
@lidel these are pretty different use cases. IIUC
It's surprising to me that someone would notice that the HTTP API output of We can add more guardrails and help text to clarify, but that command has been around a long time and today is the first I'm hearing of this confusion. Separately, we may want to remove support for the |
I don't think we want to remove the Tar is still the goto tool to ship software. Ipfs uses it itself to ship its binaries and sourcecode. We should be able to import a tar file, keep all attributes in an efficient manner and on an export recover them all (if the user rights are sufficient enough). In the future this would allow us to extract If ipfs implements compression itself, we can reach the same transfer speeds as a compressed tar file, while still be able to deduplicate the content. This allows us to support also reproduceable builts with signatures of the actual binaries, while the tar part can handle the file and folder attributes and we can transparently apply compression on top of that. |
Oof. I didn't know about this feature. I'd use it extensively. Is it documented? |
@RubenKelevra @kallisti5 the Probably what you'd rather have is something like |
Well as far as I can see I don't want to rely on an undocumented function. But on the other hand, why is not every tar file automatically split with with chunker? 🤔 |
That chunker doesn't currently exist someone would have to build it, and again you can build something that does this even without added code to go-ipfs. My point is that you almost certainly want UnixFS chunking here rather than a custom IPLD format. If it's all merged in you could figure out the UX for things like type detection and default format chunkers. However, that's super off topic for this issue which is "let's kill the unused and largely not useful |
fysa I'm officially marking them as deprecated in #8849 |
my use case for the ipfs tar comand is to backup files with same name which is not allows with plain " find /somedir -name 'README.md' | ipfs tar add - what would be the new way for doing it once the ipfs-tar is depreciated ? |
find /somedir -name 'README.md' | tar -c --no-recursion -T - | ipfs add -w --stdin-name readme.tar
|
Currently, go-ipfs exposes a pair of functions,
tar add
andtar cat
, which seem not widely used, and import an interesting representation of tar files.There are some issues with this implementation (e.g. it loads the entire tar archive into memory), and the representation doesn't play nice with unixfs.
We should provide tar import/export using the
mfs
package to represent a unixfs subtree, and deprecate thetarfmt
ipld codec.The text was updated successfully, but these errors were encountered: