Bug 242801

Summary: x11-toolkits/wlroots: Fix usage on TTY 11 or higher
Product: Ports & Packages Reporter: Ting-Wei Lan <lantw44>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (jbeich)
jbeich: merge-quarterly+
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch from https://github.com/swaywm/wlroots/pull/1945 none

Description Ting-Wei Lan 2019-12-22 12:32:05 UTC
Created attachment 210135 [details]
Patch from https://github.com/swaywm/wlroots/pull/1945

Currently wlroots only works for TTY 1 ~ 10 because of its use of %d in snprintf format string to map the number to the path to TTY device. This is wrong because FreeBSD kernel uses base r32 instead of base r10, so mapping TTY 11 to /dev/ttyv10 results in 'No such file or directory' error.

Please see https://github.com/swaywm/wlroots/issues/1854 for details.
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-12-22 19:52:59 UTC
A commit references this bug:

Author: jbeich
Date: Sun Dec 22 19:52:09 UTC 2019
New revision: 520655
URL: https://svnweb.freebsd.org/changeset/ports/520655

Log:
  x11-toolkits/wlroots: backport fix for TTY > 10

  $ sway -d
  [...]
  [sway/server.c:39] Preparing Wayland server initialization
  [backend/session/direct-freebsd.c:159] Using tty /dev/ttyv10
  [backend/session/direct-freebsd.c:163] Cannot open tty: No such file or directory
  [backend/session/session.c:96] Failed to load session backend
  [backend/backend.c:321] Failed to start a DRM session
  [backend/noop/backend.c:51] Creating noop backend
  [sway/server.c:46] Unable to create backend

  PR:		242801
  Submitted by:	Ting-Wei Lan

Changes:
  head/x11-toolkits/wlroots/Makefile
  head/x11-toolkits/wlroots/distinfo
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-12-22 19:54:00 UTC
A commit references this bug:

Author: jbeich
Date: Sun Dec 22 19:53:23 UTC 2019
New revision: 520656
URL: https://svnweb.freebsd.org/changeset/ports/520656

Log:
  MFH: r520655

  x11-toolkits/wlroots: backport fix for TTY > 10

  $ sway -d
  [...]
  [sway/server.c:39] Preparing Wayland server initialization
  [backend/session/direct-freebsd.c:159] Using tty /dev/ttyv10
  [backend/session/direct-freebsd.c:163] Cannot open tty: No such file or directory
  [backend/session/session.c:96] Failed to load session backend
  [backend/backend.c:321] Failed to start a DRM session
  [backend/noop/backend.c:51] Creating noop backend
  [sway/server.c:46] Unable to create backend

  PR:		242801
  Submitted by:	Ting-Wei Lan
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2019Q4/
  branches/2019Q4/x11-toolkits/wlroots/Makefile
  branches/2019Q4/x11-toolkits/wlroots/distinfo
Comment 3 Jan Beich freebsd_committer freebsd_triage 2019-12-22 19:54:29 UTC
Thanks. Landed.