Diff
Not logged in

Differences From Artifact [3a5d78ded9]:

To Artifact [5fb6967b0e]:


272
273
274
275
276
277
278










































279
280
281
282
283
284
285
        }

        incr counter
      }
    }
  }











































  #
  # NOTE: This procedure attempts to verify that a configured implementation
  #       of OpenPGP is installed locally.  There are no arguments.  Script
  #       errors are raised if any problems are found.  The return value is
  #       undefined.
  #
  # <public>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
        }

        incr counter
      }
    }
  }

  #
  # NOTE: This procedure attempts to check for the configured installation of
  #       OpenPGP.  There are no arguments.  Non-zero is returned if OpenPGP
  #       appears to be installed.
  #
  # <public>
  proc probeForOpenPgpInstallation {} {
    global env
    variable openPgpInstalledDirectory
    variable openPgpInstalledFileName

    if {[catch {openPgpMustBeInstalled}] == 0} then {
      return true
    }

    if {[isWindows]} then {
      if {[info exists env(ProgramFiles(x86))]} then {
        set programFiles $env(ProgramFiles\(x86\))
      } elseif {[info exists env(ProgramFiles)]} then {
        set programFiles $env(ProgramFiles)
      } else {
        return false
      }

      set directory [file join $programFiles $openPgpInstalledDirectory]
    } else {
      set directory $openPgpInstalledDirectory
    }

    if {![file isdirectory $directory]} then {
      return false
    }

    set fileName [file join $directory $openPgpInstalledFileName]

    if {[file exists $fileName] && [file isfile $fileName]} then {
      return [addToPath $directory]
    }

    return false
  }

  #
  # NOTE: This procedure attempts to verify that a configured implementation
  #       of OpenPGP is installed locally.  There are no arguments.  Script
  #       errors are raised if any problems are found.  The return value is
  #       undefined.
  #
  # <public>
1265
1266
1267
1268
1269
1270
1271

1272
1273
1274
1275
1276
1277
1278
          writeFile $fileName(2) $metadata(certificate)
        }

        #
        # NOTE: Attempt to verify the OpenPGP signature for the package
        #       script.
        #

        openPgpMustBeInstalled

        if {[verifyOpenPgpSignature $fileName(2)]} then {
          #
          # NOTE: Delete the temporary files that we created for the
          #       OpenPGP signature verification.
          #







>







1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
          writeFile $fileName(2) $metadata(certificate)
        }

        #
        # NOTE: Attempt to verify the OpenPGP signature for the package
        #       script.
        #
        probeForOpenPgpInstallation
        openPgpMustBeInstalled

        if {[verifyOpenPgpSignature $fileName(2)]} then {
          #
          # NOTE: Delete the temporary files that we created for the
          #       OpenPGP signature verification.
          #
1817
1818
1819
1820
1821
1822
1823

























1824
1825
1826
1827
1828
1829
1830
      if {![isEagle] && \
          [llength [package versions Garuda]] > 0} then {
        set autoRequireGaruda true
      } else {
        set autoRequireGaruda false
      }
    }


























    #
    # NOTE: The command to use when attempting to import an OpenPGP key
    #       file.  This must be configured according to the implementation
    #       of OpenPGP in use.
    #
    variable openPgpImportCommand; # DEFAULT: gpg2 --import







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
      if {![isEagle] && \
          [llength [package versions Garuda]] > 0} then {
        set autoRequireGaruda true
      } else {
        set autoRequireGaruda false
      }
    }

    #
    # NOTE: This is the name of the sub-directory containing the OpenPGP
    #       implementation.  It is platform-specific.  On Windows, this
    #       sub-directory is relative to the "Program Files" directory.
    #
    variable openPgpInstalledDirectory; # DEFAULT: [file join GNU GnuPG]

    if {![info exists openPgpInstalledDirectory]} then {
      if {[isWindows]} then {
        set openPgpInstalledDirectory [file join GNU GnuPG]
      } else {
        set openPgpInstalledDirectory [file join / usr bin]
      }
    }

    #
    # NOTE: This is the name of the executable file used to invoke the
    #       OpenPGP implementation, without an extension.
    #
    variable openPgpInstalledFileName; # DEFAULT: gpg2

    if {![info exists openPgpInstalledFileName]} then {
      set openPgpInstalledFileName gpg2
    }

    #
    # NOTE: The command to use when attempting to import an OpenPGP key
    #       file.  This must be configured according to the implementation
    #       of OpenPGP in use.
    #
    variable openPgpImportCommand; # DEFAULT: gpg2 --import