From nobody Thu Oct 29 23:32:52 2026 X-Original-To: dev-commits-src-all@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 4jG0s039hfz6xqsF for ; Thu, 29 Oct 2026 23:32:52 +0000 (UTC) (envelope-from git@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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jG0s00SN3z4pvC for ; Thu, 29 Oct 2026 23:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793316772; 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; bh=atoM2vOoi18aTBRDrBCsRE+QXiQzMxshJMv0QNU0828=; b=GE2sgbdWb5cuov6TgWxcceQubL7R1Gch32nCwfOh2Ft7ViethrZm0EkOiR/RQXjbKnrZ5a yVlZOlVTVBOC79c0F2Hhklf6P3A0YYsb2ktsiY5cEiiQEMW285dLTrdCEYFGrDq5rIWg7U RVuT8R/Q7I7UnkK6wDmfGiXkhRNeCNU7hCZjxicGWe9Qax3elyc+dzgBiQoMqigzE5+UG1 Uqk6729avW5IX13PyE4PbNpu7u3fblMDtXhwNyIaUXDKVm7MfHRoqFe7CHWqIxQURfal/M 8Vp4OAsdHxpB9QtA7pCsaO8rMfafUyxo2z7Bdvjc5K0Q55OeGnxwxrb0gCZawg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793316772; b=yYvGWD5/uxCjwFJYK3rgbMGqEeerZMx+ypoXSisZn8Bh2hp4vqnZ0+VzkICYBV+hFtAgCP WD40rU2ivhfgD87yeiVxig6zexny3E3m+zLPBtSsTT8dVGVS0eXsqlZrfJdTd5QQtJr3yF SGHc0wHbbZKx94wd0M+k1tx0P/uiJCTam9RgwhOoxFy5ycplooqh2eQVIO/a7yeXMQ6tjj rWXMdfWp3YCvdTbpfS4qZzrlj4iSWv86B9AvztXdpFWKhPovTwrXcaaO3jcIBCYEq3bay0 KRJ8k5JpT9WLD+9Xm98e87LDw+FcwzS2S3RgrWyllAeNREDuiVYZWA8oBD6/9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793316772; 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; bh=atoM2vOoi18aTBRDrBCsRE+QXiQzMxshJMv0QNU0828=; b=jL+0WK+UpSmMPROglzVss8VZ/ZQmWGKXk7UERssBEyDlRgZpmPaqxNpTFcwZTB25BTHK4J /6XCvqu77CwZd6Y4fJigDs4cSzyeageIa4YJ5KkJkR6jYsZSYCABpCj6O8iY04SHMQjy5a pfXCcVqL28fSWB6TOaYpFUcKH12iRcq9yFFPJuJ+V0UxyR9RA5var9RvIqgDwGr3iYuKe8 i2rehqyB8nIkAKuPas7M5To08o5H6YzyQbFpnYZZYXY4uNjxD3UWOd1nm18QF0FMN77xy3 KCvnGKkxvmRQ+ViJBTwdF/KVvcLyIX3toCr2dIret+ykgZpK3ebJLi8tweVKHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jG0s006HJz12Dm for ; Thu, 29 Oct 2026 23:32:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39b66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 23:32:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 010e53f7c690 - main - git-arc: add initial non-FreeBSD and `$HOME` install support List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 010e53f7c6908bee93d1bd32fb4b1658b0f19eef Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 23:32:52 +0000 Message-Id: <6ae3d7a4.39b66.2fb5853b@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=010e53f7c6908bee93d1bd32fb4b1658b0f19eef commit 010e53f7c6908bee93d1bd32fb4b1658b0f19eef Author: Enji Cooper AuthorDate: 2026-10-29 20:59:38 +0000 Commit: Enji Cooper CommitDate: 2026-10-29 23:31:58 +0000 git-arc: add initial non-FreeBSD and `$HOME` install support Modify the existing code to permit setting a prefix via the `PREFIX` make variable, similar to what `--prefix` provides in autotools-based projects. Add the required compatibility glue in order to function with vanilla bmake, which enables installing the commands with Linux and macOS: - vanilla bmake requires `scripts.mk` to install `SCRIPTS`. - vanilla bmake does not tack `/man` on to the end of `MANDIR`, like with FreeBSD. Adjust the sysctl calls to instead look for `arc` in `$PATH` using `command -v` instead of hardcoding the path to the `arc` binary. This allows the command to invoke `phorge` as well as the legacy `arcanist` tool. While here, update the origin for `arcanist` as the former is the non-phorge fork is no longer supported (nor needed). NOTE: - regarding Linux support: this should now function out of the box with Linux as long as the host has access to an appropriate `arc` binary. - regarding macOS support: the arcanist/phorge packages do not yet exist in Homebrew or MacPorts, but are being added soon. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D60995 --- tools/tools/git/Makefile | 12 +++++++++++- tools/tools/git/git-arc.sh | 6 ++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tools/tools/git/Makefile b/tools/tools/git/Makefile index ee73ad178486..3d5d05e3ce61 100644 --- a/tools/tools/git/Makefile +++ b/tools/tools/git/Makefile @@ -1,5 +1,15 @@ SCRIPTS= git-arc.sh git-mfc -BINDIR?= /usr/local/bin +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin MAN= git-arc.1 git-mfc.1 +.if ${.MAKE.OS} == "FreeBSD" +MANDIR?= ${PREFIX}/share/man/man +.else +# Work with vanilla bmake on alternate OSes, e.g., Linux, macOS, etc. +MANDIR?= ${PREFIX}/share/man + +.include +.endif + .include diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index efc29b92865d..537ac0f58d85 100755 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -101,7 +101,7 @@ get_bool_config() # setup() { - [ -x "${ARC_CMD}" ] || err "arc is required, install devel/arcanist-lib" + [ -x "${ARC_CMD}" ] || err "arc is required, install devel/phorgeit-arcanist-lib" which jq >/dev/null 2>&1 || err "jq is required, install textproc/jq" if [ "$VERBOSE" ]; then @@ -152,9 +152,7 @@ setup() # the devel/arcanist-port, which installs a symlink in ${LOCALBASE}/bin # but conflicts with the archivers/arc port. # -: "${LOCALBASE:=$(sysctl -n user.localbase)}" -: "${LOCALBASE:=/usr/local}" -: "${ARC_CMD:=${LOCALBASE}/lib/php/arcanist/bin/arc}" +: "${ARC_CMD:="$(command -v arc)"}" arc() { ${ARC_CMD} "$@"