Commit graph

34 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
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
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
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
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
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
5efab30415
refactor(linux): remove shellcheck warnings and reformat
Build-bot: skip
Test-bot: skip
2025-08-20 17:14:35 +02:00
Eberhard Beilharz
10e21cb433
maint(linux): sudo not required for removing temporary files 🍒
Since we have write access to the directory we don't need `sudo` for
removing the temporary dependency files if we pass `-f` to `rm`.

Cherry-pick-of: commit 4f27f6e256
Cherry-pick-of: #14085
Test-bot: skip
2025-05-30 11:12:56 +02:00
Eberhard Beilharz
9d2ab35531
maint(common): move TC build configs for Linux to scripts
This change adds scripts for the TeamCity build configurations for
Linux builds.

Part-of: #13399
Test-bot: skip
2025-05-12 17:42:25 +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
e9398133fc
chore(linux): Install python3-dev
On a new machine we need to install python3-dev so that we can access
`Python.h`. It shouldn't be in `debian/control`, so we put in our
script where we check the requirements.
2024-04-24 18:38:40 +02:00
Eberhard Beilharz
c4efba04d9
chore(linux): Don't fail on parallel builds
If another build runs on the same build agent at the same time and
installs dependencies at the same time, previously the build failed
because apt/dpkg was already running. This change checks for the
existence of the apt/dpkg lock file and waits until the other process
is finished before starting the installation of dependencies.
2023-07-31 09:54:09 +02:00
Eberhard Beilharz
9b4ca1aebd
chore(linux): Move build steps to build.sh
Closes #8712.
2023-05-30 09:25:27 +02:00
Eberhard Beilharz
8520b1aaa9
chore(linux): Fix uploading to launchpad
This fixes some uninitialized variables.
2023-05-08 10:20:21 +02:00
Eberhard Beilharz
2cd0ddd91e
chore(linux): Remove obsolete files
We no longer use these files, so we can remove them. Instead we
can use `checkAndInstallRequirements`.

Co-authored-by: Marc Durdin <marc@durdin.net>
2023-02-14 09:55:04 +01:00
Eberhard Beilharz
fd4709fad4
fix(linux): Fix CI build
This fixes the build on Jenkins and TC that got broken by
including the wildcard in the quoted string (which causes it to
be interpreted literally), introduced in #8102.
2023-01-30 15:42:45 +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
Eberhard Beilharz
f19cd3f513
chore(linux): stop releasing KMFL together with Keyman
Fixes #6163.
2022-01-31 19:08:14 +01:00
Eberhard Beilharz
105fe50597
fix(linux): Fix uploading to launchpad for legacy projects 2021-08-20 10:58:04 +02:00
Eberhard Beilharz
52608d39b9
fix(linux): Fix uploading to launchpad
Follow-up of #5536.
2021-08-19 11:56:10 +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
Marc Durdin
77e71df81b chore: Merge branch 'master' into chore/B14S8-beta-to-master 2021-03-22 06:16:44 +11:00
Eberhard Beilharz
9a4b9f0bca
chore(linux): Move signature files as well
This will take care of another lintian warning on Debian.
2021-03-11 17:09:19 +01:00
Eberhard Beilharz
89df5a6b7c
chore(linux): Improve launchpad.sh script
If uscan fails (e.g. because there is no new version available
because the workspace is in a dirty state) we now output an error
message instead of silently failing.
2021-01-27 11:57:18 +01:00
Eberhard Beilharz
f3b8ccf07f
chore(linux): Improve version number for debian package
This change switches the package version number for packages that
are intended for the Debian package repo to match the Debian policies.

It also removes the comment from the watch file.
2021-01-14 17:39:49 +01:00
Eberhard Beilharz
6b999bc911
chore(linux): Update debian metadata based on Debian repos
This is a cherry-pick of PR#4223:

- Add script to create debian source package
- Update debian metadata based on Debian repos
- Remove some lintian warnings and errors
- Remove support Xenial
- Reduce size of icon
- Omit confusing values from gbp.conf
2021-01-12 18:38:18 +01:00