FreeBSD Bugzilla – Attachment 185909 Details for
Bug 221930
www/tdiary: Make tdiary-inst.rb fit for current version
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch file
patch-www_tdiary (text/plain), 8.37 KB, created by
Yasuhiro Kimura
on 2017-08-30 04:53:23 UTC
(
hide
)
Description:
patch file
Filename:
MIME Type:
Creator:
Yasuhiro Kimura
Created:
2017-08-30 04:53:23 UTC
Size:
8.37 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 448901) >+++ Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= tdiary > PORTVERSION= 5.0.5 >+PORTREVISION= 1 > CATEGORIES?= www ruby > MASTER_SITES= https://github.com/tdiary/tdiary-core/releases/download/v${PORTVERSION}/ > DISTNAME= ${PORTNAME}-full-v${PORTVERSION} >Index: files/tdiaryinst.rb.in >=================================================================== >--- files/tdiaryinst.rb.in (revision 448901) >+++ files/tdiaryinst.rb.in (working copy) >@@ -1,4 +1,4 @@ >-#!/usr/bin/env ruby >+#!%%LOCALBASE%%/bin/ruby > # > # tdiaryinstall.rb - tDiary user directory copy script > # Date created: 13 July 2003 >@@ -141,22 +141,27 @@ > if ! FileTest.exist?("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/images") > FileUtils.mkdir_p("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/images", @fileutilOptions) > end >+ if ! FileTest.exist?("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tmp") >+ FileUtils.mkdir_p("#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tmp", @fileutilOptions) >+ end > end > > def linkBaseFile >+ FileUtils.ln_s("#{@tdiarydocdir}", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/doc", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/Gemfile", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/app.json", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/benchmark", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/bin", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/index.fcgi", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/index.rb", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) > FileUtils.ln_s("#{@tdiarymaster}/js", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/lib", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/misc", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/package.json", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) > FileUtils.ln_s("#{@tdiarymaster}/theme", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >- FileUtils.ln_s("#{@tdiarydocdir}", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/doc", @fileutilOptions) >- tempfile = Tempfile.new("index.rb") >- tempfile.write "#!/usr/local/bin/ruby\nrequire '#{@tdiarymaster}/index'\n" >- tempfile.close >- FileUtils.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", @fileutilOptions) >- FileUtils.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", @fileutilOptions) >- tempfile = Tempfile.new("update.rb") >- tempfile.write "#!/usr/local/bin/ruby\nrequire '#{@tdiarymaster}/update'\n" >- tempfile.close >- FileUtils.cp(tempfile.path, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", @fileutilOptions) >- FileUtils.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/update.fcgi", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/update.rb", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.ln_s("#{@tdiarymaster}/views", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) > end > > def copyBaseFile >@@ -163,17 +168,20 @@ > opts = @fileutilOptions.dup > opts.store(:preserve, true) > FileUtils.cp_r("#{@tdiarydocdir}", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/doc", opts) >+ FileUtils.cp("#{@tdiarymaster}/Gemfile", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.cp("#{@tdiarymaster}/app.json", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.cp_r("#{@tdiarymaster}/benchmark", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", opts) >+ FileUtils.cp_r("#{@tdiarymaster}/bin", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", opts) >+ FileUtils.cp("#{@tdiarymaster}/index.fcgi", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.cp("#{@tdiarymaster}/index.rb", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) > FileUtils.cp_r("#{@tdiarymaster}/js", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", opts) >+ FileUtils.cp_r("#{@tdiarymaster}/lib", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", opts) > FileUtils.cp_r("#{@tdiarymaster}/misc", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", opts) >- FileUtils.cp_r("#{@tdiarymaster}/plugin", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", opts) >- FileUtils.cp_r("#{@tdiarymaster}/skel", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", opts) >- FileUtils.cp_r("#{@tdiarymaster}/tdiary", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", opts) >+ FileUtils.cp("#{@tdiarymaster}/package.json", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) > FileUtils.cp_r("#{@tdiarymaster}/theme", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", opts) >- FileUtils.cp("#{@tdiarymaster}/index.rb", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", @fileutilOptions) >- FileUtils.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", @fileutilOptions) >- FileUtils.cp("#{@tdiarymaster}/update.rb", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", @fileutilOptions) >- FileUtils.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", @fileutilOptions) >- FileUtils.cp("#{@tdiarymaster}/tdiary.rb", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/tdiary.rb", @fileutilOptions) >+ FileUtils.cp("#{@tdiarymaster}/update.fcgi", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.cp("#{@tdiarymaster}/update.rb", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.cp_r("#{@tdiarymaster}/views", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", opts) > end > > def installConfig >@@ -206,15 +214,25 @@ > end > > def setPermissions >- FileUtils.chmod(0777, "#{@passwd.dir}/#{@diarydir}", @fileutilOptions) if ! defined?($OPT_SUEXEC) >- FileUtils.chmod(0777, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) if ! defined?($OPT_SUEXEC) >+ if (defined?($OPT_SUEXEC)) >+ FileUtils.chmod(0701, "#{@passwd.dir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.chmod(0701, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.chmod(0604, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/.htaccess", @fileutilOptions) >+ FileUtils.chmod(0700, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.fcgi", @fileutilOptions) >+ FileUtils.chmod(0700, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", @fileutilOptions) >+ FileUtils.chmod(0700, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.fcgi", @fileutilOptions) >+ FileUtils.chmod(0700, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", @fileutilOptions) >+ else >+ FileUtils.chmod(0777, "#{@passwd.dir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.chmod(0777, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) >+ FileUtils.chmod(0644, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/.htaccess", @fileutilOptions) >+ FileUtils.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.fcgi", @fileutilOptions) >+ FileUtils.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", @fileutilOptions) >+ FileUtils.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.fcgi", @fileutilOptions) >+ FileUtils.chmod(0755, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", @fileutilOptions) >+ end >+ FileUtils.chmod(0644, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/dot.htaccess", @fileutilOptions) > >- FileUtils.chmod(0701, "#{@passwd.dir}/#{@diarydir}", @fileutilOptions) if defined?($OPT_SUEXEC) >- FileUtils.chmod(0701, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}", @fileutilOptions) if defined?($OPT_SUEXEC) >- FileUtils.chmod(0604, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/.htaccess", @fileutilOptions) if defined?($OPT_SUEXEC) >- FileUtils.chmod(0700, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/index.rb", @fileutilOptions) if defined?($OPT_SUEXEC) >- FileUtils.chmod(0700, "#{@passwd.dir}/#{@httpdir}/#{@diarydir}/update.rb", @fileutilOptions) if defined?($OPT_SUEXEC) >- > if @euid == 0 then > Find.find("#{@passwd.dir}/#{@diarydir}", "#{@passwd.dir}/#{@httpdir}/#{@diarydir}") do |f| > File.chown(@passwd.uid, @passwd.gid, f)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
yasu
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 221930
: 185909