[open-ils-commits] r17642 - in branches/rel_2_0: . Open-ILS/examples/apache Open-ILS/src Open-ILS/src/extras Open-ILS/src/perlmods/OpenILS/Utils Open-ILS/src/support-scripts Open-ILS/web (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Sep 13 17:18:51 EDT 2010


Author: dbs
Date: 2010-09-13 17:18:45 -0400 (Mon, 13 Sep 2010)
New Revision: 17642

Removed:
   branches/rel_2_0/Open-ILS/src/cgi-bin/
Modified:
   branches/rel_2_0/Open-ILS/examples/apache/eg.conf
   branches/rel_2_0/Open-ILS/src/extras/Makefile.install
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Utils/OfflineStore.pm
   branches/rel_2_0/Open-ILS/src/support-scripts/eg_db_config.pl
   branches/rel_2_0/Open-ILS/web/Makefile.am
   branches/rel_2_0/README
Log:
Merge r17574, r17575, r17584, r17585, r17628, r17639 from trunk to delete deprecated cgi-bin configuration interfaces

The CGI interfaces have not been maintained; the interfaces available through 
the Admin -> Server Administration menu in the staff client are the recommended 
method for setting up new libraries in the organizational hierarchy, 
permissions, copy statuses, and circulation rules. 

Note that an adjustment to eg.conf is recommended to point to the 
offline.pl script, which is the only remaining CGI script in use; this 
should avoid conflicting Apache definitions for the /cgi-bin/ alias. 

Most modern systems will install Class::DBI::Frozen::301 to avoid 
conflicts with incompatible Class::DBI packages. We need to teach 
offline.pl how to use Class::DBI::Frozen::301 if it is available. 

Note that we're using "use parent" instead of "use base" per the 
recommendation of "perldoc base"; accordingly, we're adding the 
system prerequisite for the parent pragma. 


Modified: branches/rel_2_0/Open-ILS/examples/apache/eg.conf
===================================================================
--- branches/rel_2_0/Open-ILS/examples/apache/eg.conf	2010-09-13 21:09:24 UTC (rev 17641)
+++ branches/rel_2_0/Open-ILS/examples/apache/eg.conf	2010-09-13 21:18:45 UTC (rev 17642)
@@ -53,8 +53,8 @@
 # ----------------------------------------------------------------------------------
 # System config CGI scripts go here
 # ----------------------------------------------------------------------------------
-Alias /cgi-bin/ "/openils/var/cgi-bin/"
-<Directory "/openils/var/cgi-bin">
+Alias /cgi-bin/offline/ "/openils/var/cgi-bin/offline/"
+<Directory "/openils/var/cgi-bin/offline">
 	AddHandler cgi-script .cgi .pl
 	AllowOverride None
 	Options None

Modified: branches/rel_2_0/Open-ILS/src/extras/Makefile.install
===================================================================
--- branches/rel_2_0/Open-ILS/src/extras/Makefile.install	2010-09-13 21:09:24 UTC (rev 17641)
+++ branches/rel_2_0/Open-ILS/src/extras/Makefile.install	2010-09-13 21:18:45 UTC (rev 17642)
@@ -91,6 +91,7 @@
 	libnet-server-perl\
 	libnspr4-dev\
 	libole-storage-lite-perl\
+	libparent-perl \
 	libpq-dev\
 	libreadline5-dev\
 	libspreadsheet-writeexcel-perl\
@@ -162,6 +163,7 @@
 	mod_ssl \
 	ncurses-devel \
 	ncurses-libs \
+	perl-parent \
 	perl-Business-CreditCard \
 	perl-Business-ISBN \
 	perl-Business-ISBN-Data \

Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Utils/OfflineStore.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Utils/OfflineStore.pm	2010-09-13 21:09:24 UTC (rev 17641)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Utils/OfflineStore.pm	2010-09-13 21:18:45 UTC (rev 17642)
@@ -1,6 +1,15 @@
 package OpenILS::Utils::OfflineStore;
 use strict; use warnings;
-use base 'Class::DBI';
+
+use UNIVERSAL::require;
+if ('Class::DBI::Frozen::301'->use) {
+	use parent 'Class::DBI::Frozen::301';
+} elsif ('Class::DBI'->use) {
+	use parent 'Class::DBI';
+} else {
+	die $@;
+}
+
 use DBI;
 use OpenSRF::Utils::Config;
 
@@ -40,7 +49,7 @@
 
 
 package OpenILS::Utils::OfflineStore::Session;
-use base 'OpenILS::Utils::OfflineStore';
+use parent 'OpenILS::Utils::OfflineStore';
 
 sub _create_table {
 	my $self = shift;
@@ -71,7 +80,7 @@
 
 
 package OpenILS::Utils::OfflineStore::Script;
-use base 'OpenILS::Utils::OfflineStore';
+use parent 'OpenILS::Utils::OfflineStore';
 
 sub _create_table {
 	my $self = shift;

Modified: branches/rel_2_0/Open-ILS/src/support-scripts/eg_db_config.pl
===================================================================
--- branches/rel_2_0/Open-ILS/src/support-scripts/eg_db_config.pl	2010-09-13 21:09:24 UTC (rev 17641)
+++ branches/rel_2_0/Open-ILS/src/support-scripts/eg_db_config.pl	2010-09-13 21:18:45 UTC (rev 17642)
@@ -27,7 +27,6 @@
 my ($dbhost, $dbport, $dbname, $dbuser, $dbpw, $help);
 my $config_file = '';
 my $build_db_sh = '';
-my $bootstrap_file = '';
 my $offline_file = '';
 my $prefix = '';
 my $sysconfdir = '';
@@ -77,24 +76,6 @@
 		die "ERROR: Failed to update the configuration file '$config_file'\n";
 }
 
-# write out the DB bootstrapping config
-sub create_db_bootstrap {
-	my ($setup, $settings) = @_;
-
-	open(FH, '>', $setup) or die "Could not write database setup to $setup\n";
-
-	print "Writing database bootstrapping configuration to $setup\n";
-
-	printf FH "\$main::config{dsn} = 'dbi:Pg:host=%s;dbname=%s;port=%d';\n",
-		$settings->{host}, $settings->{db}, $settings->{port};
-
-	printf FH "\$main::config{usr} = '%s';\n", $settings->{user};
-	printf FH "\$main::config{pw} = '%s';\n", $settings->{pw};
-	
-	print FH "\$main::config{index} = 'config.cgi';\n";
-	close(FH);
-}
-
 # write out the offline config
 sub create_offline_config {
 	my ($setup, $settings) = @_;
@@ -149,17 +130,14 @@
 	chdir($script_dir);
 }
 
-my $bootstrap;
 my $offline;
 my $cschema;
 my $uconfig;
 my %settings;
 
 GetOptions("create-schema" => \$cschema, 
-		"create-bootstrap" => \$bootstrap,
 		"create-offline" => \$offline,
 		"update-config" => \$uconfig,
-		"bootstrap-file=s" => \$bootstrap_file,
 		"config-file=s" => \$config_file,
 		"build-db-file=s" => \$build_db_sh,
 		"service=s" => \@services,
@@ -194,10 +172,6 @@
 	$build_db_sh = File::Spec->catfile($script_dir, '../sql/Pg/build-db.sh');
 }
 
-if (!$bootstrap_file) {
-	$bootstrap_file = File::Spec->catfile($sysconfdir, 'live-db-setup.pl');
-}
-
 if (!$offline_file) {
 	$offline_file = File::Spec->catfile($sysconfdir, 'offline-config.pl');
 }
@@ -211,10 +185,9 @@
 get_settings(\%settings);
 
 if ($cschema) { create_schema(\%settings); }
-if ($bootstrap) { create_db_bootstrap($bootstrap_file, \%settings); }
 if ($offline) { create_offline_config($offline_file, \%settings); }
 
-if ((!$cschema && !$uconfig && !$bootstrap && !$offline) || $help) {
+if ((!$cschema && !$uconfig && !$offline) || $help) {
 	print <<HERE;
 
 SYNOPSIS
@@ -230,10 +203,6 @@
     --config-file
         specifies the opensrf.xml file. Defaults to /openils/conf/opensrf.xml
 
-    --bootstrap-file
-        specifies the database bootstrap file required by the CGI setup
-        interface. Defaults to /openils/conf/live-db-setup.pl
-
     --build-db-file
         specifies the script that creates the database schema. Defaults to
         Open-ILS/src/sql/pg/build-db.sh
@@ -247,9 +216,6 @@
         Configures Evergreen database settings in the file specified by
         --build-db-file.  
 
-    --create-bootstrap
-        Creates the database bootstrap file required by the CGI setup interface
-
     --create-offline
         Creates the database setting file required by the offline data uploader
 
@@ -287,7 +253,7 @@
    script with a complete set of commands:
 
    perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \
-       --service all --create-schema --create-bootstrap --create-offline \
+       --service all --create-schema --create-offline \
        --user evergreen --password evergreen --hostname localhost --port 5432 \
        --database evergreen 
 

Modified: branches/rel_2_0/Open-ILS/web/Makefile.am
===================================================================
--- branches/rel_2_0/Open-ILS/web/Makefile.am	2010-09-13 21:09:24 UTC (rev 17641)
+++ branches/rel_2_0/Open-ILS/web/Makefile.am	2010-09-13 21:18:45 UTC (rev 17642)
@@ -11,7 +11,7 @@
 reportsdir = $(DESTDIR)$(WEBDIR)/reports/
 
 if BUILDILSWEB
-OILSWEB_INST = webcore-install offline-install cgi-bootstrap
+OILSWEB_INST = webcore-install offline-install
 
 #webcore-install
 
@@ -32,7 +32,7 @@
 	     $(OPENSRF_LIBS)/javascript/opensrf_xmpp.js
 endif
 
-install-exec-local: webcore-install offline-install cgi-bootstrap
+install-exec-local: webcore-install offline-install
 
 uninstall-hook:
 	rm -R $(opacextrasdir)
@@ -68,15 +68,6 @@
 	cp $(TMP)/offline.pl $(DESTDIR)$(CGIDIR)/offline/
 	chmod +x $(DESTDIR)$(CGIDIR)/offline/offline.pl
 
-cgi-bootstrap:
-	@echo "Installing cgi's to $(DESTDIR)$(CGIDIR)"
-	$(MKDIR_P) $(TMP)/cgi-bin
-	$(MKDIR_P) $(DESTDIR)$(CGIDIR)
-	for i in @top_srcdir@/Open-ILS/src/cgi-bin/*cgi; do xxx=`basename $$i`; perl -pe "s{##CONFIG##}{@sysconfdir@}" < $$i > $(TMP)/cgi-bin/$$xxx; done
-	cp $(TMP)/cgi-bin/*cgi $(DESTDIR)$(CGIDIR)
-	cp -r @top_srcdir@/Open-ILS/src/cgi-bin/support $(DESTDIR)$(CGIDIR)
-	chmod 755 $(DESTDIR)$(CGIDIR)/*cgi
-
 install-data-local:
 	$(MKDIR_P) $(DESTDIR)$(WEBDIR)/opac/common/js
 	for i in $(OPACJS); do \

Modified: branches/rel_2_0/README
===================================================================
--- branches/rel_2_0/README	2010-09-13 21:09:24 UTC (rev 17641)
+++ branches/rel_2_0/README	2010-09-13 21:18:45 UTC (rev 17642)
@@ -47,7 +47,7 @@
 
 This will install Evergreen, including example configuration files in
 /openils/conf/ that you can use as templates for your own configuration files.
-The STAFF_CLIENT_BUILD_ID variable stamps the server-side and client-side files
+The STAFF_CLIENT_STAMP_ID variable stamps the server-side and client-side files
 for the staff client to ensure that they match.
 
 Install Dojo Toolkit:
@@ -125,7 +125,7 @@
 commands, we assume that you are working with PostgreSQL 8.4 on a Debian-based
 system:
 
-createdb -E UNICODE evergreen
+createdb -t template0 -E UNICODE evergreen
 createlang plperl evergreen
 createlang plperlu evergreen
 createlang plpgsql evergreen
@@ -147,7 +147,7 @@
 with the appropriate values for your PostgreSQL database:
 
 perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \
-       --service all --create-schema --create-bootstrap --create-offline \
+       --service all --create-schema --create-offline \
        --user <user> --password <password> --hostname <hostname> --port <port> \
        --database <dbname>
 



More information about the open-ils-commits mailing list