# limitations under the License.
#
-include_recipe "accounts"
include_recipe "apache"
-package %w[
- trac
- ruby
-]
+apache_module "rewrite"
-site_name = "trac.openstreetmap.org"
-site_directory = "/srv/#{site_name}"
-
-directory "/var/lib/trac" do
- owner "trac"
- group "trac"
- mode "755"
-end
-
-execute "trac-initenv-#{site_name}" do
- command "trac-admin /var/lib/trac initenv #{site_name} sqlite:db/trac.db"
- user "trac"
- group "trac"
- not_if { ::File.exist?("/var/lib/trac/VERSION") }
-end
-
-template "/var/lib/trac/conf/trac.ini" do
- source "trac.ini.erb"
- owner "trac"
- group "www-data"
- mode "644"
- variables :name => site_name
-end
-
-remote_directory "/var/lib/trac/htdocs" do
- source "htdocs"
- owner "trac"
- group "trac"
- mode "755"
- files_owner "trac"
- files_group "trac"
- files_mode "644"
- purge true
-end
-
-remote_directory "/var/lib/trac/templates" do
- source "templates"
- owner "trac"
- group "trac"
- mode "755"
- files_owner "trac"
- files_group "trac"
- files_mode "644"
- purge true
-end
-
-execute "trac-deploy-#{site_name}" do
- command "trac-admin /var/lib/trac deploy #{site_directory}"
- user "root"
+directory "/srv/trac.openstreetmap.org" do
+ owner "root"
group "root"
- not_if { ::File.exist?(site_directory) }
+ mode "0755"
end
-cookbook_file "/usr/local/bin/trac-authenticate" do
+cookbook_file "/srv/trac.openstreetmap.org/tickets.map" do
owner "root"
group "root"
- mode "755"
-end
-
-apache_module "wsgi"
-
-apache_module "authnz_external" do
- package "libapache2-mod-authnz-external"
+ mode "0644"
end
ssl_certificate "trac.openstreetmap.org" do
notifies :reload, "service[apache2]"
end
-apache_site site_name do
+apache_site "trac.openstreetmap.org" do
template "apache.erb"
- directory site_directory
variables :user => "trac", :group => "trac", :aliases => ["trac.osm.org"]
end
-
-template "/etc/sudoers.d/trac" do
- source "sudoers.erb"
- owner "root"
- group "root"
- mode "440"
-end
-
-template "/etc/cron.daily/trac-backup" do
- source "backup.cron.erb"
- owner "root"
- group "root"
- mode "755"
-end
+++ /dev/null
-# DO NOT EDIT - This file is being maintained by Chef
-
-[attachment]
-max_size = 262144
-max_zip_size = 2097152
-render_unsafe_content = false
-
-[browser]
-color_scale = True
-downloadable_paths = /trunk, /branches/*, /tags/*
-hide_properties = svk:merge
-intermediate_color =
-intermediate_point =
-newest_color = (255, 136, 136)
-oldest_color = (136, 136, 255)
-oneliner_properties = trac:summary
-render_unsafe_content = false
-wiki_properties = trac:description
-
-[changeset]
-max_diff_bytes = 10000000
-max_diff_files = 0
-wiki_format_messages = true
-
-[components]
-tracopt.ticket.deleter = enabled
-tracopt.versioncontrol.git.* = enabled
-tracopt.versioncontrol.svn.* = enabled
-
-[header_logo]
-alt = OpenStreetMap
-height = 80
-link = https://<%= @name %>/
-src = site/osm.png
-width = 228
-
-[inherit]
-htdocs_dir =
-plugins_dir =
-templates_dir =
-
-[intertrac]
-josm.compat = false
-josm.title = JOSM Trac
-josm.url = https://josm.openstreetmap.de
-
-[logging]
-log_file = trac.log
-# log_format = <inherited>
-log_level = INFO
-log_type = file
-
-[milestone]
-stats_provider = DefaultTicketGroupStatsProvider
-
-[mimeviewer]
-max_preview_size = 262144
-mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb
-mime_map_patterns = text/plain:README|INSTALL|COPYING.*
-pygments_default_style = trac
-pygments_modes =
-tab_width = 8
-treat_as_binary = application/octet-stream, application/pdf, application/postscript, application/msword,application/rtf,
-
-[notification]
-admit_domains =
-always_notify_owner = true
-always_notify_reporter = true
-always_notify_updater = true
-ambiguous_char_width = single
-batch_subject_template = $prefix Batch modify: $tickets_descr
-email_sender = SmtpEmailSender
-ignore_domains =
-mime_encoding = none
-sendmail_path = sendmail
-smtp_always_bcc =
-smtp_always_cc =
-smtp_default_domain =
-smtp_enabled = true
-smtp_from = trac@noreply.openstreetmap.org
-smtp_from_author = false
-smtp_from_name =
-smtp_password =
-smtp_port = 25
-smtp_replyto = trac@noreply.openstreetmap.org
-smtp_server = localhost
-smtp_subject_prefix = __default__
-smtp_user =
-ticket_subject_template = $prefix #$ticket.id: $summary
-use_public_cc = true
-use_short_addr = false
-use_tls = false
-
-[project]
-admin =
-admin_trac_url = .
-descr = OpenStreetMap is a free editable map of the whole world
-footer = Visit the map at<br /><a href="https://www.openstreetmap.org/">https://www.openstreetmap.org/</a>
-icon = site/osm.ico
-name = OpenStreetMap
-url = https://www.openstreetmap.org/
-
-[query]
-default_anonymous_query = status!=closed&cc~=$USER
-default_query = status!=closed&owner=$USER
-items_per_page = 100
-ticketlink_query = ?status=!closed
-
-[report]
-items_per_page = 100
-items_per_page_rss = 0
-
-[repositories]
-subversion.dir = /var/lib/subversion/repos/openstreetmap
-subversion.description = Legacy subversion repository
-subversion.type = svn
-subversion.url = https://svn.openstreetmap.org/
-subversion.hidden = true
-<% Dir.glob("/var/lib/git/*.git").sort.each do |repository| -%>
-<%= File.basename(repository, ".git") %>.dir = <%= repository %>
-<%= File.basename(repository, ".git") %>.description = <%= IO.read("#{repository}/description").strip %>
-<%= File.basename(repository, ".git") %>.type = git
-<%= File.basename(repository, ".git") %>.url = https://git.openstreetmap.org/public/<%= File.basename(repository) %>
-<% end -%>
-.alias = subversion
-
-[revisionlog]
-default_log_limit = 100
-graph_colors = ['#cc0', '#0c0', '#0cc', '#00c', '#c0c', '#c00']
-
-[roadmap]
-stats_provider = DefaultTicketGroupStatsProvider
-
-[search]
-# default_disabled_filters = <inherited>
-min_query_length = 3
-
-[sqlite]
-# extensions = <inherited>
-
-[svn]
-branches = trunk,branches/*
-tags = tags/*
-
-[ticket]
-default_cc =
-default_component =
-default_description =
-default_keywords =
-default_milestone =
-default_owner = < default >
-default_priority = minor
-default_resolution = fixed
-default_severity =
-default_summary =
-default_type = defect
-default_version =
-max_comment_size = 262144
-max_description_size = 262144
-preserve_newlines = default
-restrict_owner = false
-workflow = ConfigurableTicketWorkflow
-
-[ticket-workflow]
-accept = new,assigned,accepted,reopened -> accepted
-accept.operations = set_owner_to_self
-accept.permissions = TICKET_MODIFY
-leave = * -> *
-leave.default = 1
-leave.operations = leave_status
-reassign = new,assigned,accepted,reopened -> assigned
-reassign.operations = set_owner
-reassign.permissions = TICKET_MODIFY
-reopen = closed -> reopened
-reopen.operations = del_resolution
-reopen.permissions = TICKET_CREATE
-resolve = new,assigned,accepted,reopened -> closed
-resolve.operations = set_resolution
-resolve.permissions = TICKET_MODIFY
-
-[timeline]
-abbreviated_messages = True
-changeset_collapse_events = false
-changeset_long_messages = false
-changeset_show_files = 0
-default_daysback = 30
-max_daysback = 90
-newticket_formatter = oneliner
-ticket_show_details = false
-
-[trac]
-auth_cookie_lifetime = 0
-auth_cookie_path =
-authz_file =
-authz_module_name =
-auto_preview_timeout = 2.0
-auto_reload = False
-backup_dir = db
-base_url = https://<%= @name %>/
-check_auth_ip = false
-database = sqlite:db/trac.db
-debug_sql = False
-default_charset = utf-8
-default_dateinfo_format = relative
-genshi_cache_size = 128
-htdocs_location =
-ignore_auth_case = false
-jquery_location =
-jquery_ui_location =
-jquery_ui_theme_location =
-mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search
-metanav = login,logout,prefs,help,about
-mysqldump_path = mysqldump
-never_obfuscate_mailto = false
-permission_policies = DefaultPermissionPolicy, LegacyAttachmentPolicy
-permission_store = DefaultPermissionStore
-pg_dump_path = pg_dump
-repository_dir =
-repository_sync_per_request = (default)
-repository_type = svn
-resizable_textareas = true
-secure_cookies = False
-show_email_addresses = false
-show_ip_addresses = false
-timeout = 20
-use_base_url_for_redirect = False
-
-[versioncontrol]
-allowed_repository_dir_prefixes =
-
-[wiki]
-ignore_missing_pages = false
-max_size = 262144
-render_unsafe_content = false
-safe_schemes = cvs, file, ftp, git, irc, http, https, news, sftp, smb, ssh, svn, svn+ssh
-split_page_names = false
-