Message ID | 20221011220157.17385-1-robin.roevens@disroot.org |
---|---|
Headers |
Return-Path: <development-bounces@lists.ipfire.org> 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 4Mn8tV0kysz3whg for <patchwork@web04.haj.ipfire.org>; Tue, 11 Oct 2022 22:03:30 +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 4Mn8tP4CFQz2Z8; Tue, 11 Oct 2022 22:03:25 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Mn8tN6WhVz2yw5; Tue, 11 Oct 2022 22:03:24 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Mn8tL65Jrz2xy3 for <development@lists.ipfire.org>; Tue, 11 Oct 2022 22:03:22 +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 4Mn8tK5253z1gg for <development@lists.ipfire.org>; Tue, 11 Oct 2022 22:03:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id C93DB4DB07 for <development@lists.ipfire.org>; Wed, 12 Oct 2022 00:03:20 +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 UTF8SMTP id eNhUGSavEKot for <development@lists.ipfire.org>; Wed, 12 Oct 2022 00:03:19 +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 DBC04751EE for <development@lists.ipfire.org>; Wed, 12 Oct 2022 00:02:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1665525746; bh=XsC06qJsOlySW/dEq39NFmDUqr2U7/u9uHHwFa9SFkw=; h=From:To:Subject:Date; b=PNXDO6rSfnhcA0IJQz+Wpjjo7UrmqZ1OaMjti6uwBMrXMzDfLAI2N63/CNmNyWLXq rODSY43oMuyAfxZ7eaKzWx+KalLR7EiBlBwqN+6Ny2ykmHykF2KqPghRHGQL9B/1Vy wkLUCVkAP2WERBvSKBTQFL6vTkrn6tS0tvfTKWILwcAhtgcQ0ywB5egGpGDGVZ0FYW i2LvtidDl5Omfuvt4MgfeFas7iBYNby3TEZfW2Sjhy6ge4DH+a8yiuJgWfBqgFOXT6 8EYES2gxCfvDLzro9ajLpZEahOpio5R3PGptMgL88NGco1HhCL8YqOFcK0zYNJFDlA dRv4MVUhASzeg== From: Robin Roevens <robin.roevens@disroot.org> To: development@lists.ipfire.org Subject: [PATCH v3 0/5] Fix Bug#12935 + cosmetic changes/enhancements Date: Wed, 12 Oct 2022 00:01:52 +0200 Message-Id: <20221011220157.17385-1-robin.roevens@disroot.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-sicho-MailScanner-ID: DBC04751EE.A2AA4 X-sicho-MailScanner: Found to be clean X-sicho-MailScanner-From: robin.roevens@disroot.org X-sicho-MailScanner-Watermark: 1666130530.83221@NDU/RF5p9crJ3SYVHlWa6Q ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1665525801; a=rsa-sha256; cv=none; b=FsJl0CBN/iFdSMl7sFykpirIQBFMgqyXcHSe+QeYHMUY2rd/FkRLQBEdcOnbgodEZTZL2f 9Vp6GQFjudG3KdkiBsD6PPEohCjayCWRvjnvLEAHPSJMvRmfuJX8inc9FIrZHXudMG+boH CYhXCF10vUsh44kYbN+xCqINEdqa6JfjCoD/0kuXNOlMhQzEFP7U9SZgNg4AWcwcy4wVt7 CKpcQyfnSFIzOx9NApm80m3cfq8smek3yWyxyMdAEn0Y0GQUfBX1f7HpCkwLW46LHyd97K R3q++fhTv4TvG/CsU8nj+e3kh1egvGeodGZ2k1a4XonBqd6dFY33Z2RyuSNJfw== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=PNXDO6rS; 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; dmarc=pass (policy=quarantine) header.from=disroot.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1665525801; 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=5SGAn+8pviKtO0HN7a0BORSj9mr55Sx3JaA9kc3N68s=; b=AHf87gWbNPDuOVGmmabFfFokbPgQwicSLGRhjyhwuNpXzuhcvEs3DRdzTQwhNaQv6kRQL2 glQtRBESvp6pk9EfWMFzWi304W0onF6ChkyoRfsN7yWUsCEHETqJgEYqWsDFbW56W9OZxJ Bsx11NsBFNBqBwzJh3RoVkM0a5D9tRtJjYtwDB7+Ict1Ur0IVJmMYxP3bYTMUm71aBPARG g8Srjm2WL9yOcfwUZgpyQ40erjEuRCpXCNIg8m7JwTxtzE8wPJytTMxPZM9rIrqpknySb1 9Z4qETmjjtYCEpLonP0qAkHcNjPdBg09JdJ3OHVCrXpmveOLk64oBzZqBn+ETw== Authentication-Results: mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=PNXDO6rS; 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; dmarc=pass (policy=quarantine) header.from=disroot.org X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-2.23 / 11.00]; IP_REPUTATION_HAM(-1.14)[asn: 50673(-0.32), country: NL(-0.01), ip: 178.21.23.139(-0.81)]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-1.000]; DKIM_REPUTATION(-0.82)[-0.82134715129011]; SPF_REPUTATION_HAM(-0.61)[-0.61440594065069]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,quarantine]; MV_CASE(0.50)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(0.27)[disroot.org:s=mail]; R_SPF_ALLOW(-0.20)[+a]; BAYES_HAM(-0.11)[66.32%]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[disroot.org:+]; RCVD_COUNT_THREE(0.00)[4]; ASN(0.00)[asn:50673, ipnet:178.21.23.0/24, country:NL]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+] X-Rspamd-Queue-Id: 4Mn8tK5253z1gg X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
Fix Bug#12935 + cosmetic changes/enhancements
|
|
Message
Robin Roevens
Oct. 11, 2022, 10:01 p.m. UTC
Hi all After carefully reviewing and adopting all comments Michael had about the code in previous patchset, here is again a new version of it. Only PATCH 1 was changed since v2: - propper initialization of variables where required preventing possible undefined behaviour - more reliable error checking: all functions now return a meaningfull integer one way or another to indicate if and what kind of error happend. No need anymore to set errno to 0 manually as it no longer depended on. - No more checking against NULL making many comparisions easier for the eye - fix some possible memory leaks - fix a possible unallocation of not yet allocated memory - in case of a system error, a descriptive error is shown instead of the number, using the %m directive. Hoping to pass the required strict evaluation this time :-). For reference, the content of the summary mail that was sent with v1 of the patch: --- This patchset fixes Bug#12935 (https://bugzilla.ipfire.org/show_bug.cgi?id=12935) Summary: Addons where the initscript does not match the addon-name and addons with multiple initscripts are now listed on services.cgi since CU170. But addonctrl still expected addon name to be equal to initscript name; Hence starting/stopping/enabling/disabling of such addons was not possible. This has always been like that, but that problem was hidden as services.cgi also did not display those addon services. After discussing this with Adolf on the Bug report, we concluded that we should adapt addonctrl to work with the new addon metadata Services-field instead. I basically rewrote addonctrl to not only use the new services metadata but also to have better errorchecking and added the posibility to check if a service is currently enabled or disabled. As a result services.cgi no longer has to go checking the precense of runlevel initscripts, but can just ask addonctrl. I also added a warning to services.cgi if a runlevel initscript does not exists, to prevent the user from wondering why he can't enable a specific service. (Adolf pointed out some services don't install runlevel initscripts by default) More details in the bugreport and in the commit-messages of the patches. Regards Robin
Comments
Bump...nudge nudge . Robin Roevens <robin.roevens@disroot.org> schreef op 12 oktober 2022 00:01:52 CEST: >Hi all > >After carefully reviewing and adopting all comments Michael had about >the code in previous patchset, here is again a new version of it. > >Only PATCH 1 was changed since v2: >- propper initialization of variables where required preventing possible > undefined behaviour >- more reliable error checking: all functions now return a meaningfull > integer one way or another to indicate if and what kind of error > happend. No need anymore to set errno to 0 manually as it no longer > depended on. >- No more checking against NULL making many comparisions easier for the > eye >- fix some possible memory leaks >- fix a possible unallocation of not yet allocated memory >- in case of a system error, a descriptive error is shown instead of > the number, using the %m directive. > >Hoping to pass the required strict evaluation this time :-). > >For reference, the content of the summary mail that was sent with v1 of >the patch: >--- >This patchset fixes Bug#12935 >(https://bugzilla.ipfire.org/show_bug.cgi?id=12935) > >Summary: >Addons where the initscript does not match the addon-name and addons with >multiple initscripts are now listed on services.cgi since CU170. >But addonctrl still expected addon name to be equal to >initscript name; Hence starting/stopping/enabling/disabling of such >addons was not possible. >This has always been like that, but that problem was hidden as >services.cgi also did not display those addon services. > >After discussing this with Adolf on the Bug report, we concluded that we >should adapt addonctrl to work with the new addon metadata >Services-field instead. > >I basically rewrote addonctrl to not only use the new services metadata >but also to have better errorchecking and added the posibility to check >if a service is currently enabled or disabled. >As a result services.cgi no longer has to go checking the precense of >runlevel initscripts, but can just ask addonctrl. >I also added a warning to services.cgi if a runlevel initscript does not >exists, to prevent the user from wondering why he can't enable a >specific service. (Adolf pointed out some services don't install >runlevel initscripts by default) > >More details in the bugreport and in the commit-messages of the patches. > >Regards >Robin > > > >-- >Dit bericht is gescanned op virussen en andere gevaarlijke >inhoud door MailScanner en lijkt schoon te zijn. >
Hello Robin, > On 11 Oct 2022, at 23:01, Robin Roevens <robin.roevens@disroot.org> wrote: > > Hi all > > After carefully reviewing and adopting all comments Michael had about > the code in previous patchset, here is again a new version of it. > > Only PATCH 1 was changed since v2: > - propper initialization of variables where required preventing possible > undefined behaviour > - more reliable error checking: all functions now return a meaningfull > integer one way or another to indicate if and what kind of error > happend. No need anymore to set errno to 0 manually as it no longer > depended on. > - No more checking against NULL making many comparisions easier for the > eye > - fix some possible memory leaks > - fix a possible unallocation of not yet allocated memory > - in case of a system error, a descriptive error is shown instead of > the number, using the %m directive. > > Hoping to pass the required strict evaluation this time :-). Yes, I think so. It is a huge patchset, so hard to review, but I am happy with it and happy to put my stamp on it :) Thank you very much for your very hard work on this and all those hours that you put in. What is coming next? :) -Michael > For reference, the content of the summary mail that was sent with v1 of > the patch: > --- > This patchset fixes Bug#12935 > (https://bugzilla.ipfire.org/show_bug.cgi?id=12935) > > Summary: > Addons where the initscript does not match the addon-name and addons with > multiple initscripts are now listed on services.cgi since CU170. > But addonctrl still expected addon name to be equal to > initscript name; Hence starting/stopping/enabling/disabling of such > addons was not possible. > This has always been like that, but that problem was hidden as > services.cgi also did not display those addon services. > > After discussing this with Adolf on the Bug report, we concluded that we > should adapt addonctrl to work with the new addon metadata > Services-field instead. > > I basically rewrote addonctrl to not only use the new services metadata > but also to have better errorchecking and added the posibility to check > if a service is currently enabled or disabled. > As a result services.cgi no longer has to go checking the precense of > runlevel initscripts, but can just ask addonctrl. > I also added a warning to services.cgi if a runlevel initscript does not > exists, to prevent the user from wondering why he can't enable a > specific service. (Adolf pointed out some services don't install > runlevel initscripts by default) > > More details in the bugreport and in the commit-messages of the patches. > > Regards > Robin > > > > -- > Dit bericht is gescanned op virussen en andere gevaarlijke > inhoud door MailScanner en lijkt schoon te zijn. >
Hi Michael Michael Tremer schreef op wo 26-10-2022 om 15:36 [+0100]: > Hello Robin, > > > On 11 Oct 2022, at 23:01, Robin Roevens <robin.roevens@disroot.org> > > wrote: > > > > Hi all > > > > After carefully reviewing and adopting all comments Michael had > > about > > the code in previous patchset, here is again a new version of it. > > > > Only PATCH 1 was changed since v2: > > - propper initialization of variables where required preventing > > possible > > undefined behaviour > > - more reliable error checking: all functions now return a > > meaningfull > > integer one way or another to indicate if and what kind of error > > happend. No need anymore to set errno to 0 manually as it no > > longer > > depended on. > > - No more checking against NULL making many comparisions easier for > > the > > eye > > - fix some possible memory leaks > > - fix a possible unallocation of not yet allocated memory > > - in case of a system error, a descriptive error is shown instead > > of > > the number, using the %m directive. > > > > Hoping to pass the required strict evaluation this time :-). > > Yes, I think so. > > It is a huge patchset, so hard to review, but I am happy with it and > happy to put my stamp on it :) > > Thank you very much for your very hard work on this and all those > hours that you put in. Done with pleasure. Happy to be able to dust off my programming skills :-) And happy that my work is appreciated. > > What is coming next? :) I was thinking maybe integrating AI enhanced bitcoin trading into pakfire ? :-p Joking aside, things on my wishlist for now are - better integration of the zabbix addon by adding UI zabbix-agent log viewing and a UI configuration page for it. - revisit a few pakfire enhancements which got rejected due to limitations I didn't count on back then. (like presenting an upgrade overview before actually installing the upgrade and required space calculation).. - a redesign of the pakfire UI page integrating the summary meta-data So you'll probably hear me again soon with some difficult to review things and/or discussions with decisions to make :-) Robin > > -Michael > > > For reference, the content of the summary mail that was sent with > > v1 of > > the patch: > > --- > > This patchset fixes Bug#12935 > > (https://bugzilla.ipfire.org/show_bug.cgi?id=12935) > > > > Summary: > > Addons where the initscript does not match the addon-name and > > addons with > > multiple initscripts are now listed on services.cgi since CU170. > > But addonctrl still expected addon name to be equal to > > initscript name; Hence starting/stopping/enabling/disabling of such > > addons was not possible. > > This has always been like that, but that problem was hidden as > > services.cgi also did not display those addon services. > > > > After discussing this with Adolf on the Bug report, we concluded > > that we > > should adapt addonctrl to work with the new addon metadata > > Services-field instead. > > > > I basically rewrote addonctrl to not only use the new services > > metadata > > but also to have better errorchecking and added the posibility to > > check > > if a service is currently enabled or disabled. > > As a result services.cgi no longer has to go checking the precense > > of > > runlevel initscripts, but can just ask addonctrl. > > I also added a warning to services.cgi if a runlevel initscript > > does not > > exists, to prevent the user from wondering why he can't enable a > > specific service. (Adolf pointed out some services don't install > > runlevel initscripts by default) > > > > More details in the bugreport and in the commit-messages of the > > patches. > > > > Regards > > Robin > > > > > > > > -- > > Dit bericht is gescanned op virussen en andere gevaarlijke > > inhoud door MailScanner en lijkt schoon te zijn. > > > >