Overview
Comment: | Add initial draft of the package downloader tool. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
878f88907519fbb3a997775eb73518bb |
User & Date: | mistachkin on 2016-08-16 03:10:41 |
Other Links: | manifest | tags |
Context
2016-08-16
| ||
21:35 | Add preliminary support for package scripts that have a PGP signature instead of a Harpy certificate. check-in: 4335ea0899 user: mistachkin tags: trunk | |
03:10 | Add initial draft of the package downloader tool. check-in: 878f889075 user: mistachkin tags: trunk | |
2016-08-15
| ||
22:18 | Coding style corrections. check-in: 509edf2c46 user: mistachkin tags: trunk | |
Changes
Modified client/pkgIndex.eagle from [3790f29011] to [75bee73b20].
︙ | ︙ | |||
15 16 17 18 19 20 21 | ############################################################################### if {![package vsatisfies [package provide Tcl] 8.4]} {return} if {![package vsatisfies [package provide Eagle] 1.0]} {return} package ifneeded Eagle.Package.Repository 1.0 \ [list source [file join $dir pkgr.eagle]] | > > > | 15 16 17 18 19 20 21 22 23 24 | ############################################################################### if {![package vsatisfies [package provide Tcl] 8.4]} {return} if {![package vsatisfies [package provide Eagle] 1.0]} {return} package ifneeded Eagle.Package.Repository 1.0 \ [list source [file join $dir pkgr.eagle]] package ifneeded Eagle.Package.Downloader 1.0 \ [list source [file join $dir pkgd.eagle]] |
Modified client/pkgIndex.eagle.harpy from [50c972f469] to [ff5ac87783].
︙ | ︙ | |||
17 18 19 20 21 22 23 | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> | | | | | | | | | | | | | | | | | | | | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> <Id>b0129e44-3b2c-42b0-a71f-1c07aa16afd2</Id> <HashAlgorithm>SHA512</HashAlgorithm> <EntityType>Script</EntityType> <TimeStamp>2016-08-16T02:51:50.7605000Z</TimeStamp> <Duration>-1.00:00:00</Duration> <Key>0x2c322765603b5278</Key> <Signature> nF615q+lJascFI+duD9pIrNyquMbrsLaX1Za3HFLitpOmFxsTcj+cKQ6d5y48SHsN6OlU4DMbyJX egCciqoZqk8SEnkD6WgFjD+oKWQRsaRMnbmI3MmZOP/z1jSff6FeLwQQkDlkV9hhJRTo/rBBS6Vu hfTmX7eVy4Uy+ifV8/i9T+/9dfS8DTifSWq1+6YSJuhETNDCmjnBxT+SrHeOdSZE0n65SPlb6Fde yzVVPp/DfsA3cP3q9pMHDENyueXKAz0yXjunKJAXiGM1NNDLKkJ9YKpIxb4yV/uGMduK9KIy9hkQ PlQQpn0Eh+fWst+DZlTl1PTL6sc9WJf9GSoAnNERIYvwA6z8eqRgRfXRhAsTEa+Om76Nt5so2Prz jtUP39UldpoXhq87H2I4NkJfngcx0x3Jybv25nwMygQv0paXWAlaEFN49atMLXYO6F85ghi8dmps zCY6O06FjnyI43RkBUYIvuDyU1q9HjVZbKiHr0YoFVhBCZDZp/lcxucIYG2sXpX5YKDT09WPMiUz 1r/TO286Y2kJyzmgJMMjRmqTmOID6nTRSjvPSQCyFikJ8tCIWA78IiI2+/539J99VYfNmJoPRq3j sBJ0IERsQCrp7baZkPiF/vzGEIScXtqAsxOKbep4oLEMt8mBmLOONkAwfo+mjjvtUy5s2ZYdnqQJ 8EUbAKF7pRcgu7+w8LVMnGJr+dh5iJG0U8J6P2yrSeu+PRKr+aiX41/w1vJLRXZEljdqQ7PoIdPt vsgFY+HoWs0pydJDcReMQDQtNczgn+88gv0IH5YL+7bp91yMqABR4RL7wekVv9IHSt2Da3l884Zn WWb7Xso51BdH79a4zlSwHbbetu297ScvsmiNzCnyNYVa22Dx6UrVTl5OMao8219HJkjYlsXSkmQq IZQwQXcutbp+alQ3v/uZMytujpL4+2wldzAFCuKWEzTOoBcroxnWfrFY80XyLmGODWU0j1Np+iJC TAnErZYhU74BXFFHuRTLjjWhOqADSdCHk1K1zgs27k1uL6maIYU0wyYc4r/KuI+zKQ13JPYcauND L1fTB6DTropeAZIZxlJAhZGadgs3UX8yx7JHIHgJQz4LjxCcRpxwvbz+o2PVcHoav9YJOLOzhfHK 2+/XSxTalaF+XetBz2fDBYosj/JY61zy3YJPnaq/pc5r7TCDwF/hHPrAUZh84aMjsDNcOkU6DJSU 0ykiZeFDm/A7XxVWANeBbfgci1UgK5VCdJr4A8kFDzwBWj+u1Q3bxmYxTJurpXBC/LRNh5s1/30B KrG8eRNO4JlCGJbCqrgdVVF8gGa/MvuVKvsC2BWLtNsmVf2BUt3wkQEXxLtQdjv3yDMzxtBtTQ== </Signature> </Certificate> |
Modified client/pkgIndex.tcl from [75024466f9] to [f9bf6ed786].
︙ | ︙ | |||
15 16 17 18 19 20 21 | ############################################################################### if {![package vsatisfies [package provide Tcl] 8.4]} {return} if {[string length [package provide Eagle]] > 0} then {return} package ifneeded Eagle.Package.Repository 1.0 \ [list source [file join $dir pkgr.eagle]] | > > > | 15 16 17 18 19 20 21 22 23 24 | ############################################################################### if {![package vsatisfies [package provide Tcl] 8.4]} {return} if {[string length [package provide Eagle]] > 0} then {return} package ifneeded Eagle.Package.Repository 1.0 \ [list source [file join $dir pkgr.eagle]] package ifneeded Eagle.Package.Downloader 1.0 \ [list source [file join $dir pkgd.eagle]] |
Modified client/pkgIndex.tcl.harpy from [e08d6f044c] to [50732b21e2].
︙ | ︙ | |||
17 18 19 20 21 22 23 | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> | | | | | | | | | | | | | | | | | | | | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> <Id>69ca970a-0c3d-447a-91cf-44fed99731ee</Id> <HashAlgorithm>SHA512</HashAlgorithm> <EntityType>Script</EntityType> <TimeStamp>2016-08-16T02:54:51.9323750Z</TimeStamp> <Duration>-1.00:00:00</Duration> <Key>0x2c322765603b5278</Key> <Signature> HjolMDm2KhyxiFYnQ7OlS81iIPJnyriCCNo4ATggqUhZP1ag2J7e7j4EHbit8RSgAYuPUnT3SFQH yOxLq410LfAGS0p+jTfua7JwfeXIBOGf5zbOADM79TS9iTI0qSyqHBrvSmHBhsyoPxrGs07wcrpe hKYneaf+j9rjJpVL0bUasIEsBtoVhXUXEubuLuiLclcCT5w/VoHHa5IP6ogNdch2zPYv1wT0Vmo4 RO3wHzvcMwCmyj0cV9z6QxoSVgmlHDRnODXRJP4kY+nzWsEkGlNy+Gy21qjL8h8fk+CWWU/AnqhC M4VR4fJJYlfKBXFipq6SKCWe3dQV3skkE/ETVqPoTNW3I1/UcrH7CGZiWgCPoPGKFT1uVZt0aw5y 9J9B1nuzNTxrPlyr3IM1UY91MBxyVO4sPUhvBYkhv36/CuWj7Nixlh9Mu7MyTGquj99l7K5/gThH VkThdOn/Vn3+7X+8OfB6aDJmQotZzu1bqvywCqrtu/DbwE0QNRI/4VbVunZilAE0ULwwAEsCVqOQ itILH2X2XVvNLFfRjK9BCVovyrzzmAj7bzj+furph1YY4XZmEDn/Sk+xbnHQencqAFjracL4kpOs gZ7FaGgXcAuk8LmCfVD0HWGLiVVGMVMON35lu6FUfjiFkEZTuE104/ijZUce2KxWYQfbSwrv/Ywu hUPSDRXnmaZwwYNSYVkR6zGinmWibVRWLWP6hLy0rf2xxU5bbRDhLddHoOVLdIV0s6SRMS87z1y4 I7mNnql6OVVl55O/Ro/GQgIkp2+gaMkef9/FDGS6jMufZA6EuCEJD0yraARofd100tjnln3EVa/r tn0ggpaqEXyXlqv9plG9PONcjPbBp+/zPnfihOuzUEsxgi+mkoxmSQh9UWQ9ELdgrL0m9zoVr5IV jdyHqWkAIoVM4ILN7ORsRTIKGqxqHxSiier0ySvgjaPFxd7M1uzaAuvFeCjMx74XCmsDFGEHbI49 jc++8u+rA+ZvCVL6nhv64QgP3ce4PYznUDhSDHkLGstaw5JOibPTgiUGvyPTFVJE1cwSmYUe6KuQ 2oeD1DKFs4/U0n902tq2aly5H7plz4NLuV5kUy1EWCANQFi2A1LX0xMoztHdSagmdmvykIronkbP kAawsH99A9ukY1Er09bw6WDMUX6aACZQw++/e0eQs/0hkWX7o+rFFQMgEbRz5g5q7+pXVkDd1T9x WTHAMsXWaaDeB0hcA53HkB92APDnrUi04+YOu5F1Eh0+lIi7GA+Y5fFcItVaXzuog9bUIzUAvuPh FJGnCHXQ+gKP2/Y6c2Kd/3+O8vHPUNwbQfH4vONk4j4WANYU7oqYczSkxejI7/FJ0qGO2pueoA== </Signature> </Certificate> |
Added client/pkgd.eagle version [1ba0f38394].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | ############################################################################### # # pkgd.eagle -- # # Extensible Adaptable Generalized Logic Engine (Eagle) # Package Downloader Client # # Copyright (c) 2007-2012 by Joe Mistachkin. All rights reserved. # # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: $ # ############################################################################### # # NOTE: Use our own namespace here because even though we do not directly # support namespaces ourselves, we do not want to pollute the global # namespace if this script actually ends up being evaluated in Tcl. # namespace eval ::PackageDownloader { proc setupDownloadVars {} { # # NOTE: Prevent progress messages from being displayed while downloading # from the repository, etc? By default, this is enabled. # variable quiet; # DEFAULT: true if {![info exists quiet]} then { set quiet true } # # NOTE: The base URI for the package distribution web site. # variable baseUri; # DEFAULT: https://urn.to/r/pkgr if {![info exists baseUri]} then { set baseUri https://urn.to/r/pkgr } # # NOTE: The URI where a single package file may be found. This file will # belong to a specific version of one package. # variable downloadUri; # DEFAULT: ${baseUri}?...&filename=${fileName} if {![info exists downloadUri]} then { set downloadUri {${baseUri}?download&ci=trunk&filename=${fileName}} } # # NOTE: The root directory where any persistent packages will be saved. # variable persistentDirectory; # DEFAULT: [getPersistentRootDirectory] if {![info exists persistentDirectory]} then { set persistentDirectory [getPersistentRootDirectory] } } proc getPersistentRootDirectory {} { # # NOTE: Return a directory parallel to the one containing the library # directory. # return [file join [file dirname [info library]] pkgr] } proc addToAutoPath { language directory } { # # NOTE: Add the specified directory to the auto-path if not already # present. # if {[string length $language] == 0 || $language eq "eagle"} then { if {[isEagle]} then { if {![info exists ::auto_path] || \ [lsearch -exact $::auto_path $directory] == -1} then { lappend ::auto_path $directory } } else { ::PackageRepository::eagleMustBeReady eagle [string map [list %directory% $directory] { if {![info exists ::auto_path] || \ [lsearch -exact $::auto_path {%directory%}] == -1} then { lappend ::auto_path {%directory%} } }] } } elseif {$language eq "tcl"} then { if {[isEagle]} then { tcl eval [tcl master] [string map [list %directory% $directory] { if {![info exists ::auto_path] || \ [lsearch -exact $::auto_path {%directory%}] == -1} then { lappend ::auto_path {%directory%} } }] } else { if {![info exists ::auto_path] || \ [lsearch -exact $::auto_path $directory] == -1} then { lappend ::auto_path $directory } } } else { error "unsupported language, no idea how to modify auto-path" } } proc downloadFiles { language version fileNames persistent } { variable baseUri variable downloadUri variable persistentDirectory variable quiet if {$persistent} then { set downloadRootDirectory [file join $persistentDirectory] } elseif {[info exists ::env(PKGD_TEMP)]} then { set downloadRootDirectory [file join $::env(PKGD_TEMP) pkgr] } elseif {[info exists ::env(TEMP)]} then { set downloadRootDirectory [file join $::env(TEMP) pkgr] } elseif {[info exists ::env(TMP)]} then { set downloadRootDirectory [file join $::env(TMP) pkgr] } else { error "please set PKGD_TEMP (via environment) to temporary directory" } set downloadDirectories [list] foreach fileName $fileNames { if {[string length $fileName] == 0 || \ [file pathtype $fileName] ne "relative"} then { error [appendArgs \ "bad file name \"" $fileName "\", not relative"] } set directoryParts [file split [file dirname $fileName]] if {[llength $directoryParts] == 0} then { error [appendArgs \ "bad file name \"" $fileName "\", no directory parts"] } set downloadDirectory [eval file join \ [list $downloadRootDirectory] $directoryParts] set downloadFileName [file join $downloadDirectory \ [file tail $fileName]] if {!$persistent} then { catch {file delete $downloadFileName} } file mkdir [file dirname $downloadFileName] set fileName [file join $language $version $fileName] set uri [subst $downloadUri] if {[isEagle]} then { writeFile $downloadFileName [interp readorgetscriptfile -- "" $uri] } else { writeFile $downloadFileName [::PackageRepository::getFileViaHttp \ $uri 10 stdout $quiet] } lappend downloadDirectories [file dirname $downloadDirectory] } set downloadDirectories [lsort -unique $downloadDirectories] foreach downloadDirectory $downloadDirectories { addToAutoPath $language $downloadDirectory } } # # NOTE: Setup the variables, within this namespace, used by this script. # setupDownloadVars # # NOTE: This package requires the package repository client package. # package require Eagle.Package.Repository # # NOTE: Provide the package to the interpreter. # package provide Eagle.Package.Downloader \ [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}] } |
Added client/pkgd.eagle.harpy version [f0343c3c56].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | <?xml version="1.0" encoding="utf-8"?> <!-- Eagle Enterprise Edition Script Certificate The format of this file is proprietary and may not be reverse engineered. This certificate file is subject to the terms of the license agreement located at: https://eagle.to/enterprise/license.html By using this file and/or the associated software, you agree to abide by the terms of the license agreement. PLEASE DO NOT EDIT THIS FILE. THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> <Id>06b76c33-0e3b-4120-8142-0053f4d17521</Id> <HashAlgorithm>SHA512</HashAlgorithm> <EntityType>Script</EntityType> <TimeStamp>2016-08-16T02:50:58.2761250Z</TimeStamp> <Duration>-1.00:00:00</Duration> <Key>0x2c322765603b5278</Key> <Signature> VsQxIv0pQbKwapByuSpDz4HcbTBrr+U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