Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xxx@zzz:/Entware
- ➜ make package/{iptables,iptables_kn}/{clean,compile}
- make[2]: Entering directory '/work/stable/Entware/scripts/config'
- make[2]: Leaving directory '/work/stable/Entware/scripts/config'
- make[1] package/iptables/clean
- make[2] -C package/network/utils/iptables clean
- make[2]: Entering directory '/work/stable/Entware/scripts/config'
- make[2]: Leaving directory '/work/stable/Entware/scripts/config'
- make[1] package/iptables/compile
- make[2] -C package/libs/toolchain compile
- make[2] -C package/network/utils/iptables compile
- make[2]: Entering directory '/work/stable/Entware/scripts/config'
- make[2]: Leaving directory '/work/stable/Entware/scripts/config'
- make[1] package/iptables_kn/clean
- make[2] -C feeds/keendev3x/iptables_kn clean
- make[2]: Entering directory '/work/stable/Entware/scripts/config'
- make[2]: Leaving directory '/work/stable/Entware/scripts/config'
- make[1] package/iptables_kn/compile
- make[2] -C package/libs/toolchain compile
- make[2] -C feeds/keendev3x/iptables_kn compile
- xxx@zzz:/Entware
- ➜ ls -1 bin/targets/mips-3.4/generic-glibc/packages/iptab*
- bin/targets/mips-3.4/generic-glibc/packages/iptables_1.4.21-2a_mips-3.4.ipk
- bin/targets/mips-3.4/generic-glibc/packages/iptables_1.4.21-2a_mips-3.4_kn.ipk
- xxx@zzz:/Entware
- ➜ git diff
- diff --git a/feeds.conf b/feeds.conf
- index 309f1ce..be5d6c2 100644
- --- a/feeds.conf
- +++ b/feeds.conf
- @@ -5,4 +5,5 @@ src-git oldports https://github.com/Entware/entware-oldpackages-ports.git
- src-git rtndev https://github.com/Entware/rtndev.git
- src-git golang https://github.com/Entware/entware-go.git
- #src-git graveyard https://github.com/Entware/graveyard.git
- -#src-git dvb https://github.com/Entware/entware-dvb.git
- +src-git dvb https://github.com/Entware/entware-dvb.git
- +src-git keendev3x git@github.com:The-BB/keendev-3x.git
- diff --git a/scripts/ipkg-remove b/scripts/ipkg-remove
- index f495700..6a216a6 100755
- --- a/scripts/ipkg-remove
- +++ b/scripts/ipkg-remove
- @@ -5,14 +5,19 @@ sourcename="$1"; shift
- for pkg in "$@"; do
- tar -Ozxf "$pkg" ./control.tar.gz 2>/dev/null | tar -Ozxf - ./control 2>/dev/null | \
- while read field value; do
- - if [ "$field" = "SourceName:" ] && [ "$value" = "$sourcename" ]; then
- +# if [ "$sourcename" = "iptables" ]; then
- +# break
- +# elif [ "$field" = "SourceName:" ] && [ "$value" = "$sourcename" ]; then
- + if [ "$field" = "SourceName:" ] && [ "$value" = "$sourcename" ] && [ "$sourcename" != "iptables" ]; then
- rm -vf "$pkg"
- break
- fi
- done
- case "$pkg" in
- */"${sourcename}_"*.ipk)
- - rm -vf "$pkg"
- + if [ "$sourcename" != "iptables" ]; then
- + rm -vf "$pkg"
- + fi
- ;;
- esac
- done
- xxx@zzz:/Entware
- ➜ cat feeds/keendev3x/iptables_kn/Makefile
- #
- # Copyright (C) 2006-2016 OpenWrt.org
- #
- # This is free software, licensed under the GNU General Public License v2.
- # See /LICENSE for more information.
- #
- # Entware specific: keep 1.4.21 version
- # Do not split extensions into separate packages, do not install dev headers
- include $(TOPDIR)/rules.mk
- include $(INCLUDE_DIR)/kernel.mk
- PKG_NAME:=iptables
- PKG_VERSION:=1.4.21
- PKG_RELEASE:=2a
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
- PKG_SOURCE_URL:=http://www.netfilter.org/projects/iptables/files \
- ftp://ftp.be.netfilter.org/pub/netfilter/iptables/ \
- ftp://ftp.de.netfilter.org/pub/netfilter/iptables/ \
- ftp://ftp.no.netfilter.org/pub/netfilter/iptables/
- PKG_HASH:=52004c68021da9a599feed27f65defcfb22128f7da2c0531c0f75de0f479d3e0
- PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)_kn-$(PKG_VERSION)
- PKG_FIXUP:=autoreconf
- PKG_INSTALL:=1
- PKG_BUILD_PARALLEL:=1
- PKG_LICENSE:=GPL-2.0
- PKG_CPE_ID:=cpe:/a:netfilter_core_team:iptables
- include $(INCLUDE_DIR)/package.mk
- PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xjf $(DL_DIR)/$(PKG_SOURCE)
- define Package/iptables
- TITLE:=IP firewall administration tool (Keenetic version)
- SECTION:=net
- CATEGORY:=Network
- SUBMENU:=Firewall
- URL:=http://netfilter.org/
- PROVIDES:=iptables
- ifneq (,$(filter mips mipsel,$(ARCH)))
- PKGARCH:=$(BOARD)_kn
- endif
- endef
- define Package/iptables/description
- IP firewall administration tool.
- Matches:
- - icmp
- - tcp
- - udp
- - comment
- - conntrack
- - limit
- - mac
- - mark
- - multiport
- - set
- - state
- - time
- Targets:
- - ACCEPT
- - CT
- - DNAT
- - DROP
- - REJECT
- - LOG
- - MARK
- - MASQUERADE
- - REDIRECT
- - SET
- - SNAT
- - TCPMSS
- Tables:
- - filter
- - mangle
- - nat
- - raw
- endef
- TARGET_CPPFLAGS := \
- -I$(PKG_BUILD_DIR)/include \
- -I$(LINUX_DIR)/user_headers/include \
- $(TARGET_CPPFLAGS)
- TARGET_CFLAGS += \
- -I$(PKG_BUILD_DIR)/include \
- -I$(LINUX_DIR)/user_headers/include \
- -ffunction-sections -fdata-sections \
- -DNO_LEGACY
- TARGET_LDFLAGS += \
- -lm -Wl,--gc-sections
- CONFIGURE_ARGS += \
- --enable-shared \
- --enable-devel \
- --with-kernel="$(LINUX_DIR)/user_headers" \
- --with-xtlibdir=/opt/lib/iptables \
- --enable-static \
- $(if $(CONFIG_IPV6),,--disable-ipv6)
- MAKE_FLAGS := \
- $(TARGET_CONFIGURE_OPTS) \
- COPT_FLAGS="$(TARGET_CFLAGS)" \
- KERNEL_DIR="$(LINUX_DIR)/user_headers/" PREFIX=/opt \
- KBUILD_OUTPUT="$(LINUX_DIR)"
- #define Build/InstallDev
- # $(INSTALL_DIR) $(1)/opt/include
- # $(INSTALL_DIR) $(1)/opt/include/iptables
- # $(INSTALL_DIR) $(1)/opt/include/net/netfilter
- # # XXX: iptables header fixup, some headers are not installed by iptables anymore
- # $(CP) $(PKG_BUILD_DIR)/include/iptables/*.h $(1)/opt/include/iptables/
- # $(CP) $(PKG_BUILD_DIR)/include/iptables.h $(1)/opt/include/
- # $(CP) $(PKG_BUILD_DIR)/include/ip6tables.h $(1)/opt/include/
- # $(CP) $(PKG_BUILD_DIR)/include/libipulog $(1)/opt/include/
- # $(CP) $(PKG_BUILD_DIR)/include/libiptc $(1)/opt/include/
- # $(CP) $(PKG_INSTALL_DIR)/opt/include/* $(1)/opt/include/
- # $(INSTALL_DIR) $(1)/opt/lib
- # $(CP) $(PKG_INSTALL_DIR)/opt/lib/libxtables.so* $(1)/opt/lib/
- # $(CP) $(PKG_INSTALL_DIR)/opt/lib/libip*tc.so* $(1)/opt/lib/
- # $(INSTALL_DIR) $(1)/opt/lib/pkgconfig
- # $(CP) $(PKG_INSTALL_DIR)/opt/lib/pkgconfig/xtables.pc $(1)/opt/lib/pkgconfig/
- # $(CP) $(PKG_INSTALL_DIR)/opt/lib/pkgconfig/libip*tc.pc $(1)/opt/lib/pkgconfig/
- # # XXX: needed by firewall3
- # $(CP) $(PKG_BUILD_DIR)/extensions/libiptext*.so $(1)/opt/lib/
- #endef
- define Package/iptables/install
- $(INSTALL_DIR) $(1)/opt/bin
- $(CP) $(PKG_INSTALL_DIR)/opt/bin/iptables-xml $(1)/opt/bin/
- $(INSTALL_DIR) $(1)/opt/sbin
- $(CP) $(PKG_INSTALL_DIR)/opt/sbin/* $(1)/opt/sbin/
- $(INSTALL_DIR) $(1)/opt/lib/iptables
- $(CP) $(PKG_INSTALL_DIR)/opt/lib/*.so* $(1)/opt/lib/
- $(CP) $(PKG_BUILD_DIR)/extensions/*.so $(1)/opt/lib/
- $(CP) $(PKG_INSTALL_DIR)/opt/lib/iptables/*.so* $(1)/opt/lib/iptables/
- endef
- $(eval $(call BuildPackage,iptables))
- xxx@zzz:/Entware
- ➜ ls -1 feeds/keendev3x/iptables_kn/patches/
- 020-iptables-disable-modprobe.patch
- 030-no-libnfnetlink.patch
- 050-optional-xml.patch
- 100-bash-location.patch
- 200-configurable_builtin.patch
- 500-add-xt_id-match.patch
- 600-shared-libext.patch
- 700-disable-legacy-revisions.patch
- 800-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch
- 920-xt_ndmmark.patch
- 930-xt_conndmmark.patch
- xxx@zzz:/Entware
- ➜
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement