Thu Nov 2 13:54:22 PST 2006
- Previous message: [Slony1-commit] By cbbrowne: Mark in release checklist that it may be needful to update
- Next message: [Slony1-commit] By cbbrowne: Remove code that generates STORE LISTEN statements -
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Added a new script, release_checklist.sh, which performs a number of
release checks. Documented this in the release checklist document.
Modified Files:
--------------
slony1-engine/doc/adminguide:
releasechecklist.sgml (r1.5 -> r1.6)
Added Files:
-----------
slony1-engine/tools:
release_checklist.sh (r1.1)
awk-for-stored-proc-vers.awk (r1.1)
-------------- next part --------------
--- /dev/null
+++ tools/release_checklist.sh
@@ -0,0 +1,72 @@
+#!/bin/sh
+# $Id: release_checklist.sh,v 1.1 2006/11/02 21:54:20 cbbrowne Exp $
+
+# This script runs through what it can of the release checklist
+# run via: "sh tools/release_checklist.sh"
+# It assumes the current directory is the top directory of the build
+
+echo "Slony-I Release Checklist"
+
+VERSTRING=`egrep 'SLONY_I_VERSION_STRING.*"[0-9]+\.[0-9]+\.[0-9]+"' config.h.in | cut -d'"' -f 2`
+MAJOR=`echo $VERSTRING | cut -d '.' -f 1`
+MINOR=`echo $VERSTRING | cut -d '.' -f 2`
+PATCHLEVEL=`echo $VERSTRING | cut -d '.' -f 3`
+
+echo "Slony-I version: ${VERSTRING} - Major=${MAJOR} Minor=${MINOR} Patchlevel=${PATCHLEVEL}"
+
+VERCOMMA="${MAJOR},${MINOR},${PATCHLEVEL}"
+if [[ `egrep "#define SLONY_I_VERSION_STRING_DEC ${VERCOMMA}\$" config.h.in` ]]; then
+ echo "SLONY_I_VERSION_STRING_DEC matches"
+else
+ echo "ERROR: SLONY_I_VERSION_STRING_DEC does not match ${VERCOMMA}"
+ grep SLONY_I_VERSION_STRING_DEC config.h.in
+fi
+
+echo "Verifying configure..."
+VERUNDERSCORE="${MAJOR}_${MINOR}_${PATCHLEVEL}"
+if [[ `egrep "^PACKAGE_VERSION=${VERUNDERSCORE=}\$" configure` ]]; then
+ echo "configure PACKAGE_VERSION matches ${VERUNDERSCORE}"
+else
+ echo "ERROR: configure PACKAGE_VERSION does not match ${VERUNDERSCORE}"
+ egrep "PACKAGE_VERSION\=" configure
+fi
+
+if [[ `egrep "^PACKAGE_STRING=postgresql-slony1-engine ${VERUNDERSCORE=}\$" configure` ]]; then
+ echo "configure PACKAGE_STRING matches ${VERUNDERSCORE}"
+else
+ echo "ERROR: configure PACKAGE_STRING does not match ${VERUNDERSCORE}"
+ egrep "PACKAGE_STRING\=" configure
+fi
+
+FLIST=""
+for file in `find config -name "*.m4" -newer configure | sort`; do
+ FLIST="${FLIST} $file"
+done
+if [[ x = x"$FLIST" ]]; then
+ echo "autoconf has probably been run lately..."
+else
+ echo "WARNING:: The following ./configure constituents are newer than ./configure - you probably should run autoconf!"
+ echo "$FLIST" | fmt
+fi
+
+STOREDPROCVERS=`awk -f tools/awk-for-stored-proc-vers.awk src/backend/slony1_funcs.sql`
+
+if [[ x"$STOREDPROCVERS"] = x"$VERSTRING" ]]; then
+ OK=1
+ echo "Stored proc version numbers match ${VERSTRING}"
+else
+ echo "ERROR: Stored proc versions in src/backend/slony1_funcs.sql indicates version ${STOREDPROCVERS}"
+fi
+
+
+for file in `find src/slon -name "conf-file.l" -newer src/slon/conf-file.c | sort`; do
+ echo "WARNING: src/slon/conf-file.l newer than child file src/slon/conf-file.c"
+done
+
+for file in `find src/slonik -name "scan.l" -newer src/slonik/scan.c | sort`; do
+ echo "WARNING: src/slonik/scan.l newer than child file src/slonik/scan.c"
+done
+
+for file in `find src/slonik -name "parser.y" -newer src/slonik/parser.c | sort`; do
+ echo "WARNING: src/slonik/parser.y newer than child file src/slonik/parser.c"
+done
\ No newline at end of file
--- /dev/null
+++ tools/awk-for-stored-proc-vers.awk
@@ -0,0 +1,27 @@
+BEGIN {
+ f=0;
+ a["major"] = -1;
+ a["minor"] = -1;
+ a["patchlevel"] = -1;
+}
+
+/create or replace function \@NAMESPACE\@.slonyVersion/ {f=f+1}
+/slonyVersionMajor/ {v="major"}
+/slonyVersionMinor/ {v="minor"}
+/slonyVersionPatchlevel/ {v="patchlevel"}
+
+/return / {
+ if ((f > 0) && (f < 4)) {
+ s=$0;
+ gsub("return", "", s);
+ gsub(" ", "", s);
+ gsub(";", "", s);
+ gsub("\t", "", s);
+ if (a[v] < 0) {
+ a[v] = s}
+ }
+}
+
+END {
+ printf "%s.%s.%s", a["major"], a["minor"], a["patchlevel"];
+}
Index: releasechecklist.sgml
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/doc/adminguide/releasechecklist.sgml,v
retrieving revision 1.5
retrieving revision 1.6
diff -Ldoc/adminguide/releasechecklist.sgml -Ldoc/adminguide/releasechecklist.sgml -u -w -r1.5 -r1.6
--- doc/adminguide/releasechecklist.sgml
+++ doc/adminguide/releasechecklist.sgml
@@ -42,39 +42,41 @@
</para></listitem>
<listitem><para>Purge directory <filename>autom4te.cache</filename> so it is not included in the build </para></listitem>
<listitem><para>Purge out .cvsignore files; this can be done with the command <command> find . -name .cvsignore | xargs rm </command> </para></listitem>
-<listitem><para>Need to make sure that all references to CVS tags properly point to the tag for the release. </para>
-<para>For instance, configure should contain, for release 1.1.2:</para>
+<listitem><para> Run <filename>tools/release_checklist.sh</filename> </para>
+
+<para> This does a bunch of consistency checks to make sure that
+various files that are supposed to contain version numbers contain
+consistent values.</para>
+
+<itemizedlist>
+<listitem><para>For instance, configure should contain, for release 1.1.2:</para>
<itemizedlist>
<listitem><para>PACKAGE_VERSION=REL_1_1_2</para></listitem>
<listitem><para>PACKAGE_STRING=postgresql-slony1-engine REL_1_1_2</para></listitem>
-</itemizedlist>
+</itemizedlist></listitem>
-<para> RPM spec files used to contain release tags as well as names of
-tarballs which needed to be updated. As of 2005-12-13, there is less
-of this... For those platforms with specific spec files such as SuSE,
-some editing still needs to be done. see the file(s) in the
-<filename>suse</filename> dir for more information </para>
-
-<para> The admin guide <filename>version.sgml</filename> file needs to
-contain the release name. This should not need to be touched;
-<filename>version.sgml</filename> is generated automatically with the
-release name/tag on demand. </para>
+<listitem><para> <filename> config.h.in </filename> needs to contain the version
+number in two forms; the definitions for
+<envar>SLONY_I_VERSION_STRING</envar> and
+<envar>SLONY_I_VERSION_STRING_DEC</envar> both need to be
+updated. </para> </listitem>
-<para> <filename>src/backend/slony1_funcs.sql</filename> has
+<listitem><para> <filename>src/backend/slony1_funcs.sql</filename> has
major/minor/patch versions in functions
<function>slonyVersionMajor()</function>,
<function>slonyVersionMinor()</function>, and
<function>slonyVersionPatchlevel()</function>. These need to be
-assigned <quote>by hand</quote> at this point.</para>
+assigned <quote>by hand</quote> at this point.</para> </listitem>
<para> It sure would be nice if more of these could be assigned
-automatically, somehow.</para></listitem>
+automatically, somehow.</para>
-<listitem><para><emphasis>Don't</emphasis> commit the new configure.
-</para></listitem>
+<para><emphasis>Don't</emphasis> commit the new
+<filename>configure</filename>; we shouldn't be tracking this in CVS.
+</para>
<listitem><para>make sure that the generated files from .l and .y are
created, for example <filename>slony/conf-file.[ch]</filename> </para>
- Previous message: [Slony1-commit] By cbbrowne: Mark in release checklist that it may be needful to update
- Next message: [Slony1-commit] By cbbrowne: Remove code that generates STORE LISTEN statements -
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list