From patchwork Wed Oct 22 02:05:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Haixiao (CN)" X-Patchwork-Id: 72790 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAE12CCD1BB for ; Wed, 22 Oct 2025 02:06:19 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.web11.4553.1761098773212529930 for ; Tue, 21 Oct 2025 19:06:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=YTegzUqr; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=2390f65e28=haixiao.yan.cn@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 59M0viTo2199387 for ; Wed, 22 Oct 2025 02:06:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=PPS06212021; bh=X3DbxlSi82V9KLtwW6Tk zCLGLStJnB/H7hoSPALo8Wc=; b=YTegzUqrWIp6fGGFgnQNeLJsYtBZSEWvAjkp t/p2wxd7jBq94T+LTtyx2PGT8I1uppQMz8wqtVV/NfJmALkRxk28TH3jaaNwTuwm eGpIsRxJwmZ+EeznbwPeK48bhJA0BbGBQnTVq+2n1Xgw3ia9Qveft89zIAGCg9eQ q1BK6GsY4NQAklRzlslgi8s6CaOjKqtFb6jv8iv8c0ustV7DleBV0I1s4inqFTke cWiOzhHbIYv+LWsMXQMa4DQilqz5eNiwwoVSuiIlgWF19QwaFkYZUvjQIbGjeA7L RV0r6wXpqvIqvP+W9fIJi4MqeVm9R3B4xJLY32f5s716HFgJ6Q== Received: from ch1pr05cu001.outbound.protection.outlook.com (mail-northcentralusazon11010043.outbound.protection.outlook.com [52.101.193.43]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 49wrpx9wk9-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 22 Oct 2025 02:06:12 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DrLB/JwB0s//QcsxKjm4PYOn/T3CSIeTj1vim2tkaCvKXEe+XkXOee00rDOp4Y8r4Qg+Kl6BW2hEFpmS9s64gLhPOoVxzuYGdHMBPUCmLJBpo0vCk4AOzRdsCEXqldJBeYp8NTVWhWO01euklDXEwlVbl/jN5VkPywOSnGhdmJ0wK0v+sJPrcNkF1nBzYbvoeCW/bzCqzG7UKudo+glkdV/JkM7nB0+UpeJo0xOtBhj2LQ3wfa/LaAQCHW/W5cYeoTc5wfn5JUd1WwMbr5ffT+58XEAOqIVqnqk6+2IpYCW/JmgEXqyKzl/1LhV6MHQqyqg5PK8QngErbD6Ku3VvZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X3DbxlSi82V9KLtwW6TkzCLGLStJnB/H7hoSPALo8Wc=; b=UVWVdMqF3h7dWbRFsXUICwhhkK9HysIuRmJSSxo8lcoElcQIUwtfeIbzjrFKVgRTsXBjt1YKlqWi7kJi33jQVlTYtxHMmGwHwsVghoQ1U5OlxUdU0XSgfEK1HGbU+kEJz3UJ+/aTUeFhgQboTpbflrPLiG+Zi5KJ5E3Qeo8Wo6L9TXHNFtBCNSNP/3kSKEUCzK6Awtv8CHcX4QB62CA1Nd/+ncRZRVIrPawNLlgZPMa1N8E++bZJGXRNxpFItpWLFhwJgCl6fKFE/zO5s+oal+itvZqE3B6gccWOs8vIQ0TY8goxW5XasZtWFt6k/hTP1aHWiJB/GcRnZRGPHgY08g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from IA1PR11MB8200.namprd11.prod.outlook.com (2603:10b6:208:454::6) by DS7PR11MB5967.namprd11.prod.outlook.com (2603:10b6:8:72::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9253.12; Wed, 22 Oct 2025 02:06:09 +0000 Received: from IA1PR11MB8200.namprd11.prod.outlook.com ([fe80::b6d:5228:91bf:469e]) by IA1PR11MB8200.namprd11.prod.outlook.com ([fe80::b6d:5228:91bf:469e%4]) with mapi id 15.20.9228.016; Wed, 22 Oct 2025 02:06:09 +0000 From: haixiao.yan.cn@windriver.com To: yocto-patches@lists.yoctoproject.org Subject: [meta-security][walnascar][PATCH 1/3] python3-fail2ban: fix ptest failures Date: Wed, 22 Oct 2025 10:05:46 +0800 Message-Id: <20251022020548.3644179-1-haixiao.yan.cn@windriver.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TYCP286CA0135.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b6::19) To IA1PR11MB8200.namprd11.prod.outlook.com (2603:10b6:208:454::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR11MB8200:EE_|DS7PR11MB5967:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e1ceff1-78f3-4eae-8fc1-08de110f9128 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|52116014|366016|13003099007|38350700014; X-Microsoft-Antispam-Message-Info: Dm3R815K7OCk9Tk706kSJ6Ri3eMm5sY1OhSWY3jwFSq79QHvzDGlbDAGW7ETMp1V5wirCpJtTEPckKOtoI+wGyXchrBSuesWSK+WMjJdo89MU3/sYbw62k2/scT1/vXVThLvjd4ts3Z2bI/INwRgZN783UFz+f8IEhv832iDm7w/fjDPjD6mUPTjpi98pnl7iAaY/wbJoNLSb5OzK8oyOZaTNewjD5iHSmkeSkqgXOU0W1+Q0DKG7r++zSyUJKwUrkN9P0KwiTer5R+e0fOQw0kGAcaaYmouj2DZjNkLJub5gen5VqDUZXXYEVxNA8Og6ao/sezNm+buoa3u1wb0LlfmpWs9mxlBrZi9IJ0RIgROOhIvZ8lbAu3rvJVwuHyxTqtNyBDY9evmffJnqzNBTK8HytpYNHXK/BITFm1GLMuTMe3UgzhqJqO/i8xifU8sS1/7Od6qLz2WVtywxj1EeI5GYupbw8LJzCvM2nW67XLp95sbgTlYyZmMrlTXEPuLd58zQ7wbOyTI0ErG9iLJwsUAD/9dKJQ4X7HcO7uu8w6HEpsqHJoePZry+ZI37kcK6B7co03ZrdPwY2Lw/svBtCa4vyprkUckWcp4yZDTRoqRfp4N0t1Gxdz9wDVJMQC8ZKEqd27aM8NJTWbLDr7SinGsYJ6Shj9MbWoqXWQ5yyRimbe2DUHYSKdFnFNlQuiu0suOykTpQfUxC6Qmo002yIA7w6NfrItso38M6zbIXWvsvZFTxtJ+taxzZ7DgeIosKN9BWVnoey2hkH/FLXcs0+v8toMtbrfK7UGI7rmixPGVjcAbRS8+1dhYClKQtjI9IQDppxEr4vlPOjaXNox9+4Rg00nyUyoufGzndgFq1LPdmIPN0c4/wkGY18OfyOcH6ctxby7qQTUzUnBqETc83qnRDZ1pYx4KO74nThtDKYE42b9AWyF5nVHEVB8wMlOD3v1w4mckz6pX8rfEB4hEG9oebTvKNUoJicNB9FR1VyJp711sNM2EiNiHfs2t7H5eN25vC1PRFIxXThzBziQm5NFv3HMX025SVbaC7jgbqmtKyTsNBrMPcCHVFMk0y0eQj5YG7SItpBFam0XknaOzKn/qIBbFMsaXDPLBAoZwyfGEXFbUN6ET8RcLGAiXCiOdku8OxoPHl+H/EVloSWWn5oObcXAPVnDzNEQB/cgEhxy5NSJFxjfogArTBNkBq4jL9VSbxQSNVtZgzbKCvJYPD7ZxTyG0so6In0gxNMFPfMXKhK6wOYFQmGDJaGt0l0kPtrMuSg0hyK+EEITEks+pgth2mLOZkKlG3CJ/hufe2F7ej1tB8qfezxBBbfJ6yKsJruNfXQBcCxNIZXAmBHq9+8G8ZNNWpSDidrcaXyiQuavrCDutPCV0TxOHS1w2jlqkHISuTlE23htaCVg/OFiupBe9RmZVyFQCnoPlkyJN1mTASa3p7g3ek6xuoa4chsexf4HN79SSMfBNc1OMlKlN/A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR11MB8200.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(52116014)(366016)(13003099007)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8HheMMAo3FUklpecG49avDEMpfbs/nKkwvRFmQM9v0SgRMbiXUzyRMWMlAuGsDWgN4hEgRlmqYktHJvngRhPD9Jln53ODvQ+12MUibivxbbpPC+KVFxmDoNDxQTUNh6s25gSvV39F//1+lrXkCB73R3O2m98bUXzbcAIczjOfXaP8MXBnDwGkuRXZHqM5mjcv3yFW3n1MVnCzZ+B3J30rx5ZhbStjtdl+x4bGpAaPCDW1arbOYZakkx24HlrWhlQrlAONAGDwSCLrpZyLVTMP/Kw8zR2uh6WG5YI3yu0PCedHcClrTrR39gqlBlQHnrLtxIrEPVhGwuCoU3cAKax9sEDkf2A6hpS4pRnYcqU5K0ADaz1ff/RLnbyu2ze6r9V+czH8MrX9H9w9lxNHmhYOG+8VnrC+jGmcEfctMjZLJr5eBjkefmLlgU3ZKo1IgVUhRiRkXFHgA/1Pcq8QVi0jZ6XO1x7oY5XuXthr4COPYQ1j8qdRhbG06ySX/tb4mKe7ifAnS8vEYNDDkV+vkzskUQm5TO1pB1Aqd0ZGz2wwDM44IlkusZI1ILARFiZkBztsv/fdZCt7U+AvkOsTAANi4GEleRno68zjY+0xnRdMT2OlvO3+6xvthKaDy6wsHoVOifBZLCHm57I2Axk6uZXehK3LF1iG+gqxeisrQp+GUgsoeUzjXguVb1NmAM9Vgk21E1ydDH4YA+OhzDrsXmDpUZV44fxIwAbrlA+IXvP8g6QGbh0OhcNBIo72zEHMst1bIXgg6VNiZYYHHSlzwU/E+OxoY+azGmBzl2yJwwCBDwGgLGKjr6zBwoSZwlfOUyrg7ohzFh6f42tw2Jyjq+f4cnG/UQukveDW6REDRjLNH4JrlthNAThM3E7r++8nDZyXMQeUshDwzt8utAyFbPT0NW+/7P/Q9kTWcuXVH/WBTJvKDi+3GIM5PQleA8Z3ELpUaXtuWVaVIaFlvHK2RlyPhv7ro4SxO7SBfwAECX4xpi0/JRDtY4crdmbk3yljaszaLqYlcM1SlrvgoPc2Z3+G9bQnrknyqJWVpBwxbokHFH8QiL9qIhemdRB44J6Cbjzf5dm0wVJ6lvUzsAblkdeDxIvXluPH8vL60HyQEGq8zCFsNMCTFDq22/EPqsRA7W7fdZZtf5bx+0mi29Zv2pim3m2+qol/J5KoV+dEm5oiq5lb+ABWtl9ON14EFg5cP3+OlPR+0xYJqziuEWG5vRy3rJzTyK31o5ztJVdfPFqLOYpqL4DaPEr0mo0ohk8vN/1RB21lb9GqEMAd8S39zRaojgZQ1Ts4DOXra3csBqxDm4npcqsXDDo/QmLzc5aEV8n/EJMjIuu6VmUY6amqq7FuaHZJOjGa+Yg51Mr9kwAduH4VgMCgaESsZR3hWAHlInKnHUVMH9ByQbQE1RfmRLWjbC6+vXoc5Vd1xgzq/mAlrczyypMuLfYTNI18zAvUgp6F5KXEiGit/jnb0FLC/u6eODoPX+3m91JiT87Whjqy0uMchA12fk/Fe7RrWA8YomK58e/8iSKQ/dXJGesBCWirxacfWKLVUsUpcDrM0wSJISGLSqNCCgKPS35x90ai1tsDQr/Hau47CKHdlrBcvjXDQ== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e1ceff1-78f3-4eae-8fc1-08de110f9128 X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB8200.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2025 02:06:09.2911 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Esk5IY+vzrxNSoPgGJiZdT4HemNoRQgf5YBPTPag82AzXF4W/A4tEwm5xDeSwQysDJtcJXROPKHoN4NkZYfVQ9VgIQ1mqFN0hAddErnJzy0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB5967 X-Authority-Analysis: v=2.4 cv=b9O/I9Gx c=1 sm=1 tr=0 ts=68f83c14 cx=c_pps a=91GdPAjHHMbPGBWG17ie4w==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=x6icFKpwvdMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=NEAV23lmAAAA:8 a=1XWaLZrsAAAA:8 a=t7CeM3EgAAAA:8 a=A1X0JdhQAAAA:8 a=ktNasmvQAAAA:8 a=xqzR1eaSAAAA:8 a=_XDxjdB5o6fYZ9oTqksA:9 a=2WnUeqSxssMA:10 a=FdTzh2GWekK77mhwV6Dw:22 a=e0GJpZYNDejI1RnTdwpm:22 a=dV6nhpJrT-yxOfsl7Uss:22 X-Proofpoint-GUID: 60cbggWFbnkMlltRksJt4_ehmPVz826U X-Proofpoint-ORIG-GUID: 60cbggWFbnkMlltRksJt4_ehmPVz826U X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDIyMDAxNiBTYWx0ZWRfX39anNrytoQhy W1/dwb/dkxHtoNCYt3j7pULTjttxs2fGakeMQWksjj0wRKy+D7oXdpIRbRGcH+0LuSgMZjLroxO OlNiCHKynP1kf0QuHK/yP3QE/xfobSkomnUxGUY/cwJiiq+2iXmhw3rMDIuoBDcnhsLwJrTYhFW K+WNypQjpyU+GBtN6OzP6k8z4xbfxEpnpw34cxnDLsFDZJMRoYksKQj+rX6rb4o1dSr9pdIEVas Aaq5sk1i7IxQjJSNmmTHniiFcm8KGwGaHKUopg9zpcdmzXN+tfzGvIZSO75wCS8ub68SRWDsCja xiRa/QZCU8k3R4m4dgQSc1VnEwympfFyhODSRXFayCXx8SOJdexGnCvjcsCk6sSECzbnca8srhJ zg9s1TX2CUZUf9l1KHFmLNUJZNAqFA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-22_01,2025-10-13_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 phishscore=0 priorityscore=1501 malwarescore=0 spamscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510020000 definitions=main-2510220016 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Oct 2025 02:06:19 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/2379 From: Yi Zhao Fix ptest failures by backporting patches and updating test case config files. Before the patch: $ ptest-runner python3-fail2ban START: ptest-runner 2025-09-11T15:42 BEGIN: /usr/lib64/python3-fail2ban/ptest Ran 524 tests in 23.023s FAILED (failures=5, errors=7, skipped=3) DURATION: 24 END: /usr/lib64/python3-fail2ban/ptest 2025-09-11T15:42 STOP: ptest-runner TOTAL: 1 FAIL: 1 After the patch: $ ptest-runner python3-fail2ban START: ptest-runner 2025-09-11T15:59 BEGIN: /usr/lib64/python3-fail2ban/ptest Ran 524 tests in 25.982s OK (skipped=3) DURATION: 27 END: /usr/lib64/python3-fail2ban/ptest 2025-09-11T15:59 STOP: ptest-runner TOTAL: 1 FAIL: 0 Signed-off-by: Yi Zhao Signed-off-by: Haixiao Yan --- ...ges-the-IPs-again.-additionally-it-g.patch | 210 ++++++++++++++++++ ...case.py-set-correct-config-dir-for-t.patch | 35 +++ .../fail2ban/python3-fail2ban_git.bb | 12 +- 3 files changed, 256 insertions(+), 1 deletion(-) create mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch create mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch b/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch new file mode 100644 index 000000000000..73014ab96a15 --- /dev/null +++ b/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch @@ -0,0 +1,210 @@ +From 5b6c13f0aae79a23d94570bacd1b5796e57f088d Mon Sep 17 00:00:00 2001 +From: sebres +Date: Thu, 30 Jan 2025 01:05:30 +0100 +Subject: [PATCH] example.com changes the IPs, again... additionally it got + more IPs, which look unstable now (depends on resolver), so replaced with + fail2ban.org, that seems to resolve to single IPv4 and IPv6 (can be adjusted + later for something more persistent) + + +Upstream-Status: Backport +[https://github.com/fail2ban/fail2ban/commit/5b6c13f0aae79a23d94570bacd1b5796e57f088d] + +Signed-off-by: Yi Zhao +--- + .../tests/files/logs/apache-fakegooglebot | 6 +- + fail2ban/tests/files/testcase-usedns.log | 4 +- + fail2ban/tests/filtertestcase.py | 58 +++++++++---------- + fail2ban/tests/utils.py | 4 +- + 4 files changed, 36 insertions(+), 36 deletions(-) + +diff --git a/fail2ban/tests/files/logs/apache-fakegooglebot b/fail2ban/tests/files/logs/apache-fakegooglebot +index b77a1a6b..024842fd 100644 +--- a/fail2ban/tests/files/logs/apache-fakegooglebot ++++ b/fail2ban/tests/files/logs/apache-fakegooglebot +@@ -1,5 +1,5 @@ + # Apache 2.2 + # failJSON: { "time": "2015-01-31T14:29:44", "match": true, "host": "66.249.66.1" } +-66.249.66.1 - - - [31/Jan/2015:14:29:44 ] example.com "GET / HTTP/1.1" 200 814 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" + 293 1149 546 +-# failJSON: { "time": "2015-01-31T14:29:44", "match": false, "host": "93.184.215.14" } +-93.184.215.14 - - - [31/Jan/2015:14:29:44 ] example.com "GET / HTTP/1.1" 200 814 "-" "NOT A __GOOGLE_BOT__" + 293 1149 546 ++66.249.66.1 - - - [31/Jan/2015:14:29:44 ] fail2ban.org "GET / HTTP/1.1" 200 814 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" + 293 1149 546 ++# failJSON: { "time": "2015-01-31T14:29:44", "match": false, "host": "51.159.55.100" } ++51.159.55.100 - - - [31/Jan/2015:14:29:44 ] fail2ban.org "GET / HTTP/1.1" 200 814 "-" "NOT A __GOOGLE_BOT__" + 293 1149 546 +diff --git a/fail2ban/tests/files/testcase-usedns.log b/fail2ban/tests/files/testcase-usedns.log +index eea6eb44..3e7b36bb 100644 +--- a/fail2ban/tests/files/testcase-usedns.log ++++ b/fail2ban/tests/files/testcase-usedns.log +@@ -1,2 +1,2 @@ +-Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2 +-Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.215.14 port 51332 ssh2 ++Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from fail2ban.org port 51332 ssh2 ++Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:51.159.55.100 port 51332 ssh2 +diff --git a/fail2ban/tests/filtertestcase.py b/fail2ban/tests/filtertestcase.py +index 20945b78..26961a1b 100644 +--- a/fail2ban/tests/filtertestcase.py ++++ b/fail2ban/tests/filtertestcase.py +@@ -587,14 +587,14 @@ class IgnoreIP(LogCaptureTestCase): + self.assertNotLogged("returned successfully") + + def testIgnoreCauseOK(self): +- ip = "93.184.215.14" ++ ip = "51.159.55.100" + for ignore_source in ["dns", "ip", "command"]: + self.filter.logIgnoreIp(ip, True, ignore_source=ignore_source) + self.assertLogged("[%s] Ignore %s by %s" % (self.jail.name, ip, ignore_source)) + + def testIgnoreCauseNOK(self): +- self.filter.logIgnoreIp("example.com", False, ignore_source="NOT_LOGGED") +- self.assertNotLogged("[%s] Ignore %s by %s" % (self.jail.name, "example.com", "NOT_LOGGED")) ++ self.filter.logIgnoreIp("fail2ban.org", False, ignore_source="NOT_LOGGED") ++ self.assertNotLogged("[%s] Ignore %s by %s" % (self.jail.name, "fail2ban.org", "NOT_LOGGED")) + + + class IgnoreIPDNS(LogCaptureTestCase): +@@ -607,7 +607,7 @@ class IgnoreIPDNS(LogCaptureTestCase): + self.filter = FileFilter(self.jail) + + def testIgnoreIPDNS(self): +- for dns in ("www.epfl.ch", "example.com"): ++ for dns in ("www.epfl.ch", "fail2ban.org"): + self.filter.addIgnoreIP(dns) + ips = DNSUtils.dnsToIp(dns) + self.assertTrue(len(ips) > 0) +@@ -1892,22 +1892,22 @@ class GetFailures(LogCaptureTestCase): + #unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils. + # We should still catch failures with usedns = no ;-) + output_yes = ( +- ('93.184.215.14', 1, 1124013299.0, +- ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2'] ++ ('51.159.55.100', 1, 1124013299.0, ++ ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from fail2ban.org port 51332 ssh2'] + ), +- ('93.184.215.14', 1, 1124013539.0, +- ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.215.14 port 51332 ssh2'] ++ ('51.159.55.100', 1, 1124013539.0, ++ ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:51.159.55.100 port 51332 ssh2'] + ), +- ('2606:2800:21f:cb07:6820:80da:af6b:8b2c', 1, 1124013299.0, +- ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2'] ++ ('2001:bc8:1200:6:208:a2ff:fe0c:61f8', 1, 1124013299.0, ++ ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from fail2ban.org port 51332 ssh2'] + ), + ) + if not unittest.F2B.no_network and not DNSUtils.IPv6IsAllowed(): + output_yes = output_yes[0:2] + + output_no = ( +- ('93.184.215.14', 1, 1124013539.0, +- ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.215.14 port 51332 ssh2'] ++ ('51.159.55.100', 1, 1124013539.0, ++ ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:51.159.55.100 port 51332 ssh2'] + ) + ) + +@@ -2098,10 +2098,10 @@ class DNSUtilsNetworkTests(unittest.TestCase): + super(DNSUtilsNetworkTests, self).setUp() + #unittest.F2B.SkipIfNoNetwork() + +- ## example.com IPs considering IPv6 support (without network it is simulated via cache in utils). ++ ## fail2ban.org IPs considering IPv6 support (without network it is simulated via cache in utils). + EXAMPLE_ADDRS = ( +- ['93.184.215.14', '2606:2800:21f:cb07:6820:80da:af6b:8b2c'] if unittest.F2B.no_network or DNSUtils.IPv6IsAllowed() else \ +- ['93.184.215.14'] ++ ['51.159.55.100', '2001:bc8:1200:6:208:a2ff:fe0c:61f8'] if unittest.F2B.no_network or DNSUtils.IPv6IsAllowed() else \ ++ ['51.159.55.100'] + ) + + def test_IPAddr(self): +@@ -2163,13 +2163,13 @@ class DNSUtilsNetworkTests(unittest.TestCase): + self.assertTrue(r < ip6) + + def testUseDns(self): +- res = DNSUtils.textToIp('www.example.com', 'no') ++ res = DNSUtils.textToIp('www.fail2ban.org', 'no') + self.assertSortedEqual(res, []) + #unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils. +- res = DNSUtils.textToIp('www.example.com', 'warn') ++ res = DNSUtils.textToIp('www.fail2ban.org', 'warn') + # sort ipaddr, IPv4 is always smaller as IPv6 + self.assertSortedEqual(res, self.EXAMPLE_ADDRS) +- res = DNSUtils.textToIp('www.example.com', 'yes') ++ res = DNSUtils.textToIp('www.fail2ban.org', 'yes') + # sort ipaddr, IPv4 is always smaller as IPv6 + self.assertSortedEqual(res, self.EXAMPLE_ADDRS) + +@@ -2177,13 +2177,13 @@ class DNSUtilsNetworkTests(unittest.TestCase): + #unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils. + # Test hostnames + hostnames = [ +- 'www.example.com', ++ 'www.fail2ban.org', + 'doh1.2.3.4.buga.xxxxx.yyy.invalid', + '1.2.3.4.buga.xxxxx.yyy.invalid', + ] + for s in hostnames: + res = DNSUtils.textToIp(s, 'yes') +- if s == 'www.example.com': ++ if s == 'www.fail2ban.org': + # sort ipaddr, IPv4 is always smaller as IPv6 + self.assertSortedEqual(res, self.EXAMPLE_ADDRS) + else: +@@ -2234,8 +2234,8 @@ class DNSUtilsNetworkTests(unittest.TestCase): + + self.assertEqual(IPAddr('192.0.2.0').getPTR(), '0.2.0.192.in-addr.arpa.') + self.assertEqual(IPAddr('192.0.2.1').getPTR(), '1.2.0.192.in-addr.arpa.') +- self.assertEqual(IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c').getPTR(), +- 'c.2.b.8.b.6.f.a.a.d.0.8.0.2.8.6.7.0.b.c.f.1.2.0.0.0.8.2.6.0.6.2.ip6.arpa.') ++ self.assertEqual(IPAddr('2001:db8::1').getPTR(), ++ '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.') + + def testIPAddr_Equal6(self): + self.assertEqual( +@@ -2365,10 +2365,10 @@ class DNSUtilsNetworkTests(unittest.TestCase): + + def testIPAddr_CompareDNS(self): + #unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils. +- ips = IPAddr('example.com') +- self.assertTrue(IPAddr("93.184.215.14").isInNet(ips)) +- self.assertEqual(IPAddr("2606:2800:21f:cb07:6820:80da:af6b:8b2c").isInNet(ips), +- "2606:2800:21f:cb07:6820:80da:af6b:8b2c" in self.EXAMPLE_ADDRS) ++ ips = IPAddr('fail2ban.org') ++ self.assertTrue(IPAddr("51.159.55.100").isInNet(ips)) ++ self.assertEqual(IPAddr("2001:bc8:1200:6:208:a2ff:fe0c:61f8").isInNet(ips), ++ "2001:bc8:1200:6:208:a2ff:fe0c:61f8" in self.EXAMPLE_ADDRS) + + def testIPAddr_wrongDNS_IP(self): + unittest.F2B.SkipIfNoNetwork() +@@ -2376,11 +2376,11 @@ class DNSUtilsNetworkTests(unittest.TestCase): + DNSUtils.ipToName('*') + + def testIPAddr_Cached(self): +- ips = [DNSUtils.dnsToIp('example.com'), DNSUtils.dnsToIp('example.com')] ++ ips = [DNSUtils.dnsToIp('fail2ban.org'), DNSUtils.dnsToIp('fail2ban.org')] + for ip1, ip2 in zip(ips, ips): + self.assertEqual(id(ip1), id(ip2)) +- ip1 = IPAddr('93.184.215.14'); ip2 = IPAddr('93.184.215.14'); self.assertEqual(id(ip1), id(ip2)) +- ip1 = IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'); ip2 = IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'); self.assertEqual(id(ip1), id(ip2)) ++ ip1 = IPAddr('51.159.55.100'); ip2 = IPAddr('51.159.55.100'); self.assertEqual(id(ip1), id(ip2)) ++ ip1 = IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'); ip2 = IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'); self.assertEqual(id(ip1), id(ip2)) + + def test_NetworkInterfacesAddrs(self): + for withMask in (False, True): +diff --git a/fail2ban/tests/utils.py b/fail2ban/tests/utils.py +index f71ba60a..e6ef54f3 100644 +--- a/fail2ban/tests/utils.py ++++ b/fail2ban/tests/utils.py +@@ -326,8 +326,8 @@ def initTests(opts): + ('failed.dns.ch', set()), + ('doh1.2.3.4.buga.xxxxx.yyy.invalid', set()), + ('1.2.3.4.buga.xxxxx.yyy.invalid', set()), +- ('example.com', set([IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'), IPAddr('93.184.215.14')])), +- ('www.example.com', set([IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'), IPAddr('93.184.215.14')])), ++ ('fail2ban.org', set([IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'), IPAddr('51.159.55.100')])), ++ ('www.fail2ban.org', set([IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'), IPAddr('51.159.55.100')])), + ): + c.set(*i) + # if fast - precache all host names as localhost addresses (speed-up getSelfIPs/ignoreself): +-- +2.34.1 + diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch b/dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch new file mode 100644 index 000000000000..a60b0fda80cb --- /dev/null +++ b/dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch @@ -0,0 +1,35 @@ +From 9f26da3cf854e48b7939c2a9baa0cb3ffbee5994 Mon Sep 17 00:00:00 2001 +From: Yi Zhao +Date: Thu, 11 Sep 2025 22:36:07 +0800 +Subject: [PATCH] clientreadertestcase.py: set correct config dir for + testReadStockJailFilterComplete + +In test case testReadStockJailFilterComplete, set configuration +directory to CONFIG_DIR (/etc/fail2ban/filter.d on the target) instead +of the hardcoded "config" directory. Otherwise, the config files will +not be found during runtime testing. + +Upstream-Status: Backport +[https://github.com/fail2ban/fail2ban/commit/9f26da3cf854e48b7939c2a9baa0cb3ffbee5994] + +Signed-off-by: Yi Zhao +--- + fail2ban/tests/clientreadertestcase.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fail2ban/tests/clientreadertestcase.py b/fail2ban/tests/clientreadertestcase.py +index e6a2806c..b8ebbbc7 100644 +--- a/fail2ban/tests/clientreadertestcase.py ++++ b/fail2ban/tests/clientreadertestcase.py +@@ -878,7 +878,7 @@ class JailsReaderTest(LogCaptureTestCase): + self.assertTrue(jails.getOptions()) # reads fine + # grab all filter names + filters = set(os.path.splitext(os.path.split(a)[1])[0] +- for a in glob.glob(os.path.join('config', 'filter.d', '*.conf')) ++ for a in glob.glob(os.path.join(CONFIG_DIR, 'filter.d', '*.conf')) + if not (a.endswith('common.conf') or a.endswith('-aggressive.conf'))) + # get filters of all jails (filter names without options inside filter[...]) + filters_jail = set( +-- +2.34.1 + diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb b/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb index 52d35f85c955..4d67f85c23f6 100644 --- a/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb +++ b/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb @@ -13,6 +13,8 @@ DEPENDS = "python3-native" SRCREV = "ac62658c10f492911f8a0037a0bcf97c8521cd78" SRC_URI = "git://github.com/fail2ban/fail2ban.git;branch=master;protocol=https \ + file://0001-example.com-changes-the-IPs-again.-additionally-it-g.patch \ + file://0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch \ file://initd \ file://run-ptest \ " @@ -49,8 +51,16 @@ do_install_ptest:append () { sed -i -e 's/##PYTHON##/python3/g' ${D}${PTEST_PATH}/run-ptest install -D ${S}/bin/* ${D}${PTEST_PATH}/bin rm -f ${D}${PTEST_PATH}/bin/fail2ban-python -} + for i in checklogtype.conf zzz-generic-example.conf zzz-sshd-obsolete-multiline.conf; do + sed -i -e 's|^before =.*|before = ${sysconfdir}/fail2ban/filter.d/common.conf|g' \ + ${D}${PYTHON_SITEPACKAGES_DIR}/fail2ban/tests/config/filter.d/${i} + done + + install -m 0644 ${S}/README.md ${D}${PTEST_PATH} + sed -i -e 's|^logpath = README.md|logpath = ${PTEST_PATH}/README.md|g' \ + ${D}${PYTHON_SITEPACKAGES_DIR}/fail2ban/tests/config/jail.conf +} INITSCRIPT_PACKAGES = "${PN}" INITSCRIPT_NAME = "fail2ban-server" From patchwork Wed Oct 22 02:05:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Haixiao (CN)" X-Patchwork-Id: 72791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7E7ECCD1A5 for ; Wed, 22 Oct 2025 02:06:19 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.web11.4554.1761098774047871428 for ; Tue, 21 Oct 2025 19:06:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=cvflZ3zk; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=2390f65e28=haixiao.yan.cn@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 59M0U2q02155246 for ; Wed, 22 Oct 2025 02:06:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=xTESVZGD+o8mgMO5v0FRpzIJZcmXxNcHxRVQMnQ6Hm0=; b=cvflZ3zkymRI ScDrLjQv5Bwf4NvnYlzwzcRcW87ZEbmcaIXTxrKpdEZQJQRYWicn0S88/eOyizk2 76aM4teOq9m2r3XQfoMoE7QC/vIiWKkoA3yDuuEL6bktySQxSeXM9wjYYTLBb47u AZ1JZlhY9sv5A7h+dmEUFSzIDpARP4ljp+X53L3okAknZb8b5FA9VeeYWma+oiCS fpAvIGhcRiKvgeaw1x9j06X6hTecvK4xAlIcx6Clw9jW9eOB1tQfI3iZ2kCoxpUE /ElCcWAQWz69Ulun2whnv0lEV1mU5XAhxgibr/6t0x0s4fzTpt3ieMfthd9tKSeX NXDHySjiyw== Received: from ch1pr05cu001.outbound.protection.outlook.com (mail-northcentralusazon11010031.outbound.protection.outlook.com [52.101.193.31]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 49wrpx9wka-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 22 Oct 2025 02:06:12 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kidZ63vbiriktu2VTbsr0wAAzdwV96e6h8iw2I+hfCoX/329VsYxA/VAxznh1NjGQoml+KdAMKuKSTAlMpfUAT+65rdDVzMZLi2/rpB3fNlGk7ZdN5XybdydgD4gDjZkVptLi9gWmwu9fa26Jl05YMdXxmvpJ/jgSEAJt5qt1ifi0OGixPLtQ5IGZi+SdMBfMiQmLbjuvIeqokB7SwuHm98MNL7wW1SxkffxUtvQlr9dHE6lr1EEtCNRHc8Q8jcK8ed6qnBGoxRGL+oZ/iWV2Ytl8rpQPZIsgqUvAPkoYtx3wpb5g7XIMlFczBZfvynsKclUenywl9IFu5yAhVRXdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xTESVZGD+o8mgMO5v0FRpzIJZcmXxNcHxRVQMnQ6Hm0=; b=vqdpjknxGjITtqnWYLHIja3xLT0THpNQGXta9PLY2NrTy3X58SVb8VnJMV2RzvQnPhdSCwtG2jV/qFcu5FbRD97C57+3tEthDrvaaAVvinj9fBksyaqlzy1zNWdRqbLDB/0CrB2be1l+Zvkf80rwP9Xs/0M3XLPJpImbWX3yljAUuiolF2bzL1olmY9bx3HBTkzV2wh2q+y+JKKGs6zQHxaXdqb9dtZjF7yNWmOG+UJOHqK6nx6IlueYEawET7jWJiP+rLz25g8oUSY2HiqvQvz8XyKkY5hkybtEkqHHOc+hi/wrOQmkqbE0EMroJGuEzVqPqreb1rONusTLleMF5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from IA1PR11MB8200.namprd11.prod.outlook.com (2603:10b6:208:454::6) by DS7PR11MB5967.namprd11.prod.outlook.com (2603:10b6:8:72::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9253.12; Wed, 22 Oct 2025 02:06:11 +0000 Received: from IA1PR11MB8200.namprd11.prod.outlook.com ([fe80::b6d:5228:91bf:469e]) by IA1PR11MB8200.namprd11.prod.outlook.com ([fe80::b6d:5228:91bf:469e%4]) with mapi id 15.20.9228.016; Wed, 22 Oct 2025 02:06:11 +0000 From: haixiao.yan.cn@windriver.com To: yocto-patches@lists.yoctoproject.org Subject: [meta-security][walnascar][PATCH 2/3] python3-fail2ban: update to latest git rev Date: Wed, 22 Oct 2025 10:05:47 +0800 Message-Id: <20251022020548.3644179-2-haixiao.yan.cn@windriver.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251022020548.3644179-1-haixiao.yan.cn@windriver.com> References: <20251022020548.3644179-1-haixiao.yan.cn@windriver.com> X-ClientProxiedBy: TYCP286CA0135.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b6::19) To IA1PR11MB8200.namprd11.prod.outlook.com (2603:10b6:208:454::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR11MB8200:EE_|DS7PR11MB5967:EE_ X-MS-Office365-Filtering-Correlation-Id: 81caec29-257d-4ff9-9626-08de110f925c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|52116014|366016|13003099007|38350700014; X-Microsoft-Antispam-Message-Info: Gk59rtBLrqLsXtF/EWQDN9IsDvRPO3BOo6RMcB3Rin7N2GWcCMpzw3YLYUdTOqEzFt6KTZWX4Lefola06TcyMs0sAd4N9HPCuS3WMnL5V2DyHKWOoG7+b9i1ZyUEjIuDa4356JOIyQShsR/Gaax1DoLMmHLvWArld5CZyD3X/Pe/VpyQCTnzTs604HF0hBge3DjnW7YECyqfqF3ObKcygBIbstldaCQs+/m+gLd0JKyR8DkNrzsiO2OwUukpXtVeGfJWE5AXh0E6903CcSzLyoSSXvCbQ9deK2mbckgn1yQUU2XTXL59Fnq/8BwiKIAN8pz+vMhd9MJ7oebrfCk0a3iHaglcGyamXHjbt8zPWD91GnhCsow24M6nUFkewr3d7p00yuYU2OinL+qzuNmQk2OTbphkw6sMzp+c5/kEAmO8ISzGlMB2Q+sy0vjbLCWVXIUeW1BBEpXGUGw5tUw2rk5N67W0ijxAddwp2Rbw0r0iM8Cx1/7C7842gYCVxC/BtS1q1wCsbQvDqGnga4LuQ38jV1w6zRJgeJq8dt3HwJplgVk3G/NZ+AXRHTCBXOsgKu19NLBvWv+0Q/ia8vTASldF3uqyNSJSHUfo8slTyRZSYj54WfGNoucKAgAeRNyjqs0FMxmIobYxcqjrpsGgPDPN9e+kUIviKPu1qahAMmQfYZddr3QihfBOhlFj3vJps9wCajSTx7lns+mUFOIIvGs9COlhzwDLjbqpRqGG7V0kGeohbsQUDdq/hBBhDA7ZslzaTjnsAhFLdsleJaIwoFqRnQWzUkGUDpnk6lFAqTLPjK/hutj4GFnCF2uaMdaCY7pyehsSKkQmNahLEUZFADaHXJMUJkdrRmETtwvU+1LKXeGYb/rfbvfILZteMW8zEHYVP29fwMp0/yiPZB+ZOkE228zCD0dhPhZCxax4gWW3q/0RoE7KN2ldlla4Sc0qhwDIlOqv5jC8d+k8iC3SCpNjAeKJ5zgnedfUaHGfiPum/nmAqZ8Al08q3LF/5GWQu/zMvE8VDCojVfVFpjofq7YzumD4wizS75K/13WTQ3E8A6lr3ADrlRYNVQ58eqVw+SiteRyb+6aRJ9snlEng0hzyS5PBIxD1n9F02GXscEECVQFdJInTbmFSV9J2GF6nTZ0LdPlOIhshRHKOQMizGV4L+4kliDYc6huWdxLJHvUgsq2rtWTUlWwrX615C9u2IgBo6EFCfNJq6+C59yxnZqRaFYvKwMccg0GGZbVwgvapYmYvFmUUMJLzqaWF+4icPYg+qtJLjtOsm6kDgMjYtNAhGTofsff45VmXuQHqrllOzTlwXSx+UbOeXzaOpaRMXf7kB5TDh3hsyi/wTUFtX2+rq4FWZf/iAJeS0qx7cjEohQN48kex8ntuu5KriDMKg1tfjvZ5RhLTkrJ8COceJKkGrLhaSgtlZnJWTKtDdWgJ2w77spmbz9lMsXO1m79iAvK+n7Su3GoF7FwYw+dqCA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR11MB8200.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(52116014)(366016)(13003099007)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nh0fAEF9pvHrZPg08EAxKpZlHFNr6jC2Ik4EL6FbZy8jbwjbHSd+SLyCrqJgwIQavjHSmALfH23BfCQLucHt2xV8imIKjBXrcN05tlFoibauCHXmhEn0bWB4GF3RwNh0Rzbz2uYM0dv81/aolMpmKSXoBZGlfypNh6qIq/1ryvRgQpc9QCH5nJJkaoaPq7MkOSJjby8MJEDMwp+ScWSA9vVuwMzDF2YMAUrYkMzrMN+zgf3/q2OZsjVcSTI8NAwSN9FVp+TQHwi1Kae+ZyGpGWT7RUJFeE0nKfzTvm2o1BiGy1z/KvP1uGJW+o9GI5/hrxVwQCzOU6mVf8vvS0zgoWS5jJSGqZE/WhL6c+MVuAFrrt4G4mCLwzKb62WO0SCsw4RRhsOFgmfRlLftbk+rBcMk/HtmJJr4LzoLaPj3ERujWjPP5EbURXKAllVcTnNkOvu6obPAHY+P3+jDy7LXQnRh/yoWaso89u3crvDs1mGzvbT12mHiQ2nGELoTIBnEUcBd3toqwurn5A3SDObZb/h2Dq7nIireLVHrYotEjM1//EURA5rKiFSuyiRPSJUyPV7YAE4ezN35E0snzEMJu5mX38J+ln7Pb4Gb1NQxNNmF/+CdMowZ36JJujEicYiEoXh3/kE/qWsieGt5nHMP+DiHj8AhIbyjypqMGt4Ej2Quskoa+p5gJUacdZWjE+SSlP7g+LnJlqnXb2zT5HpmvQlICY7bR7XsNhV3KJX43/HORVKleROCcVR99nOYdCf08DVogdWrN7hYsJeTTayBblFj1YTWcPl7RTbDKMyplxCgT19VmUOsglitRA32peASVVolWGZr//efOQ76ocf5fq3sgDPN/MjiN2nGVd9AB9kZYrVFW3hdhyOsyX67paVsYgq6WHYZzK41ubpbyyEQAMdJIcSe9q+IJMsMuh1uKAni5Y3A44Wmh2eD95MTegK1oV0V7vQkjrmzEdmvsC3eUZunW6tAgXavBkFN5dZnBQ72622dqaYG3jquI8Jc5KG9Mssc5bQRPy9oBqZ1L/aptgWAGQdNFWC21ZVFRzfXVccJOFljfiygwJjZ7VQiBijSc00kBQxIGgeQYxWBNDtB4CXXyhOmyU9uPTsDIrnowdsjylenSJZAFjgGvVjbDyRSix1oUMrhAv7aTwfFbLOQA5pN8FZSx8JXPT1sE5upbaGdKH9qe8shSFyM3GKPF8o4HX4xTa8ExNPee1uT5w8eMH0rrfbxlPG6lfd3Rud7gdi86vVBNfJggBibRLbRqjU5QKDCxSckjQv7EqnU2W24FQW1XK77vhqiRq/V6XKal6oLpDE25Hpjfg6B2xMlNh7gDC7YqySx262aDFilWNQEq2gWsFUVIUj5MR+hyvXDek8eReTE76O2LKZNjT41yAKmiVtYdjr6ZD+CYTSVagG1hnxhb3zU4VVgMQLWLpK8J+0/rCdhgeRaPxBwl1e7Q25OaU7grLk1A65Y/XWKWZAS/6691+O6rvHDsTT6hxz5wUFIVsbbqRx85u1l0KWBnSMqS2dxrNZ5WOnoaTyMJ1S1Acnhei1lWPTWZfrnVRujdlinybwFHiigypWP9UHpvlB29gtchH2v4xdAaLvqiZnrqg== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81caec29-257d-4ff9-9626-08de110f925c X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB8200.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2025 02:06:11.2145 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ktaqLc6q/we96CaLy3H/oU33R94YigHxaiYZ/gAGib3F5fEShWXr4kKNxHfQj192hq556pn43mmOX9J+OrVtDDku6rfo1XusSk25xwIxzo4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB5967 X-Authority-Analysis: v=2.4 cv=b9O/I9Gx c=1 sm=1 tr=0 ts=68f83c15 cx=c_pps a=JYb6bdnaVjS17BdPGRuFtw==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=x6icFKpwvdMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=NEAV23lmAAAA:8 a=1XWaLZrsAAAA:8 a=t7CeM3EgAAAA:8 a=A1X0JdhQAAAA:8 a=ktNasmvQAAAA:8 a=xqzR1eaSAAAA:8 a=DT1NhrL8wyKqG5jDLEEA:9 a=2WnUeqSxssMA:10 a=FdTzh2GWekK77mhwV6Dw:22 a=e0GJpZYNDejI1RnTdwpm:22 a=dV6nhpJrT-yxOfsl7Uss:22 X-Proofpoint-GUID: -ZaSWqH6HTT8xzoAEGFeaUaRvlwZTlgd X-Proofpoint-ORIG-GUID: -ZaSWqH6HTT8xzoAEGFeaUaRvlwZTlgd X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDIyMDAxNiBTYWx0ZWRfXxErLKZLGA5fU 4ZW6hDMNRiTGDF+wgQ8sEshRPhOFfJEoslXibzgzxk0QYFAxP2YD7i2IS7SSH1S5h3y7ZUGaOP8 A5VIr2MCLoH3TWAHJWlpbe1eu3m5OreGqkC1QVwUlaosXMOIALza6eiwMYO8srqBBu/59DtB9rQ GQznGim1tXvu5vpazAcmc/sIBZezw1Jbwx1CJu5FRjgp84bUF9hAqtR+hmYRoP4Lsmd+AqdUula 1Xi2bb1QQPeD+lv7eVASVAbiIQXL2aZ1LraXDPyJLRwQecWJE1b5OKGTRAwmaHhWaUyiiJ/IVJd /CmpPX83n9FWdLbOUKeY89loggEsQ5tw5O7ZYBCEnUl37vyNQefseScxLyiTS6fd7GuRgTJ6IjK RS2iVfS6Au8FJvLov1I5tUewI4P0OQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-22_01,2025-10-13_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 phishscore=0 priorityscore=1501 malwarescore=0 spamscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510020000 definitions=main-2510220016 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Oct 2025 02:06:19 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/2380 From: Yi Zhao Update to latest git rev as the current version doesn't work with OpenSSH 9.8+[1]. Ptest result: $ ptest-runner python3-fail2ban START: ptest-runner 2025-09-21T12:45 BEGIN: /usr/lib64/python3-fail2ban/ptest Ran 538 tests in 13.045s OK (skipped=3) DURATION: 14 END: /usr/lib64/python3-fail2ban/ptest 2025-09-21T12:46 STOP: ptest-runner TOTAL: 1 FAIL: 0 [1] https://github.com/fail2ban/fail2ban/commit/2fed408c05ac5206b490368d94599869bd6a056d Signed-off-by: Yi Zhao Signed-off-by: Haixiao Yan --- ...ges-the-IPs-again.-additionally-it-g.patch | 210 ------------------ ...case.py-set-correct-config-dir-for-t.patch | 35 --- .../fail2ban/python3-fail2ban_git.bb | 4 +- 3 files changed, 1 insertion(+), 248 deletions(-) delete mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch delete mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch b/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch deleted file mode 100644 index 73014ab96a15..000000000000 --- a/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-example.com-changes-the-IPs-again.-additionally-it-g.patch +++ /dev/null @@ -1,210 +0,0 @@ -From 5b6c13f0aae79a23d94570bacd1b5796e57f088d Mon Sep 17 00:00:00 2001 -From: sebres -Date: Thu, 30 Jan 2025 01:05:30 +0100 -Subject: [PATCH] example.com changes the IPs, again... additionally it got - more IPs, which look unstable now (depends on resolver), so replaced with - fail2ban.org, that seems to resolve to single IPv4 and IPv6 (can be adjusted - later for something more persistent) - - -Upstream-Status: Backport -[https://github.com/fail2ban/fail2ban/commit/5b6c13f0aae79a23d94570bacd1b5796e57f088d] - -Signed-off-by: Yi Zhao ---- - .../tests/files/logs/apache-fakegooglebot | 6 +- - fail2ban/tests/files/testcase-usedns.log | 4 +- - fail2ban/tests/filtertestcase.py | 58 +++++++++---------- - fail2ban/tests/utils.py | 4 +- - 4 files changed, 36 insertions(+), 36 deletions(-) - -diff --git a/fail2ban/tests/files/logs/apache-fakegooglebot b/fail2ban/tests/files/logs/apache-fakegooglebot -index b77a1a6b..024842fd 100644 ---- a/fail2ban/tests/files/logs/apache-fakegooglebot -+++ b/fail2ban/tests/files/logs/apache-fakegooglebot -@@ -1,5 +1,5 @@ - # Apache 2.2 - # failJSON: { "time": "2015-01-31T14:29:44", "match": true, "host": "66.249.66.1" } --66.249.66.1 - - - [31/Jan/2015:14:29:44 ] example.com "GET / HTTP/1.1" 200 814 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" + 293 1149 546 --# failJSON: { "time": "2015-01-31T14:29:44", "match": false, "host": "93.184.215.14" } --93.184.215.14 - - - [31/Jan/2015:14:29:44 ] example.com "GET / HTTP/1.1" 200 814 "-" "NOT A __GOOGLE_BOT__" + 293 1149 546 -+66.249.66.1 - - - [31/Jan/2015:14:29:44 ] fail2ban.org "GET / HTTP/1.1" 200 814 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" + 293 1149 546 -+# failJSON: { "time": "2015-01-31T14:29:44", "match": false, "host": "51.159.55.100" } -+51.159.55.100 - - - [31/Jan/2015:14:29:44 ] fail2ban.org "GET / HTTP/1.1" 200 814 "-" "NOT A __GOOGLE_BOT__" + 293 1149 546 -diff --git a/fail2ban/tests/files/testcase-usedns.log b/fail2ban/tests/files/testcase-usedns.log -index eea6eb44..3e7b36bb 100644 ---- a/fail2ban/tests/files/testcase-usedns.log -+++ b/fail2ban/tests/files/testcase-usedns.log -@@ -1,2 +1,2 @@ --Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2 --Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.215.14 port 51332 ssh2 -+Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from fail2ban.org port 51332 ssh2 -+Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:51.159.55.100 port 51332 ssh2 -diff --git a/fail2ban/tests/filtertestcase.py b/fail2ban/tests/filtertestcase.py -index 20945b78..26961a1b 100644 ---- a/fail2ban/tests/filtertestcase.py -+++ b/fail2ban/tests/filtertestcase.py -@@ -587,14 +587,14 @@ class IgnoreIP(LogCaptureTestCase): - self.assertNotLogged("returned successfully") - - def testIgnoreCauseOK(self): -- ip = "93.184.215.14" -+ ip = "51.159.55.100" - for ignore_source in ["dns", "ip", "command"]: - self.filter.logIgnoreIp(ip, True, ignore_source=ignore_source) - self.assertLogged("[%s] Ignore %s by %s" % (self.jail.name, ip, ignore_source)) - - def testIgnoreCauseNOK(self): -- self.filter.logIgnoreIp("example.com", False, ignore_source="NOT_LOGGED") -- self.assertNotLogged("[%s] Ignore %s by %s" % (self.jail.name, "example.com", "NOT_LOGGED")) -+ self.filter.logIgnoreIp("fail2ban.org", False, ignore_source="NOT_LOGGED") -+ self.assertNotLogged("[%s] Ignore %s by %s" % (self.jail.name, "fail2ban.org", "NOT_LOGGED")) - - - class IgnoreIPDNS(LogCaptureTestCase): -@@ -607,7 +607,7 @@ class IgnoreIPDNS(LogCaptureTestCase): - self.filter = FileFilter(self.jail) - - def testIgnoreIPDNS(self): -- for dns in ("www.epfl.ch", "example.com"): -+ for dns in ("www.epfl.ch", "fail2ban.org"): - self.filter.addIgnoreIP(dns) - ips = DNSUtils.dnsToIp(dns) - self.assertTrue(len(ips) > 0) -@@ -1892,22 +1892,22 @@ class GetFailures(LogCaptureTestCase): - #unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils. - # We should still catch failures with usedns = no ;-) - output_yes = ( -- ('93.184.215.14', 1, 1124013299.0, -- ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2'] -+ ('51.159.55.100', 1, 1124013299.0, -+ ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from fail2ban.org port 51332 ssh2'] - ), -- ('93.184.215.14', 1, 1124013539.0, -- ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.215.14 port 51332 ssh2'] -+ ('51.159.55.100', 1, 1124013539.0, -+ ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:51.159.55.100 port 51332 ssh2'] - ), -- ('2606:2800:21f:cb07:6820:80da:af6b:8b2c', 1, 1124013299.0, -- ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from example.com port 51332 ssh2'] -+ ('2001:bc8:1200:6:208:a2ff:fe0c:61f8', 1, 1124013299.0, -+ ['Aug 14 11:54:59 i60p295 sshd[12365]: Failed publickey for roehl from fail2ban.org port 51332 ssh2'] - ), - ) - if not unittest.F2B.no_network and not DNSUtils.IPv6IsAllowed(): - output_yes = output_yes[0:2] - - output_no = ( -- ('93.184.215.14', 1, 1124013539.0, -- ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:93.184.215.14 port 51332 ssh2'] -+ ('51.159.55.100', 1, 1124013539.0, -+ ['Aug 14 11:58:59 i60p295 sshd[12365]: Failed publickey for roehl from ::ffff:51.159.55.100 port 51332 ssh2'] - ) - ) - -@@ -2098,10 +2098,10 @@ class DNSUtilsNetworkTests(unittest.TestCase): - super(DNSUtilsNetworkTests, self).setUp() - #unittest.F2B.SkipIfNoNetwork() - -- ## example.com IPs considering IPv6 support (without network it is simulated via cache in utils). -+ ## fail2ban.org IPs considering IPv6 support (without network it is simulated via cache in utils). - EXAMPLE_ADDRS = ( -- ['93.184.215.14', '2606:2800:21f:cb07:6820:80da:af6b:8b2c'] if unittest.F2B.no_network or DNSUtils.IPv6IsAllowed() else \ -- ['93.184.215.14'] -+ ['51.159.55.100', '2001:bc8:1200:6:208:a2ff:fe0c:61f8'] if unittest.F2B.no_network or DNSUtils.IPv6IsAllowed() else \ -+ ['51.159.55.100'] - ) - - def test_IPAddr(self): -@@ -2163,13 +2163,13 @@ class DNSUtilsNetworkTests(unittest.TestCase): - self.assertTrue(r < ip6) - - def testUseDns(self): -- res = DNSUtils.textToIp('www.example.com', 'no') -+ res = DNSUtils.textToIp('www.fail2ban.org', 'no') - self.assertSortedEqual(res, []) - #unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils. -- res = DNSUtils.textToIp('www.example.com', 'warn') -+ res = DNSUtils.textToIp('www.fail2ban.org', 'warn') - # sort ipaddr, IPv4 is always smaller as IPv6 - self.assertSortedEqual(res, self.EXAMPLE_ADDRS) -- res = DNSUtils.textToIp('www.example.com', 'yes') -+ res = DNSUtils.textToIp('www.fail2ban.org', 'yes') - # sort ipaddr, IPv4 is always smaller as IPv6 - self.assertSortedEqual(res, self.EXAMPLE_ADDRS) - -@@ -2177,13 +2177,13 @@ class DNSUtilsNetworkTests(unittest.TestCase): - #unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils. - # Test hostnames - hostnames = [ -- 'www.example.com', -+ 'www.fail2ban.org', - 'doh1.2.3.4.buga.xxxxx.yyy.invalid', - '1.2.3.4.buga.xxxxx.yyy.invalid', - ] - for s in hostnames: - res = DNSUtils.textToIp(s, 'yes') -- if s == 'www.example.com': -+ if s == 'www.fail2ban.org': - # sort ipaddr, IPv4 is always smaller as IPv6 - self.assertSortedEqual(res, self.EXAMPLE_ADDRS) - else: -@@ -2234,8 +2234,8 @@ class DNSUtilsNetworkTests(unittest.TestCase): - - self.assertEqual(IPAddr('192.0.2.0').getPTR(), '0.2.0.192.in-addr.arpa.') - self.assertEqual(IPAddr('192.0.2.1').getPTR(), '1.2.0.192.in-addr.arpa.') -- self.assertEqual(IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c').getPTR(), -- 'c.2.b.8.b.6.f.a.a.d.0.8.0.2.8.6.7.0.b.c.f.1.2.0.0.0.8.2.6.0.6.2.ip6.arpa.') -+ self.assertEqual(IPAddr('2001:db8::1').getPTR(), -+ '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.') - - def testIPAddr_Equal6(self): - self.assertEqual( -@@ -2365,10 +2365,10 @@ class DNSUtilsNetworkTests(unittest.TestCase): - - def testIPAddr_CompareDNS(self): - #unittest.F2B.SkipIfNoNetwork() ## without network it is simulated via cache in utils. -- ips = IPAddr('example.com') -- self.assertTrue(IPAddr("93.184.215.14").isInNet(ips)) -- self.assertEqual(IPAddr("2606:2800:21f:cb07:6820:80da:af6b:8b2c").isInNet(ips), -- "2606:2800:21f:cb07:6820:80da:af6b:8b2c" in self.EXAMPLE_ADDRS) -+ ips = IPAddr('fail2ban.org') -+ self.assertTrue(IPAddr("51.159.55.100").isInNet(ips)) -+ self.assertEqual(IPAddr("2001:bc8:1200:6:208:a2ff:fe0c:61f8").isInNet(ips), -+ "2001:bc8:1200:6:208:a2ff:fe0c:61f8" in self.EXAMPLE_ADDRS) - - def testIPAddr_wrongDNS_IP(self): - unittest.F2B.SkipIfNoNetwork() -@@ -2376,11 +2376,11 @@ class DNSUtilsNetworkTests(unittest.TestCase): - DNSUtils.ipToName('*') - - def testIPAddr_Cached(self): -- ips = [DNSUtils.dnsToIp('example.com'), DNSUtils.dnsToIp('example.com')] -+ ips = [DNSUtils.dnsToIp('fail2ban.org'), DNSUtils.dnsToIp('fail2ban.org')] - for ip1, ip2 in zip(ips, ips): - self.assertEqual(id(ip1), id(ip2)) -- ip1 = IPAddr('93.184.215.14'); ip2 = IPAddr('93.184.215.14'); self.assertEqual(id(ip1), id(ip2)) -- ip1 = IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'); ip2 = IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'); self.assertEqual(id(ip1), id(ip2)) -+ ip1 = IPAddr('51.159.55.100'); ip2 = IPAddr('51.159.55.100'); self.assertEqual(id(ip1), id(ip2)) -+ ip1 = IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'); ip2 = IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'); self.assertEqual(id(ip1), id(ip2)) - - def test_NetworkInterfacesAddrs(self): - for withMask in (False, True): -diff --git a/fail2ban/tests/utils.py b/fail2ban/tests/utils.py -index f71ba60a..e6ef54f3 100644 ---- a/fail2ban/tests/utils.py -+++ b/fail2ban/tests/utils.py -@@ -326,8 +326,8 @@ def initTests(opts): - ('failed.dns.ch', set()), - ('doh1.2.3.4.buga.xxxxx.yyy.invalid', set()), - ('1.2.3.4.buga.xxxxx.yyy.invalid', set()), -- ('example.com', set([IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'), IPAddr('93.184.215.14')])), -- ('www.example.com', set([IPAddr('2606:2800:21f:cb07:6820:80da:af6b:8b2c'), IPAddr('93.184.215.14')])), -+ ('fail2ban.org', set([IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'), IPAddr('51.159.55.100')])), -+ ('www.fail2ban.org', set([IPAddr('2001:bc8:1200:6:208:a2ff:fe0c:61f8'), IPAddr('51.159.55.100')])), - ): - c.set(*i) - # if fast - precache all host names as localhost addresses (speed-up getSelfIPs/ignoreself): --- -2.34.1 - diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch b/dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch deleted file mode 100644 index a60b0fda80cb..000000000000 --- a/dynamic-layers/meta-python/recipes-security/fail2ban/files/0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9f26da3cf854e48b7939c2a9baa0cb3ffbee5994 Mon Sep 17 00:00:00 2001 -From: Yi Zhao -Date: Thu, 11 Sep 2025 22:36:07 +0800 -Subject: [PATCH] clientreadertestcase.py: set correct config dir for - testReadStockJailFilterComplete - -In test case testReadStockJailFilterComplete, set configuration -directory to CONFIG_DIR (/etc/fail2ban/filter.d on the target) instead -of the hardcoded "config" directory. Otherwise, the config files will -not be found during runtime testing. - -Upstream-Status: Backport -[https://github.com/fail2ban/fail2ban/commit/9f26da3cf854e48b7939c2a9baa0cb3ffbee5994] - -Signed-off-by: Yi Zhao ---- - fail2ban/tests/clientreadertestcase.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/fail2ban/tests/clientreadertestcase.py b/fail2ban/tests/clientreadertestcase.py -index e6a2806c..b8ebbbc7 100644 ---- a/fail2ban/tests/clientreadertestcase.py -+++ b/fail2ban/tests/clientreadertestcase.py -@@ -878,7 +878,7 @@ class JailsReaderTest(LogCaptureTestCase): - self.assertTrue(jails.getOptions()) # reads fine - # grab all filter names - filters = set(os.path.splitext(os.path.split(a)[1])[0] -- for a in glob.glob(os.path.join('config', 'filter.d', '*.conf')) -+ for a in glob.glob(os.path.join(CONFIG_DIR, 'filter.d', '*.conf')) - if not (a.endswith('common.conf') or a.endswith('-aggressive.conf'))) - # get filters of all jails (filter names without options inside filter[...]) - filters_jail = set( --- -2.34.1 - diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb b/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb index 4d67f85c23f6..98f581ba8074 100644 --- a/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb +++ b/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb @@ -11,10 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ecabc31e90311da843753ba772885d9f" DEPENDS = "python3-native" -SRCREV = "ac62658c10f492911f8a0037a0bcf97c8521cd78" +SRCREV = "2856092709470250dc299931bc748f112590059f" SRC_URI = "git://github.com/fail2ban/fail2ban.git;branch=master;protocol=https \ - file://0001-example.com-changes-the-IPs-again.-additionally-it-g.patch \ - file://0002-clientreadertestcase.py-set-correct-config-dir-for-t.patch \ file://initd \ file://run-ptest \ " From patchwork Wed Oct 22 02:05:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Haixiao (CN)" X-Patchwork-Id: 72789 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7485CCD1AB for ; Wed, 22 Oct 2025 02:06:19 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.web11.4555.1761098775834764134 for ; Tue, 21 Oct 2025 19:06:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=grZeqXSL; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=2390f65e28=haixiao.yan.cn@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 59M1x5LS2299378 for ; Wed, 22 Oct 2025 02:06:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=+2wPtUpWvPDxcXpa+MGv0AWuMydXnthiqajJAM8lysU=; b=grZeqXSLB2Pt W+HbU2GF3CFuuNnb0DIE+GaFFU+LNj0RnJvFdzxiurMeQ5rTEjSjRDRrSn09PCCi 4M006Z7uyi6czfDQ8eF9edMt1cFRzvYq/xAsmgV++/ow40rxj69cPjwsepHZlEX7 B8qx4GXDo5g2NKg7xwxch1Sr2UuMObsIRTGWP4bQ5c1muYADUsiodFRvdSiA6GDJ L1wUJ/E90Ytx/8Z6/YrtD1DzhMpovM3z40RTeaWkqW6Iw0bncMFFNpAp7IJDyrH4 ofxLaiYFbDBfbQ2hT6lRyikuBsjHPzBFoZ4YUHHA+9cP1Va19lbdbJ3vJ2+Xhoat xz7Y/AW39A== Received: from co1pr03cu002.outbound.protection.outlook.com (mail-westus2azon11010045.outbound.protection.outlook.com [52.101.46.45]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 49wrpx9wkd-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 22 Oct 2025 02:06:14 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=O623iI3sOT5/AMcqE3cW70AN27/eZbiEHYdGqqbZUTlIjAe5S8d/HCO0MkrAQ5bUQ8Ee975uhhjpS/vmjxkrxS+5HQT6xw1yY3gaSlTCwGORf5C5Td8LjkSSMnP4kKkhEPwr80G87kJ4UnZSeuDyoZDCGPQ6Gzb6gWCfOyWo6qrVMj50FDFNJ6Dmap5EpSNdIbA8KcpsV8PwwLdEh6l0nNXBYh8se5vKLg6oAaLkWgeZhokbmwhjt7iSPD5y/MxbFDiSWFBnqbmOfRYpnMLZclpS4JiYzIe2xZiCNhgWtrIPYnmV/Kkr7ddHBsBLepqFur4v2Rs286dZb9v0H/EYcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+2wPtUpWvPDxcXpa+MGv0AWuMydXnthiqajJAM8lysU=; b=t12C7InhNtjE7/HqYNzIHpCehOtOAaTvAlwHHkXyepC1f+fMgIFV4tiDNfTqL8VUMAFL36IL8BTT4bLhxo0GTD/L17p5bQl6MYPB8Ned/N4RsjVPw5VGyuW/eidqYsljQttlDp3Jb9lxpbnX1tX9kV7d2fIgUJvws7wE+P16WZdsSwJEWhnyPpns/Hs/mOmg6Lpp492f6R/ZIW1ieDhFpfsUOVdYvs+g+8fBsqLVco5EcWIlu33MuCSt2fJqkw6eaw7n88xgqIVTeoqG551DBzQ9eJhu183beZT4sWVrd4TL8i5m0uawO+ssbb3DexRUjU22wRjgrZf8UdOaVx4euA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from IA1PR11MB8200.namprd11.prod.outlook.com (2603:10b6:208:454::6) by DS7PR11MB5967.namprd11.prod.outlook.com (2603:10b6:8:72::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9253.12; Wed, 22 Oct 2025 02:06:12 +0000 Received: from IA1PR11MB8200.namprd11.prod.outlook.com ([fe80::b6d:5228:91bf:469e]) by IA1PR11MB8200.namprd11.prod.outlook.com ([fe80::b6d:5228:91bf:469e%4]) with mapi id 15.20.9228.016; Wed, 22 Oct 2025 02:06:12 +0000 From: haixiao.yan.cn@windriver.com To: yocto-patches@lists.yoctoproject.org Subject: [meta-security][walnascar][PATCH 3/3] fail2ban: Adapt test output to Automake format for ptest compatibility Date: Wed, 22 Oct 2025 10:05:48 +0800 Message-Id: <20251022020548.3644179-3-haixiao.yan.cn@windriver.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251022020548.3644179-1-haixiao.yan.cn@windriver.com> References: <20251022020548.3644179-1-haixiao.yan.cn@windriver.com> X-ClientProxiedBy: TYCP286CA0135.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b6::19) To IA1PR11MB8200.namprd11.prod.outlook.com (2603:10b6:208:454::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR11MB8200:EE_|DS7PR11MB5967:EE_ X-MS-Office365-Filtering-Correlation-Id: b9366bb2-91f5-4632-5a6a-08de110f931e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: vtYXf2WekG4IU3uilIRC+FJJ9f/tQzxRz2HDx7ulYYxwk1x4dE79GXI5er+pfGh1vEUNGdRkd1gt2u5UryKCsbdaw+TZ1FiIhjn9+SqUni+O/DM8fOGKIEnQVyf2JHuh6LxiRPB50bZpbtA13WxtnBipRj+33patbgHwbs36qLiSoYWahT/+qZ5oaacvu81Ce1iNP6Bew3FCTt4skXg/JGWeyUOmfDIbQ3yDIDXiK760MASEuP/TlOVdk/IxN38jKx7+efxkLCq6PfMqyfHYSkAzjssS++QpK09QpZ3QjIHTIJSG82R+31Q/VIvysP4+qvp8Qggn7xLUMQ83xnFVVBSGmeHLEBZy4mPS512n4+pMBtC9j6f0q+RFnla75S3K+wbwXvUchFZ1ITzsivq6iJXryB/3r5a8cP/ilFUatXBodV4nxN84Sm7oT9wvzvX4vjRDhEfIxhxou9aWvHOz9yJs7U7RsU4foW1wxA5AXBle3IKldm8JIk5VGBgx7UzdzbLPFXk8+yvkmerNDqkIdpH2rc6+Xq38EqGK0X83SCREGjydUYfQnog8QLFFBhNuDwmHz0ZOrvOnLvHjUeBmlgMGZR3E8ccj18H/z1UPzfsJGdF574s9R9aEeeuz/2JDi9jdKmKGqYGI1ytHtJfOuFcuu4IQZgCNt9UKOWy57sjDXZ1wxd9BW4Ff+JElxk0sRrpzdJ6ky0h8a7fOb+kEHAXbc6qc62rHGYD1yVGLMr+Wt1Yk4w4YSs8WwmvpPUiiDV3v2xPReHnLT6V9Ti/PFoWGfZUZE3mTI0BHScM6tdTT57XLI3I7gtEOjf1vIG8upNnQFoJcpdG5iRVVv64HDBArT3U/28zQa2q0GEmS4ZehkL8dr9DVhRN6R1E7NK46auK+war2AEFPCtHIpSi4Wagv++UzjltCB9dNrLaBzKguHEdH8wGjUNQ3bnqRlo15Ej8Fh6rf5WgQvhpijRveAktK2uLbztGoeN9rxuJm+iBy+ea6Zv3YAILjH6MwG1b8c+vw8I5+RqtdvZ99UBOZYrpEiXnSLLC9wrhV2HBQT6jNbWf6x+AwQEJnu0AyZ6MYEVEsl61W4XY4UrGU67QqmyC70NmLbDamY2FIZ2j+Bm+8dD3+XxPS+KRcZywmKk2T6BiyrFwNyS+7C7dYw9yPKLJT5Wk1j/DS2pupB+kl29Ks/NjgZWg6UhN0yPDCMzRtUQPXE9nhGNo5Nrv91PanRSbScvTK/TedNGEKjUJG7Ep0MjBYb3i/a7BoxtoEWUGdR1e4NWruNYsAuije2gMcbtM4JTSaQLHt6TmfgtVFqmL/VlOc30Fjh9Rtvz45VmGOCYN7xagxBgBfBvGpAuTEf2n/4QSR1dyR1iro8EEGjy4uQ9wlZodasGCWnW41gAHW1eIs1bd8ncYcK2clS33Hhi12FbOZ2+oWV/uTDo9t5tKHZ3QOfUU5Xc3xKVlHhB0tqXrw4fMgAW/7ij1GeaDym609aXdXuAGcGPRC2pkfq7PrkAA8XRbUQKg50GBvbIbq X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR11MB8200.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vnYLsA1cZTG4Pb0WrtUiduCe7o4AXPUw4clOCTf8G9f8mHMvNnK0htD44FKm4Tp4tXHYTrbugzJi5h/ki50tJmCnoYK9NnIRs6LfPlkGRkeSDNXKpq0bENBMpY7+3EmfV9TJHlP3PEPQFndyDMZp2HnTdDqMB5rq/ZEVIzKIlCz4+p+MPGBN0liOaa4GbBQAkF3xBLG7I1Sqbw0bJ6n+iTgNsTMZoS7uG17kfw/7NV+hiZyRF27jiaDTBow5SXM82ldC3RkLBUgst4BeAgeBBtwvDIlDGJ9XMUpR2ewVqxpb5boTFPV0kXDbx+/T1MtpnLD7ieAT42cEDG1Y5J+cQTWlyFcjpZuNpIBZWzjVMkx1G4LCygykNJdlRVV0kZIq9yud6hNIZl9kL3akcQPoT2AVXiBPWzKPDRGXi2HXgMWYCZkjNP0U/39wS0w7SVbAY9fo9iB6FZ016gbyRbaU66AMIO1rsAlKRga0CBJnmnDReDmktTvUxndOqZ+J+fqtqQMFdQNgPWMHbJ4CBL9Z1NIbt1kQbTxXzAkSlQw0y7KH0VVx+ITqgN7rarx9R3AGXYV+shPhTDn1/1B9jb2w5qIYBblaB/kPD5G2FWB1juUvZSB4vplSLCY8mTUYklbxIX9Diq82mwX1r8TOxU97ahRHR+ZzmQepDP0zraIWvdNivrD/0OHzjHIL/rvnzRkCthsfONRzBdeqwnN1fqBA6sQLyrShiVWN1Myyt9SZO+e7TZCljQwfRoICcqsrGsqg4Rs2VnKyNOhg/UHrMYwV5KRXmLD01XvHH3DHes55JmjxynRvlsziBNUuzyU2OFlRIB6zdZiTBXjlcBu/aQ06QpOHoRTNi4TTPeSUlBvDG3UXa1AAAgt7N5IX9/VQlyIqS25OxHCnA89oSPbS0kN9i/veDCXrZ7Llz6MNCbx12anHrGfXUckz0duRVVeP2P1rlLpprLSbcCvqnAy1khQQg4BVh5rL1kA6SfAFwZ09hKmGNqhpbfTQv3qUpGA2qbiKHiRMlJj8bW+ECYcBogFv+rgdp/eXbk0LsyY5FuUpOR4VAjg8jcLeT0S0rp8gLedISl8qySRW30xKwPcbB7lT9YAJhWylCOWaRYzxQQ7InulC7lb0a+K88TYChAX9pisvJRTKcEYfW+hJ4RiEkOx0QE0Slbr45moSuB1tbwyA3ADq2F8XmKhoUWfMS4qv7O7AUVRPBFSkPYTscarLfsWi8DZo4YbSq+93BvZ23KQwDG4c+kWkavISv1lHwkKjqijI9z1BpNMHX1yOUxwQgeEbs/py1hiK4MGgzbvUqOecSjCModhdeClYP4qIuRkV+h5wTftsykn2yKJmDXb2kIHpNxtxvLmlZa0tAHiK3QJYVuo80sZLSvzAtGLCtzZTitvW0leGfGT9glGMzvFjZn4j0z4Qg6YFw9K0OWn2sGDNdQVCln7cyz5K+MJzso+eyGBs8QbeR6xl1xWzMnlIeu3qT7bco4N705EBAEKdDS+zk+tH9GIdXapKUgOVm98a44yeVuc6/6ni9DBfsebMDFrXGTavC9qhjUptPoQ+7KfU5a5g36KWVgN/c+5aBglAOLu0ECtxxVBe/EaPxlZkW1QoYQ== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9366bb2-91f5-4632-5a6a-08de110f931e X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB8200.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2025 02:06:12.5599 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8ctVn9uYpU/PvwvSa0oMlwmBWDXz4+J8OM2WMHQKVBsOFSDVvRTRBzMlZ1d2iOXf/qhP8zDDTFjkmJp00i4JWmCl/AKsBVWgXhNCBQ1O0+c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB5967 X-Authority-Analysis: v=2.4 cv=b9O/I9Gx c=1 sm=1 tr=0 ts=68f83c16 cx=c_pps a=lEAAG6kgDLZw1ps4cEx4qA==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=x6icFKpwvdMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t7CeM3EgAAAA:8 a=NEAV23lmAAAA:8 a=3d01TAmHAuPuTfK4mfwA:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: aQ6Fy4U-NTb-yyivYM4ybvDH94zYWTAq X-Proofpoint-ORIG-GUID: aQ6Fy4U-NTb-yyivYM4ybvDH94zYWTAq X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDIyMDAxNiBTYWx0ZWRfX4dOhTlE2pYpX xx1U2t/12x8s6Vns7DhTayqEgxLS/vwJa8i6a06hzTCturw/8Kl56YXZVkvQgoLHsNFA98VnTms UUxJ/l5Q1mbVF8m/V3DnCnqdAEnBt7AhzTkBGEoPBFhiFLVs/mhOOO71bE7KKdZ0G9rxFNcekjx OYC7tzWa+p/2uK82EC4Suzr48sj15q73/xomcErBnvwGRjlSeNyXBxW4BdvEkJEjDGNTJLOIUlq UrDZDVA1TVeRMjflWpPPzcCIWA4DWG0XUwNgHcjy72Pjg0BjGKxxM0bd6ybLjQO8AEQ88MqUyi4 Sc3GUTX01zvIGmnf5bonnSTkAxOBzlVoutfgnli8trouca535dLOiHf21fLHXYeW4FEZlKjdUD1 eKso1qavjmON4mHhqp0VQviDMG6fiA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-22_01,2025-10-13_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 phishscore=0 priorityscore=1501 malwarescore=0 spamscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510020000 definitions=main-2510220016 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Oct 2025 02:06:19 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/2381 From: Haixiao Yan Convert fail2ban-testcases output to follow Automake-compatible format (PASS:/FAIL:) so that ptest-runner can correctly parse and report test results. root@intel-x86-64:~# ptest-runner python3-fail2ban -t 300 START: ptest-runner 2025-09-22T07:57 BEGIN: /usr/lib64/python3-fail2ban/ptest Fail2ban 1.1.1.dev1 test suite. Python 3.12.11 (main, Jun 3 2025, 15:41:47) [GCC 13.4.0]. Please wait... I: Skipping smtp tests: No module named 'smtpd' I: Skipping SSL smtp tests: No module named 'aiosmtpd' PASS: fail2ban.tests.servertestcase.Transmitter.testAction PASS: fail2ban.tests.servertestcase.Transmitter.testAddJail PASS: fail2ban.tests.servertestcase.Transmitter.testDatabase PASS: fail2ban.tests.servertestcase.Transmitter.testDatePattern PASS: fail2ban.tests.servertestcase.Transmitter.testGetNOK PASS: fail2ban.tests.servertestcase.Transmitter.testJailAttemptIP PASS: fail2ban.tests.servertestcase.Transmitter.testJailBanIP ... PASS: fail2ban.tests.servertestcase.TransmitterLogging.testBanTimeIncr PASS: fail2ban.tests.servertestcase.TransmitterLogging.testFlushLogs PASS: fail2ban.tests.servertestcase.TransmitterLogging.testLogLevel PASS: fail2ban.tests.servertestcase.TransmitterLogging.testLogTarget PASS: fail2ban.tests.servertestcase.TransmitterLogging.testLogTargetSYSLOG PASS: fail2ban.tests.servertestcase.TransmitterLogging.testSyslogSocket PASS: fail2ban.tests.servertestcase.TransmitterLogging.testSyslogSocketNOK ============================================================================ Testsuite summary DURATION: 48 END: /usr/lib64/python3-fail2ban/ptest 2025-09-22T07:58 STOP: ptest-runner TOTAL: 1 FAIL: 0 Signed-off-by: Haixiao Yan --- ...ao.unittest.TestRunner-for-ptest-out.patch | 43 +++++++++++++++++++ .../fail2ban/python3-fail2ban_git.bb | 9 +++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-fail2ban-use-putao.unittest.TestRunner-for-ptest-out.patch diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-fail2ban-use-putao.unittest.TestRunner-for-ptest-out.patch b/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-fail2ban-use-putao.unittest.TestRunner-for-ptest-out.patch new file mode 100644 index 000000000000..c6729cc1818e --- /dev/null +++ b/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-fail2ban-use-putao.unittest.TestRunner-for-ptest-out.patch @@ -0,0 +1,43 @@ +From 7b42974b5bf20d9db8e788e9d6817004556d660d Mon Sep 17 00:00:00 2001 +From: Haixiao Yan +Date: Fri, 19 Sep 2025 15:03:56 +0800 +Subject: [PATCH] fail2ban: use putao.unittest.TestRunner for ptest output + +Switch the test runner from unittest's default TextTestRunner to +putao.unittest.TestRunner (provided by unittest-automake-output) so +that results are reported in Automake-compatible PASS/FAIL format. +This enables ptest-runner to correctly parse and summarize individual +test results. + +Upstream-Status: Pending + +Signed-off-by: Haixiao Yan +--- + bin/fail2ban-testcases | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/bin/fail2ban-testcases b/bin/fail2ban-testcases +index 48aae4b5ffdc..20db4a01a3d6 100755 +--- a/bin/fail2ban-testcases ++++ b/bin/fail2ban-testcases +@@ -28,7 +28,7 @@ import logging + import os + import sys + import time +-import unittest ++import putao.unittest + + # Check if local fail2ban module exists, and use if it exists by + # modifying the path. This is done so that tests can be used in dev +@@ -63,7 +63,7 @@ tests = gatherTests(regexps, opts) + # + # Run the tests + # +-testRunner = unittest.TextTestRunner(verbosity=verbosity) ++testRunner = putao.unittest.TestRunner() + + tests_results = testRunner.run(tests) + +-- +2.34.1 + diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb b/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb index 98f581ba8074..0cac7abcb73d 100644 --- a/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb +++ b/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_git.bb @@ -13,6 +13,7 @@ DEPENDS = "python3-native" SRCREV = "2856092709470250dc299931bc748f112590059f" SRC_URI = "git://github.com/fail2ban/fail2ban.git;branch=master;protocol=https \ + file://0001-fail2ban-use-putao.unittest.TestRunner-for-ptest-out.patch \ file://initd \ file://run-ptest \ " @@ -69,6 +70,12 @@ INSANE_SKIP:${PN}:append = "already-stripped" RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog} nftables python3-core python3-pyinotify" RDEPENDS:${PN} += "python3-sqlite3" RDEPENDS:${PN} += " python3-logging python3-fcntl python3-json" -RDEPENDS:${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban" +RDEPENDS:${PN}-ptest = " \ + python3-core \ + python3-io \ + python3-modules \ + python3-fail2ban \ + python3-unittest-automake-output \ + " RRECOMMENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'python3-systemd', '', d)}"