Bug 25714 - trac.fcgi file missing from trac-fcgi package
Summary: trac.fcgi file missing from trac-fcgi package
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Bruno Cornec
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-20 17:21 CET by Bruno Cornec
Modified: 2021-09-07 14:11 CEST (History)
0 users

See Also:
Source RPM: trac-1.2.3-1.mga7.src.rpm
CVE:
Status comment:


Attachments

Description Bruno Cornec 2019-11-20 17:21:42 CET
Description of problem:
trac.fcgi file missing from trac-fcgi package

Version-Release number of selected component (if applicable):
1.2.3-1

How reproducible:
Always

Steps to Reproduce:
1. install/update trac to 1.2.3 with fcgi mode
2. reach your trac site
3. You get something liek this in logs:
[Wed Nov 20 11:06:34.746036 2019] [cgi:error] [pid 10260] [client 46.229.168.149:49006] AH02811: script not found or unable to stat: /var/www/cgi-bin/trac.cgi
Comment 1 Bruno Cornec 2019-11-23 23:27:19 CET
Fixed with rev [1461994]
Now I have another issue with python when trying to log in:


A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
 /usr/lib/python2.7/site-packages/trac/web/_fcgi.py in run(self=<trac.web._fcgi.Request object>)
    568         """Runs the handler, flushes the streams, and ends the request."""
    569         try:
=>  570             protocolStatus, appStatus = self.server.handler(self)
    571         except:
    572             traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = <trac.web._fcgi.Request object>, self.server = <trac.web._fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <trac.web._fcgi.WSGIServer object>>
 /usr/lib/python2.7/site-packages/trac/web/_fcgi.py in handler(self=<trac.web._fcgi.WSGIServer object>, req=<trac.web._fcgi.Request object>)
   1260         try:
   1261             try:
=> 1262                 result = self.application(environ, start_response)
   1263                 try:
   1264                     for data in result:
result = None, self = <trac.web._fcgi.WSGIServer object>, self.application = <function dispatch_request>, environ = {'CONTENT_LENGTH': '127', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'CONTEXT_DOCUMENT_ROOT': '/var/www/cgi-bin/trac.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/prj/www/html/project-builder', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'fr,en-US;q=0.7,en;q=0.3', 'HTTP_CACHE_CONTROL': 'max-age=259200', ...}, start_response = <function start_response>
 /usr/lib/python2.7/site-packages/trac/web/main.py in dispatch_request(environ={'CONTENT_LENGTH': '127', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'CONTEXT_DOCUMENT_ROOT': '/var/www/cgi-bin/trac.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/prj/www/html/project-builder', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'fr,en-US;q=0.7,en;q=0.3', 'HTTP_CACHE_CONTROL': 'max-age=259200', ...}, start_response=<function start_response>)
    612     translation.make_activable(lambda: req.locale, env.path if env else None)
    613     try:
=>  614         return _dispatch_request(req, env, env_error)
    615     finally:
    616         translation.deactivate()
global _dispatch_request = <function _dispatch_request>, req = <RequestWithSession "POST '/login'">, env = <Environment '/prj/trac/project-builder.env'>, env_error = None
 /usr/lib/python2.7/site-packages/trac/web/main.py in _dispatch_request(req=<RequestWithSession "POST '/login'">, env=<Environment '/prj/trac/project-builder.env'>, env_error=None)
    652         _send_user_error(req, env, e)
    653     except Exception:
=>  654         send_internal_error(env, req, sys.exc_info())
    655     return resp
    656 
global send_internal_error = <function send_internal_error>, env = <Environment '/prj/trac/project-builder.env'>, req = <RequestWithSession "POST '/login'">, global sys = <module 'sys' (built-in)>, sys.exc_info = <built-in function exc_info>
 /usr/lib/python2.7/site-packages/trac/web/main.py in send_internal_error(env=<Environment '/prj/trac/project-builder.env'>, req=<RequestWithSession "POST '/login'">, exc_info=(<type 'exceptions.AttributeError'>, AttributeError("'Environment' object has no attribute 'get_db_cnx'",), <traceback object>))
    783             'description': description, 'description_en': description_en}
    784 
=>  785     Chrome(env).add_jquery_ui(req)
    786     try:
    787         req.send_error(exc_info, status=500, env=env, data=data)
