I'm building an integrated system where I am using Trac for wiki support running on apache webserver 2.2 with mod_wsgi.
I had this idea to have a folder structure that is not \Trac\Project but something a little more complex. I want my filesystem structure to be like:
-Trac
-SomeContext
-...
-Project1
-Project2
-SomeOtherContext
-...
-Project1
-Project2
I would like to access them with the url matching their filesystem location
(ie: site.com\trac\SomeContext...\Project1)
From what i understand about trac only the folders in \Trac\ are searched with no depth other than the root.
How can i solve this problem?
See recipes in 'http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac' for ideas of how to do that.
You can apply little modification is trac source code.
Related
This is going to read similar to the other Trac static resource issues I found (pretty well encompassed by this SO question), but this doesn't appear to be the same issue.
I have partial (non-root) access to a server with other Trac projects, and I have the ability to create my own Trac site. The server has the following software versions:
Python 2.7
Trac 1.0
mod_python 3.3.1
So I've created and have been using the site for a few weeks, but I can't get the logo or the favicon to show up. There is another Trac project to which I have access, and to make sure I wasn't missing anything obvious I compared the trac.ini files from both projects. The relevant sections have very similar settings, e.g.:
[header_logo]
src = site/my_logo.png
[project]
icon = site/favicon.ico
and those are both sitting in their respective Trac environments' htdocs folders:
/
opt/
trac/
trac_env_1/
htdocs/
my_logo.png
favicon.ico
trac_env_2/
htdocs/
my_logo.png
favicon.ico
However, the images only appear on one site but not the other. On my site Google Chrome says:
GET https://{Intranet URL}/trac/{my_trac_env}/chrome/site/my_logo.png 404 (Not Found)
I have tried the following, all of which have been unsuccessful:
Setting the width and height inside [header_logo] to the correct dimensions
Copying the exact same images that work on the other project over to my project
Changing site/favicon.ico to /favicon.ico and /favicon.ico? (as suggested on the Trac wiki)
Running trac-admin deploy . in place, copying the images to htdocs/common, and changing the trac.ini setting to common/my_logo.png
Changing site/my_logo.png to /images/my_logo.png and matching that folder structure in my trac environment.
Making an htdocs/site/ folder and adding the logo to it (which, I know, is what other people did wrong, but I'm banging my head against the wall here).
The only thing left I can think of is Apache settings, but from what I can tell it should handle whatever Trac environments it can find in /opt/trac. In /etc/httpd/conf.d/trac.conf, it has:
<Location /trac>
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /opt/trac
PythonOption TracUriRoot /trac
PythonOption PYTHON_EGG_CACHE /var/trac/egg-cache
</Location>
That it uses TracEnvParentDir instead of just TracEnv is the important bit, I think.
So, I am at a loss. Please, can somebody help me?
Gah, I knew I was missing something simple.
The problem was file permissions. Apache did not have read access to my Trac environment, so a simple chmod -R a+rX /opt/trac/trac_env_2 solved it.
I guess that's another answer to the "My static files won't show up in Trac" question:
Don't make an actual folder named "site" in your Trac environment; site/my_logo.png will look in trac_env/htdocs
Make sure your server knows where to find your Trac environments. Both mod_python and mod_wsgi settings for this are easily found.
Make sure your server has read access to your particular Trac environment (chmod a+rX to give directories-only execute permission)
Just posting here in case anyone else runs into a similar issue.
I try to write a file store based on libgit2.
Software snapshots should be saved as branches mysoftware and specific versions committed and tagged. Then later I want to checkout the tags to different directories.
When looking at git_checkout_tree, it seems like there is only one working tree for a repository and thus it does not even seem possible to checkout multiple working trees concurrently.
Is this correct!?
EDIT:
Additionally, I would like for this thing to work on Windows without the need for cygwin!
The git_checkout_opts structure in libgit2 contains a target_directory option that will allow git_checkout_tree() to write to a different directory instead of using the default working tree for the repository. This would allow you to custom build a solution with libgit2 that maintained multiple checked out copies.
Without using that option, a libgit2 git_repository object expects there will be just one working directory and looks to the core.worktree config option if it isn't the "natural" working directory for the repository.
The git-new-workdir tricks with symlinks in the .git directory don't work great with libgit2 right now, I'm afraid, and particularly doesn't work well on Windows. I'd love to see this addressed, but it isn't too high on my priority list.
Git doesn't support this natively, but you can use git-new-workdir to do it.
symfony1.x followed a good standart that the whole framework lies somewhere outside and is available to any project. Today I started to read symfony2 documentation and actually downloaded the 'with vendors' 2.0.1 package which is presented on download page. After opening the package I was a bit surprised of what I've seen. But after looking around the package I found that the only folder I need is 'vendors' one - so I copied its content to my '...\lib\vendor\symfony2' folder (near '...\lib\vendor\symfony' and '...\lib\vendor\ext'). I added it to include path and proceed reading documentation. And then I found a problem - a command listed 'php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml' produced simple questions. Did they miss to explain how to generate a project (structure, preconfiguration, command-line files, etc)? And what about '.bat' and '.sh' files?
Symfony2 is very, very different than symfony 1 - especially when it comes to the directory structure. You can't simply drop in the vendors dir and expect it to work. This page explains how to setup a new Symfony2 project.
I recommend you to forget Symfony... and to think with Symfony2 about another think completely different than S1.
Installation is really simple and you will need some advanced PHP knowledge just to understand how it works... But if you have worked with S1, I expect you will have not much problems :)
I'm trying setup the Versioning bundle in RavenDB: http://ravendb.net/bundles/versioning
The installation instructions are pretty straight forward:
Simply place the Raven.Bundles.Versioning.dll in the Plugins
directory.
I've tried this do this by creating a "Plugins" directory under the Server directory (the Server directory contains the Raven.Server.exe), and dropping Raven.Client.Versioning.dll into that Plugins directory.
However, when I run RavenDB after that (either from the command line or as a service), it doesn't give me any indication that it has recognized the plugin, and when I save/edit new documents no versioning is being applied.
I've tried running with the default plugin directory settings (which supposedly automatically looks in the Plugins directory), and I've tried manually adding the PluginsDirectory setting to Raven.Server.exe.config, to no avail.
Has anyone been able to get plugins working, specifically the versioning bundle? Do you hae to do anything special?
Mike,
It is supposed to just work. Take a look at the statistics, you should see the versioning trigger registered there.
It is important to ensure that:
You are using the same version of the dlls
You restarts RavenDB after copying the directory
You don't reference another Raven/PluginsDirectory in the configuration
It is probably better to follow this up in the mailing list.
For Raven v2, you'll also add the bundle name to the the Raven/ActiveBundles property on a database document. The names should be semicolon-delimited.
For example, I have a database called MidwestAnimalRescue. To enable the Periodic Backup bundle and the Versioning bundle, my document will look like this:
I'm using Trac 0.12.2 that came as a part of Bitnami Trac Stac.
I am very new to Trac & just started with Trac, working with a local repository on a desktop a few weeks ago & created some issues. Now I wanted to transfer the all those issues onto my new Trac installation on another desktop. So I simply tried replacing the empty(I believed) database folder of new installation with my old Trac DB folder.
Specifically this folder:
C:\BitNamiTracStack\repository\db\
When I tried doing so, the admin tab on the trac interface disappeared.
Also I got a message:
Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.
How do I successfully transfer my issues from one desktop to another ?
Check your installation and find the correct directory called 'Trac environment' as per Remy's advice.
While his answer is the safe road and general advice without doubt, you may still succeed with a less complete transfer, depending on what you already put into the Trac environment in question. Assuming you do use BitNami's default Trac db backend (SQLite) you'll need at least
the latest db named trac.db from the db folder
the configuration file conf/trac.ini
If you've worked with attachments to tickets or wiki pages, the whole directory structure below attachements is needed as well.
Other things might not have been touched by a self-declared "very new" Trac user within the first weeks. Of course a diff -Nur <path_to_old_dir> <path_to_new_dir> | <your_favorite_editor> will remind you of anything you may have already forgotten.
You shouldn't copy the database alone, but the complete Trac environment. That's the directory containing the attachments, conf, db, htdocs, log, plugins and templates directories. In your case, this seems to be the directory:
C:\BitNameTracStack\repository
(I'm not familiar with the BitNami stack, but the name "repository" sounds suspect. I hope they don't put the Trac environment below the Subversion repository.)
See the official Trac documentation on backing up a Trac environment and restoring it. You should be able to use this to migrate your config to another server.