From nobody Fri Feb 21 15:50:03 2025 X-Original-To: apache@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yzvhr06kMz5nplp for ; Fri, 21 Feb 2025 15:50:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yzvhq6bgZz3jF7 for ; Fri, 21 Feb 2025 15:50:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740153003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QvQk88jdLtQvC0DdrOuIU7KTVIzMBP2X4LZak3cCI/k=; b=wRoVuSVZf9XHDURX//g5m8mANwXrCFkIMY8pHNQVyrlLyQift7mvM0tyOIFmweE2Nq7t7M uXIM11TsYCii3zTrR1QBDgAcsiFxMoDRsNrdf9CL8zufXaAmFHUR0SGEoK58ioogRGXRls NYTeZlonzDJ/Z57Owv87RUAZT/xCKQ0n1pZY2gMl2GAoRTmnNeYvXAS6Fq+iI35ksWA9dq Fs7MoVUdgJEEMPJr10Fnbl7JvJgk0rqDSsRhapRXz5AG3IDmxDKeCH04iTZCNqLIp1QUpO 0WOJbJFBH9vWtdWNY5XMuqpepD+drwhs3ypPiZP3VGkKz+CsqPzA+EuuYeWp4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740153003; a=rsa-sha256; cv=none; b=P4PThsvBThMLPl+aubRbkEYB5mvP8kFqj7VMWI1SLesuSN9JR9EFyR9wZLiOPBZyheW4nC 9aIKq5lWjIHcoGqG7N7dNywsPQ2EOVSUbIxNDX7rrETYOUKAqFGfs1oBp7abTVS6Lm5YYT iEfIDMpR6U9087m7J9In1kG3Hkg69liWm7OjeiBL0UgagWPS4uec1q6+NhsGq8+VjEq5tR 50qAv1wTja8uVRoEdvvlSS9QDIkL7LJM5oMHExZWtSfTvx3HDT5HlP1qQuZTxxfHo1nr1E 73cU5qPd1f5xLhOdxmiHUpNIJX9ZtfNPQ1eMq6t7OU3uSneRl63z/NLy9Q/Zuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740153003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QvQk88jdLtQvC0DdrOuIU7KTVIzMBP2X4LZak3cCI/k=; b=UVhITebGV7C4CORTWRy9LRQydPqA6B3+T88t/oNYbIAGBDQFqDpQyryDe0Sfh5KehNXJRG cSkbVpYQIX3HjaWOturIIadNylZud1HEC28QYyXH9W0iblCC9VEMXZeuVIgG3U9/l2OCo3 TAdhXkybAd1jilij0MLH9skxbARicLooiKpV3ka4XuNtSr/2AFSWiSSmHbt2+cqXQ3/R0g Jtp69wiUNxFK4XVAiuB+0b5dZSGP/rybeCtrIDdlKlc8hAZ1+7uH7l+Tq7J4Pn5vsYEmf8 Vn2D7Rk8fz/UYm65zte4yy+nQCvwyf0CWTFo1pG5+LWH73n2u2+OBUmOchxqmA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yzvhq6CYgzCtZ for ; Fri, 21 Feb 2025 15:50:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 51LFo3hC035950 for ; Fri, 21 Feb 2025 15:50:03 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 51LFo3Iw035948 for apache@FreeBSD.org; Fri, 21 Feb 2025 15:50:03 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: apache@FreeBSD.org Subject: maintainer-feedback requested: [Bug 284950] www/apache24: Behavior of config checks in rc-script Date: Fri, 21 Feb 2025 15:50:03 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: apache@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Support of apache-related ports List-Archive: https://lists.freebsd.org/archives/freebsd-apache List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-apache@FreeBSD.org MIME-Version: 1.0 Bugzilla Automation has asked freebsd-apache (Nobody) for maintainer-feedback: Bug 284950: www/apache24: Behavior of config checks in rc-script https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284950 --- Description --- I noticed that if you use the reload command of the rc-script, the apache config will be checked twice. Once because the reload_precmd is set to apache24_checkconfig and the reload function itself calls the apache24_checkconfig function. Because of this, i looked closer at the rc-script and found some other weird behaviors. - For the commands start, reload, graceful and gracefulstop the function apache24_checkconfig is called, but the result is not used at all and the script continues executing, even if the config is invalid - The command reload and graceful do the same thing, except reload does che= ck the config twice. - The restart command does check the config also twice (Once before stopping apache and once before starting apache) The attached patch does fix some of these points. - The result of apache24_checkconfig will be checked and the command will a= bort if there is an invalid config - reload_precmd is removed. The config will be checked once for a reload. T= he behavior of reload and graceful is the same It would be nice, if the restart command does only check the config once, before stopping apache. But I don't have much experience with rc-scripts, so I'm unsure of the best approach to take.