Bug 257561

Summary: Minor mantis-1.0.8-1 packaging issues and initial install bug
Product: [Fedora] Fedora Reporter: Todd Zullinger <tmz>
Component: mantisAssignee: Gianluca Sforna <giallu>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: rh-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-09 23:26:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 428335    
Bug Blocks:    
Attachments:
Description Flags
Patch to fix some minor packaging issues and initial install bug none

Description Todd Zullinger 2007-08-27 19:17:17 UTC
Hi Gianluca,

I ran into a few minor issues while installing and configuring the mantis
package (in repsponse to a thread on fedora-list[1]).

1) There is no dependency on php-mysql, which is intentional I understand.  But
I think it should be mentioned in README.Fedora so users don't have to work this
out themselves.

2) The apache rules use "Allow from localhost", but that seems to fail with the
   default hosts file that specifies localhost.localdomain as the canonical
hostname.  Using allow from 127.0.0.1 worked out better for me, and seems to be
what the other web app packages I have installed use.

3) mantis 1.0.8 has a bug that keeps the initial db creation from working.  See
http://www.mantisbt.org/bugs/view.php?id=8256 for a report and patch.  Can this
be get added to the Fedora package until a 1.0.9 release is made upstream?

4) SELinux generated an error when trying to send a password reminder:

    type=AVC msg=audit(1188186921.311:669): avc:  denied  { read } for  pid=3974
comm="sh" name="sendmail.postfix" dev=sda2 ino=216037
scontext=user_u:system_r:httpd_t:s0
tcontext=system_u:object_r:sendmail_exec_t:s0 tclass=file

I disabled SELinux before using the package much further, so I don't know if
there are other SELinux issues lurking.

I'll attach a patch that updates the devel branch with fixes for the first 3
issues.  I don't know enough about the SELinux issue(s) to try and fix them. 
These issues apply equally to the F-7 branch (and maybe FC-6, I didn't look).

I didn't make note of it, but there's also a place during the initial install
that instructs the user to edit the config file in /usr/share/mantis/.  Perhaps
that should be changed and/or a symlink placed there pointing to /etc/mantis?

Thanks for reading!

[1] https://www.redhat.com/archives/fedora-list/2007-August/msg03787.html

Comment 1 Todd Zullinger 2007-08-27 19:17:17 UTC
Created attachment 174221 [details]
Patch to fix some minor packaging issues and initial install bug

Comment 2 Gianluca Sforna 2007-08-28 20:34:41 UTC
(In reply to comment #0)
> Hi Gianluca,
> 
> I ran into a few minor issues while installing and configuring the mantis
> package (in repsponse to a thread on fedora-list[1]).

Thanks for taking the time for doing so... It seems that your fellow mantis
packager is not doing a good impression on the thread, but rest assured I
definitely want to improve the package (though I have to say _no thanks_ to
subscribing fedora-list...)

> 
> 1) There is no dependency on php-mysql, which is intentional I understand. 
> But
> I think it should be mentioned in README.Fedora so users don't have to work this
> out themselves.

Not sure if it was intentional (I picked up mantis when it was orphaned) but it
is probably because the user could eventually use another DBMS. I will add it to
README.Fedora


> 
> 2) The apache rules use "Allow from localhost", but that seems to fail with the
>    default hosts file that specifies localhost.localdomain as the canonical
> hostname.  Using allow from 127.0.0.1 worked out better for me, and seems to be
> what the other web app packages I have installed use.

I am not sure if that is prone to problems in IPv6 environments. However, it
will be wise to conform to what other web apps are doing

> 
> 3) mantis 1.0.8 has a bug that keeps the initial db creation from working.  See
> http://www.mantisbt.org/bugs/view.php?id=8256 for a report and patch.  Can this
> be get added to the Fedora package until a 1.0.9 release is made upstream?

I work with upstream and fixed that bug in a different way, as it turned out the
1.0.x branch had a patched ADODB so we could step into other issues if we move
to using the system one. I think 1.0.9 is not far away, but I can surely roll
out a patched version if that will be dalayed.

We will be able to use the packaged ADODB starting from the 1.1 release, though.

> 
> 4) SELinux generated an error when trying to send a password reminder:
> 
>     type=AVC msg=audit(1188186921.311:669): avc:  denied  { read } for  pid=3974
> comm="sh" name="sendmail.postfix" dev=sda2 ino=216037
> scontext=user_u:system_r:httpd_t:s0
> tcontext=system_u:object_r:sendmail_exec_t:s0 tclass=file
> 
> I disabled SELinux before using the package much further, so I don't know if
> there are other SELinux issues lurking.

Is this on F7 ?

>   I don't know enough about the SELinux issue(s) to try and fix them.

AFAIK, SELinux issues are to be reported in bugzilla against the targeted policy
package. The maintainer is pretty responsive and helpful.



