From 6ee17dd82a3bcd0e90af4ebfbb3e411d342761be Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 9 Oct 2024 04:26:33 +0100 Subject: gentoo auto-resync : 09:10:2024 - 04:26:32 --- net-firewall/Manifest.gz | Bin 4220 -> 4215 bytes net-firewall/ipset/Manifest | 2 +- net-firewall/ipset/ipset-7.22-r2.ebuild | 2 +- net-firewall/nftables/Manifest | 2 +- net-firewall/nftables/nftables-1.1.0-r1.ebuild | 2 +- net-firewall/ufw/Manifest | 3 +- net-firewall/ufw/files/ufw-0.36.1-distutils.patch | 14 ++ net-firewall/ufw/ufw-0.36.1-r1.ebuild | 222 ++++++++++++++++++++++ net-firewall/ufw/ufw-0.36.1.ebuild | 222 ---------------------- 9 files changed, 242 insertions(+), 227 deletions(-) create mode 100644 net-firewall/ufw/files/ufw-0.36.1-distutils.patch create mode 100644 net-firewall/ufw/ufw-0.36.1-r1.ebuild delete mode 100644 net-firewall/ufw/ufw-0.36.1.ebuild (limited to 'net-firewall') diff --git a/net-firewall/Manifest.gz b/net-firewall/Manifest.gz index cb880cc4e232..56a828dcc8b4 100644 Binary files a/net-firewall/Manifest.gz and b/net-firewall/Manifest.gz differ diff --git a/net-firewall/ipset/Manifest b/net-firewall/ipset/Manifest index cc54e3057455..548dd50e7def 100644 --- a/net-firewall/ipset/Manifest +++ b/net-firewall/ipset/Manifest @@ -7,5 +7,5 @@ AUX ipset.initd-r7 4175 BLAKE2B 8a9936ffc57ffcf25ed45769d6cb76cecc0de66919597a90 AUX ipset.systemd-r1 492 BLAKE2B 78fd7b122e0fe08b36d36e736d18b7a5f0bf1aa78802f1bdc7abf69ad2ef9c0bcfb22ae84f8f6489aee6c147ee3c0be7ebfa600712bf6169940802466daf68ba SHA512 6574e48ce6b3c4f45122a8b387746793ceda62f68ec8b0f3f6f949f5650ab557f3f7eb75699e36d5bf04efbf39dc17e030cc44ea9d97891578d4c909669e6eb7 DIST ipset-7.22.tar.bz2 694069 BLAKE2B 9daaff54adb6f9daf69cd7dabbd9134d8fcf8cd7f8ef0c52296961579ad3c8202087158a01664228eff70356ba97f77ec61abbab7c7ce323112fbdc32abd661b SHA512 e375a9110eb7974480147c57eb2cff4bdd03c7704cdae006a3d254cc80fada587aa8aee25a86f7cab29db83f5e283c5f9a47a314297317660ebba5097f623d79 EBUILD ipset-7.22-r1.ebuild 3520 BLAKE2B b087322a155d4d40d2f7fc189a0d9c00d3cf33af9c8fb37ff6af22674fa06bcbdc00323404beb30ffdf07ada193077fff710bdb500d5309ccf8560ef1671054f SHA512 e222f15b72213d7926554261a0ef9c7544eda5cbe2e7ce19e6a0b8fe5c41fd76902c9d3d08be2fa1e5836384ef46f3026290a6acbc6517e85de1c8064e41ad48 -EBUILD ipset-7.22-r2.ebuild 3569 BLAKE2B 1878d1422b1c5ca2c1be5c5af4ae5e9086ae0b4f4ffba9502571e45153f78c1239aa9d5b4b85901b49c24d39f88509eb0e1bb36267d4448fad41ab8afe892dd6 SHA512 51e60fd741128c70f45b6e0921ab0e7f523883f82f3ecee65d6b506a1a82964e55fcbccbff6f893838acffd018df343dc94210efd539cb60c5331a9067061fcb +EBUILD ipset-7.22-r2.ebuild 3568 BLAKE2B 270953954f4805bb2806d497b448a7d8a9cbc10708b235386015d67705853eb56385879b412c2dc5871062921864432b488444f42250be365077cb9a16197d8d SHA512 27033f060e5bcfa26a3b1824a491c8da960ed4a7bb463ccd250d9b207606563dd50c5835eafb2efb1a02befb4832d9a599eb6f24fae29023d7f97f33a8388377 MISC metadata.xml 475 BLAKE2B e1e06003a410249ed76d39b74ccbcd64b8572ff05f1c818729d787cecfb19cfa9c7e3463473688abc7a398efb908b0c7145bad88bbb7259e69f1b7d985584bcc SHA512 d0a3dca6593e8a62cbf5c325eb59b620137af8d8f5a463702c4d6ec102fd03b8adbbdcd9358777d0461f57a98d892d359d80b8f722d3f322f3d4766d762f6585 diff --git a/net-firewall/ipset/ipset-7.22-r2.ebuild b/net-firewall/ipset/ipset-7.22-r2.ebuild index 32d9e672f9d5..cc3f3e625748 100644 --- a/net-firewall/ipset/ipset-7.22-r2.ebuild +++ b/net-firewall/ipset/ipset-7.22-r2.ebuild @@ -12,7 +12,7 @@ SRC_URI="https://ipset.netfilter.org/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 arm ~arm64 ~loong ~ppc ppc64 ~riscv x86" +KEYWORDS="amd64 arm ~arm64 ~loong ppc ppc64 ~riscv x86" RDEPEND=" net-firewall/iptables diff --git a/net-firewall/nftables/Manifest b/net-firewall/nftables/Manifest index ce4e626e0ae9..c4eaf8c8fd73 100644 --- a/net-firewall/nftables/Manifest +++ b/net-firewall/nftables/Manifest @@ -14,7 +14,7 @@ DIST nftables-1.1.0.tar.xz.sig 566 BLAKE2B 556287b40ad6f82d229ae18910ec2008c3168 DIST nftables-1.1.1.tar.xz 989700 BLAKE2B f273c78369ba755049c6afa63eba195cf29f926fa8fc9bf344022904c00a8c6c4259cc5093e23993a55fd25790af575305df79a7c28624fa7082661b2eed70d0 SHA512 676413d4adadffb15d52c1f8f6432636cab83a7bcda1a18d9f0e6b58819a2c027a49922588c02bd9ad386de930eaa697bfe74c0938b595bf1ee485bfa7cf2e50 DIST nftables-1.1.1.tar.xz.sig 566 BLAKE2B b7debda3373972f69af9b4b23e1b66a8fd156440187aafba605bb7342c267207e5aa628256e96432ebd4583a6a9436e1969a33636111d2bd8d57185a01e2d502 SHA512 fc23034c512f686167203e827ff2a8f7cb64530211ce92a28793bd49577ce3bf519ffbe910b0071cb21925898497cb5cbf70121c68bfcdbfa4460c63a14203ac EBUILD nftables-1.0.9.ebuild 6472 BLAKE2B 28da5e49bdf6f55f3e5811d0563c8906e46c74dc8075bd9d88cb5558c6d2b41a9b3f6fe2cf310b8adbd2943ca2ee26e9fb96b516e14fdaf08a4c028ebb3546fc SHA512 46de8e2d2b0750185fdeefe4640d4df9233b7a9369a23f580bb4ab7681a830a7d7d13e2a7ebc9b10d1dfe11ba04b0d63a77e5902113543f45571205cc57b6254 -EBUILD nftables-1.1.0-r1.ebuild 6560 BLAKE2B 2e9025309babef9f8a0c2a8c84bb07dc37e9bd7e30be2ae83c64a8df9915c6aa15bbe142327ae2be8ef7954195e243077021302cc2d327bc65fdb786577a66bf SHA512 8561f8211b7b26dbd3ffdfacbfeac6531496370954fbf80d9bfc31e0c6b364b6fef772dec6c1b136fc9c00a54ecb13fe1b4629d49d7cac03d23e546b965ba8a4 +EBUILD nftables-1.1.0-r1.ebuild 6559 BLAKE2B b286976c872edf6027cb68b4cec272814c786ff4e682ee30c68fffec1b7c98bf8ed54b76af90c92f31867f3137b77bbe6c39cf8233e1e380365cbb3491af663a SHA512 5d9eda7c343783a6fde9f992d8a118d600ca8c673624c81458ff787349b74c91ec1f8847fbb81061d931e83d2d65b29d8c105b1bbc38b0d7333c87b46c7ff264 EBUILD nftables-1.1.1.ebuild 6482 BLAKE2B f803c2b3ea243bdd7365fccdb7f36dffe6246381b7743d656dcebfa6c5afbaca110c2dd110cea0437f7d5fcc9790da57df00f6b6021861a048672abab8f26c8a SHA512 265d6d5512b005e45f555a812557ac7ca48a2a9efb0095cd9aa37e90877bc6943a2e751efd9f82f1583b623bb4c05cbb04e93253c8f9804f8a14887d1eadffba EBUILD nftables-9999.ebuild 6482 BLAKE2B f803c2b3ea243bdd7365fccdb7f36dffe6246381b7743d656dcebfa6c5afbaca110c2dd110cea0437f7d5fcc9790da57df00f6b6021861a048672abab8f26c8a SHA512 265d6d5512b005e45f555a812557ac7ca48a2a9efb0095cd9aa37e90877bc6943a2e751efd9f82f1583b623bb4c05cbb04e93253c8f9804f8a14887d1eadffba MISC metadata.xml 684 BLAKE2B 96044107a07596178b59f3d4bed0433e06eb74693fafcc1a8c20468e02626814ba1544bba54c64367e43a126463b0f3b33e340476aff15db934467e8b9d46bf7 SHA512 fa4c9cadddccda4217837a892fbec3e1b984fb18a4d11d5536f22724d2455724eb59c5cc06da5830fb28bb48cb2d01374fdc56e216296c695c678af28390392a diff --git a/net-firewall/nftables/nftables-1.1.0-r1.ebuild b/net-firewall/nftables/nftables-1.1.0-r1.ebuild index 37d124b27529..97a1af4a7fd5 100644 --- a/net-firewall/nftables/nftables-1.1.0-r1.ebuild +++ b/net-firewall/nftables/nftables-1.1.0-r1.ebuild @@ -21,7 +21,7 @@ else https://netfilter.org/projects/nftables/files/${P}.tar.xz verify-sig? ( https://netfilter.org/projects/nftables/files/${P}.tar.xz.sig ) " - KEYWORDS="amd64 arm ~arm64 ~hppa ~loong ~mips ~ppc ppc64 ~riscv ~sparc x86" + KEYWORDS="amd64 arm ~arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86" BDEPEND="verify-sig? ( sec-keys/openpgp-keys-netfilter )" fi diff --git a/net-firewall/ufw/Manifest b/net-firewall/ufw/Manifest index dcd32ca58ab1..7dec8b3fd234 100644 --- a/net-firewall/ufw/Manifest +++ b/net-firewall/ufw/Manifest @@ -2,6 +2,7 @@ AUX rsyslog/ufw.logrotate 178 BLAKE2B 488f56cb61e3d708e771e927b0c92ce354ebd7aa65 AUX syslog-ng/syslog-ng.example 381 BLAKE2B 01026130ac3aec7bb4b3862e9567c225073d5f467eced4701c711842f2aa8ff7b566874e64e302728a5bff15d848325040e3df900776950269d431dda6763950 SHA512 f48d2487679fe179ea216bb4259affbf5ab4c86725b45942581ada8dac24dd0c978f755182805ff5350ab169972fcee7bb54a6d14df760d4b5f62c485af1e49e AUX syslog-ng/ufw.logrotate 269 BLAKE2B 6dd614ec033e8b9fd6d95e7a6fc69252e5a7fd33da6e760320b7f9fb519936a94f2f46e7833189601ddfa7fa080402237831fab9daf1b18a0872cc49c56715b1 SHA512 22d89f04b68a8b4deeb60aca263239255dd01b9c6e6d23a5d77514daf7bb9dc3910a28cfe9c606f70d2a50f0365bb19c3cf00c5859ee2630c00f0df451ee9c5d AUX ufw-0.36-bash-completion.patch 328 BLAKE2B 7f88afa8f4ccc12aba70dce1ca82e6992497819cfd7dc005b13c9d17212adb74134115d83907ec2b8c916d40213ab2acea170e649e438744b854f11fd22815bd SHA512 11a9cf4906fa0bd677e745615b3c4d663512a1d05f9c21149d09624237a88938b9ed83b8ca876dbcf9bbac41a4bf7155eba76ec32778e025f013e1ffb07e4abb +AUX ufw-0.36.1-distutils.patch 400 BLAKE2B c0e1fa2ca4f1582ad60023892247cf70801eefa249574349577c355136af14736a150ffebacaeec5372abfab1d65cef512b453c80518548044aac07059f9125b SHA512 77cbc7c575cc0f7af1d9e562234dbba22d9d58e268664e6ae1c656c4e558c50c614975d1dd69a948eaf6962e644de2ea0bb81a30cdff4000d243adb7d4e18daf AUX ufw-0.36.1-dont-check-iptables.patch 1956 BLAKE2B 1afb02e74e4855a93a6145756bf4ef2b3f4f457bc5af0844d9b4788f8e01d3fc2e3b9f27fbba8ab5316dd51f0e995632173b5dd5553a17e25f17d95e318317c2 SHA512 6b8f9f09d07a402aaf671a7d2ae899d4deb67fac5525f5733ed5e67b517d108df3d7037151f953dc0e5614997a5a44b32fd5c8746dcea57c5f264ae625d71554 AUX ufw-0.36.1-move-path.patch 4880 BLAKE2B 544dc08b6bb806929f049db4f9aa70dff35526ff0602bdb19ff4d5a8d3c0e19a46e62a617cd52c1bfd9a7300a48642e84478b924ba28f0e9183305486a002a6f SHA512 8b3710f3c0b8ca6a05db1dd74e84088b12fe9556a75da7fb7211788cdd24c3157251b4a82973d21c787b05bc81a27940c2d5fffd56d541334cdbd2e99c532019 AUX ufw-0.36.1-shebang.patch 713 BLAKE2B ad34303c58fd76f47d4ce550c1669c09cbbf9c00cfa986000d79cefbd44319f37b33b2b4090bf4551c9f6c2f961e7e9a3a628a8209fb6c43b8c7741406ff0b9f SHA512 ebf73b60b15292cd35c11262fe488294b229e60acaca81487d70bb2817c080f22d6813f1d8a9edc601fd9d2da141474a6da8dc7195fc99db7f664c7db1848457 @@ -9,5 +10,5 @@ AUX ufw-2.initd 2611 BLAKE2B b6a75e023ad0efeeef168e7e074c716ec66f40d3bde9f99cf1a AUX ufw.confd 219 BLAKE2B 8ed5dec5dd9acc84715918240e31398268ff36f73bb2cfc10e64e0593e59cc7f5b988f8545ddea37f19d9b40e870d743bea66edd7da1e3d2753b6edda8afa352 SHA512 a010532c97b9cf83f1fb5fa707228e0542a8b109c76e5942aaf2d6552c63e033d32e39e5a6ac87cb9e2ed4c3fdbc5d03c75127e6378665e592b143bc1eda52c7 AUX ufw.service 329 BLAKE2B e817fc85b3bdb21b47a3089c6f2204292a019eaeae510832530f0e09f8784a312dd636fa3cf90610bb3159d52b4bdaadf803699ac4bff31576b566a3e977b2d2 SHA512 a365e704ca958c83c86f8a6b1623ce3f9ad72dcfb0cfc7758bfc787e0877f897ccf8b200db83df17130ca5dcc54f938178b8cabfe3ee0c0896c814ee7d2439c7 DIST ufw-0.36.1.tar.gz 583123 BLAKE2B 16e1ee67493d5db10a04667b646a019aa3aeb06345d0facc334fb07eeff4d4f6674a4699b2bd7bd6ed29de1c05c4e14812e9e8ec55c4bfb8579b8e3e2e577f6a SHA512 77d01fef661083eac041be6d6eabffb1d8aedb215f73e44e18a9a63a48da96414b3c0166e3ffd9402c22c72a6de5d774ba14b15368b02997aae8e08d1c5dd4c0 -EBUILD ufw-0.36.1.ebuild 6215 BLAKE2B f73ffdcea5c141217de8bdc2ebf6b600b6be1720e661cab068b02a3c7db26769105713641b3b968f31b45fa2fb704d992fe4a5a301fe09e7f71486c415ad9ffc SHA512 f0090ef44b6c831b2c31b8688cc864d7e27568d6730af6de51028851e2730ab36147439337f3ca93995184db299faf2f29157119de8f832eb62925948b805239 +EBUILD ufw-0.36.1-r1.ebuild 6241 BLAKE2B 9bf06e8422f2086aa62d70f8b01c676c5ec3a50c894d0c3de0ddab435ff61bd1fe7648ff2e7dfe6c9bbc5fb3368c3658501a9c9b51864737407fe589006b3fd2 SHA512 e7f21ea7c250a505a931f12afe9763066e24448c3ababdea9e492029e946321e769384689214adab4ce53711b7b600313986f32ed886ca7c898fba712ae65cee MISC metadata.xml 686 BLAKE2B 6d415e2295cf7facf8908aab2fbd7d4150d24595c9eb30ccf7f105ff2263cd7dc6c393dc8ad8303b264d76be37bb11da3ce4d4b666c0648e974b7585e9e7e452 SHA512 c1dee02a7458095069243337abb01a66dc132de15a51114cc1b39778f02b3a05d28a869cfa8cef55cf8701bb7f872232b63d432c1c5e45d71d90fa6099f74dd5 diff --git a/net-firewall/ufw/files/ufw-0.36.1-distutils.patch b/net-firewall/ufw/files/ufw-0.36.1-distutils.patch new file mode 100644 index 000000000000..fe7ab3845058 --- /dev/null +++ b/net-firewall/ufw/files/ufw-0.36.1-distutils.patch @@ -0,0 +1,14 @@ +https://src.fedoraproject.org/rpms/ufw/raw/rawhide/f/ufw-0.35-distutils-setuptools.patch +--- a/setup.py ++++ b/setup.py +@@ -26,8 +26,8 @@ + # + + from __future__ import print_function +-from distutils.command.install import install as _install +-from distutils.core import setup ++from setuptools.command.install import install as _install ++from setuptools import setup + import errno + import os + import re diff --git a/net-firewall/ufw/ufw-0.36.1-r1.ebuild b/net-firewall/ufw/ufw-0.36.1-r1.ebuild new file mode 100644 index 000000000000..09b82a5878f8 --- /dev/null +++ b/net-firewall/ufw/ufw-0.36.1-r1.ebuild @@ -0,0 +1,222 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +DISTUTILS_IN_SOURCE_BUILD=1 +DISTUTILS_USE_SETUPTOOLS=no + +inherit bash-completion-r1 distutils-r1 linux-info systemd + +DESCRIPTION="A program used to manage a netfilter firewall" +HOMEPAGE="https://launchpad.net/ufw" +SRC_URI="https://launchpad.net/ufw/${PV%.*}/${PV}/+download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ~loong ppc ppc64 ~riscv sparc x86" +IUSE="examples ipv6" + +RDEPEND="net-firewall/iptables[ipv6(+)?]" +BDEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + sys-devel/gettext +" + +PATCHES=( + # Move files away from /lib/ufw. + "${FILESDIR}/${P}-move-path.patch" + # Remove unnecessary build time dependency on net-firewall/iptables. + "${FILESDIR}/${P}-dont-check-iptables.patch" + # Remove shebang modification. + "${FILESDIR}/${P}-shebang.patch" + # Fix bash completions, bug #526300 + "${FILESDIR}/${PN}-0.36-bash-completion.patch" + # Strip distutils use + "${FILESDIR}/${PN}-0.36.1-distutils.patch" +) + +pkg_pretend() { + local CONFIG_CHECK="~PROC_FS + ~NETFILTER_XT_MATCH_COMMENT ~NETFILTER_XT_MATCH_HL + ~NETFILTER_XT_MATCH_LIMIT ~NETFILTER_XT_MATCH_MULTIPORT + ~NETFILTER_XT_MATCH_RECENT ~NETFILTER_XT_MATCH_STATE" + + if kernel_is -ge 2 6 39; then + CONFIG_CHECK+=" ~NETFILTER_XT_MATCH_ADDRTYPE" + else + CONFIG_CHECK+=" ~IP_NF_MATCH_ADDRTYPE" + fi + + # https://bugs.launchpad.net/ufw/+bug/1076050 + if kernel_is -ge 3 4; then + CONFIG_CHECK+=" ~NETFILTER_XT_TARGET_LOG" + else + CONFIG_CHECK+=" ~IP_NF_TARGET_LOG" + use ipv6 && CONFIG_CHECK+=" ~IP6_NF_TARGET_LOG" + fi + + CONFIG_CHECK+=" ~IP_NF_TARGET_REJECT" + use ipv6 && CONFIG_CHECK+=" ~IP6_NF_TARGET_REJECT" + + check_extra_config + + # Check for default, useful optional features. + if ! linux_config_exists; then + ewarn "Cannot determine configuration of your kernel." + return + fi + + local nf_nat_ftp_ok="yes" + local nf_conntrack_ftp_ok="yes" + local nf_conntrack_netbios_ns_ok="yes" + + linux_chkconfig_present \ + NF_NAT_FTP || nf_nat_ftp_ok="no" + linux_chkconfig_present \ + NF_CONNTRACK_FTP || nf_conntrack_ftp_ok="no" + linux_chkconfig_present \ + NF_CONNTRACK_NETBIOS_NS || nf_conntrack_netbios_ns_ok="no" + + # This is better than an essay for each unset option... + if [[ "${nf_nat_ftp_ok}" == "no" ]] || \ + [[ "${nf_conntrack_ftp_ok}" == "no" ]] || \ + [[ "${nf_conntrack_netbios_ns_ok}" == "no" ]]; then + echo + local mod_msg="Kernel options listed below are not set. They are not" + mod_msg+=" mandatory, but they are often useful." + mod_msg+=" If you don't need some of them, please remove relevant" + mod_msg+=" module name(s) from IPT_MODULES in" + mod_msg+=" '${EROOT}/etc/default/ufw' before (re)starting ufw." + mod_msg+=" Otherwise ufw may fail to start!" + ewarn "${mod_msg}" + if [[ "${nf_nat_ftp_ok}" == "no" ]]; then + ewarn "NF_NAT_FTP: for better support for active mode FTP." + fi + if [[ "${nf_conntrack_ftp_ok}" == "no" ]]; then + ewarn "NF_CONNTRACK_FTP: for better support for active mode FTP." + fi + if [[ "${nf_conntrack_netbios_ns_ok}" == "no" ]]; then + ewarn "NF_CONNTRACK_NETBIOS_NS: for better Samba support." + fi + fi +} + +python_prepare_all() { + # Set as enabled by default. User can enable or disable + # the service by adding or removing it to/from a runlevel. + sed -i 's/^ENABLED=no/ENABLED=yes/' conf/ufw.conf \ + || die "sed failed (ufw.conf)" + + sed -i "s/^IPV6=yes/IPV6=$(usex ipv6)/" conf/ufw.defaults || die + + # If LINGUAS is set install selected translations only. + if [[ -n ${LINGUAS+set} ]]; then + _EMPTY_LOCALE_LIST="yes" + pushd locales/po > /dev/null || die + + local lang + for lang in *.po; do + if ! has "${lang%.po}" ${LINGUAS}; then + rm "${lang}" || die + else + _EMPTY_LOCALE_LIST="no" + fi + done + + popd > /dev/null || die + else + _EMPTY_LOCALE_LIST="no" + fi + + distutils-r1_python_prepare_all +} + +python_install_all() { + newconfd "${FILESDIR}"/ufw.confd ufw + newinitd "${FILESDIR}"/ufw-2.initd ufw + systemd_dounit "${FILESDIR}/ufw.service" + + pushd "${ED}" || die + chmod -R 0644 etc/ufw/*.rules || die + popd || die + + exeinto /usr/share/${PN} + doexe tests/check-requirements + + # users normally would want it + insinto "/usr/share/doc/${PF}/logging/syslog-ng" + doins -r "${FILESDIR}"/syslog-ng/* + + insinto "/usr/share/doc/${PF}/logging/rsyslog" + doins -r "${FILESDIR}"/rsyslog/* + doins doc/rsyslog.example + + if use examples; then + insinto "/usr/share/doc/${PF}/examples" + doins -r examples/* + fi + newbashcomp shell-completion/bash "${PN}" + + [[ $_EMPTY_LOCALE_LIST != "yes" ]] && domo locales/mo/*.mo + + distutils-r1_python_install_all + python_replicate_script "${D}/usr/sbin/ufw" +} + +pkg_postinst() { + local print_check_req_warn + print_check_req_warn=false + + local found=() + local apps=( "net-firewall/arno-iptables-firewall" + "net-firewall/ferm" + "net-firewall/firehol" + "net-firewall/firewalld" + "net-firewall/ipkungfu" ) + + for exe in "${apps[@]}" + do + if has_version "${exe}"; then + found+=( "${exe}" ) + fi + done + + if [[ -n ${found} ]]; then + echo "" + ewarn "WARNING: Detected other firewall applications:" + ewarn "${found[@]}" + ewarn "If enabled, these applications may interfere with ufw!" + fi + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + echo "" + elog "To enable ufw, add it to boot sequence and activate it:" + elog "-- # rc-update add ufw boot" + elog "-- # /etc/init.d/ufw start" + echo + elog "If you want to keep ufw logs in a separate file, take a look at" + elog "/usr/share/doc/${PF}/logging." + print_check_req_warn=true + else + local rv + for rv in ${REPLACING_VERSIONS}; do + local major=${rv%%.*} + local minor=${rv#${major}.} + if [[ "${major}" -eq 0 && "${minor}" -lt 34 ]]; then + print_check_req_warn=true + fi + done + fi + if [[ "${print_check_req_warn}" == "true" ]]; then + echo + elog "/usr/share/ufw/check-requirements script is installed." + elog "It is useful for debugging problems with ufw. However one" + elog "should keep in mind that the script assumes IPv6 is enabled" + elog "on kernel and net-firewall/iptables, and fails when it's not." + fi + echo + ewarn "Note: once enabled, ufw blocks also incoming SSH connections by" + ewarn "default. See README, Remote Management section for more information." +} diff --git a/net-firewall/ufw/ufw-0.36.1.ebuild b/net-firewall/ufw/ufw-0.36.1.ebuild deleted file mode 100644 index 57490646a919..000000000000 --- a/net-firewall/ufw/ufw-0.36.1.ebuild +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) -DISTUTILS_IN_SOURCE_BUILD=1 -DISTUTILS_USE_SETUPTOOLS=no - -inherit bash-completion-r1 distutils-r1 linux-info systemd - -DESCRIPTION="A program used to manage a netfilter firewall" -HOMEPAGE="https://launchpad.net/ufw" -SRC_URI="https://launchpad.net/ufw/${PV%.*}/${PV}/+download/${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ~loong ppc ppc64 ~riscv sparc x86" -IUSE="examples ipv6" - -RDEPEND="net-firewall/iptables[ipv6(+)?]" -BDEPEND=" - sys-devel/gettext - $(python_gen_cond_dep ' - dev-python/setuptools[${PYTHON_USEDEP}] - ' python3_12) -" - -PATCHES=( - # Move files away from /lib/ufw. - "${FILESDIR}/${P}-move-path.patch" - # Remove unnecessary build time dependency on net-firewall/iptables. - "${FILESDIR}/${P}-dont-check-iptables.patch" - # Remove shebang modification. - "${FILESDIR}/${P}-shebang.patch" - # Fix bash completions, bug #526300 - "${FILESDIR}/${PN}-0.36-bash-completion.patch" -) - -pkg_pretend() { - local CONFIG_CHECK="~PROC_FS - ~NETFILTER_XT_MATCH_COMMENT ~NETFILTER_XT_MATCH_HL - ~NETFILTER_XT_MATCH_LIMIT ~NETFILTER_XT_MATCH_MULTIPORT - ~NETFILTER_XT_MATCH_RECENT ~NETFILTER_XT_MATCH_STATE" - - if kernel_is -ge 2 6 39; then - CONFIG_CHECK+=" ~NETFILTER_XT_MATCH_ADDRTYPE" - else - CONFIG_CHECK+=" ~IP_NF_MATCH_ADDRTYPE" - fi - - # https://bugs.launchpad.net/ufw/+bug/1076050 - if kernel_is -ge 3 4; then - CONFIG_CHECK+=" ~NETFILTER_XT_TARGET_LOG" - else - CONFIG_CHECK+=" ~IP_NF_TARGET_LOG" - use ipv6 && CONFIG_CHECK+=" ~IP6_NF_TARGET_LOG" - fi - - CONFIG_CHECK+=" ~IP_NF_TARGET_REJECT" - use ipv6 && CONFIG_CHECK+=" ~IP6_NF_TARGET_REJECT" - - check_extra_config - - # Check for default, useful optional features. - if ! linux_config_exists; then - ewarn "Cannot determine configuration of your kernel." - return - fi - - local nf_nat_ftp_ok="yes" - local nf_conntrack_ftp_ok="yes" - local nf_conntrack_netbios_ns_ok="yes" - - linux_chkconfig_present \ - NF_NAT_FTP || nf_nat_ftp_ok="no" - linux_chkconfig_present \ - NF_CONNTRACK_FTP || nf_conntrack_ftp_ok="no" - linux_chkconfig_present \ - NF_CONNTRACK_NETBIOS_NS || nf_conntrack_netbios_ns_ok="no" - - # This is better than an essay for each unset option... - if [[ "${nf_nat_ftp_ok}" == "no" ]] || \ - [[ "${nf_conntrack_ftp_ok}" == "no" ]] || \ - [[ "${nf_conntrack_netbios_ns_ok}" == "no" ]]; then - echo - local mod_msg="Kernel options listed below are not set. They are not" - mod_msg+=" mandatory, but they are often useful." - mod_msg+=" If you don't need some of them, please remove relevant" - mod_msg+=" module name(s) from IPT_MODULES in" - mod_msg+=" '${EROOT}/etc/default/ufw' before (re)starting ufw." - mod_msg+=" Otherwise ufw may fail to start!" - ewarn "${mod_msg}" - if [[ "${nf_nat_ftp_ok}" == "no" ]]; then - ewarn "NF_NAT_FTP: for better support for active mode FTP." - fi - if [[ "${nf_conntrack_ftp_ok}" == "no" ]]; then - ewarn "NF_CONNTRACK_FTP: for better support for active mode FTP." - fi - if [[ "${nf_conntrack_netbios_ns_ok}" == "no" ]]; then - ewarn "NF_CONNTRACK_NETBIOS_NS: for better Samba support." - fi - fi -} - -python_prepare_all() { - # Set as enabled by default. User can enable or disable - # the service by adding or removing it to/from a runlevel. - sed -i 's/^ENABLED=no/ENABLED=yes/' conf/ufw.conf \ - || die "sed failed (ufw.conf)" - - sed -i "s/^IPV6=yes/IPV6=$(usex ipv6)/" conf/ufw.defaults || die - - # If LINGUAS is set install selected translations only. - if [[ -n ${LINGUAS+set} ]]; then - _EMPTY_LOCALE_LIST="yes" - pushd locales/po > /dev/null || die - - local lang - for lang in *.po; do - if ! has "${lang%.po}" ${LINGUAS}; then - rm "${lang}" || die - else - _EMPTY_LOCALE_LIST="no" - fi - done - - popd > /dev/null || die - else - _EMPTY_LOCALE_LIST="no" - fi - - distutils-r1_python_prepare_all -} - -python_install_all() { - newconfd "${FILESDIR}"/ufw.confd ufw - newinitd "${FILESDIR}"/ufw-2.initd ufw - systemd_dounit "${FILESDIR}/ufw.service" - - pushd "${ED}" || die - chmod -R 0644 etc/ufw/*.rules || die - popd || die - - exeinto /usr/share/${PN} - doexe tests/check-requirements - - # users normally would want it - insinto "/usr/share/doc/${PF}/logging/syslog-ng" - doins -r "${FILESDIR}"/syslog-ng/* - - insinto "/usr/share/doc/${PF}/logging/rsyslog" - doins -r "${FILESDIR}"/rsyslog/* - doins doc/rsyslog.example - - if use examples; then - insinto "/usr/share/doc/${PF}/examples" - doins -r examples/* - fi - newbashcomp shell-completion/bash "${PN}" - - [[ $_EMPTY_LOCALE_LIST != "yes" ]] && domo locales/mo/*.mo - - distutils-r1_python_install_all - python_replicate_script "${D}/usr/sbin/ufw" -} - -pkg_postinst() { - local print_check_req_warn - print_check_req_warn=false - - local found=() - local apps=( "net-firewall/arno-iptables-firewall" - "net-firewall/ferm" - "net-firewall/firehol" - "net-firewall/firewalld" - "net-firewall/ipkungfu" ) - - for exe in "${apps[@]}" - do - if has_version "${exe}"; then - found+=( "${exe}" ) - fi - done - - if [[ -n ${found} ]]; then - echo "" - ewarn "WARNING: Detected other firewall applications:" - ewarn "${found[@]}" - ewarn "If enabled, these applications may interfere with ufw!" - fi - - if [[ -z "${REPLACING_VERSIONS}" ]]; then - echo "" - elog "To enable ufw, add it to boot sequence and activate it:" - elog "-- # rc-update add ufw boot" - elog "-- # /etc/init.d/ufw start" - echo - elog "If you want to keep ufw logs in a separate file, take a look at" - elog "/usr/share/doc/${PF}/logging." - print_check_req_warn=true - else - local rv - for rv in ${REPLACING_VERSIONS}; do - local major=${rv%%.*} - local minor=${rv#${major}.} - if [[ "${major}" -eq 0 && "${minor}" -lt 34 ]]; then - print_check_req_warn=true - fi - done - fi - if [[ "${print_check_req_warn}" == "true" ]]; then - echo - elog "/usr/share/ufw/check-requirements script is installed." - elog "It is useful for debugging problems with ufw. However one" - elog "should keep in mind that the script assumes IPv6 is enabled" - elog "on kernel and net-firewall/iptables, and fails when it's not." - fi - echo - ewarn "Note: once enabled, ufw blocks also incoming SSH connections by" - ewarn "default. See README, Remote Management section for more information." -} -- cgit v1.2.3