From nobody Sat Oct 31 01:27:49 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 4jGgMG49dSz6xhZk for ; Sat, 31 Oct 2026 01:27:54 +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 4jGgMG1lWPz4yFW for ; Sat, 31 Oct 2026 01:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793410074; 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=sHtn2uewQJnKp0/Z7CmihAp2uTVBI0a9ArOFJh7kV6g=; b=Atzk84ONEWf3/V8UB90r2wETFresuCD98EkrsTODEcK0UyPT4iDte5T3d2zjBKKpeRsQXx jsd/Cj+QZLwMwYGoNMmlQXp/4Jnso8SwNiTEQQzG1yjwKaIWNxeQ4SRWZA7ml+cd2npMFM bbZrLFlcDvBXrRQFDuF2OaK/8woeWTLo5ghcqgQggL/DGgLUqoWKVtJCU/yuVA8CVXExQY roYQTRXcuEnjEWkRwkDa+pLHYt8ydB+ryVDm2n+dIGCgbO9xTI/Zaj0a/60ivsuPc60ac+ MwsMb1ozIRhnsTej0Npf2Pncg10p15IbyHm8i0M1cTNE/K6Gxf0gwyUETL9sVA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793410074; b=nvKpn3GYS5w5GqmTb5xn4R46MnPwlAimOHZ2wyQh5C9AXmUWe4KTMiI+KraBAQc2Wzjebi exnpe7BaWp7n7YjBIZES7AyDb2N8utVoNbaO4d0ufKXLkoajJtgz+Nf7hjVfuByOPnqQ2i /fRsZI99WJ3jtsi458TKU85UtGl32okgkoXGUS1aefWCp99ux0DJNtjXa1mYFXRtCNTWPk w0fbHCu8kuxi25J+MuRSALRGgclh4AOUHTuGYXNkoh8OAZ6mh5bho4Sf3CHmVrhLk7LGZA /mrUtzKVWPOfC+sJpryT7DqAaxNsIPu7V2KxeTNPcrGXFu/Mfj8ZNx+t/FjRlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793410074; 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=sHtn2uewQJnKp0/Z7CmihAp2uTVBI0a9ArOFJh7kV6g=; b=vvO97E9v8RUPtZEYpUv+oF2xizbs/0e3QszEFq6JkHNfjMDzIf1D4YTtnBbFaJ69l6wb4z l/Bv+3Nzu+Y4SpV4S58DquVYPyNkg8EX4EJmZ+HinHWJ08Ap1HyXnmpiq9QFjBTU1PpNUx MVElRJMm8r7XvjGKjo+mxp+LU66CSiRdYogdBWklODCBJYbMRWu7a8xu4E6aXzI4AW9+jS ebBOL/9I0FM/0pucttBurac/TUcA8G4AE6gOz8JzgW6njivFKFAItW8ESXrYyUYZi/CzgR J2/UlUybxSGgx5EPnEEGWFq6Xr1NzuHmQ5wmqsoiZzZIg+/m7iNW3J5CV4y2hQ== 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 4jGgMG178czssY for ; Sat, 31 Oct 2026 01:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 229e9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 31 Oct 2026 01:27:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 0729ab54ee83 - 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: 0729ab54ee8350533f319dd3a2bad25becab5bd5 Auto-Submitted: auto-generated Date: Sat, 31 Oct 2026 01:27:49 +0000 Message-Id: <6ae54415.229e9.4a142508@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=0729ab54ee8350533f319dd3a2bad25becab5bd5 commit 0729ab54ee8350533f319dd3a2bad25becab5bd5 Author: Enji Cooper AuthorDate: 2026-10-29 23:42:56 +0000 Commit: Enji Cooper CommitDate: 2026-10-31 01:27:41 +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. While here, make the origins for various packages more generic, and encourage end-users to install the package via the package/port instead of installing it directly from source. 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][1], but are being added soon. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D60995 [1]: https://github.com/macports/macports-ports/pull/36217 --- tools/tools/git/Makefile | 13 ++++++++++++- tools/tools/git/git-arc.1 | 15 ++++++++------- tools/tools/git/git-arc.sh | 31 ++++++++++++++++++++----------- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/tools/tools/git/Makefile b/tools/tools/git/Makefile index ee73ad178486..bbf2e2e7a5f3 100644 --- a/tools/tools/git/Makefile +++ b/tools/tools/git/Makefile @@ -1,5 +1,16 @@ 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" +# This matches the value set in `bsd.own.mk`. +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.1 b/tools/tools/git/git-arc.1 index d6b9ed686aaa..b1a6736d392e 100644 --- a/tools/tools/git/git-arc.1 +++ b/tools/tools/git/git-arc.1 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 23, 2026 +.Dd October 30, 2026 .Dt GIT-ARC 1 .Os .Sh NAME @@ -68,16 +68,17 @@ Phabricator reviews based on git commits. It is geared towards .Fx development. -It requires the -.Pa devel/git , -.Pa devel/arcanist-lib +It requires +.Pa arc , +.Pa git , and -.Pa textproc/jq -packages; these will be installed automatically if +.Pa jq . +The dependencies will be installed automatically if .Nm is installed via the .Pa devel/freebsd-git-arc -package. +package on +.Fx . .Pp .Nm assumes a one-to-one relationship between git commits and diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index efc29b92865d..840be477abf3 100755 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -101,8 +101,8 @@ get_bool_config() # setup() { - [ -x "${ARC_CMD}" ] || err "arc is required, install devel/arcanist-lib" - which jq >/dev/null 2>&1 || err "jq is required, install textproc/jq" + [ -x "${ARC_CMD}" ] || err "arc is required" + which jq >/dev/null 2>&1 || err "jq is required" if [ "$VERBOSE" ]; then exec 3>&1 @@ -146,15 +146,24 @@ setup() trap cleanup EXIT HUP INT QUIT TRAP USR1 TERM } -# -# Invoke the actual arc command. This allows us to only rely on the -# devel/arcanist-lib port, which installs the actual script, rather than -# 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}" +case "$(uname -s)" in +FreeBSD) + # + # Invoke the actual arc command. This allows us to only rely on the + # devel/*arcanist-lib port, which installs the actual script, rather than + # devel/*arcanist, 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}" + ;; +*) + # Linux, macOS, etc. + : "${ARC_CMD:="$(command -v arc)"}" + ;; +esac + arc() { ${ARC_CMD} "$@"