diff options
author | Tom Yu <tlyu@mit.edu> | 2004-09-25 01:00:55 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2004-09-25 01:00:55 +0000 |
commit | a63d79f93e746f611f37a7e3c9c1c13aaa7c6db3 (patch) | |
tree | c38a038fd78fc6e6246d64aec1cbf5b20f76c77b | |
parent | 429c571fa4fe828192cc5f5349218616a50efa70 (diff) | |
download | krb5-a63d79f93e746f611f37a7e3c9c1c13aaa7c6db3.zip krb5-a63d79f93e746f611f37a7e3c9c1c13aaa7c6db3.tar.gz krb5-a63d79f93e746f611f37a7e3c9c1c13aaa7c6db3.tar.bz2 |
Make patchlevel.h be the master version file
ticket: 1345
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16790 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/configure.in | 10 | ||||
-rw-r--r-- | src/lib/ChangeLog | 4 | ||||
-rw-r--r-- | src/lib/Makefile.in | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/ChangeLog | 6 | ||||
-rw-r--r-- | src/lib/krb5/krb/Makefile.in | 2 | ||||
-rw-r--r-- | src/lib/krb5/krb/brand.c | 71 | ||||
-rw-r--r-- | src/patchlevel.h | 59 | ||||
-rw-r--r-- | src/util/ChangeLog | 5 | ||||
-rw-r--r-- | src/util/mkrel | 75 | ||||
-rw-r--r-- | src/util/send-pr/ChangeLog | 5 | ||||
-rw-r--r-- | src/util/send-pr/Makefile.in | 2 | ||||
-rw-r--r-- | src/windows/ChangeLog | 4 | ||||
-rw-r--r-- | src/windows/version.rc | 28 |
14 files changed, 244 insertions, 35 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6555d2d..d333e86 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-09-24 Tom Yu <tlyu@mit.edu> + + * configure.in: Update to get RELTAIL from patchlevel.h as well. + + * patchlevel.h: Update to make this the master version stamp file. + 2004-09-22 Ken Raeburn <raeburn@mit.edu> * aclocal.m4 (AC_KRB5_TCL_FIND_CONFIG): If the config info set by diff --git a/src/configure.in b/src/configure.in index 4a5ad0c..fc567f2 100644 --- a/src/configure.in +++ b/src/configure.in @@ -11,8 +11,14 @@ dnl CONFIG_RULES dnl dnl Determine version from patchlevel.h -eval `sed 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/' < $srcdir/patchlevel.h` -KRB5_VERSION="$KRB5_MAJOR_RELEASE.$KRB5_MINOR_RELEASE.$KRB5_PATCHLEVEL" +eval `sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p' < $srcdir/patchlevel.h` +KRB5_VERSION="$KRB5_MAJOR_RELEASE.$KRB5_MINOR_RELEASE" +if test "$KRB5_PATCHLEVEL" = 0; then :; else + KRB5_VERSION="$KRB5_VERSION.$KRB5_PATCHLEVEL" +fi +if test -n "$KRB5_RELTAIL"; then + KRB5_VERSION="$KRB5_VERSION-$KRB5_RELTAIL" +fi AC_SUBST(KRB5_VERSION) dnl AC_REQUIRE_CPP diff --git a/src/lib/ChangeLog b/src/lib/ChangeLog index 1528b30..d8ddd19 100644 --- a/src/lib/ChangeLog +++ b/src/lib/ChangeLog @@ -1,3 +1,7 @@ +2004-09-24 Tom Yu <tlyu@mit.edu> + + * Makefile.in (RCFLAGS): Add -I$(SRCTOP) to get patchlevel.h. + 2004-06-18 Ken Raeburn <raeburn@mit.edu> * Makefile.in (SLIBS, SDEF, S_GLUE, COMERR_GLUE, PROF_GLUE, diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in index c52ddb9..909fadc 100644 --- a/src/lib/Makefile.in +++ b/src/lib/Makefile.in @@ -66,7 +66,7 @@ KGLUE=$(K5_GLUE) GGLUE=$(GSS_GLUE) K4GLUE=$(K4_GLUE) -RCFLAGS=$(CPPFLAGS) -D_WIN32 -DRES_ONLY +RCFLAGS=$(CPPFLAGS) -I$(SRCTOP) -D_WIN32 -DRES_ONLY ##WIN32##SRES=$(SLIB:.lib=.res) ##WIN32##CRES=$(CLIB:.lib=.res) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index c16ad78..46e3f5c 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,9 @@ +2004-09-24 Tom Yu <tlyu@mit.edu> + + * Makefile.in (LOCALINCLUDES): Include SRCTOP to get patchlevel.h. + + * brand.c: Use patchlevel.h as master version stamp file. + 2004-09-21 Tom Yu <tlyu@mit.edu> * rd_cred.c (decrypt_credencdata): Clear and free ppart to avoid diff --git a/src/lib/krb5/krb/Makefile.in b/src/lib/krb5/krb/Makefile.in index 9c37865..3430d6d 100644 --- a/src/lib/krb5/krb/Makefile.in +++ b/src/lib/krb5/krb/Makefile.in @@ -5,7 +5,7 @@ BUILDTOP=$(REL)..$(S)..$(S).. RUN_SETUP = @KRB5_RUN_ENV@ PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) -LOCALINCLUDES = -I$(srcdir)/../os +LOCALINCLUDES = -I$(srcdir)/../os -I$(SRCTOP) ##DOS##BUILDTOP = ..\..\.. diff --git a/src/lib/krb5/krb/brand.c b/src/lib/krb5/krb/brand.c index de48d58..7e4e0db 100644 --- a/src/lib/krb5/krb/brand.c +++ b/src/lib/krb5/krb/brand.c @@ -1,15 +1,72 @@ /* + * lib/krb5/krb/brand.c + * + * Copyright (C) 2004 by the Massachusetts Institute of Technology. + * All rights reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + */ + +/* * This file is used to put a "release brand" on a Krb5 library before * it is released via some release engineering process. This gives us * an easy way to tell where a binary came from. * - * It currently is manually maintained, because there's no good way to - * automatically have CVS do the right thing. We could put RCS tags - * in every single file, but that (a) takes up lots of space, since we - * have lots of files in the Kerberos library, and (b) it makes CVS - * merges a real pain. + * It depends on patchlevel.h for the master version stamp info. */ -/* Format: "KRB5_BRAND: <cvs tag> <date>" */ +/* Format: "KRB5_BRAND: <cvs_tag> <release_name> <date>" */ + +#include "patchlevel.h" + +#define XSTR(x) #x +#define STR(x) XSTR(x) + +#ifdef KRB5_RELTAG +#define RELTAG KRB5_RELTAG +#else +#define RELTAG "[untagged]" +#endif + +#define MAJOR_MINOR STR(KRB5_MAJOR_RELEASE) "." STR(KRB5_MINOR_RELEASE) + +#if KRB5_PATCHLEVEL != 0 +#define MAYBE_PATCH "." STR(KRB5_PATCHLEVEL) +#else +#define MAYBE_PATCH "" +#endif + +#ifdef KRB5_RELTAIL +#define RELTAIL "-" KRB5_RELTAIL +#else +#define RELTAIL "" +#endif + +#define RELNAME MAJOR_MINOR MAYBE_PATCH RELTAIL + +#ifdef KRB5_RELDATE +#define RELDATE KRB5_RELDATE +#else +#define RELDATE "[date unknown]" +#endif + +#define BRANDSTR RELTAG " " RELNAME " " RELDATE -static char krb5_brand[] = "KRB5_BRAND: Unbranded release"; +static char krb5_brand[] = "KRB5_BRAND: " BRANDSTR; diff --git a/src/patchlevel.h b/src/patchlevel.h index 807b86f..a520628 100644 --- a/src/patchlevel.h +++ b/src/patchlevel.h @@ -1,3 +1,58 @@ +/* + * patchlevel.h + * + * Copyright (C) 2004 by the Massachusetts Institute of Technology. + * All rights reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + */ + +/* + * This is the master file for version stamping purposes. The + * checked-in version will contain the correct version information at + * all times. Prior to an official release x.y.z, + * KRB5_MAJOR_RELEASE=x, KRB5_MINOR_RELEASE=y, and KRB5_PATCHLEVEL=z. + * KRB5_RELTAIL will reflect the release state. It will be + * "prerelease" for unreleased code either on the trunk or on a + * release branch. It will be undefined for a final release. + * + * Immediately following a final release, the release version numbers + * will be incremented, and KRB5_RELTAIL will revert to "prerelease". + * + * KRB5_RELTAG contains the CVS tag name corresponding to the release. + * KRB5_RELDATE identifies the date of the release. They should + * normally be undefined for checked-in code. + */ + +/* + * ========== + * IMPORTANT: + * ========== + * + * If you are a vendor supplying modified code derived from MIT + * Kerberos, you SHOULD update KRB5_RELTAIL to identify your + * organization. + */ #define KRB5_MAJOR_RELEASE 1 -#define KRB5_MINOR_RELEASE 2 -#define KRB5_PATCHLEVEL 2 +#define KRB5_MINOR_RELEASE 4 +#define KRB5_PATCHLEVEL 0 +#define KRB5_RELTAIL "prerelease" +/* #undef KRB5_RELDATE */ +/* #undef KRB5_RELTAG */ diff --git a/src/util/ChangeLog b/src/util/ChangeLog index e15aeb0..990ca78 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,3 +1,8 @@ +2004-09-24 Tom Yu <tlyu@mit.edu> + + * mkrel: Rework somewhat to handle patchlevel.h being the new + master version stamp file. + 2004-09-14 Ken Raeburn <raeburn@mit.edu> * reconf: Export ACLOCAL=true to environment. diff --git a/src/util/mkrel b/src/util/mkrel index a576fbd..97a08d1 100644 --- a/src/util/mkrel +++ b/src/util/mkrel @@ -1,6 +1,6 @@ #!/bin/sh set -e -repository=:kserver:cvs.mit.edu:/cvs/krbdev +repository=:gserver:cvs.mit.edu:/cvs/krbdev dodoc=t dosrc=t checkout=t @@ -32,7 +32,7 @@ relmajor=0 relminor=0 relpatch=0 relhead= -reltail= +# reltail= reldate=`date +%Y%m%d` case "$reldir" in @@ -92,6 +92,45 @@ echo "major=$relmajor minor=$relminor patch=$relpatch" # $reltag, $release, $reldate are used for brand.c currently # $relmajor, $relminor, $relpatch are used for patchlevel.h currently +# +# $newstyle = t if patchlevel.h is the master version stamp file. If +# so, we don't edit it here. +# +if test $checkout = t; then + if cvs -q -d $repository checkout -p -r$reltag krb5/src/patchlevel.h | grep KRB5_RELDATE > /dev/null 2>&1; then + newstyle=t + else + newstyle=nil; + fi +else + if grep KRB5_RELDATE $reldir/src/patchlevel.h > /dev/null 2>&1; then + newstyle=t; + else + newstyle=nil; + fi +fi + +if test $newstyle = t; then + echo "parsing new style patchlevel.h..." + if test $checkout = t; then + eval `cvs -q -d $repository checkout -p -r$reltag krb5/src/patchlevel.h | sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p'` + else + eval `sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p' < $reldir/src/patchlevel.h` + fi + if test "$KRB5_RELTAG" != $reltag; then + echo "WARNING: patchlevel.h '$KRB5_RELTAG' != $reltag" + fi + if test "$KRB5_MAJOR_RELEASE" != $relmajor || \ + test "$KRB5_MINOR_RELEASE" != $relminor || \ + test "$KRB5_PATCHLEVEL" != $relpatch || \ + test "$KRB5_RELTAIL" != $reltail; then + + echo "WARNING: patchlevel.h $KRB5_MAJOR_RELEASE.$KRB5_MINOR_RELEASE.$KRB5_PATCHLEVEL${KRB5_RELTAIL+-$KRB5_RELTAIL} != $relmajor.$relminor.$relpatch${reltail+-$reltail}" + fi +else + echo "old style patchlevel.h" +fi + if test $checkout = t; then echo "Checking out krb5 with tag $reltag into directory $reldir..." cvs -q -d $repository export -r$reltag -d $reldir krb5 @@ -115,28 +154,36 @@ fi echo "Editing release-specific files..." -(cd $reldir/src/lib/krb5/krb && \ - sed -e '/static/s%KRB5_BRAND:[^"]*"%'"KRB5_BRAND: $reltag $release $reldate"'"%' \ - brand.c > brand.c.new && mv brand.c.new brand.c; \ - rm -f brand.c.new) +if test $newstyle = t; then + (cd $reldir/src && \ + sed -e '/RELDATE/c\ +#define KRB5_RELDATE "'"$reldate"'"' patchlevel.h > patchlevel.h.new && \ + mv patchlevel.h.new patchlevel.h) +else + + (cd $reldir/src/lib/krb5/krb && \ + sed -e '/static/s%KRB5_BRAND:[^"]*"%'"KRB5_BRAND: $reltag $release $reldate"'"%' \ + brand.c > brand.c.new && mv brand.c.new brand.c; \ + rm -f brand.c.new) -(cd $reldir/src/util/send-pr && \ - sed -e 's%RELEASE=.*%RELEASE='"krb5-$release"'%' Makefile.in \ - > Makefile.in.new && mv Makefile.in.new Makefile.in) + (cd $reldir/src/util/send-pr && \ + sed -e 's%RELEASE=.*%RELEASE='"krb5-$release"'%' Makefile.in \ + > Makefile.in.new && mv Makefile.in.new Makefile.in) -(cd $reldir/src && \ - cat > patchlevel.h <<EOF + (cd $reldir/src && \ + cat > patchlevel.h <<EOF #define KRB5_MAJOR_RELEASE $relmajor #define KRB5_MINOR_RELEASE $relminor #define KRB5_PATCHLEVEL $relpatch EOF -) + ) +fi echo "Nuking unneeded files..." find $reldir \( -name TODO -o -name todo -o -name .cvsignore \ -o -name BADSYMS -o -name .Sanitize -o -name .rconf \) -print \ - | xargs rm -f -find $reldir -type d -name autom4te.cache -exec rm -rf {} \; + | xargs rm -f || true +find $reldir -type d -name autom4te.cache -exec rm -rf {} \; || true if test $dodoc = t; then echo "Building doc..." diff --git a/src/util/send-pr/ChangeLog b/src/util/send-pr/ChangeLog index 4ae543e..d443d91 100644 --- a/src/util/send-pr/ChangeLog +++ b/src/util/send-pr/ChangeLog @@ -1,3 +1,8 @@ +2004-09-24 Tom Yu <tlyu@mit.edu> + + * Makefile.in (RELEASE): Set from KRB5_VERSION, which comes from + patchlevel.h. + 2004-03-08 Ken Raeburn <raeburn@mit.edu> * Makefile.in (MY_SUBDIRS): Deleted. diff --git a/src/util/send-pr/Makefile.in b/src/util/send-pr/Makefile.in index 5a27fcb..6d586c6 100644 --- a/src/util/send-pr/Makefile.in +++ b/src/util/send-pr/Makefile.in @@ -5,7 +5,7 @@ BUILDTOP=$(REL)..$(S).. # # Makefile for building a standalone send-pr. # -RELEASE=1.0 +RELEASE=@KRB5_VERSION@ SUBMITTER=net sendprname = krb5-send-pr EMACS=emacs diff --git a/src/windows/ChangeLog b/src/windows/ChangeLog index d09feec..5dcadcf 100644 --- a/src/windows/ChangeLog +++ b/src/windows/ChangeLog @@ -1,3 +1,7 @@ +2004-09-24 Tom Yu <tlyu@mit.edu> + + * version.rc: Use patchlevel.h to generate version stamp info. + 2004-06-18 Ken Raeburn <raeburn@mit.edu> * version.rc: Add info for support library. diff --git a/src/windows/version.rc b/src/windows/version.rc index 3951dbd..58da7b0 100644 --- a/src/windows/version.rc +++ b/src/windows/version.rc @@ -1,17 +1,31 @@ #include <windows.h> #include <winver.h> +#include "patchlevel.h" /* * BEGIN COMMON VERSION INFO for GSS and Kerberos version resources */ -#define PRE_RELEASE +#define XSTR(x) #x +#define STR(x) XSTR(x) -#ifdef PRE_RELEASE -#define BETA_STR " beta" +#define MAJOR_MINOR STR(KRB5_MAJOR_RELEASE) "." STR(KRB5_MINOR_RELEASE) + +#if KRB5_PATCH_LEVEL != 0 +#define MAYBE_PATCH "." STR(KRB5_PATCHLEVEL) +#else +#define MAYBE_PATCH "" +#endif + +#ifdef KRB5_RELTAIL +#define RELTAIL "-" KRB5_RELTAIL +#else +#define RELTAIL "" +#endif + +#ifdef BETA #define BETA_FLAG VS_FF_PRERELEASE #else -#define BETA_STR "" #define BETA_FLAG 0 #endif @@ -23,10 +37,10 @@ /* we're going to stamp all the DLLs with the same version number */ -#define K5_PRODUCT_VERSION_STRING "1.3 (TEST)" BETA_STR "\0" -#define K5_PRODUCT_VERSION 1, 3, 0, 0 +#define K5_PRODUCT_VERSION_STRING MAJOR_MINOR MAYBE_PATCH RELTAIL "\0" +#define K5_PRODUCT_VERSION KRB5_MAJOR_RELEASE, KRB5_MINOR_RELEASE, KRB5_PATCHLEVEL, 0 -#define K5_COPYRIGHT "Copyright (C) 1997-2000 by the Massachusetts Institute of Technology\0" +#define K5_COPYRIGHT "Copyright (C) 1997-2004 by the Massachusetts Institute of Technology\0" #define K5_COMPANY_NAME "Massachusetts Institute of Technology.\0" /* |