Overview
| Artifact ID: | bee40305b457a2d1b41868b3068a00a86bca00e421a123753446b5675c3b7e51 |
|---|---|
| Ticket: | fc65ff1b663fd16e7582c34164acbd670514deed
zipfs mkimg fails for statically built tclsh |
| User & Date: | jan.nijtmans on 2021-09-01 13:52:52 |
Changes
- assignee changed to: "jan.nijtmans"
- icomment:
Thank you for this work! I tested it, and it is an improvement although it doesn't fully work as expected. After doing a "configure --disable-shared", let's look at the resulting tclsh: <pre> $ unzip -l tclsh |head Archive: tclsh Length Date Time Name --------- ---------- ----- ---- 0 09-01-2021 15:01 tcl_library/ 4593 08-27-2021 09:10 tcl_library/word.tcl 0 12-23-2020 15:04 tcl_library/tcltest/ 104142 08-27-2021 09:10 tcl_library/tcltest/tcltest.tcl 611 08-27-2021 09:10 tcl_library/tcltest/pkgIndex.tcl 11808 08-27-2021 09:10 tcl_library/tm.tcl 128876 08-27-2021 09:10 tcl_library/clock.tcl </pre> Then, let's see what "zipfs mkimg" does: <pre> $ ./tclsh % zipfs mkimg tclsh /Users/jan/workspace/tcl8.7/unix/libtcl.vfs /Users/jan/workspace/tcl8.7/unix/libtcl.vfs % exit $ unzip -l tclsh |head warning [tclsh]: 2770069 extra bytes at beginning or within zipfile (attempting to process anyway) Archive: tclsh Length Date Time Name --------- ---------- ----- ---- 22902 09-01-2021 14:57 tcl_library/auto.tcl 128876 08-27-2021 09:10 tcl_library/clock.tcl 21329 09-01-2021 14:57 tcl_library/cookiejar/cookiejar.tcl 7458 08-27-2021 09:10 tcl_library/cookiejar/idna.tcl 214 08-27-2021 09:10 tcl_library/cookiejar/pkgIndex.tcl 70835 08-27-2021 09:10 tcl_library/cookiejar/public_suffix_list.dat.gz 1090 06-28-2021 17:33 tcl_library/encoding/ascii.enc </pre> The warning tells us that all offsets in the file are relative to the zipfile start, not the file start. No problem, Tcl (and unzip) can handle that, but it would be better to produce a tclsh which can be handled by other tools without this warning .... Then, I note that "zipfs mkimg" - after your change - just removes the old attached zip and adds a new one. That's better than what it did before, but it means that the content of $tcl_library needs to be packed together with the app, otherwise the app will not be functional. I would prefer "zipfs mkimg" to add/replace new entries, but keep the entries already present. Yeah, I know, "zip" already does this, it's not trivial to build this into "zipfs mkimg" too. But until that's done, I prefer to use "zip" for manipulating the attached zipfile. Anyway, +1 for merging this to core-8-branch. - login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"