This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from 367b47d bin/build-deb-package: use numerical Debian version in package version string. new 9384d4a bin/debian-codename-to-version.sh: rewrite comment. new 8f5ce9d bin/: new script ubuntu-codename-to-version.sh to map Ubuntu code names to numerical versions. new 0013695 bin/build-deb-package: hook into Ubuntu code name to numerical version conversion. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: bin/build-deb-package | 15 +++++++- bin/debian-codename-to-version.sh | 9 ++--- bin/ubuntu-codename-to-version.sh | 72 +++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 5 deletions(-) create mode 100755 bin/ubuntu-codename-to-version.sh -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 9384d4a5e48ec80e84619cceb8a24a65b5461715 Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Jul 1 04:58:47 2016 +0200 bin/debian-codename-to-version.sh: rewrite comment. It was partially tailored to the script and partially merely copied from a function that had nothing to do with how the script behaves. --- bin/debian-codename-to-version.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/debian-codename-to-version.sh b/bin/debian-codename-to-version.sh index 327a32f..8bd0384 100755 --- a/bin/debian-codename-to-version.sh +++ b/bin/debian-codename-to-version.sh @@ -22,11 +22,12 @@ export PATH="${HOME}/bin:${PATH}" # ${CDPATH} could lead to some very nasty problems. Better unset it. unset CDPATH -# Takes a pseudo-boolean string representation and converts it into -# either 0 or 1. -# The result is printed as a string without a trailing newline. +# Takes a Debian code name and converts it into the +# corresponding numerical version (based on year and month +# of the release.) +# The result is printed as a string with a trailing newline. # The return code is either 0, iff mapping was successful, -# or 1 if the codename is unknown and mapping failed. +# or 1 if the code name is unknown and mapping failed. typeset -l codename codename="${1:?"No code name provided."}" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 8f5ce9d0096d1f6ae5a62d155bbf792cad94f7ef Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Jul 1 04:59:55 2016 +0200 bin/: new script ubuntu-codename-to-version.sh to map Ubuntu code names to numerical versions. --- bin/ubuntu-codename-to-version.sh | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/bin/ubuntu-codename-to-version.sh b/bin/ubuntu-codename-to-version.sh new file mode 100755 index 0000000..943e130 --- /dev/null +++ b/bin/ubuntu-codename-to-version.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +# Copyright (C) 2016 by Mihai Moldovan <ionic@ionic.de> +# +# This programme is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This programme is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +export PATH="${HOME}/bin:${PATH}" + +# ${CDPATH} could lead to some very nasty problems. Better unset it. +unset CDPATH + +# Takes a Debian code name and converts it into the +# corresponding numerical version. +# The result is printed as a string with a trailing newline. +# The return code is either 0, iff mapping was successful, +# or 1 if the code name is unknown and mapping failed. + +typeset -l codename +codename="${1:?"No code name provided."}" + +typeset -l -i ret="0" + +case "${codename}" in + # The first version number is actually "fake", + # but given it's a rolling release, + # we can't really do better here. + ("devel") echo "9999";; + + ("yakkety") echo "16.10";; + + ("xenial") echo "16.04";; + ("wily") echo "15.10";; + ("vivid") echo "15.04";; + ("utopic") echo "14.10";; + ("trusty") echo "14.04";; + ("saucy") echo "13.10";; + ("raring") echo "13.04";; + ("precise") echo "12.04";; + ("quantal") echo "12.10";; + ("oneiric") echo "11.10";; + ("natty") echo "11.04";; + ("maverick") echo "10.10";; + ("lucid") echo "10.04";; + ("karmic") echo "9.10";; + ("jaunty") echo "9.04";; + ("intrepid") echo "8.10";; + ("hardy") echo "8.04";; + ("gutsy") echo "7.10";; + ("feisty") echo "7.04";; + ("edgy") echo "6.10";; + ("dapper") echo "6.06";; + ("breezy") echo "5.10";; + ("hoary") echo "5.04";; + ("warty") echo "4.10";; + + (*) ret="1";; +esac + +return "${ret}" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 00136951974b9f633c62e885da3b0539b4f27c23 Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Jul 1 05:16:39 2016 +0200 bin/build-deb-package: hook into Ubuntu code name to numerical version conversion. --- bin/build-deb-package | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/build-deb-package b/bin/build-deb-package index 09de607..d6070d8 100755 --- a/bin/build-deb-package +++ b/bin/build-deb-package @@ -263,7 +263,6 @@ build_packages() { # for Ubuntu version is the codename of the distribution release typeset -l codename="${l_CODENAME}" - typeset -l numerical_version="$("${script_path}/debian-codename-to-version.sh" "${codename}")" # translate the version name for Debian releases [ "x${l_CODENAME}" = "xsid" ] && codename="unstable" @@ -271,6 +270,20 @@ build_packages() { #[ "x$l_CODENAME" = "xwheezy" ] && codename=stable #[ "x$l_CODENAME" = "xoldstable" ] && codename=oldstable + typeset -l numerical_version="" + # First, try to map to a Debian version. + numerical_version="$("${script_path}/debian-codename-to-version.sh" "${codename}")" + + if [ "${?}" -ne "0" ]; then + # This failed, so try to map to an Ubuntu version. If that fails, we error out. + numerical_version="$("${script_path}/ubuntu-codename-to-version.sh" "${codename}")" + + if [ "${?}" -ne "0" ]; then + echo "Error: unable to map code name \"${codename}\" to Debian or Ubuntu numerical versions. Unknown code name? Aborting." >&2 + exit 1 + fi + fi + # modify the section for non-main package builds [ "x${COMPONENT}" != "xmain" ] && { mv -- "debian/control" "debian/control.tmp" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git