Commit graph

363 commits

Author SHA1 Message Date
Eberhard Beilharz
f339ceb722
maint(linux): fix Linux source tarball
Previously we tried to include all necessary files in the Linux source
tarball, so that a user would be able to successfully run the top-level
`build.sh` file. However, that causes problems when new dependencies
between sub-projects get introduced that would require adding additional
sub-projects to the tarball.

This change modifies the tarball to only include files that are necessary
to run the `linux/build.sh` file, i.e. necessary to build Keyman for
Linux. This is likely what users would expect when they download a source
tarball for Linux. If users want to build other parts of Keyman that are
buildable on Linux they can download the source tarball that the GitHub
releases page provides, or clone the repo.

In order to be able to still run the top-level `build.sh` script, this
change replaces the top-level `build.sh` with a script that simply
forwards the arguments to `linux/build.sh`.

This change also reverts the recent introduction of a *.pkg.tar.xz file
that contained all files necessary to build a Debian/Ubuntu package. There
wouldn't be a difference anymore between the two .tar.xz files.

Fixes: #16004
Fixes: #16005
Build-bot: skip build:linux
Test-bot: skip
2026-05-26 16:14:57 +02:00
Eberhard Beilharz
be63a51b66
fix(linux): install emscripten prior to verifying source tarball
When running on CI kmcmplib gets fully build, which requires emscripten.
This change installs emscripten before running the source tarball
verification.

Also modify `launchpad.sh` and add option `--no-sign` so that we don't
have to set up things for signing. Use long options for `debuild` where
possible.

Build-bot: skip build:linux
Test-bot: skip
2026-05-19 19:53:25 +02:00
Eberhard Beilharz
711363651b
maint(linux): fix source tarball verification
- fix tarball to include `common/schemas`
- use `*.pkg.tar.xz` for running lintian
- also add 'Linux source verification' to PR status check

Test-bot: skip
2026-05-18 18:18:51 +02:00
Eberhard Beilharz
81c92537c9
Merge pull request #15944 from keymanapp/maint/linux/uploadppa
maint(linux): fix uploading to ppa 🏗️

It seems that since a recent DDOS Launchpad only accepts secure connections. This change uses the new keyman-ppa section (which has already been created on the TC build agents) to upload to the ppa.

Follows: #15928
2026-05-11 18:33:25 +02:00
Eberhard Beilharz
3b27fd5072
Merge pull request #15930 from keymanapp/maint/linux/retrylaunchpad
maint(core): retry upload to launchpad on network failures 🏗️

This change adds a retry mechanism for failed uploads to Launchpad. By default it tries 5 times.

Follows: #15928
2026-05-11 18:20:50 +02:00
Eberhard Beilharz
cef3160c74
Merge pull request #15928 from keymanapp/maint/core/15905_build
maint(core): exclude `.configured` files from source tarball 🏗️

In the source tarball we don't want to include `.configured` files so that a build will call `npm i` first.

Fixes: #15905
Follows: #15926
2026-05-11 18:19:52 +02:00
Eberhard Beilharz
e6ae3d92a8
chore(linux): Merge remote-tracking branch 'origin/master' into chore/linux/projectparam 2026-05-11 18:12:03 +02:00
Eberhard Beilharz
c70ad66366
Merge pull request #15924 from keymanapp/chore/linux/debianbuilder
chore(linux): make `debian.sh` a builder script 🏗️

This change modifies `debian.sh` so that it is a full builder script. This allows further cleanup in `package-build.inc.sh`.

Follows: #15916
2026-05-11 18:07:24 +02:00
Eberhard Beilharz
d0983ddea4
maint(linux): fix uploading to ppa
It seems that since a recent DDOS Launchpad only accepts secure
connections. This change uses the new `keyman-ppa` section (which has
already been created on the TC build agents) to upload to the ppa.

Build-bot: skip
Test-bot: skip
2026-05-11 18:05:39 +02:00
Eberhard Beilharz
3fc796998e
maint(core): retry upload to launchpad on network failures 🏗️
This change adds a retry mechanism for failed uploads to Launchpad. By
default it tries 5 times.

Follows: #15928
Build-bot: skip
Test-bot: skip
2026-05-08 20:31:04 +02:00
Eberhard Beilharz
1f02bc02f6
chore(linux): address code review comments
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
- make `verify_source.sh` a full builder script
- make options for `launchpad.sh` less confusing
- reference `--help` in `packaging.md`
- run new script as part of Ubuntu packaging workflow

