From 2e5e586860ffd620640187f3969110da8c978084 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 18 Oct 2023 18:15:13 +0200 Subject: [PATCH] chore(linux): Rename libkmnkbp0-0 package Also removes the temporary libkeymancore/libkmnkbp hack that we put in for packaging GHA. Closes #9733. --- .github/workflows/deb-packaging.yml | 13 +----- core/src/meson.build | 2 +- linux/debian/control | 16 ++++--- ...-dev.install => libkeymancore-dev.install} | 0 ...mnkbp0-0.install => libkeymancore.install} | 0 linux/debian/libkeymancore.symbols | 43 +++++++++++++++++++ linux/debian/libkmnkbp0-0.symbols | 43 ------------------- linux/debian/rules | 2 +- linux/debian/tests/control | 1 + linux/debian/tests/test-build | 6 +-- linux/scripts/deb-packaging.sh | 14 +++--- 11 files changed, 65 insertions(+), 75 deletions(-) rename linux/debian/{libkmnkbp-dev.install => libkeymancore-dev.install} (100%) rename linux/debian/{libkmnkbp0-0.install => libkeymancore.install} (100%) create mode 100644 linux/debian/libkeymancore.symbols delete mode 100644 linux/debian/libkmnkbp0-0.symbols diff --git a/.github/workflows/deb-packaging.yml b/.github/workflows/deb-packaging.yml index 36fa538d057..8cc431f1787 100644 --- a/.github/workflows/deb-packaging.yml +++ b/.github/workflows/deb-packaging.yml @@ -242,23 +242,12 @@ jobs: - name: Verify API run: | cd linux - if [ -f debian/libkeymancore.symbols ]; then - PKG_NAME=libkeymancore - else - PKG_NAME=libkmnkbp0-0 - fi + PKG_NAME=libkeymancore SRC_PKG="${GITHUB_WORKSPACE}/artifacts/keyman-srcpkg/keyman_${{ needs.sourcepackage.outputs.VERSION }}-1.debian.tar.xz" \ BIN_PKG="${GITHUB_WORKSPACE}/artifacts/keyman-binarypkgs/${PKG_NAME}_${{ needs.sourcepackage.outputs.VERSION }}-1${{ needs.sourcepackage.outputs.PRERELEASE_TAG }}+jammy1_amd64.deb" \ PKG_VERSION="${{ needs.sourcepackage.outputs.VERSION }}" \ ./scripts/deb-packaging.sh --gha verify 2>> $GITHUB_STEP_SUMMARY - - name: Archive .symbols file - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: libkmnkbp0-0.symbols - path: linux/debian/libkmnkbp0-0.symbols - if: always() - - name: Archive .symbols file uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 with: diff --git a/core/src/meson.build b/core/src/meson.build index c13e41159ed..c5ace696971 100644 --- a/core/src/meson.build +++ b/core/src/meson.build @@ -115,7 +115,7 @@ keymancore = declare_dependency(link_with: lib, include_directories: inc, depend pkg = import('pkgconfig') pkg.generate( - name: 'keyman_kmn_processor', + name: 'keyman_core', version: meson.project_version(), description: 'Keyman processor for KMN keyboards.', subdirs: headerdirs, diff --git a/linux/debian/control b/linux/debian/control index 624f89fc0ad..9b5e217aba5 100644 --- a/linux/debian/control +++ b/linux/debian/control @@ -107,12 +107,14 @@ Description: Keyman for Linux configuration This package contains the Python module to install, uninstall and view information about Keyman keyboard packages. -Package: libkmnkbp-dev +Package: libkeymancore-dev Architecture: amd64 arm64 armel armhf i386 mipsel mips64el ppc64el riscv64 Section: libdevel Depends: - libkmnkbp0-0 (= ${binary:Version}), + libkeymancore (= ${binary:Version}), ${misc:Depends}, +Conflicts: libkmnkbp-dev +Replaces: libkmnkbp-dev Multi-Arch: same Description: Development files for Keyman keyboard processing library Originally created in 1993 to type Lao on Windows, Keyman is now a free and @@ -126,12 +128,12 @@ Description: Development files for Keyman keyboard processing library Keyboard layouts are distributed through an open catalog to all major desktop and mobile platforms. . - The Keyman keyboardprocessor library processes input from input method engines + The Keyman core library processes input from input method engines and applies rules from compiled Keyman keyboard files. . This package contains development headers and libraries. -Package: libkmnkbp0-0 +Package: libkeymancore Architecture: amd64 arm64 armel armhf i386 mipsel mips64el ppc64el riscv64 Section: libs Pre-Depends: @@ -141,6 +143,8 @@ Depends: ${shlibs:Depends}, Suggests: keyman, +Conflicts: libkmnkbp0-0 +Replaces: libkmnkbp0-0 Multi-Arch: same Description: Keyman keyboard processing library Originally created in 1993 to type Lao on Windows, Keyman is now a free and @@ -154,14 +158,14 @@ Description: Keyman keyboard processing library Keyboard layouts are distributed through an open catalog to all major desktop and mobile platforms. . - The Keyman keyboardprocessor library processes input from input method engines + The Keyman core library processes input from input method engines and applies rules from compiled Keyman keyboard files. Package: ibus-keyman Architecture: amd64 arm64 armel armhf i386 mipsel mips64el ppc64el riscv64 Depends: ibus (>= 1.3.7), - libkmnkbp0-0 (= ${binary:Version}), + libkeymancore (= ${binary:Version}), keyman-system-service (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}, diff --git a/linux/debian/libkmnkbp-dev.install b/linux/debian/libkeymancore-dev.install similarity index 100% rename from linux/debian/libkmnkbp-dev.install rename to linux/debian/libkeymancore-dev.install diff --git a/linux/debian/libkmnkbp0-0.install b/linux/debian/libkeymancore.install similarity index 100% rename from linux/debian/libkmnkbp0-0.install rename to linux/debian/libkeymancore.install diff --git a/linux/debian/libkeymancore.symbols b/linux/debian/libkeymancore.symbols new file mode 100644 index 00000000000..210008e9104 --- /dev/null +++ b/linux/debian/libkeymancore.symbols @@ -0,0 +1,43 @@ +libkeymancore.so.1 libkeymancore #MINVER# +* Build-Depends-Package: libkeymancore-dev + + km_core_context_append@Base 17.0.195 + km_core_context_clear@Base 17.0.195 + km_core_context_get@Base 17.0.195 + km_core_context_item_list_size@Base 17.0.195 + km_core_context_items_dispose@Base 17.0.195 + km_core_context_items_from_utf16@Base 17.0.195 + km_core_context_items_from_utf8@Base 17.0.195 + km_core_context_items_to_utf16@Base 17.0.195 + km_core_context_items_to_utf8@Base 17.0.195 + km_core_context_length@Base 17.0.195 + km_core_context_set@Base 17.0.195 + km_core_context_shrink@Base 17.0.195 + km_core_event@Base 17.0.195 + km_core_get_engine_attrs@Base 17.0.195 + km_core_keyboard_dispose@Base 17.0.195 + km_core_keyboard_get_attrs@Base 17.0.195 + km_core_keyboard_get_imx_list@Base 17.0.195 + km_core_keyboard_get_key_list@Base 17.0.195 + km_core_keyboard_imx_list_dispose@Base 17.0.195 + km_core_keyboard_key_list_dispose@Base 17.0.195 + km_core_keyboard_load@Base 17.0.195 + km_core_options_list_size@Base 17.0.195 + km_core_process_event@Base 17.0.195 + km_core_process_queued_actions@Base 17.0.195 + km_core_state_action_items@Base 17.0.195 + km_core_state_clone@Base 17.0.195 + km_core_state_context@Base 17.0.195 + km_core_state_create@Base 17.0.195 + km_core_state_debug_get@Base 17.0.195 + km_core_state_debug_items@Base 17.0.195 + km_core_state_debug_set@Base 17.0.195 + km_core_state_dispose@Base 17.0.195 + km_core_state_get_intermediate_context@Base 17.0.195 + km_core_state_imx_deregister_callback@Base 17.0.195 + km_core_state_imx_register_callback@Base 17.0.195 + km_core_state_option_lookup@Base 17.0.195 + km_core_state_options_to_json@Base 17.0.195 + km_core_state_options_update@Base 17.0.195 + km_core_state_queue_action_items@Base 17.0.195 + km_core_state_to_json@Base 17.0.195 diff --git a/linux/debian/libkmnkbp0-0.symbols b/linux/debian/libkmnkbp0-0.symbols deleted file mode 100644 index 31a9bd6237f..00000000000 --- a/linux/debian/libkmnkbp0-0.symbols +++ /dev/null @@ -1,43 +0,0 @@ -libkeymancore.so.1 libkmnkbp0-0 #MINVER# -* Build-Depends-Package: libkmnkbp-dev - - km_core_state_get_intermediate_context@Base 17.0.194 - km_core_context_append@Base 17.0.194 - km_core_context_clear@Base 17.0.194 - km_core_context_get@Base 17.0.194 - km_core_context_item_list_size@Base 17.0.194 - km_core_context_items_dispose@Base 17.0.194 - km_core_context_items_from_utf16@Base 17.0.194 - km_core_context_items_from_utf8@Base 17.0.194 - km_core_context_items_to_utf16@Base 17.0.194 - km_core_context_items_to_utf8@Base 17.0.194 - km_core_context_length@Base 17.0.194 - km_core_context_set@Base 17.0.194 - km_core_context_shrink@Base 17.0.194 - km_core_event@Base 17.0.194 - km_core_get_engine_attrs@Base 17.0.194 - km_core_keyboard_dispose@Base 17.0.194 - km_core_keyboard_get_attrs@Base 17.0.194 - km_core_keyboard_get_imx_list@Base 17.0.194 - km_core_keyboard_get_key_list@Base 17.0.194 - km_core_keyboard_imx_list_dispose@Base 17.0.194 - km_core_keyboard_key_list_dispose@Base 17.0.194 - km_core_keyboard_load@Base 17.0.194 - km_core_options_list_size@Base 17.0.194 - km_core_process_event@Base 17.0.194 - km_core_process_queued_actions@Base 17.0.194 - km_core_state_action_items@Base 17.0.194 - km_core_state_clone@Base 17.0.194 - km_core_state_context@Base 17.0.194 - km_core_state_create@Base 17.0.194 - km_core_state_debug_get@Base 17.0.194 - km_core_state_debug_items@Base 17.0.194 - km_core_state_debug_set@Base 17.0.194 - km_core_state_dispose@Base 17.0.194 - km_core_state_imx_deregister_callback@Base 17.0.194 - km_core_state_imx_register_callback@Base 17.0.194 - km_core_state_option_lookup@Base 17.0.194 - km_core_state_options_to_json@Base 17.0.194 - km_core_state_options_update@Base 17.0.194 - km_core_state_queue_action_items@Base 17.0.194 - km_core_state_to_json@Base 17.0.194 diff --git a/linux/debian/rules b/linux/debian/rules index 1abfbf004ae..6b2e8c75c1a 100755 --- a/linux/debian/rules +++ b/linux/debian/rules @@ -24,7 +24,7 @@ include /usr/share/dpkg/pkg-info.mk dh $@ --with-python3 override_dh_auto_configure: - # keymankeyboardprocessor - we need to configure and build core before + # keyman core - we need to configure and build core before # we can configure ibus-keyman! core/build.sh --no-tests configure:arch build:arch -- \ --wrap-mode=nodownload --prefix=/usr --sysconfdir=/etc \ diff --git a/linux/debian/tests/control b/linux/debian/tests/control index c1164c9c8e0..ca633c65717 100644 --- a/linux/debian/tests/control +++ b/linux/debian/tests/control @@ -1,5 +1,6 @@ Tests: test-build Depends: @, build-essential, + libicu-dev, pkg-config, Architecture: amd64 arm64 armel armhf i386 mips64el mipsel ppc64el riscv64 diff --git a/linux/debian/tests/test-build b/linux/debian/tests/test-build index e9a989e36ff..cdd20dc68e6 100644 --- a/linux/debian/tests/test-build +++ b/linux/debian/tests/test-build @@ -1,5 +1,5 @@ #!/bin/bash -# autopkgtest check: Build a program against libkmnkbp-dev to verify that the +# autopkgtest check: Build a program against libkeymancore-dev to verify that the # headers and pkg-config file are included and installed correctly. # cf https://github.com/keymanapp/keyman/issues/7490 @@ -16,7 +16,7 @@ km_core_context* c; EOF # shellcheck disable=SC2046 -gcc -c keymantest.c $(pkg-config --cflags --libs keyman_kmn_processor) +gcc -c keymantest.c $(pkg-config --cflags --libs keyman_core) echo "build 1: OK" # Test pkg-config file - include without path @@ -26,5 +26,5 @@ km_core_context* c; EOF # shellcheck disable=SC2046 -gcc -c keymantest.c $(pkg-config --cflags --libs keyman_kmn_processor) +gcc -c keymantest.c $(pkg-config --cflags --libs keyman_core) echo "build 2: OK" diff --git a/linux/scripts/deb-packaging.sh b/linux/scripts/deb-packaging.sh index 991a857a7c0..3a669ab9af2 100755 --- a/linux/scripts/deb-packaging.sh +++ b/linux/scripts/deb-packaging.sh @@ -57,16 +57,12 @@ fi if builder_start_action verify; then tar xf "${SRC_PKG}" - if [ ! -f debian/libkmnkbp0-0.symbols ] && [ ! -f debian/libkeymancore.symbols ]; then - echo ":warning: Missing libkmnkbp0-0.symbols/libkeymancore.symbols file" >&2 + if [ ! -f debian/libkeymancore.symbols ]; then + echo ":warning: Missing libkeymancore.symbols file" >&2 else - if [ -f debian/libkeymancore.symbols ]; then - PKG_NAME=libkeymancore - LIB_NAME=libkeymancore - else - PKG_NAME=libkmnkbp0-0 - LIB_NAME=libkmnkbp0 - fi + PKG_NAME=libkeymancore + LIB_NAME=libkeymancore + tmpDir=$(mktemp -d) dpkg -x "${BIN_PKG}" "$tmpDir" cd debian