> 
> I didn't make note of it, but there's also a place during the initial install
> that instructs the user to edit the config file in /usr/share/mantis/.  Perhaps
> that should be changed and/or a symlink placed there pointing to /etc/mantis?

It is already this way. I will try to find the string but users are supposed to
use the README.Fedora as an authoritative source for installation instructions.

Of course, since I'm not a native english speaker, I will cheerishly accept any
patch for the README.Fedora file :)



> Thanks for reading!

Thanks for reporting!





Comment 3 Todd Zullinger 2007-08-28 21:29:29 UTC
(In reply to comment #2)
> Not sure if it was intentional (I picked up mantis when it was orphaned) but 
> it is probably because the user could eventually use another DBMS. I will add
> it to README.Fedora

The changelog entry for 0.19.2-1 includes:

- removed dependency on php-mysql as it supports PostgreSQL also

Which makes sense.  So long as it's mentioned it should be alright.  Something
else the original poster on fedora-list mentioned is that the %description could
mention the README.Fedora.  The mailman package does this, for example:

Documentation can be found in: %{docdir}

When the package has finished installing, you will need to perform some
additional installation steps, these are described in:
%{docdir}/INSTALL.REDHAT

> I am not sure if that is prone to problems in IPv6 environments.

I have ipv6 disabled here, so I don't think it's that.  It is odd, and I'm not
sure if there's a bug in Apache or a problem with the default entry in /etc/hosts.

> However, it will be wise to conform to what other web apps are doing

One other advantage of using 127.0.0.1 is that it saves doing the DNS lookup.
 
> I work with upstream and fixed that bug in a different way, as it turned out the
> 1.0.x branch had a patched ADODB so we could step into other issues if we move
> to using the system one. I think 1.0.9 is not far away, but I can surely roll
> out a patched version if that will be dalayed.

Yeah, I say your posts in the bug tracker when I was looking into this.  It's
always nice to see a Fedora maintainer fixing things upstream. :)

> > 4) SELinux generated an error when trying to send a password reminder:
> > 
> >     type=AVC msg=audit(1188186921.311:669): avc:  denied  { read } for  pid=3974
> > comm="sh" name="sendmail.postfix" dev=sda2 ino=216037
> > scontext=user_u:system_r:httpd_t:s0
> > tcontext=system_u:object_r:sendmail_exec_t:s0 tclass=file
> > 
> > I disabled SELinux before using the package much further, so I don't know if
> > there are other SELinux issues lurking.
> 
> Is this on F7 ?

Yeah.

> 
> >   I don't know enough about the SELinux issue(s) to try and fix them.
> 
> AFAIK, SELinux issues are to be reported in bugzilla against the targeted policy
> package. The maintainer is pretty responsive and helpful.

I will try to make some time to run mantis in permissive mode and collect the
AVC denials for a proper report.  But as I don't use mantis myself, I may not
get to this too soon. :)

> It is already this way. I will try to find the string but users are supposed to
> use the README.Fedora as an authoritative source for installation instructions.

Okay, I did the initial setup again to find this.  On
https://localhost/mantis/admin/install.php, when the Install/Upgrade database
button is clicked, the resulting page (still install.php) says in the "Write
Configuration File(s)" section:

POSSIBLE PROBLEM
cannot write /usr/share/mantis/config_inc.php

and:

Please add the following lines to /usr/share/mantis/config_inc.php before
continuing to the database upgrade check:

I don't know if it's possible to allow mantis to write to the config file in
/etc/mantis (seems like a bad idea :).  Maybe it's better to just change the
code so it uses the correct location and still asks the user to add it manually?

> Of course, since I'm not a native english speaker, I will cheerishly accept any
> patch for the README.Fedora file :)

The file is alright to me.  There is one place that reads strangely, it may have
been a result of some copy and paste.  In section 3:

    and restart apache with:
      service httpd restart

    instead the needs to be edited in order to enable the execution of the
    installation script located in /usr/share/mantis/admin.

I'm not sure what the "instead the needs" is getting at, so I'm not sure how
best to change it.  It seems like the whole sentence could be removed.

Comment 4 Gianluca Sforna 2008-01-21 09:00:52 UTC
I just pushed a 1.1.1 update in all repos, where I believe all this issues are
fixed.

The only thing left to check/improve if the reporting from the install/upgrade
procedure, so that it gives informations relevant for the mantis package; for
instance, it should not attempt to write the config file, but just tell the user
to edit /etc/mantis/config_inc.php.

I'm not sure if it is worth leaving this open for just that: your thoughts
appreciated.

Comment 5 Todd Zullinger 2008-01-29 06:52:23 UTC
Hi Gianluca,

Thanks for the update.  Feel free to keep this open if you want to use it as a
reminder to look at the config file handling.  As far as I'm concerned, you can
close it now as the main issues that were reported are fixed up. :)

Comment 6 Bug Zapper 2008-05-14 03:09:08 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2009-06-09 22:47:22 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping