Skip to content

maint(linux): generate tar-ignore in dist.sh#14639

Merged
ermshiperete merged 4 commits intomasterfrom
maint/linux/14563_tarignore
Sep 1, 2025
Merged

maint(linux): generate tar-ignore in dist.sh#14639
ermshiperete merged 4 commits intomasterfrom
maint/linux/14563_tarignore

Conversation

@ermshiperete
Copy link
Copy Markdown
Contributor

This generates the --tar-ignores to avoid having to manually maintain the list when adding new files or folders for other platforms. Instead now we have a list of files and directories to include, and a list of exceptions to exclude from the includes. From that we generate the tar-ignore list.

Fixes: #14563
Test-bot: skip

This generates the `--tar-ignore`s to avoid having to manually maintain
the list when adding new files or folders for other platforms. Instead
now we have a list of files and directories to include, and a list of
exceptions to exclude from the includes. From that we generate the
tar-ignore list.

Fixes: #14563
Test-bot: skip
@keymanapp-test-bot
Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S10 milestone Aug 28, 2025
@github-actions github-actions bot added linux/ maint Maintenance work -- continuous integration, build scripts, infrastructure labels Aug 28, 2025
Comment on lines +61 to +70
to_exclude=(
common/test/keyboards/baseline/kmcomp-*.zip \
core/build \
linux/build \
linux/builddebs \
linux/docs/help \
linux/keyman-config/keyman_config/version.py \
linux/keyman-config/buildtools/build-langtags.py \
linux/keyman-system-service/build
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about putting these in a text file and using the --exclude-from option? (similar to zip.inc.sh)

And include with --files-from?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I prefer having it inline - makes it easier to see in context.

Copy link
Copy Markdown
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Ironically the script is longer now but advantage is maintainers for other platforms won't tread on linux platform toes so much!

generate_tar_ignore_list "./" to_include to_exclude ignored_files "$(basename "${KEYMAN_ROOT}")"

dpkg-source \
--tar-ignore=*~ \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you planning to put all the --tar-ignore entries into to_exclude or only folders? If only folders, perhaps a comment to that effect would be helpful?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, those --tar-ignores stay there. to_exclude contains the exceptions to the included files/folders in to_include, whereas the --tar-ignores here are files/folders that we always want to ignore regardless of their location. Having them here allows us to pass the wildcards to dpkg-source - whereas the wildcards in to_exclude will be resolved and replaced with multiple --tar-ignore entries.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be a good code comment!

@darcywong00 darcywong00 modified the milestones: A19S10, A19S11 Aug 29, 2025
@ermshiperete ermshiperete merged commit 6e2049b into master Sep 1, 2025
10 checks passed
@ermshiperete ermshiperete deleted the maint/linux/14563_tarignore branch September 1, 2025 13:05
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Sep 1, 2025
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.110-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linux/ maint Maintenance work -- continuous integration, build scripts, infrastructure

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

maint(linux): generate tar-ignore in dist.sh to avoid having to manually maintain

4 participants