From 448ad0d5119b0a5bfdcce02c29c2cc83f5ec2af9 Mon Sep 17 00:00:00 2001 From: madomado Date: Fri, 12 Jun 2026 14:14:05 +0800 Subject: [PATCH 1/8] fix(throne): I guess we could try go mod tidy? fix #13044 Signed-off-by: madomado --- anda/apps/throne/throne.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/anda/apps/throne/throne.spec b/anda/apps/throne/throne.spec index ae5bb676018..8102f6f3b46 100644 --- a/anda/apps/throne/throne.spec +++ b/anda/apps/throne/throne.spec @@ -54,6 +54,7 @@ sed -i 's~add_library(qhotkey 3rdparty/QHotkey/qhotkey.cpp)~add_library(qhotkey pushd core/server export GOBIN=$(pwd)/gobin export PATH="${PATH}:${GOBIN}" +go mod tidy go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install github.com/chai2010/protorpc/protoc-gen-protorpc@latest From 0e821cdfcfc540914bc8307f01cea5263b48f6cb Mon Sep 17 00:00:00 2001 From: madomado Date: Tue, 16 Jun 2026 19:55:47 +0800 Subject: [PATCH 2/8] move to proper location Signed-off-by: madomado --- anda/apps/throne/throne.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anda/apps/throne/throne.spec b/anda/apps/throne/throne.spec index 8102f6f3b46..03c46a95ad3 100644 --- a/anda/apps/throne/throne.spec +++ b/anda/apps/throne/throne.spec @@ -54,7 +54,6 @@ sed -i 's~add_library(qhotkey 3rdparty/QHotkey/qhotkey.cpp)~add_library(qhotkey pushd core/server export GOBIN=$(pwd)/gobin export PATH="${PATH}:${GOBIN}" -go mod tidy go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install github.com/chai2010/protorpc/protoc-gen-protorpc@latest @@ -75,6 +74,7 @@ export PATH="${PATH}:${GOBIN}" %define build_ldflags %nil export GO_LDFLAGS=' ' export GO_BUILDTAGS="with_clash_api with_gvisor with_quic with_wireguard with_utls with_dhcp with_tailscale" +go mod tidy %gobuild -o $DEST -mod=readonly -modcacherw popd From 3ea22528bd9ae3da13664254afb60aee81704316 Mon Sep 17 00:00:00 2001 From: madonuko Date: Wed, 17 Jun 2026 18:01:59 +0800 Subject: [PATCH 3/8] fix(throne): update with upstream build method --- anda/apps/throne/throne.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/anda/apps/throne/throne.spec b/anda/apps/throne/throne.spec index 03c46a95ad3..341ef6ca8c2 100644 --- a/anda/apps/throne/throne.spec +++ b/anda/apps/throne/throne.spec @@ -69,11 +69,10 @@ DEST=$PWD/%{__cmake_builddir}/%{core} pushd core/server export GOBIN=$(pwd)/gobin export PATH="${PATH}:${GOBIN}" -%define currentgoldflags -w -s -X github.com/sagernet/sing-box/constant.Version=%{singbox_version} +# https://github.com/throneproj/Throne/blob/dev/script/build_go.sh +%define currentgoldflags -w -s -X github.com/sagernet/sing-box/constant.Version=%{singbox_version} -X 'internal/godebug.defaultGODEBUG=multipathtcp=0' -checklinkname=0 %define gomodulesmode GO111MODULE=on -%define build_ldflags %nil -export GO_LDFLAGS=' ' -export GO_BUILDTAGS="with_clash_api with_gvisor with_quic with_wireguard with_utls with_dhcp with_tailscale" +export GO_BUILDTAGS="with_clash_api with_gvisor with_quic with_wireguard with_utls with_dhcp with_tailscale badlinkname tfogo_checklinkname0 with_naive_outbound" go mod tidy %gobuild -o $DEST -mod=readonly -modcacherw popd From 1ad1bb8c0829a1516d0a7f23a7dc9e1d856b5979 Mon Sep 17 00:00:00 2001 From: madomado Date: Thu, 18 Jun 2026 20:20:08 +0800 Subject: [PATCH 4/8] Update throne.spec Co-authored-by: Randomuser199800 <204379176+Randomuser199800@users.noreply.github.com> Signed-off-by: madomado --- anda/apps/throne/throne.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/anda/apps/throne/throne.spec b/anda/apps/throne/throne.spec index 341ef6ca8c2..871a23afa05 100644 --- a/anda/apps/throne/throne.spec +++ b/anda/apps/throne/throne.spec @@ -58,7 +58,10 @@ go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install github.com/chai2010/protorpc/protoc-gen-protorpc@latest cd gen -protoc -I . --go_out=. --protorpc_out=. libcore.proto +go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + +cd gen +protoc -I . --go_out=. --go-grpc_out=. libcore.proto %build mkdir -p %__cmake_builddir From 1876058dd90245a21b576aa2a1e92bf5b7485ef8 Mon Sep 17 00:00:00 2001 From: madomado Date: Thu, 18 Jun 2026 20:20:14 +0800 Subject: [PATCH 5/8] Update throne.spec Co-authored-by: Randomuser199800 <204379176+Randomuser199800@users.noreply.github.com> Signed-off-by: madomado --- anda/apps/throne/throne.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anda/apps/throne/throne.spec b/anda/apps/throne/throne.spec index 871a23afa05..1d686588b81 100644 --- a/anda/apps/throne/throne.spec +++ b/anda/apps/throne/throne.spec @@ -35,7 +35,7 @@ BuildRequires: rpm_macro(gobuildflags) BuildRequires: protobuf-compiler BuildRequires: desktop-file-utils Requires: %{name}-core -%define core Core +%define core ThroneCore %package core Summary: %{summary} From 42b09075f78e7824b97477705b19e7b30c417542 Mon Sep 17 00:00:00 2001 From: madonuko Date: Sat, 20 Jun 2026 14:47:26 +0800 Subject: [PATCH 6/8] mebbe --- anda/apps/throne/throne.spec | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/anda/apps/throne/throne.spec b/anda/apps/throne/throne.spec index 1d686588b81..87b99ae8400 100644 --- a/anda/apps/throne/throne.spec +++ b/anda/apps/throne/throne.spec @@ -54,14 +54,9 @@ sed -i 's~add_library(qhotkey 3rdparty/QHotkey/qhotkey.cpp)~add_library(qhotkey pushd core/server export GOBIN=$(pwd)/gobin export PATH="${PATH}:${GOBIN}" -go install google.golang.org/protobuf/cmd/protoc-gen-go@latest -go install github.com/chai2010/protorpc/protoc-gen-protorpc@latest +go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.11 +go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.6.2 -cd gen -go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - -cd gen -protoc -I . --go_out=. --go-grpc_out=. libcore.proto %build mkdir -p %__cmake_builddir From 8b2b59f6722b4f13cb2377ff605b4a5a79ac6852 Mon Sep 17 00:00:00 2001 From: madonuko Date: Sat, 20 Jun 2026 14:50:06 +0800 Subject: [PATCH 7/8] a --- anda/apps/throne/throne.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anda/apps/throne/throne.spec b/anda/apps/throne/throne.spec index 87b99ae8400..4f9ea19e7e4 100644 --- a/anda/apps/throne/throne.spec +++ b/anda/apps/throne/throne.spec @@ -56,6 +56,8 @@ export GOBIN=$(pwd)/gobin export PATH="${PATH}:${GOBIN}" go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.11 go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.6.2 +cd gen +protoc -I . --go_out=. --go-grpc_out=. libcore.proto %build From 2a48a7c802e76a418e59120cfadfa2a7d1ceed81 Mon Sep 17 00:00:00 2001 From: madonuko Date: Sat, 20 Jun 2026 15:00:04 +0800 Subject: [PATCH 8/8] fix: clear ldflags --- anda/apps/throne/throne.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anda/apps/throne/throne.spec b/anda/apps/throne/throne.spec index 4f9ea19e7e4..1d6c381aae6 100644 --- a/anda/apps/throne/throne.spec +++ b/anda/apps/throne/throne.spec @@ -71,6 +71,8 @@ export GOBIN=$(pwd)/gobin export PATH="${PATH}:${GOBIN}" # https://github.com/throneproj/Throne/blob/dev/script/build_go.sh %define currentgoldflags -w -s -X github.com/sagernet/sing-box/constant.Version=%{singbox_version} -X 'internal/godebug.defaultGODEBUG=multipathtcp=0' -checklinkname=0 +%define build_ldflags %nil +export GO_LDFLAGS=' ' %define gomodulesmode GO111MODULE=on export GO_BUILDTAGS="with_clash_api with_gvisor with_quic with_wireguard with_utls with_dhcp with_tailscale badlinkname tfogo_checklinkname0 with_naive_outbound" go mod tidy