Overview
Comment: | The 'probeForOpenPgpInstallation' procedure should check all names in 'openPgpFileNamesOnly'. Also, the 'probeForOpenPgpInstallation' procedure should recognize the new directory layout used by Windows GPG installations. The 'setupRepositoryOpenPgpVars' procedure should honor its 'force' argument. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | pending |
Files: | files | file ages | folders |
SHA1: |
071382dcf87bebebb5e860bdde74ec63 |
User & Date: | mistachkin on 2020-03-24 23:23:48 |
Other Links: | branch diff | manifest | tags |
Context
2020-03-24
| ||
23:46 | More fixes to the 'probeForOpenPgpInstallation' procedure. check-in: 3982962147 user: mistachkin tags: pending | |
23:23 | The 'probeForOpenPgpInstallation' procedure should check all names in 'openPgpFileNamesOnly'. Also, the 'probeForOpenPgpInstallation' procedure should recognize the new directory layout used by Windows GPG installations. The 'setupRepositoryOpenPgpVars' procedure should honor its 'force' argument. check-in: 071382dcf8 user: mistachkin tags: pending | |
2019-12-02
| ||
22:06 | Fix typos in the Harpy 'sign' tool. check-in: b2ec485564 user: mistachkin tags: trunk | |
Changes
Modified client/1.0/neutral/pkgr.eagle from [8f2d9374a1] to [03e073f23d].
︙ | ︙ | |||
415 416 417 418 419 420 421 | # OpenPGP installation directory was successfully detected and added # to the PATH -OR- detecting and adding it was not necessary because # it already appeared to be available for use. # # <internal> proc probeForOpenPgpInstallation {} { global env | | | | | | > > > | | | | | < < | | | | > > > | 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | # OpenPGP installation directory was successfully detected and added # to the PATH -OR- detecting and adding it was not necessary because # it already appeared to be available for use. # # <internal> proc probeForOpenPgpInstallation {} { global env variable openPgpFileNamesOnly variable openPgpInstalledDirectories if {[catch {openPgpMustBeInstalled}] == 0} then { return true } if {![info exists openPgpFileNamesOnly]} then { return false } if {![info exists openPgpInstalledDirectories]} then { return false } 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 } } foreach directory $openPgpInstalledDirectories { if {[isWindows]} then { set subDirectory [file join $programFiles $directory] } else { set subDirectory $directory } if {[file isdirectory $subDirectory]} then { foreach fileNameOnly $openPgpFileNamesOnly { set fileName [file join $subDirectory $fileNameOnly] if {[file exists $fileName] && [file isfile $fileName]} then { return [addToPath $subDirectory] } } } } return false } # # NOTE: This procedure attempts to verify that a configured implementation |
︙ | ︙ | |||
2296 2297 2298 2299 2300 2301 2302 | # proc setupRepositoryOpenPgpVars { force } { # # 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. # | | | | > | > | | | | | | | | 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 | # proc setupRepositoryOpenPgpVars { force } { # # 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 openPgpInstalledDirectories; # DEFAULT: [list ...] if {$force || ![info exists openPgpInstalledDirectories]} then { if {[isWindows]} then { set openPgpInstalledDirectories [list \ [file join gnupg] [file join GNU GnuPG]] } else { set openPgpInstalledDirectories [list \ [file join / usr bin]] } } # # NOTE: These are the candidate names of the executable file used to # invoke the OpenPGP implementation, possibly without a file # extension. # variable openPgpFileNamesOnly; # DEFAULT: [list gpg2 gpg] if {$force || ![info exists openPgpFileNamesOnly]} then { if {[isWindows]} then { set openPgpFileNamesOnly [list gpg2.exe gpg.exe] } else { set openPgpFileNamesOnly [list gpg2 gpg] } } # # NOTE: This is the name of the executable file used to invoke the # OpenPGP implementation, possibly without a file extension. # variable openPgpFileNameOnly; # DEFAULT: <unset> # # 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 if {$force || ![info exists openPgpImportCommand]} then { set openPgpImportCommand \ {{${openPgpFileNameOnly}} --import {${fileName}}} } # # NOTE: The regular expression pattern used when attempting to verify # that OpenPGP successfully imported one or more keys. This must # be configured according to the implementation of OpenPGP in use. # variable openPgpImportPattern; # DEFAULT: ^gpg: Total number processed... if {$force || ![info exists openPgpImportPattern]} then { set openPgpImportPattern {^gpg: Total number processed: [1-9]\d*$} } # # NOTE: The command to use when attempting to verify that OpenPGP is # installed locally. This must be configured according to the # implementation of OpenPGP in use. # variable openPgpInstalledCommand; # DEFAULT: gpg2 --version --homedir {} if {$force || ![info exists openPgpInstalledCommand]} then { set openPgpInstalledCommand {{${fileName}} --version --homedir {}} } # # NOTE: The regular expression pattern used when attempting to verify # that OpenPGP is installed locally. This must be configured # according to the implementation of OpenPGP in use. # variable openPgpInstalledPattern; # DEFAULT: ^gpg \(GnuPG\) 2\.[0123]\. if {$force || ![info exists openPgpInstalledPattern]} then { set openPgpInstalledPattern {^gpg \(GnuPG\) 2\.[0123]\.} } # # NOTE: The command to use when verifying OpenPGP signatures for the # downloaded package scripts. This must be configured according # to the implementation of OpenPGP in use. # variable openPgpVerifyCommand; # DEFAULT: gpg2 --verify {${fileName}} if {$force || ![info exists openPgpVerifyCommand]} then { set openPgpVerifyCommand \ {{${openPgpFileNameOnly}} --verify {${fileName}}} } # # NOTE: The command to use when creating OpenPGP signatures for the # downloaded package scripts. This must be configured according # to the implementation of OpenPGP in use. # variable openPgpSignCommand; # DEFAULT: gpg2 --detach-sign ... if {$force || ![info exists openPgpSignCommand]} then { set openPgpSignCommand "" append openPgpSignCommand \ {{${openPgpFileNameOnly}} --detach-sign --armor} append openPgpSignCommand \ { --passphrase-file [formatExecArgument [getOpenPgpPassphraseFile]]} |
︙ | ︙ |