global Chrome = <class 'trac.web.chrome.Chrome'>, env = <Environment '/prj/trac/project-builder.env'>, ).add_jquery_ui undefined, req = <RequestWithSession "POST '/login'">
 /usr/lib/python2.7/site-packages/trac/web/chrome.py in add_jquery_ui(self=<Component trac.web.chrome.Chrome>, req=<RequestWithSession "POST '/login'">)
   1386         """Add a reference to the jQuery UI script and link the stylesheet."""
   1387         add_script(req, self.jquery_ui_location
=> 1388                         or 'common/js/jquery-ui.js')
   1389         add_stylesheet(req, self.jquery_ui_theme_location
   1390                             or 'common/css/jquery-ui/jquery-ui.css')
 /usr/lib/python2.7/site-packages/trac/web/chrome.py in add_script(req=<RequestWithSession "POST '/login'">, filename='common/js/jquery-ui.js', mimetype='text/javascript', charset='utf-8', ie_if=None)
    164     `/chrome/` path.
    165     """
=>  166     scriptset = req.chrome.setdefault('scriptset', set())
    167     if filename in scriptset:
    168         return False  # Already added that script
scriptset undefined, req = <RequestWithSession "POST '/login'">, req.chrome = {'ctxtnav': [], 'htdocs_location': '/chrome/common/', 'links': {'help': [{'class': None, 'href': '/wiki/TracGuide', 'title': None, 'type': None}], 'search': [{'class': None, 'href': '/search', 'title': None, 'type': None}], 'start': [{'class': None, 'href': '/wiki', 'title': None, 'type': None}], 'stylesheet': [{'class': None, 'href': '/chrome/common/css/trac.css', 'title': None, 'type': 'text/css'}]}, 'linkset': set(['help:/wiki/TracGuide', 'search:/search', 'start:/wiki', 'stylesheet:/chrome/common/css/trac.css']), 'metas': [], 'notices': [], 'script_data': {}, 'scripts': [{'charset': 'utf-8', 'href': '/chrome/common/js/jquery.js', 'prefix': None, 'suffix': None, 'type': 'text/javascript'}, {'charset': 'utf-8', 'href': '/chrome/common/js/babel.js', 'prefix': None, 'suffix': None, 'type': 'text/javascript'}], 'scriptset': set(['common/js/babel.js', 'common/js/jquery.js']), 'warnings': []}, req.chrome.setdefault = <built-in method setdefault of dict object>, builtin set = <type 'set'>
 /usr/lib/python2.7/site-packages/trac/web/api.py in __getattr__(self=<RequestWithSession "POST '/login'">, name='chrome')
    496         callbacks dictionary."""
    497         if name in self.callbacks:
=>  498             value = self.callbacks[name](self)
    499             setattr(self, name, value)
    500             return value
value undefined, self = <RequestWithSession "POST '/login'">, self.callbacks = {'_inheaders': <unbound method Request._parse_headers>, 'arg_list': <unbound method Request._parse_arg_list>, 'args': <function <lambda>>, 'authname': <bound method RequestDispatcher.authenticate of <Component trac.web.main.RequestDispatcher>>, 'chrome': <bound method Chrome.prepare_request of <Component trac.web.chrome.Chrome>>, 'configurable_headers': <bound method RequestDispatcher._get_configurabl...s of <Component trac.web.main.RequestDispatcher>>, 'form_token': <bound method RequestDispatcher._get_form_token of <Component trac.web.main.RequestDispatcher>>, 'incookie': <unbound method Request._parse_cookies>, 'languages': <unbound method Request._parse_languages>, 'lc_time': <bound method RequestDispatcher._get_lc_time of <Component trac.web.main.RequestDispatcher>>, ...}, name = 'chrome'
 /usr/lib/python2.7/site-packages/trac/web/chrome.py in prepare_request(self=<Component trac.web.chrome.Chrome>, req=<RequestWithSession "POST '/login'">, handler=None)
    803             add_script(req, 'common/js/noconflict.js')
    804         add_script(req, 'common/js/babel.js')
=>  805         if req.locale is not None and str(req.locale) != 'en_US':
    806             add_script(req, 'common/js/messages/%s.js' % req.locale)
    807         add_script(req, 'common/js/trac.js')
