Bug#809491: game-data-packager: innoextract support for embedded sha1/md5

Alexandre Detiste alexandre.detiste at gmail.com
Thu Dec 31 10:25:09 UTC 2015


Package: game-data-packager
Version: 43
Severity: wishlist


The InnoSetup format stored SHA1 or MD5 of all files;
maybe this could be used at archive detection phase
without having to unpack everything.

Maybe a pull request against innoextract
for a new '--list' sub-option
could be proposed to make it easier.

That would output
- file size in bytes
- the hash (we can guess from it's length if it is a md5 or sha1)
- file name
... in a machine-readable format, that could be the
same one as used in the yaml files:
- size + n whitepspaces + hash + n whitespace + remainder = name


https://github.com/dscharrer/innoextract/blob/d1102ea5e43c605d119394e9bbe0944cb9d7ffae/src/setup/data.cpp

        if(version >= INNO_VERSION(5, 3, 9)) {
                is.read(file.checksum.sha1,
std::streamsize(sizeof(file.checksum.sha1)));
                file.checksum.type = crypto::SHA1;
        } else if(version >= INNO_VERSION(4, 2, 0)) {
                is.read(file.checksum.md5,
std::streamsize(sizeof(file.checksum.md5)));
                file.checksum.type = crypto::MD5;
        } else if(version >= INNO_VERSION(4, 0, 1)) {
                file.checksum.crc32 = util::load<boost::uint32_t>(is);
                file.checksum.type = crypto::CRC32;
        } else {
                file.checksum.adler32 = util::load<boost::uint32_t>(is);
                file.checksum.type = crypto::Adler32;
        }



-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing'), (450, 'unstable'), (400, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.3.0-1-amd64 (SMP w/6 CPU cores)
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



More information about the Pkg-games-devel mailing list