Merge lp:~hingo/drizzle/drizzle-the-version-is-7.1-not-a-date-and-certainly-not-7 into lp:~drizzle-trunk/drizzle/development

Proposed by Henrik Ingo on 2012-01-30
Status: Merged
Merge reported by: Henrik Ingo
Merged at revision: not available
Proposed branch: lp:~hingo/drizzle/drizzle-the-version-is-7.1-not-a-date-and-certainly-not-7
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 304 lines (+50/-40)
15 files modified
.bzrignore (+2/-0)
Makefile.am (+1/-15)
client/drizzle.cc (+2/-2)
client/drizzledump.cc (+2/-2)
configure.ac (+2/-2)
docs/installing/redhat.rst (+3/-1)
drizzled/main.cc (+2/-2)
drizzled/sys_var.cc (+4/-4)
m4/pandora_vc_build.m4 (+23/-3)
plugin/auth_ldap/docs/index.rst (+3/-3)
plugin/innobase/xtrabackup/xtrabackup.cc (+1/-1)
support-files/drizzle.pc.in (+1/-1)
support-files/include.am (+1/-1)
tests/valgrind.supp (+2/-2)
win32/config.h (+1/-1)
To merge this branch: bzr merge lp:~hingo/drizzle/drizzle-the-version-is-7.1-not-a-date-and-certainly-not-7
Reviewer Review Type Date Requested Status
Vijay Samuel Needs Fixing on 2012-02-05
Mark Atwood Needs Fixing on 2012-02-05
Drizzle Merge Team 2012-01-30 Pending
Review via email: mp+90809@code.launchpad.net

Description of the change

For background, see this thread on drizzle-discuss:
https://lists.launchpad.net/drizzle-discuss/msg08518.html

Our current versioning scheme is confusing and/or harmful in many ways:

 * We are releasing betas of what is to become drizzle 7.1. However the package name is drizzle7 and the daemon is called drizzled7.
 * The 2012.01.30 numbers are wrongly interpreted as dates.
 * It is not at all obvious that 2011.11.29 is a pre-release of Fremont series (which is now in the 2012.01.xx numbers) and not a maintenance release of Elliot (which was 2011.03.13)
 * For Fedora and EPEL it is a major headache to have a number as part of the package name: they would have to go through a heavy approval process as it is considered that the package name has changed. (Also, we do not actually adhere then to our own package name, e.g. we use /etc/drizzle/ not /etc/drizzle7/)

This branch changes everything that was called drizzle7 or drizzled7 to just drizzle and drizzled7.

Further enhancements to pandora build system allow for
 - appending -stable, -rc,-beta, -alpha or -milestone to the release number (in the bzr tag)
 - for building from source, -snapshot is automatically added.
 - it is possible for version number parts to be both single digit and double digit
 - previously it was only possible to make dist a tarball directly after tagging and before committing. Now it is also possible to check out the tagged revision and re-create the tar ball with the correct name with a new make dist.

See each commit message for more details.

As an example, our next release with this patch incorporated could be named
drizzle-7.1.31-beta.tar.gz

I will update http://wiki.drizzle.org/Create_Tarballs once this is approved.

To post a comment you must log in.
Mark Atwood (fallenpegasus) wrote :

Reversed out of trunk.

Please refer to
http://pastebin.com/yfPZNbBM
http://pastebin.com/gUpXk0BR

Please fix and resubmit. Thank you!

review: Needs Fixing
Henrik Ingo (hingo) wrote :

Mark: None of those errors are due to this patch. It's been confirmed by Daniel yesterday.

They happen when one tries to tag drizzle with a 7.1.x version number. They will happen equally with or without this patch. This patch doesn't mandate version numbers one way or another, it just changes the package name from "drizzle7" to "drizzle".

