Commit ddd28628 authored by Lars Beckers's avatar Lars Beckers

fix version handling for custom builds

parent 741d5e77
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
source "${BASH_SOURCE%/*}/common.sh" source "${BASH_SOURCE%/*}/common.sh"
VERSION=$(get_sources adcli stretch) get_sources adcli stretch
import_patches adcli import_patches adcli
dch_custom "Apply the unreleased upstream-patches, fixing RT#100"
dch_custom $VERSION "Apply the unreleased upstream-patches, fixing RT#100"
install_build_deps install_build_deps
build build
test_install test_install
......
...@@ -2,25 +2,18 @@ ...@@ -2,25 +2,18 @@
# $1: source package name # $1: source package name
# $2: distribution # $2: distribution
# ->: version number retrieved
function get_sources() { function get_sources() {
local version
apt-get source --only-source -t $2 $1 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 cd $1-$version
return $version
} }
# $1: source package name # $1: source package name
# $2: git repository # $2: git repository
# ->: version number retrieved
function get_git_sources() { function get_git_sources() {
local version
git clone $2 $1 git clone $2 $1
cd $1 cd $1
git tag --sort "version:refname" -l | tail -n1 | xargs git checkout 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 # $1: patch directory name
...@@ -40,11 +33,9 @@ function apply_patches_manually() { ...@@ -40,11 +33,9 @@ function apply_patches_manually() {
done done
} }
# $1: official version number # $1: changelog entry
# $2: changelog entry
function dch_custom() { function dch_custom() {
# TODO consider using local suffixes like backports debchange --local ~fsmpi+ $1
debchange --preserve --newversion $1-fsmpi $2
} }
function dch_backport() { function dch_backport() {
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
source "${BASH_SOURCE%/*}/common.sh" source "${BASH_SOURCE%/*}/common.sh"
VERSION=$(get_sources ganeti stretch) get_sources ganeti stretch
import_patches ganeti import_patches ganeti
dch_custom $VERSION "Fix broken ceph support in bdev.py, see GitHub #1233." dch_custom "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 "Remove blockdev storage from the movable and mirrored devices lists."
dch_custom $VERSION "Increase maximum disk count per instance." dch_custom "Increase maximum disk count per instance."
dch_custom $VERSION "Add support for disk cache usage with rbd devices." dch_custom "Add support for disk cache usage with rbd devices."
install_build_deps install_build_deps
build build
......
...@@ -2,12 +2,11 @@ ...@@ -2,12 +2,11 @@
source "${BASH_SOURCE%/*}/common.sh" 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 apply_patches_manually grml-zsh-config
sed -i s/grml-etc-core/grml-zsh-config/g debian/changelog 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 install_build_deps
build build
test_install test_install
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
source "${BASH_SOURCE%/*}/common.sh" source "${BASH_SOURCE%/*}/common.sh"
VERSION=$(get_sources nginx stretch) get_sources nginx stretch
cd debian cd debian
cp libnginx-mod.nginx.skeleton libnginx-mod-http-shibboleth.nginx cp libnginx-mod.nginx.skeleton libnginx-mod-http-shibboleth.nginx
cd modules cd modules
...@@ -11,8 +10,7 @@ git clone "https://github.com/nginx-shib/nginx-http-shibboleth.git" ...@@ -11,8 +10,7 @@ git clone "https://github.com/nginx-shib/nginx-http-shibboleth.git"
cd ../.. cd ../..
patch -d . -p0 < ../patches/nginx/00-add-module.patch 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 install_build_deps
build build
test_install test_install
......
...@@ -5,7 +5,7 @@ source "${BASH_SOURCE%/*}/common.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 echo "deb-src http://ftp.halifax.rwth-aachen.de/debian/ buster main" > /etc/apt/sources.list.d/buster_src.list
apt-get update apt-get update
VERSION=$(get_sources painintheapt buster) get_sources painintheapt buster
import_patches painintheapt import_patches painintheapt
sed -i '/python3-sleekxmpp/d' debian/control sed -i '/python3-sleekxmpp/d' debian/control
...@@ -13,8 +13,8 @@ sed -i 's/Build-Depends: debhelper (>= 11),/Build-Depends: debhelper (>= 10),/g' ...@@ -13,8 +13,8 @@ sed -i 's/Build-Depends: debhelper (>= 11),/Build-Depends: debhelper (>= 10),/g'
echo "10" > debian/compat echo "10" > debian/compat
dch_backport dch_backport
dch_custom $VERSION "Add HTTP-JSON support." dch_custom "Add HTTP-JSON support."
dch_custom $VERSION "Remove XMPP support." dch_custom "Remove XMPP support."
install_build_deps install_build_deps
build build
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment