Skip to content

Conversation

@ermshiperete
Copy link
Contributor

With this change it's possible to build Keyman from the source tarball by running ./build.sh from the Keyman root directory.

When building Keyman as part of the Ubuntu/Debian packaging, we don't use the toplevel build.sh file but instead call the build scripts in the subdirectories. This omits building some components that are currently not needed for running Keyman for Linux. The dist.sh script only includes the necessary files in this case, distinguished by the origdist parameter. This results in a significantly smaller tarball (2.5MB vs 51MB).

This change also enhances the generate_tar_ignore_list function so that it is now possible to add build to the exclude list to ignore all build subdirectories.

Fixes: #15544
Build-bot: skip
Test-bot: skip

With this change it's possible to build Keyman from the source tarball
by running `./build.sh` from the Keyman root directory.

When building Keyman as part of the Ubuntu/Debian packaging, we don't use
the toplevel `build.sh` file but instead call the build scripts in the
subdirectories. This omits building some components that are currently
not needed for running Keyman for Linux. The `dist.sh` script only
includes the necessary files in this case, distinguished by the `origdist`
parameter. This results in a significantly smaller tarball (2.5MB vs 51MB).

This change also enhances the `generate_tar_ignore_list` function so that
it is now possible to add `build` to the exclude list to ignore all
`build` subdirectories.

Fixes: #15544
Build-bot: skip
Test-bot: skip
@keymanapp-test-bot
Copy link

User Test Results

Test specification and instructions

User tests are not required

@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S22 milestone Feb 5, 2026
Comment on lines 156 to 198
function _is_exact_match() {
local var="$1"
local needle="$2"
local array="${var}[@]"
local haystack=("${!array}")
local item
for item in "${haystack[@]}"; do
if [[ "./${item#./}" == "${needle}" ]]; then
return 0
fi
done
return 1
}

function _starts_with() {
local var="$1"
local start="$2"
local array="${var}[@]"
local values=("${!array}")
local item
for item in "${values[@]}"; do
if [[ "./${item#./}" == ${start}* ]]; then
return 0
fi
done
return 1
}

function _ends_with() {
local array_var="$1"
local file="$2"
local array="${array_var}[@]"
local values=("${!array}")
local item
for item in "${values[@]}"; do
if [[ "${file}" == */${item#./} ]]; then
return 0
fi
done
return 1
}

function _is_wildcard_match() {
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to see unit tests for these eminently testable functions 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, good point. Done.

}

function debug() {
# echo "$@"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have access to check builder local and debug options?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so since it's not a full builder script.

This change adds the `assert-true` and `assert-false` function to our
bash testing framework, together with unit tests.

Also rename the test file to `testing-framework.inc.tests.sh` to match
the implementation file.
This addresses code review comments. Also improve variable naming and
documentation for these new functions.
ermshiperete added a commit that referenced this pull request Feb 6, 2026
Using the xz compression instead of gzip greatly reduces the size of the
tarball.

Follows: #15566
Test-bot: skip
ermshiperete added a commit that referenced this pull request Feb 6, 2026
Using the xz compression instead of gzip greatly reduces the size of the
tarball.

Follows: #15566
Test-bot: skip
@ermshiperete ermshiperete changed the title fix(linux): include missing artifacts in source tarball fix(linux): include missing artifacts in source tarball 🗜️ Feb 6, 2026
Co-authored-by: Marc Durdin <marc@durdin.net>
ermshiperete added a commit that referenced this pull request Feb 6, 2026
Using the xz compression instead of gzip greatly reduces the size of the
tarball.

Follows: #15566
Test-bot: skip
@ermshiperete ermshiperete merged commit e776a2c into master Feb 9, 2026
5 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Feb 9, 2026
@ermshiperete ermshiperete deleted the fix/linux/15544_sourcepkg branch February 9, 2026 14:06
ermshiperete added a commit that referenced this pull request Feb 9, 2026
chore(linux): use xz compression for source tarballs 🗜️

Using the xz compression instead of gzip greatly reduces the size of the tarball.

Follows: #15566
@keyman-server
Copy link
Collaborator

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

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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug(linux): artifacts download is missing hextobin component

4 participants