From 21435953e16cda318a82334ddbadb3b5c36d9ea7 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 15 Jan 2020 15:51:32 +0000 Subject: gentoo resync : 15.01.2020 --- net-firewall/xtables-addons/Manifest | 4 +- .../xtables-addons/xtables-addons-3.3.ebuild | 189 --------------------- .../xtables-addons/xtables-addons-3.7.ebuild | 189 +++++++++++++++++++++ 3 files changed, 191 insertions(+), 191 deletions(-) delete mode 100644 net-firewall/xtables-addons/xtables-addons-3.3.ebuild create mode 100644 net-firewall/xtables-addons/xtables-addons-3.7.ebuild (limited to 'net-firewall/xtables-addons') diff --git a/net-firewall/xtables-addons/Manifest b/net-firewall/xtables-addons/Manifest index 1cf0f9f494b8..360367bc8976 100644 --- a/net-firewall/xtables-addons/Manifest +++ b/net-firewall/xtables-addons/Manifest @@ -1,5 +1,5 @@ DIST xtables-addons-2.13.tar.xz 322116 BLAKE2B 31d12adcfdf2043b44b5789f3ba3215197ff48d378b20fd6406f6afd22739e04069f08f32214a2230ec797469b236788dbebef079855539994db69be358ec421 SHA512 51cfa963d6f2f931b0361746e0b48f5ecf43a14e9e8d5297ef55faf0e9f8d1deb4641e88e3fea2afdbb3e39dd06d414de6057fb4a21e5184d4ea3d21b8028497 -DIST xtables-addons-3.3.tar.xz 322676 BLAKE2B caea009b76e813d72a0490ac961be8e97340b6afda078062104ad8a320d7e6e673450232a0f670829b616e07596397e72c51c8d21f905c664749de6301dec12e SHA512 76e76f8cb385d1f471b01c60be1561910123a4a083374a3976fae98943197c3e77fad62363addba8d14d0aaf23713df9a10a22b1906bbdbb702a61c297d3cb3c +DIST xtables-addons-3.7.tar.xz 325124 BLAKE2B e7f0bff03f0b77b55cd578c5a77ab4a306fa5a5cfd3b7e5b801b60d4ccc2c5a476fee2b04f4cb8db4b3ab34c7dab353ec13cba1fe98a714cfbb2e89e3110841d SHA512 336f19596251507a88d7c399f9a3e6f517e4b72787ff7e7108e20e42e68932bca0eed79c54ddfa92112daae73a94a7349a874bcf993bd4abea1d875d7f2b8565 EBUILD xtables-addons-2.13.ebuild 5499 BLAKE2B 165def630f60562886928e7cc45a58c2446dc345745fcb0bc8245681042d88eef72001c3d8c2c86d085bb7dd9596567f64366319bf4e403146459355fef30c62 SHA512 fce73d0812ae0923585fd5d02878677a8364cb5c256e411ff579bd60ac446188981c72bf534dcc0168098d727c404d567e42855aa24474c874ca562ec1e017ac -EBUILD xtables-addons-3.3.ebuild 5471 BLAKE2B d0d15134eaa4adf16cbfeb289dd3bfbbf3fce8635e0448a23298e3e275016a735fcbe08fb1427de7203344a5c24eb839d6eedae360ab4bb238378a03abac7057 SHA512 f885f314f54bf2b26218f7daf06c763e004f19d2e36f3f658cff75f428a2ce5891ebd555f7b5464db129d6d419a4aca9339dbb2e5b861a30077e13f678a4ee8e +EBUILD xtables-addons-3.7.ebuild 5471 BLAKE2B c7728f379a0f445a6bfd93a9ef2ded1582cd27ba15ba72aa1a978df4af888d19e290b97b3c5a1ef67e19b54b54671770f873322b956e940a631209255dd87ed2 SHA512 54612f910f350f2bb8f14544b253a5132f3cb3515007d483968dac7cf560b4b68a33201a766d33c333d4f1d777bd16db5bb09cbcc46dd6836eca5047cf53aba0 MISC metadata.xml 775 BLAKE2B 3462baf963682f15042f1fe9a985fdce50d46abb5fbe1080f6ce5285314a3e24581d780d84112a5bed0a4a132ce17f29678983711a38745d0fd7969091e76182 SHA512 85474ba552703d77bc7cc18ccef424f5eeb68e23eb41e14a8c360afcdcb2632a99420fda2dca57ea15dbda3f850d939c16b18cbdc96dbfcf31a6af3f40743f0c diff --git a/net-firewall/xtables-addons/xtables-addons-3.3.ebuild b/net-firewall/xtables-addons/xtables-addons-3.3.ebuild deleted file mode 100644 index a19790d7af14..000000000000 --- a/net-firewall/xtables-addons/xtables-addons-3.3.ebuild +++ /dev/null @@ -1,189 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -MODULES_OPTIONAL_USE=modules -MODULES_OPTIONAL_USE_IUSE_DEFAULT=1 -inherit eutils linux-info linux-mod multilib - -DESCRIPTION="iptables extensions not yet accepted in the main kernel" -HOMEPAGE="http://xtables-addons.sourceforge.net/" -SRC_URI="mirror://sourceforge/xtables-addons/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -MODULES="quota2 psd pknock lscan length2 ipv4options ipp2p iface gradm geoip fuzzy condition tarpit sysrq logmark ipmark echo dnetmap dhcpmac delude chaos account" - -for mod in ${MODULES}; do - IUSE="${IUSE} xtables_addons_${mod}" -done - -DEPEND=">=net-firewall/iptables-1.6.0" - -RDEPEND="${DEPEND} - xtables_addons_geoip? ( - app-arch/unzip - dev-perl/Net-CIDR-Lite - dev-perl/Text-CSV_XS - virtual/perl-Getopt-Long - ) -" - -DEPEND="${DEPEND} - virtual/linux-sources" - -SKIP_MODULES="" - -XA_check4internal_module() { - local mod=${1} - local version=${3} - local kconfigname=${3} - - if use xtables_addons_${mod} && kernel_is -gt ${version}; then - ewarn "${kconfigname} should be provided by the kernel. Skipping its build..." - if ! linux_chkconfig_present ${kconfigname}; then - ewarn "Please enable ${kconfigname} target in your kernel - configuration or disable checksum module in ${PN}." - fi - # SKIP_MODULES in case we need to disable building of everything - # like having this USE disabled - SKIP_MODULES+=" ${mod}" - fi -} - -pkg_setup() { - if use modules; then - get_version - check_modules_supported - CONFIG_CHECK="NF_CONNTRACK NF_CONNTRACK_MARK ~CONNECTOR" - ERROR_CONNECTOR="Please, enable CONFIG_CONNECTOR if you wish to receive userspace notifications from pknock through netlink/connector" - linux-mod_pkg_setup - - if ! linux_chkconfig_present IPV6; then - SKIP_IPV6_MODULES="ip6table_rawpost" - ewarn "No IPV6 support in kernel. Disabling: ${SKIP_IPV6_MODULES}" - fi - kernel_is -lt 4 18 && die "${P} requires kernel version >= 4.18" - fi -} - -# Helper for maintainer: cheks if all possible MODULES are listed. -XA_qa_check() { - local all_modules - all_modules=$(sed -n '/^build_/{s/build_\(.*\)=.*/\L\1/;G;s/\n/ /;s/ $//;h}; ${x;p}' "${S}/mconfig") - if [[ ${all_modules} != ${MODULES} ]]; then - ewarn "QA: Modules in mconfig differ from \$MODULES in ebuild." - ewarn "Please, update MODULES in ebuild." - ewarn "'${all_modules}'" - fi -} - -# Is there any use flag set? -XA_has_something_to_build() { - local mod - for mod in ${MODULES}; do - use xtables_addons_${mod} && return - done - - eerror "All modules are disabled. What do you want me to build?" - eerror "Please, set XTABLES_ADDONS to any combination of" - eerror "${MODULES}" - die "All modules are disabled." -} - -# Parse Kbuid files and generates list of sources -XA_get_module_name() { - [[ $# != 1 ]] && die "XA_get_sources_for_mod: needs exactly one argument." - local mod objdir build_mod sources_list - mod=${1} - objdir=${S}/extensions - # Take modules name from mconfig - build_mod=$(sed -n "s/\(build_${mod}\)=.*/\1/Ip" "${S}/mconfig") - # strip .o, = and everything before = and print - sources_list=$(sed -n "/^obj-[$][{]${build_mod}[}]/\ - {s:obj-[^+]\+ [+]=[[:space:]]*::;s:[.]o::g;p}" \ - "${objdir}/Kbuild") - - if [[ -d ${S}/extensions/${sources_list} ]]; then - objdir=${S}/extensions/${sources_list} - sources_list=$(sed -n "/^obj-m/\ - {s:obj-[^+]\+ [+]=[[:space:]]*::;s:[.]o::g;p}" \ - "${objdir}/Kbuild") - fi - for mod_src in ${sources_list}; do - has ${mod_src} ${SKIP_IPV6_MODULES} || \ - echo " ${mod_src}(xtables_addons:${S}/extensions:${objdir})" - done -} - -# Die on modules known to fail on certain kernel version. -XA_known_failure() { - local module_name=$1 - local KV_max=$2 - - if use xtables_addons_${module_name} && kernel_is ge ${KV_max//./ }; then - eerror - eerror "XTABLES_ADDONS=${module_name} fails to build on linux ${KV_max} or above." - eerror "Either remove XTABLES_ADDONS=${module_name} or use an earlier version of the kernel." - eerror - die - fi -} - -src_prepare() { - XA_qa_check - XA_has_something_to_build - - # Bug #553630#c2. echo fails on linux-4 and above. - # This appears to be fixed, at least as of linux-4.2 - # XA_known_failure "echo" 4 - - local mod module_name - if use modules; then - MODULE_NAMES="compat_xtables(xtables_addons:${S}/extensions:)" - fi - for mod in ${MODULES}; do - if ! has ${mod} ${SKIP_MODULES} && use xtables_addons_${mod}; then - sed "s/\(build_${mod}=\).*/\1m/I" -i mconfig || die - if use modules; then - for module_name in $(XA_get_module_name ${mod}); do - MODULE_NAMES+=" ${module_name}" - done - fi - else - sed "s/\(build_${mod}=\).*/\1n/I" -i mconfig || die - fi - done - einfo "${MODULE_NAMES}" # for debugging - - sed -e 's/depmod -a/true/' -i Makefile.in || die - sed -e '/^all-local:/{s: modules::}' \ - -e '/^install-exec-local:/{s: modules_install::}' \ - -i extensions/Makefile.in || die - - use xtables_addons_geoip || sed -e '/^SUBDIRS/{s/geoip//}' -i Makefile.in - - eapply_user -} - -src_configure() { - set_arch_to_kernel # .. or it'll look for /arch/amd64/Makefile - econf --prefix="${EPREFIX}/" \ - --libexecdir="${EPREFIX}/$(get_libdir)/" \ - --with-kbuild="${KV_OUT_DIR}" -} - -src_compile() { - emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" V=1 - use modules && BUILD_PARAMS="V=1" BUILD_TARGETS="modules" linux-mod_src_compile -} - -src_install() { - emake DESTDIR="${D}" install - use modules && linux-mod_src_install - dodoc -r README doc/* - find "${ED}" -type f -name '*.la' -exec rm -rf '{}' '+' -} diff --git a/net-firewall/xtables-addons/xtables-addons-3.7.ebuild b/net-firewall/xtables-addons/xtables-addons-3.7.ebuild new file mode 100644 index 000000000000..b87050a6cf2a --- /dev/null +++ b/net-firewall/xtables-addons/xtables-addons-3.7.ebuild @@ -0,0 +1,189 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +MODULES_OPTIONAL_USE=modules +MODULES_OPTIONAL_USE_IUSE_DEFAULT=1 +inherit eutils linux-info linux-mod multilib + +DESCRIPTION="iptables extensions not yet accepted in the main kernel" +HOMEPAGE="http://xtables-addons.sourceforge.net/" +SRC_URI="mirror://sourceforge/xtables-addons/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +MODULES="quota2 psd pknock lscan length2 ipv4options ipp2p iface gradm geoip fuzzy condition tarpit sysrq logmark ipmark echo dnetmap dhcpmac delude chaos account" + +for mod in ${MODULES}; do + IUSE="${IUSE} xtables_addons_${mod}" +done + +DEPEND=">=net-firewall/iptables-1.6.0" + +RDEPEND="${DEPEND} + xtables_addons_geoip? ( + app-arch/unzip + dev-perl/Net-CIDR-Lite + dev-perl/Text-CSV_XS + virtual/perl-Getopt-Long + ) +" + +DEPEND="${DEPEND} + virtual/linux-sources" + +SKIP_MODULES="" + +XA_check4internal_module() { + local mod=${1} + local version=${3} + local kconfigname=${3} + + if use xtables_addons_${mod} && kernel_is -gt ${version}; then + ewarn "${kconfigname} should be provided by the kernel. Skipping its build..." + if ! linux_chkconfig_present ${kconfigname}; then + ewarn "Please enable ${kconfigname} target in your kernel + configuration or disable checksum module in ${PN}." + fi + # SKIP_MODULES in case we need to disable building of everything + # like having this USE disabled + SKIP_MODULES+=" ${mod}" + fi +} + +pkg_setup() { + if use modules; then + get_version + check_modules_supported + CONFIG_CHECK="NF_CONNTRACK NF_CONNTRACK_MARK ~CONNECTOR" + ERROR_CONNECTOR="Please, enable CONFIG_CONNECTOR if you wish to receive userspace notifications from pknock through netlink/connector" + linux-mod_pkg_setup + + if ! linux_chkconfig_present IPV6; then + SKIP_IPV6_MODULES="ip6table_rawpost" + ewarn "No IPV6 support in kernel. Disabling: ${SKIP_IPV6_MODULES}" + fi + kernel_is -lt 4 18 && die "${P} requires kernel version >= 4.18" + fi +} + +# Helper for maintainer: cheks if all possible MODULES are listed. +XA_qa_check() { + local all_modules + all_modules=$(sed -n '/^build_/{s/build_\(.*\)=.*/\L\1/;G;s/\n/ /;s/ $//;h}; ${x;p}' "${S}/mconfig") + if [[ ${all_modules} != ${MODULES} ]]; then + ewarn "QA: Modules in mconfig differ from \$MODULES in ebuild." + ewarn "Please, update MODULES in ebuild." + ewarn "'${all_modules}'" + fi +} + +# Is there any use flag set? +XA_has_something_to_build() { + local mod + for mod in ${MODULES}; do + use xtables_addons_${mod} && return + done + + eerror "All modules are disabled. What do you want me to build?" + eerror "Please, set XTABLES_ADDONS to any combination of" + eerror "${MODULES}" + die "All modules are disabled." +} + +# Parse Kbuid files and generates list of sources +XA_get_module_name() { + [[ $# != 1 ]] && die "XA_get_sources_for_mod: needs exactly one argument." + local mod objdir build_mod sources_list + mod=${1} + objdir=${S}/extensions + # Take modules name from mconfig + build_mod=$(sed -n "s/\(build_${mod}\)=.*/\1/Ip" "${S}/mconfig") + # strip .o, = and everything before = and print + sources_list=$(sed -n "/^obj-[$][{]${build_mod}[}]/\ + {s:obj-[^+]\+ [+]=[[:space:]]*::;s:[.]o::g;p}" \ + "${objdir}/Kbuild") + + if [[ -d ${S}/extensions/${sources_list} ]]; then + objdir=${S}/extensions/${sources_list} + sources_list=$(sed -n "/^obj-m/\ + {s:obj-[^+]\+ [+]=[[:space:]]*::;s:[.]o::g;p}" \ + "${objdir}/Kbuild") + fi + for mod_src in ${sources_list}; do + has ${mod_src} ${SKIP_IPV6_MODULES} || \ + echo " ${mod_src}(xtables_addons:${S}/extensions:${objdir})" + done +} + +# Die on modules known to fail on certain kernel version. +XA_known_failure() { + local module_name=$1 + local KV_max=$2 + + if use xtables_addons_${module_name} && kernel_is ge ${KV_max//./ }; then + eerror + eerror "XTABLES_ADDONS=${module_name} fails to build on linux ${KV_max} or above." + eerror "Either remove XTABLES_ADDONS=${module_name} or use an earlier version of the kernel." + eerror + die + fi +} + +src_prepare() { + XA_qa_check + XA_has_something_to_build + + # Bug #553630#c2. echo fails on linux-4 and above. + # This appears to be fixed, at least as of linux-4.2 + # XA_known_failure "echo" 4 + + local mod module_name + if use modules; then + MODULE_NAMES="compat_xtables(xtables_addons:${S}/extensions:)" + fi + for mod in ${MODULES}; do + if ! has ${mod} ${SKIP_MODULES} && use xtables_addons_${mod}; then + sed "s/\(build_${mod}=\).*/\1m/I" -i mconfig || die + if use modules; then + for module_name in $(XA_get_module_name ${mod}); do + MODULE_NAMES+=" ${module_name}" + done + fi + else + sed "s/\(build_${mod}=\).*/\1n/I" -i mconfig || die + fi + done + einfo "${MODULE_NAMES}" # for debugging + + sed -e 's/depmod -a/true/' -i Makefile.in || die + sed -e '/^all-local:/{s: modules::}' \ + -e '/^install-exec-local:/{s: modules_install::}' \ + -i extensions/Makefile.in || die + + use xtables_addons_geoip || sed -e '/^SUBDIRS/{s/geoip//}' -i Makefile.in + + eapply_user +} + +src_configure() { + set_arch_to_kernel # .. or it'll look for /arch/amd64/Makefile + econf --prefix="${EPREFIX}/" \ + --libexecdir="${EPREFIX}/$(get_libdir)/" \ + --with-kbuild="${KV_OUT_DIR}" +} + +src_compile() { + emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" V=1 + use modules && BUILD_PARAMS="V=1" BUILD_TARGETS="modules" linux-mod_src_compile +} + +src_install() { + emake DESTDIR="${D}" install + use modules && linux-mod_src_install + dodoc -r README doc/* + find "${ED}" -type f -name '*.la' -exec rm -rf '{}' '+' +} -- cgit v1.2.3