diff --git a/anda/tools/arduino-create-agent/anda.hcl b/anda/tools/arduino-create-agent/anda.hcl new file mode 100644 index 0000000000..3b954fda17 --- /dev/null +++ b/anda/tools/arduino-create-agent/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "arduino-create-agent.spec" + } +} \ No newline at end of file diff --git a/anda/tools/arduino-create-agent/arduino-create-agent.spec b/anda/tools/arduino-create-agent/arduino-create-agent.spec new file mode 100644 index 0000000000..e3a1683154 --- /dev/null +++ b/anda/tools/arduino-create-agent/arduino-create-agent.spec @@ -0,0 +1,35 @@ +%define debug_package %nil + +Name: arduino-create-agent +Version: 1.6.1 +Release: 1%?dist +Summary: Arduino Cloud Agent. +License: AGPLv3 +Packager: Owen Zimmerman +Url: https://github.com/arduino/arduino-create-agent +Source0: %url/archive/refs/tags/%version.tar.gz +Patch0: update.patch +BuildRequires: golang git go-rpm-macros anda-srpm-macros + +%description +The Arduino Cloud Agent is a single binary that will sit on the traybar and work in the background. +It allows you to use the Arduino Cloud to seamlessly upload code to any USB connected Arduino board (or Yún in LAN) directly from the browser. + +%prep +%autosetup -n arduino-create-agent-%version -p1 + +%build +%go_build_online + +%install +mkdir -p %{buildroot}%{_bindir} +install -Dm 755 build/bin/arduino-create-agent %buildroot%{_bindir}/arduino-create-agent + +%files +%license LICENSE.txt +%doc README.md +%{_bindir}/arduino-create-agent + +%changelog +* Sat Jan 25 2025 Owen Zimmerman +- Package arduino-create-agent diff --git a/anda/tools/arduino-create-agent/update.patch b/anda/tools/arduino-create-agent/update.patch new file mode 100644 index 0000000000..f6a59cc201 --- /dev/null +++ b/anda/tools/arduino-create-agent/update.patch @@ -0,0 +1,25 @@ +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 diff --git a/anda/tools/arduino-create-agent/update.rhai b/anda/tools/arduino-create-agent/update.rhai new file mode 100644 index 0000000000..3bd64047e0 --- /dev/null +++ b/anda/tools/arduino-create-agent/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("arduino/arduino-create-agent")); \ No newline at end of file