View | Details | Raw Unified | Return to bug 66321
Collapse All | Expand All

(-)tdiary/Makefile (-4 / +4 lines)
Lines 6-18 Link Here
6
#
6
#
7
7
8
PORTNAME=	tdiary
8
PORTNAME=	tdiary
9
PORTVERSION=	1.5.6
9
PORTVERSION=	1.5.7
10
PORTREVISION=	2
10
#PORTREVISION=	0
11
CATEGORIES?=	www ruby
11
CATEGORIES?=	www ruby
12
MASTER_SITES=	\
12
MASTER_SITES=	\
13
		${MASTER_SITE_SOURCEFORGE} \
13
		${MASTER_SITE_SOURCEFORGE} \
14
		http://www.tdiary.org/download/
14
		http://www.tdiary.org/download/
15
MASTER_SITE_SUBDIR=	sourceforge/${PORTNAME}
15
MASTER_SITE_SUBDIR=	${PORTNAME} 
16
DISTNAME=	${PORTNAME}-full-${PORTVERSION}
16
DISTNAME=	${PORTNAME}-full-${PORTVERSION}
17
17
18
MAINTAINER=	jfkimura@yahoo.co.jp
18
MAINTAINER=	jfkimura@yahoo.co.jp
Lines 26-32 Link Here
26
USE_RUBY_FEATURES=	fileutils
26
USE_RUBY_FEATURES=	fileutils
27
.endif
27
.endif
28
28
29
RUBY_SHEBANG_FILES=	index.rb update.rb misc/convert2.rb misc/posttdiary.rb misc/plugin/squeeze.rb \
29
RUBY_SHEBANG_FILES=	index.rb update.rb misc/convert2.rb misc/plugin/squeeze.rb \
30
misc/plugin/windex.rb misc/plugin/a/a_conf.rb misc/plugin/trackback/tb.rb
30
misc/plugin/windex.rb misc/plugin/a/a_conf.rb misc/plugin/trackback/tb.rb
31
31
32
TDIARYDIR=	${EXAMPLESDIR}
32
TDIARYDIR=	${EXAMPLESDIR}
(-)tdiary/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (tdiary-full-1.5.6.tar.gz) = 559fd40263ae7fc76a1792fc71757c8f
1
MD5 (tdiary-full-1.5.7.tar.gz) = 13f728291eed51bc6033fae1510731bc
2
SIZE (tdiary-full-1.5.6.tar.gz) = 1628374
2
SIZE (tdiary-full-1.5.7.tar.gz) = 1640373
(-)tdiary/files/patch-aa (-47 lines)
Lines 1-47 Link Here
1
--- tdiary.rb	Thu Nov 13 15:34:22 2003
2
+++ tdiary.rb.new	Fri Nov 21 16:11:26 2003
3
@@ -1,13 +1,13 @@
4
 =begin
5
 == NAME
6
 tDiary: the "tsukkomi-able" web diary system.
7
-tdiary.rb $Revision: 1.156 $
8
+tdiary.rb $Revision: 1.159 $
9
 
10
 Copyright (C) 2001-2003, TADA Tadashi <sho@spc.gr.jp>
11
 You can redistribute it and/or modify it under GPL2.
12
 =end
13
 
14
-TDIARY_VERSION = '1.5.6'
15
+TDIARY_VERSION = '1.5.6.20031118'
16
 
17
 require 'cgi'
18
 begin
19
@@ -62,10 +62,14 @@
20
 module Safe
21
 	def safe( level = 4 )
22
 		result = nil
23
-		Thread.start {
24
-			$SAFE = level
25
+		if $SAFE < level then
26
+			Thread.start {
27
+				$SAFE = level
28
+				result = yield
29
+			}.join
30
+		else
31
 			result = yield
32
-		}.join
33
+		end
34
 		result
35
   end
36
   module_function :safe
37
@@ -740,7 +744,9 @@
38
 			r = str.dup
