diff --git a/scripts/adcli.sh b/scripts/adcli.sh index afb06455e41ce1d44ccdbf71a1f369786dbd0635..78f9fdca3677eaa0be29a3ce145d3b506c85ae55 100755 --- a/scripts/adcli.sh +++ b/scripts/adcli.sh @@ -2,11 +2,9 @@ source "${BASH_SOURCE%/*}/common.sh" -VERSION=$(get_sources adcli stretch) +get_sources adcli stretch import_patches adcli - -dch_custom $VERSION "Apply the unreleased upstream-patches, fixing RT#100" - +dch_custom "Apply the unreleased upstream-patches, fixing RT#100" install_build_deps build test_install diff --git a/scripts/common.sh b/scripts/common.sh index 47cdd158bd14c903da60590b6e42cb6c29feefb7..e8cf1b110ba7d391c1cef3c934b086bfcac3ed77 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -2,25 +2,18 @@ # $1: source package name # $2: distribution -# ->: version number retrieved function get_sources() { - local version apt-get source --only-source -t $2 $1 - version=$(rmadison $1 --architecture=all,amd64 -s $2 | head -n1 | cut -d\| -f2 | sed s"/ //g" | sed s"/\-.*$//g") + local version=$(rmadison $1 --architecture=all,amd64 -s $2 | head -n1 | cut -d\| -f2 | sed s"/ //g" | sed s"/\-.*$//g") cd $1-$version - return $version } # $1: source package name # $2: git repository -# ->: version number retrieved function get_git_sources() { - local version git clone $2 $1 cd $1 git tag --sort "version:refname" -l | tail -n1 | xargs git checkout - version=$(git tag --sort "version:refname" -l | tail -n1 | sed s/v//) - return $version } # $1: patch directory name @@ -40,11 +33,9 @@ function apply_patches_manually() { done } -# $1: official version number -# $2: changelog entry +# $1: changelog entry function dch_custom() { - # TODO consider using local suffixes like backports - debchange --preserve --newversion $1-fsmpi $2 + debchange --local ~fsmpi+ $1 } function dch_backport() { diff --git a/scripts/ganeti.sh b/scripts/ganeti.sh index 1bce22880d1e411a590e732bf9a638b1a5da180e..a1684b34d23b1ff85b9b0767eb06c15e7593869f 100755 --- a/scripts/ganeti.sh +++ b/scripts/ganeti.sh @@ -2,13 +2,13 @@ source "${BASH_SOURCE%/*}/common.sh" -VERSION=$(get_sources ganeti stretch) +get_sources ganeti stretch import_patches ganeti -dch_custom $VERSION "Fix broken ceph support in bdev.py, see GitHub #1233." -dch_custom $VERSION "Remove blockdev storage from the movable and mirrored devices lists." -dch_custom $VERSION "Increase maximum disk count per instance." -dch_custom $VERSION "Add support for disk cache usage with rbd devices." +dch_custom "Fix broken ceph support in bdev.py, see GitHub #1233." +dch_custom "Remove blockdev storage from the movable and mirrored devices lists." +dch_custom "Increase maximum disk count per instance." +dch_custom "Add support for disk cache usage with rbd devices." install_build_deps build diff --git a/scripts/grml-zsh-config.sh b/scripts/grml-zsh-config.sh index bf99b855d2b0082d07c4be7f594b89819416fddc..4a1c0734eb2d87f25af394dd8bec555b30ed884b 100755 --- a/scripts/grml-zsh-config.sh +++ b/scripts/grml-zsh-config.sh @@ -2,12 +2,11 @@ source "${BASH_SOURCE%/*}/common.sh" -VERSION=$(get_git_sources grml-zsh-config https://github.com/grml/grml-etc-core ) +get_git_sources grml-zsh-config https://github.com/grml/grml-etc-core apply_patches_manually grml-zsh-config sed -i s/grml-etc-core/grml-zsh-config/g debian/changelog -dch_custom $VERSION "Remove unneeded grml-configs" - +dch_custom "Remove unneeded grml-configs" install_build_deps build test_install diff --git a/scripts/nginx-shib.sh b/scripts/nginx-shib.sh index f4d7c7237ab19c2c1d9f58e0fb8d55d12f4cf7ba..f97572d25bd20d87a1f26f1db54895d61d2f34b1 100755 --- a/scripts/nginx-shib.sh +++ b/scripts/nginx-shib.sh @@ -2,8 +2,7 @@ source "${BASH_SOURCE%/*}/common.sh" -VERSION=$(get_sources nginx stretch) - +get_sources nginx stretch cd debian cp libnginx-mod.nginx.skeleton libnginx-mod-http-shibboleth.nginx cd modules @@ -11,8 +10,7 @@ git clone "https://github.com/nginx-shib/nginx-http-shibboleth.git" cd ../.. patch -d . -p0 < ../patches/nginx/00-add-module.patch -dch_custom $VERSION "Add libnginx-mod-http-shibboleth" - +dch_custom "Add libnginx-mod-http-shibboleth" install_build_deps build test_install diff --git a/scripts/painintheapt.sh b/scripts/painintheapt.sh index b09240c21ce0567dfca0977634552f0e22a9ba87..d6ab884a13da0d3716847578f10bdd2d0d8af090 100755 --- a/scripts/painintheapt.sh +++ b/scripts/painintheapt.sh @@ -5,7 +5,7 @@ source "${BASH_SOURCE%/*}/common.sh" echo "deb-src http://ftp.halifax.rwth-aachen.de/debian/ buster main" > /etc/apt/sources.list.d/buster_src.list apt-get update -VERSION=$(get_sources painintheapt buster) +get_sources painintheapt buster import_patches painintheapt sed -i '/python3-sleekxmpp/d' debian/control @@ -13,8 +13,8 @@ sed -i 's/Build-Depends: debhelper (>= 11),/Build-Depends: debhelper (>= 10),/g' echo "10" > debian/compat dch_backport -dch_custom $VERSION "Add HTTP-JSON support." -dch_custom $VERSION "Remove XMPP support." +dch_custom "Add HTTP-JSON support." +dch_custom "Remove XMPP support." install_build_deps build