Mailing List Archive

Help setting up Trac 1.6
Dear trac users,

I am currently trying to migrate an old trac 0.12.3 trac instance
(www.lyx.org/trac) on CentOS 6, to something more modern.

We have elected to base our new server on Ubuntu Noble (the next LTS
release), which may be a bit optimistic.

So, this is both a fresh installation and an upgrade, since I move the
files to a new environment.

I did my best to follow TracInstall and TracUpgrade, and I have
something that seems to work with tracd, but I get an Internal Server
Error when trying to access to trac in the proper way.

My apache2 configuration snippet is:

<Location /trac>
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /home/lyx/www/trac
PythonOption TracUriRoot /trac
PythonOption PYTHON_EGG_CACHE /var/trac/lyx/egg-cache
# For Apache 2.2
<IfModule !mod_authz_core.c>
Order allow,deny
Allow from all
</IfModule>
# For Apache 2.4
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
</Location>

and when I try to load the page, I get very weird errors in apache logs,
which do not make sense to me.

Does this ring a bell to anybody?
Sorry for the long message, I probably give too much information and
miss the useful information at the same time.

JMarc

[Mon Mar 04 14:49:52.948702 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: Traceback
(most recent call last):
[Mon Mar 04 14:49:52.948761 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2787,
in _dep_map\n return self.__dep_map\n ^^^^^^^^^^^^^^
[Mon Mar 04 14:49:52.948768 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2902,
in __getattr__\n raise AttributeError(attr)
[Mon Mar 04 14:49:52.948774 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend:
AttributeError: _Distribution__dep_map
[Mon Mar 04 14:49:52.948779 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: \nDuring
handling of the above exception, another exception occurred:\n
[Mon Mar 04 14:49:52.948783 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: Traceback
(most recent call last):
[Mon Mar 04 14:49:52.948789 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/mod_python/apache.py", line 402, in
HandlerDispatch\n result = obj(req)\n ^^^^^^^^
[Mon Mar 04 14:49:52.948797 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/trac/web/modpython_frontend.py", line
149, in handler\n pkg_resources.require('Trac==%s' % VERSION)
[Mon Mar 04 14:49:52.948813 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 968, in
require\n needed = self.resolve(parse_requirements(requirements))\n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Mon Mar 04 14:49:52.948822 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 834, in
resolve\n new_requirements = dist.requires(req.extras)[::-1]\n
^^^^^^^^^^^^^^^^^^^^^^^^^
[Mon Mar 04 14:49:52.948830 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2822,
in requires\n dm = self._dep_map\n ^^^^^^^^^^^^^
[Mon Mar 04 14:49:52.948838 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2789,
in _dep_map\n self.__dep_map =
self._filter_extras(self._build_dep_map())\n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Mon Mar 04 14:49:52.948845 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2804,
in _filter_extras\n invalid_marker(marker) or not
evaluate_marker(marker)\n ^^^^^^^^^^^^^^^^^^^^^^
[Mon Mar 04 14:49:52.948853 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1459,
in invalid_marker\n evaluate_marker(text)
[Mon Mar 04 14:49:52.948861 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1477,
in evaluate_marker\n return marker.evaluate()\n ^^^^^^^^^^^^^^^^^
[Mon Mar 04 14:49:52.948885 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/markers.py",
line 243, in evaluate\n current_environment = default_environment()\n
^^^^^^^^^^^^^^^^^^^^^
[Mon Mar 04 14:49:52.948892 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/markers.py",
line 186, in default_environment\n "python_full_version":
platform.python_version(),\n ^^^^^^^^^^^^^^^^^^^^^^^^^
[Mon Mar 04 14:49:52.948899 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3.12/platform.py", line 1158, in python_version\n return
_sys_version()[1]\n ^^^^^^^^^^^^^^
[Mon Mar 04 14:49:52.948904 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend: File
"/usr/lib/python3.12/platform.py", line 1108, in _sys_version\n raise
ValueError(
[Mon Mar 04 14:49:52.948910 2024] [:error] [pid 7673] [client
128.93.65.20:45406] PythonHandler trac.web.modpython_frontend:
ValueError: failed to parse CPython sys.version: '3.12.2'


--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/e5ddf977-f40e-4550-86bf-6859bd7aee23%40free.fr.
Re: Help setting up Trac 1.6 [ In reply to ]
Hi,

Le 04/03/2024 à 17:20, Jean-Marc Lasgouttes a écrit :
> [Mon Mar 04 14:49:52.948910 2024] [:error] [pid 7673] [client
> 128.93.65.20:45406] PythonHandler trac.web.modpython_frontend:
> ValueError: failed to parse CPython sys.version: '3.12.2'

This reminds me of this Debian bug
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040933>. This is the
kind of problem that moved us away from mod_python a dozen years ago.

Is there any particular reason to stick with mod_python instead of, say,
mod_wsgi ?

(by the way, happy to see Lyx is still doing well. I had a lot of good
time with it in a previous job ;-)).

HTH,

phep

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/3e495cc5-b6fe-4be7-a3ba-15b3812cf7b1%40wakzo.net.
Re: Help setting up Trac 1.6 [ In reply to ]
Le 04/03/2024 à 20:19, phep a écrit :
> Hi,
>
> Le 04/03/2024 à 17:20, Jean-Marc Lasgouttes a écrit :
>> [Mon Mar 04 14:49:52.948910 2024] [:error] [pid 7673] [client
>> 128.93.65.20:45406] PythonHandler trac.web.modpython_frontend:
>> ValueError: failed to parse CPython sys.version: '3.12.2'
>
> This reminds me of this Debian bug
> <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040933>. This is the
> kind of problem that moved us away from mod_python a dozen years ago.

Hi Phep,

Thanks for your prompt answer.

> Is there any particular reason to stick with mod_python instead of, say,
> mod_wsgi ?

Because I do not know what I am doing? But I realized a few hours ago
than swgi is probably a better choice.

I have yet to make it work, I may ask for more help once I sort it out
(currently apache itself does not start :))/

> (by the way, happy to see Lyx is still doing well. I had a lot of good
> time with it in a previous job ;-)).

It is going slowly, but we're still here!

Best,
Jean-Marc

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a2d9a1a7-e271-4e93-8abd-26f7a047d502%40free.fr.
Re: Help setting up Trac 1.6 [ In reply to ]
On 2024-03-04 20:19, phep wrote:
> Le 04/03/2024 à 17:20, Jean-Marc Lasgouttes a écrit :
> [Mon Mar 04 14:49:52.948910 2024] [:error] [pid 7673] [client 128.93.65.20:45406] PythonHandler trac.web.modpython_frontend:
> ValueError: failed to parse CPython sys.version: '3.12.2'
>
> This reminds me of this Debian bug. This is the kind of problem that moved us away from mod_python a dozen years ago.
>
> Is there any particular reason to stick with mod_python instead of, say, mod_wsgi ?

Also, nginx with gunicorn works well on Debian.
I guess, it will be the same on Ubuntu.
Whatever works for you ;-)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/87plw9twq8.fsf%40fama.lan.
Re: Help setting up Trac 1.6 [ In reply to ]
Le 05/03/2024 à 00:13, Martin a écrit :
> Also, nginx with gunicorn works well on Debian.
> I guess, it will be the same on Ubuntu.
> Whatever works for you ;-)

Thanks for the advice Martin. Unfortunately, the choice is already made:
it is an apache2-based box (but it works now!).

JMarc


--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/4622bdfc-073c-4c97-add2-4a4aec930265%40free.fr.
Re: Help setting up Trac 1.6 [ In reply to ]
Le 05/03/2024 à 00:13, Martin a écrit :
> Also, nginx with gunicorn works well on Debian.
> I guess, it will be the same on Ubuntu.
> Whatever works for you ;-)

Thanks for the advice Martin. Unfortunately, the choice is already made:
it is an apache2-based box (but it works now!).

JMarc


--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/4622bdfc-073c-4c97-add2-4a4aec930265%40free.fr.
Re: Help setting up Trac 1.6 [ In reply to ]
Le 04/03/2024 à 23:19, Jean-Marc Lasgouttes a écrit :
> Le 04/03/2024 à 20:19, phep a écrit :
>> Is there any particular reason to stick with mod_python instead of,
>> say, mod_wsgi ?
>
> Because I do not know what I am doing? But I realized a few hours ago
> than swgi is probably a better choice.

Hello,

So, with wsgi, everything seems to work :) Thanks for the tip.

I still have issues, though.

1/ I have added to [components]
tracopt.ticket.deleter.* = enabled
but I fail to see any Delete button in the ticket UI. How does this
work? I do have TRAC_ADMIN permission.


2/ I installed TracKeywordsPlugin, have added to [components]
trackeywords.web_ui.* = enabled
and a (dummy) section

[keywords]
patch = A patch is available for this issue
regression = This bug is new in this version

I see the plugin from the administrative page, but… I do not see any new
keywords UI on the tickets page (I did restart apache).


3/ I have configured 2 git repos, but one of them gives an error (coming
from trac-admin) like
InvalidRepository: "features" is not readable or not a Git repository.

Git seems to think that this is a perfectly valid repo and I
double-checked that it is owned by www-data.

So how can I know what annoys trad-admin?


Sorry for the never-ending stream of questions.

Best,
Jean-Marc

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/f4f3941f-cff5-4026-bcd3-f144babfc334%40free.fr.
Re: Help setting up Trac 1.6 [ In reply to ]
Le 06/03/2024 à 17:33, Jean-Marc Lasgouttes a écrit :
> Le 04/03/2024 à 23:19, Jean-Marc Lasgouttes a écrit :
>> Le 04/03/2024 à 20:19, phep a écrit :
>>> Is there any particular reason to stick with mod_python instead of,
>>> say, mod_wsgi ?
>>
>> Because I do not know what I am doing? But I realized a few hours ago
>> than swgi is probably a better choice.
>
> Hello,
>
> So, with wsgi, everything seems to work :) Thanks for the tip.
>
> I still have issues, though.
>
> 1/ I have added to [components]
>   tracopt.ticket.deleter.* = enabled
> but I fail to see any Delete button in the ticket UI. How does this
> work? I do have TRAC_ADMIN permission.
>
>
> 2/ I installed TracKeywordsPlugin, have added to [components]
>   trackeywords.web_ui.* = enabled
> and a (dummy) section
>
> [keywords]
> patch = A patch is available for this issue
> regression = This bug is new in this version
>
> I see the plugin from the administrative page, but… I do not see any new
> keywords UI on the tickets page (I did restart apache).
>
>
> 3/ I have configured 2 git repos, but one of them gives an error (coming
> from trac-admin) like
> InvalidRepository: "features" is not readable or not a Git repository.
>
> Git seems to think that this is a perfectly valid repo and I
> double-checked that it is owned by www-data.

I have a solution to this last question. The repository was recorded not
in trac.ini, but in the database itself, accessible through trac-admin.

This begs a new question:

4/ This is confusing to me. What are the things that are advised to be
configured in trac.ini, and what are those which should be done in the db?

And for good measure, I have a new one:

5/ Our git repository is on a different machine than our web server,
which handles trac. What are the good mechanisms that you might know of
to make sure that trac on www.lyx.org is updated whenever something is
pushed to git.lyx.org?

We have an hourly cron job for now, but it is not very satisfying.

Best regards,
Jean-Marc

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/f0c6e8fd-759b-4884-ab92-e05fa1a2d694%40free.fr.
Re: Help setting up Trac 1.6 [ In reply to ]
On Thu, Mar 7, 2024 at 1:33?AM Jean-Marc Lasgouttes
<lasgouttes.lyx.org@free.fr> wrote:
>
> 1/ I have added to [components]
> tracopt.ticket.deleter.* = enabled
> but I fail to see any Delete button in the ticket UI. How does this
> work? I do have TRAC_ADMIN permission.
>
>
> 2/ I installed TracKeywordsPlugin, have added to [components]
> trackeywords.web_ui.* = enabled
> and a (dummy) section
>
> [keywords]
> patch = A patch is available for this issue
> regression = This bug is new in this version
>
> I see the plugin from the administrative page, but… I do not see any new
> keywords UI on the tickets page (I did restart apache).

Check no errors in javascript console.
Both the deleter feature and the trackeywordsplugin work fine on my environment.

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMajuWBSP6P22iwhckhm97_u7qfmn1CMMRL0JTGatV6hfSw%40mail.gmail.com.