-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gotify/server #5126
Add gotify/server #5126
Conversation
Planned to test on armv7-6.2.4, was able to build
|
@thorpelawrence as x64 successfully builds, I tried to run in under DSM 7 on DS218+. |
Thanks for testing, I didn't have an x64 Synology to test. Will see if I can create a patch or upstream change to configure data directory |
- adjust icon (make it square) - add gotify-cli to package - fix service setup to create pid file - avoid creation of target/bin/data folder by environment variable - introduce environment-variables file for custom service configuration - remove obsolete config.yml
@thorpelawrence I did some redesign and now it works on my DS218+ (x86_64) with DSM 7.0.1.
|
Thanks for all the help on this @hgy59, unfortunately I haven't been able to get it to compile with |
Yes, we still have a cross compilation issue. Only x64 builds are succeeding yet.
|
As another approach we could try to use the prebuilt binaries of gotify-server and gotify-cli. |
Interesting, as far as I could see it was just generating Go code (no CGO dependency) so didn't think |
Sorry this was just a guess. The "-m64" errors are a hint that the options are for the host but the gcc used is for the target arch. |
I saw the -m64 somewhere in I think the CGO code for ARM builds, so seems like it might be an option that's applied that just doesn't seem to be working with this specific toolchain. I'd be happy to use the pre built versions, seems like there's an armv7 version - I guess would be OK to just use that for platforms that don't compile? |
In fact, didn't even notice but |
Was able to get it working with this (quickly hacked together) change, but obviously only for armv7 diff --git a/cross/gotify-server/Makefile b/cross/gotify-server/Makefile
index fc46a0e1..7351618c 100644
--- a/cross/gotify-server/Makefile
+++ b/cross/gotify-server/Makefile
@@ -15,8 +15,8 @@ LICENSE = MIT
GO_SRC_DIR = $(WORK_DIR)/$(PKG_DIR)
GO_BIN_DIR = $(GO_SRC_DIR)/$(PKG_NAME)
-
-PRE_COMPILE_TARGET = gotify_pre_compile
+COMPILE_TARGET = gotify_compile
+# PRE_COMPILE_TARGET = gotify_pre_compile
CGO_ENABLED = 1
GO_BUILD_ARGS += -ldflags "-w -s -X main.Version=$(PKG_VERS) -X main.BuildDate=$(shell date "+%F-%T") -X main.Commit=$(PKG_VERS) -X main.Mode=prod"
@@ -26,7 +26,12 @@ include ../../mk/spksrc.cross-go.mk
ENV += NPM_CONFIG_USER=root
PATH := $(WORK_DIR)/../../../native/nodejs/work-native/node/bin:$(PATH)
-.PHONY: gotify_pre_compile
+.PHONY: gotify_pre_compile gotify_compile
gotify_pre_compile:
- cd $(GO_SRC_DIR)/ui && npm install && npm run build
- cd $(GO_SRC_DIR) && env $(filter-out GOARCH=%, $(ENV)) go run hack/packr/packr.go
+ # cd $(GO_SRC_DIR)/ui && npm install && npm run build
+ # cd $(GO_SRC_DIR) && env $(filter-out GOARCH=%, $(ENV)) go run hack/packr/packr.go
+
+gotify_compile:
+ curl -Lo $(WORK_DIR)/tmp.zip https://github.com/gotify/server/releases/download/v2.1.4/gotify-linux-arm-7.zip
+ unzip -o $(WORK_DIR)/tmp.zip gotify-linux-arm-7
+ mv gotify-linux-arm-7 $(GO_BIN_DIR) |
@thorpelawrence I have now rewritten the package to use prebuilt binaries only. |
Awesome, thanks for the help @hgy59! Any reason we couldn't just keep the compile for gotify-cli if that works? Or did it not work for all? |
We save some build resources (cpu, power) when just using the prebuilt binaries and not depend on native/go anymore. |
Makes sense, happy to use the prebuilt, thought you weren't able to get the executable bit setup but missed that commit. Is this ready to be merged in that case? |
Hey, sorry to follow up but any updates on this please? |
Thanks for all the help again @hgy59, do you know roughly when I can expect it to start showing up in my package manager? I'm on a DS218j with DSM 6.2.4 |
Never mind, my synology network settings weren't working properly and only just figured out why, it's working now. Thanks again! |
Description
Add new package https://github.com/gotify/server. Based roughly on its build instructions
Checklist
all-supported
completed successfullyType of change