]> piware.de Git - bin.git/commitdiff
Add debian-backport-cockpit
authorMartin Pitt <martin@piware.de>
Tue, 26 Sep 2017 06:01:02 +0000 (08:01 +0200)
committerMartin Pitt <martin@piware.de>
Tue, 26 Sep 2017 06:01:02 +0000 (08:01 +0200)
debian-backport-cockpit [new file with mode: 0755]

diff --git a/debian-backport-cockpit b/debian-backport-cockpit
new file mode 100755 (executable)
index 0000000..b3d3440
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+set -eu
+
+series_ver() {
+    ver=$(wget -q -O- http://ftp.debian.org/debian/dists/${1}/main/source/Sources.xz | xz -d | grep-dctrl -n -sVersion -P cockpit | sort -u | tail -n1)
+}
+
+upload() {
+    debuild -S -sd -nc -v$ver
+    cat ../cockpit_*_source.changes
+
+    read -p "Upload? [y/N] " answer
+    if [ "$answer" = y ]; then
+        dput ../cockpit_*_source.changes
+    fi
+
+    cd ..
+    rm *bpo*
+    rm -r cockpit-*
+}
+
+mkdir /tmp/backport
+cd  /tmp/backport
+apt-get source cockpit
+cd cockpit-*
+
+# stretch
+series_ver stretch-backports
+dch --local ~bpo9+ --distribution stretch-backports --force-distribution "No-change backport to Debian Stretch"
+upload
+
+# jessie
+dpkg-source -x *.dsc
+cd cockpit-*
+series_ver jessie-backports-sloppy
+dch --local ~bpo8+ --distribution jessie-backports-sloppy --force-distribution "No-change backport to Debian Jessie"
+upload