Hi all,
I'm writing to propose an enhancement for screen.
The proposed enhancement is to make screen a "literate executable" capable
of outputting its own source code tarball. Literate executables carry
around all of their own source code (and documentation, and whatever else
the tarball contains), making it easy for users to scrutinize the exact
source corresponding to the executable on their $PATH. A recent paper
explains how to make any C/C++ program literate, expands on the advantages
of literate executables, and literate-izes the GNU grep utility as an
example:
https://dl.acm.org/doi/10.1145/3570938I am working with the paper's author (Kelly) and we have spoken with
Alexander Naumov about this. We have developed a way to transform the
current master branch of screen into a literate executable that dumps its
own source tarball on demand.
Adding this feature is straightforward. We're attaching an
easy-to-understand recipe that illustrates one way to do it. The basic
idea is to transform an "illiterate" tarball (call it "t1") into a
literate one ("t2"); t2 builds a literate screen executable that can dump
t2 to stdout. Our attached example starts with a t1 (screen-5.0.1.tar.gz)
created from the git master branch a few weeks ago. Running the
"literatize.csh" script transforms t1 into a literate t2, which is then
tested in /tmp/ to confirm that t2 can build an executable that emits t2
on demand. The literatize script will end with a hint about how to
extract the manpage from the executable. We ran our tests on Linux
Fedora. Can you run "literatize.csh" and confirm that it reports success?
Try getting the manpage from the executable, too.
If you folks like the basic idea, we could create a tidy git branch with
literacy "baked in," thus eliminating the need for the top-level
literatize script. One unconventional aspect of the process is that a
tarball must be created that is then embedded into the executable
immediately after the executable is linked. If you have any guidelines or
suggestions for how best to do this, please advise. First, please kick the
tires & let us know how it goes.
Thanks!
Best regards,