frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Tar files made in macOS generate "xattr" errors when expanded in Linux

https://aruljohn.com/blog/macos-created-tar-files-linux-errors/
30•heresie-dabord•3d ago

Comments

LatencyKills•3d ago
Ex-Apple engineer here. This is, for better or worse, just the way Apple approaches this type of problem. From Apple's perspective, this is the way to preserve Finder / Gatekeeper / metadata semantics. It avoids silent data loss when round-tripping archives between Macs. This behavior also maintains consistency with copyfile(3) (as well as the Archive Utility behavior).

Apple treats tar less like “portable Unix interchange” and more like “archive this filesystem object faithfully.” That is very Apple, and very libarchive. ;-)

This is probably going to get worse (as Apple continues to add macOS-specific metadata), so your workaround is very helpful.

I haven't tested it in a while, but at one point, setting the COPYFILE_DISABLE=1 env variable would disable the inclusion of macOS-specific metadata.

Terretta•1d ago
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, never seeing another .DS_Store should be a system-wide option!

taftster•1h ago
> That said, never seeing another .DS_Store should be a system-wide option!

Yes please.

ryandrake•43m ago
.DS_Store, .fseventsd, .Spotlight-V100, .Trashes, and ._this and ._that

These can all die in a fire too, as far as I am concerned. macOS loves to treat the user's filesystem as its own personal garbage dump.

gerdesj•30m ago
thumbs.db and those weird MS alternative stream files for recording origination.

filesystem attributes are for decorating files with meaning. Anything else that attempts to use filesystems in "interesting" ways is silly.

Apple and MS really ought to consider why they do this sort of fragile, idiosyncratic nonsense.

Joker_vD•26m ago
But... thumbs.db is precisely not an "attempt to use filesystems in "interesting" ways" — it's literally a just hidden file with previews stored in it. Storing the preview in the alternative stream of the file with the picture itself would be "an interesting way".
kstrauser•13m ago
Agreed. Where else would you put that stuff? It’s gotta go somewhere, and this is the least surprising place IMO. Anywhere else would have to be a parallel store that follows filesystem mounts and unmounts, renaming directories, etc so that it alway perfectly mirrors the thing it’s configuring.
JoshTriplett•1h ago
> 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" utilities from the host system, and should instead be bringing them in via dependencies. You can't have this problem if your packaging system pulls in a specific portable `tar` library.

amarant•20m ago
Nixos has a pretty solid solution to this issue: key your dependencies with checksums of the content. That way you get the best of both worlds: you always get the exact version you want, and you can share a copy of that exact version with other software that wants to use that exact version too!
JoshTriplett•17m ago
Yeah, Nix-like distributions (e.g. guix, lix) do for Linux systems what some language package managers (e.g. cargo) do for individual projects.
matheusmoreira•1h ago
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.
cozzyd•1h ago
It would at least be nice if there was a way to keep apple users from shitting all over the filesystem with remote mounts and ds_store files. Perhaps by automatically unmounting if one is detected.
jmclnx•1h ago
To me, the big question is why Apple needs all these file attribute ? If the files are extracted OK, just ignore the errors :)
pier25•1h ago
I use these settings when creating a tar file for deploy:

    tar --no-xattrs --no-mac-metadata -czf
firesteelrain•1h ago
You can either send stderr to /dev/null or use --warning=no-unknown-keyword to suppress them cleanly.

But still interesting nonetheless why they are added

angry_octet•1h ago
We might also ask, why doesn't Linux also track such meta-data? Are Linux users not also subject to drive-by downloads impersonating valid files? Should we be one chmod a+x away from compromise?
danielheath•54m ago
Yes, we should be.

My computer should run programs when I tell it to run them.

Don’t blunt _every_ tool just to make them harder to cut yourself on.

angry_octet•25m ago
I hope you're in the very small minority of people who rigorously manage untrusted downloads and whitelist every binary, because you're operating an appliance from the 1970s, sticking a metal fork into an un-earthed toaster. Most people need help from their operating system.
Joker_vD•24m ago
I sincerely agree. By the way, thanks for lending your machine for my "Network-Retransmission-and-Compute-as-a-service" network.
bitfilped•24m ago
Should I be able to run files I download on my own computer? I think yes I should, hate fighting MacOS to do simple tasks because Apple engineers assume the end user has the average intelligence of an ostrich.
chmaynard•50m ago
Homebrew installs GNU tar as "gtar". On my M4 MacBook:

  $ which gtar
  gtar is /opt/homebrew/bin/gtar

The text mode lie: why modern TUIs are a nightmare for accessibility

https://xogium.me/the-text-mode-lie-why-modern-tuis-are-a-nightmare-for-accessibility
81•SpyCoder77•1h ago•32 comments

Agentic Coding Is a Trap

https://larsfaye.com/articles/agentic-coding-is-a-trap
102•ayoisaiah•2h ago•74 comments

