From owner-svn-ports-all@freebsd.org Fri Mar 22 12:29:38 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63A371544759; Fri, 22 Mar 2019 12:29:38 +0000 (UTC) (envelope-from tobik@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9BBF80CE0; Fri, 22 Mar 2019 12:29:37 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B59D920521; Fri, 22 Mar 2019 12:29:37 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2MCTb6E091713; Fri, 22 Mar 2019 12:29:37 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2MCTbKq091711; Fri, 22 Mar 2019 12:29:37 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201903221229.x2MCTbKq091711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Fri, 22 Mar 2019 12:29:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r496561 - in head/x11/alacritty: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/x11/alacritty: . files X-SVN-Commit-Revision: 496561 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D9BBF80CE0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Mar 2019 12:29:38 -0000 Author: tobik Date: Fri Mar 22 12:29:37 2019 New Revision: 496561 URL: https://svnweb.freebsd.org/changeset/ports/496561 Log: x11/alacritty: Apply workaround to let SpawnNewInstance work on FreeBSD On Linux Alacritty looks up /proc/$shell_pid/cwd to open new instances in the same working directory as the old instance which does not work with FreeBSD's procfs(5). As a workaround we can for now fallback to linprocfs(5), often mounted on /compat/linux/proc, until there is support for KERN_PROC_CWD and struct kinfo_file in the Rust ecosystem (libc or elsewhere). PR: 236382 Submitted by: tobik Approved by: zeising (maintainer timeout, 2 weeks) Added: head/x11/alacritty/files/ head/x11/alacritty/files/patch-src_event.rs (contents, props changed) Modified: head/x11/alacritty/Makefile Modified: head/x11/alacritty/Makefile ============================================================================== --- head/x11/alacritty/Makefile Fri Mar 22 12:10:37 2019 (r496560) +++ head/x11/alacritty/Makefile Fri Mar 22 12:29:37 2019 (r496561) @@ -3,7 +3,7 @@ PORTNAME= alacritty PORTVERSION= 0.2.9 DISTVERSIONPREFIX= v -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11 MAINTAINER= zeising@FreeBSD.org Added: head/x11/alacritty/files/patch-src_event.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/alacritty/files/patch-src_event.rs Fri Mar 22 12:29:37 2019 (r496561) @@ -0,0 +1,20 @@ +Let Alacritty open new instances in the shell's working directory +as long as linprocfs(5) is mounted on /compat/linux/proc. + +https://github.com/jwilm/alacritty/commit/0ec4bd28dadcf476baf6180af7cf93bea9214f19 + +--- src/event.rs.orig 2019-02-11 23:59:21 UTC ++++ src/event.rs +@@ -172,7 +172,11 @@ impl<'a, N: Notify + 'a> input::ActionContext for Acti + + #[cfg(unix)] + let args = { +- if let Ok(path) = fs::read_link(format!("/proc/{}/cwd", unsafe { tty::PID })) { ++ #[cfg(not(target_os = "freebsd"))] ++ let proc_prefix = ""; ++ #[cfg(target_os = "freebsd")] ++ let proc_prefix = "/compat/linux"; ++ if let Ok(path) = fs::read_link(format!("{}/proc/{}/cwd", proc_prefix, unsafe { tty::PID })) { + vec!["--working-directory".into(), path] + } else { + Vec::new()