The branch, master has been updated via e5fca6a... s4:build Don't automatically mark as 'not a git snapshot'. via b088a27... s4:build use autotools for mkrelease.sh via 7ea7b23... waf Provide release signing capability in 'waf dist' via 708d6fc... s4:waf Exclude the autotools based build environment from a Samba4 release via b50c006... waf Add DIST_BLACKLIST to list files that we cannot include in a release via e5232bd... s4:kdc Remove special talloc_free of the ldb context from d0e131e... s3-waf: Fix the smbclient build with libcap
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit e5fca6aebf1fdde230be09c0bec718b7a607e056 Author: Andrew Bartlett <abart...@samba.org> Date: Fri May 28 20:34:08 2010 +1000 s4:build Don't automatically mark as 'not a git snapshot'. If we generate a tarball, it may well be a git snapshot - we will change the VERSION file if it really is a release. Andrew Bartlett commit b088a275512634af0adefe632097846439e83f92 Author: Andrew Bartlett <abart...@samba.org> Date: Fri May 28 20:33:28 2010 +1000 s4:build use autotools for mkrelease.sh The mkrelease.sh script only works with the autotools build. However, it isn't recommended. Andrew Bartlett commit 7ea7b23413f48325d1805fd2666757241eddc2e7 Author: Andrew Bartlett <abart...@samba.org> Date: Fri May 28 20:24:47 2010 +1000 waf Provide release signing capability in 'waf dist' This helps ensure the release is signed correctly - the .tar file, not the .tar.gz must be signed, and it's easy to forget this. Andrew Bartlett commit 708d6fc5b002fb781983dd6ca4bda6e59a3a6411 Author: Andrew Bartlett <abart...@samba.org> Date: Fri May 28 18:54:57 2010 +1000 s4:waf Exclude the autotools based build environment from a Samba4 release commit b50c006e203e313a836eb012548749948b515425 Author: Andrew Bartlett <abart...@samba.org> Date: Fri May 28 18:50:25 2010 +1000 waf Add DIST_BLACKLIST to list files that we cannot include in a release This currently includes the source3 directory for Samba4 releases (per past practice in mkrelease.sh), but also could include things like DFSG-unfree RFC files in the future. Andrew Barltett commit e5232bdc69af45f15bc8fd95745276018f5961be Author: Andrew Bartlett <abart...@samba.org> Date: Tue May 25 19:54:24 2010 +1000 s4:kdc Remove special talloc_free of the ldb context I can see no reason not to just let this go with the talloc tree that created it, and avoid a talloc_free with references. Andrew Bartlett ----------------------------------------------------------------------- Summary of changes: buildtools/wafsamba/samba_dist.py | 56 ++++++++++++++++++++++++++++++++++-- buildtools/wafsamba/wscript | 8 +++++ source4/kdc/hdb-samba4.c | 10 ------ source4/kdc/mit_samba.c | 2 +- source4/script/mkrelease.sh | 6 ++-- source4/wscript | 11 +++++++ 6 files changed, 75 insertions(+), 18 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py index 0586550..05c5aaa 100644 --- a/buildtools/wafsamba/samba_dist.py +++ b/buildtools/wafsamba/samba_dist.py @@ -1,10 +1,11 @@ # customised version of 'waf dist' for Samba tools # uses git ls-files to get file lists -import Utils, os, sys, tarfile, stat, Scripting, Logs +import Utils, os, sys, tarfile, gzip, stat, Scripting, Logs, Options from samba_utils import * dist_dirs = None +dist_blacklist = None def add_symlink(tar, fname, abspath, basedir): '''handle symlinks to directories that may move during packaging''' @@ -85,9 +86,15 @@ def dist(appname='',version=''): sys.exit(1) dist_base = '%s-%s' % (appname, version) - dist_name = '%s.tar.gz' % (dist_base) - tar = tarfile.open(dist_name, 'w:gz') + if Options.options.SIGN_RELEASE: + dist_name = '%s.tar' % (dist_base) + tar = tarfile.open(dist_name, 'w') + else: + dist_name = '%s.tar.gz' % (dist_base) + tar = tarfile.open(dist_name, 'w:gz') + + blacklist = dist_blacklist.split() for dir in dist_dirs.split(): if dir.find(':') != -1: @@ -106,6 +113,17 @@ def dist(appname='',version=''): abspath = os.path.join(srcdir, f) if dir != '.': f = f[len(dir)+1:] + + # Remove files in the blacklist + if f in dist_blacklist: + continue + blacklisted = False + # Remove directories in the blacklist + for d in blacklist: + if f.startswith(d): + blacklisted = True + if blacklisted: + continue if destdir != '.': f = destdir + '/' + f fname = dist_base + '/' + f @@ -113,7 +131,30 @@ def dist(appname='',version=''): tar.close() - Logs.info('Created %s' % dist_name) + if Options.options.SIGN_RELEASE: + try: + os.unlink(dist_name + '.asc') + except OSError: + pass + + cmd = "gpg --detach-sign --armor " + dist_name + os.system(cmd) + uncompressed_tar = open(dist_name, 'rb') + compressed_tar = gzip.open(dist_name + '.gz', 'wb') + while 1: + buffer = uncompressed_tar.read(1048576) + if buffer: + compressed_tar.write(buffer) + else: + break + uncompressed_tar.close() + compressed_tar.close() + os.unlink(dist_name) + Logs.info('Created %s.gz %s.asc' % (dist_name, dist_name)) + dist_name = dist_name + '.gz' + else: + Logs.info('Created %s' % dist_name) + return dist_name @@ -124,4 +165,11 @@ def DIST_DIRS(dirs): if not dist_dirs: dist_dirs = dirs +...@conf +def DIST_BLACKLIST(blacklist): + '''set the directories to package, relative to top srcdir''' + global dist_blacklist + if not dist_blacklist: + dist_blacklist = blacklist + Scripting.dist = dist diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 7bb2baa..bad65ca 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -130,6 +130,14 @@ def set_options(opt): help=SUPPRESS_HELP, action='store_true', dest='AUTOCONF_DISABLE_DEPENDENCY_TRACKING', default=False) + gr = opt.option_group('dist options') + gr.add_option('--sign-release', + help='sign the release tarball created by waf dist', + action='store_true', dest='SIGN_RELEASE') + gr.add_option('--tag', + help='tag release in git at the same time', + type='string', action='store', dest='TAG_RELEASE') + @wafsamba.runonce def configure(conf): diff --git a/source4/kdc/hdb-samba4.c b/source4/kdc/hdb-samba4.c index f91eeb4..6534dbd 100644 --- a/source4/kdc/hdb-samba4.c +++ b/source4/kdc/hdb-samba4.c @@ -119,16 +119,6 @@ static krb5_error_code hdb_samba4_nextkey(krb5_context context, HDB *db, unsigne static krb5_error_code hdb_samba4_destroy(krb5_context context, HDB *db) { - struct samba_kdc_db_context *kdc_db_ctx; - - kdc_db_ctx = talloc_get_type_abort(db->hdb_db, - struct samba_kdc_db_context); - - if (kdc_db_ctx) { - talloc_free(kdc_db_ctx->samdb); - kdc_db_ctx->samdb = NULL; - } - talloc_free(db); return 0; } diff --git a/source4/kdc/mit_samba.c b/source4/kdc/mit_samba.c index 7718e56..cb1284c 100644 --- a/source4/kdc/mit_samba.c +++ b/source4/kdc/mit_samba.c @@ -98,7 +98,7 @@ static int mit_samba_context_init(struct mit_samba_context **_ctx) cli_credentials_set_kerberos_state(ctx->session_info->credentials, CRED_DONT_USE_KERBEROS); - ctx->db_ctx->samdb = samdb_connect(ctx, + ctx->db_ctx->samdb = samdb_connect(ctx->db_ctx, ctx->db_ctx->ev_ctx, ctx->db_ctx->lp_ctx, ctx->session_info); diff --git a/source4/script/mkrelease.sh b/source4/script/mkrelease.sh index 303dfe6..6fc1771 100755 --- a/source4/script/mkrelease.sh +++ b/source4/script/mkrelease.sh @@ -6,17 +6,17 @@ if [ ! -d ".git" -o `dirname $0` != "./source4/script" ]; then exit 1 fi +echo "WARNING: This script prepares an autotools based release, which has known problems!" + OUTDIR=`mktemp -d samba-XXXXX` (git archive --format=tar HEAD | (cd $OUTDIR/ && tar xf -)) -echo SAMBA_VERSION_IS_GIT_SNAPSHOT=no >> $OUTDIR/source4/VERSION - #Prepare the tarball for a Samba4 release, with some generated files, #but without Samba3 stuff (to avoid confusion) ( cd $OUTDIR/ || exit 1 rm -rf README Manifest Read-Manifest-Now Roadmap source3 packaging docs-xml examples swat WHATSNEW.txt MAINTAINERS || exit 1 cd source4 || exit 1 - ./autogen.sh || exit 1 + ./autogen-autotools.sh || exit 1 ./configure || exit 1 make dist || exit 1 ) || exit 1 diff --git a/source4/wscript b/source4/wscript index f018094..5d6392c 100644 --- a/source4/wscript +++ b/source4/wscript @@ -15,6 +15,17 @@ VERSION=version.STRING samba_dist.DIST_DIRS('.') +#This is a list of files that we don't want in the package, for +#whatever reason. Directories should be listed with a trailing / to +#avoid over-exclusion. + +#This list includes files that would confuse the recipient of a +#samba-4.0.0 branded tarball (until the merge is complete) and the +#core elements of the autotools build system (which is known to +#produce buggy binaries). +samba_dist.DIST_BLACKLIST('README Manifest Read-Manifest-Now Roadmap source3/ ' + + 'packaging/ docs-xml/ examples/ swat/ WHATSNEW.txt MAINTAINERS ' + + 'source4/autogen-autotools.sh source4/Makefile.in source4/configure.ac') # install in /usr/local/samba by default Options.default_prefix = '/usr/local/samba' -- Samba Shared Repository