summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD10
-rw-r--r--mattermost-ldflags.patch11
3 files changed, 23 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6b9f635463c..dfd4a6b4097 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = mattermost-git
pkgdesc = Open source Slack-alternative in Golang and React
- pkgver = 5.1.0.r37.gf2c180390
+ pkgver = 5.1.0.r358.g7a758eae7
pkgrel = 1
url = https://mattermost.com
arch = i686
@@ -12,7 +12,7 @@ pkgbase = mattermost-git
license = AGPL
license = Apache
makedepends = git
- makedepends = go
+ makedepends = go-pie
makedepends = libpng12
makedepends = npm
optdepends = mariadb: SQL server storage
@@ -23,11 +23,13 @@ pkgbase = mattermost-git
backup = etc/webapps/mattermost/config.json
source = git+https://github.com/mattermost/mattermost-server
source = git+https://github.com/mattermost/mattermost-webapp
+ source = mattermost-ldflags.patch
source = mattermost.service
source = mattermost.sysusers
source = mattermost.tmpfiles
sha512sums = SKIP
sha512sums = SKIP
+ sha512sums = ac952eae873aa09ba7bdf1e7abc618f0dc6982fa85df298261ab71ccf71f66c95846dade400e05d731f2c5ee2c6f4332d6f78d737026c9f098f1e03f419bee00
sha512sums = cd02b3da86869117554c3c53a657a4b46989ea533b7b47c24fb642ffbd182ce6ecfb16a8ddde3af4d5e8cff0ab41a932753129662e126994e1ad5912545e6eb4
sha512sums = b95bf2c0d840d0e85baebc1051c872056fa4990d263334fecc7b11d96085cb65a69dd866f18889e209336028f17c02152c13a92d2be1c21848939f22203439f0
sha512sums = e3ffcf4b86e2ecc7166c1abf92cd4de23d81bad405db0121e513a8d81fea05eec9dd508141b14b208c4c13fbc347c56f01ed91326faa01e872ecdedcc18718f9
diff --git a/PKGBUILD b/PKGBUILD
index 401b3b5b865..d6623b0a4b2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,14 @@
pkgname=mattermost-git
_pkgname="${pkgname%-git}"
-pkgver=5.1.0.r37.gf2c180390
+pkgver=5.1.0.r358.g7a758eae7
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')
+makedepends=('git' 'go-pie' 'libpng12' 'npm')
# Experiencing issues with gifsicle. Using system tool instead.
if [ "$CARCH" != 'x86_64' ]; then
makedepends+=('gifsicle')
@@ -32,12 +32,14 @@ source=(
# https://wiki.archlinux.org/index.php/VCS_package_guidelines#VCS_sources
"git+https://github.com/${_pkgname}/${_pkgname}-server"
"git+https://github.com/${_pkgname}/${_pkgname}-webapp"
+ "mattermost-ldflags.patch"
"${_pkgname}.service"
"${_pkgname}.sysusers"
"${_pkgname}.tmpfiles")
sha512sums=(
'SKIP'
'SKIP'
+ 'ac952eae873aa09ba7bdf1e7abc618f0dc6982fa85df298261ab71ccf71f66c95846dade400e05d731f2c5ee2c6f4332d6f78d737026c9f098f1e03f419bee00'
'cd02b3da86869117554c3c53a657a4b46989ea533b7b47c24fb642ffbd182ce6ecfb16a8ddde3af4d5e8cff0ab41a932753129662e126994e1ad5912545e6eb4'
'b95bf2c0d840d0e85baebc1051c872056fa4990d263334fecc7b11d96085cb65a69dd866f18889e209336028f17c02152c13a92d2be1c21848939f22203439f0'
'e3ffcf4b86e2ecc7166c1abf92cd4de23d81bad405db0121e513a8d81fea05eec9dd508141b14b208c4c13fbc347c56f01ed91326faa01e872ecdedcc18718f9')
@@ -72,6 +74,10 @@ prepare() {
ln -s "$srcdir"/${_pkgname}-webapp ${_pkgname}-webapp
cd ${_pkgname}-server
+ # Pass Arch Linux's Go compilation flags to Mattermost in order to take
+ # into account advanced features like PIE.
+ patch < "${srcdir}"/mattermost-ldflags.patch
+
# We are not using docker, no need to stop it.
sed -r -i Makefile \
-e 's/^clean: stop-docker/clean:/'
diff --git a/mattermost-ldflags.patch b/mattermost-ldflags.patch
new file mode 100644
index 00000000000..2f863a0ff9b
--- /dev/null
+++ b/mattermost-ldflags.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -48,6 +48,7 @@ GOFLAGS ?= $(GOFLAGS:)
+ GO=go
+ DELVE=dlv
+ GO_LINKER_FLAGS ?= -ldflags \
+- "-X github.com/mattermost/mattermost-server/model.BuildNumber=$(BUILD_NUMBER)\
++ "-linkmode external -extldflags '$(LDFLAGS)' -s -w \
++ -X github.com/mattermost/mattermost-server/model.BuildNumber=$(BUILD_NUMBER)\
+ -X 'github.com/mattermost/mattermost-server/model.BuildDate=$(BUILD_DATE)'\
+ -X github.com/mattermost/mattermost-server/model.BuildHash=$(BUILD_HASH)\