[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Thu Aug 6 01:50:03 UTC 2015


The branch, master has been updated
       via  54cbecb script/librelease.sh: this is replaced by script/release.sh now
       via  71128e0 script/release.sh: This is a new script to do releases
       via  9d9a767 wafsamba: don't add -DSTATIC_%s_MODULES* arguments for SAMBA_LIBRARY(pyembed=True)
      from  711a420 selftest: Add test for GSSAPI with no authenticator checksum mode

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 54cbecbe306eff1c36db5c98fdd106aeccdf096e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Aug 5 15:41:29 2015 +0200

    script/librelease.sh: this is replaced by script/release.sh now
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Thu Aug  6 03:49:40 CEST 2015 on sn-devel-104

commit 71128e0a3ceaec43824bc72e0c64d5ce415869a2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Aug 4 11:33:26 2015 +0200

    script/release.sh: This is a new script to do releases
    
    This will replace script/librelease.sh and is more flexible
    and powerful.
    
      Usage: release.sh <PRODUCT> <COMMAND>
    
      PRODUCT: ldb, talloc, tevent, tdb, samba-rc
      COMMAND: fullrelease, create, push, upload, announce
    
    GNUPGHOME=/path/to/private/gpg script/librelease.sh tdb
    becomes
    GNUPGHOME=/path/to/private/gpg script/release.sh tdb fullrelease
    
    GNUPGHOME=/path/to/private/gpg script/librelease.sh samba
    becomes
    GNUPGHOME=/path/to/private/gpg script/release.sh samba-rc create
    or later
    GNUPGHOME=/path/to/private/gpg script/release.sh samba-stable create
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 9d9a767ef24a684ffe6e95bb95ecb80b8fbe11a9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Aug 3 11:39:01 2015 +0200

    wafsamba: don't add -DSTATIC_%s_MODULES* arguments for SAMBA_LIBRARY(pyembed=True)
    
    Python helper libraries don't have any modules and having something like
    '.cpython-34m' in the name, e.g. STATIC_pytalloc-util.cpython-34m_MODULES
    breaks the build.
    
    Another way to fix this would be removing PYTHON_SO_ABI_FLAG from the name.
    
    This allows --extra-python=/usr/bin/python3 to work on Ubuntu 14.04.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafsamba/samba_deps.py |   3 +
 script/librelease.sh              | 110 -------
 script/release.sh                 | 615 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 618 insertions(+), 110 deletions(-)
 delete mode 100755 script/librelease.sh
 create mode 100755 script/release.sh


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index d252dc4..beb366b 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -214,6 +214,9 @@ def add_init_functions(self):
     if m is not None:
         modules.append(m)
 
+    if 'pyembed' in self.features:
+        return
+
     sentinel = getattr(self, 'init_function_sentinel', 'NULL')
 
     targets    = LOCAL_CACHE(bld, 'TARGET_TYPE')
diff --git a/script/librelease.sh b/script/librelease.sh
deleted file mode 100755
index e705cea..0000000
--- a/script/librelease.sh
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/bin/bash
-# make a release of a Samba library
-
-if [ ! -d ".git" ]; then
-	echo "Run this script from the top-level directory in the"
-	echo "repository"
-	exit 1
-fi
-
-if [ $# -lt 1 ]; then
-    echo "Usage: librelease.sh <LIBNAMES>"
-    exit 1
-fi
-
-umask 0022
-
-release_lib() {
-    lib="$1"
-    srcdir="$2"
-    ftpdir="$3"
-
-    pushd $srcdir
-
-    echo "Releasing library $lib"
-
-    echo "building release tarball"
-    tgzname=$(make dist 2>&1 | grep ^Created | cut -d' ' -f2)
-    [ -f "$tgzname" ] || {
-	echo "Failed to create tarball"
-	exit 1
-    }
-    tarname=$(basename $tgzname .gz)
-    echo "Tarball: $tarname"
-    gunzip -f $tgzname || exit 1
-    [ -f "$tarname" ] || {
-	echo "Failed to decompress tarball $tarname"
-	exit 1
-    }
-
-    tagname=$(basename $tarname .tar)
-    echo "tagging as $tagname"
-    git tag -u $GPG_KEYID -s "$tagname" -m "$lib: tag release $tagname" || {
-	exit 1
-    }
-
-    echo "signing"
-    rm -f "$tarname.asc"
-    gpg -u "$GPG_USER" --detach-sign --armor $tarname || {
-	exit 1
-    }
-    [ -f "$tarname.asc" ] || {
-	echo "Failed to create signature $tarname.asc"
-	exit 1
-    }
-    echo "compressing"
-    gzip -f -9 $tarname
-    [ -f "$tgzname" ] || {
-	echo "Failed to compress $tgzname"
-	exit 1
-    }
-
-    [ -z "$ftpdir" ] && {
-        popd
-        return 0
-    }
-
-    echo "Push git tag $tagname"
-    git push ssh://git.samba.org/data/git/samba.git refs/tags/$tagname:refs/tags/$tagname || {
-	exit 1
-    }
-
-    echo "Transferring for FTP"
-    rsync -Pav $tarname.asc $tgzname download-master.samba.org:~ftp/pub/$ftpdir/ || {
-	exit 1
-    }
-    rsync download-master.samba.org:~ftp/pub/$ftpdir/$tarname.*
-
-    popd
-}
-
-for lib in $*; do
-    case $lib in
-	talloc | tdb | ntdb | tevent | ldb)
-	    [ -z "$GPG_USER" ] && {
-	        GPG_USER='Samba Library Distribution Key <samba-bugs at samba.org>'
-	    }
-
-	    [ -z "$GPG_KEYID" ] && {
-	        GPG_KEYID='13084025'
-	    }
-
-	    release_lib $lib "lib/$lib" $lib
-	    ;;
-	samba)
-	    [ -z "$GPG_USER" ] && {
-	        GPG_USER='6568B7EA'
-	    }
-
-	    [ -z "$GPG_KEYID" ] && {
-	        GPG_KEYID='6568B7EA'
-	    }
-
-	    # for now we don't upload
-	    release_lib $lib "." ""
-	    ;;
-	*)
-	    echo "Unknown library $lib"
-	    exit 1
-    esac
-done
diff --git a/script/release.sh b/script/release.sh
new file mode 100755
index 0000000..9f7379e
--- /dev/null
+++ b/script/release.sh
@@ -0,0 +1,615 @@
+#!/bin/bash
+# make a release of Samba or a library
+
+LC_ALL=C
+export LC_ALL
+LANG=C
+export LANG
+LANGUAGE=C
+export LANGUAGE
+
+set -u
+set -e
+umask 0022
+
+CONF_REPO_URL="ssh://git.samba.org/data/git/samba.git"
+CONF_UPLOAD_URL="samba-bugs at download-master.samba.org:/home/data/ftp/pub"
+CONF_DOWNLOAD_URL="https://download.samba.org/pub"
+
+test -d ".git" || {
+	echo "Run this script from the top-level directory in the"
+	echo "repository"
+	exit 1
+}
+
+usage() {
+	echo "Usage: release.sh <PRODUCT> <COMMAND>"
+	echo ""
+	echo "PRODUCT: ldb, talloc, tevent, tdb, samba-rc"
+	echo "COMMAND: fullrelease, create, push, upload, announce"
+	echo ""
+	return 0
+}
+
+check_args() {
+	local cmd="$1"
+	local got_args="$2"
+	local take_args="$3"
+
+	test x"${got_args}" = x"${take_args}" || {
+		usage
+		echo "cmd[${cmd}] takes ${take_args} instead of ${got_args}"
+		return 1
+	}
+
+	return 0
+}
+
+min_args() {
+	local cmd="$1"
+	local got_args="$2"
+	local min_args="$3"
+
+	test "${got_args}" -ge "${min_args}" || {
+		usage
+		echo "cmd[${cmd}] takes at least ${min_args} instead of ${got_args}"
+		return 1
+	}
+
+	return 0
+}
+
+min_args "$0" "$#" "2"
+
+product="$1"
+globalcmd="$2"
+shift 2
+tagname=""
+cmds=""
+next_cmd=""
+
+require_tagname() {
+	min_args "${FUNCNAME}" "$#" "1" || return 1
+	local cmd="$1"
+
+	test -n "${tagname}" || {
+		echo "cmd[${cmd}] requires '\${tagname}' variable to be set"
+		return 1
+	}
+
+	local name=$(echo "${tagname}" | cut -d '-' -f1)
+	test x"${name}" = x"${productbase}" || {
+		echo "Invalid tagname[${tgzname}]"
+		return 1
+	}
+
+	return 0
+}
+
+cmd_allowed() {
+	min_args "${FUNCNAME}" "$#" "2" || return 1
+	local cmd="$1"
+	shift 1
+
+	echo "$@" | grep -q "\<${cmd}\>" || {
+		return 1
+	}
+
+	return 0
+}
+
+verify_samba_rc() {
+	check_args "${FUNCNAME}" "$#" "0" || return 1
+
+	test -f VERSION || {
+		echo "VERSION doesn't exist"
+		return 1
+	}
+
+	grep -q 'SAMBA_VERSION_IS_GIT_SNAPSHOT=no' VERSION || {
+		echo "SAMBA_VERSION_IS_GIT_SNAPSHOT is not 'no'"
+		return 1
+	}
+
+	grep -q '^SAMBA_VERSION_RC_RELEASE=' VERSION || {
+		echo "SAMBA_VERSION_RC_RELEASE= missing"
+		return 1
+	}
+
+	grep -q '^SAMBA_VERSION_RC_RELEASE=$' VERSION && {
+		echo "SAMBA_VERSION_RC_RELEASE= missing the rc version"
+		return 1
+	}
+
+	return 0
+}
+
+verify_release() {
+	check_args "${FUNCNAME}" "$#" "0" || return 1
+
+	test -n "${verify_fn}" || {
+		echo "verify_fn variable empty"
+		return 1
+	}
+
+	echo "Running ${verify_fn}"
+	${verify_fn}
+}
+
+create_release() {
+	check_args "${FUNCNAME}" "$#" "0" || return 1
+
+	echo "Releasing product ${product}"
+
+	echo "Building release tarball"
+	local tgzname=$(make dist 2>&1 | grep ^Created | cut -d' ' -f2)
+	test -f "${tgzname}" || {
+		echo "Failed to create tarball"
+		return 1
+	}
+	CLEANUP_FILES="${CLEANUP_FILES} ${tgzname}"
+
+	local name=$(echo "${tgzname}" | cut -d '-' -f1)
+	test x"${name}" = x"${productbase}" || {
+		echo "Invalid tgzname[${tgzname}]"
+		return 1
+	}
+
+	local tarname=$(basename ${tgzname} .gz)
+	echo "Tarball: ${tarname}"
+	gunzip -f ${tgzname} || exit 1
+	test -f "${tarname}" || {
+		echo "Failed to decompress tarball ${tarname}"
+		return 1
+	}
+	CLEANUP_FILES="${CLEANUP_FILES} ${tarname}"
+
+	# tagname is global
+	tagname=$(basename ${tarname} .tar)
+	echo "Tagging as ${tagname}"
+	git tag -u ${GPG_KEYID} -s "${tagname}" -m "${productbase}: tag release ${tagname}" || {
+		return 1
+	}
+	CLEANUP_TAGS="${CLEANUP_TAGS} ${tagname}"
+
+	echo "signing"
+	rm -f "${tarname}.asc"
+	gpg -u "${GPG_USER}" --detach-sign --armor ${tarname} || {
+		return 1
+	}
+	test -f "${tarname}.asc" || {
+		echo "Failed to create signature ${tarname}.asc"
+		return 1
+	}
+	CLEANUP_FILES="${CLEANUP_FILES} ${tarname}.asc"
+	echo "compressing"
+	gzip -f -9 ${tarname}
+	test -f "${tgzname}" || {
+		echo "Failed to compress ${tgzname}"
+		return 1
+	}
+
+	return 0
+}
+
+whatsnew_release() {
+	check_args "${FUNCNAME}" "$#" "0" || return 1
+	require_tagname "${FUNCNAME}"
+
+	echo "extract ${tagname}.WHATSNEW.txt"
+	tar xf ${tagname}.tar.gz --to-stdout ${tagname}/WHATSNEW.txt > ${tagname}.WHATSNEW.txt
+	CLEANUP_FILES="${CLEANUP_FILES} ${tagname}.WHATSNEW.txt"
+
+	return 0
+}
+
+check_nopatch() {
+	check_args "${FUNCNAME}" "$#" "0" || return 1
+	require_tagname "${FUNCNAME}"
+
+	git tag -v "${tagname}" || {
+		echo "failed to verify tag[${tagname}]"
+		return 1
+	}
+
+	test -f "${tagname}.tar.gz" || {
+		echo "${tagname}.tar.gz does not exist"
+		return 1
+	}
+
+	test -f "${tagname}.tar.asc" || {
+		echo "${tagname}.tar.asc does not exist"
+		return 1
+	}
+
+	ls -la ${tagname}.*
+
+	return 0
+}
+
+check_release() {
+	check_args "${FUNCNAME}" "$#" "0" || return 1
+
+	test -n "${check_fn}" || {
+		echo "check_fn variable empty"
+		return 1
+	}
+
+	echo "Running ${check_fn}"
+	${check_fn}
+}
+
+push_release() {
+	check_args "${FUNCNAME}" "$#" "0" || return 1
+	require_tagname "${FUNCNAME}"
+
+	echo "Push git tag ${tagname} to '${repo_url}'"
+	git push "${repo_url}" "refs/tags/${tagname}:refs/tags/${tagname}" || {
+		return 1
+	}
+
+	return 0
+}
+
+upload_release() {
+	check_args "${FUNCNAME}" "$#" "0" || return 1
+	require_tagname "${FUNCNAME}"
+
+	echo "Upload ${tagname}.* to '${upload_url}'"
+	rsync -Pav ${tagname}.* "${upload_url}/" || {
+		return 1
+	}
+	rsync ${upload_url}/${tagname}.*
+
+	return 0
+}
+
+announce_samba_rc() {
+	check_args "${FUNCNAME}" "$#" "0" || return 1
+	require_tagname "${FUNCNAME}"
+
+	test -f "${tagname}.WHATSNEW.txt" || {
+		echo "${tagname}.WHATSNEW.txt does not exist"
+		return 1
+	}
+
+	local t=""
+	local utcdate=$(date --utc +"%d %B %Y")
+	local utctime=$(date --utc +"%Y%m%d-%H%M%S")
+	local version=$(echo "${tagname}" | sed -e 's!^samba-!!')
+	local href="#${version}"
+	local series=$(echo "${version}" | cut -d '.' -f1-2)
+	local rc=$(echo "${version}" | sed -e 's!.*rc\([0-9][0-9]*\)!\1!')
+	local rcname="${rc}th"
+	case "${rc}" in
+	1)
+		rcname="first"
+		;;
+	2)
+		rcname="second"
+		;;
+	3)
+		rcname="third"
+		;;
+	4)
+		rcname="fourth"
+		;;
+	5)
+		rcname="fifth"
+		;;
+	esac
+
+	{
+		echo "samba-announce at lists.samba.org, samba at lists.samba.org, samba-technical at lists.samba.org"
+	} > announce.${tagname}.to.txt
+	CLEANUP_FILES="${CLEANUP_FILES} announce.${tagname}.to.txt"
+
+	{
+		echo "[Announce] Samba ${version} Available for Download"
+	} > announce.${tagname}.subject.txt
+	CLEANUP_FILES="${CLEANUP_FILES} announce.${tagname}.subject.txt"
+
+	{
+		cat ${tagname}.WHATSNEW.txt
+		echo ""
+		echo "================"
+		echo "Download Details"
+		echo "================"
+		echo ""
+		echo "The uncompressed tarballs and patch files have been signed"
+		echo "using GnuPG (ID 6568B7EA).  The source code can be downloaded"
+		echo "from:"
+		echo ""
+		echo "        ${download_url}"
+		echo ""
+		echo "The release notes are available online at:"
+		echo ""
+		echo "        ${download_url}${tagname}.WHATSNEW.txt"
+		echo ""
+		echo "Our Code, Our Bugs, Our Responsibility."
+		echo "(https://bugzilla.samba.org/)"
+		echo ""
+		echo "                        --Enjoy"
+		echo "                        The Samba Team"
+	} > announce.${tagname}.mail.txt
+	CLEANUP_FILES="${CLEANUP_FILES} announce.${tagname}.mail.txt"
+
+	{
+		echo -n "-i announce.${tagname}.mail.txt "
+		echo -n "-s \"$(cat announce.${tagname}.subject.txt | xargs)\" "
+		echo -n "$(cat announce.${tagname}.to.txt | xargs)"
+	} > announce.${tagname}.mutt-arguments.txt
+	CLEANUP_FILES="${CLEANUP_FILES} announce.${tagname}.mutt-arguments.txt"
+
+	local headlinefile="${utctime}.${version}.headline.html"
+	{
+		echo "<!-- BEGIN: posted_news/${headlinefile} -->"
+		echo "<li> ${utcdate} <a href=\"${href}\">Samba ${version} Available for Download</a></li>"
+		echo "<!-- END: posted_news/${headlinefile} -->"
+	} > ${headlinefile}
+	CLEANUP_FILES="${CLEANUP_FILES} ${headlinefile}"
+
+	local bodyfile="${utctime}.${version}.body.html"
+	{
+		echo "<!-- BEGIN: posted_news/${bodyfile} -->"
+		echo "<h5><a name=\"${version}\">${utcdate}</a></h5>"
+		echo "<p class="headline">Samba ${version} Available for Download</p>"
+		echo "<p>"
+		echo "This is the ${rcname} release candidate of the upcoming Samba ${series} release series."
+		echo "</p>"
+		echo "<p>"
+		echo "The uncompressed tarball has been signed using GnuPG (ID ${GPG_KEYID})."
+		echo "The source code can be <a href=\"${download_url}${tagname}.tar.gz\">downloaded now</a>."
+		echo "See <a href=\"${download_url}${tagname}.WHATSNEW.txt\">the release notes for more info</a>."
+		echo "</p>"


-- 
Samba Shared Repository



More information about the samba-cvs mailing list