Remove embedded git repos; ignore vendored data dirs

applepy/data/lynis and applepy/data/macos_security were committed as
gitlink stubs (mode 160000) because rsync -a copies .git/ along with
everything else. Cloners would silently receive empty directories.

Fix: remove the submodule stubs, add both dirs to .gitignore (they are
populated by scripts/vendor_compliance_assets.sh), and add --exclude .git
to both rsync invocations so future vendor runs don't recreate the problem.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Warezpeddler
2026-04-25 23:11:47 +01:00
parent 3325436017
commit 2adb75fc0d
4 changed files with 6 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ clone_mscp() {
mkdir -p "${MACP}"
git clone --depth 1 "https://github.com/usnistgov/macos_security.git" "${TMP}/macos_security"
rsync -a --delete \
--exclude README.md --exclude .gitignore \
--exclude README.md --exclude .gitignore --exclude .git \
"${TMP}/macos_security/" "${MACP}/"
echo "Vendored macos_security -> ${MACP}"
}
@@ -33,7 +33,7 @@ clone_lynis() {
mkdir -p "${LYNP}"
git clone --depth 1 "https://github.com/cisofy/lynis.git" "${TMP}/lynis"
rsync -a --delete \
--exclude README.md --exclude .gitignore \
--exclude README.md --exclude .gitignore --exclude .git \
"${TMP}/lynis/" "${LYNP}/"
echo "Vendored Lynis -> ${LYNP}"
}