X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=blobdiff_plain;f=debian-backport-cockpit;h=109f8482f02014a7e605632247899ae836362d09;hp=4dd0fa3b57cbc84023a075c9ab4ac635459473ea;hb=7967276a9bf38337192ca1a342f707f7ad0d9167;hpb=2dbe84469b2132f84ddfb891c8e13ef63751e429 diff --git a/debian-backport-cockpit b/debian-backport-cockpit index 4dd0fa3..109f848 100755 --- a/debian-backport-cockpit +++ b/debian-backport-cockpit @@ -1,39 +1,33 @@ #!/bin/sh set -eu +PACKAGE=${1:-cockpit} 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) + ver=$(wget -q -O- http://ftp.debian.org/debian/dists/${1}/main/source/Sources.xz | xz -d | grep-dctrl -n -sVersion -XP $PACKAGE | sort -u | tail -n1) ver=${ver%~bpo*} } upload() { - cat ../cockpit_*_source.changes + cat ../${PACKAGE}*_source.changes read -p "Upload? [y/N] " answer if [ "$answer" = y ]; then - dput ../cockpit_*_source.changes + dput ../${PACKAGE}_*_source.changes fi cd .. rm *bpo* - rm -r cockpit-* + rm -r ${PACKAGE}-* } mkdir /tmp/backport cd /tmp/backport -apt-get source cockpit -cd cockpit-* +apt-get source $PACKAGE +cd ${PACKAGE}-* -# stretch -series_ver stretch-backports -dch --local ~bpo9+ --distribution stretch-backports --force-distribution "No-change backport to Debian Stretch" -debuild -S -sd -nc -v$ver +# bullseye +series_ver bullseye-backports +[ ! -x debian/adjust-for-release ] || debian/adjust-for-release bullseye +dch --local ~bpo11+ --distribution bullseye-backports --force-distribution "No-change backport to Debian Bullseye" +dpkg-buildpackage -S -sd -nc -v$ver 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" -debuild -S -sd -nc -v$ver -echo "build this in a jessie schroot and upload"