[EXT] RE: Bad data in tlnet mirror

Reinhard Kotucha reinhard.kotucha at web.de
Sat Nov 30 01:09:17 CET 2019


On 2019-11-29 at 20:59:11 +0000, Philip Taylor wrote:

 > Reinhard Kotucha wrote:
 >
 > > On 2019-11-29 at 14:44:43 +0000, Fransson Mattias wrote:
 > >
 > >   > How can I generate the checksum for a file myself?
 > >
 > >     sha512sum <filename>
 >
 > Not here, Reinhard :
 >
 > > C:\TeX\Live\2019\bin\win32>sha512sum
 > > 'sha512sum' is not recognized as an internal or external command,
 > > operable program or batch file.

Hello Phil,
sha512sum is part of the GNU coreutils package and available on every
Unix system.  On Windows you can either install Cygwin or MinGW/MSYS
if there is no standalone binary available.  Maybe MinGW/MSYS is the
best choice for you.

I just wrote a little Perl script for you, called check_sha512.pl.
It's quite crude, there is no error handling at all and it doesn't
provide any of the nice features of sha512sum.

Installation:

 1. copy the attached file (check_sha512.pl) to texlive/texmf-local/scripts

 2. run mktexlsr

 3. cd texlive/bin/win32

 4. create a wrapper:

     copy /b runscript.exe check_sha512.exe

Here I get:

$ sha512sum gsfonts
8f266db7c8b2f8b4e9e3fd9702d90d91ffe269974ff8e4c234d0a4ac9fd1a2d1884f347659369c2a7699e938fb49514182fcdb6da8a539cb89ce39cf5a177750  gsfonts

$ ./check_sha512.pl gsfonts
8f266db7c8b2f8b4e9e3fd9702d90d91ffe269974ff8e4c234d0a4ac9fd1a2d1884f347659369c2a7699e938fb49514182fcdb6da8a539cb89ce39cf5a177750  gsfonts

There is a significant difference between the GNU coreutils binaries
and whatever can be done with Perl.  The sha*sum programs read the
file data block by data block while Perl loads the complete file into
memory at once.  IMO the latter is unfortunate because it's assumed
that a file is always smaller than the amount of available memory and
wasting memory is not nice on multi-user systems anyway.

Thus I don't see any reason to make my script compatible with the GNU
coreutils.  I wrote it only for you, Phil.  If Akira thinks that the
sha*sum and md5sum programs are useful, it's up to him to decide
whether to provide binaries for Windows or not.  But we shall always
keep in mind that TeX Live is a typesetting system, not an operating
system.

I've almost no experience with Windows.  It might be helpful to have a
package manager for free software on Windows.  Maybe MinGW/MSYS is a
good staring point.  Programs which are not part of MinGW/MSYS can be
downloaded from EZwinports.

Regards,
  Reinhard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_sha512.pl
Type: application/octet-stream
Size: 567 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-live/attachments/20191130/ba5bdd74/attachment-0001.obj>
-------------- next part --------------


--
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------


More information about the tex-live mailing list