morytyann / OpenWrt-mihomo

Transparent Proxy with Mihomo on OpenWrt.
MIT License
1.42k stars 153 forks source link

插件更新会清除run目录已存在的部分内容 #17

Closed JohnsonRan closed 5 months ago

JohnsonRan commented 5 months ago

软件包上传插件,更新后会提示run目录下的geo、metacubexd文件有冲突?(~没细看~),被自动删除了

morytyann commented 5 months ago

应该是install脚本的问题,明天处理一下

morytyann commented 5 months ago

用我的配置文件运行了之后,更新软件包测试了一下,没能复现问题,你有用rule_provider或者proxy_provider吗?

JohnsonRan commented 5 months ago

是的 用了

morytyann commented 5 months ago

我添加了rule_provider和proxy_provider也没法复现,不过理论上来说这些文件被删除不会影响正常启动,会自行重新下载。

JohnsonRan commented 5 months ago

这倒确实不会,难道是我是通过固件编译时预先将geo,面板等文件放到相应位置的原因吗

morytyann commented 5 months ago

有这个可能,抽空我会测试一下,如果是的话我会修复这个问题。

JohnsonRan commented 5 months ago

https://github.com/JohnsonRan/opwrt_build_script/releases 这里有,不过插件不是最新的

morytyann commented 5 months ago

没事,到时候我自己编译,很快的

morytyann commented 5 months ago

复现成功,日志如下

opkg install luci-app-mihomo_git-24.179.31958-b40697d_all.ipk 
Upgrading luci-app-mihomo on root from git-24.178.18634-7710c64 to git-24.179.31958-b40697d...
Removing obsolete file /etc/mihomo/run/ui/metacubexd/sw.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-latin-ext-400-normal-BsVau5p6.woff2.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/maskable-icon-512x512.png.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/pwa-64x64.png.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/favicon.svg.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/Rules-TNzCNyL6.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/Setup-L_gUPj0w.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-vietnamese-400-normal-CiKzo2z6.woff.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/registerSW.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/Overview-8L-3NPrP.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/pwa-192x192.png.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-latin-ext-400-normal-Cah6ivqJ.woff.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/index-B2Zh1N83.css.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-cyrillic-400-normal-DivIpeVh.woff.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/ConfigTitle-CccdDOde.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/index-DSRoS9Rj.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/workbox-e1498109.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/CNAME.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-greek-ext-400-normal-DDGpGFz4.woff2.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/Config-Bf1q2o1O.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/.nojekyll.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/Connections-BMp9BGgx.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-vietnamese-400-normal-D5T8w5kG.woff2.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/index-DUJCNPBQ.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/index.html.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-cyrillic-ext-400-normal-Ct_d_4pr.woff.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-latin-400-normal-CRr34ncs.woff.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/IconReload-B5F0s_6W.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-cyrillic-400-normal-9itZEwnn.woff2.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-greek-ext-400-normal-BA5_ngob.woff.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/Logs-i1U2zZvP.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-latin-400-normal-DqUVgETp.woff2.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/global-DS5PTwt1.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-greek-400-normal-B4JJYYvj.woff.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/pwa-512x512.png.
Removing obsolete file /etc/mihomo/run/GeoSite.dat.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-cyrillic-ext-400-normal-DVFiJ7cT.woff2.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/manifest.webmanifest.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/Twemoji.Mozilla-BSQKJ6aF.ttf.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/index-DZsxSwxg.js.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/apple-touch-icon-180x180.png.
Removing obsolete file /etc/mihomo/run/Country.mmdb.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/favicon.ico.
Removing obsolete file /etc/mihomo/run/GeoIP.dat.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/fira-sans-greek-400-normal-xziLJ4od.woff2.
Removing obsolete file /etc/mihomo/run/ui/metacubexd/assets/Proxies-CxjCBap4.js.
Configuring luci-app-mihomo.
morytyann commented 5 months ago

在你提供的固件里,/usr/lib/opkg/info/luci-app-mihomo.list这个文件包含了被删除的这些文件(并不知道为什么会包含),在更新时opkg会读取它并跟新的包的对应文件进行对比,如果不包含就会执行删除操作。

这是你固件里的