Let's Buy Spirit Air

https://letsbuyspiritair.com/
82•bjhess•1h ago•52 comments

BYOMesh – New LoRa mesh radio offers 100x the bandwidth

https://partyon.xyz/@nullagent/116499715071759135
248•nullagent•7h ago•80 comments

DeepClaude – Claude Code agent loop with DeepSeek V4 Pro, 17x cheaper

https://github.com/aattaran/deepclaude
152•alattaran•3h ago•67 comments

The 'Hidden' Costs of Great Abstractions

https://jdgr.net/the-hidden-costs-of-great-abstractions
46•jdgr•2h ago•10 comments

Southwest Headquarters Tour

https://katherinemichel.github.io/blog/travel/southwest-headquarters-tour-2026.html
183•KatiMichel•8h ago•53 comments

US–Indian space mission maps extreme subsidence in Mexico City

https://phys.org/news/2026-04-usindian-space-mission-extreme-subsidence.html
86•leopoldj•2d ago•37 comments

A desktop made for one

https://isene.org/2026/05/Audience-of-One.html
229•xngbuilds•9h ago•93 comments

OpenAI's o1 correctly diagnosed 67% of ER patients vs. 50-55% by triage doctors

https://www.theguardian.com/technology/2026/apr/30/ai-outperforms-doctors-in-harvard-trial-of-eme...
273•donsupreme•1d ago•228 comments

Using "underdrawings" for accurate text and numbers

https://samcollins.blog/underdrawings/
21•samcollins•2d ago•3 comments

Tar files made in macOS generate "xattr" errors when expanded in Linux

https://aruljohn.com/blog/macos-created-tar-files-linux-errors/
30•heresie-dabord•3d ago•22 comments

New statue in London, attributed to Banksy, of a suited man, blinded by a flag

https://www.smithsonianmag.com/smart-news/attributed-to-banksy-a-new-statue-of-a-suited-man-blind...
264•dryadin•6h ago•262 comments

Introduction to Atom

https://validator.w3.org/feed/docs/atom.html
22•susam•3h ago•6 comments

Bad Connection: Global telecom exploitation by covert surveillance actors

https://citizenlab.ca/research/uncovering-global-telecom-exploitation-by-covert-surveillance-actors/
93•miohtama•9h ago•7 comments

Mercedes-Benz commits to bringing back physical buttons

https://www.drive.com.au/news/mercedes-benz-commits-to-bringing-back-phycial-buttons/
601•teleforce•10h ago•347 comments

Text-to-CAD

https://github.com/earthtojake/text-to-cad
73•softservo•2d ago•25 comments

LLMs Are Not a Higher Level of Abstraction

https://www.lelanthran.com/chap15/content.html
40•lelanthran•7h ago•39 comments

I recreated the Apple Lisa computer inside an FPGA [video]

https://www.youtube.com/watch?v=8jNQDcpHc68
68•cyrc•7h ago•10 comments

Security through obscurity is not bad

https://mobeigi.com/blog/security/security-through-obscurity-is-not-bad/
116•mobeigi•10h ago•131 comments

Denuvo has been cracked in all single-player games it previously protected

https://www.tomshardware.com/video-games/pc-gaming/denuvo-has-been-bypassed-in-all-single-player-...
223•oceansky•5d ago•142 comments

Make your own microforest (2025)

https://ambrook.com/offrange/environment/a-forest-in-your-pocket
61•bookofjoe•5h ago•14 comments

I built my own hair electrolysis machine

https://www.scd31.com/posts/diy-hair-electrolysis-machine
176•y1n0•4d ago•45 comments

Lost in translation: The linguistic challenges facing N. Korean defectors (2025)

https://www.dailynk.com/english/lost-in-translation-the-linguistic-challenges-facing-n-korean-def...
31•spzb•2d ago•20 comments

Why TUIs Are Back

https://wiki.alcidesfonseca.com/blog/why-tuis-are-back/
251•rickcarlino•6h ago•280 comments

What is Z-Angle Memory and why is Intel developing it?

https://www.hpcwire.com/2026/02/05/what-is-z-angle-memory-and-why-is-intel-developing-it/
82•rbanffy•2d ago•35 comments

Automatic Brightness in Plasma

https://zamundaaa.github.io/wayland,display/2026/04/24/automatic-brightness.html
15•speckx•2d ago•4 comments

Metal Gear Solid 2's source code has been leaked on 4chan

https://www.thegamer.com/mgs2-hd-edition-source-code-massive-leak/
223•rishabhd•8h ago•92 comments

Show HN: Apple's SHARP running in the browser via ONNX runtime web

https://github.com/bring-shrubbery/ml-sharp-web
157•bring-shrubbery•16h ago•39 comments

Alert-driven monitoring

https://simpleobservability.com/docs/alert-driven-monitoring
105•khazit•11h ago•39 comments