Live data from Hacker News

Tar Files Created on macOS Display Errors When Extracting on Linux (2024)

aruljohn.com

61–70 of 109 posts

Re: Tar Files Created on macOS Display Errors When Extracting on Linux (2024)

#61

Earlier quoted context omitted.

It's a good attitude to have, in my opinion. Portability is overrated. Linux developers should be doing a lot more of this. We should be making everything work better for us without caring how it's going to impact other irrelevant platforms. Let the people who actually care about those platforms worry about such things.

Portability of tar archives at least. We should have some like .zip which are standardised and allow some like tar to be faithful replicas of exactly how the OS stores data.

Except that zip does not preserve permissions.

Re: Tar Files Created on macOS Display Errors When Extracting on Linux (2024)

#63
post #3

Earlier quoted context omitted.

Arguably, principle of least surprise is very Apple. If I point "tape archive" at a file system, I want that file system archived to tape. And so, tar does. If I don't, well, that's a fine option, and there's a fine option for that. So it's less of a "workaround" or something that "gets worse", than, "No, I don't really want a tape archive of this filesystem, only of some of it." And that's supported. That said, neve…

> Arguably, principle of least surprise is very Apple. Principle of least surprise is good engineering practice. The question is always whose surprise. Someone who expects tar to behave like other UNIX systems is going to be surprised by this. Someone who expects tar on Apple to have perfect fidelity would be surprised by not-this. I increasingly feel like build systems should never be relying on any "native" utiliti…

> Someone who expects tar to behave like other UNIX systems is going to be surprised by this

They shouldn’t. The GNU tar manual already shows this behavior. https://www.gnu.org/software/tar/manual/html_node/What-tar-D...:

Because the archive created by tar is capable of preserving file information and directory structure, tar is commonly used for performing full and incremental backups of disks”

And yes, that same page also says:

“You can create an archive on one system, transfer it to another system, and extract the contents there. This allows you to transport a group of files from one system to another.”

> You can't have this problem if your packaging system pulls in a specific portable `tar` library.

You can’t pull in specific portable stuff all the way down (not even when running in Docker or a VM), so that will decrease the risk, but it cannot completely remove it. As an example, I think GNU tar will happily include .DS_Store files in archives.

Re: Tar Files Created on macOS Display Errors When Extracting on Linux (2024)

#64
post #61

Earlier quoted context omitted.

Portability of tar archives at least. We should have some like .zip which are standardised and allow some like tar to be faithful replicas of exactly how the OS stores data.

Except that zip does not preserve permissions.

That seems fine to me. I’ve never cared about permissions in a zip. Zip these days is primarily for exchanging a directory as a single file to another person. Permissions wouldn’t work across computers anyway.

If you want a faithful archive of the data then a tar archive or disk image is what you want.

Re: Tar Files Created on macOS Display Errors When Extracting on Linux (2024)

#66

Earlier quoted context omitted.

Apple is always surprised that non-Apple devices exist. See: the permanent undismissable red icon to "finish setting up your Apple TV with your iPhone"

Apple can't control non-Apple devices. They can only control their own. So this makes perfect sense.

They could control their own Apple TVs to allow that dialogue to be dismissed via the TV controls.

Re: Tar Files Created on macOS Display Errors When Extracting on Linux (2024)

#67
post #33

Earlier quoted context omitted.

To me it seems more sensible to store information relevant only to this OS in a specific cache somewhere within that OS. It would even make cache-like functionality such as evicting old entries super easy.

There are some tradeoffs. Like if you used a usb and set up folder colours or any of the other things stored in the file, they would not move along with the usb when used on another computer.

If I set a folder colour in Finder on my work MacBook, and then plug that USB drive into my personal computer which uses Thunar as a file browser on Debian, nothing would happen.

Re: Tar Files Created on macOS Display Errors When Extracting on Linux (2024)

#70

Earlier quoted context omitted.

Apple can't control non-Apple devices. They can only control their own. So this makes perfect sense.

They could control their own Apple TVs to allow that dialogue to be dismissed via the TV controls.

Agreed, but why not just finishing setting it up? Or do people own Apple TVs without iPhones? That never occurred to me since a large part of the value prop is phone integration
Post reply on HN