FS#79143 - [rxvt-unicode] FTBFS tic ignores TERMINFO in fakeroot after ncurses 6.4-2

Attached to Project: Arch Linux
Opened by William Totten (biell) - Wednesday, 19 July 2023, 13:22 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 08 August 2023, 06:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To George Rawlinson (rawlinsong)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Since upgrading past ncurses 6.4-2, rxvt-unicode in extra (and all the AUR off-shoot packages) stopped building. The reason is that `tic` no longer uses TERMINFO or TERMINFO_DIRS when run as root (including fakeroot). I am actually surprised this doesn't affect more packages and the topic of wider discussion.

This effect is the result of a purposeful decision, in 6.4_20230520-1 the following configure option (which is the cause of the issue) was added to ncurses' configure_options array: --disable-root-environ

When your make fails for this reason, you will see a message similar to:
"./etc/rxvt-unicode.terminfo", line 7, terminal 'rxvt-unicode': /usr/share/terminfo/r: permission denied

So, two options remain. Either remove the `--disable-root-environ` configure option for ncurses, or update any affected PKGBUILDs. Disabling environment access for ncurses is in-arguably more secure, but I don't know the reason for adding it now and how important it really is.

To workaround this issue and keep the split package, a package like rxvt-unicode could do the following before running `configure` and then pull those contents into the split "-terminfo" package later:
export TIC="/usr/bin/tic -o${srcdir}/terminfo"

If a package wanted to manage their terminfo files in a single package, this method would work if set before running `configure`:
export TIC="/usr/bin/tic -o${pkgdir}/usr/share/terminfo"

The difference with my workarounds from what could be done in older versions of ncurses is that before ncurses added the `--disable-root-environ` flag to configure, programs could just set the TERMINFO environment variable before running `make install` and all would work fine.

Additional info:
* rxvt-unicode-9.31-3
* ncurses-6.4_20230520-1

Steps to reproduce:
I believe any `makepkg` of rxvt-unicode would fail today on an otherwise up-to-date system.

I hope this helps. If not, just close it. At the very least, this information should make its way to the maintainer of the rxvt-unicode package for them to take or leave.
This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 08 August 2023, 06:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  rxvt-unicode 9.31-4
Comment by Toolybird (Toolybird) - Wednesday, 19 July 2023, 22:10 GMT
`--disable-root-environ' was added to fix ncurses CVE in  FS#78578 . Relevant PM's have been notified. But the rxvt-unicode build just probably needs to be fixed.
Comment by Antonio Rojas (arojas) - Sunday, 30 July 2023, 09:04 GMT
9.31-4 built with the proposed workaround

Loading...