req = <RequestWithSession "POST '/login'">, req.locale undefined, builtin None = None, builtin str = <type 'str'>
 /usr/lib/python2.7/site-packages/trac/web/api.py in __getattr__(self=<RequestWithSession "POST '/login'">, name='locale')
    496         callbacks dictionary."""
    497         if name in self.callbacks:
=>  498             value = self.callbacks[name](self)
    499             setattr(self, name, value)
    500             return value
value undefined, self = <RequestWithSession "POST '/login'">, self.callbacks = {'_inheaders': <unbound method Request._parse_headers>, 'arg_list': <unbound method Request._parse_arg_list>, 'args': <function <lambda>>, 'authname': <bound method RequestDispatcher.authenticate of <Component trac.web.main.RequestDispatcher>>, 'chrome': <bound method Chrome.prepare_request of <Component trac.web.chrome.Chrome>>, 'configurable_headers': <bound method RequestDispatcher._get_configurabl...s of <Component trac.web.main.RequestDispatcher>>, 'form_token': <bound method RequestDispatcher._get_form_token of <Component trac.web.main.RequestDispatcher>>, 'incookie': <unbound method Request._parse_cookies>, 'languages': <unbound method Request._parse_languages>, 'lc_time': <bound method RequestDispatcher._get_lc_time of <Component trac.web.main.RequestDispatcher>>, ...}, name = 'locale'
 /usr/lib/python2.7/site-packages/trac/web/main.py in _get_locale(self=<Component trac.web.main.RequestDispatcher>, req=<RequestWithSession "POST '/login'">)
    375     def _get_locale(self, req):
    376         if has_babel:
=>  377             preferred = req.session.get('language')
    378             default = self.default_language
    379             negotiated = get_negotiated_locale([preferred, default] +
preferred undefined, req = <RequestWithSession "POST '/login'">, req.session undefined
 /usr/lib/python2.7/site-packages/trac/web/api.py in __getattr__(self=<RequestWithSession "POST '/login'">, name='session')
    496         callbacks dictionary."""
    497         if name in self.callbacks:
=>  498             value = self.callbacks[name](self)
    499             setattr(self, name, value)
    500             return value
value undefined, self = <RequestWithSession "POST '/login'">, self.callbacks = {'_inheaders': <unbound method Request._parse_headers>, 'arg_list': <unbound method Request._parse_arg_list>, 'args': <function <lambda>>, 'authname': <bound method RequestDispatcher.authenticate of <Component trac.web.main.RequestDispatcher>>, 'chrome': <bound method Chrome.prepare_request of <Component trac.web.chrome.Chrome>>, 'configurable_headers': <bound method RequestDispatcher._get_configurabl...s of <Component trac.web.main.RequestDispatcher>>, 'form_token': <bound method RequestDispatcher._get_form_token of <Component trac.web.main.RequestDispatcher>>, 'incookie': <unbound method Request._parse_cookies>, 'languages': <unbound method Request._parse_languages>, 'lc_time': <bound method RequestDispatcher._get_lc_time of <Component trac.web.main.RequestDispatcher>>, ...}, name = 'session'
 /usr/lib/python2.7/site-packages/trac/web/main.py in _get_session(self=<Component trac.web.main.RequestDispatcher>, req=<RequestWithSession "POST '/login'">)
    364     def _get_session(self, req):
    365         try:
=>  366             return Session(self.env, req)
    367         except TracError as e:
    368             msg = "can't retrieve session: %s"
global Session = <class 'trac.web.session.Session'>, self = <Component trac.web.main.RequestDispatcher>, self.env = <Environment '/prj/trac/project-builder.env'>, req = <RequestWithSession "POST '/login'">
 /usr/lib/python2.7/site-packages/trac/web/session.py in __init__(self={}, env=<Environment '/prj/trac/project-builder.env'>, req=<RequestWithSession "POST '/login'">)
    246         super(Session, self).__init__(env, None)
    247         self.req = req
=>  248         if req.authname == 'anonymous':
    249             if COOKIE_KEY not in req.incookie:
    250                 self.sid = hex_entropy(24)
