QiuSimons / openwrt-mos

GNU General Public License v3.0
232 stars 89 forks source link

提供预编译的 ipk #68

Open IrineSistiana opened 2 years ago

IrineSistiana commented 2 years ago

https://github.com/shadowsocks/luci-app-shadowsocks/releases

这样所有 op 系统都能很方便的使用了。

QiuSimons commented 2 years ago

目前有一个问题,luci18还有大量存量用户,而luci18和luci19/21的语言文件是不通用的(我个人还是倾向于自行编译的

IrineSistiana commented 2 years ago

那就提供两种 ipk?

自行编译对于普通用户来说实在太难了....

QiuSimons commented 2 years ago

我抽空写个action吧(

IrineSistiana commented 2 years ago

大佬辛苦了。

EkkoG commented 1 year ago

写了个编译脚本 https://github.com/QiuSimons/openwrt-mos/pull/151

Action 还在测试,好像是 SDK golang 版本问题,还在看 https://github.com/EkkoG/openwrt-dist/actions/runs/4427762597

EkkoG commented 1 year ago

https://github.com/EkkoG/openwrt-dist/actions/runs/4427991336 测试成功了,明天整理一下代码再提个 PR

EkkoG commented 1 year ago

看起来提供预编译 IPK 的方式视要不要改成使用预编译 mosdns 二进制打包而定

相关 PR https://github.com/QiuSimons/openwrt-mos/pull/152

EkkoG commented 1 year ago

通过源码编译目前只在 22.03.3 的 SDK 环境中测试通过了,并且需要使用修改过的 action https://github.com/EkkoG/openwrt-mos/blob/9644ede4ef3bdb411345c54c9412a443bc4425b6/.github/workflows/build.yml#L33

因为官方的没有安装 upx

如果使用预编译二进制打包,理论上应该所有版本上都可以成功打包

另外官方的 action 在不填源码 hash 的情况下会失败,这个应该改不改打包方式都一样,相关 issue https://github.com/openwrt/gh-action-sdk/issues/18

不过改起来也不麻烦

EkkoG commented 1 year ago

通过源码编译目前只在 22.03.3 的 SDK 环境中测试通过了,并且需要使用修改过的 action https://github.com/EkkoG/openwrt-mos/blob/9644ede4ef3bdb411345c54c9412a443bc4425b6/.github/workflows/build.yml#L33

因为官方的没有安装 upx

如果使用预编译二进制打包,理论上应该所有版本上都可以成功打包

另外官方的 action 在不填源码 hash 的情况下会失败,这个应该改不改打包方式都一样,相关 issue openwrt/gh-action-sdk#18

不过改起来也不麻烦

查了一下为什么只有 22.03.3 才能打包成功

Openwrt 22.03.2 封版于 2022 年 10 月 https://archive.openwrt.org/releases/22.03.2/targets/x86/64/

22.03 分支于 2022 年 12 月才升级到 golang 1.19 https://github.com/openwrt/packages/commits/openwrt-22.03/lang/golang

而 mosdns 的依赖 quic-go 必须 golang 1.19

openwrt-mos-sdk-1  | ../../../../../dl/go-mod-cache/github.com/quic-go/quic-go@v0.33.0/internal/qtls/go_oldversion.go:5:13: cannot use "The version of quic-go you're using can't be built using outdated Go versions. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built using outdated Go...) as int value in variable declaration
openwrt-mos-sdk-1  | note: module requires Go 1.19

mosdns 本身似乎也是要求 1.19 的

所以只有 22.03.3 及以后的版本才能编译成功

另外似乎 22.03 分支的 golang 升级到 1.19 似乎是个意外,相关资料 https://github.com/openwrt/packages/pull/19652

个人觉得不要依赖 OpenWrt 包中的 golang 版本比较好,mosdns 单独编译,OpenWrt 包只依赖编译好的二进制文件