Co-authored-by: Marc Durdin <marc@durdin.net>
2026-05-08 19:11:18 +02:00
Eberhard Beilharz
327be78de7
Apply suggestions from code review
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-05-08 09:57:43 +02:00
Eberhard Beilharz
69db9e9a37
maint(core): exclude .configured files from source tarball 🏗️
In the source tarball we don't want to include `.configured` files so
that a build will call `npm i` first.

Fixes: #15905
Follows: #15926
Test-bot: skip
2026-05-07 19:06:26 +02:00
Eberhard Beilharz
e03c37cacd
chore(linux): Merge branch 'maint/linux/sourcepkg' into chore/linux/checksource 2026-05-07 19:02:54 +02:00
Eberhard Beilharz
14e097ab95
maint(linux): fix source tarball used for packaging
The source tarball we upload to downloads.keyman.com contains all files
necessary to run `${KEYMAN_ROOT}/build.sh`, i.e. it contains all projects
that can be build on Linux. However, that is not the command used when
building Debian packages. There we limit the build to the `linux`
subfolder. Therefore we only need a subset of the files. Using the full
tarball causes some lintian errors.

This change creates and uploads a second tarball on release builds that
contains only the files needed for Debian packaging. The file is named
`keyman_$VERSION.pkg.tar.xz`.

Build-bot: skip
Test-bot: skip
2026-05-07 18:46:20 +02:00
Eberhard Beilharz
b0cc243e1d
chore(linux): remove --project parameter
The option to be able to specify a project for some linux scripts was
left over from older Keyman versions where Keyman was split over several
source packages. The current Keyman version builds multiple binary
Debian packages from just one source package, so this option is no longer
needed. This change gets rid of it.

Build-bot: skip
Test-bot: skip
2026-05-07 16:56:30 +02:00
Eberhard Beilharz
c825fb25f8
chore(linux): make debian.sh a builder script
This change modifies `debian.sh` so that it is a full builder script. This
allows further cleanup in `package-build.inc.sh`.

Follows: #15916
Build-bot: skip
Test-bot: skip
2026-05-07 16:55:00 +02:00
Eberhard Beilharz
2c8f878f1d
chore(linux): add verification for source tarball and source package
This change adds a new GitHub action that verifies that Keyman can build
from the source package. Also check that source package used for Launchpad
and Debian/Ubuntu packaging doesn't produce lintian errors. Previously
lintian errors did go unnoticed because they didn't stop the build.

Also refactor `launchpad.sh` script to be a proper builder script, and add
some new parameters to allow skipping some steps in the script.

Build-bot: skip
Test-bot: skip
2026-05-06 19:03:12 +02:00
Eberhard Beilharz
a3ea01451e
chore(linux): use xz compression for source tarballs
Using the xz compression instead of gzip greatly reduces the size of the
tarball.

Follows: #15566
Test-bot: skip
2026-02-06 17:37:34 +01:00
Eberhard Beilharz
9322a8adcb
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-02-06 17:13:35 +01:00
Eberhard Beilharz
f981469298
chore(linux): add unit tests for new functions in package-build.inc.sh
This addresses code review comments. Also improve variable naming and
documentation for these new functions.
2026-02-06 17:02:27 +01:00
Eberhard Beilharz
1b4e254963
fix(linux): include missing artifacts in source tarball
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
2026-02-05 17:56:15 +01:00
Eberhard Beilharz
7102bed1e5
maint(linux): remove EOL Ubuntu 25.04 Plucky
Support for Ubuntu 25.04 Plucky ends on 15th January 2026 after which
it is no longer possible to upload and build on Launchpad. This change
removes Plucky.

Fixes: #14955
Test-bot: skip
2026-01-13 18:04:57 +01:00
Eberhard Beilharz
9d2b17613c
chore(linux): add manual test for localization
This change adds a manual test that allows to see if all strings are
localizable. It also fixes the `update-template` target in the
`Makefile`.

Build-bot: skip
Test-bot: skip
2025-12-15 19:05:58 +01:00
Marc Durdin
8f95d84014
Merge pull request #15114 from keymanapp/maint/resources/builder-timing
maint(resources): add build timing report to builder
2025-11-14 14:24:11 +01:00
Eberhard Beilharz
e56619911d
chore(linux): add support for Ubuntu 26.04 LTS Resolute
Build-bot: skip
Test-bot: skip
2025-11-11 11:28:20 +01:00
Marc Durdin
c573709ee6 maint(resources): add build timing report to builder
This is enabled automatically for CI builds, and can be enabled with
`--timing` parameter otherwise. Also, adds `builder_launch`,
documentation to come.

