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

Proposed by Henrik Ingo
Status: Merged
Approved by: Brian Aker
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 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
=== modified file '.bzrignore'
--- .bzrignore 2011-08-04 08:13:04 +0000
+++ .bzrignore 2011-10-04 20:57:25 +0000
@@ -167,6 +167,7 @@
167key.gcno167key.gcno
168key_map.gcno168key_map.gcno
169libdrizzle-2.0/libdrizzle/mysql_password_hash169libdrizzle-2.0/libdrizzle/mysql_password_hash
170libdrizzle-2.0/libdrizzle/drizzle_password_hash
170libmysql/Makefile.in171libmysql/Makefile.in
171libserialutil_la-db.gcno172libserialutil_la-db.gcno
172libserialutil_la-unireg.gcno173libserialutil_la-unireg.gcno
173174
=== modified file 'Makefile.am'
--- Makefile.am 2011-08-16 01:07:54 +0000
+++ Makefile.am 2011-10-04 20:57:25 +0000
@@ -16,14 +16,20 @@
16ACLOCAL_AMFLAGS = -I m4 --force16ACLOCAL_AMFLAGS = -I m4 --force
1717
18# includes append to these:18# includes append to these:
19# Pandora build system takes input from plugin.ini files that are appended to these
20# Corresponding Pandora parameter names are mentioned in comments
21# A few directory targets (libexec/ and etc/) are unused as of this writing and
22# therefore commented out. pandora-build will support them if you uncomment.
19SUFFIXES =23SUFFIXES =
20TESTS =24TESTS =
21check_PROGRAMS =25check_PROGRAMS =
26# headers
22noinst_HEADERS =27noinst_HEADERS =
23nobase_nodist_include_HEADERS =28nobase_nodist_include_HEADERS =
24nobase_dist_include_HEADERS =29nobase_dist_include_HEADERS =
25dist_include_HEADERS =30dist_include_HEADERS =
26nobase_nodist_pkginclude_HEADERS =31nobase_nodist_pkginclude_HEADERS =
32# install_headers
27nobase_dist_pkginclude_HEADERS =33nobase_dist_pkginclude_HEADERS =
28dist_pkginclude_HEADERS =34dist_pkginclude_HEADERS =
29sbin_PROGRAMS =35sbin_PROGRAMS =
@@ -35,6 +41,21 @@
35man_MANS =41man_MANS =
36bin_PROGRAMS =42bin_PROGRAMS =
3743
44# scripts or bin_scripts
45dist_bin_SCRIPTS=
46# sbin_scripts
47dist_sbin_SCRIPTS=
48# libexec_scripts
49#dist_libexec_SCRIPTS=
50# pkg_scripts
51dist_pkgdata_SCRIPTS=
52# data
53dist_data_DATA=
54# pkg_data
55dist_pkgdata_DATA=
56# sysconf_data
57#dist_sysconf_DATA=
58
38VERSION=$(PANDORA_RELEASE_VERSION)59VERSION=$(PANDORA_RELEASE_VERSION)
3960
40SUBDIRS = .61SUBDIRS = .
4162
=== modified file 'config/pandora-plugin'
--- config/pandora-plugin 2011-02-28 18:00:50 +0000
+++ config/pandora-plugin 2011-10-04 20:57:25 +0000
@@ -365,7 +365,23 @@
365365
366 if plugin.has_key('extra_dist'):366 if plugin.has_key('extra_dist'):
367 plugin['extra_dist']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['extra_dist'].split()])367 plugin['extra_dist']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['extra_dist'].split()])
368368 if plugin.has_key('bin_scripts'):
369 plugin['bin_scripts']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['bin_scripts'].split()])
370 if plugin.has_key('scripts'):
371 plugin['scripts']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['scripts'].split()])
372 if plugin.has_key('sbin_scripts'):
373 plugin['sbin_scripts']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['sbin_scripts'].split()])
374 if plugin.has_key('libexec_scripts'):
375 plugin['libexec_scripts']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['libexec_scripts'].split()])
376 if plugin.has_key('pkg_scripts'):
377 plugin['pkg_scripts']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['pkg_scripts'].split()])
378 if plugin.has_key('data'):
379 plugin['data']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['data'].split()])
380 if plugin.has_key('pkg_data'):
381 plugin['pkg_data']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['pkg_data'].split()])
382 if plugin.has_key('sysconf_data'):
383 plugin['sysconf_data']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['sysconf_data'].split()])
384
369385
370 if plugin['static']:386 if plugin['static']:
371 plugin['static_yesno']="yes"387 plugin['static_yesno']="yes"
@@ -534,6 +550,22 @@
534""" % plugin)550""" % plugin)
535 if plugin.has_key('extra_dist') and plugin['extra_dist'] != "":551 if plugin.has_key('extra_dist') and plugin['extra_dist'] != "":
536 plugin_am.write("EXTRA_DIST += %(extra_dist)s\n" % plugin)552 plugin_am.write("EXTRA_DIST += %(extra_dist)s\n" % plugin)
553 if plugin.has_key('bin_scripts') and plugin['bin_scripts'] != "":
554 plugin_am.write("dist_bin_SCRIPTS += %(bin_scripts)s\n" % plugin)
555 if plugin.has_key('scripts') and plugin['scripts'] != "":
556 plugin_am.write("dist_bin_SCRIPTS += %(scripts)s\n" % plugin)
557 if plugin.has_key('sbin_scripts') and plugin['sbin_scripts'] != "":
558 plugin_am.write("dist_sbin_SCRIPTS += %(sbin_scripts)s\n" % plugin)
559 if plugin.has_key('libexec_scripts') and plugin['libexec_scripts'] != "":
560 plugin_am.write("dist_libexec_SCRIPTS += %(libexec_scripts)s\n" % plugin)
561 if plugin.has_key('pkg_scripts') and plugin['pkg_scripts'] != "":
562 plugin_am.write("dist_pkgdata_SCRIPTS += %(pkg_scripts)s\n" % plugin)
563 if plugin.has_key('data') and plugin['data'] != "":
564 plugin_am.write("dist_data_DATA += %(data)s\n" % plugin)
565 if plugin.has_key('pkg_data') and plugin['pkg_data'] != "":
566 plugin_am.write("dist_pkgdata_DATA += %(pkg_data)s\n" % plugin)
567 if plugin.has_key('sysconf_data') and plugin['sysconf_data'] != "":
568 plugin_am.write("dist_sysconf_DATA += %(sysconf_data)s\n" % plugin)
537 if plugin['headers'] != "":569 if plugin['headers'] != "":
538 plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin)570 plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin)
539 if plugin['install_headers'] != "":571 if plugin['install_headers'] != "":
540572
=== modified file 'libdrizzle-2.0/libdrizzle/include.am'
--- libdrizzle-2.0/libdrizzle/include.am 2011-06-15 17:51:40 +0000
+++ libdrizzle-2.0/libdrizzle/include.am 2011-10-04 20:57:25 +0000
@@ -40,11 +40,21 @@
40endif40endif
4141
42noinst_PROGRAMS+= \42noinst_PROGRAMS+= \
43 libdrizzle-2.0/libdrizzle/mysql_password_hash43 libdrizzle-2.0/libdrizzle/mysql_password_hash
44libdrizzle_2_0_libdrizzle_mysql_password_hash_CXXFLAGS= ${AM_CXXFLAGS} ${LIBDRIZZLE_CPPFLAGS}44libdrizzle_2_0_libdrizzle_mysql_password_hash_CXXFLAGS= ${AM_CXXFLAGS} ${LIBDRIZZLE_CPPFLAGS}
45libdrizzle_2_0_libdrizzle_mysql_password_hash_LDADD= libdrizzle-2.0/libdrizzle/libdrizzle-2.0.la45libdrizzle_2_0_libdrizzle_mysql_password_hash_LDADD= libdrizzle-2.0/libdrizzle/libdrizzle-2.0.la
46libdrizzle_2_0_libdrizzle_mysql_password_hash_SOURCES= libdrizzle-2.0/libdrizzle/mysql_password_hash.cc46libdrizzle_2_0_libdrizzle_mysql_password_hash_SOURCES= libdrizzle-2.0/libdrizzle/mysql_password_hash.cc
4747
48# For some reason this has originally been called mysql_password_hash. I'd prefer
49# to call it drizzle_password_hash but to remain backward compatible I didn't
50# change any sources, rather just build it twice and provide both.
51# Only drizzle_password_hash is installed by make install though.
52bin_PROGRAMS+= \
53 libdrizzle-2.0/libdrizzle/drizzle_password_hash
54libdrizzle_2_0_libdrizzle_drizzle_password_hash_CXXFLAGS= ${AM_CXXFLAGS} ${LIBDRIZZLE_CPPFLAGS}
55libdrizzle_2_0_libdrizzle_drizzle_password_hash_LDADD= libdrizzle-2.0/libdrizzle/libdrizzle-2.0.la
56libdrizzle_2_0_libdrizzle_drizzle_password_hash_SOURCES= libdrizzle-2.0/libdrizzle/mysql_password_hash.cc
57
48noinst_PROGRAMS+= \58noinst_PROGRAMS+= \
49 examples/client \59 examples/client \
50 examples/simple \60 examples/simple \
5161
=== modified file 'plugin/auth_ldap/plugin.ini'
--- plugin/auth_ldap/plugin.ini 2010-08-17 20:57:43 +0000
+++ plugin/auth_ldap/plugin.ini 2011-10-04 20:57:25 +0000
@@ -6,8 +6,6 @@
6license=PLUGIN_LICENSE_GPL6license=PLUGIN_LICENSE_GPL
7build_conditional="x${ac_cv_libldap}" = "xyes"7build_conditional="x${ac_cv_libldap}" = "xyes"
8ldflags=${LTLIBLDAP}8ldflags=${LTLIBLDAP}
9extra_dist=schema/README9pkg_scripts= schema/drizzle_create_ldap_user
10 schema/gentestusers.sh10pkg_data= schema/README.auth_ldap schema/openldap/drizzle_openldap.ldif schema/openldap/drizzle_openldap.schema
11 schema/openldap/drizzle.ldif11extra_dist=test_ldap.sh
12 schema/openldap/drizzle.schema
13 test_ldap.sh
1412
=== renamed file 'plugin/auth_ldap/schema/README' => 'plugin/auth_ldap/schema/README.auth_ldap'
--- plugin/auth_ldap/schema/README 2010-05-05 20:49:48 +0000
+++ plugin/auth_ldap/schema/README.auth_ldap 2011-10-04 20:57:25 +0000
@@ -13,15 +13,15 @@
1313
14Schema and ldif files are located in the server specific directories. 14Schema and ldif files are located in the server specific directories.
1515
16gentestusers.sh:16drizzle_create_ldap_user:
1717
18 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.18 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.
1919
20./gentestusers.sh -h 20./drizzle_create_ldap_user -h
21 This will output help on how to use the file.21 This will output help on how to use the file.
2222
23Example:23Example:
24./gentestusers.sh -p pass -b ../libdrizzle/bin/mysql_password_hash -u user -n 1 -l "ou=people,dc=drizzle,dc=org"24./drizzle_create_ldap_user -p pass -b <drizzle installdir>/bin/drizzle_password_hash -u user -n 1 -l "ou=people,dc=drizzle,dc=org"
2525
26Will output:26Will output:
2727
2828
=== renamed file 'plugin/auth_ldap/schema/gentestusers.sh' => 'plugin/auth_ldap/schema/drizzle_create_ldap_user' (properties changed: -x to +x)
=== renamed file 'plugin/auth_ldap/schema/openldap/drizzle.ldif' => 'plugin/auth_ldap/schema/openldap/drizzle_openldap.ldif'
=== renamed file 'plugin/auth_ldap/schema/openldap/drizzle.schema' => 'plugin/auth_ldap/schema/openldap/drizzle_openldap.schema'