From b0cc243e1d074b54008757aa8aa143654d9d6de5 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 7 May 2026 16:48:33 +0200 Subject: [PATCH] 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 --- docs/linux/packaging.md | 1 - linux/scripts/debian.sh | 20 +++++-------- linux/scripts/dist.sh | 5 +--- linux/scripts/launchpad.sh | 48 ++++++++++++++---------------- linux/scripts/package-build.inc.sh | 27 +++++++---------- 5 files changed, 42 insertions(+), 59 deletions(-) diff --git a/docs/linux/packaging.md b/docs/linux/packaging.md index 0b493cc1d6..77dc2d7239 100644 --- a/docs/linux/packaging.md +++ b/docs/linux/packaging.md @@ -191,7 +191,6 @@ To upload the packages to launchpad, run the following script from the `linux/` - `--upload` - Upload to launchpad. If omitted only simulate the upload. - `--no-upload` - Don't upload to launchpad, don't even simulate it. - `--no-lintian` - Don't run lintian while creating soure package. -- `--project ""` - only upload this package - `--dist ""` - only upload for this distribution - `--packageversion ""` - Default `1~sil1`. Normally use the default so don't specify it. But if you change packaging and run another diff --git a/linux/scripts/debian.sh b/linux/scripts/debian.sh index d1fa9c107d..bf08d1caae 100755 --- a/linux/scripts/debian.sh +++ b/linux/scripts/debian.sh @@ -15,7 +15,6 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" builder_describe \ "Build source packages suitable to import into the Debian package repos" \ build \ - "--project=PROJECT Only process this project. Default: keyman" \ "--dist=DIST Distribution to create packages for (unstable, experimental, etc). Default: UNRELEASED." \ "--debrevision=DEBREVISION The debian revision number. Default: 1." @@ -28,15 +27,12 @@ checkPrerequisites rm -rf debianpackage mkdir -p debianpackage -for proj in ${projects}; do - downloadSource debianpackage +downloadSource debianpackage - cd "${proj}-${version}" - if [[ -n "${DIST:-}" ]]; then - EXTRA_ARGS="--distribution ${DIST} --force-distribution" - fi - # shellcheck disable=SC2086 - dch --newversion "${version}-${DEBREVISION:-1}" ${EXTRA_ARGS:-} "" - debuild -d -S -sa -Zxz - cd "${KEYMAN_ROOT}/linux" -done +cd "keyman-${version}" +if [[ -n "${DIST:-}" ]]; then + EXTRA_ARGS="--distribution ${DIST} --force-distribution" +fi +# shellcheck disable=SC2086 +dch --newversion "${version}-${DEBREVISION:-1}" ${EXTRA_ARGS:-} "" +debuild -d -S -sa -Zxz diff --git a/linux/scripts/dist.sh b/linux/scripts/dist.sh index e4a1b125fd..acbc683e60 100755 --- a/linux/scripts/dist.sh +++ b/linux/scripts/dist.sh @@ -3,11 +3,8 @@ # Build dist tarballs or Debian orig tarballs # and put them in dist/ -# parameters: ./dist.sh [origdist] [proj] +# parameters: ./dist.sh [origdist] # origdist = create Debian orig.tar.xz -# proj = only make tarball for this project - -set -e ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary diff --git a/linux/scripts/launchpad.sh b/linux/scripts/launchpad.sh index b2c2f650a4..e98848f74b 100755 --- a/linux/scripts/launchpad.sh +++ b/linux/scripts/launchpad.sh @@ -18,7 +18,6 @@ builder_describe \ "--upload Upload to launchpad. If omitted only simulate the upload." \ "--no-upload Don't upload to launchpad, don't even simulate it." \ "--no-lintian Don't run lintian while creating soure package." \ - "--project=PROJECT Only upload this project. Default: keyman" \ "--dist=DIST Only upload this distribution. Default: upload all supported dists." \ "--packageversion=PACKAGEVERSION String to append to the package version. Default: '1~sil1'." \ "--outputdir=OUTPUTDIR Directory for resulting artifacts. Default: \$KEYMAN_ROOT/linux/launchpad." @@ -62,30 +61,27 @@ if ! builder_has_option --no-download; then mkdir -p launchpad fi -for proj in ${projects:-}; do - if ! builder_has_option --no-download; then - downloadSource launchpad - else - version=$(cat "${KEYMAN_ROOT}/VERSION.md") - cd "${OUTPUTDIR}" - fi +if ! builder_has_option --no-download; then + downloadSource launchpad +else + version=$(cat "${KEYMAN_ROOT}/VERSION.md") + cd "${OUTPUTDIR}" +fi - cd "${proj}-${version:-}" - pwd - cp debian/changelog "../${proj}-changelog" - for dist in ${distributions}; do - cp "../${proj}-changelog" debian/changelog - dch -v "${version}-${packageversion}~${dist}" "source package for PPA" - dch -D "${dist}" -r "" - # shellcheck disable=SC2248 # no quotes for $LINTIAN_OPTS - might be empty string - debuild ${LINTIAN_OPTS} -d -S -sa -Zxz - done - if ! builder_has_option --no-upload; then - cd .. - for dist in ${distributions}; do - # shellcheck disable=SC2248 # no quotes for $SIM - it might not be set - dput ${SIM:-} "${ppa}" "${proj}_${version}-${packageversion}~${dist}_source.changes" - done - fi - cd "${KEYMAN_ROOT}/linux" +cd "keyman-${version:-}" +pwd +cp debian/changelog "../keyman-changelog" +for dist in ${distributions}; do + cp "../keyman-changelog" debian/changelog + dch -v "${version}-${packageversion}~${dist}" "source package for PPA" + dch -D "${dist}" -r "" + # shellcheck disable=SC2248 # no quotes for $LINTIAN_OPTS - might be empty string + debuild ${LINTIAN_OPTS} -d -S -sa -Zxz done +if ! builder_has_option --no-upload; then + cd .. + for dist in ${distributions}; do + # shellcheck disable=SC2248 # no quotes for $SIM - it might not be set + dput ${SIM:-} "${ppa}" "keyman_${version}-${packageversion}~${dist}_source.changes" + done +fi diff --git a/linux/scripts/package-build.inc.sh b/linux/scripts/package-build.inc.sh index fdc738cdf0..66eedaf6e4 100644 --- a/linux/scripts/package-build.inc.sh +++ b/linux/scripts/package-build.inc.sh @@ -12,37 +12,32 @@ function checkPrerequisites() { echo "you must install xmllint (libxml2-utils package) to use this script" exit 1 fi - - # shellcheck disable=SC2034 - projects="${PROJECT:=keyman}" } function downloadSource() { local packageDir packageDir=$1 - if [[ "${proj:=}" == "keyman" ]]; then - # shellcheck disable=SC2154 - cd "${KEYMAN_ROOT}/linux" || exit - ./build.sh clean - fi + # shellcheck disable=SC2154 + cd "${KEYMAN_ROOT}/linux" || exit + ./build.sh clean # Update tier in Debian watch files (replacing any previously set tier) and remove comment sed -e "s/\$tier\|alpha\|beta\|stable/${KEYMAN_TIER}/g" -e "s/^# .*$//" "${KEYMAN_ROOT}/linux/scripts/watch.in" > debian/watch version=$(uscan --report --dehs|xmllint --xpath "//dehs/upstream-version/text()" -) dirversion=$(uscan --report --dehs|xmllint --xpath "//dehs/upstream-url/text()" - | cut -d/ -f6) - echo "${proj} version is ${version}" - uscan || (echo "ERROR: No new version available for ${proj}" >&2 && exit 1) + echo "Keyman version is ${version}" + uscan || (echo "ERROR: No new version available for keyman" >&2 && exit 1) cd .. - mv "${proj}-${version}" "${KEYMAN_ROOT}/linux/${packageDir}" - mv "${proj}_${version}.orig.tar.xz" "${KEYMAN_ROOT}/linux/${packageDir}" - mv "${proj}-${version}.tar.xz" "${KEYMAN_ROOT}/linux/${packageDir}" - mv "${proj}"*.asc "${KEYMAN_ROOT}/linux/${packageDir}" - rm "${proj}"*.debian.tar.xz + mv "keyman-${version}" "${KEYMAN_ROOT}/linux/${packageDir}" + mv "keyman_${version}.orig.tar.xz" "${KEYMAN_ROOT}/linux/${packageDir}" + mv "keyman-${version}.tar.xz" "${KEYMAN_ROOT}/linux/${packageDir}" + mv "keyman"*.asc "${KEYMAN_ROOT}/linux/${packageDir}" + rm "keyman"*.debian.tar.xz cd "${KEYMAN_ROOT}/linux/${packageDir}" || exit wget -N "https://downloads.keyman.com/linux/${KEYMAN_TIER}/${dirversion}/SHA256SUMS" - sha256sum -c --ignore-missing SHA256SUMS | grep "${proj}" + sha256sum -c --ignore-missing SHA256SUMS | grep "keyman" } function wait_for_apt_deb {