SuperManito / LinuxMirrors

GNU/Linux 更换系统软件源脚本及 Docker 安装脚本
https://linuxmirrors.cn
MIT License
2.59k stars 342 forks source link

适配 OpenWRT 操作系统 #51

Open lozn00 opened 4 months ago

lozn00 commented 4 months ago

请在下方描述您的功能请求或建议

openwrt不支持呢

SuperManito commented 4 months ago

请在下方描述您的功能请求或建议

openwrt不支持呢

用户比较少,我在用iStoreOS,直接在前端就换了

SuperManito commented 3 months ago

经过考察,如果想要适配 OpenWRT 系统可能需要解决一关键性问题:如何确认原始软件源内容?

OpenWRT 衍生系统以及处理器架构分支种类繁多,我作为开发者来说没有足够多的 OpenWRT 使用经验,故而无法确认不同系统所使用软件源语句的一致性。

我 iStoreOS 系统里 /etc/opkg/distfeeds.conf 的软件源内容是下面这样的,可以看到它使用了多个仓库分支

src/gz openwrt_core https://mirrors.ustc.edu.cn/openwrt/releases/22.03.6/targets/x86/64/packages
src/gz openwrt_base https://mirrors.ustc.edu.cn/openwrt/releases/22.03.6/packages/x86_64/base
src/gz openwrt_luci https://mirrors.ustc.edu.cn/openwrt/releases/22.03.6/packages/x86_64/luci
src/gz openwrt_packages https://mirrors.ustc.edu.cn/openwrt/releases/22.03.6/packages/x86_64/packages
src/gz openwrt_routing https://mirrors.ustc.edu.cn/openwrt/releases/22.03.6/packages/x86_64/routing
src/gz openwrt_telephony https://mirrors.ustc.edu.cn/openwrt/releases/22.03.6/packages/x86_64/telephony

本项目脚本为了良好的兼容性支持系统在没有软件源的情况下进行生成操作以实现换源目的,实际上脚本的底层工作逻辑也是如此即删除原有源后重新生成。

如果只是想修改原有软件源那么可以通过一个简单命令实现,这里以替换为中科大的软件源为例:

sed -i "s/$(grep -Eo 'https?://\S+' /etc/opkg/distfeeds.conf | head -n 1 | awk -F[/:] '{print $4}')/mirrors.ustc.edu.cn/g" /etc/opkg/distfeeds.conf
LSP0123 commented 3 months ago

core mirrors.com/openwrt/releases/{DISTRIB_RELEASE}/taegets/{DISTRIB_TARGET}/packages base luci packages routing telephony mirrors.com/openwrt/releases/{DISTRIB_RELEASE}/packages/{DISTRIB_ARCH}/{base/luci/packages/routing/telephony}

{DISTRIB_RELEASE}、{DISTRIB_TARGET}、{DISTRIB_ARCH}都在/etc/openwrt_release里

SuperManito commented 3 months ago

core mirrors.com/openwrt/releases/{DISTRIB_RELEASE}/taegets/{DISTRIB_TARGET}/packages base luci packages routing telephony mirrors.com/openwrt/releases/{DISTRIB_RELEASE}/packages/{DISTRIB_ARCH}/{base/luci/packages/routing/telephony}

{DISTRIB_RELEASE}、{DISTRIB_TARGET}、{DISTRIB_ARCH}都在/etc/openwrt_release里

你说的不跟我上面发的 iStoreOS 的一样么...

我指的是除了 openwrt_core openwrt_base openwrt_luci openwrt_packages openwrt_routing openwrt_telephony 这些已知的仓库不确定还涉及哪些仓库,OpenWRT有很多衍生版本吧,我查不到相关换源的具体资料

LSP0123 commented 3 months ago

core mirrors.com/openwrt/releases/{DISTRIB_RELEASE}/taegets/{DISTRIB_TARGET}/packages base luci packages routing telephony mirrors.com/openwrt/releases/{DISTRIB_RELEASE}/packages/{DISTRIB_ARCH}/{base/luci/packages/routing/telephony} {DISTRIB_RELEASE}、{DISTRIB_TARGET}、{DISTRIB_ARCH}都在/etc/openwrt_release里

你说的不跟我上面发的 iStoreOS 的一样么...

我指的是除了 openwrt_core openwrt_base openwrt_luci openwrt_packages openwrt_routing openwrt_telephony 这些已知的仓库不确定还涉及哪些仓库,OpenWRT有很多衍生版本吧,我查不到相关换源的具体资料

openwrt主要的只有这几个,应该是还有个video,但是这个基本上也不需要…………这是个单独的git-src源,已经一年多没更新了

istoreos的单独的源在/etc/opkg/compatfeeds.conf而且是不区分平台的 src/gz istore_compat https://istore.linkease.com/repo/all/compat istoreos的源属于兼容源,compatfeeds.conf,是可以在任何openwrt及衍生版添加的

immwrt在国内只有六个大学mirrors,规则和openwrt是一样的,都在distfeeds.conf里

其它衍生版本的例如dd,应该是没mirrors的

SuperManito commented 2 months ago

core mirrors.com/openwrt/releases/{DISTRIB_RELEASE}/taegets/{DISTRIB_TARGET}/packages base luci packages routing telephony mirrors.com/openwrt/releases/{DISTRIB_RELEASE}/packages/{DISTRIB_ARCH}/{base/luci/packages/routing/telephony} {DISTRIB_RELEASE}、{DISTRIB_TARGET}、{DISTRIB_ARCH}都在/etc/openwrt_release里