Test-bot: skip
2025-11-10 11:03:45 +01:00
Eberhard Beilharz
c1c0c1f926
maint(linux): improve upload-to-debian script 🍒🍒
- directly get PR# from `gh pr create`
- add `Build-bot: skip` trailers
- 🍒-pick of the improved 🍒-pick #14785

Cherry-pick-of: #14785
Build-bot: skip
Test-bot: skip
2025-09-19 15:45:07 +02:00
Eberhard Beilharz
a3ec6bed17
Merge pull request #14598 from keymanapp/maint/linux/packaging
This change creates a temporary worktree for creating Debian packages. This will allow us to work from a clean state of the source repo. Also exclude any generated patch directories (`.pc`).
2025-09-01 15:11:48 +02:00
Eberhard Beilharz
6e2049b788
Merge pull request #14639 from keymanapp/maint/linux/14563_tarignore
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
2025-09-01 15:05:12 +02:00
Eberhard Beilharz
c8bea7496f
maint(linux): remove residues of previous runs on startup 2025-08-29 12:33:06 +02:00
Eberhard Beilharz
a1287739b4
maint(linux): more doc comments 2025-08-29 12:15:56 +02:00
Eberhard Beilharz
906b6a45fc
maint(linux): add doc comments 2025-08-29 09:57:25 +02:00
Eberhard Beilharz
537ffcff9d
Update linux/scripts/dist.sh
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-08-29 09:39:15 +02:00
Eberhard Beilharz
3dbb7e56c7
Merge pull request #14572 from keymanapp/refactor/linux/launchpad 2025-08-28 19:14:52 +02:00
Eberhard Beilharz
2754e4bef4
maint(linux): generate tar-ignore in dist.sh
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
2025-08-28 18:41:29 +02:00
Eberhard Beilharz
f9c23a5fba
refactor(linux): clarify missing quotes around ${SIM}
Addresses code review comment.
2025-08-28 17:18:15 +02:00
Eberhard Beilharz
cf273a27d9
maint(linux): address code review comments 2025-08-28 16:48:08 +02:00
Eberhard Beilharz
5d8b20dad6
Apply suggestion from @mcdurdin
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-08-28 15:48:22 +02:00
Eberhard Beilharz
4b5faef475
Merge pull request #14603 from keymanapp/refactor/linux/packaging-tests 2025-08-27 12:05:56 +02:00
Eberhard Beilharz
6cf43ddace
maint(linux): address code review comments 2025-08-25 17:47:45 +02:00
Eberhard Beilharz
488c0a684e
refactor(linux): use bash testing framework for packaging tests 2025-08-25 17:35:27 +02:00
Eberhard Beilharz
d201802e75
maint(linux): ignore generate patch directories
During a package build a  patch directory (`.pc`) might get created.
That can't and shouldn't be part of the source package. This change
excludes any `.pc` directories.

Build-bot: skip
Test-bot: skip
2025-08-25 15:54:54 +02:00
Eberhard Beilharz
525d54ab65
maint(linux): preserve created package files
Copy the generated files before removing the worktree so that they
are still available for reference.
2025-08-25 15:38:49 +02:00
Eberhard Beilharz
66b6a69909
maint(linux): create temporary worktree for packaging
This change creates a temporary worktree for creating Debian packages.
This will allow us to work from a clean state of the source repo. Also
exclude any generated patch directories (`.pc`).

Build-bot: skip
Test-bot: skip
2025-08-25 15:22:14 +02:00
Eberhard Beilharz
3c4264387c
refactor(linux): allow to run launchpad.sh from any directory
Previously the assumption was that `launchpad.sh` would be run from the
`linux` directory. This change sets the directory at the beginning of
the script, allowing it to be run from any directory. Also specify full
path to `launchpad.sh` in the TC build script.

Build-bot: skip
Test-bot: skip
2025-08-20 17:53:57 +02:00
Eberhard Beilharz
5efab30415
refactor(linux): remove shellcheck warnings and reformat
Build-bot: skip
Test-bot: skip
2025-08-20 17:14:35 +02:00
Marc Durdin
0d27ac91f7 maint(mac): use mac_ prefix for functions in mac.inc.sh
* Also renames resources/environment.sh to resources/build/mac/xcode-environment.inc.sh.
* Adds a few more exclusions to linux/scripts/dist.sh

Fixes: #14478
Test-bot: skip
Build-bot: build
2025-08-20 05:40:32 +02:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00