diff options
author | Russ Allbery <eagle@eyrie.org> | 2014-07-11 21:39:23 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2014-07-11 22:39:05 -0700 |
commit | 1575d5c34a2c6235bbf6a5010f8a8c142fe47079 (patch) | |
tree | 29e51ed64f28a37530ec0b21fc24b6d20de1d6ca | |
parent | da0aba21779529d98436e42323fc12f702390969 (diff) |
Switch to Module::Build for the Perl module
The wallet server now requires Perl 5.8 or later (instead of 5.006 in
previous versions) and is now built with Module::Build instead of
ExtUtils::MakeMaker. This should be transparent to anyone not working
with the source code, since Perl 5.8 was released in 2002, but
Module::Build is now required to build the wallet server. It is
included in some versions of Perl, or can be installed separately from
CPAN, distribution packages, or other sources.
Also reorganize the test suite to use subdirectories.
Change-Id: Id06120ba2bad1ebbfee3d8a48ca2f25869463165
Reviewed-on: https://gerrit.stanford.edu/1530
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | Makefile.am | 153 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | README | 15 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | perl/Build.PL | 46 | ||||
-rw-r--r-- | perl/MANIFEST | 84 | ||||
-rw-r--r-- | perl/MANIFEST.SKIP | 41 | ||||
-rw-r--r-- | perl/Makefile.PL.in | 18 | ||||
-rw-r--r-- | perl/lib/Wallet/ACL.pm (renamed from perl/Wallet/ACL.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/ACL/Base.pm (renamed from perl/Wallet/ACL/Base.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/ACL/Krb5.pm (renamed from perl/Wallet/ACL/Krb5.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/ACL/Krb5/Regex.pm (renamed from perl/Wallet/ACL/Krb5/Regex.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/ACL/LDAP/Attribute.pm (renamed from perl/Wallet/ACL/LDAP/Attribute.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/ACL/NetDB.pm (renamed from perl/Wallet/ACL/NetDB.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/ACL/NetDB/Root.pm (renamed from perl/Wallet/ACL/NetDB/Root.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Admin.pm (renamed from perl/Wallet/Admin.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Config.pm (renamed from perl/Wallet/Config.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Database.pm (renamed from perl/Wallet/Database.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Kadmin.pm (renamed from perl/Wallet/Kadmin.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Kadmin/Heimdal.pm (renamed from perl/Wallet/Kadmin/Heimdal.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Kadmin/MIT.pm (renamed from perl/Wallet/Kadmin/MIT.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Object/Base.pm (renamed from perl/Wallet/Object/Base.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Object/Duo.pm (renamed from perl/Wallet/Object/Duo.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Object/File.pm (renamed from perl/Wallet/Object/File.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Object/Keytab.pm (renamed from perl/Wallet/Object/Keytab.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Object/WAKeyring.pm (renamed from perl/Wallet/Object/WAKeyring.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Policy/Stanford.pm (renamed from perl/Wallet/Policy/Stanford.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Report.pm (renamed from perl/Wallet/Report.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema.pm (renamed from perl/Wallet/Schema.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/Acl.pm (renamed from perl/Wallet/Schema/Result/Acl.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/AclEntry.pm (renamed from perl/Wallet/Schema/Result/AclEntry.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/AclHistory.pm (renamed from perl/Wallet/Schema/Result/AclHistory.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/AclScheme.pm (renamed from perl/Wallet/Schema/Result/AclScheme.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/Duo.pm (renamed from perl/Wallet/Schema/Result/Duo.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/Enctype.pm (renamed from perl/Wallet/Schema/Result/Enctype.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/Flag.pm (renamed from perl/Wallet/Schema/Result/Flag.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/KeytabEnctype.pm (renamed from perl/Wallet/Schema/Result/KeytabEnctype.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/KeytabSync.pm (renamed from perl/Wallet/Schema/Result/KeytabSync.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/Object.pm (renamed from perl/Wallet/Schema/Result/Object.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/ObjectHistory.pm (renamed from perl/Wallet/Schema/Result/ObjectHistory.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/SyncTarget.pm (renamed from perl/Wallet/Schema/Result/SyncTarget.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Schema/Result/Type.pm (renamed from perl/Wallet/Schema/Result/Type.pm) | 0 | ||||
-rw-r--r-- | perl/lib/Wallet/Server.pm (renamed from perl/Wallet/Server.pm) | 0 | ||||
-rwxr-xr-x | perl/t/docs/pod-spelling.t (renamed from perl/t/pod-spelling.t) | 0 | ||||
-rwxr-xr-x | perl/t/docs/pod.t (renamed from perl/t/pod.t) | 0 | ||||
-rwxr-xr-x | perl/t/general/acl.t (renamed from perl/t/acl.t) | 0 | ||||
-rwxr-xr-x | perl/t/general/admin.t (renamed from perl/t/admin.t) | 0 | ||||
-rwxr-xr-x | perl/t/general/config.t (renamed from perl/t/config.t) | 0 | ||||
-rwxr-xr-x | perl/t/general/init.t (renamed from perl/t/init.t) | 0 | ||||
-rwxr-xr-x | perl/t/general/report.t (renamed from perl/t/report.t) | 0 | ||||
-rwxr-xr-x | perl/t/general/server.t (renamed from perl/t/server.t) | 0 | ||||
-rwxr-xr-x | perl/t/object/base.t (renamed from perl/t/object.t) | 0 | ||||
-rwxr-xr-x | perl/t/object/duo.t (renamed from perl/t/duo.t) | 0 | ||||
-rwxr-xr-x | perl/t/object/file.t (renamed from perl/t/file.t) | 0 | ||||
-rwxr-xr-x | perl/t/object/keytab.t (renamed from perl/t/keytab.t) | 0 | ||||
-rwxr-xr-x | perl/t/object/wa-keyring.t (renamed from perl/t/wa-keyring.t) | 0 | ||||
-rwxr-xr-x | perl/t/policy/stanford.t (renamed from perl/t/stanford-naming.t) | 0 | ||||
-rwxr-xr-x | perl/t/util/kadmin.t (renamed from perl/t/kadmin.t) | 0 | ||||
-rwxr-xr-x | perl/t/verifier/basic.t (renamed from perl/t/verifier.t) | 0 | ||||
-rwxr-xr-x | perl/t/verifier/ldap-attr.t (renamed from perl/t/verifier-ldap-attr.t) | 0 | ||||
-rwxr-xr-x | perl/t/verifier/netdb.t (renamed from perl/t/verifier-netdb.t) | 0 | ||||
-rw-r--r-- | tests/client/full-t.in | 2 | ||||
-rw-r--r-- | tests/client/prompt-t.in | 4 | ||||
-rwxr-xr-x | tests/data/cmd-wrapper | 2 |
65 files changed, 288 insertions, 93 deletions
@@ -9,16 +9,18 @@ /config.log /config.status /configure +/perl/Build /perl/MYMETA.json /perl/MYMETA.yml -/perl/Makefile.PL -/perl/Makefile.old +/perl/_build/ /perl/blib/ /perl/pm_to_blib /perl/t/data/test.keytab /perl/t/data/test.principal /perl/t/data/test.realm /perl/t/data/test.krbtype +/perl/t/lib/Test/RRA.pm +/perl/t/lib/Test/RRA/ /tests/client/basic-t /tests/client/full-t /tests/client/prompt-t diff --git a/Makefile.am b/Makefile.am index 82b84f7..19dbe11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,54 +6,78 @@ # # See LICENSE for licensing terms. +# These variables exist only for the use of the Debian packaging and similar +# situations and aren't normally set. We want to honor them if they're set +# in the environment, as well as via make arguments. +# +# WALLET_PERL_FLAGS are additional flags to pass to Build.PL when building +# the Makefile. +WALLET_PERL_FLAGS ?= + # These two lists of files are needed for Perl builds and for the test suite # and are not generated or touched by configure. They're listed here to be # added to EXTRA_DIST and so that they can be copied over properly for # builddir != srcdir builds. -PERL_FILES = perl/Wallet/ACL.pm perl/Wallet/ACL/Base.pm \ - perl/Wallet/ACL/Krb5.pm perl/Wallet/ACL/Krb5/Regex.pm \ - perl/Wallet/ACL/LDAP/Attribute.pm perl/Wallet/ACL/NetDB.pm \ - perl/Wallet/ACL/NetDB/Root.pm perl/Wallet/Admin.pm \ - perl/Wallet/Config.pm perl/Wallet/Database.pm perl/Wallet/Kadmin.pm \ - perl/Wallet/Kadmin/Heimdal.pm perl/Wallet/Kadmin/MIT.pm \ - perl/Wallet/Object/Base.pm perl/Wallet/Object/Duo.pm \ - perl/Wallet/Object/File.pm perl/Wallet/Object/Keytab.pm \ - perl/Wallet/Object/WAKeyring.pm perl/Wallet/Policy/Stanford.pm \ - perl/Wallet/Report.pm perl/Wallet/Schema.pm perl/Wallet/Server.pm \ - perl/Wallet/Schema/Result/Acl.pm \ - perl/Wallet/Schema/Result/AclEntry.pm \ - perl/Wallet/Schema/Result/AclHistory.pm \ - perl/Wallet/Schema/Result/AclScheme.pm \ - perl/Wallet/Schema/Result/Duo.pm \ - perl/Wallet/Schema/Result/Enctype.pm \ - perl/Wallet/Schema/Result/Flag.pm \ - perl/Wallet/Schema/Result/KeytabEnctype.pm \ - perl/Wallet/Schema/Result/KeytabSync.pm \ - perl/Wallet/Schema/Result/Object.pm \ - perl/Wallet/Schema/Result/ObjectHistory.pm \ - perl/Wallet/Schema/Result/SyncTarget.pm \ - perl/Wallet/Schema/Result/Type.pm \ - perl/sql/Wallet-Schema-0.07-0.08-MySQL.sql \ - perl/sql/Wallet-Schema-0.07-0.08-SQLite.sql \ - perl/sql/Wallet-Schema-0.07-MySQL.sql \ - perl/sql/Wallet-Schema-0.07-SQLite.sql \ - perl/sql/Wallet-Schema-0.08-0.09-MySQL.sql \ - perl/sql/Wallet-Schema-0.08-0.09-PostgreSQL.sql \ - perl/sql/Wallet-Schema-0.08-0.09-SQLite.sql \ - perl/sql/Wallet-Schema-0.08-MySQL.sql \ - perl/sql/Wallet-Schema-0.08-PostgreSQL.sql \ - perl/sql/Wallet-Schema-0.08-SQLite.sql \ - perl/sql/Wallet-Schema-0.09-MySQL.sql \ - perl/sql/Wallet-Schema-0.09-PostgreSQL.sql \ - perl/sql/Wallet-Schema-0.09-SQLite.sql perl/t/acl.t perl/t/admin.t \ - perl/t/config.t perl/t/data/README perl/t/data/duo/integration.json \ - perl/t/data/duo/keys.json perl/t/data/keytab-fake \ - perl/t/data/keytab.conf perl/t/data/netdb.conf \ - perl/t/data/netdb-fake perl/t/duo.t perl/t/file.t perl/t/init.t \ - perl/t/kadmin.t perl/t/keytab.t perl/t/lib/Util.pm perl/t/object.t \ - perl/t/pod-spelling.t perl/t/pod.t perl/t/report.t perl/t/server.t \ - perl/t/stanford-naming.t perl/t/verifier-ldap-attr.t \ - perl/t/verifier-netdb.t perl/t/verifier.t perl/t/wa-keyring.t +PERL_FILES = perl/Build.PL perl/MANIFEST perl/MANIFEST.SKIP \ + perl/lib/Wallet/ACL.pm perl/lib/Wallet/ACL/Base.pm \ + perl/lib/Wallet/ACL/Krb5.pm perl/lib/Wallet/ACL/Krb5/Regex.pm \ + perl/lib/Wallet/ACL/LDAP/Attribute.pm perl/lib/Wallet/ACL/NetDB.pm \ + perl/lib/Wallet/ACL/NetDB/Root.pm perl/lib/Wallet/Admin.pm \ + perl/lib/Wallet/Config.pm perl/lib/Wallet/Database.pm \ + perl/lib/Wallet/Kadmin.pm perl/lib/Wallet/Kadmin/Heimdal.pm \ + perl/lib/Wallet/Kadmin/MIT.pm perl/lib/Wallet/Object/Base.pm \ + perl/lib/Wallet/Object/Duo.pm perl/lib/Wallet/Object/File.pm \ + perl/lib/Wallet/Object/Keytab.pm \ + perl/lib/Wallet/Object/WAKeyring.pm \ + perl/lib/Wallet/Policy/Stanford.pm perl/lib/Wallet/Report.pm \ + perl/lib/Wallet/Schema.pm perl/lib/Wallet/Server.pm \ + perl/lib/Wallet/Schema/Result/Acl.pm \ + perl/lib/Wallet/Schema/Result/AclEntry.pm \ + perl/lib/Wallet/Schema/Result/AclHistory.pm \ + perl/lib/Wallet/Schema/Result/AclScheme.pm \ + perl/lib/Wallet/Schema/Result/Duo.pm \ + perl/lib/Wallet/Schema/Result/Enctype.pm \ + perl/lib/Wallet/Schema/Result/Flag.pm \ + perl/lib/Wallet/Schema/Result/KeytabEnctype.pm \ + perl/lib/Wallet/Schema/Result/KeytabSync.pm \ + perl/lib/Wallet/Schema/Result/Object.pm \ + perl/lib/Wallet/Schema/Result/ObjectHistory.pm \ + perl/lib/Wallet/Schema/Result/SyncTarget.pm \ + perl/lib/Wallet/Schema/Result/Type.pm \ + perl/sql/Wallet-Schema-0.07-0.08-MySQL.sql \ + perl/sql/Wallet-Schema-0.07-0.08-SQLite.sql \ + perl/sql/Wallet-Schema-0.07-MySQL.sql \ + perl/sql/Wallet-Schema-0.07-SQLite.sql \ + perl/sql/Wallet-Schema-0.08-0.09-MySQL.sql \ + perl/sql/Wallet-Schema-0.08-0.09-PostgreSQL.sql \ + perl/sql/Wallet-Schema-0.08-0.09-SQLite.sql \ + perl/sql/Wallet-Schema-0.08-MySQL.sql \ + perl/sql/Wallet-Schema-0.08-PostgreSQL.sql \ + perl/sql/Wallet-Schema-0.08-SQLite.sql \ + perl/sql/Wallet-Schema-0.09-MySQL.sql \ + perl/sql/Wallet-Schema-0.09-PostgreSQL.sql \ + perl/sql/Wallet-Schema-0.09-SQLite.sql perl/t/data/README \ + perl/t/data/duo/integration.json perl/t/data/duo/keys.json \ + perl/t/data/keytab-fake perl/t/data/keytab.conf \ + perl/t/data/netdb.conf perl/t/data/netdb-fake \ + perl/t/docs/pod-spelling.t perl/t/docs/pod.t perl/t/general/acl.t \ + perl/t/general/admin.t perl/t/general/config.t \ + perl/t/general/init.t perl/t/general/report.t \ + perl/t/general/server.t perl/t/lib/Util.pm perl/t/object/base.t \ + perl/t/object/duo.t perl/t/object/file.t perl/t/object/keytab.t \ + perl/t/object/wa-keyring.t perl/t/policy/stanford.t \ + perl/t/util/kadmin.t perl/t/verifier/basic.t \ + perl/t/verifier/ldap-attr.t perl/t/verifier/netdb.t + +# Directories that have to be created in builddir != srcdir builds before +# copying PERL_FILES over. +PERL_DIRECTORIES = perl perl/lib perl/lib/Wallet perl/lib/Wallet/ACL \ + perl/lib/Wallet/ACL/Krb5 perl/lib/Wallet/ACL/LDAP \ + perl/lib/Wallet/ACL/NetDB perl/lib/Wallet/Kadmin \ + perl/lib/Wallet/Object perl/lib/Wallet/Policy \ + perl/lib/Wallet/Schema perl/lib/Wallet/Schema/Result perl/sql \ + perl/t perl/t/data perl/t/docs perl/t/general perl/t/lib \ + perl/t/object perl/t/policy perl/t/util perl/t/verifier ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = .gitignore LICENSE autogen client/wallet.pod \ @@ -82,6 +106,7 @@ EXTRA_DIST = .gitignore LICENSE autogen client/wallet.pod \ tests/tap/perl/Test/RRA/Config.pm tests/tap/remctl.sh \ tests/util/xmalloc-t $(PERL_FILES) +# Supporting convenience libraries used by other targets. noinst_LIBRARIES = portable/libportable.a util/libutil.a portable_libportable_a_SOURCES = portable/dummy.c portable/krb5-extra.c \ portable/krb5.h portable/macros.h portable/stdbool.h \ @@ -93,11 +118,13 @@ util_libutil_a_SOURCES = util/macros.h util/messages-krb5.c \ util/xmalloc.h util_libutil_a_CPPFLAGS = $(KRB5_CPPFLAGS) +# The private library used by both wallet and wallet-rekey. noinst_LIBRARIES += client/libwallet.a client_libwallet_a_SOURCES = client/file.c client/internal.h client/keytab.c \ client/krb5.c client/options.c client/remctl.c client/srvtab.c client_libwallet_a_CPPFLAGS = $(REMCTL_CPPFLAGS) $(KRB5_CPPFLAGS) +# The client and server programs. bin_PROGRAMS = client/wallet client/wallet-rekey dist_sbin_SCRIPTS = server/keytab-backend server/wallet-admin \ server/wallet-backend server/wallet-report @@ -110,6 +137,7 @@ client_wallet_rekey_LDFLAGS = $(REMCTL_LDFLAGS) $(KRB5_LDFLAGS) client_wallet_rekey_LDADD = client/libwallet.a util/libutil.a \ portable/libportable.a $(REMCTL_LIBS) $(KRB5_LIBS) +# The manual pages. dist_man_MANS = client/wallet.1 client/wallet-rekey.1 server/keytab-backend.8 \ server/wallet-admin.8 server/wallet-backend.8 server/wallet-report.8 @@ -151,7 +179,8 @@ warnings: KRB5_CPPFLAGS='$(KRB5_CPPFLAGS_GCC)' $(check_PROGRAMS) # Remove some additional files. -DISTCLEANFILES = perl/Makefile +CLEANFILES = perl/t/lib/Test/RRA.pm perl/t/lib/Test/RRA/Automake.pm \ + perl/t/lib/Test/RRA/Config.pm MAINTAINERCLEANFILES = Makefile.in aclocal.m4 build-aux/compile \ build-aux/depcomp build-aux/install-sh build-aux/missing \ client/wallet.1 config.h.in config.h.in~ configure \ @@ -164,19 +193,18 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 build-aux/compile \ # packaging. all-local: perl/blib/lib/Wallet/Config.pm -perl/blib/lib/Wallet/Config.pm: - set -e; if [ x"$(builddir)" != x"$(srcdir)" ] ; then \ - mkdir perl/Wallet perl/Wallet/ACL perl/Wallet/ACL/Krb5 \ - perl/Wallet/ACL/LDAP perl/Wallet/ACL/NetDB \ - perl/Wallet/Kadmin perl/Wallet/Object perl/Wallet/Policy \ - perl/Wallet/Schema perl/Wallet/Schema/Result perl/sql perl/t \ - perl/t/data perl/t/lib 2>/dev/null || true ; \ - for f in $(PERL_FILES) ; do \ - cp "$(srcdir)/$$f" "$(builddir)/$$f" ; \ - done \ +perl/blib/lib/Wallet/Config.pm: $(srcdir)/perl/lib/Wallet/Config.pm + set -e; if [ x"$(builddir)" != x"$(srcdir)" ] ; then \ + for d in $(PERL_DIRECTORIES) ; do \ + [ -d "$(builddir)/$$d" ] || mkdir "$(builddir)/$$d" ; \ + done ; \ + for f in $(PERL_FILES) ; do \ + cp "$(srcdir)/$$f" "$(builddir)/$$f" ; \ + done ; \ fi - cd perl && perl Makefile.PL - cd perl && $(MAKE) + cp -R $(srcdir)/tests/tap/perl/* perl/t/lib/ + cd perl && perl Build.PL $(WALLET_PERL_FLAGS) + cd perl && ./Build install-data-local: if [ x"$(DESTDIR)" != x ] ; then \ @@ -187,13 +215,16 @@ install-data-local: # ExtUtils::MakeMaker really likes moving the Makefile aside. clean-local: - [ ! -f perl/Makefile ] || ( set -e; cd perl && $(MAKE) clean ) - cd perl && ( [ ! -f Makefile.old ] || mv Makefile.old Makefile ) + set -e; if [ -f "perl/Build" ] ; then \ + cd perl && ./Build realclean ; \ + fi # Remove the files that we copy over if and only if builddir != srcdir. distclean-local: set -e; if [ x"$(builddir)" != x"$(srcdir)" ] ; then \ - rm -f $(PERL_FILES) ; \ + for f in $(PERL_FILES) ; do \ + rm -f "$(builddir)/$$f" ; \ + done ; \ fi # The bits below are for the test suite, not for the main package. @@ -241,7 +272,7 @@ tests_util_xmalloc_LDADD = util/libutil.a portable/libportable.a check-local: $(check_PROGRAMS) cd tests && ./runtests -l $(abs_top_srcdir)/tests/TESTS @echo '' - cd perl && $(MAKE) test + cd perl && ./Build test # Alas, we have to disable this check because there's no way to do an # uninstall from Perl. @@ -39,6 +39,14 @@ wallet 1.1 (unreleased) and an incorrect linkage in the schema for the ACL history, and add indices for the object type, name, and ACL instead. + The wallet server now requires Perl 5.8 or later (instead of 5.006 in + previous versions) and is now built with Module::Build instead of + ExtUtils::MakeMaker. This should be transparent to anyone not working + with the source code, since Perl 5.8 was released in 2002, but + Module::Build is now required to build the wallet server. It is + included in some versions of Perl, or can be installed separately from + CPAN, distribution packages, or other sources. + Update to rra-c-util 5.5: * Use Lancaster Consensus environment variables to control tests. @@ -64,13 +64,14 @@ REQUIREMENTS The wallet client will build with either MIT Kerberos or Heimdal. - The wallet server is written in Perl and requires Perl 5.6.0 or later. - It uses DBIx::Class and DBI to talk to a database, and therefore the - DBIx::Class and DBI modules (and their dependencies) and a DBD module - for the database it will use must be installed. The SQL::Translator - Perl module is also required for schema deployment and database - upgrades. If the wallet server is used with a SQLite 3 database, the - Perl module DateTime::Format::SQLite should also be installed. + The wallet server is written in Perl and requires Perl 5.6.0 or later + plus Module::Build to build. It uses DBIx::Class and DBI to talk to a + database, and therefore the DBIx::Class and DBI modules (and their + dependencies) and a DBD module for the database it will use must be + installed. The SQL::Translator Perl module is also required for schema + deployment and database upgrades. If the wallet server is used with a + SQLite 3 database, the Perl module DateTime::Format::SQLite should also + be installed. Currently, the server has only been tested against SQLite 3, MySQL 5, and PostgreSQL, and prebuilt SQL files (for database upgrades) are only diff --git a/configure.ac b/configure.ac index b1b335d..d49c7b5 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,7 @@ AS_IF([test x"$REMCTLD" != x], dnl Output section. AC_CONFIG_HEADER([config.h]) -AC_CONFIG_FILES([Makefile perl/Makefile.PL]) +AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([tests/client/basic-t], [chmod +x tests/client/basic-t]) AC_CONFIG_FILES([tests/client/full-t], [chmod +x tests/client/full-t]) AC_CONFIG_FILES([tests/client/prompt-t], [chmod +x tests/client/prompt-t]) diff --git a/perl/Build.PL b/perl/Build.PL new file mode 100644 index 0000000..3d3bcdc --- /dev/null +++ b/perl/Build.PL @@ -0,0 +1,46 @@ +#!/usr/bin/perl +# +# Build script for the wallet distribution. +# +# Written by Russ Allbery <eagle@eyrie.org> +# Copyright 2014 +# The Board of Trustees of the Leland Stanford Junior University +# +# See LICENSE for licensing terms. + +use 5.006; +use strict; +use warnings; + +use Module::Build; + +# Basic package configuration. +my $build = Module::Build->new( + dist_abstract => 'Secure credential management system', + dist_author => 'Russ Allbery <eagle@eyrie.org>', + dist_name => 'Wallet', + dist_version => '1.01', + license => 'mit', + recursive_test_files => 1, + + # Other package relationships. + configure_requires => { 'Module::Build' => 0.28 }, + requires => { + 'DBIx::Class' => 0, + DBI => 0, + 'Digest::MD5' => 0, + 'SQL::Translator' => 0, + perl => '5.006', + }, + recommends => { + 'Authen::SASL' => 0, + 'Heimdal::Kadm5' => 0, + 'Net::Duo' => 0, + 'Net::LDAP' => 0, + 'Net::Remctl' => 0, + WebAuth => 0, + }, +); + +# Generate the build script. +$build->create_build_script; diff --git a/perl/MANIFEST b/perl/MANIFEST new file mode 100644 index 0000000..7f67987 --- /dev/null +++ b/perl/MANIFEST @@ -0,0 +1,84 @@ +Build.PL +create-ddl +lib/Wallet/ACL.pm +lib/Wallet/ACL/Base.pm +lib/Wallet/ACL/Krb5.pm +lib/Wallet/ACL/Krb5/Regex.pm +lib/Wallet/ACL/LDAP/Attribute.pm +lib/Wallet/ACL/NetDB.pm +lib/Wallet/ACL/NetDB/Root.pm +lib/Wallet/Admin.pm +lib/Wallet/Config.pm +lib/Wallet/Database.pm +lib/Wallet/Kadmin.pm +lib/Wallet/Kadmin/Heimdal.pm +lib/Wallet/Kadmin/MIT.pm +lib/Wallet/Object/Base.pm +lib/Wallet/Object/Duo.pm +lib/Wallet/Object/File.pm +lib/Wallet/Object/Keytab.pm +lib/Wallet/Object/WAKeyring.pm +lib/Wallet/Policy/Stanford.pm +lib/Wallet/Report.pm +lib/Wallet/Schema.pm +lib/Wallet/Schema/Result/Acl.pm +lib/Wallet/Schema/Result/AclEntry.pm +lib/Wallet/Schema/Result/AclHistory.pm +lib/Wallet/Schema/Result/AclScheme.pm +lib/Wallet/Schema/Result/Duo.pm +lib/Wallet/Schema/Result/Enctype.pm +lib/Wallet/Schema/Result/Flag.pm +lib/Wallet/Schema/Result/KeytabEnctype.pm +lib/Wallet/Schema/Result/KeytabSync.pm +lib/Wallet/Schema/Result/Object.pm +lib/Wallet/Schema/Result/ObjectHistory.pm +lib/Wallet/Schema/Result/SyncTarget.pm +lib/Wallet/Schema/Result/Type.pm +lib/Wallet/Server.pm +MANIFEST This list of files +MANIFEST.SKIP +sql/Wallet-Schema-0.07-0.08-MySQL.sql +sql/Wallet-Schema-0.07-0.08-SQLite.sql +sql/Wallet-Schema-0.07-MySQL.sql +sql/Wallet-Schema-0.07-SQLite.sql +sql/Wallet-Schema-0.08-0.09-MySQL.sql +sql/Wallet-Schema-0.08-0.09-PostgreSQL.sql +sql/Wallet-Schema-0.08-0.09-SQLite.sql +sql/Wallet-Schema-0.08-MySQL.sql +sql/Wallet-Schema-0.08-PostgreSQL.sql +sql/Wallet-Schema-0.08-SQLite.sql +sql/Wallet-Schema-0.09-MySQL.sql +sql/Wallet-Schema-0.09-PostgreSQL.sql +sql/Wallet-Schema-0.09-SQLite.sql +t/acl.t +t/admin.t +t/data/duo/integration.json +t/data/duo/keys.json +t/data/keytab-fake +t/data/keytab.conf +t/data/netdb-fake +t/data/netdb.conf +t/data/README +t/data/test.keytab +t/data/test.krbtype +t/data/test.principal +t/data/test.realm +t/duo.t +t/file.t +t/init.t +t/kadmin.t +t/keytab.t +t/lib/Test/RRA.pm +t/lib/Test/RRA/Automake.pm +t/lib/Test/RRA/Config.pm +t/lib/Util.pm +t/object.t +t/pod-spelling.t +t/pod.t +t/report.t +t/server.t +t/stanford-naming.t +t/verifier-ldap-attr.t +t/verifier-netdb.t +t/verifier.t +t/wa-keyring.t diff --git a/perl/MANIFEST.SKIP b/perl/MANIFEST.SKIP new file mode 100644 index 0000000..82fa711 --- /dev/null +++ b/perl/MANIFEST.SKIP @@ -0,0 +1,41 @@ +# -*- conf -*- + +# Avoid generated build files. +\bblib/ + +# Avoid Module::Build generated and utility files. +\bBuild$ +\b_build/ +\bBuild.bat$ +\bBuild.COM$ +\bBUILD.COM$ +\bbuild.com$ + +# Avoid temp and backup files. +~$ +\.old$ +\#$ +\b\.# +\.bak$ +\.tmp$ +\.# +\.rej$ + +# Avoid OS-specific files/dirs +# Mac OSX metadata +\B\.DS_Store +# Mac OSX SMB mount metadata files +\B\._ + +# Avoid Devel::Cover and Devel::CoverX::Covered files. +\bcover_db\b +\bcovered\b + +# Avoid MYMETA files +^MYMETA\. + +# Avoid archives of this distribution +\bWallet-[\d\.\_]+ + +# Avoid local test configuration files. +^t/config diff --git a/perl/Makefile.PL.in b/perl/Makefile.PL.in deleted file mode 100644 index a3038ae..0000000 --- a/perl/Makefile.PL.in +++ /dev/null @@ -1,18 +0,0 @@ -# Makefile.PL for the Wallet Perl library. -*- perl -*- - -use ExtUtils::MakeMaker; - -my $version = '@PACKAGE_VERSION@'; -$version =~ s/\.(\d)$/.0$1/; - -# Set a prefix for ExtUtils::MakeMaker if we were given one for configure. -my $prefix = "@prefix@"; - -WriteMakefile( - NAME => 'Wallet', - VERSION => $version, - ABSTRACT => 'Wallet: a secure credential management system', - AUTHOR => 'Russ Allbery (eagle@eyrie.org)', - (($prefix ne '/usr' && $prefix ne '/usr/local') ? - (PREFIX => $prefix) : ()) -); diff --git a/perl/Wallet/ACL.pm b/perl/lib/Wallet/ACL.pm index 808be3c..808be3c 100644 --- a/perl/Wallet/ACL.pm +++ b/perl/lib/Wallet/ACL.pm diff --git a/perl/Wallet/ACL/Base.pm b/perl/lib/Wallet/ACL/Base.pm index b6e4ce3..b6e4ce3 100644 --- a/perl/Wallet/ACL/Base.pm +++ b/perl/lib/Wallet/ACL/Base.pm diff --git a/perl/Wallet/ACL/Krb5.pm b/perl/lib/Wallet/ACL/Krb5.pm index ed0b7df..ed0b7df 100644 --- a/perl/Wallet/ACL/Krb5.pm +++ b/perl/lib/Wallet/ACL/Krb5.pm diff --git a/perl/Wallet/ACL/Krb5/Regex.pm b/perl/lib/Wallet/ACL/Krb5/Regex.pm index 30f5527..30f5527 100644 --- a/perl/Wallet/ACL/Krb5/Regex.pm +++ b/perl/lib/Wallet/ACL/Krb5/Regex.pm diff --git a/perl/Wallet/ACL/LDAP/Attribute.pm b/perl/lib/Wallet/ACL/LDAP/Attribute.pm index aea8a72..aea8a72 100644 --- a/perl/Wallet/ACL/LDAP/Attribute.pm +++ b/perl/lib/Wallet/ACL/LDAP/Attribute.pm diff --git a/perl/Wallet/ACL/NetDB.pm b/perl/lib/Wallet/ACL/NetDB.pm index b76d4ed..b76d4ed 100644 --- a/perl/Wallet/ACL/NetDB.pm +++ b/perl/lib/Wallet/ACL/NetDB.pm diff --git a/perl/Wallet/ACL/NetDB/Root.pm b/perl/lib/Wallet/ACL/NetDB/Root.pm index 6c95c6e..6c95c6e 100644 --- a/perl/Wallet/ACL/NetDB/Root.pm +++ b/perl/lib/Wallet/ACL/NetDB/Root.pm diff --git a/perl/Wallet/Admin.pm b/perl/lib/Wallet/Admin.pm index 3a05284..3a05284 100644 --- a/perl/Wallet/Admin.pm +++ b/perl/lib/Wallet/Admin.pm diff --git a/perl/Wallet/Config.pm b/perl/lib/Wallet/Config.pm index 5b0ab1c..5b0ab1c 100644 --- a/perl/Wallet/Config.pm +++ b/perl/lib/Wallet/Config.pm diff --git a/perl/Wallet/Database.pm b/perl/lib/Wallet/Database.pm index 031be9e..031be9e 100644 --- a/perl/Wallet/Database.pm +++ b/perl/lib/Wallet/Database.pm diff --git a/perl/Wallet/Kadmin.pm b/perl/lib/Wallet/Kadmin.pm index 4ea7920..4ea7920 100644 --- a/perl/Wallet/Kadmin.pm +++ b/perl/lib/Wallet/Kadmin.pm diff --git a/perl/Wallet/Kadmin/Heimdal.pm b/perl/lib/Wallet/Kadmin/Heimdal.pm index 42de8e0..42de8e0 100644 --- a/perl/Wallet/Kadmin/Heimdal.pm +++ b/perl/lib/Wallet/Kadmin/Heimdal.pm diff --git a/perl/Wallet/Kadmin/MIT.pm b/perl/lib/Wallet/Kadmin/MIT.pm index 1ae01bf..1ae01bf 100644 --- a/perl/Wallet/Kadmin/MIT.pm +++ b/perl/lib/Wallet/Kadmin/MIT.pm diff --git a/perl/Wallet/Object/Base.pm b/perl/lib/Wallet/Object/Base.pm index 8debac9..8debac9 100644 --- a/perl/Wallet/Object/Base.pm +++ b/perl/lib/Wallet/Object/Base.pm diff --git a/perl/Wallet/Object/Duo.pm b/perl/lib/Wallet/Object/Duo.pm index e5773c8..e5773c8 100644 --- a/perl/Wallet/Object/Duo.pm +++ b/perl/lib/Wallet/Object/Duo.pm diff --git a/perl/Wallet/Object/File.pm b/perl/lib/Wallet/Object/File.pm index 4afef04..4afef04 100644 --- a/perl/Wallet/Object/File.pm +++ b/perl/lib/Wallet/Object/File.pm diff --git a/perl/Wallet/Object/Keytab.pm b/perl/lib/Wallet/Object/Keytab.pm index 24c3302..24c3302 100644 --- a/perl/Wallet/Object/Keytab.pm +++ b/perl/lib/Wallet/Object/Keytab.pm diff --git a/perl/Wallet/Object/WAKeyring.pm b/perl/lib/Wallet/Object/WAKeyring.pm index f8bd0f7..f8bd0f7 100644 --- a/perl/Wallet/Object/WAKeyring.pm +++ b/perl/lib/Wallet/Object/WAKeyring.pm diff --git a/perl/Wallet/Policy/Stanford.pm b/perl/lib/Wallet/Policy/Stanford.pm index 5ac29e0..5ac29e0 100644 --- a/perl/Wallet/Policy/Stanford.pm +++ b/perl/lib/Wallet/Policy/Stanford.pm diff --git a/perl/Wallet/Report.pm b/perl/lib/Wallet/Report.pm index 1085546..1085546 100644 --- a/perl/Wallet/Report.pm +++ b/perl/lib/Wallet/Report.pm diff --git a/perl/Wallet/Schema.pm b/perl/lib/Wallet/Schema.pm index 74b4c99..74b4c99 100644 --- a/perl/Wallet/Schema.pm +++ b/perl/lib/Wallet/Schema.pm diff --git a/perl/Wallet/Schema/Result/Acl.pm b/perl/lib/Wallet/Schema/Result/Acl.pm index 226738a..226738a 100644 --- a/perl/Wallet/Schema/Result/Acl.pm +++ b/perl/lib/Wallet/Schema/Result/Acl.pm diff --git a/perl/Wallet/Schema/Result/AclEntry.pm b/perl/lib/Wallet/Schema/Result/AclEntry.pm index a33a98c..a33a98c 100644 --- a/perl/Wallet/Schema/Result/AclEntry.pm +++ b/perl/lib/Wallet/Schema/Result/AclEntry.pm diff --git a/perl/Wallet/Schema/Result/AclHistory.pm b/perl/lib/Wallet/Schema/Result/AclHistory.pm index 11593b7..11593b7 100644 --- a/perl/Wallet/Schema/Result/AclHistory.pm +++ b/perl/lib/Wallet/Schema/Result/AclHistory.pm diff --git a/perl/Wallet/Schema/Result/AclScheme.pm b/perl/lib/Wallet/Schema/Result/AclScheme.pm index 91a58b2..91a58b2 100644 --- a/perl/Wallet/Schema/Result/AclScheme.pm +++ b/perl/lib/Wallet/Schema/Result/AclScheme.pm diff --git a/perl/Wallet/Schema/Result/Duo.pm b/perl/lib/Wallet/Schema/Result/Duo.pm index 80a71dc..80a71dc 100644 --- a/perl/Wallet/Schema/Result/Duo.pm +++ b/perl/lib/Wallet/Schema/Result/Duo.pm diff --git a/perl/Wallet/Schema/Result/Enctype.pm b/perl/lib/Wallet/Schema/Result/Enctype.pm index 5733669..5733669 100644 --- a/perl/Wallet/Schema/Result/Enctype.pm +++ b/perl/lib/Wallet/Schema/Result/Enctype.pm diff --git a/perl/Wallet/Schema/Result/Flag.pm b/perl/lib/Wallet/Schema/Result/Flag.pm index e223ff8..e223ff8 100644 --- a/perl/Wallet/Schema/Result/Flag.pm +++ b/perl/lib/Wallet/Schema/Result/Flag.pm diff --git a/perl/Wallet/Schema/Result/KeytabEnctype.pm b/perl/lib/Wallet/Schema/Result/KeytabEnctype.pm index daea724..daea724 100644 --- a/perl/Wallet/Schema/Result/KeytabEnctype.pm +++ b/perl/lib/Wallet/Schema/Result/KeytabEnctype.pm diff --git a/perl/Wallet/Schema/Result/KeytabSync.pm b/perl/lib/Wallet/Schema/Result/KeytabSync.pm index ca84277..ca84277 100644 --- a/perl/Wallet/Schema/Result/KeytabSync.pm +++ b/perl/lib/Wallet/Schema/Result/KeytabSync.pm diff --git a/perl/Wallet/Schema/Result/Object.pm b/perl/lib/Wallet/Schema/Result/Object.pm index fd64e1b..fd64e1b 100644 --- a/perl/Wallet/Schema/Result/Object.pm +++ b/perl/lib/Wallet/Schema/Result/Object.pm diff --git a/perl/Wallet/Schema/Result/ObjectHistory.pm b/perl/lib/Wallet/Schema/Result/ObjectHistory.pm index 5e9c8bd..5e9c8bd 100644 --- a/perl/Wallet/Schema/Result/ObjectHistory.pm +++ b/perl/lib/Wallet/Schema/Result/ObjectHistory.pm diff --git a/perl/Wallet/Schema/Result/SyncTarget.pm b/perl/lib/Wallet/Schema/Result/SyncTarget.pm index 4300a54..4300a54 100644 --- a/perl/Wallet/Schema/Result/SyncTarget.pm +++ b/perl/lib/Wallet/Schema/Result/SyncTarget.pm diff --git a/perl/Wallet/Schema/Result/Type.pm b/perl/lib/Wallet/Schema/Result/Type.pm index 748a8a8..748a8a8 100644 --- a/perl/Wallet/Schema/Result/Type.pm +++ b/perl/lib/Wallet/Schema/Result/Type.pm diff --git a/perl/Wallet/Server.pm b/perl/lib/Wallet/Server.pm index 3266928..3266928 100644 --- a/perl/Wallet/Server.pm +++ b/perl/lib/Wallet/Server.pm diff --git a/perl/t/pod-spelling.t b/perl/t/docs/pod-spelling.t index 577a99e..577a99e 100755 --- a/perl/t/pod-spelling.t +++ b/perl/t/docs/pod-spelling.t diff --git a/perl/t/pod.t b/perl/t/docs/pod.t index dfcf88e..dfcf88e 100755 --- a/perl/t/pod.t +++ b/perl/t/docs/pod.t diff --git a/perl/t/acl.t b/perl/t/general/acl.t index e633f46..e633f46 100755 --- a/perl/t/acl.t +++ b/perl/t/general/acl.t diff --git a/perl/t/admin.t b/perl/t/general/admin.t index 41bc33a..41bc33a 100755 --- a/perl/t/admin.t +++ b/perl/t/general/admin.t diff --git a/perl/t/config.t b/perl/t/general/config.t index 881f2bd..881f2bd 100755 --- a/perl/t/config.t +++ b/perl/t/general/config.t diff --git a/perl/t/init.t b/perl/t/general/init.t index b8ec3c9..b8ec3c9 100755 --- a/perl/t/init.t +++ b/perl/t/general/init.t diff --git a/perl/t/report.t b/perl/t/general/report.t index 9563362..9563362 100755 --- a/perl/t/report.t +++ b/perl/t/general/report.t diff --git a/perl/t/server.t b/perl/t/general/server.t index 9026439..9026439 100755 --- a/perl/t/server.t +++ b/perl/t/general/server.t diff --git a/perl/t/object.t b/perl/t/object/base.t index 0432a23..0432a23 100755 --- a/perl/t/object.t +++ b/perl/t/object/base.t diff --git a/perl/t/duo.t b/perl/t/object/duo.t index 4229afe..4229afe 100755 --- a/perl/t/duo.t +++ b/perl/t/object/duo.t diff --git a/perl/t/file.t b/perl/t/object/file.t index 0aecd9d..0aecd9d 100755 --- a/perl/t/file.t +++ b/perl/t/object/file.t diff --git a/perl/t/keytab.t b/perl/t/object/keytab.t index 127762a..127762a 100755 --- a/perl/t/keytab.t +++ b/perl/t/object/keytab.t diff --git a/perl/t/wa-keyring.t b/perl/t/object/wa-keyring.t index 8d8e1fe..8d8e1fe 100755 --- a/perl/t/wa-keyring.t +++ b/perl/t/object/wa-keyring.t diff --git a/perl/t/stanford-naming.t b/perl/t/policy/stanford.t index 555086c..555086c 100755 --- a/perl/t/stanford-naming.t +++ b/perl/t/policy/stanford.t diff --git a/perl/t/kadmin.t b/perl/t/util/kadmin.t index 8eabc6b..8eabc6b 100755 --- a/perl/t/kadmin.t +++ b/perl/t/util/kadmin.t diff --git a/perl/t/verifier.t b/perl/t/verifier/basic.t index 5697ae6..5697ae6 100755 --- a/perl/t/verifier.t +++ b/perl/t/verifier/basic.t diff --git a/perl/t/verifier-ldap-attr.t b/perl/t/verifier/ldap-attr.t index d8e416b..d8e416b 100755 --- a/perl/t/verifier-ldap-attr.t +++ b/perl/t/verifier/ldap-attr.t diff --git a/perl/t/verifier-netdb.t b/perl/t/verifier/netdb.t index d8fe561..d8fe561 100755 --- a/perl/t/verifier-netdb.t +++ b/perl/t/verifier/netdb.t diff --git a/tests/client/full-t.in b/tests/client/full-t.in index b73a375..9822b37 100644 --- a/tests/client/full-t.in +++ b/tests/client/full-t.in @@ -15,7 +15,7 @@ BEGIN { $ENV{WALLET_CONFIG} = "$ENV{SOURCE}/data/wallet.conf" } BEGIN { our $total = 59 } use Test::More tests => $total; -use lib "$ENV{SOURCE}/../perl"; +use lib "$ENV{SOURCE}/../perl/lib"; use Wallet::Admin; use lib "$ENV{SOURCE}/../perl/t/lib"; diff --git a/tests/client/prompt-t.in b/tests/client/prompt-t.in index 566d1a4..8467411 100644 --- a/tests/client/prompt-t.in +++ b/tests/client/prompt-t.in @@ -3,7 +3,7 @@ # Password prompting tests for the wallet client. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2008, 2010 +# Copyright 2008, 2010, 2014 # The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -11,7 +11,7 @@ BEGIN { our $total = 5 } use Test::More tests => $total; -use lib "$ENV{SOURCE}/..//perl"; +use lib "$ENV{SOURCE}/../perl/lib"; use Wallet::Admin; use lib "$ENV{SOURCE}/../perl/t/lib"; diff --git a/tests/data/cmd-wrapper b/tests/data/cmd-wrapper index 79b1943..b5b6d26 100755 --- a/tests/data/cmd-wrapper +++ b/tests/data/cmd-wrapper @@ -5,4 +5,4 @@ WALLET_CONFIG="$SOURCE/data/wallet.conf" export WALLET_CONFIG -exec perl -I"$SOURCE/../perl" "$SOURCE/../server/wallet-backend" -q "$@" +exec perl -I"$SOURCE/../perl/lib" "$SOURCE/../server/wallet-backend" -q "$@" |