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
This commit is contained in:
Eberhard Beilharz 2026-05-07 16:48:33 +02:00
parent c825fb25f8
commit b0cc243e1d
No known key found for this signature in database
GPG key ID: E9140597606020D3
5 changed files with 42 additions and 59 deletions

View file

@ -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 "<project>"` - only upload this package
- `--dist "<dist>"` - only upload for this distribution
- `--packageversion "<version>"` - Default `1~sil1`. Normally use the
default so don't specify it. But if you change packaging and run another

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 {