Skip to content

fix(macos): omit AppleDouble members from preset and support-bundle archives - #7342

Open
roshangupta00750 wants to merge 1 commit into
Osmantic:mainfrom
roshangupta00750:fix/macos-appledouble-archives
Open

roshangupta00750 wants to merge 1 commit into
Osmantic:mainfrom
roshangupta00750:fix/macos-appledouble-archives

Conversation

@roshangupta00750

Copy link
Copy Markdown
Contributor

Fixes #7341

This combines #6160 (preset import) and #6159 (support bundle), both closed with the public-beta retirement (#7253) and rebased here onto main. 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 own tar -tzf listing.

  • ods preset export / ods preset import:
    • A preset exported on macOS leads with ._<name>.
    • preset import takes the first member as the preset name, so on Linux it resolves to ._<name> and fails with Invalid preset: missing meta.txt.
    • The real preset has already been extracted by then, so a retry asks to overwrite it.
  • scripts/ods-support-bundle.sh: the diagnostics bundle carries binary ._* companions next to the real files.

Change

Tests

  • tests/test-preset-macos-appledouble.sh (new, registered in tests/ci-suite.txt):
    • builds, with Python tarfile, an archive that leads with a ._<name> member the way bsdtar writes it, and imports it with the real CLI;
    • asserts the export guard;
    • on macOS, also exports a real preset and checks its raw members.
  • tests/test-support-bundle.sh (already run by test-linux.yml):
    • checks the raw archive members with tarfile, because bsdtar's own listing hides ._*;
    • asserts the COPYFILE_DISABLE guard, which keeps the check deterministic on Linux.
macOS (/bin/bash 3.2) Linux, Ubuntu 26.04
preset test on main 4 passed, 2 failed 4 passed, 2 failed
preset test, this PR 6/6 6/6
support-bundle test on main 3 failed: ._* members really present in the bundle, plus the guard check 1 failed (guard check)
support-bundle test, this PR 1 failed 22/22

The one macOS support-bundle failure left with this PR (support bundle did not use selected Bash for nested project scripts) also fails on main and is unrelated.

list-unwired-tests.py --check passes, shellcheck -S warning is clean, and bash -n passes.

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.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: preset export and support bundle archives include AppleDouble ._* members (preset import fails on Linux)

1 participant