[23:26:41] <daniel4> vjsamuel: hingo: i'm running tests, so far no errors
[23:26:49] <daniel4> fresh build of latest trunk
[23:26:50] <daniel4> 2501
[23:27:24] <hingo> daniel4: I think the errors happen if you'd do "bzr tag 7.1.31".
[23:31:25] <daniel4> hingo: ok i'll try that after this run to compare the two
[23:32:05] <hingo> daniel4: or to be precise, vjsamuel did bzr tag 7.1.31-rc but the -rc shouldn't matter.
[23:33:57] <daniel4> All 566 tests were successful.
[23:34:03] --> davidstrauss (~straussd@wikimedia/davidstrauss) has joined #drizzle
[23:34:38] <daniel4> hingo: do i have to re-compile after bzr tag 7.1.31 ? because i don't have enough battery for that heh
[23:35:10] <hingo> daniel4: yes. config/autorun.sh takes latest tag as input.
[23:35:53] <daniel4> hingo: ah, well in that case ^ (vjsamuel) I'll have to try again later today because my battery can't survive another recompile.

[00:46:49] <daniel4> vjsamuel: still online?
[00:47:22] <daniel4> hingo: you still online?
[01:03:23] <daniel4> well in any case, after tagging bzr trunk with 7.1.31 the errors happen on my box too
[01:09:23] <daniel4> hingo: vjsamuel: sent you two an email on why those tests are failing
[01:09:33] -*- daniel4 goes offline again

Vijay Samuel (vjsamuel) wrote :

I feel that this should be merged only after it is able to pass tests with the 7.1.x tag. We need to cut tar balls with the new tag. No point if it is going to fail test cases.

review: Needs Fixing
Henrik Ingo (hingo) wrote :

Vijay

I don't understand your reasoning.

Without this patch:
 - bzr tag 2012.02.31 will work
 - bzr tag 7.1.31 will not pass tests

With this patch:
 - bzr tag 2012.02.31 will work
 - bzr tag 7.1.31 will not work

What do you have against this patch? Why don't you propose to remove other random patches which also have nothing to do with the problem?

As I see it the problem is:

 - there's one test that tests for SELECT ... /*!72301 + */. Since the version number is changed, the test result must be changed accordingly, but there is no bug. (In fact, until now the test has been testing the wrong thing...)

 - drizzledump uses version number to "detect" whether it is connected to mysqld or drizzled. This is a bit embarrasing, for 15 years now we have been laughing at JavaScript developers that try to do this, and they always fail. So this is a bug in drizzledump that needs to be fixed. (I have never touched drizzledump code and this patch has nothing to do with this bug.)

 - Are there more test failures?

Vijay Samuel (vjsamuel) wrote :

There are 7 failed test cases in total. Thats the problem. Please check the paste bin entries http://pastebin.com/gUpXk0BR

regression.732849
main.mysql_protocol
main.drizzledump_restore
main.drizzledump
main.drizzle_client
main.comments

Are you sure you want to have it merged, add the tag and then try fixing the broken test cases?

Cheers,
 -Vijay

Henrik Ingo (hingo) wrote :

I will of course fix the broken test cases either way (and have just started). I just don't see what you're trying to accomplish by removing this patch that is not the cause of those errors.

