Commit b37f6e5e0e363671612c78d7b6ddb9610fe85306
- Diff rendering mode:
- inline
- side by side
.gitignore
(1 / 0)
  | |||
1 | 1 | trac.config | |
2 | trac.ini.template |
new_project.sh
(22 / 2)
  | |||
10 | 10 | # > trac-admin /path/to/trac/env deploy /path/to/trac/env/deploy/ | |
11 | 11 | # 4. chmod to add group permissions | |
12 | 12 | # > chmod g+rwx /path/to/trac/env -R | |
13 | # | ||
13 | # 5. Copy the template trac.ini file to be the trac.ini file and copy some | ||
14 | # config from the old trac.ini file to the new one | ||
14 | 15 | ||
15 | 16 | readConfig() { | |
16 | 17 | configFile='trac.config' | |
… | … | ||
57 | 57 | chmod g+rwx $trac_project$project -R | |
58 | 58 | } | |
59 | 59 | ||
60 | writeTracConfig() { | ||
61 | oldconfig="$trac_project$project/conf/trac.ini" | ||
62 | newconfig='trac.ini.template' | ||
63 | echo "Writing template config to $oldconfig" | ||
64 | if [ ! -e $newconfig ]; then | ||
65 | echo "File: $newconfig does not exist. Could not write template \ | ||
66 | configuration. You have to manually configure the config file now.\ | ||
67 | Everything else is setup." | ||
68 | exit 0; | ||
69 | fi | ||
70 | name=$(sed -n 's/^name = \(.*\)$/\1/p' $oldconfig) | ||
71 | db=$(sed -n 's/^database = \(.*\)$/\1/p' $oldconfig) | ||
72 | $db=${db//\//\\/} | ||
73 | $(cp $newconfig $oldconfig) | ||
74 | $newconfig=$oldconfig | ||
75 | $(sed -i "s/^name =$/name = $name/" $newconfig) | ||
76 | $(sed -i "s/^database =$/database = $db/" $newconfig) | ||
77 | } | ||
78 | |||
60 | 79 | usage() { | |
61 | 80 | echo "Usage is $0 --name <name of the project>" | |
62 | 81 | } | |
63 | 82 | ||
64 | 83 | setup() { | |
65 | createDB && initTracEnv && deployTracEnv && chmodTracEnv; | ||
84 | createDB && initTracEnv && deployTracEnv && chmodTracEnv && writeTracConfig; | ||
66 | 85 | echo "Done.." | |
67 | 86 | exit 0; | |
68 | 87 | } |
trac.ini.template.sample
(258 / 0)
  | |||
1 | # -*- coding: utf-8 -*- | ||
2 | |||
3 | [account-manager] | ||
4 | account_changes_notify_addresses = | ||
5 | force_passwd_change = true | ||
6 | htdigest_file = /path/to/trac/projects/.passwd | ||
7 | htdigest_realm = TracRealm | ||
8 | notify_actions = new,change,delete | ||
9 | password_store = HtDigestStore | ||
10 | verify_email = false | ||
11 | |||
12 | [attachment] | ||
13 | max_size = 262144 | ||
14 | max_zip_size = 2097152 | ||
15 | render_unsafe_content = false | ||
16 | |||
17 | [browser] | ||
18 | color_scale = True | ||
19 | downloadable_paths = /trunk, /branches/*, /tags/* | ||
20 | hide_properties = svk:merge | ||
21 | intermediate_color = | ||
22 | intermediate_point = | ||
23 | newest_color = (255, 136, 136) | ||
24 | oldest_color = (136, 136, 255) | ||
25 | oneliner_properties = trac:summary | ||
26 | render_unsafe_content = false | ||
27 | wiki_properties = trac:description | ||
28 | |||
29 | [changeset] | ||
30 | max_diff_bytes = 10000000 | ||
31 | max_diff_files = 0 | ||
32 | wiki_format_messages = true | ||
33 | |||
34 | [components] | ||
35 | acct_mgr.admin.accountmanageradminpanel = enabled | ||
36 | acct_mgr.guard.* = enabled | ||
37 | acct_mgr.htfile.htdigeststore = enabled | ||
38 | acct_mgr.notification.accountchangelistener = enabled | ||
39 | acct_mgr.register.emailverificationmodule = enabled | ||
40 | acct_mgr.register.registrationmodule = enabled | ||
41 | acct_mgr.web_ui.accountmodule = enabled | ||
42 | acct_mgr.web_ui.loginmodule = enabled | ||
43 | trac.web.auth.loginmodule = disabled | ||
44 | tracopt.ticket.commit_updater.* = enabled | ||
45 | tracopt.versioncontrol.git.* = enabled | ||
46 | tracspamfilter.* = enabled | ||
47 | webadmin.* = enabled | ||
48 | |||
49 | [git] | ||
50 | cached_repository = false | ||
51 | git_bin = git | ||
52 | git_fs_encoding = utf-8 | ||
53 | persistent_cache = false | ||
54 | shortrev_len = 7 | ||
55 | trac_user_rlookup = false | ||
56 | use_committer_id = true | ||
57 | use_committer_time = true | ||
58 | wikishortrev_len = 40 | ||
59 | |||
60 | [header_logo] | ||
61 | alt = (your logo here) | ||
62 | height = 100 | ||
63 | link = / | ||
64 | src = site/yourlogo.png | ||
65 | width = 100 | ||
66 | |||
67 | [inherit] | ||
68 | htdocs_dir = | ||
69 | plugins_dir = | ||
70 | templates_dir = | ||
71 | |||
72 | [logging] | ||
73 | log_file = trac.log | ||
74 | log_level = DEBUG | ||
75 | log_type = none | ||
76 | |||
77 | [milestone] | ||
78 | stats_provider = DefaultTicketGroupStatsProvider | ||
79 | |||
80 | [mimeviewer] | ||
81 | max_preview_size = 262144 | ||
82 | mime_map = text/x-dylan:dylan, text/x-idl:ice, text/x-ada:ads:adb | ||
83 | mime_map_patterns = text/plain:README|INSTALL|COPYING.* | ||
84 | pygments_default_style = trac | ||
85 | pygments_modes = | ||
86 | tab_width = 8 | ||
87 | treat_as_binary = application/octet-stream, application/pdf, application/postscript, application/msword,application/rtf, | ||
88 | |||
89 | [notification] | ||
90 | admit_domains = | ||
91 | always_notify_owner = false | ||
92 | always_notify_reporter = false | ||
93 | always_notify_updater = true | ||
94 | ambiguous_char_width = single | ||
95 | batch_subject_template = $prefix Batch modify: $tickets_descr | ||
96 | email_sender = SmtpEmailSender | ||
97 | ignore_domains = | ||
98 | mime_encoding = none | ||
99 | sendmail_path = sendmail | ||
100 | smtp_always_bcc = | ||
101 | smtp_always_cc = | ||
102 | smtp_default_domain = | ||
103 | smtp_enabled = false | ||
104 | smtp_from = trac@localhost | ||
105 | smtp_from_author = false | ||
106 | smtp_from_name = | ||
107 | smtp_password = | ||
108 | smtp_port = 25 | ||
109 | smtp_replyto = trac@localhost | ||
110 | smtp_server = localhost | ||
111 | smtp_subject_prefix = __default__ | ||
112 | smtp_user = | ||
113 | ticket_subject_template = $prefix #$ticket.id: $summary | ||
114 | use_public_cc = false | ||
115 | use_short_addr = false | ||
116 | use_tls = false | ||
117 | |||
118 | [project] | ||
119 | admin = | ||
120 | admin_trac_url = . | ||
121 | descr = | ||
122 | footer = Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a> | ||
123 | icon = common/trac.ico | ||
124 | name = | ||
125 | url = | ||
126 | |||
127 | [query] | ||
128 | default_anonymous_query = status!=closed&cc~=$USER | ||
129 | default_query = status!=closed&owner=$USER | ||
130 | items_per_page = 100 | ||
131 | ticketlink_query = ?status=!closed | ||
132 | |||
133 | [report] | ||
134 | items_per_page = 100 | ||
135 | items_per_page_rss = 0 | ||
136 | |||
137 | [revisionlog] | ||
138 | default_log_limit = 100 | ||
139 | graph_colors = ['#cc0', '#0c0', '#0cc', '#00c', '#c0c', '#c00'] | ||
140 | |||
141 | [roadmap] | ||
142 | stats_provider = DefaultTicketGroupStatsProvider | ||
143 | |||
144 | [search] | ||
145 | min_query_length = 3 | ||
146 | |||
147 | [spam-filter] | ||
148 | captcha = ImageCaptcha | ||
149 | captcha_areyouahuman_publisher_key = | ||
150 | captcha_areyouahuman_scoring_key = | ||
151 | captcha_expression_ceiling = 10 | ||
152 | captcha_expression_terms = 3 | ||
153 | captcha_image_alphabet = abcdefghkmnopqrstuvwxyz0123456789 | ||
154 | captcha_image_font_size = 25 | ||
155 | captcha_image_fonts = vera.ttf | ||
156 | captcha_image_letters = 6 | ||
157 | captcha_karma_lifetime = 86400 | ||
158 | captcha_keycaptcha_private_key = | ||
159 | captcha_keycaptcha_user_id = | ||
160 | captcha_recaptcha_private_key = | ||
161 | captcha_recaptcha_public_key = | ||
162 | reject_handler = CaptchaSystem | ||
163 | |||
164 | [ticket] | ||
165 | default_cc = | ||
166 | default_component = | ||
167 | default_description = | ||
168 | default_keywords = | ||
169 | default_milestone = | ||
170 | default_owner = < default > | ||
171 | default_priority = major | ||
172 | default_resolution = fixed | ||
173 | default_severity = | ||
174 | default_summary = | ||
175 | default_type = defect | ||
176 | default_version = | ||
177 | max_comment_size = 262144 | ||
178 | max_description_size = 262144 | ||
179 | preserve_newlines = default | ||
180 | restrict_owner = false | ||
181 | workflow = ConfigurableTicketWorkflow | ||
182 | |||
183 | [ticket-workflow] | ||
184 | accept = new,assigned,accepted,reopened -> accepted | ||
185 | accept.operations = set_owner_to_self | ||
186 | accept.permissions = TICKET_MODIFY | ||
187 | leave = * -> * | ||
188 | leave.default = 1 | ||
189 | leave.operations = leave_status | ||
190 | reassign = new,assigned,accepted,reopened -> assigned | ||
191 | reassign.operations = set_owner | ||
192 | reassign.permissions = TICKET_MODIFY | ||
193 | reopen = closed -> reopened | ||
194 | reopen.operations = del_resolution | ||
195 | reopen.permissions = TICKET_CREATE | ||
196 | resolve = new,assigned,accepted,reopened -> closed | ||
197 | resolve.operations = set_resolution | ||
198 | resolve.permissions = TICKET_MODIFY | ||
199 | |||
200 | [timeline] | ||
201 | abbreviated_messages = True | ||
202 | changeset_collapse_events = false | ||
203 | changeset_long_messages = false | ||
204 | changeset_show_files = 0 | ||
205 | default_daysback = 30 | ||
206 | max_daysback = 90 | ||
207 | newticket_formatter = oneliner | ||
208 | ticket_show_details = false | ||
209 | |||
210 | [trac] | ||
211 | auth_cookie_lifetime = 0 | ||
212 | auth_cookie_path = | ||
213 | authz_file = | ||
214 | authz_module_name = | ||
215 | auto_preview_timeout = 2.0 | ||
216 | auto_reload = False | ||
217 | backup_dir = db | ||
218 | base_url = | ||
219 | check_auth_ip = false | ||
220 | database = | ||
221 | debug_sql = False | ||
222 | default_charset = utf-8 | ||
223 | default_date_format = | ||
224 | default_dateinfo_format = relative | ||
225 | default_language = | ||
226 | default_timezone = GMT +6:00 | ||
227 | genshi_cache_size = 128 | ||
228 | htdocs_location = | ||
229 | ignore_auth_case = false | ||
230 | jquery_location = | ||
231 | jquery_ui_location = | ||
232 | jquery_ui_theme_location = | ||
233 | mainnav = wiki, timeline, roadmap, browser, tickets, newticket, search | ||
234 | metanav = login, logout, prefs, help, about | ||
235 | mysqldump_path = mysqldump | ||
236 | never_obfuscate_mailto = false | ||
237 | permission_policies = DefaultPermissionPolicy, LegacyAttachmentPolicy | ||
238 | permission_store = DefaultPermissionStore | ||
239 | pg_dump_path = pg_dump | ||
240 | repository_dir = | ||
241 | repository_sync_per_request = (default) | ||
242 | repository_type = git | ||
243 | resizable_textareas = true | ||
244 | secure_cookies = False | ||
245 | show_email_addresses = false | ||
246 | show_ip_addresses = false | ||
247 | timeout = 20 | ||
248 | use_base_url_for_redirect = False | ||
249 | |||
250 | [versioncontrol] | ||
251 | allowed_repository_dir_prefixes = | ||
252 | |||
253 | [wiki] | ||
254 | ignore_missing_pages = false | ||
255 | max_size = 262144 | ||
256 | render_unsafe_content = false | ||
257 | safe_schemes = cvs, file, ftp, git, irc, http, https, news, sftp, smb, ssh, svn, svn+ssh | ||
258 | split_page_names = false |