# wiki

name: TracAdmin
author: trac
ipnr: 127.0.0.1
text:
  = TracAdmin =
  [[TracGuideToc]]

  Trac is distributed with a powerful command-line configuration tool. This tool can be used  to configure and customize your Trac-installation to better fit your needs.

  Some of those operations can also be performed via the ''Admin'' web interface, an updated version of the [trac:WebAdmin] plugin now integrated within Trac (since version 0.11).

  == Usage ==

  For nearly every `trac-admin` command, you'll need to specify the path to the TracEnvironment that you want to administer as the first argument, for example:
  {{{
  trac-admin /path/to/projenv wiki list
  }}}

  The only exception is for the `help` command, but even in this case if you omit the environment, you'll only get a very succinct list of commands (`help` and `initenv`), the same list you'd get when invoking `trac-admin` alone.
  Also, `trac-admin --version` will tell you about the Trac version (e.g. 0.12) corresponding to the program.

  If you want to get a comprehensive list of the available commands and sub-commands, you need to specify an existing environment:
  {{{
  trac-admin /path/to/projenv help
  }}}

  Some commands have a more detailed help, which you can access by specifying the command's name as a subcommand for `help`:

  {{{
  trac-admin /path/to/projenv help <command>
  }}}

  === `trac-admin <targetdir> initenv` === #initenv

  This subcommand is very important as it's the one used to create a TracEnvironment in the specified `<targetdir>`. That directory must not exist prior to the call.

  [[TracAdminHelp(initenv)]]

  It supports an extra `--inherit` option, which can be used to specify a global configuration file which can be used share settings between several environments. You can also inherit from a shared configuration afterwards, by setting the `[inherit] file` option in the `conf/trac.ini` file in your newly created environment, but the advantage of specifying the inherited configuration file at environment creation time is that only the options ''not'' already specified in the global configuration file will be written in the created environment's `conf/trac.ini` file.
  See TracIni#GlobalConfiguration.

  Note that in version 0.11 of Trac, `initenv` lost an extra last argument `<templatepath>`, which was used in previous versions to point to the `templates` folder. If you are using the one-liner '`trac-admin /path/to/trac/ initenv <projectname> <db> <repostype> <repospath>`' in the above and getting an error that reads ''''`Wrong number of arguments to initenv: 4`'''', then this is because you're using a `trac-admin` script from an '''older''' version of Trac.

  == Interactive Mode ==

  When passing the environment path as the only argument, `trac-admin` starts in interactive mode.
  Commands can then be executed on the selected environment using the prompt, which offers tab-completion
  (on non-Windows environments, and when the Python `readline` module is available) and automatic repetition of the last command issued.

  Once you're in interactive mode, you can also get help on specific commands or subsets of commands:

  For example, to get an explanation of the `resync` command, run:
  {{{
  > help resync
  }}}

  To get help on all the Wiki-related commands, run:
  {{{
  > help wiki
  }}}

  == Full Command Reference ==

  You'll find below the detailed help for all the commands available by default in `trac-admin`. Note that this may not match the list given by `trac-admin <yourenv> help`, as the commands  pertaining to components disabled in that environment won't be available and conversely some plugins activated in the environment can add their own commands.

  [[TracAdminHelp()]]

  ----
  See also: TracGuide, TracBackup, TracPermissions, TracEnvironment, TracIni, [trac:TracMigrate TracMigrate]


