Merge lp:~hingo/drizzle/drizzle-new-pandora-pluginini-keys into lp:~drizzle-trunk/drizzle/development

Proposed by Henrik Ingo on 2011-10-04
Status: Merged
Approved by: Brian Aker on 2011-10-06
Approved revision: 2427
Merged at revision: 2431
Proposed branch: lp:~hingo/drizzle/drizzle-new-pandora-pluginini-keys
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 180 lines (+72/-10)
6 files modified
.bzrignore (+1/-0)
Makefile.am (+21/-0)
config/pandora-plugin (+33/-1)
libdrizzle-2.0/libdrizzle/include.am (+11/-1)
plugin/auth_ldap/plugin.ini (+3/-5)
plugin/auth_ldap/schema/README.auth_ldap (+3/-3)
To merge this branch: bzr merge lp:~hingo/drizzle/drizzle-new-pandora-pluginini-keys
Reviewer Review Type Date Requested Status
Drizzle Merge Team 2011-10-04 Pending
Review via email: mp+78161@code.launchpad.net

Description of the change

In order to document auth_ldap (part of https://blueprints.launchpad.net/drizzle/+spec/docs71-focus-areas) I ended up doing changes to the build system so that a script and some openldap schema files become part of a make install. This is needed so an end user can get them without downloading Drizzle sources.

This branch contains the change throughout the build system, including classifying the files with new pandora plugin.ini keys so they are installed by make install. This is ready for testing and merging into trunk. We'll work on the documentation in another branch.

More details from the commit message:

This does 2 things:

1) Modify pandora-plugin to allow more keys in a plugin.ini. Until now
you could only specify headers, sources and extra-dist, but not
scripts (that are not compiled, just copied) or various text or data
files you wish to be part of an installation.

The new plugin.ini keys correspond to automake targets as follows:

# plugin.ini key
automake variable
-----------------
# scripts or bin_scripts
dist_bin_SCRIPTS=
# sbin_scripts
dist_sbin_SCRIPTS=
# libexec_scripts
dist_libexec_SCRIPTS=
# pkg_scripts
dist_pkgdata_SCRIPTS=
# data
dist_data_DATA=
# pkg_data
dist_pkgdata_DATA=
# sysconf_data
dist_sysconf_DATA=

2a) Uses the new keys pkg_scripts and pkg_data to move some useful
files from the auth_ldap plugin to ./share/drizzle7/ so an end user
can benefit from them without downloading Drizzle source codes.

2b) Also adds libdrizzle-2.0/libdrizzle/mysql_password_hash to programs
that should be installed and changes the name to drizzle_password_hash.
(Source filenames are unchanged. Makefile first builds mysql_password_hash
and then makes a copy to the final name. I didn't know if someone expects
mysql_password_hash to be there in some tests or something.)