39
 			if @options['apply_plugin'] and str.index( '<%' ) then
40
 				r = str.untaint if $SAFE < 3
41
-				r = ERbLight.new( r ).result( binding )
42
+				Safe::safe( @conf.secure ? 4 : 1 ) do
43
+					r = ERbLight.new( r ).result( binding )
44
+				end
45
 			end
46
 			r.gsub!( /<.*?>/, '' ) if remove_tag
47
 			r
(-)tdiary/files/tdiary-FreeBSD.sh.in (-143 lines)
Lines 1-143 Link Here
1
#!/bin/sh
2
#
3
# tdiary-FreeBSD.sh - tDiary user directory copy script
4
#
5
# $FreeBSD: ports/www/tdiary/files/tdiary-FreeBSD.sh.in,v 1.4 2003/11/09 12:59:57 jeh Exp $
6
#
7
# usage:
8
#        % /usr/local/share/examples/tdiary/tdiary-FreeBSD.sh install
9
#    or
10
#        # /usr/local/share/examples/tdiary/tdiary-FreeBSD.sh USERid
11
#
12
13
USERNAME=$1
14
DIARYDIR=diary
15
PUBLICHTML=public_html
16
PREFIX=@@@@PREFIX@@@@
17
TDCONFIG=@@@@LANG@@@@
18
EXAMPLES=${PREFIX}/share/examples
19
HOMEOWN=`grep ^$1: /etc/passwd | cut -f3 -d':'`
20
HOMEGRP=`grep ^$1: /etc/passwd | cut -f4 -d':'`
21
AUTHORN=`grep ^$1: /etc/passwd | cut -f5 -d':'`
22
HOMEDIR=`grep ^$1: /etc/passwd | cut -f6 -d':'`
23
HOSTSMTP=`hostname`
24
25
cd ${EXAMPLES} 
26
27
if [ -z "$1" ]; then
28
	echo "Usage: `basename $0` {username} or install"
29
	exit 1
30
else
31
	if [ -z "${HOMEOWN}" ] ; then
32
		if  [ "$1" = "install" ] ; then
33
			if [ $(id -u) -eq 0 ]; then
34
				echo "root can not use 'install' parameter."
35
				exit 1
36
			fi
37
		else
38
			echo "User unknown  or  no exist  User Directory -> " $1 "-" ${HOMEDIR}
39
			echo "Usage: `basename $0` {username}  or  install"
40
			exit 1
41
		fi
42
	fi
43
fi
44
45
echo "************************************************************"
46
echo ""
47
48
case "$1" in
49
root)
50
	echo "You can not copy ROOT Directory" 
51
	exit 1
52
	;;
53
install)
54
	HOMEOWN=`grep ^$USER: /etc/passwd | cut -f3 -d':'`
55
	HOMEGRP=`grep ^$USER: /etc/passwd | cut -f4 -d':'`
56
	HOMEDIR=`grep ^$USER: /etc/passwd | cut -f6 -d':'`	
57
	echo "HOME Directory : " ${HOMEDIR}
58
	USERNAME=$USER
59
	;;
60
*)
61
	echo "HOME Directory : " ${HOMEDIR}	
62
	echo "USERNAME       : " ${USERNAME}
63
	USERNAME=$USER
64
	;;
65
esac
66
67
if [ -x ${HOMEDIR} ]; then
68
	if [ -z "$1" ]; then
69
		echo "Usage: `basename $0` {username} or install"
70
		exit 1
71
	else
72
		echo ""
73
		echo "************************************************************"
74
		echo "Starting tDiary for FreeBSD  user directory installation ..."
75
		echo ""
76
		if [ ! -e ${HOMEDIR}/${DIARYDIR} ]; then
77
			echo "Create ..." ${HOMEDIR}/${DIARYDIR} 
78
			mkdir ${HOMEDIR}/${DIARYDIR}
79
			echo "Done"
80
		fi
