Changeset 17715
- Timestamp:
- Aug 11, 2023, 6:27:33 AM (7 weeks ago)
- Location:
- branches/1.4-stable
- Files:
-
- 15 edited
-
INSTALL.rst (modified) (1 diff)
-
trac/wiki/default-pages/InterMapTxt (modified) (2 diffs)
-
trac/wiki/default-pages/TracBackup (modified) (1 diff)
-
trac/wiki/default-pages/TracChangeLog (modified) (1 diff)
-
trac/wiki/default-pages/TracChangeset (modified) (1 diff)
-
trac/wiki/default-pages/TracImport (modified) (1 diff)
-
trac/wiki/default-pages/TracInstall (modified) (1 diff)
-
trac/wiki/default-pages/TracInterfaceCustomization (modified) (2 diffs)
-
trac/wiki/default-pages/TracModPython (modified) (1 diff)
-
trac/wiki/default-pages/TracModWSGI (modified) (1 diff)
-
trac/wiki/default-pages/TracNotification (modified) (4 diffs)
-
trac/wiki/default-pages/TracPlugins (modified) (10 diffs)
-
trac/wiki/default-pages/TracQuery (modified) (5 diffs)
-
trac/wiki/default-pages/TracRepositoryAdmin (modified) (6 diffs)
-
trac/wiki/default-pages/TracStandalone (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.4-stable/INSTALL.rst
r17584 r17715 748 748 .. _PySqlite*: https://trac.edgewall.org/intertrac/PySqlite%23ThePysqlite2bindings 749 749 .. _pysqlite: https://pypi.org/project/pysqlite 750 .. _PySVN: http ://pysvn.tigris.org/750 .. _PySVN: https://pypi.org/project/PySVN 751 751 .. _Python: https://www.python.org/ 752 752 .. _pytz: http://pytz.sourceforge.net -
branches/1.4-stable/trac/wiki/default-pages/InterMapTxt
r17584 r17715 65 65 66 66 SvnWiki https://www.orcaware.com/svn/wiki/ # Subversion Wiki 67 svnissue http ://subversion.tigris.org/issues/show_bug.cgi?id=# Subversion issue #$168 svn-issue http ://subversion.tigris.org/issues/show_bug.cgi?id=# Subversion issue #$169 svncset http ://svn.collab.net/viewvc/svn?view=revision&revision=# Subversion [$1]67 svnissue https://issues.apache.org/jira/browse/SVN- # Subversion issue #$1 68 svn-issue https://issues.apache.org/jira/browse/SVN- # Subversion issue #$1 69 svncset https://svn.apache.org/r # Subversion [$1] 70 70 71 71 mod-wsgi https://code.google.com/p/modwsgi/wiki/ # mod_wsgi Wiki on Google Code … … 85 85 SO https://stackoverflow.com/questions/ # Question $1 in StackOverflow 86 86 87 Transifex https://www.transifex.com/projects/p/trac/ 87 Transifex https://www.transifex.com/cboos/trac/ 88 TransifexLang https://www.transifex.com/cboos/trac/language/$1/ 89 TransifexResource https://www.transifex.com/cboos/trac/$1/ 90 TransifexView https://www.transifex.com/cboos/trac/viewstrings/#$1/$2 88 91 89 92 kwquery /query?group=status&keywords=~ # Custom query for tickets matching keyword $1 -
branches/1.4-stable/trac/wiki/default-pages/TracBackup
r16747 r17715 5 5 Trac backups are a copied snapshot of the entire [TracEnvironment project environment] directory, including the database. Backups can be created using the `hotcopy` command of [TracAdmin trac-admin]. 6 6 7 '''Note''': Trac uses the `hotcopy` nomenclature to match that of [http ://subversion.tigris.org/ Subversion], to make it easier to remember when managing both Trac and Subversion servers.7 '''Note''': Trac uses the `hotcopy` nomenclature to match that of [https://subversion.apache.org/ Subversion]. 8 8 9 9 == Creating a Backup -
branches/1.4-stable/trac/wiki/default-pages/TracChangeLog
r17584 r17715 6 6 7 7 == 1.4.x Releases 8 9 === 1.4.4 10 11 //(August 11, 2023)// 12 13 Trac 1.4.4 contains about a dozen minor fixes 14 and improvements. 15 16 [trac:source:/tags/trac-1.4.4 View Tag] | [trac:milestone:1.4.4 View Milestone] 8 17 9 18 === 1.4.3 -
branches/1.4-stable/trac/wiki/default-pages/TracChangeset
r17253 r17715 15 15 Here you will find metadata: 16 16 17 * Timestamp — When the changeset was commit ed18 * Author — Who commit ed the changeset17 * Timestamp — When the changeset was committed 18 * Author — Who committed the changeset 19 19 * Message — A brief description from the author (the commit log message) 20 20 * Location — Parent directory of all files affected by this changeset -
branches/1.4-stable/trac/wiki/default-pages/TracImport
r17584 r17715 65 65 == !PlanetForge 66 66 67 [https://trac-hacks.org/wiki/PlanetForgeImportExportPlugin PlanetForgeImportExportPlugin]: this plugin exports Trac data (wiki, tickets, compo ments, permissions, repositories, etc.) using the open format designed by the [https://gforge.inria.fr/projects/coclico/ COCLICO] project. It extends the webadmin panel and the 'trac admin ...' command. Has no 'import' feature.67 [https://trac-hacks.org/wiki/PlanetForgeImportExportPlugin PlanetForgeImportExportPlugin]: this plugin exports Trac data (wiki, tickets, components, permissions, repositories, etc.) using the open format designed by the [https://gforge.inria.fr/projects/coclico/ COCLICO] project. It extends the webadmin panel and the 'trac admin ...' command. Has no 'import' feature. 68 68 69 69 == Scarab -
branches/1.4-stable/trac/wiki/default-pages/TracInstall
r17584 r17715 60 60 {{{#!div style="border: 1pt dotted; margin: 1em" 61 61 **Note:** 62 * Trac '''doesn't''' use [http ://pysvn.tigris.org/PySVN], nor does it work yet with the newer `ctype`-style bindings.62 * Trac '''doesn't''' use [https://pypi.org/project/PySVN PySVN], nor does it work yet with the newer `ctype`-style bindings. 63 63 * If using Subversion, Trac must be installed on the '''same machine'''. Remote repositories are [trac:ticket:493 not supported]. 64 64 }}} -
branches/1.4-stable/trac/wiki/default-pages/TracInterfaceCustomization
r17253 r17715 93 93 94 94 Notice that as Jinja2 is mostly content agnostic, you are free to open some `<div>` element in the `site_header.html` file and only close it in `site_footer.html` file. 95 Besides, as in any other Trac Jinja2 template, you can use some Trac specific features, for example the `${href.chrome('site/style.css')}` attribute references `style.css` in the environment's `htdocs/` directory. In a similar fashion `${chrome.htdocs_location}` is used to specify the common `htdocs/` directory belonging to a Trac installation. That latter location can however be overrid en using the [TracIni#trac-htdocs_location-option "[trac] htdocs_location"] setting.95 Besides, as in any other Trac Jinja2 template, you can use some Trac specific features, for example the `${href.chrome('site/style.css')}` attribute references `style.css` in the environment's `htdocs/` directory. In a similar fashion `${chrome.htdocs_location}` is used to specify the common `htdocs/` directory belonging to a Trac installation. That latter location can however be overridden using the [TracIni#trac-htdocs_location-option "[trac] htdocs_location"] setting. 96 96 97 97 Example snippet of adding introduction text to the new ticket form (but not shown during preview): … … 194 194 == Project Templates 195 195 196 The appearance of each individual Trac environment, ie instance of a project, can be customized independently of other projects, even those hosted on the same server. The recommended way is to use `site_{head,header,footer}.html` templates whenever possible, see [#SiteAppearance]. Using `site_{head,header,footer}.html` means changes are made to the original templates as they are rendered, and you should not normally need to redo modifications whenever Trac is upgraded. If you do make a copy of `theme.html` or any other Trac template, you need to migrate your modifi ations to the newer version. If not, new Trac features or bug fixes may not work as expected.196 The appearance of each individual Trac environment, ie instance of a project, can be customized independently of other projects, even those hosted on the same server. The recommended way is to use `site_{head,header,footer}.html` templates whenever possible, see [#SiteAppearance]. Using `site_{head,header,footer}.html` means changes are made to the original templates as they are rendered, and you should not normally need to redo modifications whenever Trac is upgraded. If you do make a copy of `theme.html` or any other Trac template, you need to migrate your modifications to the newer version. If not, new Trac features or bug fixes may not work as expected. 197 197 198 198 With that word of caution, any Trac template may be copied and customized. The default Trac templates are located in the Trac egg or wheel, such as `/usr/lib/pythonVERSION/site-packages/Trac-VERSION.egg/trac/templates, ../trac/ticket/templates, ../trac/wiki/templates`. The [#ProjectList] template file is called `index.html`, while the template responsible for main layout is called `theme.html`. Page assets such as images and CSS style sheets are located in the egg's or wheel's `trac/htdocs` directory. -
branches/1.4-stable/trac/wiki/default-pages/TracModPython
r17584 r17715 83 83 PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_template.html 84 84 85 # A space delimit ted list, with a "," between key and value pairs.85 # A space delimited list, with a "," between key and value pairs. 86 86 PythonOption TracTemplateVars key1,val1 key2,val2 87 87 -
branches/1.4-stable/trac/wiki/default-pages/TracModWSGI
r17253 r17715 260 260 }}} 261 261 262 Note 1: This is the case where the LDAP search will get around the multiple OUs, con ecting to the Global Catalog Server portion of AD. Note the port is 3268, not the normal LDAP 389. The GCS is basically a "flattened" tree which allows searching for a user without knowing to which OU they belong.262 Note 1: This is the case where the LDAP search will get around the multiple OUs, connecting to the Global Catalog Server portion of AD. Note the port is 3268, not the normal LDAP 389. The GCS is basically a "flattened" tree which allows searching for a user without knowing to which OU they belong. 263 263 264 264 Note 2: You can also require the user be a member of a certain LDAP group, instead of just having a valid login: -
branches/1.4-stable/trac/wiki/default-pages/TracNotification
r17584 r17715 20 20 Alternatively, a default domain name ('''`smtp_default_domain`''') can be set in the TracIni file, see [#ConfigurationOptions Configuration Options] below. In this case, the default domain will be appended to the username, which can be useful for an "Intranet" kind of installation. 21 21 22 When using apache and mod_kerb for authentication against Kerberos / Active Directory, usernames take the form ('''`username@EXAMPLE.LOCAL`'''). To avoid this being interpreted as an email address, add the Kerberos domain to ('''`ignore_domains`''').22 When using apache and mod_kerb for authentication against Kerberos / Active Directory, usernames take the form ('''`username@EXAMPLE.LOCAL`'''). To avoid this being interpreted as an email address, add the Kerberos domain to ('''`ignore_domains`'''). 23 23 24 24 === Ticket attachment notifications … … 209 209 Notification errors are not always reported through the web interface, so the user who submits a change or creates a ticket may not get notified about a notification failure. The Trac administrator needs to look at the log to find the error message and traceback. 210 210 211 === ''Permission denied''error211 === Permission denied error 212 212 213 213 Typical error message: … … 240 240 }}} 241 241 242 === ''Suspected spam''error242 === Suspected spam error 243 243 244 244 Some SMTP servers may reject the notification email sent by Trac. … … 247 247 248 248 Quoted printable encoding works better with languages that use one of the Latin charsets. For Asian charsets, stick with the Base64 encoding. 249 250 === Emails not sent 251 252 If you are switching back to using Trac to send emails from, say, the [https://trac-hacks.org/wiki/AnnouncerPlugin AnnouncerPlugin], be sure to enable `EmailDistributor` in your Trac configuration. It may have been disabled when using an email plugin. There may be no message in the Trac log when all is good to go, but the actual sending is disabled. 249 253 250 254 ---- -
branches/1.4-stable/trac/wiki/default-pages/TracPlugins
r17584 r17715 7 7 == Plugin discovery 8 8 9 A plugin is either a single .py file or a package (.egg or .whl). Trac looks for plugins in Python's `site-packages` directory, the [TracIni#GlobalConfiguration global shared] `plugins` directory and the [TracEnvironment project environment] `plugins` directory. Plugins installed to the project environment `plugins` directory are enabled, unless explicitly disabled in the `[components]` section of the `trac.ini` file. Plugins installed elsewhere must be explicitly enabled in the [TracIni#components-section "[components]"] section of the `trac.ini` file.9 A plugin is either a single .py file or a package (.egg or .whl). Trac looks for plugins in Python's `site-packages` directory, the [TracIni#GlobalConfiguration global shared] `plugins` directory and the [TracEnvironment project environment] `plugins` directory. Plugins installed to the project environment `plugins` directory are enabled, unless explicitly disabled in the `[components]` section of the `trac.ini` file. Plugins installed elsewhere must be explicitly enabled in the [TracIni#components-section "[components]"] section of the `trac.ini` file. 10 10 11 11 == Installing a Trac plugin 12 12 13 The instructions below are applicable to aplugins installed as packages. Plugins implemented as a single `py` file should be downloaded and copied to the [TracEnvironment project environment] `plugins` directory or the [TracIni#GlobalConfiguration global shared] plugins directory.13 The instructions below are applicable to plugins installed as packages. Plugins implemented as a single `py` file should be downloaded and copied to the [TracEnvironment project environment] `plugins` directory or the [TracIni#GlobalConfiguration global shared] plugins directory. 14 14 15 15 === For a single project … … 25 25 * Copy the egg file to the `plugins` directory of the [TracEnvironment project environment]. 26 26 27 Make sure the web server has sufficient permissions to read the plugin egg and restart the web server. If you are running as a [TracStandalone "tracd" standalone server], restart tracd (i.e. kill the process and run again).27 Make sure the web server has sufficient permissions to read the plugin egg and restart the web server. If you are running as a [TracStandalone "tracd" standalone server], restart tracd, i.e. kill the process and run again. 28 28 29 29 Trac also searches for plugins installed in the [TracIni#GlobalConfiguration global shared] plugins directory. This is a convenient way to share the installation of plugins across several, but not all, environments. … … 43 43 The modern Python package manager, `pip`, is included in Python 2.7.9 and later. In earlier versions of Python it can be installed through the package manager of your OS (e.g. `apt-get install python-pip`) or using [https://pip.pypa.io/en/latest/installing.html#install-pip get_pip.py]. 44 44 45 Using `pip`, the plugin will be installed 46 in the [https://pythonwheels.com/ wheel format], which is the modern standard for Python and a 47 replacement for the egg format. 45 Using `pip`, the plugin will be installed in the [https://pythonwheels.com/ wheel format], which is the modern standard for Python and a replacement for the egg format. 48 46 49 47 ==== From PyPI … … 56 54 The version can be specified, which can be useful if you don't want to install the latest: 57 55 {{{#!sh 58 $ pip install TracTags== 0.1056 $ pip install TracTags==1.2 59 57 }}} 60 58 … … 66 64 }}} 67 65 68 Replace the `svn+` prefix with `git+` if installing 69 from a Git repository. 66 Replace the `svn+` prefix with `git+` if installing from a Git repository. 70 67 71 68 Or from the path or URL of a tar.gz or zip archive: … … 98 95 ==== Upgrading the environment 99 96 100 Some plugins require an environment upgrade. This will typically be necessary for plugins that implement `IEnvironmentSetupParticipant`. Common reasons for requiring an environment upgrade are to add tables to the database or add configuration parameters to trac.ini. A notification will be displayed when accessing Trac for the first time after installing a plugin and restarting the web server. To upgrade the environment, run the command:97 Some plugins require an environment upgrade. This will typically be necessary for plugins that implement `IEnvironmentSetupParticipant`. Common reasons for requiring an environment upgrade are to add tables to the database or add configuration parameters to `trac.ini`. A notification will be displayed when accessing Trac for the first time after installing a plugin and restarting the web server. To upgrade the environment, run the command: 101 98 102 99 {{{#!sh … … 108 105 ==== Redeploying static resources 109 106 110 If you [TracInstall#MappingStaticResources mapped static resources] so they are served by the web server, and the plugin contains static resources (CSS, !JavaScript and image files), the resources will need to be deployed to the location on the filesystem that is served by the web server.107 If you [TracInstall#MappingStaticResources mapped static resources] so they are served by the web server, and the plugin contains static resources, such as stylesheets, !JavaScript and image files, the resources will need to be deployed to the location on the filesystem that is served by the web server. 111 108 112 109 Execute the `deploy` command, as is done during install and [TracUpgrade#a5.Refreshstaticresources upgrade]: … … 190 187 '''Note''': !SetEnv requires the `mod_env` module, which needs to be activated for Apache. In this case the !SetEnv directive can also be used in the `mod_python` Location block. 191 188 192 For [TracFastCgi FastCGI], you 'll need to `-initial-env` option, or whatever is provided by your web server for setting environment variables.189 For [TracFastCgi FastCGI], you will need to `-initial-env` option, or whatever is provided by your web server for setting environment variables. 193 190 194 191 '''Note''': if you already use -initial-env to set the project directory for either a single project or parent, you will need to add an additional -initial-env directive to the !FastCgiConfig directive: … … 213 210 === Did you get the correct version of the Python egg? 214 211 215 Python eggs have the Python version encoded in their filename. For example, `MyPlugin-1.0-py2.5.egg` is an egg for Python 2.5, and will '''not''' be loaded if you're running a different Python version (such as 2.4 or 2.6).212 Python eggs have the Python version encoded in their filename. For example, `MyPlugin-1.0-py2.5.egg` is an egg for Python 2.5, and will '''not''' be loaded if you're running a different Python version, such as 2.4 or 2.6. 216 213 217 214 Also, verify that the egg file you downloaded is indeed a .zip archive. If you downloaded it from a Trac site, you may have downloaded the HTML preview page instead. … … 244 241 * Only one version of the plugin can be loaded for each running Trac server, i.e. each Python process. The Python namespaces and module list will be shared, and it cannot handle duplicates. Whether a plugin is `enabled` or `disabled` makes no difference. 245 242 * A globally installed plugin will override any version in the global or project plugins directories. A plugin from the global plugins directory will be discovered ''before'' any project plugins directory. 246 * If your Trac server hosts more than one project (as with `TRAC_ENV_PARENT_DIR` setups), having two versions of a plugin in two different projects will give unpredic atable results. Only one of them will load, and the one loaded will be shared by both projects. Trac will load the first plugin found, usually from the project that receives the first request.243 * If your Trac server hosts more than one project (as with `TRAC_ENV_PARENT_DIR` setups), having two versions of a plugin in two different projects will give unpredictable results. Only one of them will load, and the one loaded will be shared by both projects. Trac will load the first plugin found, usually from the project that receives the first request. 247 244 * Having more than one version listed inside Python site-packages is fine, because setuptools will make sure you get the version installed most recently. However, don't store more than one version inside a global or project plugins directory: neither the version number nor the installed date will matter at all. There is no way to determine which one will be located first when Trac searches the directory for plugins. 248 245 -
branches/1.4-stable/trac/wiki/default-pages/TracQuery
r17253 r17715 43 43 You can also save references to queries in Wiki content, as described below. 44 44 45 '''Note:''' one way to easily build queries like the ones below is to create and test the queries using Custom Query module. Clicking ''Save query'' will display the query string for you, all you need to do is remove the extra line breaks.45 '''Note:''' One way to easily build queries like the ones below is to create and test the queries using Custom Query module. Clicking ''Save query'' will display the query string for you, all you need to do is remove the extra line breaks. 46 46 47 '''Note:''' you must have the '''REPORT_CREATE''' permission in orderto save queries to the list of default reports. The ''Save query'' button will only appear if you are logged in as a user that has been granted this permission. If your account does not have permission to create reports, you can still use the methods below to save a query.47 '''Note:''' You must have the `REPORT_CREATE` permission to save queries to the list of default reports. The ''Save query'' button will only appear if you are logged in as a user that has been granted this permission. If your account does not have permission to create reports, you can still use the methods below to save a query. 48 48 49 49 == TracLinks to Queries … … 51 51 You can make a link to a query from any Wiki page using a simple [TracQuery#QueryLanguage query language] to specify the criteria. 52 52 {{{ 53 [query:status=new|assigned|reopened&version=1. 0 Active tickets against 1.0]53 [query:status=new|assigned|reopened&version=1.4 Active tickets against 1.4] 54 54 }}} 55 55 56 56 Which is displayed as: 57 [query:status=new|assigned|reopened&version=1. 0 Active tickets against 1.0]57 [query:status=new|assigned|reopened&version=1.4 Active tickets against 1.4] 58 58 59 59 Alternatively, you can copy the query string from the browser URL box and paste it into the Wiki link, including the leading `?` character: … … 67 67 == Query Language 68 68 69 The `query:` TracLinks and the [TicketQuery "[[TicketQuery]]"] macro both use a mini “query language” for specifying query filters. Filters are separated by ampersands (`&`) .Each filter consists of the ticket field name, an operator and one or more values. Multiple values are separated using a pipe (`|`), meaning the filter matches any of the values. To include a literal `&` or `|` in a value, escape the character with a backslash (`\`).69 The `query:` TracLinks and the [TicketQuery "[[TicketQuery]]"] macro both use a mini “query language” for specifying query filters. Filters are separated by ampersands (`&`), the `[[TicketQuery]]` macro additionally also accepts commas (`,`). Each filter consists of the ticket field name, an operator and one or more values. Multiple values are separated using a pipe (`|`), meaning the filter matches any of the values. To include a literal `&` or `|` in a value, escape the character with a backslash (`\`). 70 70 71 71 The available operators are: … … 81 81 || '''`!$=`''' || the field content does not end with any of the values || 82 82 83 Filters combining matches and negated matches can be constructed for text fields such as Keywords and CC using the //contains// (`~=`) operator. The `-` operator is used to negate a match and double quotes (//since 1.2.1//) are used for whitespace-separated words in a phrase. For example, `keywords~=word1 word2 -word3 "word4 word5"` matches tickets containing `word1` and `word2`, not `word3` and also `word4 word5`. 83 Filters combining matches matches can be constructed for text fields such as Keywords and CC using the //contains// (`~=`) operator. 84 The `!` operator is used to negate a match. 85 86 Note that for `query:` the match operator `=` needs to be on first position when combined with other operators, for example `=!` or `=~`. The `[[TicketQuery]]` macro on the other side accepts both syntax variants, for example `!=` or `~=` as well as `=!` or `=~`. 87 88 Double quotes (//since Trac 1.2.1//) are used for whitespace-separated words in a phrase. For example, `keywords~=word1 word2 -word3 "word4 word5"` matches tickets containing `word1` and `word2`, not `word3` and also `word4 word5`. 89 84 90 || '''`status=closed,keywords~=firefox`''' || query closed tickets that contain keyword `firefox` || 85 91 || '''`status=closed,keywords~=opera`''' || query closed tickets that contain keyword `opera` || … … 91 97 92 98 The date fields `created` and `modified` and custom fields of type `time` can be constrained by using the `=` operator and specifying a value containing two dates separated by two dots (`..`). Either end of the date range can be left empty, meaning that the corresponding end of the range is open. The date parser understands a few natural date specifications like "3 weeks ago", "last month" and "now", as well as Bugzilla-style date specifications like "1d", "2w", "3m" or "4y" for 1 day, 2 weeks, 3 months and 4 years, respectively. Spaces in date specifications can be omitted to avoid having to quote the query string. 93 || '''`created=20 07-01-01..2008-01-01`''' || query tickets created in 2007 ||99 || '''`created=2017-01-01..2018-01-01`''' || query tickets created in 2017 || 94 100 || '''`created=lastmonth..thismonth`''' || query tickets created during the previous month || 95 101 || '''`modified=1weekago..`''' || query tickets that have been modified in the last week || -
branches/1.4-stable/trac/wiki/default-pages/TracRepositoryAdmin
r17584 r17715 4 4 == Quick start #QuickStart 5 5 6 Trac is primarily used as an issue tracking and project planning system, but can also be used to connect to and maintain source code repositories. This page describes the guidelines and caveats when connecting Trac to a repository. 6 7 * Enable the repository connector(s) for the version control system(s) that you will use. 7 8 * Add repositories through the //Repositories// admin page, using `trac-admin` or by editing the `[repositories]` section of [[wiki:TracIni#repositories-section|trac.ini]]. … … 11 12 == Enabling the components 12 13 13 Support for version control systems is provided by optional components distributed with Trac, which are disabled by default //(since 1.0)//. Subversion and Git must be explicitly enabled if you wish to use them.14 Support for version control systems is provided by optional components distributed with Trac, which are disabled by default. Subversion and Git must be explicitly enabled if you wish to use them. 14 15 15 16 The version control systems can be enabled by adding the following to the `[components]` section of your [TracIni#components-section trac.ini], or enabling the components through the //Plugins// admin page. … … 39 40 === Repository Attributes 40 41 41 There are a number of attributes that can be specified for each repository, and additional attributes may be available through plugins. A repository `name` and one of the `alias` or `dir` attributes are mandatory. All others are optional. 42 43 The following attributes are supported: 42 A repository is defined through the attribute `name` and one of the `alias` or `dir` attributes, all other attributes are optional: 44 43 45 44 ||='''Attribute''' =||='''Description''' =|| … … 51 50 ||The text specified in the `description` attribute is displayed below the top-level entry for the repository in the source browser. It supports WikiFormatting. || 52 51 ||`dir` ||\ 53 || The `dir` attribute specifies the location of the repository in the filesystem. The `alias` and `dir` attributes are mutually exclusive. ||52 || Specifies the location of the repository in the filesystem. The `alias` and `dir` attributes are mutually exclusive. || 54 53 ||`hidden` ||\ 55 54 || When set to `true`, the repository is hidden from the repository index page in the source browser. Browsing the repository is still possible, and links referencing the repository remain valid. || 55 ||`name` ||\ 56 || Identifies the version control system used by the repository. This field is mandatory. || 56 57 ||`sync_per_request`||\ 57 58 || When set to `true` the repository will be synchronized on every request (implicit synchronization). This is generally not recommended. See [#Synchronization repository synchronization] for a comparison of explicit and implicit synchronization. The attribute defaults to `false`. || 58 59 ||`type` ||\ 59 || The `type` attribute specifies the version control system used by the repository. Trac provides support for Subversion and Git, and plugins add support for several other systems. If `type` is not specified, it defaults to the value of the `[versioncontrol]` [wiki:TracIni#versioncontrol-default_repository_type-option default_repository_type] option. ||60 || Specifies the version control system used by the repository. Trac provides support for Subversion and Git, and plugins add support for several other systems. If `type` is not specified, it defaults to the value of the `[versioncontrol]` [wiki:TracIni#versioncontrol-default_repository_type-option default_repository_type] option. || 60 61 ||`url` ||\ 61 || The `url` attribute specifies the root URL to be used for checking out from the repository. When specified, a "Repository URL" link is added to the context navigation links in the source browser, that can be copied into the tool used for creating the working copy. || 62 || Specifies the root URL to be used for checking out from the repository. When specified, a "Repository URL" link is added to the context navigation links in the source browser, that can be copied into the tool used for creating the working copy. || 63 64 Additional attributes may be available through plugins. 62 65 63 66 === Scoped Repository … … 274 277 === Git control files missing 275 278 276 If your repository is not brows eable and you find a message in the log that looks like:279 If your repository is not browsable and you find a message in the log that looks like: 277 280 {{{ 278 281 2017-08-08 10:49:17,339 Trac[PyGIT] ERROR: GIT control files missing in '/path/to/git-repository' … … 280 283 }}} 281 284 282 First check that the path to your repository is correct. If the path is correct, you may have a permission problem whereby the web server cannotaccess the repository. You can use Git to verify the repository. On a Debian-like Linux OS, the following command should help:285 First check that the path to your repository is correct. If the path is correct, you may not have the permission to have the web server access the repository. You can use Git to verify the repository. On a Debian-like Linux OS, the following command should help: 283 286 {{{#!sh 284 287 $ sudo -u www-data git --git-dir=/path/to/git-repository fsck -
branches/1.4-stable/trac/wiki/default-pages/TracStandalone
r17584 r17715 4 4 It can be used in a variety of situations, from a test or development server to a multiprocess setup behind another web server used as a load balancer. 5 5 6 == Pros 7 6 '''Pros''' 8 7 * Fewer dependencies: You don't need to install Apache or any other web-server. 9 8 * Fast: Should be almost as fast as the [wiki:TracModWSGI mod_wsgi] version (and much faster than the [wiki:TracCgi CGI]), especially since the HTTP/1.1 version of the protocol is enabled by default. 10 9 * Automatic reloading: For development, Tracd can be used in ''auto_reload'' mode, which will automatically restart the server whenever you make a change to the code, for example in Trac itself or in a plugin. 11 10 12 == Cons 13 11 '''Cons''' 14 12 * Fewer features: Tracd implements a very simple web-server and is not as configurable or as scalable as Apache httpd. 15 13 16 14 == Usage examples 17 15 18 A single project on port 8080 . (http://localhost:8080/)16 A single project on port 8080, such as `http://localhost:8080/`: 19 17 {{{#!sh 20 18 $ tracd -p 8080 /path/to/project 21 19 }}} 22 Strictly speaking this will make your Trac accessible to everybody from your network rather than ''localhost only''. To truly limit it use the `--hostname` option.20 Strictly speaking this will make your Trac accessible to everybody from your network rather than `localhost` only. To truly limit it use the `--hostname` option. 23 21 {{{#!sh 24 22 $ tracd --hostname=localhost -p 8080 /path/to/project 25 23 }}} 26 With more than one project . (http://localhost:8080/project1/ and http://localhost:8080/project2/)24 With more than one project, for example `http://localhost:8080/project1/` and `http://localhost:8080/project2/`: 27 25 {{{#!sh 28 26 $ tracd -p 8080 /path/to/project1 /path/to/project2 … … 63 61 64 62 {{{#!div 65 Once the service is installed, it might be simpler to run the Registry Editor rather than use the `reg add` command documented above. Navigate to:[[BR]]63 Once the service is installed, it might be simpler to run the Registry Editor rather than use the `reg add` command documented above. Navigate to:[[BR]] 66 64 `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tracd\Parameters` 67 65 … … 98 96 99 97 {{{#!div style="border: 1pt dotted; margin: 1em" 100 **Attention:** Make sure you place the generated password files on a filesystem which supports sub-second timestamps, as Trac will monitor their modified time and changes happening on a filesystem with too coarse-grained timestamp resolution (like `ext2` or `ext3` on Linux, or HFS+ on OSX).98 **Attention:** Make sure you place the generated password files on a filesystem which supports sub-second timestamps, as Trac will monitor their modified time and changes happening on a filesystem with too coarse-grained timestamp resolution, like `ext2` or `ext3` on Linux, or HFS+ on OSX. 101 99 }}} 102 100 … … 116 114 * '''project_path''': path of the project 117 115 118 * **`--auth`** in the above means use Digest authentication, replace `--auth` with `--basic-auth` if you want to use Basic auth. Although Basic authentication does not require a "realm", the command parser does, so the second comma is required, followed directly by the closing quote for an empty realm name.116 * **`--auth`** in the above means use Digest authentication, replace `--auth` with `--basic-auth` if you want to use Basic auth. Although Basic authentication does not require a "realm", the command parser does, so the second comma is required, followed directly by the closing quote for an empty realm name. 119 117 120 118 Examples: … … 144 142 This section describes how to use `tracd` with Apache .htpasswd files. 145 143 146 '''Note''': On Windows It is necessary to install the [https://pypi.python.org/pypi/passlib passlib] package in order to decode some htpasswd formats. Only `SHA-1` passwords (since Trac 1.0) work without this module.144 '''Note''': On Windows It is necessary to install the [https://pypi.python.org/pypi/passlib passlib] package in order to decode some htpasswd formats. Only `SHA-1` passwords work without this module (since Trac 1.0). 147 145 148 146 To create a .htpasswd file use Apache's `htpasswd` command (see [#GeneratingPasswordsWithoutApache below] for a method to create these files without using Apache): … … 169 167 === Digest authentication: Using a htdigest password file 170 168 171 If you have Apache available, you can use the htdigest command to generate the password file. Type 'htdigest' to get some usage instructions, or read [https://httpd.apache.org/docs/2.0/programs/htdigest.html this page] from the Apache manual to get precise instructions. You'll be prompted for a password to enter for each user that you create.For the name of the password file, you can use whatever you like, but if you use something like `users.htdigest` it will remind you what the file contains. As a suggestion, put it in your <projectname>/conf folder along with the [TracIni trac.ini] file.169 If you have Apache available, you can use the htdigest command to generate the password file. Type 'htdigest' to get some usage instructions, or read [https://httpd.apache.org/docs/2.0/programs/htdigest.html this page] from the Apache manual to get precise instructions. You will be prompted for a password to enter for each user that you create. For the name of the password file, you can use whatever you like, but if you use something like `users.htdigest` it will remind you what the file contains. As a suggestion, put it in your <projectname>/conf folder along with the [TracIni trac.ini] file. 172 170 173 171 Note that you can start tracd without the `--auth` argument, but if you click on the ''Login'' link you will get an error. … … 175 173 === Generating Passwords Without Apache 176 174 177 Basic Authorization can be accomplished via this [http://aspirine.org/htpasswd_en.html online HTTP Password generator] which also supports `SHA-1`. Copy the generated password-hash line to the .htpasswd file on your system. Note that Windows Python lacks the "crypt" module that is the default hash type for htpasswd. Windows Python can grok MD5 password hashes just fine and you should use MD5.178 179 Trac also provides `htpasswd` and `htdigest` scripts in `contrib` :175 Basic Authorization can be accomplished via this [http://aspirine.org/htpasswd_en.html online HTTP Password generator] which also supports `SHA-1`. Copy the generated password-hash line to the .htpasswd file on your system. Note that Windows Python lacks the "crypt" module that is the default hash type for htpasswd. Windows Python can grok MD5 password hashes just fine and you should use MD5. 176 177 Trac also provides `htpasswd` and `htdigest` scripts in `contrib` (in the Tar package): 180 178 {{{#!sh 181 179 $ ./contrib/htpasswd.py -cb htpasswd user1 user1 … … 340 338 === Serving a different base path than / 341 339 342 Tracd supports serving projects with different base urls than /<project>. The parameter name to change this is:340 Tracd supports serving projects with different base urls than `/<project>` with the `base_path` parameter: 343 341 {{{#!sh 344 342 $ tracd --base-path=/some/path
Note:
See TracChangeset
for help on using the changeset viewer.
