summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge2019-06-15 00:22:39 +0200
committerDavid Runge2019-06-15 00:22:39 +0200
commit74692c1233eaf2aff2771970269ea951c0d7b3f6 (patch)
treebafe7cb5083d30b64ec2e993adf34dfa55bc0b09
parente7d2d0ef14f171a269e8a0bbe20815981052accd (diff)
downloadaur-74692c1233eaf2aff2771970269ea951c0d7b3f6.tar.gz
PKGBUILD: Upgrading to 2.21.1. Adding sysusers and uwsgi integration. Removing useless optdepends (web servers).
mantisbt.tmpfiles: Adding /run/mantisbt, owned by user/group mantisbt. mantisbt.install: Updating informational printout about requiring separate user. mantisbt.uwsgi: Adding uWSGI integration. mantisbt.sysusers: Adding separate user/group mantisbt.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD30
-rw-r--r--mantisbt.install20
-rw-r--r--mantisbt.sysusers1
-rw-r--r--mantisbt.tmpfiles2
-rw-r--r--mantisbt.uwsgi33
-rw-r--r--tmpfiles.conf1
7 files changed, 80 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0d6cb6783590..baa91e6a7d88 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,13 @@
pkgbase = mantisbt
pkgdesc = Web-based issue tracking system
- pkgver = 2.21.0
+ pkgver = 2.21.1
pkgrel = 1
url = https://www.mantisbt.org/
install = mantisbt.install
arch = any
license = GPL2
depends = php
- optdepends = apache: run in webserver
optdepends = curl: interface Twitter
- optdepends = lighttpd: run in webserver
optdepends = mariadb: use local MySQL server
optdepends = php-fpm: run in fastCGI process manager
optdepends = php-gd: generate captcha
@@ -21,10 +19,14 @@ pkgbase = mantisbt
backup = etc/webapps/mantisbt/custom_relationships_inc.php
backup = etc/webapps/mantisbt/custom_functions_inc.php
backup = etc/webapps/mantisbt/custom_constants_inc.php
- source = https://downloads.sourceforge.net/project/mantisbt/mantis-stable/2.21.0/mantisbt-2.21.0.tar.gz
- source = tmpfiles.conf
- sha512sums = c93044cb49f1ed5cc7abd91b16cef3ead4844c0b869026db174372268c002b6ba3a3e79ccb723be569665740063071fe92165f0fc0286a5cdabdf84be0ab1486
- sha512sums = e0c3fc92a3a61f86f780e5e30ccefe751ef0f16727a44006f8c7dae53951abaa0b8c6e0dc3e807668e0fe78252296996a6123cc5d5bf8427055ae07efe3bd37e
+ source = https://downloads.sourceforge.net/project/mantisbt/mantis-stable/2.21.1/mantisbt-2.21.1.tar.gz
+ source = mantisbt.sysusers
+ source = mantisbt.tmpfiles
+ source = mantisbt.uwsgi
+ sha512sums = cc7f9c46a55753e08ddde6c351139f6c8f77fd23e35ffc2668fbe393d80054138442d6db3cfde1087ee52ce1a4441661aaa1f3acdd1ea1d718b31a6b86144bf8
+ sha512sums = 3fd4e7faad7774892abfd20006ae3efcd7b0ba315447da9cea8d7352d5fd1e7f0c558d3855ad4e667a0bfe6ae0d95d12c848a78d53312521a7f551f2edca723e
+ sha512sums = b1b9145d1ba423055d5e45734a9d74c639b75ae5b5d580024b50626332a74830dd39b976de590549ff1c47c400ba4e1c20b27b69fb140f7d8527d8d281d0c7bd
+ sha512sums = 1b36d8956986360306eb15a9279c54eba46e74dfe0623dc26b3be3e8f409ab4f0afe6b34a9001cbeb9f33452fec5ccc8089a53352fa885894cc262ca9c12bc39
pkgname = mantisbt
diff --git a/PKGBUILD b/PKGBUILD
index a9a087d7f2d2..52746f92406a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,16 +6,14 @@
# Contributor: Angel 'angvp' Velasquez <angvp@archlinux.com.ve>
pkgname=mantisbt
-pkgver=2.21.0
+pkgver=2.21.1
pkgrel=1
pkgdesc='Web-based issue tracking system'
arch=('any')
url='https://www.mantisbt.org/'
license=('GPL2')
depends=('php')
-optdepends=('apache: run in webserver'
- 'curl: interface Twitter'
- 'lighttpd: run in webserver'
+optdepends=('curl: interface Twitter'
'mariadb: use local MySQL server'
'php-fpm: run in fastCGI process manager'
'php-gd: generate captcha'
@@ -26,12 +24,15 @@ backup=('etc/webapps/mantisbt/config_inc.php'
'etc/webapps/mantisbt/custom_strings_inc.php'
'etc/webapps/mantisbt/custom_relationships_inc.php'
'etc/webapps/mantisbt/custom_functions_inc.php'
- 'etc/webapps/mantisbt/custom_constants_inc.php'
-)
+ 'etc/webapps/mantisbt/custom_constants_inc.php')
source=("https://downloads.sourceforge.net/project/${pkgname}/mantis-stable/${pkgver}/${pkgname}-${pkgver}.tar.gz"
- 'tmpfiles.conf')
-sha512sums=('c93044cb49f1ed5cc7abd91b16cef3ead4844c0b869026db174372268c002b6ba3a3e79ccb723be569665740063071fe92165f0fc0286a5cdabdf84be0ab1486'
- 'e0c3fc92a3a61f86f780e5e30ccefe751ef0f16727a44006f8c7dae53951abaa0b8c6e0dc3e807668e0fe78252296996a6123cc5d5bf8427055ae07efe3bd37e')
+ "${pkgname}.sysusers"
+ "${pkgname}.tmpfiles"
+ "${pkgname}.uwsgi")
+sha512sums=('cc7f9c46a55753e08ddde6c351139f6c8f77fd23e35ffc2668fbe393d80054138442d6db3cfde1087ee52ce1a4441661aaa1f3acdd1ea1d718b31a6b86144bf8'
+ '3fd4e7faad7774892abfd20006ae3efcd7b0ba315447da9cea8d7352d5fd1e7f0c558d3855ad4e667a0bfe6ae0d95d12c848a78d53312521a7f551f2edca723e'
+ 'b1b9145d1ba423055d5e45734a9d74c639b75ae5b5d580024b50626332a74830dd39b976de590549ff1c47c400ba4e1c20b27b69fb140f7d8527d8d281d0c7bd'
+ '1b36d8956986360306eb15a9279c54eba46e74dfe0623dc26b3be3e8f409ab4f0afe6b34a9001cbeb9f33452fec5ccc8089a53352fa885894cc262ca9c12bc39')
install="${pkgname}.install"
prepare() {
@@ -61,8 +62,15 @@ package() {
done
# readme
install -vDm 644 readme.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
- # tmpfiles.d integration
- install -vDm 644 ../tmpfiles.conf "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+ # tmpfiles.d
+ install -vDm 644 "../${pkgname}.tmpfiles" \
+ "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+ # sysusers.d
+ install -vDm 644 "../${pkgname}.sysusers" \
+ "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+ # uWSGI
+ install -vDm 644 "../${pkgname}.uwsgi" \
+ "${pkgdir}/etc/uwsgi/${pkgname}.ini"
}
# vim: ts=2 sw=2 et:
diff --git a/mantisbt.install b/mantisbt.install
index 8bb71b3c5dc8..9d725412cd4b 100644
--- a/mantisbt.install
+++ b/mantisbt.install
@@ -1,12 +1,24 @@
pre_upgrade() {
cd /usr/share/webapps/mantisbt
- cp mantis_offline.php.sample mantis_offline.php
+ ln -sv mantis_offline.php.sample mantis_offline.php
}
post_upgrade() {
- echo "Please follow the steps from 2.5.2 onwards at: https://mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.install.upgrade"
- echo "After upgrading, bring MantisBT back to normal operation mode by deleting mantis_offline.php as follows:"
- echo "rm /usr/share/webapps/mantisbt/mantis_offline.php"
+ local new_package_version="$1"
+ local old_package_version="$2"
+ if [ "$(vercmp "${old_package_version}" "2.22.1")" -le 0 ]; then
+cat <<EOF
+The webapp now needs to be run as its own user/group: mantisbt/mantisbt.
+EOF
+ fi
+
+ if [ "$(vercmp "${new_package_version}" "2.5.2")" -ge 0 ]; then
+cat <<EOF
+Follow the upgrade steps:
+https://mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.install.upgrade
+Afterwards, remove /usr/share/webapps/mantisbt/mantis_offline.php.
+EOF
+ fi
}
# vim: ts=2 sw=2 et:
diff --git a/mantisbt.sysusers b/mantisbt.sysusers
new file mode 100644
index 000000000000..be11c4cc30ce
--- /dev/null
+++ b/mantisbt.sysusers
@@ -0,0 +1 @@
+u mantisbt - "MantisBT user" -
diff --git a/mantisbt.tmpfiles b/mantisbt.tmpfiles
new file mode 100644
index 000000000000..3ea38f0cec6c
--- /dev/null
+++ b/mantisbt.tmpfiles
@@ -0,0 +1,2 @@
+z /etc/webapps/mantisbt/config_inc.php 0640 root mantisbt
+d %t/mantisbt - mantisbt mantisbt
diff --git a/mantisbt.uwsgi b/mantisbt.uwsgi
new file mode 100644
index 000000000000..fb6f31f54151
--- /dev/null
+++ b/mantisbt.uwsgi
@@ -0,0 +1,33 @@
+[uwsgi]
+procname-master = mantisbt
+plugins = php
+master = true
+socket = /run/%n/%n.sock
+stats = /run/%n/%n-stats.sock
+uid = mantisbt
+gid = mantisbt
+processes = 10
+cheaper = 2
+cheaper-step = 1
+idle = 600
+die-on-idle = true
+touch-reload = %p
+
+php-allowed-ext = .php
+php-docroot = /usr/share/webapps/mantisbt
+php-index = index.php
+php-set = date.timezone=Europe/Berlin
+php-set = open_basedir=/tmp/:/usr/share/fonts/TTF:/usr/share/webapps/mantisbt:/usr/share/webapps/mantisbt/core:/etc/webapps/mantisbt
+php-set = session.save_path=/tmp
+php-set = session.gc_maxlifetime 21600
+php-set = session.gc_divisor 500
+php-set = session.gc_probability 1
+php-set = post_max_size=64M
+php-set = upload_max_filesize=64M
+php-set = always_populate_raw_post_data=-1
+
+php-set = extension=curl
+php-set = extension=gd
+php-set = extension=intl
+php-set = extension=mysqli
+php-set = extension=pdo_mysql
diff --git a/tmpfiles.conf b/tmpfiles.conf
deleted file mode 100644
index 9c31f94df4f1..000000000000
--- a/tmpfiles.conf
+++ /dev/null
@@ -1 +0,0 @@
-z /etc/webapps/mantisbt/config_inc.php 640 http http