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: #16004Fixes: #16005
Build-bot: skip build:linux
Test-bot: skip
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
- 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>
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
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
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
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
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
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
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
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
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
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.
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.
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.
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.
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.
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