Skip to content

Commit

Permalink
MantisBT: Update to v2.26.3 (#6237)
Browse files Browse the repository at this point in the history
* Bump to v2.26.3
* Update service scripts
* Add resource workers and PHP profiles
* Patch installer webservice check
* Update changelog
  • Loading branch information
mreid-tt authored Oct 3, 2024
1 parent 46a9ac5 commit 64e6d54
Show file tree
Hide file tree
Showing 19 changed files with 942 additions and 249 deletions.
2 changes: 1 addition & 1 deletion cross/mantisbt/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = mantisbt
PKG_VERS = 1.2.19
PKG_VERS = 2.26.3
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://sourceforge.net/projects/$(PKG_NAME)/files/mantis-stable/$(PKG_VERS)
Expand Down
6 changes: 3 additions & 3 deletions cross/mantisbt/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mantisbt-1.2.19.tar.gz SHA1 8455d04d99ee1090e31e7e94e4881d16da9b4317
mantisbt-1.2.19.tar.gz SHA256 0814d2113de4a53498bb67fa531ca36dee821e5c22df150deb75dc918eed86de
mantisbt-1.2.19.tar.gz MD5 8377a0219ec344b9ab9c186012b5114f
mantisbt-2.26.3.tar.gz SHA1 c330020817774ef4eeb39d61b1c595dab39c6246
mantisbt-2.26.3.tar.gz SHA256 6f70c381b4c19c2153e83acdad280cff3662a45cf27df6009f576f2b5447f7ed
mantisbt-2.26.3.tar.gz MD5 47b1feeeb0ffb310c9cc76873a478612
21 changes: 21 additions & 0 deletions cross/mantisbt/patches/01-admin-install-check-webservice.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- admin/install.php.orig 2024-08-25 04:18:40
+++ admin/install.php 2024-09-25 21:53:15
@@ -478,7 +478,9 @@
Checking URL to installation
</td>
<?php
- $t_url_check = '';
+ $t_url_check = 'GOOD';
+ $t_hard_fail = false;
+/*
if( !$f_path ) {
# Empty URL - warn admin about security risk
$t_url_check = "Using an empty path is a security risk, as MantisBT "
@@ -503,6 +505,7 @@
}
$t_hard_fail = true;
}
+*/

print_test_result( $t_url_check ? BAD : GOOD, $t_hard_fail, $t_url_check );
?>
48 changes: 29 additions & 19 deletions spk/mantisbt/Makefile
Original file line number Diff line number Diff line change
@@ -1,42 +1,52 @@
SPK_NAME = mantisbt
SPK_VERS = 1.2.19
SPK_REV = 5
SPK_VERS = 2.26.3
SPK_REV = 6
SPK_ICON = src/mantisbt.png
DSM_UI_DIR = app

DEPENDS = cross/$(SPK_NAME)
# Pure PHP package, make sure ARCH is not defined
override ARCH=

# Due to not obvious WebStation handling requirements
REQUIRED_MIN_DSM = 6.0
SPK_DEPENDS = "WebStation:PHP7.4:MariaDB10:Apache2.4"

MAINTAINER = moneytoo
MAINTAINER = SynoCommunity
DESCRIPTION = Mantis is an easily deployable, web based bugtracker to aid product bug tracking. It requires PHP, MySQL and a web server. It is simpler than Bugzilla and easily editable.
DESCRIPTION_FRE = Mantis est un bugtracker web aisément déployable pour faciliter le suivi des bogues. Il nécessite PHP, MySQL et un serveur web. Il est plus simple d\'accès que Bugzilla et facilement modifiable.
ADMIN_URL = /mantisbt
DISPLAY_NAME = MantisBT
CHANGELOG = Fix issue where new installs on DSM6 did not work
CHANGELOG = "1. Update to v2.26.3.<br/>2. Add PHP profiles for DSM 6.<br/>3. Add backup and restore functions."

HOMEPAGE = https://www.mantisbt.org
LICENSE = GPL

STARTABLE = no
SERVICE_USER = auto
SERVICE_SETUP = src/service-setup.sh

ADMIN_URL = /mantisbt

WIZARDS_DIR = src/wizard/
CONF_DIR = src/conf/
SYSTEM_GROUP = http

INSTALLER_SCRIPT = src/installer.sh
SSS_SCRIPT = src/dsm-control.sh
DSM_UI_DIR = app
DSM_UI_CONFIG = src/app/config
CONF_DIR = src/conf/

INSTALL_DEP_SERVICES = apache-web mysql
START_DEP_SERVICES = apache-web mysql
INSTUNINST_RESTART_SERVICES = apache-web
include ../../mk/spksrc.common.mk

INSTALL_PREFIX = /usr/local/$(SPK_NAME)
# Alternate conf dir for DSM 6
ifeq ($(call version_lt, ${TCVERSION}, 7.0),1)
CONF_DIR = src/conf_6/
endif

POST_STRIP_TARGET = mantisbt_extra_install

# Pure PHP package, make sure ARCH is not defined
override ARCH=

include ../../mk/spksrc.spk.mk

.PHONY: mantisbt_extra_install
mantisbt_extra_install:
install -m 755 -d $(STAGING_DIR)/app
install -m 644 src/app/config $(STAGING_DIR)/app/config
install -m 644 src/config_inc.php $(STAGING_DIR)/share/$(SPK_NAME)/config_inc.php
install -m 755 -d $(STAGING_DIR)/web
install -m 644 src/web/config_inc.php $(STAGING_DIR)/web/config_inc.php
install -m 644 src/web/mantisbt.conf $(STAGING_DIR)/web/mantisbt.conf
install -m 644 src/web/mantisbt.json $(STAGING_DIR)/web/mantisbt.json
2 changes: 0 additions & 2 deletions spk/mantisbt/src/conf/PKG_DEPS

This file was deleted.

66 changes: 66 additions & 0 deletions spk/mantisbt/src/conf/resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"mariadb10-db": {
"admin-account-m10": "root",
"admin-pw-m10": "{{wizard_mysql_password_root}}",
"create-db": {
"db-collision": "skip",
"db-name": "mantisbt",
"flag": "{{wizard_create_db}}"
},
"drop-db-uninst": true,
"drop-user-uninst": true,
"grant-user": {
"db-name": "mantisbt",
"flag": "{{mysql_grant_user}}",
"host": "localhost",
"user-name": "mantisbt",
"user-pw": "{{wizard_mysql_password_mantisbt}}"
}
},
"webservice": {
"pkg_dir_prepare": [
{
"group": "http",
"mode": "0755",
"source": "/var/packages/mantisbt/target/share/mantisbt",
"target": "mantisbt",
"user": "sc-mantisbt"
}
],
"portals": [
{
"alias": "mantisbt",
"app": "com.synocommunity.packages.mantisbt",
"name": "MantisBT",
"service": "mantisbt",
"type": "alias"
}
],
"services": [
{
"backend": 2,
"display_name": "MantisBT",
"icon": "app/images/mantisbt-{0}.png",
"php": {
"backend": 8,
"extensions": [
"curl",
"gd",
"ldap",
"mysqli",
"pdo_mysql",
"soap",
"zlib"
],
"group": "http",
"profile_desc": "PHP Profile for mantisbt",
"profile_name": "mantisbt Profile",
"user": "sc-mantisbt"
},
"root": "mantisbt",
"service": "mantisbt",
"type": "apache_php"
}
]
}
}
7 changes: 7 additions & 0 deletions spk/mantisbt/src/conf_6/privilege
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"defaults": {
"run-as": "root"
},
"username": "sc-mantisbt",
"join-groupname": "http"
}
20 changes: 20 additions & 0 deletions spk/mantisbt/src/conf_6/resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"mariadb10-db": {
"admin-account-m10": "root",
"admin-pw-m10": "{{wizard_mysql_password_root}}",
"create-db": {
"db-collision": "skip",
"db-name": "mantisbt",
"flag": "{{wizard_create_db}}"
},
"drop-db-uninst": true,
"drop-user-uninst": true,
"grant-user": {
"db-name": "mantisbt",
"flag": "{{mysql_grant_user}}",
"host": "localhost",
"user-name": "mantisbt",
"user-pw": "{{wizard_mysql_password_mantisbt}}"
}
}
}
24 changes: 0 additions & 24 deletions spk/mantisbt/src/dsm-control.sh

This file was deleted.

149 changes: 0 additions & 149 deletions spk/mantisbt/src/installer.sh

This file was deleted.

Loading

0 comments on commit 64e6d54

Please sign in to comment.