summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Gathoye2018-04-22 16:17:53 +0200
committerWilliam Gathoye2018-04-22 20:11:44 +0200
commit5af2dcc12742501f3b5d1880f8ce86a65ef45c02 (patch)
treed0594b0e5fe59b6390a928215a0744a2dc362d52
parent4c2153fc922800206e1152b2837eaf230041e606 (diff)
downloadaur-5af2dcc12742501f3b5d1880f8ce86a65ef45c02.tar.gz
Upgrade to 4.9.0
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD66
-rw-r--r--mattermost-server-makefile.patch13
3 files changed, 46 insertions, 48 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d307747ead0a..c5055a24b98e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,6 @@
-# Generated by mksrcinfo v8
-# Sat Feb 24 08:21:24 UTC 2018
pkgbase = mattermost
pkgdesc = Open source Slack-alternative in Golang and React
- pkgver = 4.7.2
+ pkgver = 4.9.0
pkgrel = 1
url = https://mattermost.com
arch = i686
@@ -19,25 +17,22 @@ pkgbase = mattermost
makedepends = npm
makedepends = python2
makedepends = yarn
- makedepends = mozjpeg
optdepends = mariadb: SQL server storage
optdepends = percona-server: SQL server storage
optdepends = postgresql: SQL server storage
backup = etc/webapps/mattermost/config.json
- source = mattermost-server-4.7.2.tar.gz::https://github.com/mattermost/mattermost-server/archive/v4.7.2.tar.gz
- source = mattermost-webapp-4.7.2.tar.gz::https://github.com/mattermost/mattermost-webapp/archive/v4.7.2.tar.gz
+ source = mattermost-server-4.9.0.tar.gz::https://github.com/mattermost/mattermost-server/archive/v4.9.0.tar.gz
+ source = mattermost-webapp-4.9.0.tar.gz::https://github.com/mattermost/mattermost-webapp/archive/v4.9.0.tar.gz
source = mattermost.service
source = mattermost.sh
source = mattermost.sysusers
source = mattermost.tmpfiles
- source = mattermost-server-makefile.patch
- sha512sums = b4a5ef67fa8cf7cea48e7003f216b1bcff0988d2b79b17d00f762f4c7b834c245875e5d3a59ab28fea92459e6aa4dfd477d6e3c0030ebd87b1b5d0cf12ac27be
- sha512sums = fedbbdfff0ec30e500dfc57c66f7f8f98c0aa266593577ea7dd7a9c6aa0eb45b05e17eb039f22a68350fe4bdf3ee44ec3b532ad01758bd1d63ba77443925c3bc
+ sha512sums = fcdfb62195e8f8ebd184b44ba66d28f0df540a3d9cf783301696a9fda846616d0f4cdaa2525f184145bad46287a78a4794b06c3bca7c774880b4223ca7c01623
+ sha512sums = 990080d708bfc09792041c4de7162144a2ba036dac4748248c62e7f088a4c8572cb4a139033cf97f6a34f451b9be79af2a1ea3759f77377d11874db7a27de019
sha512sums = 3e3d46dc7778be256da9a366ec96cde684fcb07732d0adfd40ea00d6ec61a161a9d7e784f7773d34e4f058e6919b13053ac228255a05f175e7ce20538f07ec93
sha512sums = 5fe6c343e9739b12f8ea9390dafd729fa9f980978bbc0fa7eb6a2eb2d437929078d3efede23c28a6b399c407b8b5e92755169a468462088de0eb148b360acc4b
sha512sums = f08d88fd91e91c8b9996cf33699f4a70d69c8c01783cf7add4781ee3c9c6596839e44c5c39f0ff39a836c6d87544eef179f51de0b037ec7f91f86bac8e24d7cc
sha512sums = e3ffcf4b86e2ecc7166c1abf92cd4de23d81bad405db0121e513a8d81fea05eec9dd508141b14b208c4c13fbc347c56f01ed91326faa01e872ecdedcc18718f9
- sha512sums = 230bd3eb4307bcbbec48f2e24e2d07bf490bea65c0e95b2453ad3cd42bd53bbce8e6651886946db4635122307a8b64664e01ad3dd3eb35ecd5a8a0823ad077b9
pkgname = mattermost
diff --git a/PKGBUILD b/PKGBUILD
index a9a9f11bda59..93a5d56290e7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,18 +3,19 @@
# Contributor: Massimiliano Torromeo <massimiliano dot torromeo at gmail dot com>
pkgname=mattermost
-pkgver=4.7.2
+pkgver=4.9.0
pkgrel=1
pkgdesc='Open source Slack-alternative in Golang and React'
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
url='https://mattermost.com'
license=('AGPL' 'Apache')
-makedepends=('git' 'go' 'libpng12' 'npm' 'python2' 'yarn')
# python2 is required by the node module node-gyp.
-# mozjpeg isn't needed on amd64, but the version brought with node_modules
-# (mozjpeg implementation) does not run on an architecture other than amd64.
-# The one provided with Arch Linux does.
+makedepends=('git' 'go' 'libpng12' 'npm' 'python2' 'yarn')
+# mozjpeg provided on npm is only available for amd64. We need to install
+# mozjpeg from Arch Linux repos for other CPU architectures. cjpeg (nor
+# jpegtran) from the package libjpeg-turbo doesn't work because it doesn't
+# support jpg files as input, cjpeg from mozjpeg does.
if [ "$CARCH" != 'x86_64' ]; then
makedepends+=('mozjpeg')
fi
@@ -31,15 +32,15 @@ source=(
"${pkgname}.sh"
"${pkgname}.sysusers"
"${pkgname}.tmpfiles"
- "${pkgname}-server-makefile.patch"
)
-sha512sums=('b4a5ef67fa8cf7cea48e7003f216b1bcff0988d2b79b17d00f762f4c7b834c245875e5d3a59ab28fea92459e6aa4dfd477d6e3c0030ebd87b1b5d0cf12ac27be'
- 'fedbbdfff0ec30e500dfc57c66f7f8f98c0aa266593577ea7dd7a9c6aa0eb45b05e17eb039f22a68350fe4bdf3ee44ec3b532ad01758bd1d63ba77443925c3bc'
- '3e3d46dc7778be256da9a366ec96cde684fcb07732d0adfd40ea00d6ec61a161a9d7e784f7773d34e4f058e6919b13053ac228255a05f175e7ce20538f07ec93'
- '5fe6c343e9739b12f8ea9390dafd729fa9f980978bbc0fa7eb6a2eb2d437929078d3efede23c28a6b399c407b8b5e92755169a468462088de0eb148b360acc4b'
- 'f08d88fd91e91c8b9996cf33699f4a70d69c8c01783cf7add4781ee3c9c6596839e44c5c39f0ff39a836c6d87544eef179f51de0b037ec7f91f86bac8e24d7cc'
- 'e3ffcf4b86e2ecc7166c1abf92cd4de23d81bad405db0121e513a8d81fea05eec9dd508141b14b208c4c13fbc347c56f01ed91326faa01e872ecdedcc18718f9'
- '230bd3eb4307bcbbec48f2e24e2d07bf490bea65c0e95b2453ad3cd42bd53bbce8e6651886946db4635122307a8b64664e01ad3dd3eb35ecd5a8a0823ad077b9')
+sha512sums=(
+ 'fcdfb62195e8f8ebd184b44ba66d28f0df540a3d9cf783301696a9fda846616d0f4cdaa2525f184145bad46287a78a4794b06c3bca7c774880b4223ca7c01623'
+ '990080d708bfc09792041c4de7162144a2ba036dac4748248c62e7f088a4c8572cb4a139033cf97f6a34f451b9be79af2a1ea3759f77377d11874db7a27de019'
+ '3e3d46dc7778be256da9a366ec96cde684fcb07732d0adfd40ea00d6ec61a161a9d7e784f7773d34e4f058e6919b13053ac228255a05f175e7ce20538f07ec93'
+ '5fe6c343e9739b12f8ea9390dafd729fa9f980978bbc0fa7eb6a2eb2d437929078d3efede23c28a6b399c407b8b5e92755169a468462088de0eb148b360acc4b'
+ 'f08d88fd91e91c8b9996cf33699f4a70d69c8c01783cf7add4781ee3c9c6596839e44c5c39f0ff39a836c6d87544eef179f51de0b037ec7f91f86bac8e24d7cc'
+ 'e3ffcf4b86e2ecc7166c1abf92cd4de23d81bad405db0121e513a8d81fea05eec9dd508141b14b208c4c13fbc347c56f01ed91326faa01e872ecdedcc18718f9'
+)
prepare() {
# cp cannot copy from a symbolic link to the destination link itself
@@ -68,19 +69,10 @@ prepare() {
ln -s "${srcdir}"/${pkgname}-webapp ${pkgname}-webapp
cd ${pkgname}-server
- # Apply patch to fix upstream blunder
- patch -p0 -i ${srcdir}/${pkgname}-server-makefile.patch
-
# We are not using docker, no need to stop it.
sed -r -i Makefile \
-e 's/^clean: stop-docker/clean:/'
- # Enforce build hash to Arch Linux (Enterprise hash is already set to
- # none), instead of the official git hash value.
- sed -r -i Makefile \
- -e "s/^(\s*)BUILD_HASH(_ENTERPRISE)? =.*/\1BUILD_HASH\2 = Arch Linux \(${CARCH}\)/" \
- -e 's/-X (.*)(\$\(BUILD_HASH(_ENTERPRISE)?\))(.*)/-X '\''\1\2'\''\4/'
-
# The configuration isn't available at this time yet, modify the default.
sed -r -i build/release.mk \
-e 's/\$\(DIST_PATH\)\/config\/config.json/\$\(DIST_PATH\)\/config\/default.json/'
@@ -91,15 +83,15 @@ prepare() {
case "${CARCH}" in
i686)
sed -r -i build/release.mk \
- -e "5,6s/amd64/386/"
+ -e "5,7s/amd64/386/"
;;
arm*64*|*arch*64*)
sed -r -i build/release.mk \
- -e "5,6s/amd64/arm64/"
+ -e "5,7s/amd64/arm64/"
;;
arm*)
sed -r -i build/release.mk \
- -e "5,6s/amd64/arm/"
+ -e "5,7s/amd64/arm/"
;;
esac
@@ -107,6 +99,29 @@ prepare() {
# with that statement to the end of file (we do not care of the additional
# file copy, nor the tar compression defined below the file).
sed '/# ----- PLATFORM SPECIFIC -----/,//d' -i ./build/release.mk
+
+ # Enforce build hash to Arch Linux (Enterprise hash is already set to
+ # none), instead of the official git hash value.
+ sed -r -i Makefile \
+ -e "s/^(\s*)BUILD_HASH(_ENTERPRISE)? =.*/\1BUILD_HASH\2 = ${pkgver}-${pkgrel} Arch Linux \(${CARCH}\)/" \
+ -e 's/-X (.*)(\$\(BUILD_HASH(_ENTERPRISE)?\))(.*)/-X '\''\1\2'\''\4/'
+ cd "${srcdir}/${pkgname}-webapp"
+ sed -r -i webpack.config.js \
+ -e "s/^(\s*)COMMIT_HASH:(.*),$/\1COMMIT_HASH: JSON.stringify\(\"${pkgver}-${pkgrel} Arch Linux \(${CARCH}\)\"\),/"
+
+ # FIXME: Add info to the logs in order to debug plugin sandbox. Not working
+ # since nested namespaces haven't the right to write to the parent's logs.
+ # Using network IPC could help. src.: https://stackoverflow.com/a/35968850
+# cd "${srcdir}/${pkgname}-server"
+# sed -i plugin/rpcplugin/sandbox/sandbox_linux.go -e "s/import (/import (\\n\\tl4g \"github.com\/alecthomas\/log4go\"/"
+# sed -i plugin/rpcplugin/sandbox/sandbox_linux.go -re "s/(\t*)return errors.Wrap(|f)\((.*), (.*)\)/\1l4g.Error\(\"Arch Linux debug: \" \+ \\4 \+ \": \" \+ \3.Error()\\)\\n\0/"
+ # Using dichotomic removal instead
+ # src.: https://nixtricks.wordpress.com/2013/01/09/sed-delete-the-lines-lying-in-between-two-patterns/
+# sed -i Makefile \
+# -e '/PATTERN-1/,/PATTERN-2/d'
+
+ # FIXME: Plugins cannot be enabled on non x86_64 architectures for now. Still
+ # debugging. Waiting for answer from upstream.
}
build() {
@@ -135,6 +150,7 @@ package() {
cp -a dist/${pkgname} "${pkgdir}"/usr/share/webapps/
cd "${pkgdir}"/usr/share/webapps/${pkgname}
+ install -dm755 client/plugins
rm -rf logs
ln -s /var/log/${pkgname} logs
diff --git a/mattermost-server-makefile.patch b/mattermost-server-makefile.patch
deleted file mode 100644
index 98e8cb764dd9..000000000000
--- a/mattermost-server-makefile.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git Makefile~ Makefile
-index ca8fafd..af07d15 100644
---- Makefile~
-+++ Makefile
-@@ -477,7 +477,7 @@ clean: stop-docker ## Clean up everything except persistant server data.
-
- cd $(BUILD_WEBAPP_DIR) && $(MAKE) clean
-
-- find . -type d -name data -not -path './vendor/*' | xargs rm -r
-+ find . -type d -name data -not -path './vendor/*' | xargs rm -rf
- rm -rf logs
-
- rm -f mattermost.log