From 89062ffa66582a9e1c2d511266b1d301d48cd3b2 Mon Sep 17 00:00:00 2001 From: OPPEN321 Date: Wed, 5 Nov 2025 10:17:50 +0800 Subject: [PATCH] Update and rename 01-prepare_package.sh to 02-prepare_package.sh --- scripts/01-prepare_package.sh | 124 ------------------------- scripts/02-prepare_package.sh | 170 ++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 124 deletions(-) delete mode 100644 scripts/01-prepare_package.sh create mode 100644 scripts/02-prepare_package.sh diff --git a/scripts/01-prepare_package.sh b/scripts/01-prepare_package.sh deleted file mode 100644 index 8245356..0000000 --- a/scripts/01-prepare_package.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/bash -e - -# Replace package -rm -rf feeds/packages/net/{xray-core,v2ray-core,v2ray-geodata,sing-box,samba4,miniupnpd,aria2,nginx} -rm -rf feeds/luci/applications/{luci-app-sqm,luci-app-upnp,luci-app-dockerman,luci-app-aria2} -rm -rf feeds/packages/utils/{unzip,docker,dockerd,containerd,runc,coremark} -rm -rf feeds/packages/lang/{node,golang} - -# golang 1.25 -git clone https://github.com/sbwml/packages_lang_golang -b 25.x feeds/packages/lang/golang - -# node - prebuilt -git clone https://github.com/sbwml/feeds_packages_lang_node-prebuilt feeds/packages/lang/node -b packages-24.10 - -# quickwrt packages -git clone https://github.com/QuickWrt/openwrt_packages package/new/openwrt_packages - -# luci-app-sqm -git clone https://git.cooluc.com/sbwml/luci-app-sqm feeds/luci/applications/luci-app-sqm - -# unzip -git clone https://github.com/sbwml/feeds_packages_utils_unzip feeds/packages/utils/unzip - -# UPnP -git clone https://git.cooluc.com/sbwml/miniupnpd feeds/packages/net/miniupnpd -b v2.3.9 -git clone https://git.cooluc.com/sbwml/luci-app-upnp feeds/luci/applications/luci-app-upnp -b openwrt-24.10 - -# Docker -git clone https://git.cooluc.com/sbwml/luci-app-dockerman -b openwrt-24.10 feeds/luci/applications/luci-app-dockerman -git clone https://github.com/sbwml/packages_utils_docker feeds/packages/utils/docker -git clone https://github.com/sbwml/packages_utils_dockerd feeds/packages/utils/dockerd -git clone https://github.com/sbwml/packages_utils_containerd feeds/packages/utils/containerd -git clone https://github.com/sbwml/packages_utils_runc feeds/packages/utils/runc - -# aria2 & ariaNG -git clone https://github.com/sbwml/ariang-nginx package/new/ariang-nginx -git clone https://github.com/sbwml/feeds_packages_net_aria2 -b 22.03 feeds/packages/net/aria2 - -# ddns - fix boot -sed -i '/boot()/,+2d' feeds/packages/net/ddns-scripts/files/etc/init.d/ddns - -# Use nginx instead of uhttpd -sed -i 's/+uhttpd /+luci-nginx /g' feeds/luci/collections/luci/Makefile -sed -i 's/+uhttpd-mod-ubus //' feeds/luci/collections/luci/Makefile -sed -i 's/+uhttpd /+luci-nginx /g' feeds/luci/collections/luci-light/Makefile -sed -i "s/+luci /+luci-nginx /g" feeds/luci/collections/luci-ssl-openssl/Makefile -sed -i "s/+luci /+luci-nginx /g" feeds/luci/collections/luci-ssl/Makefile -sed -i 's/+uhttpd +uhttpd-mod-ubus /+luci-nginx /g' feeds/packages/net/wg-installer/Makefile -sed -i '/uhttpd-mod-ubus/d' feeds/luci/collections/luci-light/Makefile -sed -i 's/+luci-nginx \\$/+luci-nginx/' feeds/luci/collections/luci-light/Makefile - -# nginx - latest version -git clone https://github.com/sbwml/feeds_packages_net_nginx feeds/packages/net/nginx -b openwrt-24.10 -sed -i 's/procd_set_param stdout 1/procd_set_param stdout 0/g;s/procd_set_param stderr 1/procd_set_param stderr 0/g' feeds/packages/net/nginx/files/nginx.init - -# nginx - ubus -sed -i 's/ubus_parallel_req 2/ubus_parallel_req 6/g' feeds/packages/net/nginx/files-luci-support/60_nginx-luci-support -sed -i '/ubus_parallel_req/a\ ubus_script_timeout 300;' feeds/packages/net/nginx/files-luci-support/60_nginx-luci-support - -# nginx - config -cp -rf ../OpenBox/doc/nginx/luci.locations ./feeds/packages/net/nginx/files-luci-support/ -cp -rf ../OpenBox/doc/nginx/uci.conf.template ./feeds/packages/net/nginx-util/files/ - -# uwsgi - fix timeout -sed -i '$a cgi-timeout = 600' feeds/packages/net/uwsgi/files-luci-support/luci-*.ini -sed -i '/limit-as/c\limit-as = 5000' feeds/packages/net/uwsgi/files-luci-support/luci-webui.ini -# disable error log -sed -i "s/procd_set_param stderr 1/procd_set_param stderr 0/g" feeds/packages/net/uwsgi/files/uwsgi.init - -# uwsgi - performance -sed -i 's/threads = 1/threads = 2/g' feeds/packages/net/uwsgi/files-luci-support/luci-webui.ini -sed -i 's/processes = 3/processes = 4/g' feeds/packages/net/uwsgi/files-luci-support/luci-webui.ini -sed -i 's/cheaper = 1/cheaper = 2/g' feeds/packages/net/uwsgi/files-luci-support/luci-webui.ini - -# rpcd - fix timeout -sed -i 's/option timeout 30/option timeout 60/g' package/system/rpcd/files/rpcd.config -sed -i 's#20) \* 1000#60) \* 1000#g' feeds/luci/modules/luci-base/htdocs/luci-static/resources/rpc.js - -# frpc -sed -i 's/procd_set_param stdout $stdout/procd_set_param stdout 0/g' feeds/packages/net/frp/files/frpc.init -sed -i 's/procd_set_param stderr $stderr/procd_set_param stderr 0/g' feeds/packages/net/frp/files/frpc.init -sed -i 's/stdout stderr //g' feeds/packages/net/frp/files/frpc.init -sed -i '/stdout:bool/d;/stderr:bool/d' feeds/packages/net/frp/files/frpc.init -sed -i '/stdout/d;/stderr/d' feeds/packages/net/frp/files/frpc.config -sed -i 's/env conf_inc/env conf_inc enable/g' feeds/packages/net/frp/files/frpc.init -sed -i "s/'conf_inc:list(string)'/& \\\\/" feeds/packages/net/frp/files/frpc.init -sed -i "/conf_inc:list/a\\\t\t\'enable:bool:0\'" feeds/packages/net/frp/files/frpc.init -sed -i '/procd_open_instance/i\\t\[ "$enable" -ne 1 \] \&\& return 1\n' feeds/packages/net/frp/files/frpc.init -patch -p1 < ../OpenBox/luci/applications/luci-app-frpc/001-luci-app-frpc-hide-token.patch -patch -p1 < ../OpenBox/luci/applications/luci-app-frpc/002-luci-app-frpc-add-enable-flag.patch - -# natmap -sed -i 's/log_stdout:bool:1/log_stdout:bool:0/g;s/log_stderr:bool:1/log_stderr:bool:0/g' feeds/packages/net/natmap/files/natmap.init -pushd feeds/luci -patch -p1 <../../../OpenBox/luci/applications/luci-app-natmap/0001-luci-app-natmap-add-default-STUN-server-lists.patch -popd - -# samba4 - bump version -git clone https://github.com/sbwml/feeds_packages_net_samba4 feeds/packages/net/samba4 -# enable multi-channel -sed -i '/workgroup/a \\n\t## enable multi-channel' feeds/packages/net/samba4/files/smb.conf.template -sed -i '/enable multi-channel/a \\tserver multi channel support = yes' feeds/packages/net/samba4/files/smb.conf.template -# default config -sed -i 's/#aio read size = 0/aio read size = 0/g' feeds/packages/net/samba4/files/smb.conf.template -sed -i 's/#aio write size = 0/aio write size = 0/g' feeds/packages/net/samba4/files/smb.conf.template -sed -i 's/invalid users = root/#invalid users = root/g' feeds/packages/net/samba4/files/smb.conf.template -sed -i 's/bind interfaces only = yes/bind interfaces only = no/g' feeds/packages/net/samba4/files/smb.conf.template -sed -i 's/#create mask/create mask/g' feeds/packages/net/samba4/files/smb.conf.template -sed -i 's/#directory mask/directory mask/g' feeds/packages/net/samba4/files/smb.conf.template -sed -i 's/0666/0644/g;s/0744/0755/g;s/0777/0755/g' feeds/luci/applications/luci-app-samba4/htdocs/luci-static/resources/view/samba4.js -sed -i 's/0666/0644/g;s/0777/0755/g' feeds/packages/net/samba4/files/samba.config -sed -i 's/0666/0644/g;s/0777/0755/g' feeds/packages/net/samba4/files/smb.conf.template - -# iperf3 -sed -i "s/D_GNU_SOURCE/D_GNU_SOURCE -funroll-loops/g" feeds/packages/net/iperf3/Makefile - -# luci-compat - fix translation -sed -i 's/<%:Up%>/<%:Move up%>/g' feeds/luci/modules/luci-compat/luasrc/view/cbi/tblsection.htm -sed -i 's/<%:Down%>/<%:Move down%>/g' feeds/luci/modules/luci-compat/luasrc/view/cbi/tblsection.htm - -# frpc translation -sed -i 's,发送,Transmission,g' feeds/luci/applications/luci-app-transmission/po/zh_Hans/transmission.po -sed -i 's,frp 服务器,Frp 服务器,g' feeds/luci/applications/luci-app-frps/po/zh_Hans/frps.po -sed -i 's,frp 客户端,Frp 客户端,g' feeds/luci/applications/luci-app-frpc/po/zh_Hans/frpc.po diff --git a/scripts/02-prepare_package.sh b/scripts/02-prepare_package.sh new file mode 100644 index 0000000..264800e --- /dev/null +++ b/scripts/02-prepare_package.sh @@ -0,0 +1,170 @@ +#!/bin/bash -e + +# golang 1.25 +rm -rf feeds/packages/lang/golang +git clone https://$github/sbwml/packages_lang_golang -b 25.x feeds/packages/lang/golang + +# node - prebuilt +rm -rf feeds/packages/lang/node +git clone https://$github/sbwml/feeds_packages_lang_node-prebuilt feeds/packages/lang/node -b packages-24.10 + +# default settings +git clone https://$github/QuickWrt/default-settings package/new/default-settings -b openwrt-24.10 + +# wwan +git clone https://$github/sbwml/wwan-packages package/new/wwan --depth=1 + +# luci-app-filemanager +rm -rf feeds/luci/applications/luci-app-filemanager +git clone https://$github/sbwml/luci-app-filemanager package/new/luci-app-filemanager + +# luci-app-quickfile +git clone https://$github/sbwml/luci-app-quickfile package/new/quickfile + +# luci-app-airplay2 +git clone https://$github/sbwml/luci-app-airplay2 package/new/airplay2 + +# luci-app-webdav +git clone https://$github/sbwml/luci-app-webdav package/new/luci-app-webdav + +# ddns - fix boot +sed -i '/boot()/,+2d' feeds/packages/net/ddns-scripts/files/etc/init.d/ddns + +# nlbwmon - disable syslog +sed -i 's/stderr 1/stderr 0/g' feeds/packages/net/nlbwmon/files/nlbwmon.init + +# pcre - 8.45 +mkdir -p package/libs/pcre +curl -s $mirror/openwrt/patch/pcre/Makefile > package/libs/pcre/Makefile +curl -s $mirror/openwrt/patch/pcre/Config.in > package/libs/pcre/Config.in + +# lrzsz - 0.12.20 +rm -rf feeds/packages/utils/lrzsz +git clone https://$github/sbwml/packages_utils_lrzsz package/new/lrzsz + +# irqbalance: disable build with numa +curl -s $mirror/openwrt/patch/irqbalance/011-meson-numa.patch > feeds/packages/utils/irqbalance/patches/011-meson-numa.patch +sed -i '/-Dcapng=disabled/i\\t-Dnuma=disabled \\' feeds/packages/utils/irqbalance/Makefile + +# frpc +sed -i 's/procd_set_param stdout $stdout/procd_set_param stdout 0/g' feeds/packages/net/frp/files/frpc.init +sed -i 's/procd_set_param stderr $stderr/procd_set_param stderr 0/g' feeds/packages/net/frp/files/frpc.init +sed -i 's/stdout stderr //g' feeds/packages/net/frp/files/frpc.init +sed -i '/stdout:bool/d;/stderr:bool/d' feeds/packages/net/frp/files/frpc.init +sed -i '/stdout/d;/stderr/d' feeds/packages/net/frp/files/frpc.config +sed -i 's/env conf_inc/env conf_inc enable/g' feeds/packages/net/frp/files/frpc.init +sed -i "s/'conf_inc:list(string)'/& \\\\/" feeds/packages/net/frp/files/frpc.init +sed -i "/conf_inc:list/a\\\t\t\'enable:bool:0\'" feeds/packages/net/frp/files/frpc.init +sed -i '/procd_open_instance/i\\t\[ "$enable" -ne 1 \] \&\& return 1\n' feeds/packages/net/frp/files/frpc.init +curl -s $mirror/openwrt/patch/luci/applications/luci-app-frpc/001-luci-app-frpc-hide-token.patch | patch -p1 +curl -s $mirror/openwrt/patch/luci/applications/luci-app-frpc/002-luci-app-frpc-add-enable-flag.patch | patch -p1 + +# natmap +sed -i 's/log_stdout:bool:1/log_stdout:bool:0/g;s/log_stderr:bool:1/log_stderr:bool:0/g' feeds/packages/net/natmap/files/natmap.init +pushd feeds/luci + curl -s $mirror/openwrt/patch/luci/applications/luci-app-natmap/0001-luci-app-natmap-add-default-STUN-server-lists.patch | patch -p1 +popd + +# samba4 - bump version +rm -rf feeds/packages/net/samba4 +git clone https://$github/sbwml/feeds_packages_net_samba4 feeds/packages/net/samba4 +# enable multi-channel +sed -i '/workgroup/a \\n\t## enable multi-channel' feeds/packages/net/samba4/files/smb.conf.template +sed -i '/enable multi-channel/a \\tserver multi channel support = yes' feeds/packages/net/samba4/files/smb.conf.template +# default config +sed -i 's/#aio read size = 0/aio read size = 0/g' feeds/packages/net/samba4/files/smb.conf.template +sed -i 's/#aio write size = 0/aio write size = 0/g' feeds/packages/net/samba4/files/smb.conf.template +sed -i 's/invalid users = root/#invalid users = root/g' feeds/packages/net/samba4/files/smb.conf.template +sed -i 's/bind interfaces only = yes/bind interfaces only = no/g' feeds/packages/net/samba4/files/smb.conf.template +sed -i 's/#create mask/create mask/g' feeds/packages/net/samba4/files/smb.conf.template +sed -i 's/#directory mask/directory mask/g' feeds/packages/net/samba4/files/smb.conf.template +sed -i 's/0666/0644/g;s/0744/0755/g;s/0777/0755/g' feeds/luci/applications/luci-app-samba4/htdocs/luci-static/resources/view/samba4.js +sed -i 's/0666/0644/g;s/0777/0755/g' feeds/packages/net/samba4/files/samba.config +sed -i 's/0666/0644/g;s/0777/0755/g' feeds/packages/net/samba4/files/smb.conf.template + +# zerotier +rm -rf feeds/packages/net/zerotier +git clone https://$github/sbwml/feeds_packages_net_zerotier feeds/packages/net/zerotier + +# aria2 & ariaNG +rm -rf feeds/packages/net/ariang +rm -rf feeds/luci/applications/luci-app-aria2 +git clone https://$github/sbwml/ariang-nginx package/new/ariang-nginx +rm -rf feeds/packages/net/aria2 +git clone https://$github/sbwml/feeds_packages_net_aria2 -b 22.03 feeds/packages/net/aria2 + +# airconnect +git clone https://$github/sbwml/luci-app-airconnect package/new/airconnect --depth=1 + +# netkit-ftp +git clone https://$github/sbwml/package_new_ftp package/new/ftp + +# nethogs +git clone https://$github/sbwml/package_new_nethogs package/new/nethogs + +# SSRP & Passwall +rm -rf feeds/packages/net/{xray-core,v2ray-core,v2ray-geodata,sing-box} +git clone https://$github/sbwml/openwrt_helloworld package/new/helloworld -b v5 + +# openlist +git clone https://$github/sbwml/luci-app-openlist2 package/new/openlist --depth=1 + +# netdata +sed -i 's/syslog/none/g' feeds/packages/admin/netdata/files/netdata.conf + +# qBittorrent +git clone https://$github/sbwml/luci-app-qbittorrent package/new/qbittorrent --depth=1 + +# unblockneteasemusic +git clone https://$github/UnblockNeteaseMusic/luci-app-unblockneteasemusic package/new/luci-app-unblockneteasemusic --depth=1 +sed -i 's/解除网易云音乐播放限制/网易云音乐解锁/g' package/new/luci-app-unblockneteasemusic/root/usr/share/luci/menu.d/luci-app-unblockneteasemusic.json + +# Theme +git clone https://$github/sbwml/luci-theme-argon package/new/luci-theme-argon --depth=1 + +# Mosdns +git clone https://$github/sbwml/luci-app-mosdns -b v5 package/new/mosdns --depth=1 + +# OpenAppFilter +git clone https://$github/sbwml/OpenAppFilter --depth=1 package/new/OpenAppFilter -b v6 + +# iperf3 +sed -i "s/D_GNU_SOURCE/D_GNU_SOURCE -funroll-loops/g" feeds/packages/net/iperf3/Makefile + +# nlbwmon +sed -i 's/services/network/g' feeds/luci/applications/luci-app-nlbwmon/root/usr/share/luci/menu.d/luci-app-nlbwmon.json +sed -i 's/services/network/g' feeds/luci/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/config.js + +# mentohust +git clone https://$github/sbwml/luci-app-mentohust package/new/mentohust + +# custom packages +rm -rf feeds/packages/utils/coremark +git clone https://$github/sbwml/openwrt_pkgs package/new/custom --depth=1 + +# luci-compat - fix translation +sed -i 's/<%:Up%>/<%:Move up%>/g' feeds/luci/modules/luci-compat/luasrc/view/cbi/tblsection.htm +sed -i 's/<%:Down%>/<%:Move down%>/g' feeds/luci/modules/luci-compat/luasrc/view/cbi/tblsection.htm + +# frpc translation +sed -i 's,发送,Transmission,g' feeds/luci/applications/luci-app-transmission/po/zh_Hans/transmission.po +sed -i 's,frp 服务器,Frp 服务器,g' feeds/luci/applications/luci-app-frps/po/zh_Hans/frps.po +sed -i 's,frp 客户端,Frp 客户端,g' feeds/luci/applications/luci-app-frpc/po/zh_Hans/frpc.po + +# luci-app-sqm +rm -rf feeds/luci/applications/luci-app-sqm +git clone https://$gitea/zhao/luci-app-sqm feeds/luci/applications/luci-app-sqm + +# unzip +rm -rf feeds/packages/utils/unzip +git clone https://$github/sbwml/feeds_packages_utils_unzip feeds/packages/utils/unzip + +# tcp-brutal +git clone https://$github/sbwml/package_kernel_tcp-brutal package/kernel/tcp-brutal + +# watchcat - clean config +true > feeds/packages/utils/watchcat/files/watchcat.config + +# libpcap +rm -rf package/libs/libpcap +git clone https://$github/sbwml/package_libs_libpcap package/libs/libpcap