Commit graph

78 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Eberhard Beilharz
38f43d84cf
refactor(common): some reformattings in shellHelperFunctions.sh
Also always include `jq.inc.sh`. The include file already has everything
we did here.

Test-bot: skip
2025-07-07 18:44:28 +02:00
Eberhard Beilharz
ac0f424aa0
maint(linux): ignore unnecessary files from source package 2025-05-13 20:07:33 +02:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Eberhard Beilharz
b1427f34f4
fix(linux): remove unnecessary files from source tarball
PR #12642 tried to fix creating the source tarball so that it didn't
ignore files we need. However, that now included way to many files.
This change fixes this and results in a smaller tarball again.

Fixes: #13010
2025-01-27 16:56:41 +01:00
Marc Durdin
0d42160bc9 chore(core): avoid skipping docs folder in linux dist.sh
Unfortunately dpkg-source can only list files to exclude, not files to
include, which makes it fragile to changes in other platforms. The list
previously included 'docs', and as I renamed /core/doc to /core/docs to
match the other platforms, that caused it to be excluded. Changing it to
'./docs' should hopefully only match the top-level folder.

At the same time, updated many other top-level folder matches.
2024-11-08 05:24:47 +07:00
Marc Durdin
0e5fbb225d refactor(common): fixup help path script references
Relates-to: #12347
2024-09-16 06:19:14 +07:00
Eberhard Beilharz
b9aa9ccd8c
refactor(web): move predictive-textworker-main
This moves `common/predictive-text/` →
`web/src/engine/predictive-text/worker-main/`.

This also moves `common/test/predictive-text/` →
`web/src/test/manual/predictive-text/`. Note though that this testing
tool is still broken.

Fixes: #12134
2024-08-15 12:26:50 +02:00
Eberhard Beilharz
f0d365e4b8
chore(linux): remove unused building with pbuilder
We no longer build with pbuilder/cowbuilder, so this change removes
that unnecessary code. This also changes the `deb.sh` script which no
longer needs parameters since it's only purpose is now to build the
source package, and removes the no-longer needed targets from `Makefile`.

This solves #9356 as good as possible. We still have the list of
distributions in two places, but I don't see a way to import the list
of distributions to the packaging GHA.

Fixes: #9356
2024-06-24 18:37:10 +02:00
Eberhard Beilharz
3a042586ab
chore(linux): Exclude environment.sh from build
`environment.sh` is used only on Mac. This change modifies `build.sh`
to generate this file only when building on Mac. It also excludes
`environment.sh` from the Linux source tarball.
2023-09-12 18:25:52 +02:00
Eberhard Beilharz
aaef0f3c7f
chore(linux): Add clean target to rules
This allows to completely cleanup after a package build. Also fixes
`keyman-config/build.sh` to do a better job with clean.

Fixes #9518.
2023-08-31 16:18:18 +02:00
Eberhard Beilharz
b8d0777800
chore(linux): Remove package build on Jenkins for Keyman 17 2023-08-01 15:03:47 +02:00
Eberhard Beilharz
ab25157364
feat(linux): Refactor to benefit from C++ RAII
Also apply changes from code review comments.
2023-05-22 19:51:45 +02:00
Eberhard Beilharz
879a34a180
feat(linux): Add package for keyman-system-service 2023-05-15 09:13:58 +02:00
Marc Durdin
5634843bb2 chore(linux): fixup missing parameter test 2023-05-02 12:28:25 +07:00
Marc Durdin
a1326ad47b chore(common): set -eu in build-utils.sh
Enforces -e (abort script on error) and -u (error on unset variable use)
on all scripts that source build-utils.sh. This may result in some
downstream build failures which we'll need to address before merge to
master.
2023-05-02 12:14:05 +07:00
Marc Durdin
d044b9c8ef chore(linux): include common/test/keyboards in dist.sh 2023-03-28 14:45:55 +07:00
Eberhard Beilharz
794557f7d5
chore(core): Remove obsolete --target-path option
Linux package builds no longer require a different target path, so
we can remove the `--target-path` parameter.
2023-03-07 13:38:31 +01:00
Marc Durdin
af4b2536bc chore(common): remove vswhere
With #8287, we no longer use a local copy of vswhere.exe but instead
rely on a standard location for it from the Visual Studio installer.
2023-03-03 04:50:25 +07:00
Marc Durdin
ce864ea923 chore: update standard script prolog to use builtin instead of dirname 2023-02-22 11:04:15 +07:00
Marc Durdin
463c7ff907 chore: remove greadlink from standard script prolog 2023-02-22 10:43:06 +07:00
Eberhard Beilharz
61ba40a212
chore(linux): Refactor scripts and packaging
This change modifies the scripts and the Debian packaging to use
the meson build / build.sh script for building instead of autotools.
2023-02-14 09:42:13 +01:00
Eberhard Beilharz
ea059df541
chore(linux): Remove legacy projects
This change removes the KMFL legacy projects. They are still
available in the stable-16 branch if we need them.

Also removed some shellcheck warnings.
2023-01-26 11:51:13 +01:00
Marc Durdin
139b26e4a5 chore(linux): update tar ignore for common folder 2022-08-12 11:12:27 +02:00
Eberhard Beilharz
dbca5712e7
chore(linux): Adjust Linux source package to restructured code 2022-08-09 12:08:42 +02:00
Marc Durdin
4ab3c53810 chore(common): adjust scripts for core relocation 2022-05-18 07:22:11 +10:00
Marc Durdin
05a4c33200 chore(web): move common/core/web to common/web
Relates to #5816.

Moves folders under common/core/web to common/web:

* input-processor -> common/web/input-processor
* keyboard-processor -> common/web/keyboard-processor
* tools/recorder -> common/web/recorder
* tools/sentry-manager -> common/web/sentry-manager
* utils -> common/web/utils

Updates scripts and configuration to point to new folders.
2022-05-18 06:01:03 +10:00
Marc Durdin
af44c0687f chore(web): move web-environment to common/web 2022-05-16 08:29:46 +10:00
Eberhard Beilharz
f19cd3f513
chore(linux): stop releasing KMFL together with Keyman
Fixes #6163.
2022-01-31 19:08:14 +01:00
Eberhard Beilharz
46e6d20f35
refactor(linux): Move KMFL to linux/legacy 2021-08-06 11:25:01 +02:00
Eberhard Beilharz
79f92a150c
chore(linux): Consolidate Debian source packages
This change consolidates the Debian packages into a single source
package, with the exception of the legacy KMFL packages.

Fixes #5022.
2021-08-06 11:25:00 +02:00