name: TracWiki
author: trac
ipnr: 127.0.0.1
text:
  = The Trac Wiki System =
  [[TracGuideToc]]

  Trac has a built-in wiki system which you can use for organizing knowledge and information in a very flexible way by [WikiNewPage creating pages] containing an intuitive and easy to learn textual markup. This text markup is also used in all other parts of the system, not only in [wiki:TitleIndex wiki pages], but also in [wiki:TracTickets ticket] description and comments, [wiki:TracChangeset check-in log messages], [wiki:TracRoadmap milestone] descriptions and [wiki:TracReports report] descriptions, even in third-party extensions.
  It allows for formatted text and hyperlinks in and between all Trac modules.

  Editing wiki text is easy, using any web browser and a simple [WikiFormatting formatting system], rather than more complex markup languages like HTML.  The reasoning behind its design is that HTML, with its large collection of nestable tags, is too complicated to allow fast-paced editing, and distracts from the actual content of the pages. Note though that Trac also supports [WikiHtml HTML], [WikiRestructuredText reStructuredText] and [http://www.textism.com/tools/textile/ Textile] as alternative markup formats, which can eventually be used in parts of a page (so called wiki “blocks”).

  The main goal of the wiki is to make editing text easier and ''encourage'' people to contribute and annotate text content for a project. Trac also provides a simple toolbar to make formatting text even easier, and supports the [http://universaleditbutton.org/Universal_Edit_Button universal edit button] of your browser.

  The wiki itself does not enforce any structure, but rather resembles a stack of empty sheets of paper, where you can organize information and documentation as you see fit, and later reorganize if necessary. 
  As contributing to a wiki is essentially building an hypertext, 
  general advice regarding HTML authoring apply here as well.
  For example, the ''[http://www.w3.org/Provider/Style Style Guide for online hypertext]'' explains how to think about the
  [http://www.w3.org/Provider/Style/Structure.html overall structure of a work] 
  and how to organize information [http://www.w3.org/Provider/Style/WithinDocument.html within each document]. One of the most important tip is “make your HTML page such that you can read it even if you don't follow any links.”

  Learn more about:
   * WikiFormatting rules, including advanced topics like WikiMacros and WikiProcessors
   * How to use WikiPageNames and other forms of TracLinks which are used to refer in a precise way to any resource within Trac

  If you want to practice editing, please use the SandBox. Note that not all Trac wikis are editable by anyone, this depends on the local policy; check with your Trac administrators.

  Before saving your changes, you can ''Preview'' the page or ''Review the Changes'' you've made.
  You can get an automatic preview of the formatting as you type when you activate the ''Edit Side-by-side'' mode (you have to Preview the page for the setting to take effect). '' There is a [wiki:/TracIni#trac-section configurable delay] between when you make your edit and when the automatic preview will update.''

  Some more information about wikis on the web:
   * A definition of [http://wikipedia.org/wiki/Wiki Wiki], in a famous wiki encyclopedia
   * The [http://c2.com/cgi/wiki?WikiHistory History] of the original wiki
   * A wiki page explaining [http://www.usemod.com/cgi-bin/mb.pl?WhyWikiWorks why wiki works]

  ----
  See also: TracGuide


name: TracNotification
author: trac
ipnr: 127.0.0.1
text:
  = Email Notification of Ticket Changes =
  [[TracGuideToc]]

  Trac supports notification of ticket changes via email. 

  Email notification is useful to keep users up-to-date on tickets/issues of interest, and also provides a convenient way to post all ticket changes to a dedicated mailing list. For example, this is how the [http://lists.edgewall.com/archive/trac-tickets/ Trac-tickets] mailing list is set up.

  Disabled by default, notification can be activated and configured in [wiki:TracIni trac.ini].

  == Receiving Notification Mails ==
  When reporting a new ticket or adding a comment, enter a valid email address or your username in the ''reporter'', ''assigned to/owner'' or ''cc'' field. Trac will automatically send you an email when changes are made to the ticket (depending on how notification is configured).

  This is useful to keep up-to-date on an issue or enhancement request that interests you.

  === How to use your username to receive notification mails ===

  To receive notification mails, you can either enter a full email address or your username. To get notified with a simple username or login, you need to specify a valid email address in the ''Preferences'' page. 

  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.

  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`''').

  == Configuring SMTP Notification ==

  '''Important:''' For TracNotification to work correctly, the `[trac] base_url` option must be set in [wiki:TracIni trac.ini]. 

  === Configuration Options ===
  These are the available options for the `[notification]` section in trac.ini.

   * '''`smtp_enabled`''': Enable email notification.
   * '''`smtp_from`''': Email address to use for ''Sender''-headers in notification emails.
   * '''`smtp_from_name`''': Sender name to use for ''Sender''-headers in notification emails.
   * '''`smtp_replyto`''': Email address to use for ''Reply-To''-headers in notification emails.
   * '''`smtp_default_domain`''': (''since 0.10'') Append the specified domain to addresses that do not contain one. Fully qualified addresses are not modified. The default domain is appended to all username/login for which an email address cannot be found from the user settings.
   * '''`smtp_always_cc`''': List of email addresses to always send notifications to. ''Typically used to post ticket changes to a dedicated mailing list.''
   * '''`smtp_always_bcc`''': (''since 0.10'') List of email addresses to always send notifications to, but keeps addresses not visible from other recipients of the notification email 
   * '''`smtp_subject_prefix`''': (''since 0.10.1'') Text that is inserted before the subject of the email. Set to "!__default!__" by default.
   * '''`always_notify_reporter`''':  Always send notifications to any address in the reporter field (default: false).
   * '''`always_notify_owner`''': (''since 0.9'') Always send notifications to the address in the owner field (default: false).
   * '''`always_notify_updater`''': (''since 0.10'') Always send a notification to the updater of a ticket (default: true).
   * '''`use_public_cc`''': (''since 0.10'') Addresses in To: (owner, reporter) and Cc: lists are visible by all recipients (default is ''Bcc:'' - hidden copy).
   * '''`use_short_addr`''': (''since 0.10'') Enable delivery of notifications to addresses that do not contain a domain (i.e. do not end with ''@<domain.com>'').This option is useful for intranets, where the SMTP server can handle local addresses and map the username/login to a local mailbox. See also `smtp_default_domain`. Do not use this option with a public SMTP server. 
   * '''`ignore_domains`''': Comma-separated list of domains that should not be considered part of email addresses (for usernames with Kerberos domains).
   * '''`mime_encoding`''': (''since 0.10'') This option allows selecting the MIME encoding scheme. Supported values:
     * `none`: default value, uses 7bit encoding if the text is plain ASCII, or 8bit otherwise. 
     * `base64`: works with any kind of content. May cause some issues with touchy anti-spam/anti-virus engines.
     * `qp` or `quoted-printable`: best for european languages (more compact than base64) if 8bit encoding cannot be used.
   * '''`ticket_subject_template`''': (''since 0.11'') A [http://genshi.edgewall.org/wiki/Documentation/text-templates.html Genshi text template] snippet used to get the notification subject.
   * '''`email_sender`''': (''since 0.12'') Name of the component implementing `IEmailSender`. This component is used by the notification system to send emails. Trac currently provides the following components:
     * `SmtpEmailSender`: connects to an SMTP server (default).
     * `SendmailEmailSender`: runs a `sendmail`-compatible executable.   

  Either '''`smtp_from`''' or '''`smtp_replyto`''' (or both) ''must'' be set, otherwise Trac refuses to send notification mails.

  The following options are specific to email delivery through SMTP.
   * '''`smtp_server`''': SMTP server used for notification messages.
   * '''`smtp_port`''': (''since 0.9'') Port used to contact the SMTP server.
   * '''`smtp_user`''': (''since 0.9'') User name for authentication SMTP account.
   * '''`smtp_password`''': (''since 0.9'') Password for authentication SMTP account.
   * '''`use_tls`''': (''since 0.10'') Toggle to send notifications via a SMTP server using [http://en.wikipedia.org/wiki/Transport_Layer_Security TLS], such as GMail.

  The following option is specific to email delivery through a `sendmail`-compatible executable.
   * '''`sendmail_path`''': (''since 0.12'') Path to the sendmail executable. The sendmail program must accept the `-i` and `-f` options.

  === Example Configuration (SMTP) ===
  {{{
  [notification]
  smtp_enabled = true
  smtp_server = mail.example.com
  smtp_from = notifier@example.com
  smtp_replyto = myproj@projects.example.com
  smtp_always_cc = ticketmaster@example.com, theboss+myproj@example.com
  }}}

  === Example Configuration (`sendmail`) ===
  {{{
  [notification]
  smtp_enabled = true
  email_sender = SendmailEmailSender
  sendmail_path = /usr/sbin/sendmail
  smtp_from = notifier@example.com
  smtp_replyto = myproj@projects.example.com
  smtp_always_cc = ticketmaster@example.com, theboss+myproj@example.com
  }}}

  === Customizing the e-mail subject ===
  The e-mail subject can be customized with the `ticket_subject_template` option, which contains a [http://genshi.edgewall.org/wiki/Documentation/text-templates.html Genshi text template] snippet. The default value is:
  {{{
  $prefix #$ticket.id: $summary
  }}}
  The following variables are available in the template:

   * `env`: The project environment (see [trac:source:/trunk/trac/env.py env.py]).
   * `prefix`: The prefix defined in `smtp_subject_prefix`.
   * `summary`: The ticket summary, with the old value if the summary was edited.
   * `ticket`: The ticket model object (see [trac:source:/trunk/trac/ticket/model.py model.py]). Individual ticket fields can be addressed by appending the field name separated by a dot, e.g. `$ticket.milestone`.

  === Customizing the e-mail content ===

  The notification e-mail content is generated based on `ticket_notify_email.txt` in `trac/ticket/templates`.  You can add your own version of this template by adding a `ticket_notify_email.txt` to the templates directory of your environment. The default looks like this:

  {{{
  $ticket_body_hdr
  $ticket_props
  {% choose ticket.new %}\
  {%   when True %}\
  $ticket.description
  {%   end %}\
  {%   otherwise %}\
  {%     if changes_body %}\
  ${_('Changes (by %(author)s):', author=change.author)}

  $changes_body
  {%     end %}\
  {%     if changes_descr %}\
  {%       if not changes_body and not change.comment and change.author %}\
  ${_('Description changed by %(author)s:', author=change.author)}
  {%       end %}\
  $changes_descr
  --
  {%     end %}\
  {%     if change.comment %}\

  ${changes_body and _('Comment:') or _('Comment (by %(author)s):', author=change.author)}

  $change.comment
  {%     end %}\
  {%   end %}\
  {% end %}\

  -- 
  ${_('Ticket URL: <%(link)s>', link=ticket.link)}
  $project.name <${project.url or abs_href()}>
  $project.descr
  }}}
  == Sample Email ==
  {{{
  #42: testing
  ---------------------------+------------------------------------------------
         Id:  42             |      Status:  assigned                
  Component:  report system  |    Modified:  Fri Apr  9 00:04:31 2004
   Severity:  major          |   Milestone:  0.9                     
   Priority:  lowest         |     Version:  0.6                     
      Owner:  anonymous      |    Reporter:  jonas@example.com               
  ---------------------------+------------------------------------------------
  Changes:
    * component:  changset view => search system
    * priority:  low => highest
    * owner:  jonas => anonymous
    * cc:  daniel@example.com =>
           daniel@example.com, jonas@example.com
    * status:  new => assigned

  Comment:
  I'm interested too!

  --
  Ticket URL: <http://example.com/trac/ticket/42>
  My Project <http://myproj.example.com/>
  }}}


  == Customizing e-mail content for MS Outlook ==

  Out-of-the-box, MS Outlook normally presents plain text e-mails with a variable-width font; the ticket properties table will most certainly look like a mess in MS Outlook. This can be fixed with some customization of the [#Customizingthee-mailcontent e-mail template].

  Replace the following second row in the template:
  {{{
  $ticket_props
  }}}

  with this instead:
  {{{
  --------------------------------------------------------------------------
  {% with
     pv = [(a[0].strip(), a[1].strip()) for a in [b.split(':') for b in
           [c.strip() for c in 
            ticket_props.replace('|', '\n').splitlines()[1:-1]] if ':' in b]];
     sel = ['Reporter', 'Owner', 'Type', 'Status', 'Priority', 'Milestone', 
            'Component', 'Severity', 'Resolution', 'Keywords'] %}\
  ${'\n'.join('%s\t%s' % (format(p[0]+':', ' <12'), p[1]) for p in pv if p[0] in sel)}
  {% end %}\
  --------------------------------------------------------------------------
  }}}

  The table of ticket properties is replaced with a list of a selection of the properties. A tab character separates the name and value in such a way that most people should find this more pleasing than the default table, when using MS Outlook.
  {{{#!div style="margin: 1em 1.75em; border:1px dotted"
  {{{#!html
  #42: testing<br />
  --------------------------------------------------------------------------<br />
  <table cellpadding=0>
  <tr><td>Reporter:</td><td>jonas@example.com</td></tr>
  <tr><td>Owner:</td><td>anonymous</td></tr>
  <tr><td>Type:</td><td>defect</td></tr>
  <tr><td>Status:</td><td>assigned</td></tr>
  <tr><td>Priority:</td><td>lowest</td></tr>
  <tr><td>Milestone:</td><td>0.9</td></tr>
  <tr><td>Component:</td><td>report system</td></tr>
  <tr><td>Severity:</td><td>major</td></tr>
  <tr><td>Resolution:</td><td> </td></tr>
  <tr><td>Keywords:</td><td> </td></tr>
  </table>
  --------------------------------------------------------------------------<br />
  Changes:<br />
  <br />
  &nbsp;&nbsp;* component: &nbsp;changset view =&gt; search system<br />
  &nbsp;&nbsp;* priority: &nbsp;low =&gt; highest<br />
  &nbsp;&nbsp;* owner: &nbsp;jonas =&gt; anonymous<br />
  &nbsp;&nbsp;* cc: &nbsp;daniel@example.com =&gt;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;daniel@example.com, jonas@example.com<br />
  &nbsp;&nbsp;* status: &nbsp;new =&gt; assigned<br />
  <br />
  Comment:<br />
  I'm interested too!<br />
  <br />
  --<br />
  Ticket URL: &lt;http://example.com/trac/ticket/42&gt;<br />
  My Project &lt;http://myproj.example.com/&gt;<br />
  }}}
  }}}

  However, it's not as perfect as an HTML formatted e-mail would be, but presented ticket properties are at least readable...


  == Using GMail as the SMTP relay host ==

  Use the following configuration snippet
  {{{
  [notification]
  smtp_enabled = true
  use_tls = true
  mime_encoding = base64
  smtp_server = smtp.gmail.com
  smtp_port = 587
  smtp_user = user
  smtp_password = password
  }}}

  where ''user'' and ''password'' match an existing GMail account, ''i.e.'' the ones you use to log in on [http://gmail.com]

  Alternatively, you can use `smtp_port = 25`.[[br]]
  You should not use `smtp_port = 465`. It will not work and your ticket submission may deadlock. Port 465 is reserved for the SMTPS protocol, which is not supported by Trac. See [comment:ticket:7107:2 #7107] for details.
   
  == Filtering notifications for one's own changes ==
  In Gmail, use the filter:

  {{{
  from:(<smtp_from>) (("Reporter: <username>" -Changes) OR "Changes (by <username>)")
  }}}

  For Trac .10, use the filter:
  {{{
  from:(<smtp_from>) (("Reporter: <username>" -Changes -Comment) OR "Changes (by <username>)" OR "Comment (by <username>)")
  }}}

  to delete these notifications.

  In Thunderbird, there is no such solution if you use IMAP
  (see http://kb.mozillazine.org/Filters_(Thunderbird)#Filtering_the_message_body).

  The best you can do is to set "always_notify_updater" in conf/trac.ini to false.
  You will however still get an email if you comment a ticket that you own or have reported.

  You can also add this plugin:
  http://trac-hacks.org/wiki/NeverNotifyUpdaterPlugin

  == Troubleshooting ==

  If you cannot get the notification working, first make sure the log is activated and have a look at the log to find if an error message has been logged. See TracLogging for help about the log feature.

  Notification errors are not reported through the web interface, so the user who submit a change or a new ticket never gets notified about a notification failure. The Trac administrator needs to look at the log to find the error trace.

  === ''Permission denied'' error ===

  Typical error message:
  {{{
    ...
    File ".../smtplib.py", line 303, in connect
      raise socket.error, msg
    error: (13, 'Permission denied')
  }}}

  This error usually comes from a security settings on the server: many Linux distributions do not let the web server (Apache, ...) to post email message to the local SMTP server.

  Many users get confused when their manual attempts to contact the SMTP server succeed:
  {{{
  telnet localhost 25
  }}}
  The trouble is that a regular user may connect to the SMTP server, but the web server cannot:
  {{{
  sudo -u www-data telnet localhost 25
  }}}

  In such a case, you need to configure your server so that the web server is authorized to post to the SMTP server. The actual settings depend on your Linux distribution and current security policy. You may find help browsing the Trac [trac:MailingList MailingList] archive.

  Relevant ML threads:
   * SELinux: http://article.gmane.org/gmane.comp.version-control.subversion.trac.general/7518

  For SELinux in Fedora 10:
  {{{
  $ setsebool -P httpd_can_sendmail 1
  }}}
  === ''Suspected spam'' error ===

  Some SMTP servers may reject the notification email sent by Trac.

  The default Trac configuration uses Base64 encoding to send emails to the recipients. The whole body of the email is encoded, which sometimes trigger ''false positive'' SPAM detection on sensitive email servers. In such an event, it is recommended to change the default encoding to "quoted-printable" using the `mime_encoding` option.

  Quoted printable encoding works better with languages that use one of the Latin charsets. For Asian charsets, it is recommended to stick with the Base64 encoding.

  === ''501, 5.5.4 Invalid Address'' error ===

  On IIS 6.0 you could get a 
  {{{
  Failure sending notification on change to ticket #1: SMTPHeloError: (501, '5.5.4 Invalid Address')
  }}}
  in the trac log. Have a look [http://support.microsoft.com/kb/291828 here] for instructions on resolving it.


  ----
  See also: TracTickets, TracIni, TracGuide


name: WikiMacros
author: trac
ipnr: 127.0.0.1
text:
  = Trac Macros =

  [[PageOutline]]

  Trac macros are plugins to extend the Trac engine with custom 'functions' written in Python. A macro inserts dynamic HTML data in any context supporting WikiFormatting.

  Another kind of macros are WikiProcessors. They typically deal with alternate markup formats and representation of larger blocks of information (like source code highlighting).

  == Using Macros ==

  Macro calls are enclosed in two ''square brackets''. Like Python functions, macros can also have arguments, a comma separated list within parentheses.

  === Getting Detailed Help ===
  The list of available macros and the full help can be obtained using the !MacroList macro, as seen [#AvailableMacros below].

  A brief list can be obtained via ![[MacroList(*)]] or ![[?]].

  Detailed help on a specific macro can be obtained by passing it as an argument to !MacroList, e.g. ![[MacroList(MacroList)]], or, more conveniently, by appending a question mark (?) to the macro's name, like in ![[MacroList?]].



  === Example ===

  A list of 3 most recently changed wiki pages starting with 'Trac':

  ||= Wiki Markup =||= Display =||
  {{{#!td
    {{{
    [[RecentChanges(Trac,3)]]
    }}}
  }}}
  {{{#!td style="padding-left: 2em;"
  [[RecentChanges(Trac,3)]]
  }}}
  |-----------------------------------
  {{{#!td
    {{{
    [[RecentChanges?(Trac,3)]]
    }}}
  }}}
  {{{#!td style="padding-left: 2em;"
  [[RecentChanges?(Trac,3)]]
  }}}
  |-----------------------------------
  {{{#!td
    {{{
    [[?]]
    }}}
  }}}
  {{{#!td style="padding-left: 2em"
  {{{#!html 
  <div style="font-size: 80%" class="trac-macrolist">
  <h3><code>[[Image]]</code></h3>Embed an image in wiki-formatted text.

  The first argument is the file â€¦
  <h3><code>[[InterTrac]]</code></h3>Provide a list of known <a class="wiki" href="/wiki/InterTrac">InterTrac</a> prefixes.
  <h3><code>[[InterWiki]]</code></h3>Provide a description list for the known <a class="wiki" href="/wiki/InterWiki">InterWiki</a> prefixes.
  <h3><code>[[KnownMimeTypes]]</code></h3>List all known mime-types which can be used as <a class="wiki" href="/wiki/WikiProcessors">WikiProcessors</a>.
  Can be â€¦</div>
  }}}
  etc.
  }}}

  == Available Macros ==

  ''Note that the following list will only contain the macro documentation if you've not enabled `-OO` optimizations, or not set the `PythonOptimize` option for [wiki:TracModPython mod_python].''

  [[MacroList]]

  == Macros from around the world ==

  The [http://trac-hacks.org/ Trac Hacks] site provides a wide collection of macros and other Trac [TracPlugins plugins] contributed by the Trac community. If you're looking for new macros, or have written one that you'd like to share with the world, please don't hesitate to visit that site.

  == Developing Custom Macros ==
  Macros, like Trac itself, are written in the [http://python.org/ Python programming language] and are developed as part of TracPlugins.

  For more information about developing macros, see the [trac:TracDev development resources] on the main project site.


  Here are 2 simple examples showing how to create a Macro with Trac 0.11. 

  Also, have a look at [trac:source:tags/trac-0.11/sample-plugins/Timestamp.py Timestamp.py] for an example that shows the difference between old style and new style macros and at the [trac:source:tags/trac-0.11/wiki-macros/README macros/README] which provides a little more insight about the transition.

  === Macro without arguments ===
  To test the following code, you should saved it in a `timestamp_sample.py` file located in the TracEnvironment's `plugins/` directory.
  {{{
  #!python
  from datetime import datetime
  # Note: since Trac 0.11, datetime objects are used internally

  from genshi.builder import tag

  from trac.util.datefmt import format_datetime, utc
  from trac.wiki.macros import WikiMacroBase

  class TimeStampMacro(WikiMacroBase):
      """Inserts the current time (in seconds) into the wiki page."""

      revision = "$Rev$"
      url = "$URL$"

      def expand_macro(self, formatter, name, text):
          t = datetime.now(utc)
          return tag.b(format_datetime(t, '%c'))
  }}}

  === Macro with arguments ===
  To test the following code, you should saved it in a `helloworld_sample.py` file located in the TracEnvironment's `plugins/` directory.
  {{{
  #!python
  from genshi.core import Markup

  from trac.wiki.macros import WikiMacroBase

  class HelloWorldMacro(WikiMacroBase):
      """Simple HelloWorld macro.

      Note that the name of the class is meaningful:
       - it must end with "Macro"
       - what comes before "Macro" ends up being the macro name

      The documentation of the class (i.e. what you're reading)
      will become the documentation of the macro, as shown by
      the !MacroList macro (usually used in the WikiMacros page).
      """

      revision = "$Rev$"
      url = "$URL$"

      def expand_macro(self, formatter, name, text, args):
          """Return some output that will be displayed in the Wiki content.

          `name` is the actual name of the macro (no surprise, here it'll be
          `'HelloWorld'`),
          `text` is the text enclosed in parenthesis at the call of the macro.
            Note that if there are ''no'' parenthesis (like in, e.g.
            [[HelloWorld]]), then `text` is `None`.
          `args` are the arguments passed when HelloWorld is called using a
          `#!HelloWorld` code block.
          """
          return 'Hello World, text = %s, args = %s' % \
              (Markup.escape(text), Markup.escape(repr(args)))

  }}}

  Note that `expand_macro` optionally takes a 4^th^ parameter ''`args`''. When the macro is called as a [WikiProcessors WikiProcessor], it's also possible to pass `key=value` [WikiProcessors#UsingProcessors processor parameters]. If given, those are stored in a dictionary and passed in this extra `args` parameter. On the contrary, when called as a macro, `args` is  `None`. (''since 0.12'').

  For example, when writing:
  {{{
  {{{#!HelloWorld style="polite"
  <Hello World!>
  }}}

  {{{#!HelloWorld
  <Hello World!>
  }}}

  [[HelloWorld(<Hello World!>)]]
  }}}
  One should get:
  {{{
  Hello World, text = <Hello World!> , args = {'style': u'polite'}
  Hello World, text = <Hello World!> , args = {}
  Hello World, text = <Hello World!> , args = None
  }}}

  Note that the return value of `expand_macro` is '''not''' HTML escaped. Depending on the expected result, you should escape it by yourself (using `return Markup.escape(result)`) or, if this is indeed HTML, wrap it in a Markup object (`return Markup(result)`) with `Markup` coming from Genshi, (`from genshi.core import Markup`).  

  You can also recursively use a wiki Formatter (`from trac.wiki import Formatter`) to process the `text` as wiki markup, for example by doing:

  {{{
  #!python
  from genshi.core import Markup
  from trac.wiki.macros import WikiMacroBase
  from trac.wiki import Formatter
  import StringIO

  class HelloWorldMacro(WikiMacroBase):
  	def expand_macro(self, formatter, name, text, args):
  		text = "whatever '''wiki''' markup you want, even containing other macros"
  		# Convert Wiki markup to HTML, new style
  		out = StringIO.StringIO()
  		Formatter(self.env, formatter.context).format(text, out)
  		return Markup(out.getvalue())
  }}}


name: WikiRestructuredTextLinks
author: trac
ipnr: 127.0.0.1
text:
  = TracLinks in reStructuredText =

  This document illustrates how to use the `:trac:` role in reStructuredText. The page is written like:

  {{{
  {{{
  #!rst 
  Examples:

   * Tickets: :trac:`#1` or :trac:`ticket:1`
   * Ticket comments: :trac:`comment:ticket:1:2`
   * Reports: :trac:`{1}` or :trac:`report:1`
   * Changesets: :trac:`r1`, :trac:`[1]` or :trac:`changeset:1`
   * Revision log: :trac:`r1:3`, :trac:`[1:3]` or :trac:`log:@1:3`, :trac:`log:trunk@1:3`
   * Diffs (since version 0.10): :trac:`diff:@20:30`, :trac:`diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` or :trac:`diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539`
   * Wiki pages: :trac:`CamelCase` or :trac:`wiki:CamelCase`
   * Milestones: :trac:`milestone:1.0`
   * Attachment: :trac:`attachment:ticket:944:attachment.1073.diff`
   * Files: :trac:`source:trunk/COPYING`
   * A specific file revision: :trac:`source:/trunk/COPYING@200`
   * A particular line of a specific file revision: :trac:`source:/trunk/COPYING@200#L25`

  An explicit label can be specified, separated from the link by a space:

   * See :trac:`#1 ticket 1` and the :trac:`source:trunk/COPYING license`.
  }}}
  }}}

  Provided you have docutils installed, the above block will render as:
  ----
  {{{
  #!rst 
  Examples:

   * Tickets: :trac:`#1` or :trac:`ticket:1`
   * Ticket comments: :trac:`comment:ticket:1:2`
   * Reports: :trac:`{1}` or :trac:`report:1`
   * Changesets: :trac:`r1`, :trac:`[1]` or :trac:`changeset:1`
   * Revision log: :trac:`r1:3`, :trac:`[1:3]` or :trac:`log:@1:3`, :trac:`log:trunk@1:3`
   * Diffs (since version 0.10): :trac:`diff:@20:30`, :trac:`diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` or :trac:`diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539`
   * Wiki pages: :trac:`CamelCase` or :trac:`wiki:CamelCase`
   * Milestones: :trac:`milestone:1.0`
   * Attachment: :trac:`attachment:ticket:944:attachment.1073.diff`
   * Files: :trac:`source:trunk/COPYING`
   * A specific file revision: :trac:`source:/trunk/COPYING@200`
   * A particular line of a specific file revision: :trac:`source:/trunk/COPYING@200#L25`

  An explicit label can be specified, separated from the link by a space:

   * See :trac:`#1 ticket 1` and the :trac:`source:trunk/COPYING license`.
  }}}
  ----

  Note also that any of the above could have been written using substitution references and the `trac::` directive:
  {{{
  {{{
  #!rst
  See |ticket123|.

   .. |ticket123| trac:: ticket:123 this ticket
  }}}
  }}}

  This renders as:
  ----

  {{{
  #!rst
  See |ticket123|.

   .. |ticket123| trac:: ticket:123 this ticket
  }}}

  ----
  See also: WikiRestructuredText, TracLinks


name: TracStandalone
author: trac
ipnr: 127.0.0.1
text:
  = Tracd =

  Tracd is a lightweight standalone Trac web server.
  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.

  == Pros ==

   * Fewer dependencies: You don't need to install apache or any other web-server.
   * Fast: Should be almost as fast as the [wiki:TracModPython mod_python] version (and much faster than the [wiki:TracCgi CGI]), even more so since version 0.12 where the HTTP/1.1 version of the protocol is enabled by default
   * 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 (in Trac itself or in a plugin).

  == Cons ==

   * Fewer features: Tracd implements a very simple web-server and is not as configurable or as scalable as Apache httpd.
   * No native HTTPS support: [http://www.rickk.com/sslwrap/ sslwrap] can be used instead,
     or [http://trac.edgewall.org/wiki/STunnelTracd stunnel -- a tutorial on how to use stunnel with tracd] or Apache with mod_proxy.

  == Usage examples ==

  A single project on port 8080. (http://localhost:8080/)
  {{{
   $ tracd -p 8080 /path/to/project
  }}}
  Stricly speaking this will make your Trac accessible to everybody from your network rather than ''localhost only''. To truly limit it use ''--hostname'' option.
  {{{
   $ tracd --hostname=localhost -p 8080 /path/to/project
  }}}
  With more than one project. (http://localhost:8080/project1/ and http://localhost:8080/project2/)
  {{{
   $ tracd -p 8080 /path/to/project1 /path/to/project2
  }}}

  You can't have the last portion of the path identical between the projects since Trac uses that name to keep the URLs of the
  different projects unique. So if you use `/project1/path/to` and `/project2/path/to`, you will only see the second project.

  An alternative way to serve multiple projects is to specify a parent directory in which each subdirectory is a Trac project, using the `-e` option. The example above could be rewritten:
  {{{
   $ tracd -p 8080 -e /path/to
  }}}

  To exit the server on Windows, be sure to use {{{CTRL-BREAK}}} -- using {{{CTRL-C}}} will leave a Python process running in the background.

  == Installing as a Windows Service ==

  === Option 1 ===
  To install as a Windows service, get the [http://www.google.com/search?q=srvany.exe SRVANY] utility and run:
  {{{
   C:\path\to\instsrv.exe tracd C:\path\to\srvany.exe
   reg add HKLM\SYSTEM\CurrentControlSet\Services\tracd\Parameters /v Application /d "\"C:\path\to\python.exe\" \"C:\path\to\python\scripts\tracd-script.py\" <your tracd parameters>"
   net start tracd
  }}}

  '''DO NOT''' use {{{tracd.exe}}}.  Instead register {{{python.exe}}} directly with {{{tracd-script.py}}} as a parameter.  If you use {{{tracd.exe}}}, it will spawn the python process without SRVANY's knowledge.  This python process will survive a {{{net stop tracd}}}.

  If you want tracd to start automatically when you boot Windows, do:
  {{{
   sc config tracd start= auto
  }}}

  The spacing here is important.

  {{{#!div
  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]]
  `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tracd\Parameters`

  Three (string) parameters are provided:
  ||!AppDirectory ||C:\Python26\ ||
  ||Application ||python.exe ||
  ||!AppParameters ||scripts\tracd-script.py -p 8080 ... ||

  Note that, if the !AppDirectory is set as above, the paths of the executable ''and'' of the script name and parameter values are relative to the directory.  This makes updating Python a little simpler because the change can be limited, here, to a single point.
  (This is true for the path to the .htpasswd file, as well, despite the documentation calling out the /full/path/to/htpasswd; however, you may not wish to store that file under the Python directory.)
  }}}

  For Windows 7 User, srvany.exe may not be an option, so you can use [http://www.google.com/search?q=winserv.exe WINSERV] utility and run:
  {{{
  "C:\path\to\winserv.exe" install tracd -displayname "tracd" -start auto "C:\path\to\python.exe" c:\path\to\python\scripts\tracd-script.py <your tracd parameters>"

  net start tracd
  }}}

  === Option 2 ===

  Use [http://trac-hacks.org/wiki/WindowsServiceScript WindowsServiceScript], available at [http://trac-hacks.org/ Trac Hacks]. Installs, removes, starts, stops, etc. your Trac service.

  === Option 3 ===

  also cygwin's cygrunsrv.exe can be used:
  {{{
  $ cygrunsrv --install tracd --path /cygdrive/c/Python27/Scripts/tracd.exe --args '--port 8000 --env-parent-dir E:\IssueTrackers\Trac\Projects'
  $ net start tracd
  }}}

  == Using Authentication ==

  Tracd provides support for both Basic and Digest authentication. Digest is considered more secure. The examples below use Digest; to use Basic authentication, replace `--auth` with `--basic-auth` in the command line.

  The general format for using authentication is:
  {{{
   $ tracd -p port --auth="base_project_dir,password_file_path,realm" project_path
  }}}
  where:
   * '''base_project_dir''': the base directory of the project specified as follows:
     * when serving multiple projects: ''relative'' to the `project_path`
     * when serving only a single project (`-s`): the name of the project directory
   Don't use an absolute path here as this won't work. ''Note:'' This parameter is case-sensitive even for environments on Windows.
   * '''password_file_path''': path to the password file
   * '''realm''': the realm name (can be anything)
   * '''project_path''': path of the project

   * **`--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.

  Examples:

  {{{
   $ tracd -p 8080 \
     --auth="project1,/path/to/passwordfile,mycompany.com" /path/to/project1
  }}}

  Of course, the password file can be be shared so that it is used for more than one project:
  {{{
   $ tracd -p 8080 \
     --auth="project1,/path/to/passwordfile,mycompany.com" \
     --auth="project2,/path/to/passwordfile,mycompany.com" \
     /path/to/project1 /path/to/project2
  }}}

  Another way to share the password file is to specify "*" for the project name:
  {{{
   $ tracd -p 8080 \
     --auth="*,/path/to/users.htdigest,mycompany.com" \
     /path/to/project1 /path/to/project2
  }}}

  === Basic Authorization: Using a htpasswd password file ===
  This section describes how to use `tracd` with Apache .htpasswd files.

    Note: It is necessary (at least with Python 2.6) to install the fcrypt package in order to
    decode the htpasswd format.  Trac source code attempt an `import crypt` first, but there
    is no such package for Python 2.6.

  To create a .htpasswd file use Apache's `htpasswd` command (see [#GeneratingPasswordsWithoutApache below] for a method to create these files without using Apache):
  {{{
   $ sudo htpasswd -c /path/to/env/.htpasswd username
  }}}
  then for additional users:
  {{{
   $ sudo htpasswd /path/to/env/.htpasswd username2
  }}}

  Then to start `tracd` run something like this:
  {{{
   $ tracd -p 8080 --basic-auth="projectdirname,/fullpath/environmentname/.htpasswd,realmname" /fullpath/environmentname
  }}}

  For example:
  {{{
   $ tracd -p 8080 --basic-auth="testenv,/srv/tracenv/testenv/.htpasswd,My Test Env" /srv/tracenv/testenv
  }}}
  ''Note:'' You might need to pass "-m" as a parameter to htpasswd on some platforms (OpenBSD).

  === Digest authentication: Using a htdigest password file ===

  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 [http://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.

  Note that you can start tracd without the --auth argument, but if you click on the ''Login'' link you will get an error.

  === Generating Passwords Without Apache ===

  Basic Authorization can be accomplished via this [http://www.4webhelp.net/us/password.php online HTTP Password generator].  Copy the generated password-hash line to the .htpasswd file on your system.

  You can use this simple Python script to generate a '''digest''' password file:

  {{{
  #!python
  from optparse import OptionParser
  # The md5 module is deprecated in Python 2.5
  try:
      from hashlib import md5
  except ImportError:
      from md5 import md5
  realm = 'trac'

  # 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")
  parser.add_option("-r", "--realm",action="store", dest="realm", type = "string",
                    help="the realm in which to create the digest")
  (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")
  if (options.realm is not None):
     realm = options.realm
     
  # Generate the string to enter into the htdigest file
  kd = lambda x: md5(':'.join(x)).hexdigest()
  print ':'.join((options.username, realm, kd([options.username, realm, options.password])))
  }}}

  Note: If you use the above script you must set the realm in the `--auth` argument to '''`trac`'''. Example usage (assuming you saved the script as trac-digest.py):

  {{{
   $ python trac-digest.py -u username -p password >> c:\digest.txt
   $ tracd --port 8000 --auth=proj_name,c:\digest.txt,trac c:\path\to\proj_name
  }}}

  ==== Using `md5sum`
  It is possible to use `md5sum` utility to generate digest-password file:
  {{{
   $ printf "${user}:trac:${password}" | md5sum - >>user.htdigest
  }}}
  and manually delete " -" from the end and add "${user}:trac:" to the start of line from 'to-file'.

  == Reference ==

  Here's the online help, as a reminder (`tracd --help`):
  {{{
  Usage: tracd [options] [projenv] ...

  Options:
    --version             show program's version number and exit
    -h, --help            show this help message and exit
    -a DIGESTAUTH, --auth=DIGESTAUTH
                          [projectdir],[htdigest_file],[realm]
    --basic-auth=BASICAUTH
                          [projectdir],[htpasswd_file],[realm]
    -p PORT, --port=PORT  the port number to bind to
    -b HOSTNAME, --hostname=HOSTNAME
                          the host name or IP address to bind to
    --protocol=PROTOCOL   http|scgi|ajp
    -q, --unquote         unquote PATH_INFO (may be needed when using ajp)
    --http10              use HTTP/1.0 protocol version (default)
    --http11              use HTTP/1.1 protocol version instead of HTTP/1.0
    -e PARENTDIR, --env-parent-dir=PARENTDIR
                          parent directory of the project environments
    --base-path=BASE_PATH
                          the initial portion of the request URL's "path"
    -r, --auto-reload     restart automatically when sources are modified
    -s, --single-env      only serve a single project without the project list
  }}}

  == Tips ==

  === Serving static content ===

  If `tracd` is the only web server used for the project, 
  it can also be used to distribute static content 
  (tarballs, Doxygen documentation, etc.)

  This static content should be put in the `$TRAC_ENV/htdocs` folder,
  and is accessed by URLs like `<project_URL>/chrome/site/...`.

  Example: given a `$TRAC_ENV/htdocs/software-0.1.tar.gz` file,
  the corresponding relative URL would be `/<project_name>/chrome/site/software-0.1.tar.gz`, 
  which in turn can be written as `htdocs:software-0.1.tar.gz` (TracLinks syntax) or `[/<project_name>/chrome/site/software-0.1.tar.gz]` (relative link syntax). 

   ''Support for `htdocs:` TracLinks syntax was added in version 0.10''

  === Using tracd behind a proxy

  In some situations when you choose to use tracd behind Apache or another web server.

  In this situation, you might experience issues with redirects, like being redirected to URLs with the wrong host or protocol. In this case (and only in this case), setting the `[trac] use_base_url_for_redirect` to `true` can help, as this will force Trac to use the value of `[trac] base_url` for doing the redirects.

  If you're using the AJP protocol to connect with `tracd` (which is possible if you have flup installed), then you might experience problems with double quoting. Consider adding the `--unquote` parameter.

  See also [trac:TracOnWindowsIisAjp], [trac:TracNginxRecipe].

  === Authentication for tracd behind a proxy
  It is convenient to provide central external authentication to your tracd instances, instead of using {{{--basic-auth}}}. There is some discussion about this in #9206.

  Below is example configuration based on Apache 2.2, mod_proxy, mod_authnz_ldap.

  First we bring tracd into Apache's location namespace.

  {{{
  <Location /project/proxified>
          Require ldap-group cn=somegroup, ou=Groups,dc=domain.com
          Require ldap-user somespecificusertoo
          ProxyPass http://localhost:8101/project/proxified/
          # Turns out we don't really need complicated RewriteRules here at all
          RequestHeader set REMOTE_USER %{REMOTE_USER}s
  </Location>
  }}}

  Then we need a single file plugin to recognize HTTP_REMOTE_USER header as valid authentication source. HTTP headers like '''HTTP_FOO_BAR''' will get converted to '''Foo-Bar''' during processing. Name it something like '''remote-user-auth.py''' and drop it into '''proxified/plugins''' directory:
  {{{
  #!python
  from trac.core import *
  from trac.config import BoolOption
  from trac.web.api import IAuthenticator

  class MyRemoteUserAuthenticator(Component):

      implements(IAuthenticator)

      obey_remote_user_header = BoolOption('trac', 'obey_remote_user_header', 'false', 
                 """Whether the 'Remote-User:' HTTP header is to be trusted for user logins 
                  (''since ??.??').""") 

      def authenticate(self, req):
          if self.obey_remote_user_header and req.get_header('Remote-User'): 
              return req.get_header('Remote-User') 
          return None

  }}}

  Add this new parameter to your TracIni:
  {{{
  ...
  [trac]
  ...
  obey_remote_user_header = true
  ...
  }}}

  Run tracd:
  {{{
  tracd -p 8101 -r -s proxified --base-path=/project/proxified
  }}}

  === Serving a different base path than / ===
  Tracd supports serving projects with different base urls than /<project>. The parameter name to change this is
  {{{
   $ tracd --base-path=/some/path
  }}}

  ----
  See also: TracInstall, TracCgi, TracModPython, TracGuide, [trac:TracOnWindowsStandalone#RunningTracdasservice Running tracd.exe as a Windows service]


name: WikiStart
author: aarapov
ipnr: 88.100.116.85
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  '''Please be advised microcode_ctl is soon to be obsolete'''

  * Latest released version: 1.18 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.18.tar.xz download]
   * AMD and Intel CPU microcode updated to the latest available versions
   * Minor manpage fixes
   * Fixed segfault that can be triggered by very long parameter
   * Fixed memory leak
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 88.100.116.85
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.18 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.18.tar.xz download], v2.0 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.0.tar.xz download]
   * AMD and Intel CPU microcode updated to the latest available versions
   * Minor manpage fixes
   * Fixed segfault that can be triggered by very long parameter
   * Fixed memory leak
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 209.132.186.34
comment: new release
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.19 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.19.tar.xz download], v2.0-1 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.0-1.tar.xz download]
   * AMD and Intel CPU microcode updated to the latest available versions
   * Minor manpage fixes
   * Fixed segfault that can be triggered by very long parameter
   * Fixed memory leak
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 209.132.186.34
comment: new release
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.20 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.20.tar.xz download], v2.0-2 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.0-2.tar.xz download]
   * AMD CPU microcode updated to the latest available version
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 209.132.186.34
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.21 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.21.tar.xz download], v2.0-3 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.0-3.tar.xz download]
   * Intel CPU microcode updated to the latest available version 20130222
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 194.228.13.237
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.21 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.21.tar.xz download], v2.1 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1.tar.xz download]
   * Remove AMD CPU microcode. Moved to linux-firmware.
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 194.228.13.111
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.21 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.21.tar.xz download], v2.1-1 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-1.tar.xz download]
   * Release. Intel CPU microcode update. 20130808
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 194.228.13.111
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.22 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.22.tar.xz download], v2.1-1 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-1.tar.xz download]
   * Release. Intel CPU microcode update. 20130808
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 194.228.13.229
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.22 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.22.tar.xz download], v2.1-2 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-2.tar.xz download]
   * Release. Intel CPU microcode update. 201300906
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 194.228.13.229
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.23 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.23.tar.xz download], v2.1-2 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-2.tar.xz download]
   * Release. Intel CPU microcode update. 201300906
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 194.228.13.229
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.23 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.23.tar.xz download], v2.1-2 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-2.tar.xz download]
   * Release. Intel CPU microcode update. 20130906
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 85.71.216.161
comment: new release
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.24 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.24.tar.xz download], v2.1-3 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-3.tar.xz download]
   * Release. Intel CPU microcode update. 20140122
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 85.71.216.161
comment: version update
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.25 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.25.tar.xz download], v2.1-4 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-4.tar.xz download]
   * Release. Intel CPU microcode update. 20140430
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@redhat.com>


