From f0a14b711377b8c000de2114d2d87efc8aac0f3d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 30 May 2013 23:01:33 -0400 Subject: v4 v5: version & changelog --- data/doc/sisu/CHANGELOG_v4 | 7 +++++++ data/doc/sisu/CHANGELOG_v5 | 7 +++++++ data/sisu/v4/v/version.yml | 6 +++--- data/sisu/v5/v/version.yml | 6 +++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 5a39dd6f..09c0bd41 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -23,6 +23,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 4.1.3.orig.tar.xz (2013-05-30:21/4) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.1.3 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.1.3-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_4.1.3.orig.tar.xz + sisu_4.1.3.orig.tar.xz + sisu_4.1.3-1.dsc + %% 4.1.2.orig.tar.xz (2013-05-29:21/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.1.2 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.1.2-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 7e788f54..3850e5c3 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -23,6 +23,13 @@ v2 branch is removed; it is available in sisu =< 3.3.2 %% Reverse Chronological: +%% 5.0.3.orig.tar.xz (2013-05-30:21/4) +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.3 +http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.3-1 +http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.3.orig.tar.xz + sisu_5.0.3.orig.tar.xz + sisu_5.0.3-1.dsc + %% 5.0.2.orig.tar.xz (2013-05-29:21/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.2 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.2-1 diff --git a/data/sisu/v4/v/version.yml b/data/sisu/v4/v/version.yml index 6bf1fee5..e7619f1b 100644 --- a/data/sisu/v4/v/version.yml +++ b/data/sisu/v4/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 4.1.2 -:date_stamp: 2013w21/3 -:date: "2013-05-29" +:version: 4.1.3 +:date_stamp: 2013w21/4 +:date: "2013-05-30" :project: SiSU diff --git a/data/sisu/v5/v/version.yml b/data/sisu/v5/v/version.yml index 87d04e76..5b6e4fee 100644 --- a/data/sisu/v5/v/version.yml +++ b/data/sisu/v5/v/version.yml @@ -1,5 +1,5 @@ --- -:version: 5.0.2 -:date_stamp: 2013w21/3 -:date: "2013-05-29" +:version: 5.0.3 +:date_stamp: 2013w21/4 +:date: "2013-05-30" :project: SiSU -- cgit v1.2.3 From 462a53a0af3d35952d435716adfacda0029bddd4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 30 May 2013 23:06:45 -0400 Subject: v4 v5: sysenv, pgsql db connect fix --- data/doc/sisu/CHANGELOG_v4 | 2 ++ data/doc/sisu/CHANGELOG_v5 | 2 ++ lib/sisu/v4/sysenv.rb | 8 +++++--- lib/sisu/v5/sysenv.rb | 8 +++++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 09c0bd41..25dd47f9 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.1.3.orig.tar.xz sisu_4.1.3.orig.tar.xz sisu_4.1.3-1.dsc +* sysenv, pgsql db connect fix + %% 4.1.2.orig.tar.xz (2013-05-29:21/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.1.2 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.1.2-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 3850e5c3..bd49d0a1 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -30,6 +30,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.3.orig.tar.xz sisu_5.0.3.orig.tar.xz sisu_5.0.3-1.dsc +* sysenv, pgsql db connect fix + %% 5.0.2.orig.tar.xz (2013-05-29:21/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.2 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.2-1 diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index 6bc97396..f95622b5 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -4067,10 +4067,12 @@ WOK self end def psql - def user(opt) - if opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/ + def user(opt=nil) + x=if opt \ + and opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/ m=$1 - elsif opt.mod =~/--webserv[=-]webrick/ + elsif opt \ + and opt.mod =~/--webserv[=-]webrick/ @env.user else ((defined? @rc['db']['postgresql']['user']) \ diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index edaec7f8..37492716 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -4067,10 +4067,12 @@ WOK self end def psql - def user(opt) - if opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/ + def user(opt=nil) + x=if opt \ + and opt.mod.inspect =~/--db-user[=-]["']?(\S+)["']+/ m=$1 - elsif opt.mod =~/--webserv[=-]webrick/ + elsif opt \ + and opt.mod =~/--webserv[=-]webrick/ @env.user else ((defined? @rc['db']['postgresql']['user']) \ -- cgit v1.2.3 From 9f4d9a3118b97992eeb73845f32dbb282d4cef86 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 30 May 2013 23:09:13 -0400 Subject: v4 v5: cgi_pgsql, cgi helper script sample search form generator, detail --- data/doc/sisu/CHANGELOG_v4 | 2 ++ data/doc/sisu/CHANGELOG_v5 | 2 ++ lib/sisu/v4/cgi_pgsql.rb | 37 +++++++++++++++---------------------- lib/sisu/v5/cgi_pgsql.rb | 37 +++++++++++++++---------------------- 4 files changed, 34 insertions(+), 44 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 25dd47f9..0dcd5a39 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -32,6 +32,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.1.3.orig.tar.xz * sysenv, pgsql db connect fix +* cgi_pgsql, cgi helper script sample search form generator, detail + %% 4.1.2.orig.tar.xz (2013-05-29:21/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.1.2 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.1.2-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index bd49d0a1..b6b660c9 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -32,6 +32,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.3.orig.tar.xz * sysenv, pgsql db connect fix +* cgi_pgsql, cgi helper script sample search form generator, detail + %% 5.0.2.orig.tar.xz (2013-05-29:21/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.2 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.2-1 diff --git a/lib/sisu/v4/cgi_pgsql.rb b/lib/sisu/v4/cgi_pgsql.rb index 61c20965..0c8f42d6 100644 --- a/lib/sisu/v4/cgi_pgsql.rb +++ b/lib/sisu/v4/cgi_pgsql.rb @@ -73,11 +73,6 @@ module SiSU_CGI_PgSQL get_init=SiSU_Env::GetInit.new @rc=get_init.sisu_yaml.rc @name_of={} - if defined? @rc['webserv'] \ - and defined? @rc['webserv']['url_root'] \ - and defined? @rc['webserv']['url_root'] =~/\S+/ - @name_of[:host_url_docs]=@rc['webserv']['url_root'] - end @name_of[:output_dir_structure]=if defined? @rc['output_dir_structure_by'] \ and defined? @rc['output_dir_structure_by'] =~/(language|filetype|filename)/ @rc['output_dir_structure_by'] @@ -90,20 +85,18 @@ module SiSU_CGI_PgSQL and defined? @rc['search']['sisu']['db'] \ and @rc['search']['sisu']['db'] =~/\S+/ @name_of[:db]=@rc['search']['sisu']['db'] - #@name_of[:cgi_script]=/https?:\/\/\S+?([^\/]+?)\.cgi$/.match(@rc['search']['sisu']['action'])[1] - @name_of[:host_url_cgi]=/(https?:\/\/\S+?)\/(?:[^\/]+?)\.cgi$/.match(@rc['search']['sisu']['action'])[1] else - @name_of[:host_url_docs]=@env.url.webserv_files_from_db(@opt) @name_of[:db]=@env.path.stub_pwd #'sisu' #breaks if not present - @name_of[:host_url_cgi]=@env.url.webserv_base_cgi(@opt) false end + @name_of[:host_url_cgi]="#{@env.url.webserv_base_cgi(@opt)}/cgi-bin" + @name_of[:host_url_docs]=@env.url.webserv_files_from_db(@opt) @name_of[:cgi_script]=@env.url.cgi_sample_search_form_name(@opt) + @name_of[:user]=@db.psql.user(@opt) @cgi_file_name="#{Db[:name_prefix_db]}by_#{opt.dir_structure_by.to_s}_pgsql.cgi" @cgi_link_name=@name_of[:cgi_script] #sisu_pgsql.cgi, @image_src="#{@env.url.webserv_base_cgi(@opt)}/_sisu/image_sys" @common=SiSU_CGI_SQL::CGI_Common.new(@webserv,@opt,@image_src,@env) - @user=@db.psql.user(@opt) end def pgsql serve=[] @@ -130,14 +123,14 @@ module SiSU_CGI_PgSQL puts <<-WOK generated sample search form: #{@cX.green}#{@cgi_file_name}#{@cX.off} default database name: #{@cX.green}#{Db[:name_prefix]}#{@name_of[:db]}#{@cX.off} (#{@name_of[:db]}) - db user: #{@cX.green}#{@db.psql.user(@opt)}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --db-user='#{@db.psql.user(@opt)}'#{@cX.off} - cgi & db host on: #{@cX.blue}#{@env.url.webserv_base_cgi(@opt)}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --webserv-search='#{@env.url.webserv_base_cgi(@opt)}'#{@cX.off} - sisu output on: #{@cX.blue}#{@env.url.webserv_files_from_db(@opt)}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --webserv-output='#{@env.url.webserv_files_from_db(@opt)}'#{@cX.off} - cgi search form link name: #{@cX.green}#{@env.url.cgi_sample_search_form_name(@opt)}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --cgi-search-form-name='#{@env.url.cgi_sample_search_form_name(@opt)}'#{@cX.off} + db user: #{@cX.green}#{@name_of[:user]}#{@cX.off} + to modify use: #{@cX.brown}sisu --db-pg --db-user='#{@name_of[:user]}'#{@cX.off} + cgi & db host on: #{@cX.blue}#{@name_of[:host_url_cgi]}#{@cX.off} + to modify use: #{@cX.brown}sisu --db-pg --webserv-search='#{@name_of[:host_url_cgi]}'#{@cX.off} + sisu output on: #{@cX.blue}#{@name_of[:host_url_docs]}#{@cX.off} + to modify use: #{@cX.brown}sisu --db-pg --webserv-output='#{@name_of[:host_url_docs]}'#{@cX.off} + cgi search form link name: #{@cX.green}#{@name_of[:cgi_script]}#{@cX.off} + to modify use: #{@cX.brown}sisu --db-pg --cgi-search-form-name='#{@name_of[:cgi_script]}'#{@cX.off} #{@cX.fuschia}(settings priority: command line; sisurc.yml; else defaults)#{@cX.off} #{@cX.fuschia}BASED ON ALREADY EXISTING databases#{@cX.off} (default database name: #{@db.psql.db}) @@ -206,13 +199,13 @@ module SiSU_CGI_PgSQL require 'dbi' @stub_default='#{@name_of[:db]}' @image_src='#{@image_src}' - @hosturl_cgi='#{@env.url.webserv_base_cgi(@opt)}/cgi-bin' - @hosturl_files='#{@env.url.webserv_files_from_db(@opt)}' + @hosturl_cgi='#{@name_of[:host_url_cgi]}' + @hosturl_files='#{@name_of[:host_url_docs]}' @output_dir_structure_by='#{@name_of[:output_dir_structure]}' @port='#{@db.psql.port}' @db_name_prefix='#{Db[:name_prefix]}' - @user='#{@user}' # check user name for access to pg database: e.g. www-data or '#{@env.user}' - @base='#{@name_of[:host_url_cgi]}/cgi-bin/#{@name_of[:cgi_script]}.cgi' #fix sqlite + @user='#{@name_of[:user]}' # check user name for access to pg database: e.g. www-data or '#{@env.user}' + @base='#{@name_of[:host_url_cgi]}/#{@name_of[:cgi_script]}' WOK_SQL end def search_statement diff --git a/lib/sisu/v5/cgi_pgsql.rb b/lib/sisu/v5/cgi_pgsql.rb index 45a4aae9..9ae9d191 100644 --- a/lib/sisu/v5/cgi_pgsql.rb +++ b/lib/sisu/v5/cgi_pgsql.rb @@ -73,11 +73,6 @@ module SiSU_CGI_PgSQL get_init=SiSU_Env::GetInit.new @rc=get_init.sisu_yaml.rc @name_of={} - if defined? @rc['webserv'] \ - and defined? @rc['webserv']['url_root'] \ - and defined? @rc['webserv']['url_root'] =~/\S+/ - @name_of[:host_url_docs]=@rc['webserv']['url_root'] - end @name_of[:output_dir_structure]=if defined? @rc['output_dir_structure_by'] \ and defined? @rc['output_dir_structure_by'] =~/(language|filetype|filename)/ @rc['output_dir_structure_by'] @@ -90,20 +85,18 @@ module SiSU_CGI_PgSQL and defined? @rc['search']['sisu']['db'] \ and @rc['search']['sisu']['db'] =~/\S+/ @name_of[:db]=@rc['search']['sisu']['db'] - #@name_of[:cgi_script]=/https?:\/\/\S+?([^\/]+?)\.cgi$/.match(@rc['search']['sisu']['action'])[1] - @name_of[:host_url_cgi]=/(https?:\/\/\S+?)\/(?:[^\/]+?)\.cgi$/.match(@rc['search']['sisu']['action'])[1] else - @name_of[:host_url_docs]=@env.url.webserv_files_from_db(@opt) @name_of[:db]=@env.path.stub_pwd #'sisu' #breaks if not present - @name_of[:host_url_cgi]=@env.url.webserv_base_cgi(@opt) false end + @name_of[:host_url_cgi]="#{@env.url.webserv_base_cgi(@opt)}/cgi-bin" + @name_of[:host_url_docs]=@env.url.webserv_files_from_db(@opt) @name_of[:cgi_script]=@env.url.cgi_sample_search_form_name(@opt) + @name_of[:user]=@db.psql.user(@opt) @cgi_file_name="#{Db[:name_prefix_db]}by_#{opt.dir_structure_by.to_s}_pgsql.cgi" @cgi_link_name=@name_of[:cgi_script] #sisu_pgsql.cgi, @image_src="#{@env.url.webserv_base_cgi(@opt)}/_sisu/image_sys" @common=SiSU_CGI_SQL::CGI_Common.new(@webserv,@opt,@image_src,@env) - @user=@db.psql.user(@opt) end def pgsql serve=[] @@ -130,14 +123,14 @@ module SiSU_CGI_PgSQL puts <<-WOK generated sample search form: #{@cX.green}#{@cgi_file_name}#{@cX.off} default database name: #{@cX.green}#{Db[:name_prefix]}#{@name_of[:db]}#{@cX.off} (#{@name_of[:db]}) - db user: #{@cX.green}#{@db.psql.user(@opt)}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --db-user='#{@db.psql.user(@opt)}'#{@cX.off} - cgi & db host on: #{@cX.blue}#{@env.url.webserv_base_cgi(@opt)}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --webserv-search='#{@env.url.webserv_base_cgi(@opt)}'#{@cX.off} - sisu output on: #{@cX.blue}#{@env.url.webserv_files_from_db(@opt)}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --webserv-output='#{@env.url.webserv_files_from_db(@opt)}'#{@cX.off} - cgi search form link name: #{@cX.green}#{@env.url.cgi_sample_search_form_name(@opt)}#{@cX.off} - to modify use: #{@cX.brown}sisu --db-pg --cgi-search-form-name='#{@env.url.cgi_sample_search_form_name(@opt)}'#{@cX.off} + db user: #{@cX.green}#{@name_of[:user]}#{@cX.off} + to modify use: #{@cX.brown}sisu --db-pg --db-user='#{@name_of[:user]}'#{@cX.off} + cgi & db host on: #{@cX.blue}#{@name_of[:host_url_cgi]}#{@cX.off} + to modify use: #{@cX.brown}sisu --db-pg --webserv-search='#{@name_of[:host_url_cgi]}'#{@cX.off} + sisu output on: #{@cX.blue}#{@name_of[:host_url_docs]}#{@cX.off} + to modify use: #{@cX.brown}sisu --db-pg --webserv-output='#{@name_of[:host_url_docs]}'#{@cX.off} + cgi search form link name: #{@cX.green}#{@name_of[:cgi_script]}#{@cX.off} + to modify use: #{@cX.brown}sisu --db-pg --cgi-search-form-name='#{@name_of[:cgi_script]}'#{@cX.off} #{@cX.fuschia}(settings priority: command line; sisurc.yml; else defaults)#{@cX.off} #{@cX.fuschia}BASED ON ALREADY EXISTING databases#{@cX.off} (default database name: #{@db.psql.db}) @@ -206,13 +199,13 @@ module SiSU_CGI_PgSQL require 'dbi' @stub_default='#{@name_of[:db]}' @image_src='#{@image_src}' - @hosturl_cgi='#{@env.url.webserv_base_cgi(@opt)}/cgi-bin' - @hosturl_files='#{@env.url.webserv_files_from_db(@opt)}' + @hosturl_cgi='#{@name_of[:host_url_cgi]}' + @hosturl_files='#{@name_of[:host_url_docs]}' @output_dir_structure_by='#{@name_of[:output_dir_structure]}' @port='#{@db.psql.port}' @db_name_prefix='#{Db[:name_prefix]}' - @user='#{@user}' # check user name for access to pg database: e.g. www-data or '#{@env.user}' - @base='#{@name_of[:host_url_cgi]}/cgi-bin/#{@name_of[:cgi_script]}.cgi' #fix sqlite + @user='#{@name_of[:user]}' # check user name for access to pg database: e.g. www-data or '#{@env.user}' + @base='#{@name_of[:host_url_cgi]}/#{@name_of[:cgi_script]}' WOK_SQL end def search_statement -- cgit v1.2.3