Skip to content

Commit e536d01

Browse files
fix(packaging): constrain *.png exclude to top-level — let icons through
QA caught that GNU tar 1.35 defaults to `--wildcards-match-slash`, so the previous `--exclude="$APP_NAME/*.png"` was stripping ALL .png files at any depth from the .spl — including the launcher icons in `static/` and `appserver/static/` that build 7b98203 shipped. The launcher tile would therefore fall back to Splunk's system-default placeholder for every customer, undoing the icon work. Verified with a fresh .spl rebuild: - before: `tar -tzf dist/*.spl | grep appIcon` returned zero matches - after: 8 appIcon* entries present (4 in static/, 4 in appserver/static/) - top-level debug PNGs (a11y-*, demo-*, v-*, ~40 files) stay excluded - .spl size: 449 KB / 96 files (was 448 KB / 88 — added ~7 KB for icons, no other change). The brief 4.9 MB / 137 file bloat seen during the intermediate fix-attempt was the same wildcard issue from the other direction (no exclude at all let 40+ debug PNGs through). Mechanism: `--anchored --no-wildcards-match-slash` placed JUST BEFORE the `*.png` exclude constrains the wildcard to repo-root only (one level deep, no slash crossing). Subsequent excludes are unaffected because the toggle is positional and the .png exclude is the last pattern before the source-tree arg. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 7b98203 commit e536d01

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

scripts/package.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,20 @@ cp "$PROD_MAP" "$APP_DIR/lookups/rule_csv_map.csv"
116116
# 3. Step 4b below adds a post-tar sanity check that fails the build
117117
# if known-bad patterns appear in the tarball — backstop in case
118118
# a new prohibited path bypasses both layers above.
119+
#
120+
# IMPORTANT: top-level debug PNGs are excluded with `--anchored
121+
# --no-wildcards-match-slash` toggles applied JUST BEFORE the `*.png`
122+
# pattern (after the rest of the excludes). GNU tar 1.35 defaults to
123+
# `--wildcards-match-slash`, which would make `$APP_NAME/*.png` strip
124+
# ALL .png files at any depth — including the launcher icons in
125+
# `static/` and `appserver/static/` that the Splunk launcher REST
126+
# endpoint needs (see CLAUDE.md "Launcher icon path quirk"). The two
127+
# `--no-...` flags constrain the wildcard to top-level only, so debug
128+
# screenshots at the repo root (a11y-*.png, demo-*.png, v-*.png, ...)
129+
# stay excluded while the icon PNGs pass through. Origin: QA review
130+
# after build d67b6e7 + 7b98203 caught the wildcard eating every
131+
# appIcon copy in the .spl, making the launcher tile fall back to
132+
# Splunk's system-default placeholder.
119133
tar -czf "$SPL_FILE" \
120134
-C "$(dirname "$APP_DIR")" \
121135
--exclude='*/.*' \
@@ -152,13 +166,14 @@ tar -czf "$SPL_FILE" \
152166
--exclude="$APP_NAME/local" \
153167
--exclude="$APP_NAME/*.spl" \
154168
--exclude="$APP_NAME/*.pdf" \
155-
--exclude="$APP_NAME/*.png" \
156169
--exclude="$APP_NAME/test_*.py" \
157170
--exclude="$APP_NAME/*-after-*" \
158171
--exclude="$APP_NAME/login-check" \
159172
--exclude="$APP_NAME/default/data/ui/views/test_runner.xml" \
160173
--exclude="$APP_NAME/appserver/static/test_runner.xml" \
161174
--exclude="$APP_NAME/appserver/static/tests" \
175+
--anchored --no-wildcards-match-slash \
176+
--exclude="$APP_NAME/*.png" \
162177
"$APP_NAME/"
163178

164179
# Restore the original mapping file

0 commit comments

Comments
 (0)