name: WikiStart
author: aarapov
ipnr: 62.84.155.99
comment: new release
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.26 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.26.tar.xz download], v2.1-5 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-5.tar.xz download]
   * Release. Intel CPU microcode update. 20140624
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@descope.org>


name: WikiStart
author: aarapov
ipnr: 85.71.216.161
comment: intel updates
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.27 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.27.tar.xz download], v2.1-6 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-6.tar.xz download]
   * Release. Intel CPU microcode update. 20140913
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@descope.org>


name: WikiStart
author: aarapov
ipnr: 62.84.155.99
comment: new release
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.28 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.28.tar.xz download], v2.1-7 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-7.tar.xz download]
   * Release. Intel CPU microcode update. 20150121
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <anton@descope.org>


name: WikiStart
author: aarapov
ipnr: 62.84.155.99
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.28 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.28.tar.xz download], v2.1-8 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-8.tar.xz download]
   * Release. Intel CPU microcode update. 20151106
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <arapov@gmail.com>


name: WikiStart
author: aarapov
ipnr: 62.84.155.99
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.29 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.29.tar.xz download], v2.1-8 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-8.tar.xz download]
   * Release. Intel CPU microcode update. 20151106
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <arapov@gmail.com>


name: WikiStart
author: aarapov
ipnr: 62.84.155.99
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.30 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.30.tar.xz download], v2.1-9 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-9.tar.xz download]
   * Release. Intel CPU microcode update. 20160607
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <arapov@gmail.com>


