From nobody Mon May 27 00:47:12 2024 X-Original-To: bugs@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 4VncRh60cxz5KxKm for ; Mon, 27 May 2024 00:47:12 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VncRh4lQ7z4j7D for ; Mon, 27 May 2024 00:47:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716770832; a=rsa-sha256; cv=none; b=bhtzcfj95LmQ7HxY+nJ8yM132x6tR1xEJ1Rxjqwr4RN7dkA5G6SqoKCDEEAEivZKDOY8lI voWVFMsUmoC8Zv2XyFepJrunBftfNra/bVPQs5NpkzozMv5n8qCV2A0n3Cr2Va0e7ZUOoR JMqs43v4klh32/bHxZbxNIz7pW0jqc9TMzFRh+oKOwR5N9k+V3kF1Fo/lJeIUGYiT0tokS omCtdhkut3yvPQtWvT4/vXyBz+PkhcNjRAHXdx43SApuy5bQV1txnrx4PVqaJs0Wx2+u65 UrX5BxfDXO2encr0PSfNSN3nRuwKtEFfpCGhk1xmcDO49uIDSl/uDgmmij2C/g== 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=1716770832; 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=amuDzRO2mZkEsXQXtqXg2ccGt2b8AzExE4NT0UmwqT0=; b=dJ/NxOiwgZ3+vqHGQcDE/3ZiOw36T9oM8nnOxU5VL9KUnfYEizXGqFI3MVyiZSVxvBzMQ6 LkGJsHDJAc0kBPccvRZqwMW2Mmb9mxD56mf52T3BI1uidEJ3N+cOpRcukrFw8Pfe4vq8WX C29xlUtggQJCzqCwF9CNSsniJvjU0nZ6pNLtXpO7DEwDhEoooM8uE0DcOi7jmL67fvek8I kdNvcdCcMdzgL6khkF95TbZtEJ2yMZ9ZiL/RFcR6j0VaO2vx+gP3M5c9DMar8wy3gIFonx r2qX/N9ZNzwqFqux79DHkKWjBCQzucOcSNvkRNotrRDReQWrsSNc7KHH1K0BHA== 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 4VncRh4J0FzMD6 for ; Mon, 27 May 2024 00:47:12 +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 44R0lCXa068108 for ; Mon, 27 May 2024 00:47:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 44R0lCVo068106 for bugs@FreeBSD.org; Mon, 27 May 2024 00:47:12 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 279303] usr.sbin/newsyslog: Fix case of the 'P' flag in newsyslog.conf's manpage Date: Mon, 27 May 2024 00:47:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: freebsd@kumba.dev X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279303 --- Comment #4 from Joshua Kinard --- (In reply to Joshua Kinard from comment #3) Why is it always the little things that hide the deepest of rabbit holes? I dug back into FreeBSD's cgit history, and it looks like the 'p'/'P' flag (take your pick) was added on 2017-12-31 by @eadler, tracked by git commit df76ac99518d. In that commit, the flag was added as lowercase to the newsyslog.conf.5 man page, and to the newsyslog.c source file as lower case. I then went and looked into NetBSD's source, and they have ALL of the newsyslog.conf flags they support listed in their man page as lowercase, bu= t in their newsyslog.c, they convert those flags to uppercase before checking th= em in a switch statement, which is the opposite of what FreeBSD is doing. Digging further back, I think it's around NetBSD 1.6 is when support for th= ose flags even first appeared, including 'p'. In that version, in newsyslog.c, NetBSD checks for lowercase flags. On 2007-21-12. when NetBSD was at v5.0,= the 'J' flag was added to NetBSD's newsyslog.c by @dogcow, and at that time is = when they modified the switch logic to check for uppercase flags, but added the = 'J' flag to the man page as lowercase 'j', and did not leave a reasoning on the= se differences in their commit message: https://anonhg.netbsd.org/src/rev/e97bbfc29eff Which is correct? Both, technically! Historically, lowercase letters were first, in both NetBSD's man pages and source. Then the source later got updated to check the flags as uppercase values, but the man page still, to = this day, references lower case. FreeBSD, on the other hand, is using uppercase flags in its newsyslog.conf(5) man page and config examples, except for 'p', but checks the flags as all lower case, which was the original logic from NetBSD. I assume that when the code for the 'p' flag was copied from NetBSD and brought into FreeBSD, @eadler either didn't notice such a small nit, or didn't care. Both upper and lowercase flag values are technically valid, because in either OS, the values are forced into one or the other case befo= re being checked. If y'all want, I have no problem leaving the flag in the man page as-is as a historical curiosity for someone to find again in the future. Or, the patch can be accepted and the flag changed to uppercase in FreeBSD's man page for consistency with the other flags. --=20 You are receiving this mail because: You are the assignee for the bug.=