Repository navigation
fix(macos): omit AppleDouble members from preset and support-bundle archives - #7342
Open
roshangupta00750 wants to merge 1 commit into
Open
roshangupta00750 wants to merge 1 commit into
roshangupta00750 wants to merge 1 commit into
Conversation
…rchives macOS bsdtar adds a ._<name> AppleDouble member for every file with extended attributes and hides it from its own listing. A preset exported on macOS therefore led with ._<name>, preset import took that as the preset name, and the import on Linux failed with "missing meta.txt" after extracting the real preset. The support bundle carried the same binary companions next to every file. Run both archive writers under COPYFILE_DISABLE=1, as ods-backup.sh already does, and make preset import skip ._* entries when it takes the preset name so archives exported before this fix still import. Fixes Osmantic#7341
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7341
This combines #6160 (preset import) and #6159 (support bundle), both closed with the
public-betaretirement (#7253) and rebased here ontomain. Both are the same macOS defect in different archive writers.Problem
macOS
tar(bsdtar) adds an AppleDouble._<name>member for every file with extended attributes, and hides those members from its owntar -tzflisting.ods preset export/ods preset import:._<name>.preset importtakes the first member as the preset name, so on Linux it resolves to._<name>and fails withInvalid preset: missing meta.txt.scripts/ods-support-bundle.sh: the diagnostics bundle carries binary._*companions next to the real files.Change
COPYFILE_DISABLE=1, asods-backup.shalready does (fix(backup): omit macOS AppleDouble metadata so compressed backups restore #5765). GNU tar ignores the variable.preset importskips._*entries when it takes the preset name, so archives exported from macOS before this fix still import.Tests
tests/test-preset-macos-appledouble.sh(new, registered intests/ci-suite.txt):tarfile, an archive that leads with a._<name>member the way bsdtar writes it, and imports it with the real CLI;tests/test-support-bundle.sh(already run bytest-linux.yml):tarfile, because bsdtar's own listing hides._*;COPYFILE_DISABLEguard, which keeps the check deterministic on Linux./bin/bash3.2)mainmain._*members really present in the bundle, plus the guard checkThe one macOS support-bundle failure left with this PR (
support bundle did not use selected Bash for nested project scripts) also fails onmainand is unrelated.list-unwired-tests.py --checkpasses,shellcheck -S warningis clean, andbash -npasses.AI assistance was used for analysis and drafting the fix and tests. I reproduced both problems on macOS and verified the base-fail and fix-pass results above on macOS and Linux myself.