]> piware.de Git - bin.git/blobdiff - ubuntu-backport-cockpit
ubuntu-backport-cockpit: Adjust for Ubuntu 22.04
[bin.git] / ubuntu-backport-cockpit
index 6346ed5234f6e0154975b0b01532d49b1b9d3bfe..8d46bf8664754d18d44c5a58a30edebc7813ed1e 100755 (executable)
@@ -1,12 +1,15 @@
 #!/bin/sh
 set -eu
 PACKAGE=${1:-cockpit}
-TARGET=${2:-impish}
+TARGET=${2:-jammy}
 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*}
+    if [ -z "$ver" ]; then
+        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)
+    fi
 }
 
 upload() {
@@ -28,13 +31,13 @@ apt-get source $PACKAGE
 cd ${PACKAGE}-*
 
 case "$TARGET" in
+    jammy) VER=22.04 ;;
     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