/etc/mihomo/run/ui/metacubexd/sw.js
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-latin-ext-400-normal-BsVau5p6.woff2
/etc/mihomo/run/ui/metacubexd/maskable-icon-512x512.png
/etc/mihomo/run/ui/metacubexd/pwa-64x64.png
/etc/mihomo/run/ui/metacubexd/favicon.svg
/etc/mihomo/run/ui/metacubexd/assets/Rules-TNzCNyL6.js
/www/luci-static/resources/view/mihomo/config.js
/etc/mihomo/run/ui/metacubexd/assets/Setup-L_gUPj0w.js
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-vietnamese-400-normal-CiKzo2z6.woff
/etc/mihomo/run/ui/metacubexd/registerSW.js
/etc/mihomo/run/ui/metacubexd/assets/Overview-8L-3NPrP.js
/etc/mihomo/run/ui/metacubexd/pwa-192x192.png
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-latin-ext-400-normal-Cah6ivqJ.woff
/usr/share/luci/menu.d/luci-app-mihomo.json
/etc/mihomo/run/ui/metacubexd/assets/index-B2Zh1N83.css
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-cyrillic-400-normal-DivIpeVh.woff
/etc/mihomo/run/ui/metacubexd/assets/ConfigTitle-CccdDOde.js
/etc/mihomo/run/ui/metacubexd/assets/index-DSRoS9Rj.js
/etc/mihomo/run/ui/metacubexd/workbox-e1498109.js
/etc/mihomo/run/ui/metacubexd/CNAME
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-greek-ext-400-normal-DDGpGFz4.woff2
/www/luci-static/resources/view/mihomo/log.js
/etc/mihomo/run/ui/metacubexd/assets/Config-Bf1q2o1O.js
/etc/mihomo/run/ui/metacubexd/.nojekyll
/etc/mihomo/run/ui/metacubexd/assets/Connections-BMp9BGgx.js
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-vietnamese-400-normal-D5T8w5kG.woff2
/etc/mihomo/run/ui/metacubexd/assets/index-DUJCNPBQ.js
/etc/mihomo/run/ui/metacubexd/index.html
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-cyrillic-ext-400-normal-Ct_d_4pr.woff
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-latin-400-normal-CRr34ncs.woff
/etc/mihomo/run/ui/metacubexd/assets/IconReload-B5F0s_6W.js
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-cyrillic-400-normal-9itZEwnn.woff2
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-greek-ext-400-normal-BA5_ngob.woff
/etc/mihomo/run/ui/metacubexd/assets/Logs-i1U2zZvP.js
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-latin-400-normal-DqUVgETp.woff2
/etc/mihomo/run/ui/metacubexd/assets/global-DS5PTwt1.js
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-greek-400-normal-B4JJYYvj.woff
/etc/mihomo/run/ui/metacubexd/pwa-512x512.png
/etc/mihomo/run/GeoSite.dat
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-cyrillic-ext-400-normal-DVFiJ7cT.woff2
/usr/share/rpcd/acl.d/luci-app-mihomo.json
/etc/mihomo/run/ui/metacubexd/manifest.webmanifest
/etc/mihomo/run/ui/metacubexd/assets/Twemoji.Mozilla-BSQKJ6aF.ttf
/etc/mihomo/run/ui/metacubexd/assets/index-DZsxSwxg.js
/etc/mihomo/run/ui/metacubexd/apple-touch-icon-180x180.png
/etc/mihomo/run/Country.mmdb
/etc/mihomo/run/ui/metacubexd/favicon.ico
/etc/mihomo/run/GeoIP.dat
/etc/mihomo/run/ui/metacubexd/assets/fira-sans-greek-400-normal-xziLJ4od.woff2
/etc/mihomo/run/ui/metacubexd/assets/Proxies-CxjCBap4.js

这是正常打包出来的

/www/luci-static/resources/view/mihomo/config.js
/usr/share/luci/menu.d/luci-app-mihomo.json
/www/luci-static/resources/view/mihomo/log.js
/usr/share/rpcd/acl.d/luci-app-mihomo.json
morytyann commented 5 months ago

这里的问题,请将额外的文件移动到openwrt/files下,这里相当于OpenWrt的根目录

morytyann commented 5 months ago

详见官方文档

JohnsonRan commented 5 months ago

确实,问题已解决,感谢