The regression.732849 fail is also a drizzledump "SET NAMES utf8" bug. I'll look into the mysql_protocol and drizzle_client tests but I'm sure it's a similar bug for them.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2012-01-23 11:40:32 +0000
3+++ .bzrignore 2012-02-03 21:42:20 +0000
4@@ -224,6 +224,7 @@
5 plugin/transaction_log/utilities/drizzletrx
6 po/POTFILES
7 po/drizzle7.pot
8+po/drizzle.pot
9 po/remove-potcdate.sed
10 po/stamp-it
11 po/stamp-po
12@@ -303,6 +304,7 @@
13 support-files/Makefile.in
14 support-files/drizzle-log-rotate
15 support-files/drizzle7.pc
16+support-files/drizzle.pc
17 support-files/drizzle.server
18 support-files/drizzle.spec
19 support-files/libdrizzle.pc
20
21=== modified file 'Makefile.am'
22--- Makefile.am 2011-12-23 20:13:32 +0000
23+++ Makefile.am 2012-02-03 21:42:20 +0000
24@@ -197,24 +197,10 @@
25 find ./ | $(GREP) \~$$ | xargs rm -f
26 bzr unknowns
27
28-install-exec-hook:
29- cd $(DESTDIR)$(sbindir) && \
30- mv -f drizzled$(EXEEXT) drizzled7$(EXEEXT) && \
31- $(LN_S) drizzled7$(EXEEXT) drizzled$(EXEEXT)
32-
33-install-data-hook:
34- cd $(DESTDIR)$(man8dir) && \
35- mv -f drizzled.8 drizzled7.8 && \
36- $(LN_S) drizzled7.8 drizzled.8
37-
38-uninstall-hook:
39- rm $(DESTDIR)$(man8dir)/drizzled7.8
40- rm $(DESTDIR)$(sbindir)/drizzled7$(EXEEXT)
41-
42 rpm-build: support-files/drizzle.spec
43 @rm -f ~/rpmbuild/RPMS/x86_64/drizzle-$(VERSION)*.rpm
44 @rm -f ~/rpmbuild/SRPMS/drizzle-$(VERSION)*.rpm
45- @cp drizzle7-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
46+ @cp drizzle-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
47 @cp support-files/drizzled.init ~/rpmbuild/SOURCES/
48 @rpmbuild -ba support-files/drizzle.spec
49 @cp ~/rpmbuild/RPMS/x86_64/drizzle-$(VERSION)*.rpm .
50
51=== modified file 'client/drizzle.cc'
52--- client/drizzle.cc 2012-01-30 05:36:54 +0000
53+++ client/drizzle.cc 2012-02-03 21:42:20 +0000
54@@ -1374,8 +1374,8 @@
55 # if defined(HAVE_LOCALE_H)
56 setlocale(LC_ALL, "");
57 # endif
58- bindtextdomain("drizzle7", LOCALEDIR);
59- textdomain("drizzle7");
60+ bindtextdomain("drizzle", LOCALEDIR);
61+ textdomain("drizzle");
62 #endif
63
64 po::options_description commandline_options(_("Options used only in command line"));
65
66=== modified file 'client/drizzledump.cc'
67--- client/drizzledump.cc 2011-11-04 21:06:16 +0000
68+++ client/drizzledump.cc 2012-02-03 21:42:20 +0000
69@@ -465,8 +465,8 @@
70 # if defined(HAVE_LOCALE_H)
71 setlocale(LC_ALL, "");
72 # endif
73- bindtextdomain("drizzle7", LOCALEDIR);
74- textdomain("drizzle7");
75+ bindtextdomain("drizzle", LOCALEDIR);
76+ textdomain("drizzle");
77 #endif
78
79 po::options_description commandline_options(_("Options used only in command line"));
80
81=== modified file 'configure.ac'
82--- configure.ac 2011-12-23 20:13:32 +0000
83+++ configure.ac 2012-02-03 21:42:20 +0000
84@@ -20,7 +20,7 @@
85 AC_PREREQ(2.59)dnl Minimum Autoconf version required.
86 dnl Version from the AC_INIT call below is overridden later
87 dnl So don't update it here
88-AC_INIT([drizzle7],[7],[http://bugs.launchpad.net/drizzle],[drizzle7],[http://drizzle.org/])
89+AC_INIT([drizzle],[7.1],[http://bugs.launchpad.net/drizzle],[drizzle],[http://drizzle.org/])
90 AC_CONFIG_SRCDIR([drizzled/drizzled.cc])
91 AC_CONFIG_AUX_DIR([config])
92
93@@ -170,7 +170,7 @@
94 tests/Makefile dnl
95 drizzled/plugin/version.h dnl
96 support-files/drizzle.spec dnl
97- support-files/drizzle7.pc dnl
98+ support-files/drizzle.pc dnl
99 support-files/libdrizzle.pc dnl
100 support-files/libdrizzle-1.0.pc dnl
101 support-files/smf/install.sh dnl
102
103=== modified file 'docs/installing/redhat.rst'
104--- docs/installing/redhat.rst 2011-11-14 22:29:19 +0000
105+++ docs/installing/redhat.rst 2012-02-03 21:42:20 +0000
106@@ -71,5 +71,7 @@
107
108 .. code-block:: bash
109
110- sudo yum install drizzle7-server drizzle7-client
111+ sudo yum install drizzle-server drizzle-client
112+
113+Note: On older versions of Fedora and RHEL, the packages are named drizzle7-server and drizzle7-client.
114
115
116=== modified file 'drizzled/main.cc'
117--- drizzled/main.cc 2011-10-19 19:30:54 +0000
118+++ drizzled/main.cc 2012-02-03 21:42:20 +0000
119@@ -237,8 +237,8 @@
120 # if defined(HAVE_LOCALE_H)
121 setlocale(LC_ALL, "");
122 # endif
123- bindtextdomain("drizzle7", LOCALEDIR);
124- textdomain("drizzle7");
125+ bindtextdomain("drizzle", LOCALEDIR);
126+ textdomain("drizzle");
127 #endif
128
129 module::Registry &modules= module::Registry::singleton();
130
131=== modified file 'drizzled/sys_var.cc'
132--- drizzled/sys_var.cc 2011-11-09 19:27:44 +0000
133+++ drizzled/sys_var.cc 2012-02-03 21:42:20 +0000
134@@ -94,8 +94,8 @@
135
136 namespace
137 {
138- static size_t revno= DRIZZLE7_VC_REVNO;
139- static size_t release_id= DRIZZLE7_RELEASE_ID;
140+ static size_t revno= DRIZZLE_VC_REVNO;
141+ static size_t release_id= DRIZZLE_RELEASE_ID;
142 }
143
144 const char *bool_type_names[]= { "OFF", "ON", NULL };
145@@ -245,8 +245,8 @@
146 /* Global read-only variable containing hostname */
147 static sys_var_const_string sys_hostname("hostname", getServerHostname());
148
149-static sys_var_const_str sys_revid("vc_revid", DRIZZLE7_VC_REVID);
150-static sys_var_const_str sys_branch("vc_branch", DRIZZLE7_VC_BRANCH);
151+static sys_var_const_str sys_revid("vc_revid", DRIZZLE_VC_REVID);
152+static sys_var_const_str sys_branch("vc_branch", DRIZZLE_VC_BRANCH);
153 static sys_var_size_t_ptr_readonly sys_revno("vc_revno", &revno);
154 static sys_var_size_t_ptr_readonly sys_release_id("vc_release_id", &release_id);
155
156
157=== modified file 'm4/pandora_vc_build.m4'
158--- m4/pandora_vc_build.m4 2011-03-07 19:40:07 +0000
159+++ m4/pandora_vc_build.m4 2012-02-03 21:42:20 +0000
160@@ -60,7 +60,15 @@
161 PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"
162 PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1`
163 PANDORA_VC_BRANCH=`bzr nick`
164+ # Check if this branch has just been tagged (not yet committed)
165 PANDORA_VC_TAG=`bzr tags -r-1 | cut -f1 -d' ' | head -1`
166+ # If not, then check if we have checked out a branch where most recent commit
167+ # was tagged, and there are no further (uncommitted) changes in the branch.
168+ if test "x${PANDORA_VC_TAG}" = "x"; then
169+ if test `bzr diff | wc -l` = 0; then
170+ PANDORA_VC_TAG=`bzr tags -r-2 | cut -f1 -d' ' | head -1`
171+ fi
172+ fi
173 PANDORA_VC_LATEST_TAG=`bzr tags --sort=time | grep -v '\?'| cut -f1 -d' ' | tail -1`
174 if test "x${vc_changelog}" = "xyes"; then
175 bzr log --gnu > ChangeLog
176@@ -128,14 +136,26 @@
177
178 AS_IF([test "x${PANDORA_VC_TAG}" != "x"],[
179 PANDORA_RELEASE_VERSION="${PANDORA_VC_TAG}"
180+ # We now support release tags to append a descriptive tag -stable, -rc, -beta, -alpha, -milestone.
181+ # But for the release id we want to remove that.
182+ PANDORA_VC_TAG_JUST_NUMBERS=`echo ${PANDORA_VC_TAG} | sed -e 's/-stable//' -e 's/-rc//' -e 's/-beta//' -e 's/-alpha//' -e 's/-milestone//'`
183+ # For release id we make sure each part is at least 2 digits, prepended with 0 when necessary.
184+ # Example: 1.2.3 should end up as 10203.
185+ # The sed's from left to right:
186+ # 1) Make sure minor version has at least 2 digits (2 -> 02)
187+ # 2) Make sure build version has at least 2 digits (3 -> 03)
188+ # 3) Remove dots (1.02.03 -> 10203)
189 changequote(<<, >>)dnl
190- PANDORA_RELEASE_ID=`echo ${PANDORA_RELEASE_VERSION} | sed 's/[^0-9]//g'`
191+ PANDORA_RELEASE_ID=`echo ${PANDORA_VC_TAG_JUST_NUMBERS} | sed -e 's/\.\([0-9]\)\./.0\1./' | sed -e 's/\.\([0-9]\)$/.0\1/' | sed 's/[^0-9]//g'`
192 changequote([, ])dnl
193 ],[
194 AS_IF([test "x${PANDORA_VC_LATEST_TAG}" != "x"],[
195- PANDORA_RELEASE_VERSION="${PANDORA_VC_LATEST_TAG}.${PANDORA_VC_REVNO}"
196+ # We now support release tags to append a descriptive tag -stable, -rc, -beta, -alpha, -milestone.
197+ # Since this is just a snapshot build, we need to remove that.
198+ PANDORA_VC_LATEST_TAG_JUST_NUMBERS=`echo ${PANDORA_VC_LATEST_TAG} | sed -e 's/-stable//' -e 's/-rc//' -e 's/-beta//' -e 's/-alpha//' -e 's/-milestone//'`
199+ PANDORA_RELEASE_VERSION="${PANDORA_VC_LATEST_TAG_JUST_NUMBERS}.${PANDORA_VC_REVNO}-snapshot"
200 changequote(<<, >>)dnl
201- PANDORA_RELEASE_ID=`echo ${PANDORA_VC_LATEST_TAG} | sed 's/[^0-9]//g'`
202+ PANDORA_RELEASE_ID=`echo ${PANDORA_VC_LATEST_TAG_JUST_NUMBERS} | sed -e 's/\.\([0-9]\)\./.0\1./' | sed -e 's/\.\([0-9]\)$/.0\1/' | sed 's/[^0-9]//g'`
203 changequote([, ])dnl
204 ],[
205 PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
206
207=== modified file 'plugin/auth_ldap/docs/index.rst'
208--- plugin/auth_ldap/docs/index.rst 2011-11-28 22:38:45 +0000
209+++ plugin/auth_ldap/docs/index.rst 2012-02-03 21:42:20 +0000
210@@ -418,12 +418,12 @@
211
212 You could just setup Drizzle to authenticate against standard LDAP accounts like
213 John Doe above. But the recommended way is to add a specific Drizzle schema.
214-You will find this in ``$DRIZZLE_ROOT/share/drizzle7/drizzle_openldap.ldif``.
215+You will find this in ``$DRIZZLE_ROOT/share/drizzle/drizzle_openldap.ldif``.
216 You can add it to your LDAP schema like this:
217
218 .. code-block:: none
219
220- $ sudo ldapadd -Y EXTERNAL -H ldapi:/// -f share/drizzle7/drizzle_openldap.ldif
221+ $ sudo ldapadd -Y EXTERNAL -H ldapi:/// -f share/drizzle/drizzle_openldap.ldif
222 SASL/EXTERNAL authentication started
223 SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
224 SASL SSF: 0
225@@ -464,7 +464,7 @@
226
227 .. code-block:: none
228
229- $ share/drizzle7/drizzle_create_ldap_user -p secret -b bin/drizzle_password_hash -u hingo -n 1 -l "ou=people,dc=example,dc=com" > hingo.example.com.ldif
230+ $ share/drizzle/drizzle_create_ldap_user -p secret -b bin/drizzle_password_hash -u hingo -n 1 -l "ou=people,dc=example,dc=com" > hingo.example.com.ldif
231 $ cat hingo.example.com.ldif
232 dn: uid=hingo,ou=people,dc=example,dc=com
233 objectclass: top
234
235=== modified file 'plugin/innobase/xtrabackup/xtrabackup.cc'
236--- plugin/innobase/xtrabackup/xtrabackup.cc 2011-11-09 20:20:23 +0000
237+++ plugin/innobase/xtrabackup/xtrabackup.cc 2012-02-03 21:42:20 +0000
238@@ -634,7 +634,7 @@
239 static void print_version(void)
240 {
241 printf("%s Ver %s Rev %s for %s %s (%s)\n" ,my_progname,
242- XTRABACKUP_VERSION, XTRABACKUP_REVISION, "Drizzle7",
243+ XTRABACKUP_VERSION, XTRABACKUP_REVISION, "Drizzle",
244 TARGET_OS, TARGET_CPU);
245 }
246
247
248=== renamed file 'support-files/drizzle7.pc.in' => 'support-files/drizzle.pc.in'
249--- support-files/drizzle7.pc.in 2011-11-07 15:04:16 +0000
250+++ support-files/drizzle.pc.in 2012-02-03 21:42:20 +0000
251@@ -3,7 +3,7 @@
252 libdir=@libdir@
253 pkgincludedir=@pkgincludedir@
254
255-Name: drizzle7
256+Name: drizzle
257 Description: Drizzle CLI
258 Version: @VERSION@
259 URL: http://drizzle.org/
260
261=== modified file 'support-files/include.am'
262--- support-files/include.am 2011-12-23 20:13:32 +0000
263+++ support-files/include.am 2012-02-03 21:42:20 +0000
264@@ -27,6 +27,6 @@
265
266 pkgconfigdir= $(libdir)/pkgconfig
267 pkgconfig_DATA= \
268- support-files/drizzle7.pc \
269+ support-files/drizzle.pc \
270 support-files/libdrizzle.pc \
271 support-files/libdrizzle-1.0.pc
272
273=== modified file 'tests/valgrind.supp'
274--- tests/valgrind.supp 2011-06-13 17:48:00 +0000
275+++ tests/valgrind.supp 2012-02-03 21:42:20 +0000
276@@ -555,7 +555,7 @@
277 Memcheck:Leak
278 fun:_Znwm
279 fun:_ZN5boost6detail12set_tss_dataEPKvNS_10shared_ptrINS0_20tss_cleanup_functionEEEPvb
280- fun:_ZN8drizzled7Session12storeGlobalsEv
281+ fun:_ZN8drizzledSession12storeGlobalsEv
282 fun:_ZN8drizzled21drizzle_rm_tmp_tablesEv
283 fun:main
284 }
285@@ -564,7 +564,7 @@
286 Memcheck:Leak
287 fun:_Znwj
288 fun:_ZN5boost6detail12set_tss_dataEPKvNS_10shared_ptrINS0_20tss_cleanup_functionEEEPvb
289- fun:_ZN8drizzled7Session12storeGlobalsEv
290+ fun:_ZN8drizzledSession12storeGlobalsEv
291 fun:_ZN8drizzled21drizzle_rm_tmp_tablesEv
292 fun:main
293 }
294
295=== modified file 'win32/config.h'
296--- win32/config.h 2011-04-03 17:53:49 +0000
297+++ win32/config.h 2012-02-03 21:42:20 +0000
298@@ -34,6 +34,6 @@
299
300 #pragma once
301
302-#define PACKAGE_VERSION "drizzle7"
303+#define PACKAGE_VERSION "drizzle"
304 #define PACKAGE_BUGREPORT "http://bugs.launchpad.net/drizzle"
305