The intent is to write documentation for LDAP authentication that uses
bin/drizzle_password_hash and share/drizzle7/* for creating LDAP user
records.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2011-08-04 08:13:04 +0000
3+++ .bzrignore 2011-10-04 20:57:25 +0000
4@@ -167,6 +167,7 @@
5 key.gcno
6 key_map.gcno
7 libdrizzle-2.0/libdrizzle/mysql_password_hash
8+libdrizzle-2.0/libdrizzle/drizzle_password_hash
9 libmysql/Makefile.in
10 libserialutil_la-db.gcno
11 libserialutil_la-unireg.gcno
12
13=== modified file 'Makefile.am'
14--- Makefile.am 2011-08-16 01:07:54 +0000
15+++ Makefile.am 2011-10-04 20:57:25 +0000
16@@ -16,14 +16,20 @@
17 ACLOCAL_AMFLAGS = -I m4 --force
18
19 # includes append to these:
20+# Pandora build system takes input from plugin.ini files that are appended to these
21+# Corresponding Pandora parameter names are mentioned in comments
22+# A few directory targets (libexec/ and etc/) are unused as of this writing and
23+# therefore commented out. pandora-build will support them if you uncomment.
24 SUFFIXES =
25 TESTS =
26 check_PROGRAMS =
27+# headers
28 noinst_HEADERS =
29 nobase_nodist_include_HEADERS =
30 nobase_dist_include_HEADERS =
31 dist_include_HEADERS =
32 nobase_nodist_pkginclude_HEADERS =
33+# install_headers
34 nobase_dist_pkginclude_HEADERS =
35 dist_pkginclude_HEADERS =
36 sbin_PROGRAMS =
37@@ -35,6 +41,21 @@
38 man_MANS =
39 bin_PROGRAMS =
40
41+# scripts or bin_scripts
42+dist_bin_SCRIPTS=
43+# sbin_scripts
44+dist_sbin_SCRIPTS=
45+# libexec_scripts
46+#dist_libexec_SCRIPTS=
47+# pkg_scripts
48+dist_pkgdata_SCRIPTS=
49+# data
50+dist_data_DATA=
51+# pkg_data
52+dist_pkgdata_DATA=
53+# sysconf_data
54+#dist_sysconf_DATA=
55+
56 VERSION=$(PANDORA_RELEASE_VERSION)
57
58 SUBDIRS = .
59
60=== modified file 'config/pandora-plugin'
61--- config/pandora-plugin 2011-02-28 18:00:50 +0000
62+++ config/pandora-plugin 2011-10-04 20:57:25 +0000
63@@ -365,7 +365,23 @@
64
65 if plugin.has_key('extra_dist'):
66 plugin['extra_dist']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['extra_dist'].split()])
67-
68+ if plugin.has_key('bin_scripts'):
69+ plugin['bin_scripts']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['bin_scripts'].split()])
70+ if plugin.has_key('scripts'):
71+ plugin['scripts']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['scripts'].split()])
72+ if plugin.has_key('sbin_scripts'):
73+ plugin['sbin_scripts']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['sbin_scripts'].split()])
74+ if plugin.has_key('libexec_scripts'):
75+ plugin['libexec_scripts']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['libexec_scripts'].split()])
76+ if plugin.has_key('pkg_scripts'):
77+ plugin['pkg_scripts']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['pkg_scripts'].split()])
78+ if plugin.has_key('data'):
79+ plugin['data']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['data'].split()])
80+ if plugin.has_key('pkg_data'):
81+ plugin['pkg_data']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['pkg_data'].split()])
82+ if plugin.has_key('sysconf_data'):
83+ plugin['sysconf_data']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['sysconf_data'].split()])
84+
85
86 if plugin['static']:
87 plugin['static_yesno']="yes"
88@@ -534,6 +550,22 @@
89 """ % plugin)
90 if plugin.has_key('extra_dist') and plugin['extra_dist'] != "":
91 plugin_am.write("EXTRA_DIST += %(extra_dist)s\n" % plugin)
92+ if plugin.has_key('bin_scripts') and plugin['bin_scripts'] != "":
93+ plugin_am.write("dist_bin_SCRIPTS += %(bin_scripts)s\n" % plugin)
94+ if plugin.has_key('scripts') and plugin['scripts'] != "":
95+ plugin_am.write("dist_bin_SCRIPTS += %(scripts)s\n" % plugin)
96+ if plugin.has_key('sbin_scripts') and plugin['sbin_scripts'] != "":
97+ plugin_am.write("dist_sbin_SCRIPTS += %(sbin_scripts)s\n" % plugin)
98+ if plugin.has_key('libexec_scripts') and plugin['libexec_scripts'] != "":
99+ plugin_am.write("dist_libexec_SCRIPTS += %(libexec_scripts)s\n" % plugin)
100+ if plugin.has_key('pkg_scripts') and plugin['pkg_scripts'] != "":
101+ plugin_am.write("dist_pkgdata_SCRIPTS += %(pkg_scripts)s\n" % plugin)
102+ if plugin.has_key('data') and plugin['data'] != "":
103+ plugin_am.write("dist_data_DATA += %(data)s\n" % plugin)
104+ if plugin.has_key('pkg_data') and plugin['pkg_data'] != "":
105+ plugin_am.write("dist_pkgdata_DATA += %(pkg_data)s\n" % plugin)
106+ if plugin.has_key('sysconf_data') and plugin['sysconf_data'] != "":
107+ plugin_am.write("dist_sysconf_DATA += %(sysconf_data)s\n" % plugin)
108 if plugin['headers'] != "":
109 plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin)
110 if plugin['install_headers'] != "":
111
112=== modified file 'libdrizzle-2.0/libdrizzle/include.am'
113--- libdrizzle-2.0/libdrizzle/include.am 2011-06-15 17:51:40 +0000
114+++ libdrizzle-2.0/libdrizzle/include.am 2011-10-04 20:57:25 +0000
115@@ -40,11 +40,21 @@
116 endif
117
118 noinst_PROGRAMS+= \
119- libdrizzle-2.0/libdrizzle/mysql_password_hash
120+ libdrizzle-2.0/libdrizzle/mysql_password_hash
121 libdrizzle_2_0_libdrizzle_mysql_password_hash_CXXFLAGS= ${AM_CXXFLAGS} ${LIBDRIZZLE_CPPFLAGS}
122 libdrizzle_2_0_libdrizzle_mysql_password_hash_LDADD= libdrizzle-2.0/libdrizzle/libdrizzle-2.0.la
123 libdrizzle_2_0_libdrizzle_mysql_password_hash_SOURCES= libdrizzle-2.0/libdrizzle/mysql_password_hash.cc
124
125+# For some reason this has originally been called mysql_password_hash. I'd prefer
126+# to call it drizzle_password_hash but to remain backward compatible I didn't
127+# change any sources, rather just build it twice and provide both.
128+# Only drizzle_password_hash is installed by make install though.
129+bin_PROGRAMS+= \
130+ libdrizzle-2.0/libdrizzle/drizzle_password_hash
131+libdrizzle_2_0_libdrizzle_drizzle_password_hash_CXXFLAGS= ${AM_CXXFLAGS} ${LIBDRIZZLE_CPPFLAGS}
132+libdrizzle_2_0_libdrizzle_drizzle_password_hash_LDADD= libdrizzle-2.0/libdrizzle/libdrizzle-2.0.la
133+libdrizzle_2_0_libdrizzle_drizzle_password_hash_SOURCES= libdrizzle-2.0/libdrizzle/mysql_password_hash.cc
134+
135 noinst_PROGRAMS+= \
136 examples/client \
137 examples/simple \
138
139=== modified file 'plugin/auth_ldap/plugin.ini'
140--- plugin/auth_ldap/plugin.ini 2010-08-17 20:57:43 +0000
141+++ plugin/auth_ldap/plugin.ini 2011-10-04 20:57:25 +0000
142@@ -6,8 +6,6 @@
143 license=PLUGIN_LICENSE_GPL
144 build_conditional="x${ac_cv_libldap}" = "xyes"
145 ldflags=${LTLIBLDAP}
146-extra_dist=schema/README
147- schema/gentestusers.sh
148- schema/openldap/drizzle.ldif
149- schema/openldap/drizzle.schema
150- test_ldap.sh
151+pkg_scripts= schema/drizzle_create_ldap_user
152+pkg_data= schema/README.auth_ldap schema/openldap/drizzle_openldap.ldif schema/openldap/drizzle_openldap.schema
153+extra_dist=test_ldap.sh
154
155=== renamed file 'plugin/auth_ldap/schema/README' => 'plugin/auth_ldap/schema/README.auth_ldap'
156--- plugin/auth_ldap/schema/README 2010-05-05 20:49:48 +0000
157+++ plugin/auth_ldap/schema/README.auth_ldap 2011-10-04 20:57:25 +0000
158@@ -13,15 +13,15 @@
159
160 Schema and ldif files are located in the server specific directories.
161
162-gentestusers.sh:
163+drizzle_create_ldap_user:
164
165 This is a script to quickly generate users for testing the drizzle mysql ldap authentication module. Note this is not the de facto way of doing things more of just a quick start example.
166
167-./gentestusers.sh -h
168+./drizzle_create_ldap_user -h
169 This will output help on how to use the file.
170
171 Example:
172-./gentestusers.sh -p pass -b ../libdrizzle/bin/mysql_password_hash -u user -n 1 -l "ou=people,dc=drizzle,dc=org"
173+./drizzle_create_ldap_user -p pass -b <drizzle installdir>/bin/drizzle_password_hash -u user -n 1 -l "ou=people,dc=drizzle,dc=org"
174
175 Will output:
176
177
178=== renamed file 'plugin/auth_ldap/schema/gentestusers.sh' => 'plugin/auth_ldap/schema/drizzle_create_ldap_user' (properties changed: -x to +x)
179=== renamed file 'plugin/auth_ldap/schema/openldap/drizzle.ldif' => 'plugin/auth_ldap/schema/openldap/drizzle_openldap.ldif'
180=== renamed file 'plugin/auth_ldap/schema/openldap/drizzle.schema' => 'plugin/auth_ldap/schema/openldap/drizzle_openldap.schema'