From 11b7e661ddbd47c218bdb242f6c4146cf0181efd Mon Sep 17 00:00:00 2001 From: Thomas Winkler <2049715+tew42@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:55:25 +0200 Subject: [PATCH 1/2] Bugfix in openwrt-http.go to handle 23.x ARM release Somehow I got my notes on file naming conventions mixed up for ARM, which in 23.x matches snapshot (i.e., no "default"). Signed-off-by: Thomas Winkler <2049715+tew42@users.noreply.github.com> --- sources/openwrt-http.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sources/openwrt-http.go b/sources/openwrt-http.go index 73232b6b..8e674f22 100644 --- a/sources/openwrt-http.go +++ b/sources/openwrt-http.go @@ -75,25 +75,24 @@ func (s *openwrt) Run() error { var fname string - if release == "snapshot" { + if strings.HasPrefix(release, "21.02") || strings.HasPrefix(release, "22.03") { switch s.definition.Image.ArchitectureMapped { case "x86_64": - fallthrough + fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename, + strings.Replace(architecturePath, "/", "-", 1)) case "armv7l": fallthrough case "aarch64": - fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename, + fname = fmt.Sprintf("openwrt-%s%s-default-rootfs.tar.gz", releaseInFilename, strings.Replace(architecturePath, "/", "-", 1)) - } } else { switch s.definition.Image.ArchitectureMapped { case "x86_64": - fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename, - strings.Replace(architecturePath, "/", "-", 1)) + fallthrough case "armv7l": fallthrough case "aarch64": - fname = fmt.Sprintf("openwrt-%s%s-default-rootfs.tar.gz", releaseInFilename, + fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename, strings.Replace(architecturePath, "/", "-", 1)) } } From a2723d086d151f3833b25ea03f0f28a1d274cceb Mon Sep 17 00:00:00 2001 From: Thomas Winkler <2049715+tew42@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:05:48 +0200 Subject: [PATCH 2/2] Missing } in openwrt-http.go Signed-off-by: Thomas Winkler <2049715+tew42@users.noreply.github.com> --- sources/openwrt-http.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/openwrt-http.go b/sources/openwrt-http.go index 8e674f22..33f3ca9b 100644 --- a/sources/openwrt-http.go +++ b/sources/openwrt-http.go @@ -85,6 +85,7 @@ func (s *openwrt) Run() error { case "aarch64": fname = fmt.Sprintf("openwrt-%s%s-default-rootfs.tar.gz", releaseInFilename, strings.Replace(architecturePath, "/", "-", 1)) + } } else { switch s.definition.Image.ArchitectureMapped { case "x86_64":