macdoor commented on PR #18036:
URL: 
https://github.com/apache/dolphinscheduler/pull/18036#issuecomment-4018049792

   Hi @SbloodyS,
   
   I kept the shell-script changes on purpose because **macOS `tar` behaves 
differently from Linux `tar`**, and the repack step in `assembly-plugins.sh` 
uses the system `tar`.
   
   Flow is:
   
   1. Maven assembly (with the XML `<excludes>`) produces the first `tar.gz`.
   2. `assembly-plugins.sh` **extracts** that archive, does mv/ln, then 
**repacks** with the system `tar -zcf`.
   
   On **macOS**:
   
   - The system `tar` (BSD tar) adds **AppleDouble / resource-fork** entries 
(`._*`) and can store **extended attributes** when creating archives, unless we 
tell it not to.
   - So even if the first archive is clean (thanks to assembly excludes), the 
**repack** on macOS can reintroduce junk and xattr, and we see warnings like 
`tar: Ignoring unknown extended header keyword 
'LIBARCHIVE.xattr.com.apple.provenance'` when extracting on Linux.
   
   That's why the script does:
   
   - `find … -delete` for any `._*` / `.DS_Store` that might appear after 
extract/mv (e.g. from the filesystem).
   - On Darwin only: `xattr -cr` and `COPYFILE_DISABLE=1 tar --no-xattrs` so 
the **repack** doesn't add macOS-specific metadata.
   
   So: the XML excludes handle the assembly output; the script changes are 
needed for the **repack on macOS** so the final `tar.gz` stays Linux-friendly 
when built on a Mac. If you still prefer to rely only on XML + .gitignore and 
drop the script changes (e.g. because official builds are Linux-only), I can 
revert the script part and keep only the assembly and .gitignore changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to