name: WikiStart
author: aarapov
ipnr: 62.84.155.101
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.31 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.31.tar.xz download], v2.1-10 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-10.tar.xz download]
   * Release. Intel CPU microcode update. 20160714
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <arapov@gmail.com>


name: WikiStart
author: aarapov
ipnr: 213.175.37.10
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.32 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.31.tar.xz download], v2.1-10 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-10.tar.xz download]
   * Release. AMD CPU microcode update.
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <arapov@gmail.com>


name: WikiStart
author: aarapov
ipnr: 213.175.37.12
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.33 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.33.tar.xz download], v2.1-11 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-11.tar.xz download]
   * Release. AMD CPU microcode update.
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <arapov@gmail.com>


name: WikiStart
author: aarapov
ipnr: 213.175.37.12
text:
  == microcode_ctl: tool to update x86/x86-64 CPU microcode. ==

  ''' Please be advised microcode_ctl is obsolete and v2.0+ is the temporary solution. Future microcode updates will be delivered through the kernel-firmware infrastructure. '''

  * Latest released version: v1.33 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-1.33.tar.xz download], v2.1-11 [https://fedorahosted.org/released/microcode_ctl/microcode_ctl-2.1-11.tar.xz download]
   * Release. Intel CPU microcode update.
  * [https://fedorahosted.org/released/microcode_ctl/ microcode_ctl releases archive]
  * [http://git.fedorahosted.org/git/?p=microcode_ctl.git;a=summary source code]

  Maintainer: Anton Arapov <arapov@gmail.com>


# report

title: Active Tickets
description:
  * List all active tickets by priority.
  * Color each row based on priority.

query:
  SELECT p.value AS __color__,
     id AS ticket, summary, component, version, milestone, t.type AS type, 
     owner, status,
     time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status <> 'closed'
    ORDER BY CAST(p.value AS integer), milestone, t.type, time


title: Active Tickets by Version
query:
  SELECT p.value AS __color__,
     version AS __group__,
     id AS ticket, summary, component, version, t.type AS type, 
     owner, status,
     time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status <> 'closed'
    ORDER BY (version IS NULL),version, CAST(p.value AS integer), t.type, time

description:
  This report shows how to color results by priority,
  while grouping results by version.

  Last modification time, description and reporter are included as hidden fields
  for useful RSS export.


title: Active Tickets by Milestone
query:
  SELECT p.value AS __color__,
     'Milestone '||milestone AS __group__,
     id AS ticket, summary, component, version, t.type AS type, 
     owner, status,
     time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status <> 'closed' 
    ORDER BY (milestone IS NULL),milestone, CAST(p.value AS integer), t.type, time

description:
  This report shows how to color results by priority,
  while grouping results by milestone.

  Last modification time, description and reporter are included as hidden fields
  for useful RSS export.


title: Accepted, Active Tickets by Owner
description: List accepted tickets, group by ticket owner, sorted by priority.
query:
  SELECT p.value AS __color__,
     owner AS __group__,
     id AS ticket, summary, component, milestone, t.type AS type, time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status = 'accepted'
    ORDER BY owner, CAST(p.value AS integer), t.type, time


title: Accepted, Active Tickets by Owner (Full Description)
query:
  SELECT p.value AS __color__,
     owner AS __group__,
     id AS ticket, summary, component, milestone, t.type AS type, time AS created,
     description AS _description_,
     changetime AS _changetime, reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status = 'accepted'
    ORDER BY owner, CAST(p.value AS integer), t.type, time

description:
  List tickets accepted, group by ticket owner.
  This report demonstrates the use of full-row display.


title: All Tickets By Milestone (Including closed)
description: A more complex example to show how to make advanced reports.
query:
  SELECT p.value AS __color__,
     t.milestone AS __group__,
     (CASE status 
        WHEN 'closed' THEN 'color: #777; background: #ddd; border-color: #ccc;'
        ELSE 
          (CASE owner WHEN $USER THEN 'font-weight: bold' END)
      END) AS __style__,
     id AS ticket, summary, component, status, 
     resolution,version, t.type AS type, priority, owner,
     changetime AS modified,
     time AS _time,reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    ORDER BY (milestone IS NULL), milestone DESC, (status = 'closed'), 
          (CASE status WHEN 'closed' THEN changetime ELSE (-1) * CAST(p.value AS integer) END) DESC


title: My Tickets
query:
  SELECT p.value AS __color__,
     (CASE status WHEN 'accepted' THEN 'Accepted' ELSE 'Owned' END) AS __group__,
     id AS ticket, summary, component, version, milestone,
     t.type AS type, priority, time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE t.status <> 'closed' AND owner = $USER
    ORDER BY (status = 'accepted') DESC, CAST(p.value AS integer), milestone, t.type, time

description:
  This report demonstrates the use of the automatically set 
  USER dynamic variable, replaced with the username of the
  logged in user when executed.


title: Active Tickets, Mine first
query:
  SELECT p.value AS __color__,
     (CASE owner 
       WHEN $USER THEN 'My Tickets' 
       ELSE 'Active Tickets' 
      END) AS __group__,
     id AS ticket, summary, component, version, milestone, t.type AS type, 
     owner, status,
     time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status <> 'closed' 
    ORDER BY (COALESCE(owner, '') = $USER) DESC, CAST(p.value AS integer), milestone, t.type, time

description:
   * List all active tickets by priority.
   * Show all tickets owned by the logged in user in a group first.


