From c3f46c8db8c346f612c8bdf3d29795615a04b69a Mon Sep 17 00:00:00 2001 From: MoonlightWave-12 <135532-MoonlightWave-12@users.noreply.gitlab.gnome.org> Date: Tue, 6 Aug 2024 13:53:35 +0200 Subject: [PATCH 1/3] Build/CI: Remove workaround that does not work any more Part-of: --- .gitlab-ci.yml | 14 ------- debian/control | 15 +++++--- debian/control.debian-testing | 72 ----------------------------------- doc/hacking.md | 6 --- 4 files changed, 10 insertions(+), 97 deletions(-) delete mode 100644 debian/control.debian-testing diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b498672..72bc6b6c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,9 +23,6 @@ stages: - deploy before_script: -# Workaround for unavailable dependencies - - mv debian/control.debian-testing debian/control -# End of workaround for unavailable dependencies - apt-get -y update - apt-get -y install ca-certificates @@ -65,17 +62,6 @@ build_deb: - '*.deb' script: - rm -f ../*.deb -# Workaround for unavailable dependencies -# TODO: Port Squeekboard to GTK4/GTK4-layer-shell -# https://gitlab.gnome.org/World/Phosh/squeekboard/-/issues/64 - - echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list - - echo "deb http://deb.debian.org/debian/ experimental main" > /etc/apt/sources.list.d/experimental.list - - echo "APT::Default-Release \"trixie\";" > /etc/apt/apt.conf.d/default-release - - apt-get -y update - - apt-get -y --no-upgrade install librust-gio-dev librust-glib-dev librust-glib-sys-dev - librust-gtk-dev librust-gtk-sys-dev - - apt-get -y --no-upgrade install -t experimental librust-serde-yaml-dev -# End of workaround for unavailable dependencies - apt-get -y build-dep . - apt-get -y install devscripts - REV=$(git log -1 --format=%h) diff --git a/debian/control b/debian/control index 3ad37f2d..92acf331 100644 --- a/debian/control +++ b/debian/control @@ -16,11 +16,16 @@ Build-Depends: librust-aho-corasick-dev, librust-bitflags-1-dev (>= 1.0), librust-clap-4+std-dev (>= 4.0), - librust-gio+v2-58-dev (>= 0.18), - librust-glib+v2-58-dev (>= 0.18), - librust-glib-sys-dev (>= 0.18), - librust-gtk+v3-24-dev (>= 0.18), - librust-gtk-sys-dev (>= 0.18), +# TODO: Port to GTK4/GTK4-layer-shell +# https://gitlab.gnome.org/World/Phosh/squeekboard/-/issues/64 +# These dependencies have been removed from Debian. +# Building with dependencies from "crates.io", which will be +# downloaded by `cargo` during the build, still works without these. +# librust-gio+v2-58-dev (>= 0.18), +# librust-glib+v2-58-dev (>= 0.18), +# librust-glib-sys-dev (>= 0.18), +# librust-gtk+v3-24-dev (>= 0.18), +# librust-gtk-sys-dev (>= 0.18), librust-maplit-1-dev (>= 1.0), librust-serde-derive-1-dev (>= 1.0), librust-serde-yaml-0.9-dev (>= 0.9), diff --git a/debian/control.debian-testing b/debian/control.debian-testing deleted file mode 100644 index 8cb11508..00000000 --- a/debian/control.debian-testing +++ /dev/null @@ -1,72 +0,0 @@ -Source: squeekboard -Section: x11 -Priority: optional -Maintainer: Dorota Czaplejewicz -Build-Depends: - cargo, - debhelper-compat (= 13), - meson (>=0.51.0), - ninja-build, - pkg-config, - libbsd-dev, - libfeedback-dev, - libglib2.0-dev, - libgnome-desktop-3-dev, - libgtk-3-dev, - librust-aho-corasick-dev, - librust-bitflags-1-dev (>= 1.0), - librust-clap-4+std-dev (>= 4.0), -# TODO: Port to GTK4/GTK4-layer-shell -# https://gitlab.gnome.org/World/Phosh/squeekboard/-/issues/64 -# These dependencies have been removed from Debian Testing. -# Building with dependencies from "crates.io" still works without these. -# librust-gio+v2-58-dev (>= 0.18), -# librust-glib+v2-58-dev (>= 0.18), -# librust-glib-sys-dev (>= 0.18), -# librust-gtk+v3-24-dev (>= 0.18), -# librust-gtk-sys-dev (>= 0.18), - librust-maplit-1-dev (>= 1.0), - librust-serde-derive-1-dev (>= 1.0), -# Currently in Debian Experimental -# librust-serde-yaml-0.9-dev (>= 0.9), - librust-thread-local-dev, - librust-xkbcommon-dev (>= 0.5), - librust-zbus-1-dev (>= 1.9), - librust-zvariant-2-dev (>= 2.10), - librust-zvariant-derive-2-dev (>= 2.10), - libwayland-dev (>= 1.16), - lsb-release, - python3, - python3-ruamel.yaml, - rustc, - wayland-protocols (>= 1.14), -Standards-Version: 4.1.3 -Homepage: https://gitlab.gnome.org/World/Phosh/squeekboard -Rules-Requires-Root: no - -Package: squeekboard -Architecture: linux-any -Depends: -# for Greek polytonic readability - fonts-gfs-didot-classic, -# for the Adwaita-dark theme - gnome-themes-extra-data, - ${shlibs:Depends}, - ${misc:Depends}, -Breaks: - librem5-base (<< 24), -Description: On-screen keyboard for Wayland - Virtual keyboard supporting Wayland, built primarily for the Librem 5 phone. - -Package: squeekboard-devel -Architecture: linux-any -Depends: - python3, - python3-gi, - ${shlibs:Depends}, - ${misc:Depends}, -Description: Resources for making Squeekboard layouts - Tools for creating and testing Squeekboard layouts: - . - * squeekboard-entry - * squeekboard-test-layout diff --git a/doc/hacking.md b/doc/hacking.md index 10841ff9..d370561f 100644 --- a/doc/hacking.md +++ b/doc/hacking.md @@ -58,12 +58,6 @@ $ sudo apt-get -y build-dep . For an explicit list of dependencies check the `Build-Depends` entry in the [`debian/control`](debian/control) file. -Note: Some build-dependencies are currently unavailable in Debian Testing. -To be able to install the build-dependencies with the previously mentioned commands anyway, -rename `control` in the `debian`-folder to `control.original`, -and `control.debian-testing` to `control` before using those commands. -The remaining dependencies will then be downloaded by `cargo` when building Squeekboard. - Testing ------- From 117b3e076322dc29a0b7097b0d7a01d4fa88d56b Mon Sep 17 00:00:00 2001 From: MoonlightWave-12 <135532-MoonlightWave-12@users.noreply.gitlab.gnome.org> Date: Tue, 6 Aug 2024 14:47:49 +0200 Subject: [PATCH 2/3] Build: Use vendored dependencies for building .deb packages It is currently not possible to build Squeekboard with only packages that are available in Debian. This is not likely to change until Squeekboard has been ported to GTK4 or gtk4-layer-shell. Until then, vendor the dependencies during the build, so that one can still use the ".deb"-packages for testing. Part-of: --- debian/cargo/config | 5 ++++- debian/rules | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/cargo/config b/debian/cargo/config index 22f26415..48c7cd4e 100644 --- a/debian/cargo/config +++ b/debian/cargo/config @@ -8,4 +8,7 @@ registry = 'https://github.com/rust-lang/crates.io-index' replace-with = 'vendored-sources' [source.vendored-sources] -directory = '/usr/share/cargo/registry' +# TODO: Use this instead of `../vendor`, +# after Squeekboard can also be built with Debian packages only. +# directory = '/usr/share/cargo/registry' +directory = '../vendor' \ No newline at end of file diff --git a/debian/rules b/debian/rules index f4755666..5636b647 100755 --- a/debian/rules +++ b/debian/rules @@ -26,3 +26,7 @@ export RUSTFLAGS = --remap-path-prefix=$(CURDIR)=/remap-pwd $(xgot) %: dh $@ --builddirectory=_build --buildsystem=meson + +# TODO: Remove this, after Squeekboard can also be built with Debian packages only. +execute_before_dh_auto_configure: + cargo vendor From 4ea7cccaecc50c84bb900e36ff5db4985daf5c21 Mon Sep 17 00:00:00 2001 From: MoonlightWave-12 <135532-MoonlightWave-12@users.noreply.gitlab.gnome.org> Date: Thu, 8 Aug 2024 23:06:22 +0200 Subject: [PATCH 3/3] debian/cargo/config: Rename to config.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to fix a deprecation-warning: "…/squeekboard/debian/cargo/config` is deprecated in favor of `config.toml` note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`" Part-of: --- debian/cargo/{config => config.toml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename debian/cargo/{config => config.toml} (100%) diff --git a/debian/cargo/config b/debian/cargo/config.toml similarity index 100% rename from debian/cargo/config rename to debian/cargo/config.toml