81
		chmod o+rwx ${HOMEDIR}/${DIARYDIR}
82
		chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${DIARYDIR}
83
		if [ ! -e ${HOMEDIR}/${PUBLICHTML} ]; then
84
			echo "Create ..." ${HOMEDIR}/${USERNAME}/${PUBLICHTML}
85
			mkdir ${HOMEDIR}/${PUBLICHTML}
86
			chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}
87
			echo "Done"
88
		fi
89
		echo "Copy tDiary ..." ${EXAMPLES}/tdiary/
90
		echo "            to " ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/
91
		cp -pR ${EXAMPLES}/tdiary/ ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/
92
		chown -R ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/
93
		chmod o+rwx ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}
94
		echo "Done"
95
		sed -e 's#'/home/foo/diary'#'${HOMEDIR}'/'${DIARYDIR}'#g' \
96
			-e 's#smtp.example.net#'${HOSTSMTP}'#g' \
97
			-e "s#foo@example.net#"${USERNAME}"@"${HOSTSMTP}"#g" \
98
			-e "s#Your name#${AUTHORN}#g" \
99
			-e "s#hogehoge diary#${AUTHORN} Diary#g" \
100
			-e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \
101
			< ${EXAMPLES}/tdiary/tdiary.conf.sample > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-ja
102
		chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-ja
103
		if [ -e ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/.htaccess ]; then
104
			sed -e 's#foo#'${USERNAME}'#g' < ${EXAMPLES}/tdiary/dot.htaccess > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/dot.htaccess.orig
105
			chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/dot.htaccess.orig
106
		else
107
			sed -e 's#foo#'${USERNAME}'#g' < ${EXAMPLES}/tdiary/dot.htaccess > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/.htaccess
108
			chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/.htaccess
109
		fi
110
		sed -e 's#'/home/foo/diary'#'${HOMEDIR}'/'${DIARYDIR}'#g' \
111
			-e 's#smtp.example.net#'${HOSTSMTP}'#g' \
112
			-e "s#foo@example.net#"${USERNAME}"@"${HOSTSMTP}"#g" \
113
			-e "s#Your name#${AUTHORN}#g" \
114
			-e "s#foobar diary#${AUTHORN} Diary#g" \
115
			-e "s#Foo\'s diary#${AUTHORN}\'s Diary#g" \
116
			-e "s#http://www.example.net/~foo/#http://"${HOSTSMTP}"/~"${USERNAME}"#g" \
117
			< ${EXAMPLES}/tdiary/misc/i18n/tdiary.conf.sample-en > ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-en
118
		chown ${HOMEOWN}:${HOMEGRP} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf-en
119
		rm -f ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary-FreeBSD.sh
120
		if [ -e ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf ]; then
121
			echo ""
122
		else
123
			echo "Install ${TDCONFIG} ... Done"
124
			mv ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/${TDCONFIG} ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/tdiary.conf
125
		fi
126
	fi
127
else
128
	echo ""
129
	echo "User unknown  or  no exist  User Directory -> " $1 "-" ${HOMEDIR}
130
	echo "Usage: `basename $0` {username}  or  install"
131
	exit 1 
132
fi
133
echo ""
134
echo ""
135
echo "***"
136
echo "You have to execute the following commands:"
137
echo "      % /usr/local/sbin/htpasswd -c" ${HOMEDIR}/.htpasswd ${USERNAME}
138
echo "" 
139
echo "Be sure to read the ${HOMEDIR}/${PUBLICHTML}/${DIARYDIR}/README"
140
echo "    file for additional information."
141
echo "************************************************************"
142
echo ""
143
exit 0
(-)tdiary/pkg-plist (-1 lines)
Lines 1-2 Link Here
1
%%EXAMPLESDIR%%/tdiaryinst.rb
1
%%EXAMPLESDIR%%/tdiaryinst.rb
2
%%EXAMPLESDIR%%/tdiary-FreeBSD.sh

Return to bug 66321