From nobody Mon Apr 14 07:21:20 2025 X-Original-To: rc@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 4Zbdxs2cYMz5sJ7w for ; Mon, 14 Apr 2025 07:21:21 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zbdxs1tBLz3dbN for ; Mon, 14 Apr 2025 07:21:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1744615281; 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=avnYU6hfFuDHmGXarZSJaDplmBY5RyNpsYjSeT9CaHo=; b=KmX7YWrPiGwhe1YEFle2spplZMgIin6tTHfJjiFzL/v0WxKvYBuRqFKSiM84X8sYLt0uF9 ksCNVfMs9fkMrnyDvWXSmoKh4GtsGhZZsLJSAWsQhW/vSmWnNoUgxZ+X5Zj7dsfjb6LrmK Ya5Vu3qHWlk1f4hnuuPKmYtEOoSAeNv/rH0+tFxXIl3aQlikUHAROb4eJ5v7DGjeEh2DwN lx10dbjziszDVQC4UjKrpNoTiL/kduN0XsvmACbNDgGjXAYuRe9CsQECdtQeJayVJ5V3aR WtBULxiptVDspw8zsMI1w/QqlZETtL3rVgaShwzMNl2X3NO/frFf7K44+q0jTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1744615281; a=rsa-sha256; cv=none; b=BViHnIVkVPUJe/CRrBzhFWuGb2Bc3+zO99Bxzt1xK5kClIH7r+i1USEVqd6kFFXgWRahKE r4p3BoSO7YH9mo1nI0Vbf8LIbDHxIQwOdyZmssRdKliXvFksl7bZ1p5/xOElVbih8Jy/LU OL2CG5FlI1zcOwVLekJxn4pUeHX2bkzNY+b3gOk4WOq+3NcREcRKfIpFS8um7xT2BuakQk s/wxmSe1ea4WQutNAFJYtIN+jF5tlDJdPr9mnFJ+iuz/MQA7++kwCQk+vI6iJrXvD6CFHy 2TcIrbxUqQyWJxsfC4ssi1Fqx9h9ptVV3fdWrc3R3F8Ttu2XL5bw9JSjpA1GgQ== 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=1744615281; 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=avnYU6hfFuDHmGXarZSJaDplmBY5RyNpsYjSeT9CaHo=; b=pHqrM2OHdVBG0p16Iy7OGH+3q4M8HqPjHbsDxVZOdSt20xpPnvWTX9lzra8p/AtdGK+nYn JFziCt7tlr9qyVadQ9hBhSFr54cME8/53WlVC2sRVd0VG6OXPa39SqaOpdntfwVaQdB0Cq yr4H/0ZNN1LeL0pi5c8WsMEnIaCB+VGPTxG8zsaKINdFi/+Pas9Xe84bIqCek5SgHC/Epb mKP1Hkzj8Ps9qxg/IKQdWxjGYVYTgoFjR2JiiL2Vr5+/y6JulVDvi5/DcZ3L7NAdgGavS8 5S/gd1svXdO4yFDAscnUIV5Z6PVXx23KgwLAmD0q3dkxjPvrCnQL8+861pzpyg== 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 4Zbdxs1Qr7zf59 for ; Mon, 14 Apr 2025 07:21:21 +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 53E7LLxm019914 for ; Mon, 14 Apr 2025 07:21:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 53E7LLEC019913 for rc@FreeBSD.org; Mon, 14 Apr 2025 07:21:21 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: rc@FreeBSD.org Subject: [Bug 279200] sysrc(8) fails to perform set operations for += and -= in -c (check only) mode. Date: Mon, 14 Apr 2025 07:21:20 +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: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: michal.os@hotmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: rc@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion related to /etc/rc.d design and implementation List-Archive: https://lists.freebsd.org/archives/freebsd-rc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-rc@freebsd.org Sender: owner-freebsd-rc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279200 --- Comment #2 from Michal Scigocki --- I had a look, and it looks like the check logic does not account for APPEND= and SUBTRACT operations. It just compares the existing value in the rc.conf fil= e(s) to the value of the variable supplied on the command line. The APPEND/SUBTRACT logic does peform the union/difference calculation. The check logic can be moved after the APPEND/SUBTRACT logic, and use the "befo= re" and "new" variables for the check comparison to get the correct result. I have created some regression tests for sysrc and a patch for this problem, and made a pull request with the the changes to github: https://github.com/freebsd/freebsd-src/pull/1664 --=20 You are receiving this mail because: You are the assignee for the bug.=