你说的不跟我上面发的 iStoreOS 的一样么... 我指的是除了 openwrt_core openwrt_base openwrt_luci openwrt_packages openwrt_routing openwrt_telephony 这些已知的仓库不确定还涉及哪些仓库,OpenWRT有很多衍生版本吧,我查不到相关换源的具体资料

openwrt主要的只有这几个,应该是还有个video,但是这个基本上也不需要…………这是个单独的git-src源,已经一年多没更新了

istoreos的单独的源在/etc/opkg/compatfeeds.conf而且是不区分平台的 src/gz istore_compat https://istore.linkease.com/repo/all/compat istoreos的源属于兼容源,compatfeeds.conf,是可以在任何openwrt及衍生版添加的

immwrt在国内只有六个大学mirrors,规则和openwrt是一样的,都在distfeeds.conf里

其它衍生版本的例如dd,应该是没mirrors的

按照以往经验,判定 OpenWRT 系统可以通过确认 /etc/openwrt_release 文件验证。

所以你的意思是所有衍生系统都可以配置 openwrt_core openwrt_base openwrt_luci openwrt_packages openwrt_routing openwrt_telephony 这几个仓库在 /etc/opkg/distfeeds.conf 对吗?

LSP0123 commented 2 months ago

core mirrors.com/openwrt/releases/{DISTRIB_RELEASE}/taegets/{DISTRIB_TARGET}/packages base luci packages routing telephony mirrors.com/openwrt/releases/{DISTRIB_RELEASE}/packages/{DISTRIB_ARCH}/{base/luci/packages/routing/telephony} {DISTRIB_RELEASE}、{DISTRIB_TARGET}、{DISTRIB_ARCH}都在/etc/openwrt_release里

你说的不跟我上面发的 iStoreOS 的一样么... 我指的是除了 openwrt_core openwrt_base openwrt_luci openwrt_packages openwrt_routing openwrt_telephony 这些已知的仓库不确定还涉及哪些仓库,OpenWRT有很多衍生版本吧,我查不到相关换源的具体资料

openwrt主要的只有这几个,应该是还有个video,但是这个基本上也不需要…………这是个单独的git-src源,已经一年多没更新了 istoreos的单独的源在/etc/opkg/compatfeeds.conf而且是不区分平台的 src/gz istore_compat https://istore.linkease.com/repo/all/compat istoreos的源属于兼容源,compatfeeds.conf,是可以在任何openwrt及衍生版添加的 immwrt在国内只有六个大学mirrors,规则和openwrt是一样的,都在distfeeds.conf里 其它衍生版本的例如dd,应该是没mirrors的

按照以往经验,判定 OpenWRT 系统可以通过确认 /etc/openwrt_release 文件验证。

所以你的意思是所有衍生系统都可以配置 openwrt_core openwrt_base openwrt_luci openwrt_packages openwrt_routing openwrt_telephony 这几个仓库在 /etc/opkg/distfeeds.conf 对吗?

看你说的衍生是指哪个含义吧。

如果是istoreos这种,"istoreos和openwrt"之间的关系,与"armbian和debian"之间的关系比较类似。各有各的源,但是armbian(debian版)必定有debian的源。 op的官方feed.conf就是/etc/opkg/distfeeds.conf。 istoreos的官方feed.conf就是/etc/opkg/compatfeeds.conf,且istoreos里必定有op的官方feed.conf(/etc/opkg/distfeeds.conf)。

如果是immortalwrt的话,"immortalwrt和openwrt"之间的关系,与"ubuntu和debian"之间的关系比较类似。

immortalwrt,它的就是immortalwrt_core immortalwrt_base immortalwrt_luci immortalwrt_packages immortalwrt_routing immortalwrt_telephony。但是URL规则是和openwrt是一样的。(实际上就只有前面变了)

src/gz immortalwrt_core https://downloads.immortalwrt.org/releases/23.05.3/targets/x86/64/packages
src/gz immortalwrt_base https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/base
src/gz immortalwrt_luci https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/luci
src/gz immortalwrt_packages https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/packages
src/gz immortalwrt_routing https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/routing
src/gz immortalwrt_telephony https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/telephony

我只能说,建议目前只支持openwrt、immwrt、istoreos这三个版本。

AlanWang2333 commented 2 months ago

怎么用啊大佬,把这几个源放进iStoreOS的opkg源里面吗

src/gz immortalwrt_core https://downloads.immortalwrt.org/releases/23.05.3/targets/x86/64/packages
src/gz immortalwrt_base https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/base
src/gz immortalwrt_luci https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/luci
src/gz immortalwrt_packages https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/packages
src/gz immortalwrt_routing https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/routing
src/gz immortalwrt_telephony https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/telephony
LSP0123 commented 2 months ago

怎么用啊大佬,把这几个源放进iStoreOS的opkg源里面吗

src/gz immortalwrt_core https://downloads.immortalwrt.org/releases/23.05.3/targets/x86/64/packages
src/gz immortalwrt_base https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/base
src/gz immortalwrt_luci https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/luci
src/gz immortalwrt_packages https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/packages
src/gz immortalwrt_routing https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/routing
src/gz immortalwrt_telephony https://downloads.immortalwrt.org/releases/23.05.3/packages/x86_64/telephony

这是immortalwrt的官方源,不要随意修改到istoreos里。目前istoreos并没有官方声明支持immortalwrt的。istoreos官方目前仅兼容openwrt