From: Martin Pitt Date: Sun, 9 Jan 2022 10:46:03 +0000 (+0100) Subject: Add ubuntu-backport-cockpit X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=ec9389d0f686ff74098f113fe8f2e3898e34a45e;p=bin.git Add ubuntu-backport-cockpit backportpackage has an outdated version format. --- diff --git a/ubuntu-backport-cockpit b/ubuntu-backport-cockpit new file mode 100755 index 0000000..6346ed5 --- /dev/null +++ b/ubuntu-backport-cockpit @@ -0,0 +1,40 @@ +#!/bin/sh +set -eu +PACKAGE=${1:-cockpit} +TARGET=${2:-impish} +POCKET="${TARGET}-backports" + +series_ver() { + ver=$(wget -q -O- http://de.archive.ubuntu.com/ubuntu/dists/$1/universe/source/Sources.xz | xz -d | grep-dctrl -n -sVersion -XP $PACKAGE | sort -u | tail -n1) + ver=${ver%~bpo*} +} + +upload() { + cat ../${PACKAGE}*_source.changes + + read -p "Upload? [y/N] " answer + if [ "$answer" = y ]; then + dput ubuntu ../${PACKAGE}_*_source.changes + fi + + cd .. + rm *bpo* + rm -r ${PACKAGE}-* +} + +mkdir /tmp/backport +cd /tmp/backport +apt-get source $PACKAGE +cd ${PACKAGE}-* + +case "$TARGET" in + impish) VER=21.10 ;; + focal) VER=20.04 ;; + *) echo "Unknown target $TARGET" >&2; exit 1 ;; +esac + +series_ver "$POCKET" +[ ! -x debian/adjust-for-release ] || debian/adjust-for-release $TARGET +dch --local ~bpo${VER}. --distribution $POCKET --force-distribution "No-change backport to $TARGET" +dpkg-buildpackage -S -sd -nc -v$ver +upload