부요 데스크탑에는 서버 패키지가 존재하지 않는다. 따라서 subversion과 trac을 설치하려면 저장소를 이용한 설치를 해서는 않되고, 별도로 패키지를 구해서 설치해야한다.


1. subversion 설치

부요 데스크탑은 페도라 코어 5 기반이기 때문에 페도라 코어 5 패키지를 받아서 설치하면 이상없이 설치된다. 단, 설치시에 libapr과 libpq에 대한 의존성이 있기 때문에 이들 패키지도 함께 설치해줘야한다.


2. trac 설치

kldp.net에 등록된 trac 한글 번역 프로젝트에서 패키지를 다운로드 받아서 설치하면 된다. 단 trac의 경우 webserver 가 의존성이 걸려있으므로 spec 파일을 수정하여 다시 패키징해도 되겠다.

 - 소스패키지

 - 바이너리 패키지


3. trac 설정

 - subversion 저장소를 만듭니다.
svnadmin create --fs-type fsfs [subversion 저장소 이름]
 - trac 저장소를 만듭니다.
trac-admin [트랙 저장소 이름] initenv


4. trac 서버 실행

 - 다음과 같은 식으로 서버를 실행합니다.
tracd --port 8080 [trac 저장소 경로] 1>&2 2>> [로그파일 이름] &
혹은
tracd --port 8080 --auth *,[패스워드파일 이름],trac [trac 저장소 경로] 1>&2 2>> [로그파일 이름] &

 - 패스워드 파일은 다음 파이썬 코드로 만들수 있다.
from optparse import OptionParser
import md5

# build the options
usage = "usage: %prog [options]"
parser = OptionParser(usage=usage)
parser.add_option("-u", "--username",action="store", dest="username", type = "string",
help="the username for whom to generate a password")
parser.add_option("-p", "--password",action="store", dest="password", type = "string",
help="the password to use")
(options, args) = parser.parse_args()

# check options
if (options.username is None) or (options.password is None):
parser.error("You must supply both the username and password")

# Generate the string to enter into the htdigest file
realm = 'trac'
kd = lambda x: md5.md5(':'.join(x)).hexdigest()
print ':'.join((options.username, realm, kd([options.username, realm, options.password])))

+ Recent posts