Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FreeBSD terminfo location #55152

Merged
merged 1 commit into from
Jul 5, 2021
Merged

Add FreeBSD terminfo location #55152

merged 1 commit into from
Jul 5, 2021

Conversation

Thefrank
Copy link
Contributor

@Thefrank Thefrank commented Jul 4, 2021

  • terminfo under FreeBSD no longer uses a hashed database but instead uses the more common "directory tree" style.
  • This fixes like 1 failing runtime test for System.Console under FreeBSD.
  • Please install terminfo-db via pkg before building under FreeBSD. ncurses no longer covers this.

resolves: #23653

`ncurses` port under FreeBSD no longer uses a hashed database but instead uses the more common "directory tree" style. 
This fixes like 1 failing runtime test for `System.Console`
@ghost
Copy link

ghost commented Jul 4, 2021

Tagging subscribers to this area: @dotnet/area-system-console
See info in area-owners.md if you want to be subscribed.

Issue Details
  • terminfo under FreeBSD no longer uses a hashed database but instead uses the more common "directory tree" style.
  • This fixes like 1 failing runtime test for System.Console under FreeBSD.
  • Please install terminfo-db via pkg before building under FreeBSD. ncurses not longer covers this.
Author: Thefrank
Assignees: -
Labels:

area-System.Console

Milestone: -

@Thefrank
Copy link
Contributor Author

Thefrank commented Jul 4, 2021

Long version:
The terminfo database under FreeBSD was built as a hashed db. To get a usable terminfo that runtime could use would require either a) coding a unique solution specific to a hashed terminfo.db or b) requiring those that wanting support to both make the one line code in this pull request and download the FreeBSD ports tree, make the required changes to the Makefile for ncurses, and finally build ncurses with said changes. Thankfully, changes in circumstance at the beginning of the year mean that the ncurses port (and pkg) broke off the terminfo-db part as a separate install and that now uses a directory tree which is exactly what TermInfo.cs is looking for. This was mentioned and tested working in the issue linked above but it appears that the directory path was never actually added to TermInfo.cs.

Even longer version as issue: This has been a long standing issue under FreeBSD.

CC @wfurt

@am11
Copy link
Member

am11 commented Jul 4, 2021

Thanks Frank! I once started writing code for hasheddb build never finished it (mainly due to the lack of sufficient documentation on the initialization step, which I couldn't find).

* Please install `terminfo-db` via `pkg` before building under FreeBSD. `ncurses` not longer covers this.

Could you please add __FreeBSDPackages+=" terminfo-db" after https://github.com/dotnet/arcade/blob/0f496578b39793650160aa8a1a0e26883bf804fa/eng/common/cross/build-rootfs.sh#L70, so we get the CI build docker also aligned? (the next rebuild of dotnet-docker-prereqs will automagically pick it up).

@Thefrank
Copy link
Contributor Author

Thefrank commented Jul 4, 2021

@am11 Those docker images are another thing I need to look over (e.g., EOL FreeBSD versions and use of built in LLVM) but I will add that package to any pull request I make there.

@Thefrank Thefrank marked this pull request as ready for review July 4, 2021 23:03
@Thefrank
Copy link
Contributor Author

Thefrank commented Jul 5, 2021

I made an edit to the original post as I forgot to link this PR to the issue it addresses. It is the same one mentioned in my second comment under "Even longer version"

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @Thefrank

as soon as @wfurt approves it, we are going to merge it and hopefully include it as part of .NET 6

@adamsitnik adamsitnik added this to the 6.0.0 milestone Jul 5, 2021
Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wfurt wfurt merged commit 7edc27c into dotnet:main Jul 5, 2021
@Thefrank Thefrank deleted the freebsd-console branch July 6, 2021 00:10
wfurt pushed a commit to dotnet/arcade that referenced this pull request Jul 30, 2021
* add terminfo-db to FreeBSD package requirements

* runtime can use terminfo under FreeBSD but only with this additional package
* from feedback: dotnet/runtime#55152 (comment)

* fix typo, bump FreeBSD12, remove lttng-ust from it

lttng-ust removable depends on dotnet/runtime#56435 merge

* lttng-ust needs to stay

* add FreeBSD13, add support for FreeBSD ABI

also: use -j $JOBS during build while we are here
@ghost ghost locked as resolved and limited conversation to collaborators Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FreeBSD: System.Console is not working right
5 participants