From patchwork Thu Jul 28 11:21:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Roevens X-Patchwork-Id: 14 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4LtpCc5Fxhz40Wb for ; Thu, 28 Jul 2022 11:22:36 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4LtpCT0xjhz1hG; Thu, 28 Jul 2022 11:22:29 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4LtpCS4lNbz30M7; Thu, 28 Jul 2022 11:22:28 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4LtpCR5S9bz2y3W for ; Thu, 28 Jul 2022 11:22:27 +0000 (UTC) Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4LtpCQ4hbVzy6 for ; Thu, 28 Jul 2022 11:22:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0E13440DBB for ; Thu, 28 Jul 2022 13:22:26 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wABKK-3SnePH for ; Thu, 28 Jul 2022 13:22:24 +0200 (CEST) Received: from chojin.sicho.home (amaterasu.sicho.home [192.168.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (no client certificate requested) (Authenticated sender) by hachiman (MailScanner Milter) with SMTP id 0879E5609E for ; Thu, 28 Jul 2022 13:21:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1659007340; bh=L94aa8ZXPgRcRj1bG4tu7zgcMeE18QDOVc3Z/rGll7g=; h=From:To:Subject:Date; b=HkOcXjltfPB0MH7qhca5Y+CmYEs51xkgpruUIukfDptPEcKadBYxbdLRK13Y14Ss+ K7bAvxEGE6n96Mct/EzN1LGFTBkC8MnYexWFMAyt/kE4rGBJC49Yp77HR1YDoJKDzk BYt9NSwu/TBohbHtWfRTujlMH8sS1mokZLZX1ZkI8J91nVtGQKotFO2nhZz9Je5EGD vXAP1luVTHh/M9+g6NupRfUvtOivwma+9p5wmh73nc148bIJljqBd06wd6RQ+ho5LM B2orbbExQb0IYsVLujCgzL3KehPYpMAqIcWxd9wtGxeTCRlLS0NlcjyUL6CJDoiHJ0 r4y5++ChD5+9Q== From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH v2 00/10] pakfire: remove dup. code + seperate ui/logic Date: Thu, 28 Jul 2022 13:21:26 +0200 Message-Id: <20220728112136.30218-1-robin.roevens@disroot.org> Mime-Version: 1.0 X-sicho-MailScanner-ID: 0879E5609E.A2AA4 X-sicho-MailScanner: Found to be clean X-sicho-MailScanner-From: robin.roevens@disroot.org X-sicho-MailScanner-Watermark: 1659612114.91113@fcrkQ3NDHotNRds1Q3u4Lg ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1659007346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=qAVf/hGEfqp+cHxXrmeR9LNpHs5BPJOszfx+1ief3z0=; b=xIq9PDO6Kurj0N91R7QmeFYU0cjxrJZtzVmIRPhZgloZV+ET1/gmDwXL1/ZQLg+zT/o62I 4wTovIFjk4JT2uJb4cm2n9TM6gokaD+5cqmJOGktKBhnFokTIcXsSI612QR2Z1yvKnurVN 0jt+r+HJhhxORQJ18wTDnr3vOHSgzxuT0fEeBgq02U5emW4VXanU6bhu6m7SoWGGFxU6Zi EU7Y7cmlS3z7lkXG+Ama/H8XTuaKMI1lCW4Oj+F1isICjnxt/6XVO6cRXL16Atn+L5n7Kv hHuQmaHDU6NW/6NO2ygOe2InRQnmLzcO5N/14/y4Zc7oEmVIu9c7Ixu9FwUxMg== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=HkOcXjlt; dmarc=pass (policy=quarantine) header.from=disroot.org; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1659007346; a=rsa-sha256; cv=none; b=UirVhT680/OG8rtloVB+S4H5OT1Pe+XwfkIL1tM7oMFTSw8CDZw+IuqtbG3yXvT77WM/Hs JxIHZaqxNi3deB6Gdh6v1exl/PhPys4wo1AAemlmXuELqc5EpuMkblVbrVRDvc7MnnLiKQ +xZV8MHlOye+WAlTRIw3UzAg6A4GrncEe6HtAPmjYT4YGymIa04VF6uwprWrUQZgUr9PV5 hvS0IZ7vHAEmFkSw6Y/nQJPaD7CGjl1iPj/EVzKbcklunXvTYHH04kuq1b6VBqXtEHBUNw +RrlF97qBYo1x1iNFS1GhLSr8FNK0gsBVH/hs0rOAU6tIj5sjvpKSq5ZisTOrA== X-Rspamd-Queue-Id: 4LtpCQ4hbVzy6 Authentication-Results: mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=HkOcXjlt; dmarc=pass (policy=quarantine) header.from=disroot.org; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-0.80 / 11.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-1.000]; SPF_REPUTATION_HAM(-0.82)[-0.81830489729047]; R_MISSING_CHARSET(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,quarantine]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[disroot.org:s=mail]; R_SPF_ALLOW(-0.20)[+a:c]; MIME_GOOD(-0.10)[text/plain]; BAYES_SPAM(0.04)[53.70%]; MX_GOOD(-0.01)[]; IP_REPUTATION_HAM(-0.01)[asn: 50673(0.00), country: NL(-0.01), ip: 178.21.23.139(0.00)]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[disroot.org:+]; RCVD_COUNT_THREE(0.00)[4]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:50673, ipnet:178.21.23.0/24, country:NL] X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Hi all As promised a revision of this patchset by the end of July. Also fixing bug #12868, both in patch 01 (installed: yes/no output) and patch 06 (don't trow error on valid '--no-color' option). This is quite a large patchset on delicate code which was discussed upon previous submission, but that was almost half a year ago. So I will try to link references to discussions on my previous submission where appropriate to refresh some memories :-). What was changed since last submission; implementing/fixing Michael's remarks/concerns: - Patch 01: Added translations as requested here: https://lists.ipfire.org/pipermail/development/2022-March/012782.html - Patch 02: New patch translating WUI header/footer text - Patch 03: (previously patch 02) was not changed - Patch 04: (previously patch 03) replaced a forgotten fetchfile/move combo by new getmetafile function - Previous patch 04 was removed as the function coreupdate_available turned out no longer used. See: https://lists.ipfire.org/pipermail/development/2022-March/012884.html - Patch 05: Replaced seq shell command by perl seq-method, consistent use of 'Core-Update' as requested here: https://lists.ipfire.org/pipermail/development/2022-March/012787.html - Patch 06: Added exitcode to pakfire list as requested here: https://lists.ipfire.org/pipermail/development/2022-March/012787.html Also exit with error when an unknown parameter is passed to pakfire list Added a small fix (in my opinion): log termination of pakfire inside END block - Patch 07: Removed function coreupdate_available as it was concluded that it was no longer needed (see again: https://lists.ipfire.org/pipermail/development/2022-March/012884.html) Added meaningfull status exit code as remarked here: https://lists.ipfire.org/pipermail/development/2022-March/012788.html Split previous patch 07 pakfire.cgi changes in new patch 08: - Patch 08: New patch, previously part of patch 07 Fixed localization as pointed out here: https://lists.ipfire.org/pipermail/development/2022-March/012788.html - Patch 09: (previously patch 08) Split previous patch 08 into patch 09 adding 'getmetadata' function and 'pakfire info' and patch 10 implementing the new 'getmetadata' in service.cgi. Show clean warning message when no packages are found with requested pakfire list filter - Patch 10: (previously part of patch 08) Removed hardcoded exclusions in services.cgi as pointed out here: https://lists.ipfire.org/pipermail/development/2022-March/012789.html Previous patch 09 was dropped from this patchset as there turned out to be major problems with it and should be rethinked as pointed out here: https://lists.ipfire.org/pipermail/development/2022-March/012856.html I think I have tested this all throughly but as these are quite interusive changes to the pakfire core workings; Please do not trust my testing and test these patches yourselves during review. I would not want to carry the responibilities of breaking pakfire alone :-) Regards Robin