req = <RequestWithSession "POST '/login'">, req.authname undefined
 /usr/lib/python2.7/site-packages/trac/web/api.py in __getattr__(self=<RequestWithSession "POST '/login'">, name='authname')
    496         callbacks dictionary."""
    497         if name in self.callbacks:
=>  498             value = self.callbacks[name](self)
    499             setattr(self, name, value)
    500             return value
value undefined, self = <RequestWithSession "POST '/login'">, self.callbacks = {'_inheaders': <unbound method Request._parse_headers>, 'arg_list': <unbound method Request._parse_arg_list>, 'args': <function <lambda>>, 'authname': <bound method RequestDispatcher.authenticate of <Component trac.web.main.RequestDispatcher>>, 'chrome': <bound method Chrome.prepare_request of <Component trac.web.chrome.Chrome>>, 'configurable_headers': <bound method RequestDispatcher._get_configurabl...s of <Component trac.web.main.RequestDispatcher>>, 'form_token': <bound method RequestDispatcher._get_form_token of <Component trac.web.main.RequestDispatcher>>, 'incookie': <unbound method Request._parse_cookies>, 'languages': <unbound method Request._parse_languages>, 'lc_time': <bound method RequestDispatcher._get_lc_time of <Component trac.web.main.RequestDispatcher>>, ...}, name = 'authname'
 /usr/lib/python2.7/site-packages/trac/web/main.py in authenticate(self=<Component trac.web.main.RequestDispatcher>, req=<RequestWithSession "POST '/login'">)
    179         for authenticator in self.authenticators:
    180             try:
=>  181                 authname = authenticator.authenticate(req)
    182             except TracError as e:
    183                 self.log.error("Can't authenticate using %s: %s",
authname undefined, authenticator = <Component acct_mgr.web_ui.LoginModule>, authenticator.authenticate = <bound method LoginModule.wrap of <Component acct_mgr.web_ui.LoginModule>>, req = <RequestWithSession "POST '/login'">
 /usr/lib/python2.7/site-packages/acct_mgr/util.py in wrap(self=<Component acct_mgr.web_ui.LoginModule>, *args=(<RequestWithSession "POST '/login'">,), **kwds={})
     80         if not self.enabled:
     81             return None
=>   82         return func(self, *args, **kwds)
     83     return wrap
     84 
func = <function authenticate>, self = <Component acct_mgr.web_ui.LoginModule>, args = (<RequestWithSession "POST '/login'">,), kwds = {}
 /usr/lib/python2.7/site-packages/acct_mgr/web_ui.py in authenticate(self=<Component acct_mgr.web_ui.LoginModule>, req=<RequestWithSession "POST '/login'">)
    336         if req.method == 'POST' and req.path_info.startswith('/login') and \
    337                 req.args.get('user_locked') is None:
=>  338             user = self._remote_user(req)
    339             acctmgr = AccountManager(self.env)
    340             guard = AccountGuard(self.env)
user undefined, self = <Component acct_mgr.web_ui.LoginModule>, self._remote_user = <bound method LoginModule._remote_user of <Component acct_mgr.web_ui.LoginModule>>, req = <RequestWithSession "POST '/login'">
 /usr/lib/python2.7/site-packages/acct_mgr/web_ui.py in _remote_user(self=<Component acct_mgr.web_ui.LoginModule>, req=<RequestWithSession "POST '/login'">)
    687                 # to avoid DOS by continuously triggered resets from
    688                 # a malicious third party.
=>  689                 if reset_store.delete_user(user) == True and \
=>  690                         'PASSWORD_RESET' not in req.environ:
    691                     db = self.env.get_db_cnx()
reset_store = <Component acct_mgr.web_ui.ResetPwStore>, reset_store.delete_user = <bound method ResetPwStore.delete_user of <Component acct_mgr.web_ui.ResetPwStore>>, user = u'bruno', builtin True = True, req = <RequestWithSession "POST '/login'">, req.environ = {'CONTENT_LENGTH': '127', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'CONTEXT_DOCUMENT_ROOT': '/var/www/cgi-bin/trac.fcgi/', 'CONTEXT_PREFIX': '/', 'DOCUMENT_ROOT': '/prj/www/html/project-builder', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'fr,en-US;q=0.7,en;q=0.3', 'HTTP_CACHE_CONTROL': 'max-age=259200', ...}
 /usr/lib/python2.7/site-packages/acct_mgr/db.py in delete_user(self=<Component acct_mgr.web_ui.ResetPwStore>, user=u'bruno')
    114         Returns True, if the account existed and was deleted, False otherwise.
    115         """
=>  116         db = self.env.get_db_cnx()
    117         cursor = db.cursor()
    118         sql = """
db undefined, self = <Component acct_mgr.web_ui.ResetPwStore>, self.env = <Environment '/prj/trac/project-builder.env'>, self.env.get_db_cnx undefined

<type 'exceptions.AttributeError'>: 'Environment' object has no attribute 'get_db_cnx'
      args = ("'Environment' object has no attribute 'get_db_cnx'",)
      message = "'Environment' object has no attribute 'get_db_cnx'"
Comment 2 Bruno Cornec 2019-11-23 23:41:38 CET
Humm this is due to additional plugins I have from TracHacks. So I think we're good for now.

Status: NEW => ASSIGNED

Comment 3 Aurelien Oudelet 2021-07-06 13:15:58 CEST
Mageia 7 is EOL since July 1st 2021.
There will not have any further bugfix for this release.

You are encouraged to upgrade to Mageia 8 as soon as possible.

@reporter, if this bug still apply with Mageia 8, please let us know it.

@packager, if you work on the Mageia 7 version of your package, please check the Mageia 8 package if issue is also present. In this case, please fix the Mageia 8 version instead.

This bug report will be closed OLD if there is no further notice within 1st September 2021.
Comment 4 Marja Van Waes 2021-09-07 14:11:13 CEST
Hi bug reporter and hi assignee and others involved,

Please reopen this bug report if it is still valid for Mageia 8 or 9(cauldron), and change "Version:" in the upper left of this report accordingly.

This report is being closed as OLD because it was filed against Mageia 7, for which  support ended on June 30th 2021.

Thanks,
Marja

Resolution: (none) => OLD
Status: ASSIGNED => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.