diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-01-24 18:35:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:51:26 -0500 |
commit | ca649f797cdc08a28fe43d5b47f4c84967b22837 (patch) | |
tree | 441f5f8c452355ad7b34d68da1efc700ec90b66f /source4 | |
parent | d5ae1a0387d281eeedc6c15f73df9dd13431a2bb (diff) | |
download | samba-ca649f797cdc08a28fe43d5b47f4c84967b22837.tar.gz samba-ca649f797cdc08a28fe43d5b47f4c84967b22837.tar.bz2 samba-ca649f797cdc08a28fe43d5b47f4c84967b22837.zip |
r13112: merge over some stuff from samba3
metze
(This used to be commit 7cb4e1bd0471f0c03fde25f6171565d74ab0549f)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/VERSION | 9 | ||||
-rw-r--r-- | source4/lib/version.c | 9 | ||||
-rwxr-xr-x | source4/script/mkversion.sh | 30 |
3 files changed, 43 insertions, 5 deletions
diff --git a/source4/VERSION b/source4/VERSION index c0b066cca1..fffd2a005e 100644 --- a/source4/VERSION +++ b/source4/VERSION @@ -1,6 +1,12 @@ ######################################################## # SAMBA Version # # # +# Samba versions are as follows # +# 3.0.x New production series # +# 3.0.x{tp,pre,rc}y Preview/Testing & RC # +# 3.0.x[a-z] Patch releases # +# 3.0.x[a-z]-VENDOR-z Vendor patch releases # +# # # script/mkversion.sh # # will use this file to create # # include/version.h # @@ -38,7 +44,7 @@ SAMBA_VERSION_REVISION= # # # <MAJOR>.<MINOR>.<RELEASE>tp<TP_RELEASE> # # # -# e.g. SAMBA_VERSION_PRE_RELEASE=1 # +# e.g. SAMBA_VERSION_TP_RELEASE=1 # # -> "4.0.0tp1" # ######################################################## SAMBA_VERSION_TP_RELEASE= @@ -110,3 +116,4 @@ SAMBA_VERSION_RELEASE_NICKNAME= # -> "CVS 3.0.0rc2-VendorVersion" # ######################################################## SAMBA_VERSION_VENDOR_SUFFIX= +SAMBA_VERSION_VENDOR_PATCH= diff --git a/source4/lib/version.c b/source4/lib/version.c index a5733a953d..b7aa81a081 100644 --- a/source4/lib/version.c +++ b/source4/lib/version.c @@ -35,6 +35,11 @@ const char *samba_version_string(void) #else const char *vendor_suffix = NULL; #endif +#ifdef SAMBA_VERSION_VENDOR_PATCH + const char *vendor_patch = SAMBA_VERSION_VENDOR_PATCH; +#else + const char *vendor_patch = NULL; +#endif static char *samba_version; static BOOL init_samba_version; @@ -43,10 +48,12 @@ const char *samba_version_string(void) } samba_version = talloc_asprintf(talloc_autofree_context(), - "%s%s%s%s%s%s", + "%s%s%s%s%s%s%s%s", official_string, (vendor_suffix?"-":""), (vendor_suffix?vendor_suffix:""), + (vendor_patch?"-":""), + (vendor_patch?vendor_patch:""), (release_nickname?" (":""), (release_nickname?release_nickname:""), (release_nickname?")":"")); diff --git a/source4/script/mkversion.sh b/source4/script/mkversion.sh index 814b47e9d0..7f42eded23 100755 --- a/source4/script/mkversion.sh +++ b/source4/script/mkversion.sh @@ -20,9 +20,7 @@ SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' $SOURCE_DIR$VERSION SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_TP_RELEASE=`sed -n 's/^SAMBA_VERSION_TP_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` - SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` - SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_IS_SVN_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_SVN_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE` @@ -30,6 +28,7 @@ SAMBA_VERSION_IS_SVN_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_SVN_SNAPSHOT=//p' $SO SAMBA_VERSION_RELEASE_NICKNAME=`sed -n 's/^SAMBA_VERSION_RELEASE_NICKNAME=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_VENDOR_SUFFIX=`sed -n 's/^SAMBA_VERSION_VENDOR_SUFFIX=//p' $SOURCE_DIR$VERSION_FILE` +SAMBA_VERSION_VENDOR_PATCH=`sed -n 's/^SAMBA_VERSION_VENDOR_PATCH=//p' $SOURCE_DIR$VERSION_FILE` echo "/* Autogenerated by script/mkversion.sh */" > $OUTPUT_FILE @@ -38,9 +37,16 @@ echo "#define SAMBA_VERSION_MINOR ${SAMBA_VERSION_MINOR}" >> $OUTPUT_FILE echo "#define SAMBA_VERSION_RELEASE ${SAMBA_VERSION_RELEASE}" >> $OUTPUT_FILE +## +## start with "3.0.22" +## SAMBA_VERSION_STRING="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}" +## +## maybe add "3.0.22a" or "4.0.0tp11" or "3.0.22pre1" or "3.0.22rc1" +## We do not do pre or rc version on patch/letter releases +## if test -n "${SAMBA_VERSION_REVISION}";then SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}${SAMBA_VERSION_REVISION}" echo "#define SAMBA_VERSION_REVISION \"${SAMBA_VERSION_REVISION}\"" >> $OUTPUT_FILE @@ -48,12 +54,18 @@ elif test -n "${SAMBA_VERSION_TP_RELEASE}";then SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}tp${SAMBA_VERSION_TP_RELEASE}" echo "#define SAMBA_VERSION_TP_RELEASE ${SAMBA_VERSION_TP_RELEASE}" >> $OUTPUT_FILE elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then + ## maybe add "3.0.22pre2" SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}" echo "#define SAMBA_VERSION_PRE_RELEASE ${SAMBA_VERSION_PRE_RELEASE}" >> $OUTPUT_FILE elif test -n "${SAMBA_VERSION_RC_RELEASE}";then SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}rc${SAMBA_VERSION_RC_RELEASE}" echo "#define SAMBA_VERSION_RC_RELEASE ${SAMBA_VERSION_RC_RELEASE}" >> $OUTPUT_FILE -elif test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then +fi + +## +## SVN revision number? +## +if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then _SAVE_LANG=${LANG} LANG="" HAVESVN=no @@ -81,12 +93,21 @@ elif test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then LANG=${_SAVE_LANG} fi +## +## Add a release nickname +## if test -n "${SAMBA_VERSION_RELEASE_NICKNAME}";then echo "#define SAMBA_VERSION_RELEASE_NICKNAME ${SAMBA_VERSION_RELEASE_NICKNAME}" >> $OUTPUT_FILE fi +## +## Add the vendor string if present +## if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then echo "#define SAMBA_VERSION_VENDOR_SUFFIX ${SAMBA_VERSION_VENDOR_SUFFIX}" >> $OUTPUT_FILE + if test -n "${SAMBA_VERSION_VENDOR_PATCH}";then + echo "#define SAMBA_VERSION_VENDOR_PATCH ${SAMBA_VERSION_VENDOR_PATCH}" >> $OUTPUT_FILE + fi fi echo "#define SAMBA_VERSION_OFFICIAL_STRING \"${SAMBA_VERSION_STRING}\"" >> $OUTPUT_FILE @@ -101,6 +122,9 @@ fi if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then echo "$0: with VENDOR_SUFFIX = ${SAMBA_VERSION_VENDOR_SUFFIX}" + if test -n "${SAMBA_VERSION_VENDOR_PATCH}";then + echo "$0: with VENDOR_PATCH = ${SAMBA_VERSION_VENDOR_PATCH}" + fi fi exit 0 |