System.Data.SQLite
Check-in [c0130ce3d6]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Pickup more release archive verification tool changes from upstream.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c0130ce3d6b7c11437e9ac7909eca77bf1fe6570
User & Date: mistachkin 2018-06-24 21:52:01
Context
2018-07-01
19:17
Adjust some conditional compilation checks in order to include .NET Core. check-in: e6b998e04a user: mistachkin tags: trunk
2018-06-24
21:52
Pickup more release archive verification tool changes from upstream. check-in: c0130ce3d6 user: mistachkin tags: trunk
03:23
Remove accidental debugging change leftover from the previous check-in. check-in: 566f1e9d23 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Setup/verify.eagle.

    72     72   
    73     73     if {[regexp -- {[0-9a-f]{64}} $hash]} then {
    74     74       return $hash
    75     75     }
    76     76   
    77     77     return ""
    78     78   }
           79  +
           80  +proc getInnoSetupRootMap {} {
           81  +  return [list app\\ [appendArgs {{app}} \\] tmp\\ [appendArgs {{tmp}} \\]]
           82  +}
    79     83   
    80     84   proc getExecCommandPrefix {} {
    81     85     return [list exec -success Success -nocarriagereturns --]
    82     86   }
    83     87   
    84     88   proc combineErrors { error1 error2 } {
    85     89     return [appendArgs \n\n $error1 \n $error2 \n]
................................................................................
   329    333               \"%fileName%\" -d \"%directory%\"
   330    334         }
   331    335   
   332    336         set extractCommand(2) [list error "no fallback extract command"]
   333    337       } elseif {[file extension $archiveFileName] eq ".exe" && \
   334    338           [string match -nocase *Setup*.exe $manifest]} then {
   335    339         #
   336         -      # HACK: Assume this is an Inno Setup package and process
   337         -      #       it using one of the appropriate tools, which are
   338         -      #       currently limited to "innounp" or "innoextract".
          340  +      # HACK: There is some special handling needed for dealing with
          341  +      #       setup packages, which are currently always created with
          342  +      #       the Inno Setup tool.  The two tools that can be used to
          343  +      #       verify the contents of these packages are "innounp" and
          344  +      #       "innoextract".  Since this archive file name looks like
          345  +      #       one that contains a setup package, assume that it is.
   339    346         #
   340    347         set listCommand(1) [getExecCommandPrefix]
   341    348   
   342    349         if {[lindex $listCommand(1) 0] ne "error"} then {
   343    350           lappend listCommand(1) $innounp -v \
   344    351               [file nativename $archiveFileName]
   345    352         }
................................................................................
   390    397   
   391    398         set extractCommand(2) [list error "no fallback extract command"]
   392    399       }
   393    400   
   394    401       if {[catch {
   395    402         set data [eval $listCommand(1)]
   396    403       } error1] == 0 || [catch {
   397         -      #
   398         -      # NOTE: The "innoextract" tool does not use the curly
   399         -      #       braces around the "{app}" directory name.
   400         -      #
   401         -      set data [string map [list \
   402         -          app\\ [appendArgs {{app}} \\] tmp\\ [appendArgs {{tmp}} \\]] \
   403         -          [eval $listCommand(2)]]
          404  +      set data [eval $listCommand(2)]
          405  +
          406  +      if {$isSetup} then {
          407  +        #
          408  +        # HACK: The "innoextract" tool does not use the curly
          409  +        #       braces around the "{app}"-style directory names.
          410  +        #
          411  +        set data [string map [getInnoSetupRootMap] $data]
          412  +      }
   404    413       } error2] == 0} then {
   405    414         #
   406    415         # HACK: The Inno Setup unpacking tool requires some extra
   407    416         #       parsing logic to handle the output.
   408    417         #
   409    418         set containedFileNames [list]
   410    419   
................................................................................
   509    518                 set extractCommandMap [list \
   510    519                     %fileName% [file nativename $manifestFileName] \
   511    520                     %directory% [file nativename $extractDirectory]]
   512    521   
   513    522                 set data [eval \
   514    523                     [string map $extractCommandMap $extractCommand(1)]]
   515    524               } error1] == 0 || [catch {
   516         -              #
   517         -              # NOTE: The "innoextract" tool does not use the curly
   518         -              #       braces around the "{app}" directory name.
   519         -              #
   520         -              set extractCommandMap [list \
   521         -                  %fileName% [file nativename [string map [list \
   522         -                  [appendArgs {{app}} \\] app\\ [appendArgs {{tmp}} \
   523         -                  \\] tmp\\] $manifestFileName]] %directory% [file \
   524         -                  nativename $extractDirectory]]
          525  +              if {$isSetup} then {
          526  +                #
          527  +                # HACK: The "innoextract" tool does not use the curly
          528  +                #       braces around the "{app}"-style directory names.
          529  +                #
          530  +                set altManifestFileName [string map [getInnoSetupRootMap] \
          531  +                    $manifestFileName]
          532  +
          533  +                set extractCommandMap [list \
          534  +                    %fileName% [file nativename $altManifestFileName] \
          535  +                    %directory% [file nativename $extractDirectory]]
          536  +
          537  +                #
          538  +                # HACK: The "innoextract" tool uses the full manifest
          539  +                #       file name when writing the extracted file, so
          540  +                #       adjust the extracted file name to match it;
          541  +                #       however, first verify that the path type of
          542  +                #       the manifest file name is relative.
          543  +                #
          544  +                if {[file pathtype $altManifestFileName] eq "relative"} then {
          545  +                  set extractFileName [file normalize [file join \
          546  +                      $extractDirectory $altManifestFileName]]
          547  +
          548  +                  catch {
          549  +                    file attributes $extractFileName -readonly false
          550  +                    file delete $extractFileName
          551  +                  }
          552  +                } else {
          553  +                  error [appendArgs \
          554  +                      "path type for manifest file name \"" \
          555  +                      $altManifestFileName "\" is not relative"]
          556  +                }
          557  +              } else {
          558  +                set extractCommandMap [list \
          559  +                    %fileName% [file nativename $manifestFileName] \
          560  +                    %directory% [file nativename $extractDirectory]]
          561  +              }
   525    562   
   526    563                 set data [eval \
   527    564                     [string map $extractCommandMap $extractCommand(2)]]
   528    565               } error2] == 0} then {
   529    566                 if {[string length $hashes($manifestFileName)] == 64} then {
   530    567                   set hash [getSha3Sum $extractFileName]
   531    568                 } else {