From 08ca6f78165e24023be1b7bef8a07e6675be2c9c Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 29 Mar 2021 22:59:37 +0800 Subject: [PATCH] Package ntlf9t: cleanup Makefiles Signed-off-by: Tianling Shen --- .../Makefile | 33 +- .../files/client_down.sh | 0 .../files/client_up.sh | 0 .../files/shadowvpn.config | 0 .../files/shadowvpn.hotplug | 0 .../files/shadowvpn.init | 0 .../patches/000-fix-autoconf.patch | 0 package/ntlf9t/chinadns/Makefile | 51 ++ package/ntlf9t/cpulimit-ng/.svn/entries | 1 - package/ntlf9t/cpulimit-ng/.svn/format | 1 - ...5249ab85b7f736854b13720614236af95.svn-base | 154 ----- ...06dc291766b7865b51bf3dac4a1e3ffdf.svn-base | 601 ------------------ ...b43bc5c084d5eb04ef6a61b06223a84f8.svn-base | 20 - ...7283be6e6944114df69ca13f8f52bb434.svn-base | 76 --- ...5ba6ec8875e3b72738e1b7ef6f79b27d8.svn-base | 94 --- ...5d9aec8d579f1c275122c039d0274fd2f.svn-base | 2 - ...0ddbf58512ac7e37d5abe866bf9b2758b.svn-base | 88 --- ...e6f0b946a5c3f2abb79b5e3724ef909bc.svn-base | 283 --------- ...c7cea777dff780ce210a467da64228e2c.svn-base | 143 ----- ...4a1b0881a70c715488fb183ed9f172b4b.svn-base | 544 ---------------- ...7853a6ceb541df6edae8ac0d500efe25f.svn-base | 47 -- package/ntlf9t/cpulimit-ng/.svn/wc.db | Bin 40960 -> 0 bytes package/ntlf9t/cpulimit-ng/Makefile | 58 +- package/ntlf9t/cpulimit-ng/readme-ng.txt | 2 - package/ntlf9t/cpulimit/Makefile | 21 +- package/ntlf9t/dvb-firmware/Makefile | 32 + .../files}/dvb-demod-mn88472-02.fw | Bin .../files}/dvb-demod-mn88473-01.fw | Bin .../files}/dvb-demod-si2168-01.fw | Bin .../files}/dvb-demod-si2168-02.fw | Bin .../files}/dvb-demod-si2168-a20-01.fw | Bin .../files}/dvb-demod-si2168-a30-01.fw | Bin .../files}/dvb-demod-si2168-b40-01.fw | Bin .../files}/dvb-demod-si2168-d60-01.fw | Bin .../files}/dvb-demod-si2183-b60-01.fw | Bin .../files}/dvb-fe-ds3000.fw | Bin .../files}/dvb-tuner-si2141-a10-01.fw | Bin .../files}/dvb-tuner-si2158-a20-01.fw | Bin .../files}/dvb-usb-dw2101.fw | Bin .../files}/dvb-usb-dw2102.fw | Bin .../files}/dvb-usb-dw2104.fw | Bin .../files}/dvb-usb-dw3101.fw | Bin .../files}/dvb-usb-tbsqbox-id5521.fw | Bin package/ntlf9t/dvb/dvb-firmware/Makefile | 40 -- package/ntlf9t/fcgiwrap/Makefile | 22 +- package/ntlf9t/{dvb => }/libdvbcsa/Makefile | 38 +- package/ntlf9t/minieap/Makefile | 37 +- .../patches/003-remove-systemctl.patch | 11 + package/ntlf9t/ngrokc/Makefile | 25 +- package/ntlf9t/njitclient/Makefile | 38 +- package/ntlf9t/openwrt-chinadns/Makefile | 51 -- package/ntlf9t/openwrt-pdnsd-full/Makefile | 62 -- .../openwrt-pdnsd-full/files/pdnsd.conf | 33 - package/ntlf9t/oscam/Makefile | 48 +- .../Makefile | 97 ++- .../files/configs/WhiteList.txt | 0 .../files/pcap-dnsproxy.config | 0 .../files/pcap-dnsproxy.hotplug | 0 .../files/pcap-dnsproxy.procd.init | 0 ...-cmake-dependency-scanner-workaround.patch | 0 package/ntlf9t/scutclient/Makefile | 19 +- package/ntlf9t/sysuh3c/Makefile | 26 +- .../Makefile | 25 +- 63 files changed, 286 insertions(+), 2537 deletions(-) rename package/ntlf9t/{openwrt-shadowvpn-master => ShadowVPN}/Makefile (76%) rename package/ntlf9t/{openwrt-shadowvpn-master => ShadowVPN}/files/client_down.sh (100%) rename package/ntlf9t/{openwrt-shadowvpn-master => ShadowVPN}/files/client_up.sh (100%) rename package/ntlf9t/{openwrt-shadowvpn-master => ShadowVPN}/files/shadowvpn.config (100%) rename package/ntlf9t/{openwrt-shadowvpn-master => ShadowVPN}/files/shadowvpn.hotplug (100%) rename package/ntlf9t/{openwrt-shadowvpn-master => ShadowVPN}/files/shadowvpn.init (100%) rename package/ntlf9t/{openwrt-shadowvpn-master => ShadowVPN}/patches/000-fix-autoconf.patch (100%) create mode 100644 package/ntlf9t/chinadns/Makefile delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/entries delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/format delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/01/014cc3b5249ab85b7f736854b13720614236af95.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/01/017cd9106dc291766b7865b51bf3dac4a1e3ffdf.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/08/082e091b43bc5c084d5eb04ef6a61b06223a84f8.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/2a/2a189807283be6e6944114df69ca13f8f52bb434.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/85/850938d5ba6ec8875e3b72738e1b7ef6f79b27d8.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/90/90187d65d9aec8d579f1c275122c039d0274fd2f.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/92/9235e0e0ddbf58512ac7e37d5abe866bf9b2758b.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/9b/9bf53bde6f0b946a5c3f2abb79b5e3724ef909bc.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/ab/ab83effc7cea777dff780ce210a467da64228e2c.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/b1/b1aea664a1b0881a70c715488fb183ed9f172b4b.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/pristine/d2/d219ad87853a6ceb541df6edae8ac0d500efe25f.svn-base delete mode 100755 package/ntlf9t/cpulimit-ng/.svn/wc.db delete mode 100644 package/ntlf9t/cpulimit-ng/readme-ng.txt create mode 100644 package/ntlf9t/dvb-firmware/Makefile rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-demod-mn88472-02.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-demod-mn88473-01.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-demod-si2168-01.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-demod-si2168-02.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-demod-si2168-a20-01.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-demod-si2168-a30-01.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-demod-si2168-b40-01.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-demod-si2168-d60-01.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-demod-si2183-b60-01.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-fe-ds3000.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-tuner-si2141-a10-01.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-tuner-si2158-a20-01.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-usb-dw2101.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-usb-dw2102.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-usb-dw2104.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-usb-dw3101.fw (100%) rename package/ntlf9t/{dvb/dvb-firmware/src => dvb-firmware/files}/dvb-usb-tbsqbox-id5521.fw (100%) delete mode 100644 package/ntlf9t/dvb/dvb-firmware/Makefile rename package/ntlf9t/{dvb => }/libdvbcsa/Makefile (50%) create mode 100644 package/ntlf9t/minieap/patches/003-remove-systemctl.patch delete mode 100644 package/ntlf9t/openwrt-chinadns/Makefile delete mode 100644 package/ntlf9t/openwrt-pdnsd-full/Makefile delete mode 100644 package/ntlf9t/openwrt-pdnsd-full/files/pdnsd.conf rename package/ntlf9t/{openwrt-Pcap_DNSProxy => pcap-dnsproxy}/Makefile (57%) rename package/ntlf9t/{openwrt-Pcap_DNSProxy => pcap-dnsproxy}/files/configs/WhiteList.txt (100%) rename package/ntlf9t/{openwrt-Pcap_DNSProxy => pcap-dnsproxy}/files/pcap-dnsproxy.config (100%) rename package/ntlf9t/{openwrt-Pcap_DNSProxy => pcap-dnsproxy}/files/pcap-dnsproxy.hotplug (100%) rename package/ntlf9t/{openwrt-Pcap_DNSProxy => pcap-dnsproxy}/files/pcap-dnsproxy.procd.init (100%) rename package/ntlf9t/{openwrt-Pcap_DNSProxy => pcap-dnsproxy}/patches/002-cmake-dependency-scanner-workaround.patch (100%) rename package/ntlf9t/{openwrt-udp2raw => udp2raw-tunnel}/Makefile (55%) diff --git a/package/ntlf9t/openwrt-shadowvpn-master/Makefile b/package/ntlf9t/ShadowVPN/Makefile similarity index 76% rename from package/ntlf9t/openwrt-shadowvpn-master/Makefile rename to package/ntlf9t/ShadowVPN/Makefile index 094fbdb765..15d4ab2f31 100644 --- a/package/ntlf9t/openwrt-shadowvpn-master/Makefile +++ b/package/ntlf9t/ShadowVPN/Makefile @@ -10,35 +10,28 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ShadowVPN PKG_VERSION:=0.2.0 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELESE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/aa65535/openwrt-shadowvpn/releases/download/v$(PKG_VERSION) PKG_HASH:=53b445cf47262f407bfef72d32bc6ca5d1341dcd3878ac2b4cd35ee030199dea -PKG_LICENSE:=GPLv3 +PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=clowwindy -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 PKG_FIXUP:=autoreconf -PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/ShadowVPN - SECTION:=net - CATEGORY:=Network - TITLE:=A fast, safe VPN based on libsodium - URL:=https://github.com/clowwindy/ShadowVPN - DEPENDS:=+kmod-tun +ip -endef - -define Package/ShadowVPN/description -A fast, safe VPN based on libsodium + SECTION:=net + CATEGORY:=Network + TITLE:=A fast, safe VPN based on libsodium + URL:=https://github.com/clowwindy/ShadowVPN + DEPENDS:=+kmod-tun +ip endef define Package/ShadowVPN/conffiles @@ -46,17 +39,17 @@ define Package/ShadowVPN/conffiles endef define Package/ShadowVPN/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/shadowvpn.init $(1)/etc/init.d/shadowvpn $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DATA) ./files/shadowvpn.config $(1)/etc/config/shadowvpn + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/shadowvpn.init $(1)/etc/init.d/shadowvpn + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/shadowvpn.hotplug $(1)/etc/hotplug.d/iface/30-shadowvpn $(INSTALL_DIR) $(1)/etc/shadowvpn $(INSTALL_DATA) ./files/client_up.sh $(1)/etc/shadowvpn/client_up.sh $(INSTALL_DATA) ./files/client_down.sh $(1)/etc/shadowvpn/client_down.sh $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/shadowvpn $(1)/usr/bin - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_DATA) ./files/shadowvpn.hotplug $(1)/etc/hotplug.d/iface/30-shadowvpn + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/shadowvpn $(1)/usr/bin/ endef $(eval $(call BuildPackage,ShadowVPN)) diff --git a/package/ntlf9t/openwrt-shadowvpn-master/files/client_down.sh b/package/ntlf9t/ShadowVPN/files/client_down.sh similarity index 100% rename from package/ntlf9t/openwrt-shadowvpn-master/files/client_down.sh rename to package/ntlf9t/ShadowVPN/files/client_down.sh diff --git a/package/ntlf9t/openwrt-shadowvpn-master/files/client_up.sh b/package/ntlf9t/ShadowVPN/files/client_up.sh similarity index 100% rename from package/ntlf9t/openwrt-shadowvpn-master/files/client_up.sh rename to package/ntlf9t/ShadowVPN/files/client_up.sh diff --git a/package/ntlf9t/openwrt-shadowvpn-master/files/shadowvpn.config b/package/ntlf9t/ShadowVPN/files/shadowvpn.config similarity index 100% rename from package/ntlf9t/openwrt-shadowvpn-master/files/shadowvpn.config rename to package/ntlf9t/ShadowVPN/files/shadowvpn.config diff --git a/package/ntlf9t/openwrt-shadowvpn-master/files/shadowvpn.hotplug b/package/ntlf9t/ShadowVPN/files/shadowvpn.hotplug similarity index 100% rename from package/ntlf9t/openwrt-shadowvpn-master/files/shadowvpn.hotplug rename to package/ntlf9t/ShadowVPN/files/shadowvpn.hotplug diff --git a/package/ntlf9t/openwrt-shadowvpn-master/files/shadowvpn.init b/package/ntlf9t/ShadowVPN/files/shadowvpn.init similarity index 100% rename from package/ntlf9t/openwrt-shadowvpn-master/files/shadowvpn.init rename to package/ntlf9t/ShadowVPN/files/shadowvpn.init diff --git a/package/ntlf9t/openwrt-shadowvpn-master/patches/000-fix-autoconf.patch b/package/ntlf9t/ShadowVPN/patches/000-fix-autoconf.patch similarity index 100% rename from package/ntlf9t/openwrt-shadowvpn-master/patches/000-fix-autoconf.patch rename to package/ntlf9t/ShadowVPN/patches/000-fix-autoconf.patch diff --git a/package/ntlf9t/chinadns/Makefile b/package/ntlf9t/chinadns/Makefile new file mode 100644 index 0000000000..8b339447b0 --- /dev/null +++ b/package/ntlf9t/chinadns/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2014-2018 OpenWrt-dist +# Copyright (C) 2014-2018 Jian Chang +# Copyright (C) 2021 ImmortalWrt.org +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=chinadns +PKG_VERSION:=1.3.3 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/aa65535/ChinaDNS/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=74e53af32f8aa2ca7e63697385f12d89a06c486641556cfd8bc3f085d87e55ad +PKG_BUILD_DIR:=$(BUILD_DIR)/ChinaDNS-$(PKG_VERSION) + +PKG_LICENSE:=GPL-3.0 +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Jian Chang + +PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/chinadns + SECTION:=net + CATEGORY:=Network + TITLE:=Protect yourself against DNS poisoning in China. + URL:=https://github.com/shadowsocks/ChinaDNS +endef + +define Package/chinadns/conffiles +/usr/share/chinadns/chnroute.txt +/usr/share/chinadns/iplist.txt +endef + +define Package/chinadns/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chinadns $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/chinadns + $(CP) $(PKG_INSTALL_DIR)/usr/share/chnroute.txt $(1)/usr/share/chinadns/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/iplist.txt $(1)/usr/share/chinadns/ +endef + +$(eval $(call BuildPackage,chinadns)) diff --git a/package/ntlf9t/cpulimit-ng/.svn/entries b/package/ntlf9t/cpulimit-ng/.svn/entries deleted file mode 100755 index 48082f72f0..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/entries +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/package/ntlf9t/cpulimit-ng/.svn/format b/package/ntlf9t/cpulimit-ng/.svn/format deleted file mode 100755 index 48082f72f0..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/format +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/01/014cc3b5249ab85b7f736854b13720614236af95.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/01/014cc3b5249ab85b7f736854b13720614236af95.svn-base deleted file mode 100755 index 49f84ce1b6..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/01/014cc3b5249ab85b7f736854b13720614236af95.svn-base +++ /dev/null @@ -1,154 +0,0 @@ -/** -* -* cpulimit - a cpu limiter for Linux -* -* Copyright (C) 2005-2008, by: Angelo Marletta -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -********************************************************************** -* -* Dynamic list implementation -* -*/ - -#include -#include - -#include "list.h" - -#define EMPTYLIST NULL - -void init_list(struct list *l,int keysize) { - l->first=l->last=NULL; - l->keysize=keysize; - l->count=0; -} - -struct list_node *add_elem(struct list *l,void *elem) { - struct list_node *newnode=(struct list_node*)malloc(sizeof(struct list_node)); - newnode->data=elem; - newnode->previous=l->last; - newnode->next=NULL; - if (l->count==0) { - l->first=l->last=newnode; - } - else { - l->last->next=newnode; - l->last=newnode; - } - l->count++; - return newnode; -} - -void delete_node(struct list *l,struct list_node *node) { - if (l->count==1) { - l->first=l->last=NULL; - } - else if (node==l->first) { - node->next->previous=NULL; - l->first=node->next; - } - else if (node==l->last) { - node->previous->next=NULL; - l->last=node->previous; - } - else { - node->previous->next=node->next; - node->next->previous=node->previous; - } - l->count--; - free(node); - node = NULL; -} - -void destroy_node(struct list *l,struct list_node *node) { - free(node->data); - node->data=NULL; - delete_node(l,node); -} - -int is_EMPTYLIST_list(struct list *l) { - return (l->count==0?TRUE:FALSE); -} - -int get_list_count(struct list *l) { - return l->count; -} - -void *first_elem(struct list *l) { - return l->first->data; -} - -struct list_node *first_node(struct list *l) { - return l->first; -} - -void *last_elem(struct list *l) { - return l->last->data; -} - -struct list_node *last_node(struct list *l) { - return l->last; -} - -struct list_node *xlocate_node(struct list *l,void *elem,int offset,int length) { - struct list_node *tmp; - tmp=l->first; - while(tmp!=NULL) { - if(!memcmp((char*)tmp->data+offset,elem,length==0?l->keysize:length)) return (tmp); - tmp=tmp->next; - } - return EMPTYLIST; -} - -struct list_node *locate_node(struct list *l,void *elem) { - return(xlocate_node(l,elem,0,0)); -} - -void *xlocate_elem(struct list *l,void *elem,int offset,int length) { - struct list_node *node=xlocate_node(l,elem,offset,length); - return(node==NULL?NULL:node->data); -} - -void *locate_elem(struct list *l,void *elem) { - return(xlocate_elem(l,elem,0,0)); -} - -void flush_list(struct list *l) { - struct list_node *tmp; - while(l->first!=EMPTYLIST) { - tmp=l->first; - l->first=l->first->next; - free(tmp); - tmp=NULL; - } - l->last=EMPTYLIST; - l->count=0; -} - -void destroy_list(struct list *l) { - struct list_node *tmp; - while(l->first!=EMPTYLIST) { - tmp=l->first; - l->first=l->first->next; - free(tmp->data); - tmp->data=NULL; - free(tmp); - tmp=NULL; - } - l->last=EMPTYLIST; - l->count=0; -} diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/01/017cd9106dc291766b7865b51bf3dac4a1e3ffdf.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/01/017cd9106dc291766b7865b51bf3dac4a1e3ffdf.svn-base deleted file mode 100755 index 3af9864397..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/01/017cd9106dc291766b7865b51bf3dac4a1e3ffdf.svn-base +++ /dev/null @@ -1,601 +0,0 @@ -/** - * - * cpulimit - a cpu limiter for Linux - * - * Copyright (C) 2012, by: Gang Liu - * Copyright (C) 2005-2008, by: Angelo Marletta - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - ********************************************************************** - * - * This is a simple program to limit the cpu usage of a process - * If you modify this code, send me a copy please - * - * Date: 30/8/2008 - * Version: 1.2 beta - * Get the latest version at: http://cpulimit.sourceforge.net - * - * Changelog from 1.1: - * - reorganization of the code, splitted in more source files - * - cpu count detection, i.e. if you have 4 cpu, it is possible to limit up to 400% - * - in order to avoid deadlocks, cpulimit now prevents to limit itself - * - option --path eliminated, use --exe instead both for absolute path and file name - * - call setpriority() just once in limit_process() - * - no more segmentation fault when processes exit - * - no more memory corruption when processes exit - * - cpulimit exits if --lazy option is specified and the process terminates - * - target process can be created on-fly given command line - * - light and scalable algorithm for subprocesses detection and limitation - * - mac os support - * - minor enhancements and bugfixes - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "process.h" -#include "procutils.h" -#include "list.h" - -//some useful macro -#ifndef MIN -#define MIN(a,b) (((a)<(b))?(a):(b)) -#endif -#ifndef MAX -#define MAX(a,b) (((a)>(b))?(a):(b)) -#endif - -//control time slot in microseconds -//each slot is splitted in a working slice and a sleeping slice -//TODO: make it adaptive, based on the actual system load -#define TIME_SLOT 100000 - -#define MAX_PRIORITY -10 - -/* GLOBAL VARIABLES */ - -//the "family" -struct process_family pf; -//pid of cpulimit -pid_t cpulimit_pid; -//name of this program (maybe cpulimit...) -char *program_name; - -//number of cpu -int NCPU; - -/* CONFIGURATION VARIABLES */ - -//verbose mode -int verbose = 0; -//lazy mode (exits if there is no process) -int lazy = 0; - -static void *memrchr(const void *s, int c, size_t n) -{ - const unsigned char *start = (const unsigned char*)s; - const unsigned char *end = (const unsigned char*)s; - - end+=n-1; - - while(end>=start) { - if(*end==c) - return (void *)end; - else - end--; - } - - return NULL; -} - -//SIGINT and SIGTERM signal handler -static void quit(int sig) -{ - //let all the processes continue if stopped - struct list_node *node = NULL; - for (node=pf.members.first; node!= NULL; node=node->next) { - struct process *p = (struct process*)(node->data); - kill(p->pid, SIGCONT); - process_close(p); - } - //free all the memory - cleanup_process_family(&pf); - //fix ^C little problem - printf("\r"); - fflush(stdout); - exit(0); -} - -//return t1-t2 in microseconds (no overflow checks, so better watch out!) -static inline unsigned long timediff(const struct timeval *t1,const struct timeval *t2) -{ - return (t1->tv_sec - t2->tv_sec) * 1000000 + (t1->tv_usec - t2->tv_usec); -} - -static void print_usage(FILE *stream, int exit_code) -{ - fprintf(stream, "Usage: %s [OPTIONS...] TARGET\n", program_name); - fprintf(stream, " OPTIONS\n"); - fprintf(stream, " -l, --limit=N percentage of cpu allowed from 0 to %d (required)\n", 100*NCPU); - fprintf(stream, " -v, --verbose show control statistics\n"); - fprintf(stream, " -z, --lazy exit if there is no target process, or if it dies\n"); - fprintf(stream, " -i, --ignore-children don't limit children processes\n"); - fprintf(stream, " -h, --help display this help and exit\n"); - fprintf(stream, " TARGET must be exactly one of these:\n"); - fprintf(stream, " -p, --pid=N pid of the process (implies -z)\n"); - fprintf(stream, " -e, --exe=FILE name of the executable program file or path name\n"); - fprintf(stream, " COMMAND [ARGS] run this command and limit it (implies -z)\n"); - fprintf(stream, "\nReport bugs to .\n"); - exit(exit_code); -} - -static void increase_priority() { - //find the best available nice value - errno = 0; // clear errno first - int old_priority = getpriority(PRIO_PROCESS, 0); - if (errno) - { - perror("getpriority failed"); - return; - } - int priority = old_priority; - while (priority > MAX_PRIORITY && setpriority(PRIO_PROCESS, 0, priority-1) == 0) { - priority--; - } - if (priority != old_priority) { - if (verbose) printf("Priority changed to %d\n", priority); - } - else { - if (verbose) printf("Warning: Cannot change priority. Run as root or renice for best results.\n"); - } -} - -/* Get the number of CPUs */ -static int get_ncpu() { - int ncpu = -1; -#ifdef _SC_NPROCESSORS_ONLN - ncpu = sysconf(_SC_NPROCESSORS_ONLN); -#elif defined __APPLE__ - int mib[2] = {CTL_HW, HW_NCPU}; - size_t len = sizeof(ncpu); - sysctl(mib, 2, &ncpu, &len, NULL, 0); -#endif - return ncpu; -} - -#ifdef __linux__ - -#include - -static int check_proc() -{ - struct statfs mnt; - if (statfs("/proc", &mnt) < 0) - return 0; - if (mnt.f_type!=0x9fa0) - return 0; - return 1; -} -#endif - -void limit_process(pid_t pid, double limit, int ignore_children) -{ - //slice of the slot in which the process is allowed to run - struct timespec twork; - //slice of the slot in which the process is stopped - struct timespec tsleep; - //when the last twork has started - struct timeval startwork; - //when the last twork has finished - struct timeval endwork; - //initialization - memset(&twork, 0, sizeof(struct timespec)); - memset(&tsleep, 0, sizeof(struct timespec)); - memset(&startwork, 0, sizeof(struct timeval)); - memset(&endwork, 0, sizeof(struct timeval)); - //last working time in microseconds - unsigned long workingtime = 0; - //generic list item - struct list_node *node; - //counter - int c = 0; - - //get a better priority - //increase_priority(); - - //build the family - if (create_process_family(&pf, pid) == -1) - { - printf("create process family failed"); - return ; - } - if (ignore_children) { - //delete any process with a different pid than the father - node = pf.members.first; - while (node!=NULL) { - struct process *proc = (struct process*)(node->data); - if (proc->pid != pid) - { - remove_process_from_family(&pf, proc->pid); - node = pf.members.first; - continue; - } - node = node->next; - } - } - - if (!ignore_children && verbose) printf("Members in the family owned by %d: %d\n", pf.father, pf.members.count); - - //rate at which we are keeping active the processes (range 0-1) - //1 means that the process are using all the twork slice - double workingrate = -1; - while(1) { - if (!ignore_children && c%10==0) { - //update the process family (checks only for new members) - int new_children = update_process_family(&pf); - if (verbose && new_children) { - printf("%d new children processes detected (", new_children); - int j; - node = pf.members.last; - for (j=0; jdata))->pid); - if (jprevious; - } - printf(")\n"); - } - } - - if (pf.members.count==0) { - if (verbose) printf("No more processes.\n"); - break; - } - - //total cpu actual usage (range 0-1) - //1 means that the processes are using 100% cpu - double pcpu = -1; - - //estimate how much the controlled processes are using the cpu in the working interval - node = pf.members.first; - while (node!=NULL) { - struct process *proc = (struct process*)(node->data); - if (proc->is_zombie) { - //process is zombie, remove it from family - fprintf(stderr,"Process %d is zombie!\n", proc->pid); - remove_process_from_family(&pf, proc->pid); - node = pf.members.first; - continue; - } - if (process_monitor(proc) != 0) { - //process is dead, remove it from family - if (verbose) fprintf(stderr,"Process %d dead!\n", proc->pid); - remove_process_from_family(&pf, proc->pid); - node = pf.members.first; - continue; - } - node = node->next; - if (proc->cpu_usage<0) { - continue; - } - if (pcpu<0) pcpu = 0; - pcpu += proc->cpu_usage; - } - - //adjust work and sleep time slices - if (pcpu < 0) { - //it's the 1st cycle, initialize workingrate - pcpu = limit; - workingrate = limit; - twork.tv_nsec = TIME_SLOT*limit*1000; - } - else { - //adjust workingrate - workingrate = MIN(workingrate / pcpu * limit, 1); - twork.tv_nsec = TIME_SLOT*1000*workingrate; - } - tsleep.tv_nsec = TIME_SLOT*1000-twork.tv_nsec; - - if (verbose) { - if (c%200==0) - printf("\n%%CPU\twork quantum\tsleep quantum\tactive rate\n"); - if (c%10==0 && c>0) - printf("%0.2lf%%\t%6ld us\t%6ld us\t%0.2lf%%\n",pcpu*100,twork.tv_nsec/1000,tsleep.tv_nsec/1000,workingrate*100); - } - - //resume processes - node = pf.members.first; - while (node!=NULL) { - struct process *proc = (struct process*)(node->data); - if (kill(proc->pid,SIGCONT)!=0) { - //process is dead, remove it from family - if (verbose) fprintf(stderr,"Process %d dead!\n", proc->pid); - remove_process_from_family(&pf, proc->pid); - node = pf.members.first; - continue; - } - node=node->next; - } - - //now processes are free to run (same working slice for all) - gettimeofday(&startwork, NULL); - nanosleep(&twork,NULL); - gettimeofday(&endwork, NULL); - workingtime = timediff(&endwork,&startwork); - - long delay = workingtime-twork.tv_nsec/1000; - if (c>0 && delay>10000) { - //delay is too much! signal to user? - //fprintf(stderr, "%d %ld us\n", c, delay); - } - - if (tsleep.tv_nsec>0) { - //stop only if tsleep>0, instead it's useless - node=pf.members.first; - while (node!=NULL) { - struct process *proc = (struct process*)(node->data); - if (kill(proc->pid,SIGSTOP)!=0) { - //process is dead, remove it from family - if (verbose) fprintf(stderr,"Process %d dead!\n", proc->pid); - remove_process_from_family(&pf, proc->pid); - node=pf.members.first; - continue; - } - node=node->next; - } - //now the processes are sleeping - nanosleep(&tsleep,NULL); - } - c++; - } - cleanup_process_family(&pf); -} - -int main(int argc, char **argv) { - //argument variables - const char *exe = NULL; - int perclimit = 0; - int exe_ok = 0; - int pid_ok = 0; - int limit_ok = 0; - pid_t pid = 0; - int ignore_children = 0; - - //get program name - char *p=(char*)memrchr(argv[0],(unsigned int)'/',strlen(argv[0])); - program_name = p==NULL?argv[0]:(p+1); - //get current pid - cpulimit_pid = getpid(); - //get cpu count - NCPU = get_ncpu(); - - //parse arguments - int next_option; - int option_index = 0; - //A string listing valid short options letters - const char* short_options = "+p:e:l:vzih"; - //An array describing valid long options - const struct option long_options[] = { - { "pid", required_argument, NULL, 'p' }, - { "exe", required_argument, NULL, 'e' }, - { "limit", required_argument, NULL, 'l' }, - { "verbose", no_argument, NULL, 'v' }, - { "lazy", no_argument, NULL, 'z' }, - { "ignore-children", no_argument, NULL, 'i' }, - { "help", no_argument, NULL, 'h' }, - { 0, 0, 0, 0 } - }; - - do { - next_option = getopt_long(argc, argv, short_options,long_options, &option_index); - switch(next_option) { - case 'p': - pid = atoi(optarg); - pid_ok = 1; - break; - case 'e': - exe = optarg; - exe_ok = 1; - break; - case 'l': - perclimit = atoi(optarg); - limit_ok = 1; - break; - case 'v': - verbose = 1; - break; - case 'z': - lazy = 1; - break; - case 'i': - ignore_children = 1; - break; - case 'h': - print_usage(stdout, 1); - break; - case '?': - print_usage(stderr, 1); - break; - case -1: - break; - default: - abort(); - } - } while(next_option != -1); - - if (pid_ok && (pid<=1 || pid>=65536)) { - fprintf(stderr,"Error: Invalid value for argument PID\n"); - print_usage(stderr, 1); - exit(1); - } - if (pid!=0) { - lazy = 1; - } - - if (!limit_ok) { - fprintf(stderr,"Error: You must specify a cpu limit percentage\n"); - print_usage(stderr, 1); - exit(1); - } - double limit = perclimit/100.0; - if (limit<0 || limit >NCPU) { - fprintf(stderr,"Error: limit must be in the range 0-%d00\n", NCPU); - print_usage(stderr, 1); - exit(1); - } - - int command_mode = optind 1) { - fprintf(stderr,"Error: You must specify exactly one target process, either by name, pid, or command line\n"); - print_usage(stderr, 1); - exit(1); - } - - //all arguments are ok! - signal(SIGINT, quit); - signal(SIGTERM, quit); - - //print the number of available cpu - if (verbose) printf("%d cpu detected\n", NCPU); - -#ifdef __linux__ - if (!check_proc()) { - fprintf(stderr, "procfs is not mounted!\nAborting\n"); - exit(-2); - } -#endif - - if (command_mode) { - int i; - //executable file - const char *cmd = argv[optind]; - //command line arguments - char **cmd_args = (char**)malloc((argc-optind+1)*sizeof(char*)); - if (cmd_args==NULL) exit(2); - for (i=0; i 0) { - //parent code - int limiter = fork(); - if (limiter < 0) { - exit(EXIT_FAILURE); - } - else if (limiter > 0) { - //parent - int status_process; - int status_limiter; - waitpid(child, &status_process, 0); - waitpid(limiter, &status_limiter, 0); - if (WIFEXITED(status_process)) { - if (verbose) printf("Process %d terminated with exit status %d\n", child, (int)WEXITSTATUS(status_process)); - exit(WEXITSTATUS(status_process)); - } - printf("Process %d terminated abnormally\n", child); - exit(status_process); - } - else { - //limiter code - if (verbose) printf("Limiting process %d\n",child); - limit_process(child, limit, ignore_children); - exit(0); - } - } - else { - //target process code - int ret = execvp(cmd, cmd_args); - //if we are here there was an error, show it - perror("Error"); - exit(ret); - } - } - - while(1) { - //look for the target process..or wait for it - pid_t ret = 0; - if (pid_ok) { - //search by pid - ret = look_for_process_by_pid(pid); - if (ret == 0) { - printf("No process found\n"); - } - else if (ret < 0) { - printf("Process found but you aren't allowed to control it\n"); - } - } - else { - //search by file or path name - ret = look_for_process_by_name(exe); - if (ret == 0) { - printf("No process found\n"); - } - else if (ret < 0) { - printf("Process found but you aren't allowed to control it\n"); - } - else { - pid = ret; - } - } - if (ret > 0) { - if (ret == cpulimit_pid) { - printf("Process %d is cpulimit itself! Aborting to avoid deadlock\n", ret); - exit(1); - } - printf("Process %d found\n", pid); - //control - limit_process(pid, limit, ignore_children); - } - if (lazy) break; - sleep(2); - }; - - exit(0); -} diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/08/082e091b43bc5c084d5eb04ef6a61b06223a84f8.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/08/082e091b43bc5c084d5eb04ef6a61b06223a84f8.svn-base deleted file mode 100755 index 970c8a9ff4..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/08/082e091b43bc5c084d5eb04ef6a61b06223a84f8.svn-base +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################### -# Gather all flags. -# -CFLAGS+=-DPOSIXLY_CORRECT -Wall -g - -TARGET=cpulimit-ng - -%.o: %.c - $(CC) $(CFLAGS) -c $< -o $@ - -SOURCES = $(wildcard *.c) -OBJS = $(patsubst %.c,%.o, $(SOURCES)) - -$(TARGET) : $(OBJS) - $(CC) `for X in $(OBJS) ; do echo "$$X"; done` -o $(TARGET) $(LIBS) $(LDFLAGS) - -all: $(TARGET) - -clean: - rm -f *.o $(TARGET) diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/2a/2a189807283be6e6944114df69ca13f8f52bb434.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/2a/2a189807283be6e6944114df69ca13f8f52bb434.svn-base deleted file mode 100755 index 82136aadf4..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/2a/2a189807283be6e6944114df69ca13f8f52bb434.svn-base +++ /dev/null @@ -1,76 +0,0 @@ -############################################## -# OpenWrt Makefile for cpulimit-ng program -# -# -# Most of the variables used here are defined in -# the include directives below. We just need to -# specify a basic description of the package, -# where to build our program, where to find -# the source files, and where to install the -# compiled program on the router. -# -# Be very careful of spacing in this file. -# Indents should be tabs, not spaces, and -# there should be no trailing whitespace in -# lines that are not commented. -# -############################################## - -include $(TOPDIR)/rules.mk - -# Name and release number of this package -PKG_NAME:=cpulimit-ng -PKG_VERSION:=1.2 -PKG_RELEASE:=1 - -# This specifies the directory where we're going to build the program. -# The root build directory, $(BUILD_DIR), is by default the build_mipsel -# directory in your OpenWrt SDK directory -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -# Specify package information for this program. -# The variables defined here should be self explanatory. -define Package/cpulimit-ng - SECTION:=utils - CATEGORY:=Utilities - TITLE:=CPU Usage Limiter for Linux - description:=\ - cpulimit-ng is a simple program which attempts to \\\ - limit the cpu usage of a process (expressed in \\\ - percentage, not in cpu time). -endef - -# Specify what needs to be done to prepare for building the package. -# In our case, we need to copy the source files to the build directory. -# This is NOT the default. The default uses the PKG_SOURCE_URL and the -# PKG_SOURCE which is not defined here to download the source from the web. -# In order to just build a simple program that we have just written, it is -# much easier to do it this way. -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./src/* $(PKG_BUILD_DIR)/ -endef - -# We do not need to define Build/Configure or Build/Compile directives -# The defaults are appropriate for compiling a simple program such as this one - -# Specify where and how to install the program. Since we only have one file, -# the cpulimit-ng executable, install it by copying it to the /bin directory on -# the router. The $(1) variable represents the root directory on the router running -# OpenWrt. The $(INSTALL_DIR) variable contains a command to prepare the install -# directory if it does not already exist. Likewise $(INSTALL_BIN) contains the -# command to copy the binary file from its current location (in our case the build -# directory) to the install directory. -define Package/cpulimit-ng/install - $(INSTALL_DIR) $(1)/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/cpulimit-ng $(1)/bin/ -endef - -# This line executes the necessary commands to compile our program. -# The above define directives specify all the information needed, but this -# line calls BuildPackage which in turn actually uses this information to -# build a package. -$(eval $(call BuildPackage,cpulimit-ng)) - diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/85/850938d5ba6ec8875e3b72738e1b7ef6f79b27d8.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/85/850938d5ba6ec8875e3b72738e1b7ef6f79b27d8.svn-base deleted file mode 100755 index b5a91a3277..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/85/850938d5ba6ec8875e3b72738e1b7ef6f79b27d8.svn-base +++ /dev/null @@ -1,94 +0,0 @@ -/** - * - * cpulimit - a cpu limiter for Linux - * - * Copyright (C) 2005-2008, by: Angelo Marletta - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __PROCUTILS_H - -#define __PROCUTILS_H - -#include -#include - -#include "list.h" -#include "process.h" - -#define PIDHASH_SZ 1024 -#define pid_hashfn(x) ((((x) >> 8) ^ (x)) & (PIDHASH_SZ - 1)) - -// a hierarchy of processes -struct process_family { - //the (god)father of the process family - pid_t father; - //process list (father process is the first element) - //elements are struct process - struct list members; - //non-members list - //hashtable with all the processes (array of struct list of struct process) - struct list *proctable[PIDHASH_SZ]; - //total process count - int count; -}; - -//TODO: use this object in proctable and delete member in struct process -struct table_item { - struct process *proc; - //1 if the process is a member of the family - int member; -}; - -// object to enumerate running processes -struct process_iterator { -#ifdef __linux__ - DIR *dip; - struct dirent *dit; -#elif defined __APPLE__ - struct kinfo_proc *procList; - int count; - int c; -#elif defined __hpux - int count; -#endif - struct process *current; -}; - -// searches for all the processes derived from father and stores them -// in the process family struct -int create_process_family(struct process_family *f, pid_t father); - -// checks if there are new processes born in the specified family -// if any they are added to the members list -// the number of new born processes is returned -int update_process_family(struct process_family *f); - -// removes a process from the family by its pid -void remove_process_from_family(struct process_family *f, pid_t pid); - -// free the heap memory used by a process family -void cleanup_process_family(struct process_family *f); - -// searches a process given the name of the executable file, or its absolute path -// returns the pid, or 0 if it's not found -int look_for_process_by_name(const char *process_name); - -// searches a process given its pid -// returns the pid, or 0 if it's not found -int look_for_process_by_pid(pid_t pid); - -#endif diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/90/90187d65d9aec8d579f1c275122c039d0274fd2f.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/90/90187d65d9aec8d579f1c275122c039d0274fd2f.svn-base deleted file mode 100755 index e61c08da63..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/90/90187d65d9aec8d579f1c275122c039d0274fd2f.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -based on cpulimit@sf svn version revision 41 -Copyright (C) 2005-2008, by: Angelo Marletta diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/92/9235e0e0ddbf58512ac7e37d5abe866bf9b2758b.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/92/9235e0e0ddbf58512ac7e37d5abe866bf9b2758b.svn-base deleted file mode 100755 index 0280ad6873..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/92/9235e0e0ddbf58512ac7e37d5abe866bf9b2758b.svn-base +++ /dev/null @@ -1,88 +0,0 @@ -/** - * - * cpulimit - a cpu limiter for Linux - * - * Copyright (C) 2005-2008, by: Angelo Marletta - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __PROCESS_H - -#define __PROCESS_H - -#include -#include -#include - -//USER_HZ detection, from openssl code -#ifndef HZ -# if defined(_SC_CLK_TCK) \ - && (!defined(OPENSSL_SYS_VMS) || __CTRL_VER >= 70000000) -# define HZ ((double)sysconf(_SC_CLK_TCK)) -# else -# ifndef CLK_TCK -# ifndef _BSD_CLK_TCK_ /* FreeBSD hack */ -# define HZ 100.0 -# else /* _BSD_CLK_TCK_ */ -# define HZ ((double)_BSD_CLK_TCK_) -# endif -# else /* CLK_TCK */ -# define HZ ((double)CLK_TCK) -# endif -# endif -#endif - -// process descriptor -struct process { - //pid of the process - pid_t pid; - //pid of the process - pid_t ppid; - //start time - int starttime; - //is member of the family? - int member; //TODO: delete this field - //total number of jiffies used by the process at time last_sample - int last_jiffies; - //timestamp when last_jiffies and cpu_usage was calculated - struct timeval last_sample; - //actual cpu usage estimation (value in range 0-1) - double cpu_usage; - //1 if the process is zombie - int is_zombie; - //absolute path of the executable file - char command[PATH_MAX+1]; - - //system-dependent members -//TODO: delete these members for the sake of portability? -#ifdef __linux__ - //preallocate buffers for performance - //name of /proc/PID/stat file - char stat_file[20]; - //read buffer for /proc filesystem - char buffer[1024]; -#endif -}; - -int get_proc_info(struct process *p, pid_t pid); - -int process_init(struct process *proc, pid_t pid); - -int process_monitor(struct process *proc); - -int process_close(struct process *proc); - -#endif diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/9b/9bf53bde6f0b946a5c3f2abb79b5e3724ef909bc.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/9b/9bf53bde6f0b946a5c3f2abb79b5e3724ef909bc.svn-base deleted file mode 100755 index 6e297eadd7..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/9b/9bf53bde6f0b946a5c3f2abb79b5e3724ef909bc.svn-base +++ /dev/null @@ -1,283 +0,0 @@ -/** - * - * cpulimit - a cpu limiter for Linux - * - * Copyright (C) 2012, by: Gang Liu - * Copyright (C) 2005-2008, by: Angelo Marletta - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -//TODO: add documentation to public functions - -#include -#include -#include -#include -#include -#include -#include - -#include "process.h" - -#ifdef __APPLE__ -#include -#include -#endif - -#ifdef __linux__ -int get_proc_info(struct process *p, pid_t pid) { -/* static char statfile[20]; - static char buffer[64]; - int ret; - sprintf(statfile, "/proc/%d/stat", pid); - FILE *fd = fopen(statfile, "r"); - if (fd==NULL) return -1; - fgets(buffer, sizeof(buffer), fd); - fclose(fd); - - char state; - - int n = sscanf(buffer, "%d %s %c %d %d %d %d %d " - "%lu %lu %lu %lu %lu %lu %lu " - "%ld %ld %ld %ld %ld %ld " - "%lu ", - &p->pid, - &p->command, - &state, - NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, - &utime,&stime,&cutime,&cstime, - NULL,NULL,NULL,NULL, - &starttime, - );*/ - return 0; -} -#elif defined __APPLE__ -int get_proc_info(struct process *p, pid_t pid) { - int err; - struct kinfo_proc *result = NULL; - size_t length; - int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid}; - - /* We start by calling sysctl with result == NULL and length == 0. - That will succeed, and set length to the appropriate length. - We then allocate a buffer of that size and call sysctl again - with that buffer. - */ - length = 0; - err = sysctl(mib, 4, NULL, &length, NULL, 0); - if (err == -1) { - err = errno; - } - if (err == 0) { - result = malloc(length); - err = sysctl(mib, 4, result, &length, NULL, 0); - if (err == -1) - err = errno; - if (err == ENOMEM) { - free(result); /* clean up */ - result = NULL; - } - } - - p->pid = result->kp_proc.p_pid; - p->ppid = result->kp_eproc.e_ppid; - p->starttime = result->kp_proc.p_starttime.tv_sec; - p->last_jiffies = result->kp_proc.p_cpticks; - //p_pctcpu - - return 0; -} -#endif - -#ifdef __linux__ -// TODO man 5 proc, scanf, see above get_proc_info -static char * get_proc_stat_field(const char * statfile, int idx) -{ - char buffer[1024]; - FILE *fd = fopen(statfile, "r"); - if (fd==NULL) - { - perror("open process stat file failed"); - return NULL; - } - if (fgets(buffer, sizeof(buffer), fd) == NULL) - { - perror("read process stat file failed"); - fclose(fd); - return NULL; - } - fclose(fd); - - char *p = buffer; - int slen = strlen(buffer); - int sp = idx; - while (sp-- && p != NULL && (p+1) < (buffer + slen)) - p = strchr(p+1, ' '); - if (p==NULL || (p+1) >= (buffer + slen)) - { - printf("process stat file format error"); - return NULL; - } - - char *q = strchr(p+1, ' '); - if (q==NULL) - { - printf("process stat file format error"); - return NULL; - } - *q = '\0'; - char *item = (char *)malloc(strlen(p+1) + 1); - if (item != NULL) - { - snprintf(item, strlen(p+1) + 1, "%s", p+1); - } - - return item; -} - -#endif - -// returns the start time of a process (used with pid to identify a process) -static unsigned long long get_starttime(pid_t pid) -{ -#ifdef __linux__ - char file[20]; - snprintf(file, sizeof(file), "/proc/%d/stat", pid); - //start time of the process - char *tbuf = get_proc_stat_field(file, 21); - if (tbuf == NULL) - return -1; - unsigned long long starttime = 0; - sscanf(tbuf, "%llu", &starttime); - free(tbuf); - return starttime; -#elif defined __APPLE__ - struct process proc; - get_proc_info(&proc, pid); - return proc.starttime; -#endif -} - -static int get_jiffies(struct process *proc) { -#ifdef __linux__ - //user mode jiffies - char *tbuf = get_proc_stat_field(proc->stat_file, 13); - if (tbuf==NULL) - return -1; - unsigned long utime = 0; - sscanf(tbuf, "%lu", &utime); - free(tbuf); - //kernel mode jiffies - tbuf = get_proc_stat_field(proc->stat_file, 14); - if (tbuf==NULL) - return -1; - unsigned long stime = 0; - sscanf(tbuf, "%lu", &stime); - free(tbuf); - return utime+stime; -#elif defined __APPLE__ - struct process proc2; - get_proc_info(&proc2, proc->pid); - return proc2.last_jiffies; -#endif -} - -//return t1-t2 in microseconds (no overflow checks, so better watch out!) -static inline unsigned long timediff(const struct timeval *t1,const struct timeval *t2) -{ - return (t1->tv_sec - t2->tv_sec) * 1000000 + (t1->tv_usec - t2->tv_usec); -} - -/*static int*/ int process_update(struct process *proc) { - //TODO: get any process statistic here - //check that starttime is not changed(?), update jiffies, parent, zombie status - return 0; -} - -int process_init(struct process *proc, int pid) -{ - //general members - proc->pid = pid; - proc->starttime = get_starttime(pid); - if (proc->starttime == -1) - return -1; - //printf("process starttime %d\n", proc->starttime); - proc->cpu_usage = 0; - memset(&(proc->last_sample), 0, sizeof(struct timeval)); - proc->last_jiffies = -1; - proc->is_zombie = 0; - //system dependent members -#ifdef __linux__ -//TODO: delete these members for the sake of portability? - //test /proc file descriptor for reading - snprintf(proc->stat_file, sizeof(proc->stat_file), "/proc/%d/stat", pid); -// FILE *fd = fopen(proc->stat_file, "r"); -// if (fd == NULL) return 1; -// fclose(fd); -#endif - return 0; -} - -//parameter in range 0-1 -#define ALFA 0.08 - -int process_monitor(struct process *proc) -{ - int j = get_jiffies(proc); - if (j<0) return -1; //error retrieving jiffies count (maybe the process is dead) - struct timeval now; - gettimeofday(&now, NULL); - if (proc->last_jiffies==-1) { - //store current time - proc->last_sample.tv_sec = now.tv_sec; - proc->last_sample.tv_usec = now.tv_usec; - //store current jiffies - proc->last_jiffies = j; - //it's the first sample, cannot figure out the cpu usage - proc->cpu_usage = -1; - return 0; - } - //time from previous sample (in ns) - long dt = timediff(&now, &(proc->last_sample)); - //how many jiffies in dt? - double max_jiffies = dt * HZ / 1000000.0; - double sample = (j - proc->last_jiffies) / max_jiffies; - if (proc->cpu_usage == -1) { - //initialization - proc->cpu_usage = sample; - } - else { - //usage adjustment - proc->cpu_usage = (1-ALFA) * proc->cpu_usage + ALFA * sample; - } - - //store current time - proc->last_sample.tv_sec = now.tv_sec; - proc->last_sample.tv_usec = now.tv_usec; - //store current jiffies - proc->last_jiffies = j; - - return 0; -} - -int process_close(struct process *proc) -{ - if (kill(proc->pid,SIGCONT)!=0) { - fprintf(stderr,"Process %d is already dead!\n", proc->pid); - } - proc->pid = 0; - return 0; -} diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/ab/ab83effc7cea777dff780ce210a467da64228e2c.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/ab/ab83effc7cea777dff780ce210a467da64228e2c.svn-base deleted file mode 100755 index 387f79c7e5..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/ab/ab83effc7cea777dff780ce210a467da64228e2c.svn-base +++ /dev/null @@ -1,143 +0,0 @@ -/** - * - * cpulimit - a cpu limiter for Linux - * - * Copyright (C) 2005-2008, by: Angelo Marletta - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - ********************************************************************** - * - * Dynamic list interface - * - */ - -#ifndef __LIST__ - -#define __LIST__ - -#ifndef TRUE - #define TRUE 1 - #define FALSE 0 -#endif - -struct list_node { - //pointer to the content of the node - void *data; - //pointer to previous node - struct list_node *previous; - //pointer to next node - struct list_node *next; -}; - -struct list { - //first node - struct list_node *first; - //last node - struct list_node *last; - //size of the search key in bytes - int keysize; - //element count - int count; -}; - -/* - * Initialize a list, with a specified key size - */ -void init_list(struct list *l,int keysize); - -/* - * Add a new element at the end of the list - * return the pointer to the new node - */ -struct list_node *add_elem(struct list *l,void *elem); - -/* - * Delete a node - */ -void delete_node(struct list *l,struct list_node *node); - -/* - * Delete a node from the list, even the content pointed by it - * Use only when the content is a dynamically allocated pointer - */ -void destroy_node(struct list *l,struct list_node *node); - -/* - * Check whether a list is empty or not - */ -int is_empty_list(struct list *l); - -/* - * Return the element count of the list - */ -int get_list_count(struct list *l); - -/* - * Return the first element (content of the node) from the list - */ -void *first_elem(struct list *l); - -/* - * Return the first node from the list - */ -struct list_node *first_node(struct list *l); - -/* - * Return the last element (content of the node) from the list - */ -void *last_elem(struct list *l); - -/* - * Return the last node from the list - */ -struct list_node *last_node(struct list *l); - -/* - * Search an element of the list by content - * the comparison is done from the specified offset and for a specified length - * if offset=0, the comparison starts from the address pointed by data - * if length=0, default keysize is used for length - * if the element is found, return the node address - * else return NULL - */ -struct list_node *xlocate_node(struct list *l,void *elem,int offset,int length); - -/* - * The same of xlocate_node(), but return the content of the node - */ -void *xlocate_elem(struct list *l,void *elem,int offset,int length); - -/* - * The same of calling xlocate_node() with offset=0 and length=0 - */ -struct list_node *locate_node(struct list *l,void *elem); - -/* - * The same of locate_node, but return the content of the node - */ -void *locate_elem(struct list *l,void *elem); - -/* - * Delete all the elements in the list - */ -void flush_list(struct list *l); - -/* - * Delete every element in the list, and free the memory pointed by all the node data - */ -void destroy_list(struct list *l); - -#endif diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/b1/b1aea664a1b0881a70c715488fb183ed9f172b4b.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/b1/b1aea664a1b0881a70c715488fb183ed9f172b4b.svn-base deleted file mode 100755 index fbb303f537..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/b1/b1aea664a1b0881a70c715488fb183ed9f172b4b.svn-base +++ /dev/null @@ -1,544 +0,0 @@ -/** - * - * cpulimit - a cpu limiter for Linux - * - * Copyright (C) 2012, by: Gang Liu - * Copyright (C) 2005-2008, by: Angelo Marletta - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "procutils.h" - -#ifdef __APPLE__ -#include -#include -#endif - -/* PROCESS STATISTICS FUNCTIONS */ - -//deprecated -// returns pid of the parent process -static pid_t getppid_of(pid_t pid) -{ -#ifdef __linux__ - char file[20]; - char buffer[1024]; - snprintf(file, sizeof(file), "/proc/%d/stat", pid); - FILE *fd = fopen(file, "r"); - if (fd==NULL) return -1; - if (fgets(buffer, sizeof(buffer), fd)==NULL) - { - fclose(fd); - return -1; - } - fclose(fd); - char *p = buffer; - p = memchr(p+1,')', sizeof(buffer) - (p-buffer)); - int sp = 2; - while (sp--) - p = memchr(p+1,' ',sizeof(buffer) - (p-buffer)); - //pid of the parent process - pid_t ppid = atoi(p+1); - return ppid; -#elif defined __APPLE__ - struct process p; - get_proc_info(&p, pid); - return p.ppid; -#endif -} - -#ifdef __linux__ -// detects whether a process is a kernel thread or not -static int is_kernel_thread(pid_t pid) -{ - char statfile[20]; - char buffer[64]; - int ret; - snprintf(statfile, sizeof(statfile), "/proc/%d/statm", pid); - FILE *fd = fopen(statfile, "r"); - if (fd==NULL) - { - perror("open process statm file failed"); - return -1; - } - if (fgets(buffer, sizeof(buffer), fd)==NULL) - { - perror("read process statm file failed"); - fclose(fd); - return -1; - } - ret = strncmp(buffer,"0 0 0",3)==0; - fclose(fd); - return ret; -} -#endif - -//deprecated -// returns 1 if pid is an existing pid, 0 otherwise -static int process_exists(pid_t pid) { -#ifdef __linux__ - char procdir[20]; - struct stat procstat; - snprintf(procdir, sizeof(procdir), "/proc/%d", pid); - return stat(procdir, &procstat)==0; -#elif defined __APPLE__ - struct process p; - return get_proc_info(&p, pid)==0; -#endif -} - -/* PID HASH FUNCTIONS */ - -static int hash_process(struct process_family *f, struct process *p) -{ - int ret; - struct list **l = &(f->proctable[pid_hashfn(p->pid)]); - if (*l == NULL) { - //there is no process in this hashtable item - //allocate the list - *l = (struct list*)malloc(sizeof(struct list)); - init_list(*l, 4); - add_elem(*l, p); - ret = 0; - f->count++; - } - else { - //list already exists - struct process *tmp = (struct process*)locate_elem(*l, p); - if (tmp != NULL) { - //update process info - memcpy(tmp, p, sizeof(struct process)); - free(p); - p = NULL; - ret = 1; - } - else { - //add new process - add_elem(*l, p); - ret = 0; - f->count++; - } - } - return ret; -} - -static void unhash_process(struct process_family *f, pid_t pid) { - //remove process from hashtable - struct list **l = &(f->proctable[pid_hashfn(pid)]); - if (*l == NULL) - return; //nothing done - struct list_node *node = locate_node(*l, &pid); - if (node != NULL) - destroy_node(*l, node); - f->count--; -} - -static struct process *seek_process(struct process_family *f, pid_t pid) -{ - struct list **l = &(f->proctable[pid_hashfn(pid)]); - return (*l != NULL) ? (struct process*)locate_elem(*l, &pid) : NULL; -} - -/* PROCESS ITERATOR STUFF */ - -// creates an object that browse all running processes -int init_process_iterator(struct process_iterator *i) { -#ifdef __linux__ - //open a directory stream to /proc directory - if ((i->dip = opendir("/proc")) == NULL) { - perror("opendir"); - return -1; - } -#elif defined __APPLE__ - - int err; - struct kinfo_proc *result = NULL; - size_t length; - int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0}; - - /* We start by calling sysctl with result == NULL and length == 0. - That will succeed, and set length to the appropriate length. - We then allocate a buffer of that size and call sysctl again - with that buffer. - */ - length = 0; - err = sysctl(mib, 4, NULL, &length, NULL, 0); - if (err == -1) { - err = errno; - } - if (err == 0) { - result = malloc(length); - err = sysctl(mib, 4, result, &length, NULL, 0); - if (err == -1) - err = errno; - if (err == ENOMEM) { - free(result); /* clean up */ - result = NULL; - } - } - - i->procList = result; - i->count = err == 0 ? length / sizeof *result : 0; - i->c = 0; - -#endif - i->current = (struct process*)malloc(sizeof(struct process)); - if (i->current == NULL) - { - perror("malloc falied"); - closedir(i->dip); - return -1; - } - memset(i->current, 0, sizeof(struct process)); - return 0; -} - -// reads the next user process from /process -// automatic closing if the end of the list is reached -int read_next_process(struct process_iterator *i) { -#ifdef __linux__ - pid_t pid = 0; -//TODO read this to port to other systems: http://www.steve.org.uk/Reference/Unix/faq_8.html#SEC85 - //read in from /proc and seek for process dirs - while ((i->dit = readdir(i->dip)) != NULL) { - if(strtok(i->dit->d_name, "0123456789") != NULL) - continue; - pid = atoi(i->dit->d_name); - if (is_kernel_thread(pid)) - { - pid = 0; - continue; - } - //return the first found process - break; - } - if (pid == 0) { - //no more processes - closedir(i->dip); - i->dip = NULL; - free(i->current); - i->current = NULL; - return -1; - } - //read the executable link - char statfile[20]; - snprintf(statfile, sizeof(statfile), "/proc/%d/cmdline",pid); - FILE *fd = fopen(statfile, "r"); - if (fd == NULL) - { - perror("open process cmdline file failed"); - return -1; - } - char buffer[1024]; - if (fgets(buffer, sizeof(buffer), fd)==NULL) - { - perror("read process cmdline file falied"); - fclose(fd); - return -2; - } - fclose(fd); - sscanf(buffer, "%s", (char*)&i->current->command); - i->current->pid = pid; - -#elif defined __APPLE__ - if (i->c >= i->count) { - //no more processes - free(i->procList); - i->procList = NULL; - free(i->current); - i->current = NULL; - return -1; - } - i->current->pid = i->procList[i->c].kp_proc.p_pid; - strncpy(i->current->command, i->procList[i->c].kp_proc.p_comm, MAXCOMLEN); -printf("%d %d %s\n", i->c, i->current->pid, i->current->command);//i->procList[i->c].kp_proc.p_comm); -//printf("%d %d %s\n", i->c, i->current->pid, i->proc[i->c].kp_proc.p_comm); - i->c++; -#endif - return 0; -} - -/* PUBLIC FUNCTIONS */ - -// search for all the processes derived from father and stores them -// in the process family struct -int create_process_family(struct process_family *f, pid_t father) -{ - //process iterator - struct process_iterator iter; - if (init_process_iterator(&iter) == -1) - return -1; - - //process list initialization (4 bytes key) - init_list(&(f->members), 4); - //hashtable initialization - memset(&(f->proctable), 0, sizeof(f->proctable)); - f->count = 0; - f->father = father; - - int pid = 0; - while (read_next_process(&iter)==0) { - pid = iter.current->pid; - //check if process belongs to the family - int ppid = pid; - //TODO: optimize adding also these parents, and continue if process is already present - while(ppid!=1 && ppid!=father) { - //pid_t f = getppid(ppid); - ppid = getppid_of(ppid); - //printf("p1 %d, p2 %d\n", f, ppid); - } - //allocate process descriptor - struct process *p = (struct process*)malloc(sizeof(struct process)); - //init process - if (process_init(p, pid) == -1) - { - printf("init process failed\n"); - free(p); - continue; - } - - if (ppid==1) { - //the init process - p->member = 0; - } - else if (pid != getpid()) { - //add to members (but exclude the current cpulimit process!) - p->member = 1; - add_elem(&(f->members), p); - } - //add to hashtable - hash_process(f, p); - } - - if (iter.dip != NULL) - closedir(iter.dip); - if (iter.current != NULL) - free(iter.current); - - return 0; -} - -// checks if there are new processes born in the specified family -// if any they are added to the members list -// the number of new born processes is returned -int update_process_family(struct process_family *f) -{ - //process iterator - struct process_iterator iter; - if (init_process_iterator(&iter) == -1) - return -1; - int ret = 0; - int pid = 0; - while (read_next_process(&iter)==0) { - pid = iter.current->pid; - struct process *newp = seek_process(f, pid); - if (newp != NULL) continue; //already known //TODO: what if newp is a new process with the same PID?? - //the process is new, check if it belongs to the family - int ppid = getppid_of(pid); - //search the youngest known ancestor of the process - struct process *ancestor = NULL; - while((ancestor=seek_process(f, ppid))==NULL) { - ppid = getppid_of(ppid); - } - if (ancestor == NULL) { - //this should never happen! if does, find and correct the bug - fprintf(stderr, "Fatal bug! Process %d is without parent\n", pid); - exit(1); - } - //allocate and insert the process - struct process *p = (struct process*)malloc(sizeof(struct process)); - //init process - if (process_init(p, pid) == -1) - { - printf("init process failed\n"); - free(p); - continue; - } - if (ancestor->member) { - //add to members - p->member = 1; - add_elem(&(f->members), p); - ret++; - } - else { - //not a member - p->member = 0; - } - //add to hashtable - hash_process(f, p); - } - - if (iter.dip != NULL) - closedir(iter.dip); - if (iter.current != NULL) - free(iter.current); - - // remove non-member process if exited - struct list pid_list; - init_list(&pid_list, 0); - int i; - struct list_node *node = NULL; - int size = sizeof(f->proctable) / sizeof(struct process*); - for (i=0; iproctable[i] != NULL) { - for (node=f->proctable[i]->first; node!=NULL; node=node->next) { - struct process *p = (struct process*)(node->data); - if (!p->member && !process_exists(p->pid)) - add_elem(&pid_list, &p->pid); - } - } - } - - for (node=pid_list.first; node!=NULL; node=node->next) { - pid_t * p = (pid_t *)(node->data); - remove_process_from_family(f, *p); - } - flush_list(&pid_list); - - return ret; -} - -// removes a process from the family by its pid -void remove_process_from_family(struct process_family *f, pid_t pid) -{ - struct list_node *node = locate_node(&(f->members), &pid); - if (node != NULL) { -// struct process *p = (struct process*)(node->data); -// free(p->history); -// p->history = NULL; - delete_node(&(f->members), node); - } - unhash_process(f, pid); -} - -// free the heap memory used by a process family -void cleanup_process_family(struct process_family *f) -{ - int i; - int size = sizeof(f->proctable) / sizeof(struct process*); - for (i=0; iproctable[i] != NULL) { - //free() history for each process - struct list_node *node = NULL; - for (node=f->proctable[i]->first; node!=NULL; node=node->next) { -// struct process *p = (struct process*)(node->data); -// free(p->history); -// p->history = NULL; - } - destroy_list(f->proctable[i]); - free(f->proctable[i]); - f->proctable[i] = NULL; - } - } - flush_list(&(f->members)); - f->count = 0; - f->father = 0; -} - -// look for a process by pid -// search_pid : pid of the wanted process -// return: pid of the found process, if it is found -// 0, if it's not found -// negative pid, if it is found but it's not possible to control it -int look_for_process_by_pid(pid_t pid) -{ - if (process_exists(pid)) - return (kill(pid,0)==0) ? pid : -pid; - return 0; -} - -// look for a process with a given name -// process: the name of the wanted process. it can be an absolute path name to the executable file -// or just the file name -// return: pid of the found process, if it is found -// 0, if it's not found -// negative pid, if it is found but it's not possible to control it -int look_for_process_by_name(const char *process_name) -{ - //whether the variable process_name is the absolute path or not - int is_absolute_path = process_name[0] == '/'; - //flag indicating if the a process with given name was found - int found = 0; - - //process iterator - struct process_iterator iter; - if (init_process_iterator(&iter) == -1) - return -1; - pid_t pid = 0; - -printf("name\n"); - - while (read_next_process(&iter)==0) { - pid = iter.current->pid; - - int size = strlen(iter.current->command); - - found = 0; - if (is_absolute_path && strncmp(iter.current->command, process_name, size)==0 && size==strlen(process_name)) { - //process found - found = 1; - } - else { - //process found - if (strncmp(iter.current->command + size - strlen(process_name), process_name, strlen(process_name))==0) { - found = 1; - } - } - if (found==1) { - if (kill(pid,SIGCONT)==0) { - //process is ok! - break; - } - else { - //we don't have permission to send signal to that process - //so, don't exit from the loop and look for another one with the same name - found = -1; - } - } - } - - if (iter.dip != NULL) - closedir(iter.dip); - if (iter.current != NULL) - free(iter.current); - - if (found == 1) { - //ok, the process was found - return pid; - } - else if (found == 0) { - //no process found - return 0; - } - else if (found == -1) { - //the process was found, but we haven't permission to control it - return -pid; - } - //this MUST NOT happen - return 0; -} - diff --git a/package/ntlf9t/cpulimit-ng/.svn/pristine/d2/d219ad87853a6ceb541df6edae8ac0d500efe25f.svn-base b/package/ntlf9t/cpulimit-ng/.svn/pristine/d2/d219ad87853a6ceb541df6edae8ac0d500efe25f.svn-base deleted file mode 100755 index d1a001861f..0000000000 --- a/package/ntlf9t/cpulimit-ng/.svn/pristine/d2/d219ad87853a6ceb541df6edae8ac0d500efe25f.svn-base +++ /dev/null @@ -1,47 +0,0 @@ -Cpulimit 1.2 - -======= - About -======= - -Cpulimit is a program that attempts to limit the cpu usage of a process (expressed in percentage, not in cpu time). It is useful to control batch jobs, when you don't want they eat too much cpu. The goal it to not let a proces run for more than a specified time ratio. It does not act on the nice value or other scheduling priority stuff, but on the real cpu usage. Also, it is able to adapt itself to the overall system load, dynamically and quickly. -The control of the used cpu amount is done sending properly SIGSTOP and SIGCONT POSIX signals to processes. -All the children processes and threads of the specified process will share the same percent of cpu. - -Developed by Angelo Marletta. -Please send your feedback, bug reports, feature requests or just thanks :) to marlonx80@hotmail.com. - -===================== - Changelog since 1.1 -===================== - -- reorganization of the code, splitted in more source files -- cpu count detection, i.e. if you have 4 cpu, it is possible to limit up to 400% -- in order to avoid deadlocks, cpulimit now prevents to limit itself -- option --path eliminated, use --exe instead both for absolute path and file name -- call setpriority() just once -- no more segmentation fault when processes exit -- no more memory corruption when processes exit -- cpulimit exits if --lazy option is specified and the process terminates -- target process can be created on-fly given command line -- light and scalable algorithm for subprocesses detection and limitation -- mac os support -- minor enhancements and bugfixes - -============================ - Get the latest source code -============================ - -You can checkout the latest code from sourceforge Subversion repository, running: - -svn checkout https://cpulimit.svn.sourceforge.net/svnroot/cpulimit cpulimit - -Of course this is the development version, so you may experience bugs (please signal them and your soul will be saved!) - - -============== - Installation -============== - -Run 'make' and place the executable file 'cpulimit' wherever you want. -Type 'cpulimit --help' to get documentation on available options. diff --git a/package/ntlf9t/cpulimit-ng/.svn/wc.db b/package/ntlf9t/cpulimit-ng/.svn/wc.db deleted file mode 100755 index b6854f6c6e30aa6712adaad85255f722d3b8f327..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 40960 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 +define Pacakge/cpulimit-ng/description + cpulimit-ng is a simple program which attempts to limit the cpu + usage of a process (expressed in percentage, not in cpu time). +endef -# We do not need to define Build/Configure or Build/Compile directives -# The defaults are appropriate for compiling a simple program such as this one - -# Specify where and how to install the program. Since we only have one file, -# the cpulimit-ng executable, install it by copying it to the /bin directory on -# the router. The $(1) variable represents the root directory on the router running -# OpenWrt. The $(INSTALL_DIR) variable contains a command to prepare the install -# directory if it does not already exist. Likewise $(INSTALL_BIN) contains the -# command to copy the binary file from its current location (in our case the build -# directory) to the install directory. define Package/cpulimit-ng/install $(INSTALL_DIR) $(1)/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/cpulimit-ng $(1)/bin/ endef -# This line executes the necessary commands to compile our program. -# The above define directives specify all the information needed, but this -# line calls BuildPackage which in turn actually uses this information to -# build a package. $(eval $(call BuildPackage,cpulimit-ng)) - diff --git a/package/ntlf9t/cpulimit-ng/readme-ng.txt b/package/ntlf9t/cpulimit-ng/readme-ng.txt deleted file mode 100644 index e61c08da63..0000000000 --- a/package/ntlf9t/cpulimit-ng/readme-ng.txt +++ /dev/null @@ -1,2 +0,0 @@ -based on cpulimit@sf svn version revision 41 -Copyright (C) 2005-2008, by: Angelo Marletta diff --git a/package/ntlf9t/cpulimit/Makefile b/package/ntlf9t/cpulimit/Makefile index 07c2e398d1..a9efdeda1e 100644 --- a/package/ntlf9t/cpulimit/Makefile +++ b/package/ntlf9t/cpulimit/Makefile @@ -1,32 +1,23 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cpulimit -PKG_VERSION:=cabeb9947c -PKG_RELEASE:=1 -PKG_REV:=cabeb9947ccddd9a6e6ba14503e2a33063ac1b21 +PKG_VERSION:=0.2 +PKG_RELEASE:=$(AUTORELEASE) -#PKG_SOURCE_PROTO:=git -#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -#PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -#PKG_SOURCE_URL:=https://github.com/opsengine/cpulimit.git -#PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk define Package/cpulimit + SECTION:=utils CATEGORY:=Utilities TITLE:=cpulimit URL:=https://github.com/opsengine/cpulimit.git endef -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./src/* $(PKG_BUILD_DIR)/ -endef - define Package/cpulimit/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/cpulimit $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/cpulimit $(1)/usr/bin/ endef diff --git a/package/ntlf9t/dvb-firmware/Makefile b/package/ntlf9t/dvb-firmware/Makefile new file mode 100644 index 0000000000..8492131de1 --- /dev/null +++ b/package/ntlf9t/dvb-firmware/Makefile @@ -0,0 +1,32 @@ +# +# Copyright (C) 2017 McMCC +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dvb-firmware +PKG_VERSION:=1.0 +PKG_RELEASE:=2 + +include $(INCLUDE_DIR)/package.mk + +define Package/dvb-firmware + SECTION:=firmware + CATEGORY:=Firmware + TITLE:=dvb-firmware megapack +endef + +define Package/dvb-firmware/description + dvb-firmware is specialised software that is both specific to some hardware + and also integral for its proper functioning. +endef + +define Build/Compile +endef + +define Package/dvb-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware + $(CP) $(CURDIR)/files/* $(1)/lib/firmware/ +endef + +$(eval $(call BuildPackage,dvb-firmware)) diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-mn88472-02.fw b/package/ntlf9t/dvb-firmware/files/dvb-demod-mn88472-02.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-mn88472-02.fw rename to package/ntlf9t/dvb-firmware/files/dvb-demod-mn88472-02.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-mn88473-01.fw b/package/ntlf9t/dvb-firmware/files/dvb-demod-mn88473-01.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-mn88473-01.fw rename to package/ntlf9t/dvb-firmware/files/dvb-demod-mn88473-01.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-01.fw b/package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-01.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-01.fw rename to package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-01.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-02.fw b/package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-02.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-02.fw rename to package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-02.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-a20-01.fw b/package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-a20-01.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-a20-01.fw rename to package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-a20-01.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-a30-01.fw b/package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-a30-01.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-a30-01.fw rename to package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-a30-01.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-b40-01.fw b/package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-b40-01.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-b40-01.fw rename to package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-b40-01.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-d60-01.fw b/package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-d60-01.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2168-d60-01.fw rename to package/ntlf9t/dvb-firmware/files/dvb-demod-si2168-d60-01.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2183-b60-01.fw b/package/ntlf9t/dvb-firmware/files/dvb-demod-si2183-b60-01.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-demod-si2183-b60-01.fw rename to package/ntlf9t/dvb-firmware/files/dvb-demod-si2183-b60-01.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-fe-ds3000.fw b/package/ntlf9t/dvb-firmware/files/dvb-fe-ds3000.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-fe-ds3000.fw rename to package/ntlf9t/dvb-firmware/files/dvb-fe-ds3000.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-tuner-si2141-a10-01.fw b/package/ntlf9t/dvb-firmware/files/dvb-tuner-si2141-a10-01.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-tuner-si2141-a10-01.fw rename to package/ntlf9t/dvb-firmware/files/dvb-tuner-si2141-a10-01.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-tuner-si2158-a20-01.fw b/package/ntlf9t/dvb-firmware/files/dvb-tuner-si2158-a20-01.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-tuner-si2158-a20-01.fw rename to package/ntlf9t/dvb-firmware/files/dvb-tuner-si2158-a20-01.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-usb-dw2101.fw b/package/ntlf9t/dvb-firmware/files/dvb-usb-dw2101.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-usb-dw2101.fw rename to package/ntlf9t/dvb-firmware/files/dvb-usb-dw2101.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-usb-dw2102.fw b/package/ntlf9t/dvb-firmware/files/dvb-usb-dw2102.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-usb-dw2102.fw rename to package/ntlf9t/dvb-firmware/files/dvb-usb-dw2102.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-usb-dw2104.fw b/package/ntlf9t/dvb-firmware/files/dvb-usb-dw2104.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-usb-dw2104.fw rename to package/ntlf9t/dvb-firmware/files/dvb-usb-dw2104.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-usb-dw3101.fw b/package/ntlf9t/dvb-firmware/files/dvb-usb-dw3101.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-usb-dw3101.fw rename to package/ntlf9t/dvb-firmware/files/dvb-usb-dw3101.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/src/dvb-usb-tbsqbox-id5521.fw b/package/ntlf9t/dvb-firmware/files/dvb-usb-tbsqbox-id5521.fw similarity index 100% rename from package/ntlf9t/dvb/dvb-firmware/src/dvb-usb-tbsqbox-id5521.fw rename to package/ntlf9t/dvb-firmware/files/dvb-usb-tbsqbox-id5521.fw diff --git a/package/ntlf9t/dvb/dvb-firmware/Makefile b/package/ntlf9t/dvb/dvb-firmware/Makefile deleted file mode 100644 index 8c6d0f0b40..0000000000 --- a/package/ntlf9t/dvb/dvb-firmware/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (C) 2017 McMCC -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dvb-firmware -PKG_VERSION:=1.0 -PKG_RELEASE:=2 - -include $(INCLUDE_DIR)/package.mk - -define Package/dvb-firmware - SECTION:=dvb-firmware - CATEGORY:=Firmware - TITLE:=dvb-firmware megapack -endef - -define Package/dvb-firmware/description - dvb-firmware is specialised software that is both specific to some hardware - and also integral for its proper functioning. -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR)/firmware - $(CP) ./src/* $(PKG_BUILD_DIR)/firmware -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/dvb-firmware/install - $(INSTALL_DIR) $(1)/lib/firmware - $(CP) $(PKG_BUILD_DIR)/firmware/* $(1)/lib/firmware -endef - -$(eval $(call BuildPackage,dvb-firmware)) diff --git a/package/ntlf9t/fcgiwrap/Makefile b/package/ntlf9t/fcgiwrap/Makefile index 1ccdba326b..6c043dfec5 100644 --- a/package/ntlf9t/fcgiwrap/Makefile +++ b/package/ntlf9t/fcgiwrap/Makefile @@ -9,37 +9,33 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fcgiwrap PKG_VERSION:=1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_MAINTAINER:=Tobias Waldvogel + +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk -define Package/$(PKG_NAME) +define Package/fcgiwrap SECTION:=net CATEGORY:=Network TITLE:=FCGI wrapper for CGI DEPENDS:=+libpcre +spawn-fcgi +fcgi - MAINTAINER:=Tobias Waldvogel -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - $(CP) src/* $(PKG_BUILD_DIR)/ endef define Build/Compile $(TARGET_CC) \ -I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS) -Wall -Werror \ -L$(STAGING_DIR)/usr/lib -lfcgi \ - -o$(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME).c + -o$(PKG_BUILD_DIR)/fcgiwrap $(PKG_BUILD_DIR)/fcgiwrap.c endef -define Package/$(PKG_NAME)/install +define Package/fcgiwrap/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/fcgiwrap $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/fcgiwrap.init $(1)/etc/init.d/fcgiwrap endef -$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,fcgiwrap)) diff --git a/package/ntlf9t/dvb/libdvbcsa/Makefile b/package/ntlf9t/libdvbcsa/Makefile similarity index 50% rename from package/ntlf9t/dvb/libdvbcsa/Makefile rename to package/ntlf9t/libdvbcsa/Makefile index 1bdb22213c..f95d706fb7 100644 --- a/package/ntlf9t/dvb/libdvbcsa/Makefile +++ b/package/ntlf9t/libdvbcsa/Makefile @@ -7,32 +7,32 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := libdvbcsa -PKG_RELEASE := 1 +PKG_NAME:=libdvbcsa +PKG_BASE_VERSION:=1.1.0 +PKG_RELEASE:=$(AUTORELEASE) -PKG_SOURCE_PROTO := git -PKG_SOURCE_URL := https://github.com/glenvt18/libdvbcsa.git -PKG_SOURCE_VERSION := 2a1e61e569a621c55c2426f235f42c2398b7f18f +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/glenvt18/libdvbcsa.git +PKG_SOURCE_DATE:=2018-01-28 +PKG_SOURCE_VERSION:=2a1e61e569a621c55c2426f235f42c2398b7f18f +PKG_MIRROR_HASH:=125c5d42fd1c73d3046ab9ee52d11d4c6495a2df45daa3eaf7bc5412dd91d586 -PKG_VERSION := 1.1.0-$(shell printf '%.8s' $(PKG_SOURCE_VERSION)) -#PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz -#PKG_SOURCE_URL := http://download.videolan.org/pub/videolan/libdvbcsa/$(PKG_VERSION)/ -#PKG_HASH := 4db78af5cdb2641dfb1136fe3531960a477c9e3e3b6ba19a2754d046af3f456d +PKG_VERSION:=$(PKG_BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION)) -PKG_LICENSE := GPL-2.0 -PKG_LICENSE_FILE := COPYING +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILE:=COPYING +PKG_MAINTAINER:=Tomasz Maciej Nowak -PKG_MAINTAINER := Tomasz Maciej Nowak - -PKG_INSTALL := 1 +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/libdvbcsa - SECTION := libs - CATEGORY := Libraries - TITLE := DVB Common Scrambling Algorithm library - URL := https://www.videolan.org/developers/libdvbcsa.html + SECTION:=libs + CATEGORY:=Libraries + TITLE:=DVB Common Scrambling Algorithm library + URL:=https://www.videolan.org/developers/libdvbcsa.html endef define Package/libdvbcsa/description @@ -46,7 +46,7 @@ define Build/Configure endef define Build/InstallDev - $(CP) $(PKG_INSTALL_DIR)/usr $(1)/ + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ endef define Package/libdvbcsa/install diff --git a/package/ntlf9t/minieap/Makefile b/package/ntlf9t/minieap/Makefile index df10cb9912..ed1c0a2e9f 100644 --- a/package/ntlf9t/minieap/Makefile +++ b/package/ntlf9t/minieap/Makefile @@ -1,5 +1,6 @@ # # Copyright (C) 2016 Openwrt.org +# Copyright (C) 2021 ImmortalWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,41 +10,35 @@ include $(TOPDIR)/rules.mk PKG_NAME:=minieap PKG_VERSION:=0.93 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/updateing/minieap.git -PKG_SOURCE_VERSION:=9e10f320a9fce46c8f4286324a0fc70e572f61dc -PKG_MIRROR_HASH:=41c976810c994d6125f6fe3cb1d978f7e257aa587ee32229364942a82621b273 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/updateing/minieap/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=41c976810c994d6125f6fe3cb1d978f7e257aa587ee32229364942a82621b273 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) - -PKG_LICENSE:=GPLv3 +PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk define Package/minieap - SECTION:=net - CATEGORY:=Network - TITLE:=Extendable 802.1x client - URL:=https://github.com/updateing/minieap - SUBMENU:=Campus Network + SECTION:=net + CATEGORY:=Network + SUBNEMU:=Campus Network + TITLE:=Extendable 802.1x client + URL:=https://github.com/updateing/minieap endef define Package/minieap/description -Extendable 802.1x client with Ruijie v3 (v4) plugin. -endef - -define Package/minieap/conffiles -/etc/minieap.conf + Extendable 802.1x client with Ruijie v3 (v4) plugin. endef define Package/minieap/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/minieap $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/sbin/minieap $(1)/usr/sbin/ endef $(eval $(call BuildPackage,minieap)) diff --git a/package/ntlf9t/minieap/patches/003-remove-systemctl.patch b/package/ntlf9t/minieap/patches/003-remove-systemctl.patch new file mode 100644 index 0000000000..b72027b3e7 --- /dev/null +++ b/package/ntlf9t/minieap/patches/003-remove-systemctl.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -87,7 +87,7 @@ install: minieap minieap.1.gz minieap.service + install -m 644 minieap.1.gz $(DESTDIR)$(PREFIX)/share/man/man1/ + install -d $(DESTDIR)$(SYSTEMDDIR)/system/ + install -m 644 minieap.service $(DESTDIR)$(SYSTEMDDIR)/system/ +- -systemctl enable minieap ++ # -systemctl enable minieap + + .PHONY: uninstall + uninstall: diff --git a/package/ntlf9t/ngrokc/Makefile b/package/ntlf9t/ngrokc/Makefile index a6365ec813..b7d1837c0d 100644 --- a/package/ntlf9t/ngrokc/Makefile +++ b/package/ntlf9t/ngrokc/Makefile @@ -2,31 +2,32 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ngrokc PKG_VERSION:=1.54 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/dosgo/ngrok-c.git -PKG_SOURCE_VERSION:=5ecd4e03d04ac538051fe8f1b0deaca500dc7185 -PKG_MIRROR_HASH:=6bb27003b9357e9edd07b3b869e150ad506b253f3469fbbbae1fcece630afeb2 +PKG_SOURCE_DATE:=2019-11-02 +PKG_SOURCE_VERSION:=6388b9d8e4d5fef018ee64dfd55795f10cc6aaad +PKG_MIRROR_HASH:=a0f22073807e0ae7869cecce398e848800e5961e00d76a6185f0c1004609f093 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_PARALLEL:=1 + include $(INCLUDE_DIR)/package.mk define Package/ngrokc - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=Secure tunnels to localhost(C++ port) - URL:=https://github.com/dosgo/ngrok-c - DEPENDS:=+libc +libpthread +libopenssl +libstdcpp + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Secure tunnels to localhost (C++ port) + URL:=https://github.com/dosgo/ngrok-c + DEPENDS:=+libc +libpthread +libopenssl +libstdcpp endef define Build/Prepare - $(call Build/Prepare/Default,) + $(call Build/Prepare/Default) $(CP) $(PKG_BUILD_DIR)/Makefile.openssl $(PKG_BUILD_DIR)/Makefile endef diff --git a/package/ntlf9t/njitclient/Makefile b/package/ntlf9t/njitclient/Makefile index cebb4dceaa..087bac0f0e 100644 --- a/package/ntlf9t/njitclient/Makefile +++ b/package/ntlf9t/njitclient/Makefile @@ -1,48 +1,40 @@ include $(TOPDIR)/rules.mk PKG_NAME:=njit8021xclient -PKG_VERSION:=2.0 -PKG_RELEASE:=1 +PKG_BASE_VERSION:=2.0 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/bitdust/njit8021xclient.git +PKG_SOURCE_DATE:=2018-11-24 PKG_SOURCE_VERSION:=dd28c17f24275bbbf4c44504b832c0f1e6b9ae40 -PKG_MIRROR_HASH:=689c01fe559a1ad00446bdb92890ddfcfbe0f53e5afd9ae54d5649e7a43ff961 +PKG_MIRROR_HASH:=66e4f20ceeceaed457657b60ec0b390aab0d7ff380b0abe749738b8f4aa23556 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) +PKG_VERSION:=$(PKG_BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION)) PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/njit8021xclient - SECTION:=net - CATEGORY:=Network - TITLE:=NJIT 802.1X client program - DEPENDS:=+libopenssl +libpcap - SUBMENU:=Campus Network + SECTION:=net + CATEGORY:=Network + SUBMENU:=Campus Network + TITLE:=NJIT 802.1X client program + DEPENDS:=+libopenssl +libpcap endef define Package/njit8021xclient/description - 802.1X client from Nanjing Institude of Technology, - compatable with H3C iNode 802.1X client. Support - H3C/iNode's private authentication protocol V7.10. -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/ \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -static" \ - CPPFLAGS="$(TARGET_CPPFLAGS)" \ - LIBS="$(STAGING_DIR)/usr/lib/libpcap.a" + 802.1X client from Nanjing Institude of Technology, compatable with + H3C iNode 802.1X client. Support H3C/iNode's private authentication + protocol V7.10. endef define Package/njit8021xclient/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/client $(1)/usr/sbin/njit-client + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/njit-client $(1)/usr/sbin/ endef $(eval $(call BuildPackage,njit8021xclient)) diff --git a/package/ntlf9t/openwrt-chinadns/Makefile b/package/ntlf9t/openwrt-chinadns/Makefile deleted file mode 100644 index 2d1bc70e7f..0000000000 --- a/package/ntlf9t/openwrt-chinadns/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2014-2018 OpenWrt-dist -# Copyright (C) 2014-2018 Jian Chang -# -# This is free software, licensed under the GNU General Public License v3. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openwrt_chinadns -PKG_VERSION:=1.3.3 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/aa65535/ChinaDNS.git -PKG_MIRROR_HASH:=3d7063552dc5755163be52de7311fcbed87f67622bbf4c1b0dc748431b57091b -PKG_SOURCE_VERSION:=00616680114011553881760e843b77a3519e8fbf -PKG_SOURCE_SUBDIR:=ChinaDNS-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) -PKG_SOURCE:=ChinaDNS-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz - -PKG_LICENSE:=GPLv3 -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Jian Chang - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/ChinaDNS-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) - -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf -PKG_USE_MIPS16:=0 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - SECTION:=net - CATEGORY:=Network - TITLE:=Protect yourself against DNS poisoning in China. - URL:=https://github.com/shadowsocks/ChinaDNS -endef - -define Package/$(PKG_NAME)/description -Protect yourself against DNS poisoning in China. -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/chinadns $(1)/usr/bin -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/ntlf9t/openwrt-pdnsd-full/Makefile b/package/ntlf9t/openwrt-pdnsd-full/Makefile deleted file mode 100644 index 2ad3711744..0000000000 --- a/package/ntlf9t/openwrt-pdnsd-full/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=pdnsd -PKG_VERSION:=1.2.9a-par -PKG_RELEASE:=3 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/shadowsocksrr/pdnsd.git -PKG_MIRROR_HASH:=277bdc34c27377b7626d83a6625b6f07f0e7268d5e8d926152ffe9e5022cc338 -PKG_SOURCE_VERSION:=a8e46ccba7b0fa2230d6c42ab6dcd92926f6c21d -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) - -PKG_FIXUP:=autoreconf -PKG_USE_MIPS16:=0 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/pdnsd-full - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libpthread - TITLE:=Proxy DNS Server -endef - -define Package/pdnsd-full/conffiles -/etc/pdnsd.conf -endef - -define Package/pdnsd-full/description - pdnsd, is an IPv6 capable proxy DNS server with permanent caching (the cache - contents are written to hard disk on exit) that is designed to cope with - unreachable or down DNS servers (for example in dial-in networking). - - pdnsd can be used with applications that do dns lookups, eg on startup, and - can't be configured to change that behaviour, to prevent the often - minute-long hangs (or even crashes) that result from stalled dns queries. -endef - -CONFIGURE_ARGS += --enable-ipv6 --enable-ipv6-startup --enable-tcp-subseq --with-cachedir=/var/pdnsd --with-query-method=tcpudp - -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections - -# Use Link time optimization -TARGET_CFLAGS += -flto -TARGET_LDFLAGS += -Wl,-flto - -define Package/pdnsd-full/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pdnsd $(1)/usr/sbin/pdnsd-full - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pdnsd-ctl/pdnsd-ctl $(1)/usr/bin/pdnsd-ctl-full - #$(INSTALL_DIR) $(1)/etc - #$(INSTALL_CONF) ./files/pdnsd.conf $(1)/etc/pdnsd.conf - # $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/pdnsd.conf $(1)/etc/) -endef - -$(eval $(call BuildPackage,pdnsd-full)) diff --git a/package/ntlf9t/openwrt-pdnsd-full/files/pdnsd.conf b/package/ntlf9t/openwrt-pdnsd-full/files/pdnsd.conf deleted file mode 100644 index 6831a0f22f..0000000000 --- a/package/ntlf9t/openwrt-pdnsd-full/files/pdnsd.conf +++ /dev/null @@ -1,33 +0,0 @@ -global { - cache_dir = "/var/pdnsd"; - perm_cache = 1024; - run_as = "nobody"; - server_ip = 127.0.0.1; - server_port = 5300; - status_ctl = on; - # paranoid = on; - query_method = tcp_udp; - min_ttl = 15m; - max_ttl = 1w; - timeout = 10; - neg_domain_pol = on; - udpbufsize = 1024; -} - -server { - label = "opendns"; - ip = "208.67.222.222", "208.67.220.220"; - port = 5353; - timeout = 4; - uptest = ping; - ping_timeout = 100; - interval = 15m; - purge_cache = off; -} - -source { - ttl = 86400; - owner = localhost; - serve_aliases = on; - file = "/etc/hosts"; -} \ No newline at end of file diff --git a/package/ntlf9t/oscam/Makefile b/package/ntlf9t/oscam/Makefile index 608eaccc6b..788e8cf8d4 100644 --- a/package/ntlf9t/oscam/Makefile +++ b/package/ntlf9t/oscam/Makefile @@ -6,20 +6,20 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := oscam -PKG_REV := 33e2d6 -PKG_VERSION := r11518-$(PKG_REV) -PKG_RELEASE := 1 +PKG_NAME:=oscam +PKG_RELEASE:=$(AUTORELEASE) -PKG_SOURCE_PROTO:= git -PKG_SOURCE_VERSION := $(PKG_REV) -PKG_SOURCE_URL := https://github.com/nx111/oscam.git -PKG_MIRROR_HASH := 6873d24637f14ec695e32a8a91f17bd8ef38d615a55fb76e6440f6a37da906e3 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/nx111/oscam.git +PKG_SOURCE_DATE:=2020-12-12 +PKG_SOURCE_VERSION:=aafda4bca3c347698ef1dc32f7ebeff76378d55a +PKG_MIRROR_HASH:=d2cd4508ef80a3cbd8ef950e5446f2f754b339f179c4f774ef8660b39fd5c4c1 -PKG_LICENSE := GPL-3.0 -PKG_LICENSE_FILE := COPYING +PKG_LICENSE:=GPL-3.0 +PKG_LICENSE_FILE:=COPYING +PKG_MAINTAINER:=Tomasz Maciej Nowak -PKG_MAINTAINER := Tomasz Maciej Nowak +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -28,23 +28,23 @@ define Package/oscam/config endef define Package/oscam - SECTION := net - CATEGORY := Network - TITLE := Open Source Conditional Access Modul - URL := http://www.streamboard.tv/oscam - DEPENDS := +OSCAM_USE_LIBCRYPTO:libopenssl +OSCAM_USE_LIBUSB:libusb-1.0 +OSCAM_USE_PCSC:pcscd + SECTION:=net + CATEGORY:=Network + TITLE:=Open Source Conditional Access Modul + URL:=http://www.streamboard.tv/oscam + DEPENDS:=+OSCAM_USE_LIBCRYPTO:libopenssl +OSCAM_USE_LIBUSB:libusb-1.0 +OSCAM_USE_PCSC:pcscd endef define Package/list-smargo - SECTION := net - CATEGORY := Network - TITLE := List Smargo readers - URL := http://www.streamboard.tv/oscam - DEPENDS := oscam @OSCAM_CARDREADER_SMARGO + SECTION:=net + CATEGORY:=Network + TITLE:=List Smargo readers + URL:=http://www.streamboard.tv/oscam + DEPENDS:=oscam @OSCAM_CARDREADER_SMARGO endef -CONFIGURE_CMD = ./config.sh -CONFIGURE_ARGS = \ +CONFIGURE_CMD:=./config.sh +CONFIGURE_ARGS+= \ --restore \ $(if $(CONFIG_OSCAM_WEBIF),--enable,--disable) WEBIF \ $(if $(CONFIG_OSCAM_WEBIF_LIVELOG),--enable,--disable) WEBIF_LIVELOG \ @@ -133,7 +133,7 @@ define Package/oscam/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/Distribution/oscam $(1)/usr/bin/oscam $(INSTALL_DIR) $(1)/etc/oscam -# $(CP) $(PKG_BUILD_DIR)/Distribution/doc/example/* $(1)/etc/oscam/ + # $(CP) $(PKG_BUILD_DIR)/Distribution/doc/example/* $(1)/etc/oscam/ $(INSTALL_CONF) ./files/oscam.conf $(1)/etc/oscam/oscam.conf $(INSTALL_CONF) ./files/oscam.user $(1)/etc/oscam/oscam.user $(INSTALL_CONF) ./files/oscam.dvbapi $(1)/etc/oscam/oscam.dvbapi diff --git a/package/ntlf9t/openwrt-Pcap_DNSProxy/Makefile b/package/ntlf9t/pcap-dnsproxy/Makefile similarity index 57% rename from package/ntlf9t/openwrt-Pcap_DNSProxy/Makefile rename to package/ntlf9t/pcap-dnsproxy/Makefile index 831f00262e..4e75244f45 100644 --- a/package/ntlf9t/openwrt-Pcap_DNSProxy/Makefile +++ b/package/ntlf9t/pcap-dnsproxy/Makefile @@ -7,23 +7,30 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pcap-dnsproxy -PKG_VERSION:=0.4.9.13 -PKG_RELEASE:=bc9f540 +PKG_BASE_VERSION:=0.4.9.13 +PKG_RELEASE:=$(AUTORELESE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/1715173329/Pcap_DNSProxy.git -PKG_MIRROR_HASH:=74d86515f17a329fe586fc9acb0c0ff3494fd7f39e42ed50f442d247e3205556 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_DATE:=2019-05-05 PKG_SOURCE_VERSION:=bc9f540d9febc5f61d24d583dbdbcc858dd817e3 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -CMAKE_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 +PKG_MIRROR_HASH:=416cea47ef5662c32111c56eeaaaaec4b338e6eddfe98fca0a0d854e00653dc3 + +PKG_VERSION:=$(PKG_BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION)) PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=LICENSE - PKG_MAINTAINER:=Chengr28 +PKG_CONFIG_DEPENDS:= \ + CONFIG_PCAP_DNSPROXY_LIBSODIUM \ + CONFIG_PCAP_DNSPROXY_LIBPCAP \ + CONFIG_PCAP_DNSPROXY_TLS \ + CONFIG_PCAP_DNSPROXY_LISTENPORT + +PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -39,15 +46,12 @@ TARGET_CXXFLAGS += -std=c++14 CMAKE_OPTIONS += \ -DPLATFORM_OPENWRT=ON \ - -DENABLE_LIBSODIUM=$(if $(CONFIG_PACKAGE_pcap-dnsproxy_libsodium),ON,OFF) \ - -DENABLE_PCAP=$(if $(CONFIG_PACKAGE_pcap-dnsproxy_libpcap),ON,OFF) \ - -DENABLE_TLS=$(if $(CONFIG_PACKAGE_pcap-dnsproxy_tls),ON,OFF) + -DENABLE_LIBSODIUM=$(if $(CONFIG_PCAP_DNSPROXY_LIBSODIUM),ON,OFF) \ + -DENABLE_PCAP=$(if $(CONFIG_PCAP_DNSPROXY_LIBPCAP),ON,OFF) \ + -DENABLE_TLS=$(if $(CONFIG_PCAP_DNSPROXY_TLS),ON,OFF) -# Port 53 leads to dnsmasq startup failure. define Package/pcap-dnsproxy/config -if PACKAGE_pcap-dnsproxy - - config PACKAGE_pcap-dnsproxy_libpcap + config PCAP_DNSPROXY_LIBPCAP bool "Build with libpcap support.(Strongly recommended)" default y help @@ -55,7 +59,8 @@ if PACKAGE_pcap-dnsproxy of it to detect poisoned DNS reply. We strongly recommend to keep it as-is. - config PACKAGE_pcap-dnsproxy_libsodium + + config PCAP_DNSPROXY_LIBSODIUM bool "Build with libsodium support.(Recommended)" default y help @@ -63,11 +68,13 @@ if PACKAGE_pcap-dnsproxy We recommend to keep it as-is unless you do NOT need this protocol anymore. - config PACKAGE_pcap-dnsproxy_tls + + config PCAP_DNSPROXY_TLS bool "Build with TLS support.(Recommended)" default y help We recommend to keep it as-is. + config PCAP_DNSPROXY_LISTENPORT int "Listen Port, should NOT be 53" default 1053 @@ -75,47 +82,19 @@ if PACKAGE_pcap-dnsproxy You can customize the listen port of Pcap_DNSProxy. Note that you should NOT set the value to 53, which conflicts with DNSMasq in OpenWrt. - config PACKAGE_pcap-dnsproxy_advancedoptions - bool "Compile with advanced options. (for expert only)" - default n - help - Enable this option to use link-time optimization and - other GCC compile flags to reduce binary size. - - Please refer to Makefile for details. - - Unless you know what you are doing, you - should probably say N here. -endif endef -# Note: GCC 4.6 and 4.8 dont have complete C++11 support -# Please use GCC 4.9 or higher to compile -# uclibcxx is uClibc++, which stands for C++ library for embedded systems. -# libstdcpp is shipped by GCC project, which usually takes more space than uClibc++. -# but it has more useful features we need, i.e. full regular expression support. define Package/pcap-dnsproxy - SECTION:=net - CATEGORY:=Network - TITLE:=A local DNS server based on LibPcap - URL:=https://github.com/chengr28/Pcap_DNSProxy - DEPENDS:=+libpthread +libstdcpp +libevent2-core \ - +PACKAGE_pcap-dnsproxy_libpcap:libpcap \ - +PACKAGE_pcap-dnsproxy_libsodium:libsodium \ - +PACKAGE_pcap-dnsproxy_tls:libopenssl \ - @GCC_VERSION_4_6:BROKEN + SECTION:=net + CATEGORY:=Network + TITLE:=A local DNS server based on LibPcap + URL:=https://github.com/chengr28/Pcap_DNSProxy + DEPENDS:=+libpthread +libstdcpp +libevent2-core \ + +PCAP_DNSPROXY_LIBPCAP:libpcap \ + +PCAP_DNSPROXY_LIBSODIUM:libsodium \ + +PCAP_DNSPROXY_TLS:libopenssl endef -# Some advanced compile flags for expert -ifneq ($(CONFIG_PACKAGE_pcap-dnsproxy_advancedoptions),) - # Try to reduce binary size - TARGET_CXXFLAGS += -ffunction-sections -fdata-sections - TARGET_LDFLAGS += -Wl,--gc-sections - # Use Link time optimization - TARGET_CXXFLAGS += -flto - TARGET_LDFLAGS += -flto -endif - define Package/pcap-dnsproxy/conffiles /etc/pcap-dnsproxy/Config.conf /etc/pcap-dnsproxy/Hosts.conf @@ -134,7 +113,6 @@ fi exit 0 endef -# Stop and disable service(removing rc.d symlink) before removing define Package/pcap-dnsproxy/prerm #!/bin/sh # check if we are on real system @@ -156,11 +134,11 @@ define Package/pcap-dnsproxy/install $(INSTALL_DIR) $(1)/etc/hotplug.d/iface $(INSTALL_BIN) ./files/pcap-dnsproxy.hotplug $(1)/etc/hotplug.d/iface/99-pcap-dnsproxy $(INSTALL_DIR) $(1)/etc/pcap-dnsproxy - $(SED) 's,^\xEF\xBB\xBF,,g' $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/* - $(SED) 's,\x0D,,g' $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/* - $(SED) 's,Listen Port = 53,Listen Port = $(CONFIG_PCAP_DNSPROXY_LISTENPORT),g' $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/Config.ini - $(SED) 's,Log Maximum Size = 8MB,Log Maximum Size = 50KB,g' $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/Config.ini - $(SED) 's,Operation Mode = Private,Operation Mode = Server,g' $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/Config.ini + $(SED) 's,^\xEF\xBB\xBF,,g' $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/* + $(SED) 's,\x0D,,g' $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/* + $(SED) 's,Listen Port = 53,Listen Port = $(CONFIG_PCAP_DNSPROXY_LISTENPORT),g' $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/Config.ini + $(SED) 's,Log Maximum Size = 8MB,Log Maximum Size = 50KB,g' $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/Config.ini + $(SED) 's,Operation Mode = Private,Operation Mode = Server,g' $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/Config.ini $(INSTALL_CONF) $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/Config.ini $(1)/etc/pcap-dnsproxy/Config.conf $(INSTALL_CONF) $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/Hosts.ini $(1)/etc/pcap-dnsproxy/Hosts.conf $(INSTALL_CONF) $(PKG_BUILD_DIR)/Source/Auxiliary/ExampleConfig/IPFilter.ini $(1)/etc/pcap-dnsproxy/IPFilter.conf @@ -168,5 +146,4 @@ define Package/pcap-dnsproxy/install $(INSTALL_CONF) ./files/configs/WhiteList.txt $(1)/etc/pcap-dnsproxy/WhiteList.txt endef - $(eval $(call BuildPackage,pcap-dnsproxy)) diff --git a/package/ntlf9t/openwrt-Pcap_DNSProxy/files/configs/WhiteList.txt b/package/ntlf9t/pcap-dnsproxy/files/configs/WhiteList.txt similarity index 100% rename from package/ntlf9t/openwrt-Pcap_DNSProxy/files/configs/WhiteList.txt rename to package/ntlf9t/pcap-dnsproxy/files/configs/WhiteList.txt diff --git a/package/ntlf9t/openwrt-Pcap_DNSProxy/files/pcap-dnsproxy.config b/package/ntlf9t/pcap-dnsproxy/files/pcap-dnsproxy.config similarity index 100% rename from package/ntlf9t/openwrt-Pcap_DNSProxy/files/pcap-dnsproxy.config rename to package/ntlf9t/pcap-dnsproxy/files/pcap-dnsproxy.config diff --git a/package/ntlf9t/openwrt-Pcap_DNSProxy/files/pcap-dnsproxy.hotplug b/package/ntlf9t/pcap-dnsproxy/files/pcap-dnsproxy.hotplug similarity index 100% rename from package/ntlf9t/openwrt-Pcap_DNSProxy/files/pcap-dnsproxy.hotplug rename to package/ntlf9t/pcap-dnsproxy/files/pcap-dnsproxy.hotplug diff --git a/package/ntlf9t/openwrt-Pcap_DNSProxy/files/pcap-dnsproxy.procd.init b/package/ntlf9t/pcap-dnsproxy/files/pcap-dnsproxy.procd.init similarity index 100% rename from package/ntlf9t/openwrt-Pcap_DNSProxy/files/pcap-dnsproxy.procd.init rename to package/ntlf9t/pcap-dnsproxy/files/pcap-dnsproxy.procd.init diff --git a/package/ntlf9t/openwrt-Pcap_DNSProxy/patches/002-cmake-dependency-scanner-workaround.patch b/package/ntlf9t/pcap-dnsproxy/patches/002-cmake-dependency-scanner-workaround.patch similarity index 100% rename from package/ntlf9t/openwrt-Pcap_DNSProxy/patches/002-cmake-dependency-scanner-workaround.patch rename to package/ntlf9t/pcap-dnsproxy/patches/002-cmake-dependency-scanner-workaround.patch diff --git a/package/ntlf9t/scutclient/Makefile b/package/ntlf9t/scutclient/Makefile index 9f94e8b711..f46925db3b 100644 --- a/package/ntlf9t/scutclient/Makefile +++ b/package/ntlf9t/scutclient/Makefile @@ -8,22 +8,23 @@ include $(TOPDIR)/rules.mk PKG_NAME:=scutclient -PKG_VERSION:=3.1.2 -PKG_RELEASE:=1 +PKG_BASE_VERSION:=3.1.2 +PKG_RELEASE:=$(AUTORELESE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/scutclient/scutclient.git +PKG_SOURCE_DATE:=2020-11-29 PKG_SOURCE_VERSION:=36128216c63f8954371e64d78ff30bca5e73a882 -PKG_MIRROR_HASH:=ffce8508a7d083150d6484b7272ea832432dcfde9ad8773c2a6d1785bef41191 +PKG_MIRROR_HASH:=16be6312e7ca2e1b0201c2d2f7e01dbb6173fb9b13c93707ff272f992d4b3bff -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) +PKG_VERSION:=$(PKG_BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION)) PKG_MAINTAINER:=Scutclient Project - PKG_LICENSE:=AGPL-3.0 +PKG_LICENSE_FILE:=COPYING + PKG_BUILD_PARALLEL:=1 +CMAKE_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -31,9 +32,9 @@ include $(INCLUDE_DIR)/cmake.mk define Package/scutclient SECTION:=net CATEGORY:=Network + SUBMENU:=Campus Network TITLE:=SCUT Dr.com client URL:=https://github.com/scutclient/scutclient - SUBMENU:=Campus Network endef define Package/scutclient/description @@ -52,7 +53,7 @@ define Package/scutclient/install $(INSTALL_DIR) $(1)/etc/hotplug.d/iface $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/files/scutclient.hotplug $(1)/etc/hotplug.d/iface/99-scutclient $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/scutclient $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scutclient $(1)/usr/bin endef $(eval $(call BuildPackage,scutclient)) diff --git a/package/ntlf9t/sysuh3c/Makefile b/package/ntlf9t/sysuh3c/Makefile index b4257a93b2..8058e81aca 100644 --- a/package/ntlf9t/sysuh3c/Makefile +++ b/package/ntlf9t/sysuh3c/Makefile @@ -1,31 +1,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sysuh3c -PKG_VERSION:=1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELESE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/haswelliris/h3c.git -PKG_MIRROR_HASH:=3175d4c9d6a4b39a5e4b2ef347e938c092305854057196961f70935723532170 -PKG_SOURCE_VERSION:=fdf66c3 +PKG_SOURCE_DATE:=2019-03-01 +PKG_SOURCE_VERSION:=8a3e0b5a9a5d989e7d8b2105d09a394c3663e016 +PKG_MIRROR_HASH:=693fd9f81242edb3459a1298f4c850984e59fb44ef6fb4a40fdfcdd3c14acfdb PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk -define Package/$(PKG_NAME) - SECTION:=net - CATEGORY:=Network - TITLE:=H3C client - SUBMENU:=Campus Network +define Package/sysuh3c + SECTION:=net + CATEGORY:=Network + SUBMENU:=Campus Network + TITLE:=H3C client endef -define Build/Configure - $(call Build/Configure/Default) -endef - -define Package/$(PKG_NAME)/install +define Package/sysuh3c/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/h3c $(1)/usr/sbin/sysuh3c $(INSTALL_DIR) $(1)/etc/config @@ -34,4 +30,4 @@ define Package/$(PKG_NAME)/install $(INSTALL_BIN) ./files/sysuh3c.init $(1)/etc/init.d/sysuh3c endef -$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call BuildPackage,sysuh3c)) diff --git a/package/ntlf9t/openwrt-udp2raw/Makefile b/package/ntlf9t/udp2raw-tunnel/Makefile similarity index 55% rename from package/ntlf9t/openwrt-udp2raw/Makefile rename to package/ntlf9t/udp2raw-tunnel/Makefile index 496865f18d..7972e79388 100644 --- a/package/ntlf9t/openwrt-udp2raw/Makefile +++ b/package/ntlf9t/udp2raw-tunnel/Makefile @@ -9,35 +9,30 @@ include $(TOPDIR)/rules.mk PKG_NAME:=udp2raw-tunnel PKG_VERSION:=20200818.0 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/wangyu-/udp2raw-tunnel.git -PKG_MIRROR_HASH:=6b7c07f6277729ba8b3b287316b5b7a80c5b1e47258ecc8b1c8618be3aa73888 -PKG_SOURCE_VERSION:=cc6ea766c495cf4c69d1c7485728ba022b0f19de -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/wangyu-/udp2raw-tunnel/tar.gz/$(PKG_VERSION)? +PKG_HASH:=712b0cb819555cb374206e95005b0ca6b4af86c74d572e0570630f67dfeea313 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Yu Wang -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk define Package/udp2raw-tunnel - SECTION:=net - CATEGORY:=Network - TITLE:=Tunnel which turns UDP Traffic into Encrypted FakeTCP/UDP/ICMP Traffic - URL:=https://github.com/wangyu-/udp2raw-tunnel - DEPENDS:= +libstdcpp +libpthread +librt + SECTION:=net + CATEGORY:=Network + TITLE:=Tunnel which turns UDP Traffic into Encrypted FakeTCP/UDP/ICMP Traffic + URL:=https://github.com/wangyu-/udp2raw-tunnel + DEPENDS:=+libstdcpp +libpthread +librt endef define Package/udp2raw-tunnel/description - udp2raw-tunnel is a tunnel which turns UDP Traffic into Encrypted FakeTCP/UDP/ICMP Traffic by using Raw Socket. + udp2raw-tunnel is a tunnel which turns UDP Traffic into Encrypted FakeTCP/UDP/ICMP Traffic by using Raw Socket. endef MAKE_FLAGS += cross