Bug 256569

Summary: devel/rlwrap fails with "Cannot open debug log /tmp/rlwrap.debug for appending" when switching users
Product: Ports & Packages Reporter: Julian Noble <julian>
Component: Individual Port(s)Assignee: Juraj Lutter <otis>
Status: Closed FIXED    
Severity: Affects Only Me CC: arrowd, gamato, otis
Priority: --- Flags: bugzilla: maintainer-feedback? (gamato)
Version: Latest   
Hardware: amd64   
OS: Any   

Description Julian Noble 2021-06-12 19:04:29 UTC
on 12.2-RELEASE-p7
installed with pkg install rlwrap

rlwrap creates /tmp/rlwrap.debug 

When switching users I then get:
rlwrap: error: Cannot open  debug log /tmp/rlwrap.debug for appending: Permission denied
Comment 1 Juraj Lutter freebsd_committer freebsd_triage 2021-06-14 21:51:26 UTC
It seems like some debug related piece of code is not properly #ifdef DEBUG ... #endif enclosed.
Comment 2 Juraj Lutter freebsd_committer freebsd_triage 2021-06-14 22:30:05 UTC
review D30766

Partially fixed also here: https://github.com/hanslub42/rlwrap/commit/5aa2609a7e4c76f37c721110bcec312d3efa7e2d

but this fix is not complete.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-06-16 22:07:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3ff8b504f192510980184e43f1cbdb9a7514f3e5

commit 3ff8b504f192510980184e43f1cbdb9a7514f3e5
Author:     Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2021-06-16 22:01:40 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2021-06-16 22:05:43 +0000

    devel/rlwrap: Update to 0.45.2

    Bug fixes:
    - rlwrap enables bracketed-paste when instructed to do so by .inputrc,
      but would then never disable it at exit.
    - rlwrap -z (i.e. rlwrap when using a filter) would still open
      /tmp/rlwrap.debug after forking the filter command, preventing other
      users from running it afterwards

    PR:             256569

 devel/rlwrap/Makefile  | 7 +++++--
 devel/rlwrap/distinfo  | 6 +++---
 devel/rlwrap/pkg-plist | 6 +++++-
 3 files changed, 13 insertions(+), 6 deletions(-)
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2021-06-17 07:46:36 UTC
It'd be nice to upstream this change. Julian, would you mind doing that?
Comment 5 Juraj Lutter freebsd_committer freebsd_triage 2021-06-17 08:02:14 UTC
0.45.2 is already fixed in upstream.
Comment 6 Juraj Lutter freebsd_committer freebsd_triage 2021-06-17 08:37:39 UTC
Fixed in upstream version 0.45.2