aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-01 13:35:22 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-01 13:35:22 +0100
commite80321d23ea7423ccdc7867e60ccbae74799d5e4 (patch)
treeabfc140b00643b22254315f1f48dbff11d9f1438
parentMerge branch 'upstream' into debian/sid (diff)
parentset /tmp/_sisu_processing directory permissions to 777, (each user has a sub-... (diff)
Merge branch 'upstream' into debian/sid
-rw-r--r--CHANGELOG4
-rw-r--r--lib/sisu/v0/hub.rb3
-rw-r--r--lib/sisu/v0/sitemaps.rb2
-rw-r--r--lib/sisu/v0/sysenv.rb26
4 files changed, 27 insertions, 8 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 16aee6da..125fc91a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -31,6 +31,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.60.0.orig.tar.gz
* parameter reading on first run of file, (initialization of parameters)
+ * processing directory /tmp/_sisu_processing permissions set to 777 as
+ processing for individual users occurs within sub-directory named after
+ user
+
* composite files (.ssm) building moved to processing directory, to overcome
problem of non-writable sisu-source document directories, perhaps also
cleaner (management of files)
diff --git a/lib/sisu/v0/hub.rb b/lib/sisu/v0/hub.rb
index 7dcc0127..a5c82aac 100644
--- a/lib/sisu/v0/hub.rb
+++ b/lib/sisu/v0/hub.rb
@@ -179,7 +179,8 @@ module SiSU
ObjectSpace.garbage_collect
else #print "not processed --> ", fns, "\n"
end
- else Operations.new(@opt).not_found
+ else
+ Operations.new(@opt).not_found unless @req =~/^conf$/
end
elsif FileTest.file?(put)
case @req
diff --git a/lib/sisu/v0/sitemaps.rb b/lib/sisu/v0/sitemaps.rb
index 0a6af0c1..740dbf76 100644
--- a/lib/sisu/v0/sitemaps.rb
+++ b/lib/sisu/v0/sitemaps.rb
@@ -114,7 +114,7 @@ module SiSU_Sitemaps
if FileTest.file?("#{touch_path}/#{touch_filename}")
rm("#{touch_path}/#{touch_filename}")
end
- SiSU_Env::SiSU_file.new(@md).touch_file(touch_path,touch_filename)
+ #SiSU_Env::SiSU_file.new(@md).touch_file(touch_path,touch_filename)
end
def output_idx(sitemap)
path=@env.path.output
diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb
index 95830224..fd3f5be2 100644
--- a/lib/sisu/v0/sysenv.rb
+++ b/lib/sisu/v0/sysenv.rb
@@ -99,12 +99,19 @@ module SiSU_Env
m=/.+\/(\S+)/m
@stub_pwd ||=@@pwd[m,1]
prcss_dir='_sisu_processing'
+ prcss_dir_tmp_root="/tmp/#{prcss_dir}"
prcss_dir_stub="#{prcss_dir}/#{@stub_pwd}"
@processing_dir=if @@home and File.writable?("#{@@home}/."); "#{@@home}/#{prcss_dir_stub}"
#elsif File.writable?("#{@@pwd}/."); "#{@@pwd}/#{prcss_dir}"
else prcss_dir_stub
end
- tmp_processing=if @@user; "/tmp/#{prcss_dir}/#{@@user}/#{@stub_pwd}"
+ tmp_processing_base=if @@user; "#{prcss_dir_tmp_root}/#{@@user}/#{@stub_pwd}"
+ else "#{prcss_dir_stub}"
+ end
+ tmp_processing_base_user=if @@user; "#{prcss_dir_tmp_root}/#{@@user}/#{@stub_pwd}"
+ else "/tmp/#{prcss_dir_stub}"
+ end
+ tmp_processing=if @@user; "#{prcss_dir_tmp_root}/#{@@user}/#{@stub_pwd}"
else "/tmp/#{prcss_dir_stub}"
end
user=ENV['USER']
@@ -126,6 +133,7 @@ module SiSU_Env
WEBSERV_SQLITE=:webserv_sqlite
OUTPUT_LOCAL=:output_local
PROCESSING_PATH=:processing_path
+ PROCESSING_DIR_TMP_ROOT=:processing_dir_tmp_root
PROCESSING_PATH_TMP=:processing_path_tmp
PROCESSING_PATH_TMP_BASE=:processing_path_tmp_base
PROCESSING_DAL=:processing_dal
@@ -165,7 +173,8 @@ module SiSU_Env
WEBSERV_SQLITE => out + '/www/sqlite',
OUTPUT_LOCAL => @@home + '/sisu_www',
PROCESSING_PATH => @processing_dir,
- PROCESSING_PATH_TMP_BASE => tmp_processing,
+ PROCESSING_DIR_TMP_ROOT => prcss_dir_tmp_root,
+ PROCESSING_PATH_TMP_BASE => tmp_processing_base,
PROCESSING_PATH_TMP => tmp_processing,
PROCESSING_DAL => 'dal',
PROCESSING_TUNE => 'tune',
@@ -1212,7 +1221,14 @@ WOK
def processing_base_tmp
defaults[:processing_path_tmp_base]
end
+ def processing_dir_tmp_root
+ defaults[:processing_dir_tmp_root]
+ end
def processing #processing directory, used/needed for sisu work files, has sub-directories (dal,tex etc)
+ unless FileTest.directory?(defaults[:processing_dir_tmp_root])
+ File.mkpath(defaults[:processing_dir_tmp_root])
+ File.chmod(0777,defaults[:processing_dir_tmp_root])
+ end
File.mkpath(defaults[:processing_path]) unless FileTest.directory?(defaults[:processing_path])
File.mkpath(defaults[:processing_path_tmp]) unless FileTest.directory?(defaults[:processing_path_tmp])
path_processing=if defined? @rc['processing']['path'] and @rc['processing']['path']
@@ -2379,16 +2395,14 @@ WOK
end
def make_file(path,filename)
if File.writable?("#{path}/."); File.new("#{path}/#{filename}",'w+')
- else
- SiSU_Screen::Ansi.new('',"is the file or directory writable?, could not create #{filename}").warn
+ else SiSU_Screen::Ansi.new('',"is the file or directory writable?, could not create #{filename}").warn
end
end
def touch_file(path,filename)
if File.writable?("#{path}/.");
system("touch #{path}/#{filename}")
#File.new("#{path}/#{filename}",'w+')
- else
- SiSU_Screen::Ansi.new('',"is the file or directory writable?, could not create #{filename}").warn
+ else SiSU_Screen::Ansi.new('',"is the file or directory writable?, could not create #{filename}").warn
end
end
def make_path(path)