From 59b8a5cc6384c11a9f8b9c6a967861dede964ca3 Mon Sep 17 00:00:00 2001 From: ZhenYu Date: Thu, 12 Sep 2019 14:37:25 +0800 Subject: [PATCH 1/4] luci-app-haproxy-tcp & luci-app-qbittorrent: return to right display at make menu (#1608) * luci-app-haproxy-tcp: fixed wrong location in make menu * luci-app-qbittorrent: solved wrong luci-i18n-qbittorrent at make menu --- package/lean/luci-app-haproxy-tcp/Makefile | 46 +-- .../luci => luasrc}/controller/haproxy.lua | 0 .../lua/luci => luasrc}/model/cbi/haproxy.lua | 0 .../zh-cn/haproxy-tcp.po} | 0 .../{files => root}/etc/config/haproxy | 0 .../{files => root}/etc/haproxy_init.sh | 0 .../{files => root}/etc/haproxy_start | 0 .../etc/uci-defaults/z99-haproxy | 0 .../tools/po2lmo/Makefile | 12 - .../tools/po2lmo/src/po2lmo | Bin 19272 -> 0 bytes .../tools/po2lmo/src/po2lmo.c | 247 ------------- .../tools/po2lmo/src/template_lmo.c | 328 ------------------ .../tools/po2lmo/src/template_lmo.h | 92 ----- package/lean/luci-app-qbittorrent/Makefile | 68 +--- .../luasrc/controller/qbittorrent.lua | 4 + .../{src => luasrc/model}/cbi/qbittorrent.lua | 0 .../po/zh-cn/qbittorrent.po | 53 +++ .../{src => root/etc}/config/qbittorrent | 0 .../{src => root/etc}/init.d/qbittorrent | 0 .../src/controller/qbittorrent.lua | 4 - .../src/i18n/qbittorrent.zh-cn.lmo | Bin 656 -> 0 bytes 21 files changed, 79 insertions(+), 775 deletions(-) rename package/lean/luci-app-haproxy-tcp/{files/usr/lib/lua/luci => luasrc}/controller/haproxy.lua (100%) mode change 100644 => 100755 rename package/lean/luci-app-haproxy-tcp/{files/usr/lib/lua/luci => luasrc}/model/cbi/haproxy.lua (100%) mode change 100644 => 100755 rename package/lean/luci-app-haproxy-tcp/{i18n/zh-cn/haproxy.zh-cn.po => po/zh-cn/haproxy-tcp.po} (100%) mode change 100755 => 100644 rename package/lean/luci-app-haproxy-tcp/{files => root}/etc/config/haproxy (100%) rename package/lean/luci-app-haproxy-tcp/{files => root}/etc/haproxy_init.sh (100%) rename package/lean/luci-app-haproxy-tcp/{files => root}/etc/haproxy_start (100%) rename package/lean/luci-app-haproxy-tcp/{files => root}/etc/uci-defaults/z99-haproxy (100%) delete mode 100644 package/lean/luci-app-haproxy-tcp/tools/po2lmo/Makefile delete mode 100755 package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/po2lmo delete mode 100644 package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/po2lmo.c delete mode 100644 package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/template_lmo.c delete mode 100644 package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/template_lmo.h create mode 100755 package/lean/luci-app-qbittorrent/luasrc/controller/qbittorrent.lua rename package/lean/luci-app-qbittorrent/{src => luasrc/model}/cbi/qbittorrent.lua (100%) mode change 100644 => 100755 create mode 100644 package/lean/luci-app-qbittorrent/po/zh-cn/qbittorrent.po rename package/lean/luci-app-qbittorrent/{src => root/etc}/config/qbittorrent (100%) rename package/lean/luci-app-qbittorrent/{src => root/etc}/init.d/qbittorrent (100%) mode change 100644 => 100755 delete mode 100644 package/lean/luci-app-qbittorrent/src/controller/qbittorrent.lua delete mode 100644 package/lean/luci-app-qbittorrent/src/i18n/qbittorrent.zh-cn.lmo diff --git a/package/lean/luci-app-haproxy-tcp/Makefile b/package/lean/luci-app-haproxy-tcp/Makefile index 8163fa267d..0be02c1614 100644 --- a/package/lean/luci-app-haproxy-tcp/Makefile +++ b/package/lean/luci-app-haproxy-tcp/Makefile @@ -1,25 +1,19 @@ +# Copyright (C) 2019 Openwrt.org +# +# This is a free software, use it under Apache Licene 2.0 & GNU General Public License v3.0. +# + include $(TOPDIR)/rules.mk +LUCI_TITLE:=luci for haproxy and shadowsocks +LUCI_DEPENDS:=+haproxy +LUCI_PKGARCH:=all PKG_NAME:=luci-app-haproxy-tcp PKG_VERSION=1.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Alex Zhuo <1886090@gmail.com> -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - CATEGORY:=Utilities - SUBMENU:=Luci - TITLE:=luci for haproxy and shadowsocks - PKGARCH:=all - DEPENDS:=+haproxy -endef - -define Package/$(PKG_NAME)/description - A luci app for haproxy with shadowsocks -endef +include $(TOPDIR)/feeds/luci/luci.mk define Package/$(PKG_NAME)/postinst #!/bin/sh @@ -30,22 +24,4 @@ echo stopping haproxy echo haproxy disabled endef -define Build/Prepare - $(foreach po,$(wildcard ${CURDIR}/i18n/zh-cn/*.po), \ - po2lmo $(po) $(PKG_BUILD_DIR)/$(patsubst %.po,%.lmo,$(notdir $(po)));) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n - $(INSTALL_DATA) $(PKG_BUILD_DIR)/*.*.lmo $(1)/usr/lib/lua/luci/i18n/ - $(CP) ./files/* $(1)/ - -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) +# call BuildPackage - OpenWrt buildroot signature diff --git a/package/lean/luci-app-haproxy-tcp/files/usr/lib/lua/luci/controller/haproxy.lua b/package/lean/luci-app-haproxy-tcp/luasrc/controller/haproxy.lua old mode 100644 new mode 100755 similarity index 100% rename from package/lean/luci-app-haproxy-tcp/files/usr/lib/lua/luci/controller/haproxy.lua rename to package/lean/luci-app-haproxy-tcp/luasrc/controller/haproxy.lua diff --git a/package/lean/luci-app-haproxy-tcp/files/usr/lib/lua/luci/model/cbi/haproxy.lua b/package/lean/luci-app-haproxy-tcp/luasrc/model/cbi/haproxy.lua old mode 100644 new mode 100755 similarity index 100% rename from package/lean/luci-app-haproxy-tcp/files/usr/lib/lua/luci/model/cbi/haproxy.lua rename to package/lean/luci-app-haproxy-tcp/luasrc/model/cbi/haproxy.lua diff --git a/package/lean/luci-app-haproxy-tcp/i18n/zh-cn/haproxy.zh-cn.po b/package/lean/luci-app-haproxy-tcp/po/zh-cn/haproxy-tcp.po old mode 100755 new mode 100644 similarity index 100% rename from package/lean/luci-app-haproxy-tcp/i18n/zh-cn/haproxy.zh-cn.po rename to package/lean/luci-app-haproxy-tcp/po/zh-cn/haproxy-tcp.po diff --git a/package/lean/luci-app-haproxy-tcp/files/etc/config/haproxy b/package/lean/luci-app-haproxy-tcp/root/etc/config/haproxy similarity index 100% rename from package/lean/luci-app-haproxy-tcp/files/etc/config/haproxy rename to package/lean/luci-app-haproxy-tcp/root/etc/config/haproxy diff --git a/package/lean/luci-app-haproxy-tcp/files/etc/haproxy_init.sh b/package/lean/luci-app-haproxy-tcp/root/etc/haproxy_init.sh similarity index 100% rename from package/lean/luci-app-haproxy-tcp/files/etc/haproxy_init.sh rename to package/lean/luci-app-haproxy-tcp/root/etc/haproxy_init.sh diff --git a/package/lean/luci-app-haproxy-tcp/files/etc/haproxy_start b/package/lean/luci-app-haproxy-tcp/root/etc/haproxy_start similarity index 100% rename from package/lean/luci-app-haproxy-tcp/files/etc/haproxy_start rename to package/lean/luci-app-haproxy-tcp/root/etc/haproxy_start diff --git a/package/lean/luci-app-haproxy-tcp/files/etc/uci-defaults/z99-haproxy b/package/lean/luci-app-haproxy-tcp/root/etc/uci-defaults/z99-haproxy similarity index 100% rename from package/lean/luci-app-haproxy-tcp/files/etc/uci-defaults/z99-haproxy rename to package/lean/luci-app-haproxy-tcp/root/etc/uci-defaults/z99-haproxy diff --git a/package/lean/luci-app-haproxy-tcp/tools/po2lmo/Makefile b/package/lean/luci-app-haproxy-tcp/tools/po2lmo/Makefile deleted file mode 100644 index ad2c133207..0000000000 --- a/package/lean/luci-app-haproxy-tcp/tools/po2lmo/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -INSTALL = install -PREFIX = /usr/bin - -po2lmo: src/po2lmo.o src/template_lmo.o - $(CC) $(LDFLAGS) -o src/po2lmo src/po2lmo.o src/template_lmo.o - -install: - $(INSTALL) -m 755 src/po2lmo $(PREFIX) - -clean: - $(RM) src/po2lmo src/*.o diff --git a/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/po2lmo b/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/po2lmo deleted file mode 100755 index 68d4c13aca2d2894ac62de3c5f4425cf99ed84fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19272 zcmeHPeRy0|nLm?B+R&ymX$w-?E)1oWw$LH{G*FaDnklzDEyOlK)RyTqnKY4PCeGX` zEo-55I(<4j1fo(b3NDHwx~N?juykpge%KU64T@}4Tq9JRAwdFGjEc?v-uIq!=iZyl z%Cpb2|8XGmp7-~DocDa*bI;7_UBT5WOI$9YQi=GGAgJkH}E(vf((U}H}5{#rGBueEKQb1-6S~1UH z6&1qA0NGKjm40SHH*!YNDhddxUQ%U8;gQ{3X*XBeDcUCkQ&iQD>PCMJvVILE0dT|z zh=@A=EKt&=RR24@netc8VHPyN8AYElV4QOxJ#kD8j~Ewg`I z@zS?$_~>uv{d(;;FTbn)kuCbyNuQd4d~m&tg1I#bzxu7L8XDk6r&8!o84ZgYfsKV< zSp@&DBKWV1;CqVT4;8@^Meq+6!JCTUe=CB&uLw^4Ggdp?Q3THv!Iu=lUnzoj6v2N| z1aB>ZPe%XxAakap0LH4}jf}bja z|EUPRvk3mRBKUs*pDd<}z`~8l38B_KfpwvYmVsp=vb9YYt$HllE?S};VZEtU#3SM6 z=C-(KiFHPzBB95lO&y)0sXdm65F836^l;N{p{CZ`LM`F8c9D!?b-9hq+S_AIq9w5{ z+9WzU!kwZe5^E7HnjpzO6G7+7u$M z3B5TIkBg2Zf`sEXIE#sv+v9C|M6`6q+oF1l_+%m$*Wom(w_E&VpMv1Va}5pDg;r7M#|8Gs$&~#>gcmh;_|^`z&~+1;5mSPqW~&EV$2t zUuMDQTJYHxTuTj>YuU2K**>AAd-Ss0I?Ng^b)x*ZMG4uFrL|BQnNx>P?gD${KZ|&pa`}gupH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-TkVDz>GSgEcM5+rrbqlWwW}8B;mwlU98LN+CEM`N4zx83 zKXE)m{mt8=@F$q!_Ag7eMB<6ISk%UZAd5%Z!=xy4o$b2t^RVzE>)#v$t7G96ep=F@ z6yr6)A8D0~cxyA9D9$i7R&&EbXlp_YF??rDB^k~zhJ+u_l@2^B><{k$ zBS-Js*brQW!Y6S>@YuGch2X6A>Rd{f z4rkl6>7CM^>cHZw$(SmCUrB%!_BrhFnCGPSOOoY(*MZJ_m3>c10Gz;i7ZcHqeIccB z_@lZjdz_?jx*4COqU_aqSUnja1so0LV8yM_p)*}&ug=Z7sZo$t8^k=vR(guw205J( zD_)(i^-KGJw0FiYVL|61)TYW_ox}NLMb){qv;9>4cS-wN=}?{5)k}MIE>8Aj<7~fs zfKi*s<}%Oq_Q`{Ib>0sZPR{<%0JYky^S>TxA5ayO_Uip!(fb_sLY)hF3fe=d>N|OQ zpZ8kq)%oc(KR_g>zLWngbg2HSe05IgdzbdF!j{IavRCJ^>fin8Bj-qJe5>-+IM@f7 zwS4vOCJbN2W<}#ye%^4{o9DY#hJBSR-{1=Eq3nkp_UfFWiWX)h6{o=!>=l0w8SOC3W&{#77~@a7}GxFPp){Rdp1d42de+R6=H}T#)EDIM(D~ZDZf6*D2%g kl(^b diff --git a/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/po2lmo.c b/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/po2lmo.c deleted file mode 100644 index 0da792b680..0000000000 --- a/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/po2lmo.c +++ /dev/null @@ -1,247 +0,0 @@ -/* - * lmo - Lua Machine Objects - PO to LMO conversion tool - * - * Copyright (C) 2009-2012 Jo-Philipp Wich - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "template_lmo.h" - -static void die(const char *msg) -{ - fprintf(stderr, "Error: %s\n", msg); - exit(1); -} - -static void usage(const char *name) -{ - fprintf(stderr, "Usage: %s input.po output.lmo\n", name); - exit(1); -} - -static void print(const void *ptr, size_t size, size_t nmemb, FILE *stream) -{ - if( fwrite(ptr, size, nmemb, stream) == 0 ) - die("Failed to write stdout"); -} - -static int extract_string(const char *src, char *dest, int len) -{ - int pos = 0; - int esc = 0; - int off = -1; - - for( pos = 0; (pos < strlen(src)) && (pos < len); pos++ ) - { - if( (off == -1) && (src[pos] == '"') ) - { - off = pos + 1; - } - else if( off >= 0 ) - { - if( esc == 1 ) - { - switch (src[pos]) - { - case '"': - case '\\': - off++; - break; - } - dest[pos-off] = src[pos]; - esc = 0; - } - else if( src[pos] == '\\' ) - { - dest[pos-off] = src[pos]; - esc = 1; - } - else if( src[pos] != '"' ) - { - dest[pos-off] = src[pos]; - } - else - { - dest[pos-off] = '\0'; - break; - } - } - } - - return (off > -1) ? strlen(dest) : -1; -} - -static int cmp_index(const void *a, const void *b) -{ - uint32_t x = ((const lmo_entry_t *)a)->key_id; - uint32_t y = ((const lmo_entry_t *)b)->key_id; - - if (x < y) - return -1; - else if (x > y) - return 1; - - return 0; -} - -static void print_uint32(uint32_t x, FILE *out) -{ - uint32_t y = htonl(x); - print(&y, sizeof(uint32_t), 1, out); -} - -static void print_index(void *array, int n, FILE *out) -{ - lmo_entry_t *e; - - qsort(array, n, sizeof(*e), cmp_index); - - for (e = array; n > 0; n--, e++) - { - print_uint32(e->key_id, out); - print_uint32(e->val_id, out); - print_uint32(e->offset, out); - print_uint32(e->length, out); - } -} - -int main(int argc, char *argv[]) -{ - char line[4096]; - char key[4096]; - char val[4096]; - char tmp[4096]; - int state = 0; - int offset = 0; - int length = 0; - int n_entries = 0; - void *array = NULL; - lmo_entry_t *entry = NULL; - uint32_t key_id, val_id; - - FILE *in; - FILE *out; - - if( (argc != 3) || ((in = fopen(argv[1], "r")) == NULL) || ((out = fopen(argv[2], "w")) == NULL) ) - usage(argv[0]); - - memset(line, 0, sizeof(key)); - memset(key, 0, sizeof(val)); - memset(val, 0, sizeof(val)); - - while( (NULL != fgets(line, sizeof(line), in)) || (state >= 2 && feof(in)) ) - { - if( state == 0 && strstr(line, "msgid \"") == line ) - { - switch(extract_string(line, key, sizeof(key))) - { - case -1: - die("Syntax error in msgid"); - case 0: - state = 1; - break; - default: - state = 2; - } - } - else if( state == 1 || state == 2 ) - { - if( strstr(line, "msgstr \"") == line || state == 2 ) - { - switch(extract_string(line, val, sizeof(val))) - { - case -1: - state = 4; - break; - default: - state = 3; - } - } - else - { - switch(extract_string(line, tmp, sizeof(tmp))) - { - case -1: - state = 2; - break; - default: - strcat(key, tmp); - } - } - } - else if( state == 3 ) - { - switch(extract_string(line, tmp, sizeof(tmp))) - { - case -1: - state = 4; - break; - default: - strcat(val, tmp); - } - } - - if( state == 4 ) - { - if( strlen(key) > 0 && strlen(val) > 0 ) - { - key_id = sfh_hash(key, strlen(key)); - val_id = sfh_hash(val, strlen(val)); - - if( key_id != val_id ) - { - n_entries++; - array = realloc(array, n_entries * sizeof(lmo_entry_t)); - entry = (lmo_entry_t *)array + n_entries - 1; - - if (!array) - die("Out of memory"); - - entry->key_id = key_id; - entry->val_id = val_id; - entry->offset = offset; - entry->length = strlen(val); - - length = strlen(val) + ((4 - (strlen(val) % 4)) % 4); - - print(val, length, 1, out); - offset += length; - } - } - - state = 0; - memset(key, 0, sizeof(key)); - memset(val, 0, sizeof(val)); - } - - memset(line, 0, sizeof(line)); - } - - print_index(array, n_entries, out); - - if( offset > 0 ) - { - print_uint32(offset, out); - fsync(fileno(out)); - fclose(out); - } - else - { - fclose(out); - unlink(argv[2]); - } - - fclose(in); - return(0); -} diff --git a/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/template_lmo.c b/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/template_lmo.c deleted file mode 100644 index 27205a7228..0000000000 --- a/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/template_lmo.c +++ /dev/null @@ -1,328 +0,0 @@ -/* - * lmo - Lua Machine Objects - Base functions - * - * Copyright (C) 2009-2010 Jo-Philipp Wich - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "template_lmo.h" - -/* - * Hash function from http://www.azillionmonkeys.com/qed/hash.html - * Copyright (C) 2004-2008 by Paul Hsieh - */ - -uint32_t sfh_hash(const char *data, int len) -{ - uint32_t hash = len, tmp; - int rem; - - if (len <= 0 || data == NULL) return 0; - - rem = len & 3; - len >>= 2; - - /* Main loop */ - for (;len > 0; len--) { - hash += sfh_get16(data); - tmp = (sfh_get16(data+2) << 11) ^ hash; - hash = (hash << 16) ^ tmp; - data += 2*sizeof(uint16_t); - hash += hash >> 11; - } - - /* Handle end cases */ - switch (rem) { - case 3: hash += sfh_get16(data); - hash ^= hash << 16; - hash ^= data[sizeof(uint16_t)] << 18; - hash += hash >> 11; - break; - case 2: hash += sfh_get16(data); - hash ^= hash << 11; - hash += hash >> 17; - break; - case 1: hash += *data; - hash ^= hash << 10; - hash += hash >> 1; - } - - /* Force "avalanching" of final 127 bits */ - hash ^= hash << 3; - hash += hash >> 5; - hash ^= hash << 4; - hash += hash >> 17; - hash ^= hash << 25; - hash += hash >> 6; - - return hash; -} - -uint32_t lmo_canon_hash(const char *str, int len) -{ - char res[4096]; - char *ptr, prev; - int off; - - if (!str || len >= sizeof(res)) - return 0; - - for (prev = ' ', ptr = res, off = 0; off < len; prev = *str, off++, str++) - { - if (isspace(*str)) - { - if (!isspace(prev)) - *ptr++ = ' '; - } - else - { - *ptr++ = *str; - } - } - - if ((ptr > res) && isspace(*(ptr-1))) - ptr--; - - return sfh_hash(res, ptr - res); -} - -lmo_archive_t * lmo_open(const char *file) -{ - int in = -1; - uint32_t idx_offset = 0; - struct stat s; - - lmo_archive_t *ar = NULL; - - if (stat(file, &s) == -1) - goto err; - - if ((in = open(file, O_RDONLY)) == -1) - goto err; - - if ((ar = (lmo_archive_t *)malloc(sizeof(*ar))) != NULL) - { - memset(ar, 0, sizeof(*ar)); - - ar->fd = in; - ar->size = s.st_size; - - fcntl(ar->fd, F_SETFD, fcntl(ar->fd, F_GETFD) | FD_CLOEXEC); - - if ((ar->mmap = mmap(NULL, ar->size, PROT_READ, MAP_SHARED, ar->fd, 0)) == MAP_FAILED) - goto err; - - idx_offset = ntohl(*((const uint32_t *) - (ar->mmap + ar->size - sizeof(uint32_t)))); - - if (idx_offset >= ar->size) - goto err; - - ar->index = (lmo_entry_t *)(ar->mmap + idx_offset); - ar->length = (ar->size - idx_offset - sizeof(uint32_t)) / sizeof(lmo_entry_t); - ar->end = ar->mmap + ar->size; - - return ar; - } - -err: - if (in > -1) - close(in); - - if (ar != NULL) - { - if ((ar->mmap != NULL) && (ar->mmap != MAP_FAILED)) - munmap(ar->mmap, ar->size); - - free(ar); - } - - return NULL; -} - -void lmo_close(lmo_archive_t *ar) -{ - if (ar != NULL) - { - if ((ar->mmap != NULL) && (ar->mmap != MAP_FAILED)) - munmap(ar->mmap, ar->size); - - close(ar->fd); - free(ar); - - ar = NULL; - } -} - - -lmo_catalog_t *_lmo_catalogs = NULL; -lmo_catalog_t *_lmo_active_catalog = NULL; - -int lmo_load_catalog(const char *lang, const char *dir) -{ - DIR *dh = NULL; - char pattern[16]; - char path[PATH_MAX]; - struct dirent *de = NULL; - - lmo_archive_t *ar = NULL; - lmo_catalog_t *cat = NULL; - - if (!lmo_change_catalog(lang)) - return 0; - - if (!dir || !(dh = opendir(dir))) - goto err; - - if (!(cat = malloc(sizeof(*cat)))) - goto err; - - memset(cat, 0, sizeof(*cat)); - - snprintf(cat->lang, sizeof(cat->lang), "%s", lang); - snprintf(pattern, sizeof(pattern), "*.%s.lmo", lang); - - while ((de = readdir(dh)) != NULL) - { - if (!fnmatch(pattern, de->d_name, 0)) - { - snprintf(path, sizeof(path), "%s/%s", dir, de->d_name); - ar = lmo_open(path); - - if (ar) - { - ar->next = cat->archives; - cat->archives = ar; - } - } - } - - closedir(dh); - - cat->next = _lmo_catalogs; - _lmo_catalogs = cat; - - if (!_lmo_active_catalog) - _lmo_active_catalog = cat; - - return 0; - -err: - if (dh) closedir(dh); - if (cat) free(cat); - - return -1; -} - -int lmo_change_catalog(const char *lang) -{ - lmo_catalog_t *cat; - - for (cat = _lmo_catalogs; cat; cat = cat->next) - { - if (!strncmp(cat->lang, lang, sizeof(cat->lang))) - { - _lmo_active_catalog = cat; - return 0; - } - } - - return -1; -} - -static lmo_entry_t * lmo_find_entry(lmo_archive_t *ar, uint32_t hash) -{ - unsigned int m, l, r; - uint32_t k; - - l = 0; - r = ar->length - 1; - - while (1) - { - m = l + ((r - l) / 2); - - if (r < l) - break; - - k = ntohl(ar->index[m].key_id); - - if (k == hash) - return &ar->index[m]; - - if (k > hash) - { - if (!m) - break; - - r = m - 1; - } - else - { - l = m + 1; - } - } - - return NULL; -} - -int lmo_translate(const char *key, int keylen, char **out, int *outlen) -{ - uint32_t hash; - lmo_entry_t *e; - lmo_archive_t *ar; - - if (!key || !_lmo_active_catalog) - return -2; - - hash = lmo_canon_hash(key, keylen); - - for (ar = _lmo_active_catalog->archives; ar; ar = ar->next) - { - if ((e = lmo_find_entry(ar, hash)) != NULL) - { - *out = ar->mmap + ntohl(e->offset); - *outlen = ntohl(e->length); - return 0; - } - } - - return -1; -} - -void lmo_close_catalog(const char *lang) -{ - lmo_archive_t *ar, *next; - lmo_catalog_t *cat, *prev; - - for (prev = NULL, cat = _lmo_catalogs; cat; prev = cat, cat = cat->next) - { - if (!strncmp(cat->lang, lang, sizeof(cat->lang))) - { - if (prev) - prev->next = cat->next; - else - _lmo_catalogs = cat->next; - - for (ar = cat->archives; ar; ar = next) - { - next = ar->next; - lmo_close(ar); - } - - free(cat); - break; - } - } -} diff --git a/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/template_lmo.h b/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/template_lmo.h deleted file mode 100644 index 57f59aa56b..0000000000 --- a/package/lean/luci-app-haproxy-tcp/tools/po2lmo/src/template_lmo.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * lmo - Lua Machine Objects - General header - * - * Copyright (C) 2009-2012 Jo-Philipp Wich - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _TEMPLATE_LMO_H_ -#define _TEMPLATE_LMO_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if (defined(__GNUC__) && defined(__i386__)) -#define sfh_get16(d) (*((const uint16_t *) (d))) -#else -#define sfh_get16(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\ - +(uint32_t)(((const uint8_t *)(d))[0]) ) -#endif - - -struct lmo_entry { - uint32_t key_id; - uint32_t val_id; - uint32_t offset; - uint32_t length; -} __attribute__((packed)); - -typedef struct lmo_entry lmo_entry_t; - - -struct lmo_archive { - int fd; - int length; - uint32_t size; - lmo_entry_t *index; - char *mmap; - char *end; - struct lmo_archive *next; -}; - -typedef struct lmo_archive lmo_archive_t; - - -struct lmo_catalog { - char lang[6]; - struct lmo_archive *archives; - struct lmo_catalog *next; -}; - -typedef struct lmo_catalog lmo_catalog_t; - - -uint32_t sfh_hash(const char *data, int len); -uint32_t lmo_canon_hash(const char *data, int len); - -lmo_archive_t * lmo_open(const char *file); -void lmo_close(lmo_archive_t *ar); - - -extern lmo_catalog_t *_lmo_catalogs; -extern lmo_catalog_t *_lmo_active_catalog; - -int lmo_load_catalog(const char *lang, const char *dir); -int lmo_change_catalog(const char *lang); -int lmo_translate(const char *key, int keylen, char **out, int *outlen); -void lmo_close_catalog(const char *lang); - -#endif diff --git a/package/lean/luci-app-qbittorrent/Makefile b/package/lean/luci-app-qbittorrent/Makefile index 04aaef77af..70f4703b62 100644 --- a/package/lean/luci-app-qbittorrent/Makefile +++ b/package/lean/luci-app-qbittorrent/Makefile @@ -1,63 +1,17 @@ +# Copyright (C) 2019 Openwrt.org +# +# This is a free software, use it under Apache Licene 2.0 & GNU General Public License v3.0. +# + include $(TOPDIR)/rules.mk +LUCI_TITLE:=qbittorrent-nox for LuCI +LUCI_DEPENDS:=+qBittorrent +LUCI_PKGARCH:=all PKG_NAME:=luci-app-qbittorrent PKG_VERSION=1.0 -PKG_RELEASE:=2 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +PKG_RELEASE:=4 -include $(INCLUDE_DIR)/package.mk +include $(TOPDIR)/feeds/luci/luci.mk -define Package/luci-app-qbittorrent/temple - SECTION:=luci - CATEGORY:=LuCI - SUBMENU:=3. Applications - TITLE:=qbittorrent-nox for LuCI - PKGARCH:=all - DEPENDS:=+qBittorrent -endef - -define Package/luci-app-qbittorrent - $(call Package/luci-app-qbittorrent/temple) -endef - -define Package/luci-i18n-qbittorrent-zh-cn - $(call Package/luci-app-qbittorrent/temple) - DEPENDS:=+luci-app-qbittorrent -endef - -define Package/luci-app-qbittorrent/description - This package contains LuCI configuration pages for qbittorrent-nox -endef - -define Package/luci-i18n-qbittorrent-zh-cn/description - Translation support for luci-app-qbittorrent - 简体中文 (Simplified Chinese) -endef - -define Build/Prepare -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/luci-app-qbittorrent/install - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller - - $(INSTALL_CONF) ./src/config/qbittorrent $(1)/etc/config/qbittorrent - $(INSTALL_BIN) ./src/init.d/qbittorrent $(1)/etc/init.d/qbittorrent - $(INSTALL_DATA) ./src/cbi/qbittorrent.lua $(1)/usr/lib/lua/luci/model/cbi/qbittorrent.lua - $(INSTALL_DATA) ./src/controller/qbittorrent.lua $(1)/usr/lib/lua/luci/controller/qbittorrent.lua -endef - -define Package/luci-i18n-qbittorrent-zh-cn/install - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n - $(INSTALL_DATA) ./src/i18n/*.lmo $(1)/usr/lib/lua/luci/i18n/ -endef - -$(eval $(call BuildPackage,luci-app-qbittorrent)) -$(eval $(call BuildPackage,luci-i18n-qbittorrent-zh-cn)) +# call BuildPackage - OpenWrt buildroot signature diff --git a/package/lean/luci-app-qbittorrent/luasrc/controller/qbittorrent.lua b/package/lean/luci-app-qbittorrent/luasrc/controller/qbittorrent.lua new file mode 100755 index 0000000000..5363ac9786 --- /dev/null +++ b/package/lean/luci-app-qbittorrent/luasrc/controller/qbittorrent.lua @@ -0,0 +1,4 @@ +module("luci.controller.qbittorrent",package.seeall) +function index() + entry({"admin","nas","qbittorrent"},cbi("qbittorrent"),_("qbittorrent")) +end diff --git a/package/lean/luci-app-qbittorrent/src/cbi/qbittorrent.lua b/package/lean/luci-app-qbittorrent/luasrc/model/cbi/qbittorrent.lua old mode 100644 new mode 100755 similarity index 100% rename from package/lean/luci-app-qbittorrent/src/cbi/qbittorrent.lua rename to package/lean/luci-app-qbittorrent/luasrc/model/cbi/qbittorrent.lua diff --git a/package/lean/luci-app-qbittorrent/po/zh-cn/qbittorrent.po b/package/lean/luci-app-qbittorrent/po/zh-cn/qbittorrent.po new file mode 100644 index 0000000000..d7a834ede1 --- /dev/null +++ b/package/lean/luci-app-qbittorrent/po/zh-cn/qbittorrent.po @@ -0,0 +1,53 @@ +msgid "qbittorrent" +msgstr "BT下载器-qb" + +msgid "Running" +msgstr "运行中" + +msgid "Not running" +msgstr "未运行" + +msgid "qbittorrent Run Status" +msgstr "qbittorrent运行状态" + +msgid "Basic Settings" +msgstr "基本设置" + +msgid "Enable" +msgstr "启用" + +msgid "A BT/PT downloader base on Qt" +msgstr "一个基于QT的BT/PT下载器" + +msgid "profile_dir" +msgstr "配置文件目录" + +msgid "Store configuration files in the Path" +msgstr "配置文件存放路径" + +msgid "program_dir" +msgstr "程序目录" + +msgid "library_dir" +msgstr "库目录" + +msgid "Store Program files in the Path" +msgstr "程序文件存放路径" + +msgid "Store Library in the Path" +msgstr "库文件存放路径" + +msgid "Download Settings" +msgstr "下载设置" + +msgid "download_dir" +msgstr "下载目录" + +msgid "Store download files in the Path" +msgstr "下载文件存放目录" + +msgid "WEBUI Settings" +msgstr "WEBUI设置" + +msgid "WEBUI listening port" +msgstr "WEBUI监听端口" diff --git a/package/lean/luci-app-qbittorrent/src/config/qbittorrent b/package/lean/luci-app-qbittorrent/root/etc/config/qbittorrent similarity index 100% rename from package/lean/luci-app-qbittorrent/src/config/qbittorrent rename to package/lean/luci-app-qbittorrent/root/etc/config/qbittorrent diff --git a/package/lean/luci-app-qbittorrent/src/init.d/qbittorrent b/package/lean/luci-app-qbittorrent/root/etc/init.d/qbittorrent old mode 100644 new mode 100755 similarity index 100% rename from package/lean/luci-app-qbittorrent/src/init.d/qbittorrent rename to package/lean/luci-app-qbittorrent/root/etc/init.d/qbittorrent diff --git a/package/lean/luci-app-qbittorrent/src/controller/qbittorrent.lua b/package/lean/luci-app-qbittorrent/src/controller/qbittorrent.lua deleted file mode 100644 index ca43cb43d4..0000000000 --- a/package/lean/luci-app-qbittorrent/src/controller/qbittorrent.lua +++ /dev/null @@ -1,4 +0,0 @@ -module("luci.controller.qbittorrent",package.seeall) -function index() - entry({"admin","services","qbittorrent"},cbi("qbittorrent"),_("qbittorrent")) -end \ No newline at end of file diff --git a/package/lean/luci-app-qbittorrent/src/i18n/qbittorrent.zh-cn.lmo b/package/lean/luci-app-qbittorrent/src/i18n/qbittorrent.zh-cn.lmo deleted file mode 100644 index c43425dfd2e54500f3b54130535febe56cea2f12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 656 zcmaFa+WUO(x@XhcpX}cDeD=Dhd#5rmJlWCxV((rE?HJ+!cJ&38JfGF#6rvvx0@3|+<_d-v`zO3u*z;t^ zS_TG&XLD9TxIlJcQf5g>eo;|sUdi*WZOYp3PbFV%#Xx@DeIPq| z*2^=@ut@tp2gnWp$#36%jb|;-oGKt21cdgxCP~+C-l7R)9|2 Date: Thu, 12 Sep 2019 00:24:40 -0700 Subject: [PATCH 2/4] ramips: add XiaoYu mt7621 support --- .../ramips/base-files/etc/board.d/01_leds | 1 + .../ramips/base-files/etc/board.d/02_network | 4 + target/linux/ramips/dts/XiaoYu-C5.dts | 117 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 11 +- 4 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/XiaoYu-C5.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 6f2e624a1d..fd0a4ea968 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -416,6 +416,7 @@ wrh-300cr) set_wifi_led "$boardname:green:wlan" ucidef_set_led_netdev "lan" "lan" "$boardname:green:ethernet" "eth0" ;; +XiaoYu-C5|\ xzwifi,creativebox-v1) ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x10" ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 258d8f251f..fb0896db64 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -34,6 +34,10 @@ ramips_setup_interfaces() 11acnas|\ d-team,newifi-d2|\ w2914nsv2|\ + XiaoYu-C5) + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" + ;; zbt-we2026) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0" diff --git a/target/linux/ramips/dts/XiaoYu-C5.dts b/target/linux/ramips/dts/XiaoYu-C5.dts new file mode 100644 index 0000000000..5152714b8b --- /dev/null +++ b/target/linux/ramips/dts/XiaoYu-C5.dts @@ -0,0 +1,117 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "XiaoYu-C5", "mediatek,mt7621-soc"; + model = "XiaoYu-C5"; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x1c000000>, <0x20000000 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led_system:system { + label = "XiaoYu-C5:green:system"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + + work { + label = "XiaoYu-C5:green:usb3.0"; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; + linux,default-trigger = "usbport"; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x1fa0000>; + }; + partition@1ff0000 { + label = "mib0"; + reg = <0x1ff0000 0x10000>; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag" , "uart2", "uart3"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 1c414bd8a6..cc66390668 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -580,6 +580,15 @@ define Device/wsr-600 endef TARGET_DEVICES += wsr-600 +define Device/XiaoYu-C5 + DTS := XiaoYu-C5 + IMAGE_SIZE := $(ralink_default_fw_size_32M) + DEVICE_TITLE := XiaoYu-C5 + DEVICE_PACKAGES := \ + kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic +endef +TARGET_DEVICES += XiaoYu-C5 + define Device/zbt-we1326 DTS := ZBT-WE1326 IMAGE_SIZE := $(ralink_default_fw_size_16M) @@ -629,4 +638,4 @@ define Device/zbt-wg3526-32M kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \ kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic endef -TARGET_DEVICES += zbt-wg3526-32M +TARGET_DEVICES += zbt-wg3526-32M \ No newline at end of file From 46b8d68dacc8daacc27fb6c91fc9a6c5551d9df4 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Thu, 12 Sep 2019 00:26:58 -0700 Subject: [PATCH 3/4] qt5:fix qBittorrent with ssl runtime crash --- package/lean/qt5/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/qt5/Makefile b/package/lean/qt5/Makefile index bb6868fab9..d675212a4e 100644 --- a/package/lean/qt5/Makefile +++ b/package/lean/qt5/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qt5 PKG_VERSION:=5.8 -PKG_RELEASE:=0 +PKG_RELEASE:=1 PKG_MD5SUM:=a9f2494f75f966e2f22358ec367d8f41 PKG_SOURCE:=qt-everywhere-opensource-src-$(PKG_VERSION).$(PKG_RELEASE).tar.gz @@ -115,7 +115,7 @@ define Build/Configure -no-opengl \ -no-directfb \ -no-xcb \ - -no-ssl \ + -openssl-runtime \ -qt-zlib \ -qt-pcre \ -qt-freetype \ From 4ed39c663b23fd6db361676004d413bcf2184c45 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Thu, 12 Sep 2019 00:28:15 -0700 Subject: [PATCH 4/4] qBittorrent: bump to version 4.1.7 --- package/lean/qBittorrent/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/qBittorrent/Makefile b/package/lean/qBittorrent/Makefile index 8acaa16d68..9fbe23ab54 100644 --- a/package/lean/qBittorrent/Makefile +++ b/package/lean/qBittorrent/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qBittorrent -PKG_VERSION:=4.1.3 +PKG_VERSION:=4.1.7 PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/qbittorrent/qBittorrent.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=a574c4a70a5a3293d2f6135952c301d930d23627 +PKG_SOURCE_VERSION:=05a82afeb6c927bfc0cda4fe8fb25ecc3faecd86 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_LICENSE:=GPL-2.0+