Bug 202865 - [patch] databases/mantis - add missing dependency; fix wrong dependency
Summary: [patch] databases/mantis - add missing dependency; fix wrong dependency
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dan Langille
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-09-03 08:50 UTC by Torsten Zühlsdorff
Modified: 2015-12-27 02:30 UTC (History)
0 users

See Also:


Attachments
patch to add dependency and options (900 bytes, patch)
2015-09-03 08:50 UTC, Torsten Zühlsdorff
no flags Details | Diff
add xml dependency, add pgsql/mysql option, fix plist (1.13 KB, patch)
2015-11-17 21:45 UTC, Torsten Zühlsdorff
ports: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Zühlsdorff 2015-09-03 08:50:52 UTC
Created attachment 160666 [details]
patch to add dependency and options

Hello,

while installing mantis from ports, i figured out, that the php-xml extension is missing in the dependency list. Mantis uses the PHP function utf8_decode(), which is located in this extension.

I also noted, that the Makefile stated "USES= pgsql". This is not completely wrong, but 2 points against it:
- Mantis is written for MySQL and disadvise usage of other databases
- it misses the needed extension php-pgsql to use it

Therefore i removed this line and add two options: MYSQL and PGSQL. MySQL ist default as the project request it. Its a multi-option because you can switch later. Selecting an option adds the database client and the needed php-extension.

Also i removed an unnecessary blank line.

And i removed PORTREVISION= 0 because portlint told me. I'm not sure in this point.

Greetings,
Torsten
Comment 1 Torsten Zühlsdorff 2015-11-17 20:09:17 UTC
Dan,

while working on the security issue this is a great possibility to have a look at this PR too :)
Comment 2 Dan Langille freebsd_committer freebsd_triage 2015-11-17 21:34:02 UTC
(In reply to Torsten Zühlsdorff from comment #0)
We disagree on this point "Mantis is written for MySQL and disadvise usage of other databases.  They recommend MySQL, as noted at https://www.mantisbt.org/docs/master-1.2.x/en/administration_guide.html#ADMIN.INSTALL.REQUIREMENTS.SOFTWARE

As such, I would prefer changing your patch from "PostgreSQL support (disadvised)" to "PostgreSQL support"
Comment 3 Torsten Zühlsdorff 2015-11-17 21:45:25 UTC
Created attachment 163263 [details]
add xml dependency, add pgsql/mysql option, fix plist

Fair point, i'm fine with this.

Attached an updated patch with renamed option.

Also i fixed a plist issue mentioned by portlint.
Comment 4 Dan Langille freebsd_committer freebsd_triage 2015-11-17 22:31:02 UTC
See https://reviews.freebsd.org/D4196

Seems those permissions are too permissive.
Comment 5 Dan Langille freebsd_committer freebsd_triage 2015-11-17 22:49:24 UTC
I will work on this soon.
Comment 6 Torsten Zühlsdorff 2015-12-03 10:25:53 UTC
> I will work on this soon.

Since this is 2 weeks ago: do you need help, Dan?
Comment 7 Dan Langille freebsd_committer freebsd_triage 2015-12-05 23:14:42 UTC
(In reply to Torsten Zühlsdorff from comment #6)
Yes, please.
Comment 8 Torsten Zühlsdorff 2015-12-14 15:56:34 UTC
Hello Dan,

i think it should be sufficient to just remove these lines from pkg-files:
@owner %%WWWOWN%%
@group %%WWWGRP%%

At least the rights are just needed, if files needed to be modified by the application itself. There is just the config-file, but it is not created with installation and must be created manually.
There could be the need for a writable upload dir, but i could not find its location. Currently it seems it must be created manually. 

Could you check, if this works?
Comment 9 commit-hook freebsd_committer freebsd_triage 2015-12-23 21:21:25 UTC
A commit references this bug:

Author: dvl
Date: Wed Dec 23 21:20:51 UTC 2015
New revision: 404324
URL: https://svnweb.freebsd.org/changeset/ports/404324

Log:
  patch with security fix for CVE-2015-5059

  Submitted by: Torsten Zuhlsdorff & Jason Unovitch
  PR: 201106 202865
  Approved by: mat (mentor)
  Differential Review: D4196

Changes:
  head/databases/mantis/Makefile
  head/databases/mantis/files/patch-config__defaults__inc.php
Comment 10 Dan Langille freebsd_committer freebsd_triage 2015-12-23 21:42:42 UTC
Thank you.
Comment 11 commit-hook freebsd_committer freebsd_triage 2015-12-27 02:30:53 UTC
A commit references this bug:

Author: dvl
Date: Sun Dec 27 02:30:13 UTC 2015
New revision: 404544
URL: https://svnweb.freebsd.org/changeset/ports/404544

Log:
  MFH: r404324

  patch with security fix for CVE-2015-5059

  Submitted by: Torsten Zuhlsdorff & Jason Unovitch
  PR: 201106 202865
  Approved by: mat (mentor)
  Differential Review: D4196
  Approved by: ports-secteam

Changes:
_U  branches/2015Q4/
  branches/2015Q4/databases/mantis/Makefile
  branches/2015Q4/databases/mantis/files/patch-config__defaults__inc.php