After using ". tsocks on", a subsequent ". tsocks off" results in sed: 1: "s/\/usr/local\/lib\/lib ...": bad flag in substitute command: '/' It's obvious that the backslash in front of the slash between usr and local is missing. The corresponding line in /usr/local/bin/toscks is 56; adding the missing backslash fixes the error. Thanks, --Christina
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d9f28ee265f94f4bcedb7d24648042ca1325c230 commit d9f28ee265f94f4bcedb7d24648042ca1325c230 Author: Emanuel Haupt <ehaupt@FreeBSD.org> AuthorDate: 2022-11-10 07:40:57 +0000 Commit: Emanuel Haupt <ehaupt@FreeBSD.org> CommitDate: 2022-11-10 07:49:19 +0000 net/tsocks: Fix erroneous substitution When patching the wrapper script for /usr to ${PREFIX} a part in a sed statement gets substituted that should be escaped. Adjust sed statement in a way that it doesn't break after patching ${PREFIX}. While here: - move a REINPLACE_CMD operation to a pre-existing patch file - pacify portclippy - reformat with portfmt PR: 267670 Reported by: chris@mumac.de net/tsocks/Makefile | 24 ++++---- net/tsocks/files/patch-tsocks (new) | 11 ++++ net/tsocks/files/patch-tsocks.c | 118 +++++++++++++++++++++++++++++++++++- 3 files changed, 138 insertions(+), 15 deletions(-)
A commit in branch 2022Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=7315cff722a585625b60e0df07125bdf61963c6a commit 7315cff722a585625b60e0df07125bdf61963c6a Author: Emanuel Haupt <ehaupt@FreeBSD.org> AuthorDate: 2022-11-10 07:40:57 +0000 Commit: Emanuel Haupt <ehaupt@FreeBSD.org> CommitDate: 2022-11-10 07:53:51 +0000 net/tsocks: Fix erroneous substitution When patching the wrapper script for /usr to ${PREFIX} a part in a sed statement gets substituted that should be escaped. Adjust sed statement in a way that it doesn't break after patching ${PREFIX}. While here: - move a REINPLACE_CMD operation to a pre-existing patch file - pacify portclippy - reformat with portfmt PR: 267670 Reported by: chris@mumac.de (cherry picked from commit d9f28ee265f94f4bcedb7d24648042ca1325c230) net/tsocks/Makefile | 24 ++++---- net/tsocks/files/patch-tsocks (new) | 11 ++++ net/tsocks/files/patch-tsocks.c | 118 +++++++++++++++++++++++++++++++++++- 3 files changed, 138 insertions(+), 15 deletions(-)
Thanks a lot for this incredibly fast fix! Do you want me to test the fix? I'll have to clone the ports git repository, first, which seems to take a few minutes...
Thank you for your bug report. I was able to reproduce this 100%. The committed patch solved the issue for me but more feedback is always welcome :-)
Fix committed and merged to quarterly, thanks!