summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-04-02 11:49:17 +0300
committerCaleb Maclennan2020-04-02 12:35:47 +0300
commit10bb493f394c5d9a72875ed209066cbecedd775a (patch)
tree30315fa0d3d12eafcdf9c6f0634b6b06fb4c128b
parent378ebfcf348743d158b44e47fd8473275685f75a (diff)
downloadaur-mattermost-git.tar.gz
Update patch
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD4
-rw-r--r--mattermost-ldflags.patch22
3 files changed, 15 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 49028d02bf1..cbdad617a10 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -30,7 +30,7 @@ pkgbase = mattermost-git
source = mattermost.tmpfiles
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = 7ec8231894fdac8cba7fdd1cede7b47dbce68dae6868bab35fd16f2ceda433ee
+ sha256sums = 08685fa8aad0097cb97bba3484c0a0f8908a4e5123928351b7e7732aecc914f2
sha256sums = 522f44f3a68f73e43d854421f40e18055f3256453bc00a2162956902d1e577f8
sha256sums = f7bd36f6d7874f1345d205c6dcb79af1804362fc977a658db88951a172d1dfa0
sha256sums = 15220909751b960b811fc3eb3d1b8e2c0c5855d726d834461f667b5458d3bdad
diff --git a/PKGBUILD b/PKGBUILD
index 7470ca3c3d7..713663965de 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -32,7 +32,7 @@ source=("git+https://github.com/$_pkgname/$_pkgname-server"
"$_pkgname.tmpfiles")
sha256sums=('SKIP'
'SKIP'
- '7ec8231894fdac8cba7fdd1cede7b47dbce68dae6868bab35fd16f2ceda433ee'
+ '08685fa8aad0097cb97bba3484c0a0f8908a4e5123928351b7e7732aecc914f2'
'522f44f3a68f73e43d854421f40e18055f3256453bc00a2162956902d1e577f8'
'f7bd36f6d7874f1345d205c6dcb79af1804362fc977a658db88951a172d1dfa0'
'15220909751b960b811fc3eb3d1b8e2c0c5855d726d834461f667b5458d3bdad')
@@ -57,7 +57,7 @@ prepare() {
# Pass Arch Linux's Go compilation flags to Mattermost in order to take
# into account advanced features like PIE.
- patch < "$srcdir"/mattermost-ldflags.patch
+ patch -p1 < "$srcdir/$_pkgname-ldflags.patch"
# We are not using docker, no need to stop it.
sed -r -i Makefile \
diff --git a/mattermost-ldflags.patch b/mattermost-ldflags.patch
index 43e47c03b57..7cab76649fa 100644
--- a/mattermost-ldflags.patch
+++ b/mattermost-ldflags.patch
@@ -1,20 +1,22 @@
---- src/mattermost-server-5.12.0/Makefile 2019-06-14 21:13:52.000000000 +0200
-+++ src/mattermost-server-5.12.0/Makefile.new 2019-07-01 03:04:42.875342812 +0200
-@@ -49,11 +49,20 @@
- GOFLAGS ?= $(GOFLAGS:)
+diff --git a/Makefile b/Makefile
+index 97cd2446d0..9340c9b3dc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -58,11 +58,20 @@ GOFLAGS ?= $(GOFLAGS:) -mod=vendor
+ export GOBIN ?= $(PWD)/bin
GO=go
DELVE=dlv
--LDFLAGS += -X "github.com/mattermost/mattermost-server/model.BuildNumber=$(BUILD_NUMBER)"
+-LDFLAGS += -X "github.com/mattermost/mattermost-server/v5/model.BuildNumber=$(BUILD_NUMBER)"
+
+# We need to use the second flavour of makefile variables and use a dedicated
+# variable here, otherwise this will cause an infinite loop.
+# src.: https://www.gnu.org/software/make/manual/make.html#Flavors
+LDFLAGS_MATTERMOST := $(LDFLAGS)
-+LDFLAGS = -X "github.com/mattermost/mattermost-server/model.BuildNumber=$(BUILD_NUMBER)"
- LDFLAGS += -X "github.com/mattermost/mattermost-server/model.BuildDate=$(BUILD_DATE)"
- LDFLAGS += -X "github.com/mattermost/mattermost-server/model.BuildHash=$(BUILD_HASH)"
- LDFLAGS += -X "github.com/mattermost/mattermost-server/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)"
- LDFLAGS += -X "github.com/mattermost/mattermost-server/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)"
++LDFLAGS = -X "github.com/mattermost/mattermost-server/v5/model.BuildNumber=$(BUILD_NUMBER)"
+ LDFLAGS += -X "github.com/mattermost/mattermost-server/v5/model.BuildDate=$(BUILD_DATE)"
+ LDFLAGS += -X "github.com/mattermost/mattermost-server/v5/model.BuildHash=$(BUILD_HASH)"
+ LDFLAGS += -X "github.com/mattermost/mattermost-server/v5/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)"
+ LDFLAGS += -X "github.com/mattermost/mattermost-server/v5/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)"
+# The link mode needs to be at the end of the LDFLAGS statement otherwise the
+# build pieces of info won't be populated to the about dialog in the app.
+LDFLAGS += -linkmode external -extldflags '$(LDFLAGS_MATTERMOST)' -s -w