Bug 259053 - www/tclhttpd: not working with tcl 8.6
Summary: www/tclhttpd: not working with tcl 8.6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-10 21:40 UTC by Peter Dean
Modified: 2021-10-23 03:33 UTC (History)
4 users (show)

See Also:
lwhsu: maintainer-feedback? (freebsd-2024)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Dean 2021-10-10 21:40:16 UTC
This was discussed on comp.lang.tcl in 2014
Simple fix in last post of thread
https://groups.google.com/g/comp.lang.tcl/c/ov4bq__nEfM
Comment 1 Peter Dean 2021-10-22 22:56:19 UTC
Is someone looking into this yet?
Comment 2 Peter Dean 2021-10-22 23:04:39 UTC
The fix for 8.6.x is trivial (note that this below does not 'check' for
8.6.x first):

  --- tclhttpd3.5.1/lib/config.tcl.orig   2000-08-02 03:06:52.000000000 -0400
  +++ tclhttpd3.5.1/lib/config.tcl        2016-06-05 14:51:18.000000000 -0400
  @@ -52,6 +52,9 @@
   
       set i [interp create -safe]
       interp expose $i file
  +    foreach subcommand {isdirectory exists dirname} {
  +      interp alias $i ::tcl::file::$subcommand {} file $subcommand
  +    }
   
       # Create the slave's Config array, then source the config script
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-10-23 03:31:58 UTC
A commit in branch main references this bug:

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

commit d3d311b045cc0dc9a10f76f65a77a508b5dc4f63
Author:     Mikhail Teterin <mi@FreeBSD.org>
AuthorDate: 2021-10-23 03:25:14 +0000
Commit:     Mikhail Teterin <mi@FreeBSD.org>
CommitDate: 2021-10-23 03:25:14 +0000

    www/tclhttpd: Add a patch to work with newer Tcl (8.6+)

    The subcommands of file(n) aren't available in safe interpreters.

    Bump PORTREVISION.

    PR:     259053
    Submitted by: Peter Dean

 www/tclhttpd/Makefile                          |  2 +-
 www/tclhttpd/files/patch-lib__config.tcl (new) | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)