From owner-svn-ports-all@freebsd.org Sun Aug 27 19:27:39 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 872B5DF688C; Sun, 27 Aug 2017 19:27:39 +0000 (UTC) (envelope-from rezny@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 mx1.freebsd.org (Postfix) with ESMTPS id 60F678010A; Sun, 27 Aug 2017 19:27:39 +0000 (UTC) (envelope-from rezny@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7RJRcrr013796; Sun, 27 Aug 2017 19:27:38 GMT (envelope-from rezny@FreeBSD.org) Received: (from rezny@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7RJRct5013794; Sun, 27 Aug 2017 19:27:38 GMT (envelope-from rezny@FreeBSD.org) Message-Id: <201708271927.v7RJRct5013794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rezny set sender to rezny@FreeBSD.org using -f From: Matthew Rezny Date: Sun, 27 Aug 2017 19:27:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r448838 - in head/x11/xinit: . files X-SVN-Group: ports-head X-SVN-Commit-Author: rezny X-SVN-Commit-Paths: in head/x11/xinit: . files X-SVN-Commit-Revision: 448838 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 27 Aug 2017 19:27:39 -0000 Author: rezny Date: Sun Aug 27 19:27:38 2017 New Revision: 448838 URL: https://svnweb.freebsd.org/changeset/ports/448838 Log: Set correct $displayname and remove expr GNUisms PR: 220668 Reported by: parakleta@darkreality.org, wulf Added: head/x11/xinit/files/ head/x11/xinit/files/patch-startx.cpp (contents, props changed) Modified: head/x11/xinit/Makefile Modified: head/x11/xinit/Makefile ============================================================================== --- head/x11/xinit/Makefile Sun Aug 27 19:23:44 2017 (r448837) +++ head/x11/xinit/Makefile Sun Aug 27 19:27:38 2017 (r448838) @@ -2,6 +2,7 @@ PORTNAME= xinit PORTVERSION= 1.3.4 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= x11 Added: head/x11/xinit/files/patch-startx.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/xinit/files/patch-startx.cpp Sun Aug 27 19:27:38 2017 (r448838) @@ -0,0 +1,49 @@ +# remove expr GNUisms: use BRE syntax and remove match, based on +# upstream commit e3bab0cc706880c22f2b205e7abad9d8c0227071, but +# also shield expr from leading dash of X server args. +# +# generate displayname as dictated in the xauth manpage +# +--- startx.cpp.orig 2014-09-11 17:31:42 UTC ++++ startx.cpp +@@ -154,7 +154,7 @@ while [ x"$1" != x ]; do + else + XCOMM display must be the FIRST server argument + if [ x"$serverargs" = x ] && @@ +- expr "$1" : ':[0-9][0-9]*$' > /dev/null 2>&1; then ++ expr \( "$1" \) : ':[0-9][0-9]*$' > /dev/null 2>&1; then + display="$1" + else + serverargs="$serverargs $1" +@@ -193,7 +193,7 @@ if [ x"$server" = x ]; then + XCOMM the startx session being seen as inactive: + XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=806491" + tty=$(tty) +- if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then ++ if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then + tty_num=$(echo "$tty" | grep -oE '[0-9]+$') + vtarg="vt$tty_num" + fi +@@ -217,7 +217,7 @@ fi + XCOMM if no vt is specified add vtarg (which may be empty) + have_vtarg="no" + for i in $serverargs; do +- if expr match "$i" '^vt[0-9]\+$' > /dev/null; then ++ if expr \( "$i" \) : 'vt[0-9][0-9]*$' > /dev/null; then + have_vtarg="yes" + fi + done +@@ -283,10 +283,10 @@ EOF + + XCOMM now add the same credentials to the client authority file + XCOMM if '$displayname' already exists do not overwrite it as another +- XCOMM server man need it. Add them to the '$xserverauthfile' instead. +- for displayname in $authdisplay $hostname$authdisplay; do ++ XCOMM server may need it. Add them to the '$xserverauthfile' instead. ++ for displayname in $authdisplay $hostname/unix$authdisplay; do + authcookie=`XAUTH list "$displayname" @@ +- | sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p"` 2>/dev/null; ++ | sed -n "s|.*$displayname[[:space:]*].*[[:space:]*]||p"` 2>/dev/null; + if [ "z${authcookie}" = "z" ] ; then + XAUTH -q << EOF + add $displayname . $mcookie