diff --git a/anda/tools/arduino-create-agent/arduino-create-agent.spec b/anda/tools/arduino-create-agent/arduino-create-agent.spec index 44ca64a82a..45d90793de 100644 --- a/anda/tools/arduino-create-agent/arduino-create-agent.spec +++ b/anda/tools/arduino-create-agent/arduino-create-agent.spec @@ -20,7 +20,6 @@ Packager: Owen Zimmerman URL: %{gourl} Source: %{url}/archive/%{version}.tar.gz -Patch0: update.patch BuildRequires: anda-srpm-macros %description %{common_description} @@ -29,10 +28,11 @@ BuildRequires: anda-srpm-macros %prep %goprep -%autopatch -p1 %go_prep_online %build +sed -E '/^func Start\(/,/^\}$/s@return start\(src\)@return ""@' -i updater/updater.go +sed -E '\?r.POST\("/update", updateHandler\)?d' -i main.go %define gomodulesmode GO111MODULE=on %gobuild -o %{gobuilddir}/bin/arduino-create-agent %{goipath} diff --git a/anda/tools/arduino-create-agent/update.patch b/anda/tools/arduino-create-agent/update.patch deleted file mode 100644 index f6a59cc201..0000000000 --- a/anda/tools/arduino-create-agent/update.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/main.go b/main.go -index 1ca857b..c945487 100755 ---- a/main.go -+++ b/main.go -@@ -461,7 +461,6 @@ func loop() { - r.Handle("WSS", "/socket.io/", socketHandler) - r.GET("/info", infoHandler) - r.POST("/pause", pauseHandler) -- r.POST("/update", updateHandler) - - // Mount goa handlers - goa := v2.Server(config.GetDataDir().String(), Index) -diff --git a/updater/updater.go b/updater/updater.go -index db4e545..693431a 100644 ---- a/updater/updater.go -+++ b/updater/updater.go -@@ -34,7 +34,7 @@ import ( - // binary to be executed to perform the update. If no update has been downloaded - // it returns an empty string. - func Start(src string) string { -- return start(src) -+ return "" - } - - // CheckForUpdates checks if there is a new version of the binary available and