Overview
Comment: | Merged in updates from trunk |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | internal_sha1 |
Files: | files | file ages | folders |
SHA1: |
ee9eb7ed98663bc2e73768874fd038e4 |
User & Date: | rkeene on 2014-11-06 00:37:20 |
Other Links: | branch diff | manifest | tags |
Context
2014-11-06
| ||
02:29 | Updated to use C-based implementation of SHA1 Closed-Leaf check-in: 853a9068a7 user: rkeene tags: internal_sha1 | |
00:37 | Merged in updates from trunk check-in: ee9eb7ed98 user: rkeene tags: internal_sha1 | |
2014-11-05
| ||
21:41 | Fixed cleanup issue which was causing excessive lookups check-in: cc5a68a6de user: rkeene tags: trunk | |
2014-11-03
| ||
23:16 | Started work on an internal sha1 implementation check-in: 5ebe069cbf user: rkeene tags: internal_sha1 | |
Changes
Modified Makefile from [fe29eeac49] to [bee1193267].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - - + + | appfsd: appfsd.o $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o appfsd appfsd.o $(LIBS) appfsd.o: appfsd.c appfsd.tcl.h $(CC) $(CPPFLAGS) $(CFLAGS) -o appfsd.o -c appfsd.c |
︙ |
Modified appfsd.c from [e3ba0e89d2] to [72840611b5].
︙ | |||
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 | 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 | + + + + + + + + + + + + + + + + | const char *fmt; }; static Tcl_Interp *appfs_create_TclInterp(const char *cachedir) { Tcl_Interp *interp; int tcl_ret; APPFS_DEBUG("Creating new Tcl interpreter for TID = 0x%llx", (unsigned long long) pthread_self()); interp = Tcl_CreateInterp(); if (interp == NULL) { fprintf(stderr, "Unable to create Tcl Interpreter. Aborting.\n"); return(NULL); } tcl_ret = Tcl_Init(interp); if (tcl_ret != TCL_OK) { fprintf(stderr, "Unable to initialize Tcl. Aborting.\n"); Tcl_DeleteInterp(interp); return(NULL); } tcl_ret = Tcl_Eval(interp, "" #include "appfsd.tcl.h" ""); if (tcl_ret != TCL_OK) { fprintf(stderr, "Unable to initialize Tcl AppFS script. Aborting.\n"); fprintf(stderr, "Tcl Error is: %s\n", Tcl_GetStringResult(interp)); Tcl_DeleteInterp(interp); return(NULL); } if (Tcl_SetVar(interp, "::appfs::cachedir", cachedir, TCL_GLOBAL_ONLY) == NULL) { fprintf(stderr, "Unable to set cache directory. This should never fail.\n"); Tcl_DeleteInterp(interp); return(NULL); } tcl_ret = Tcl_Eval(interp, "::appfs::init"); if (tcl_ret != TCL_OK) { fprintf(stderr, "Unable to initialize Tcl AppFS script (::appfs::init). Aborting.\n"); fprintf(stderr, "Tcl Error is: %s\n", Tcl_GetStringResult(interp)); Tcl_DeleteInterp(interp); return(NULL); } Tcl_HideCommand(interp, "glob", "glob"); Tcl_HideCommand(interp, "exec", "exec"); Tcl_HideCommand(interp, "pid", "pid"); Tcl_HideCommand(interp, "auto_load_index", "auto_load_index"); Tcl_HideCommand(interp, "unknown", "unknown"); return(interp); } static int appfs_Tcl_Eval(Tcl_Interp *interp, int objc, const char *cmd, ...) { Tcl_Obj **objv; const char *arg; va_list argp; |
︙ |
Modified appfsd.tcl from [a0bff81028] to [86cb2b92c8].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | + + - + + + + + | #! /usr/bin/env tclsh package require http 2.7 package require sqlite3 if {[catch { |
︙ | |||
24 25 26 27 28 29 30 | 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 | - - + + + + + - - + + - - - + + + - - - - - - + + + + + + - + - - - - - + + + + + - - - - + + + + - | set filekey [_hash_sep $filekey] } set file [file join $::appfs::cachedir $filekey] file mkdir [file dirname $file] |
︙ | |||
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 | 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 | + + + + + + | switch -- $os { "linux" - "freebsd" - "openbsd" - "netbsd" { return $os } "sunos" { return "solaris" } "noarch" - "none" - "any" - "all" { return "noarch" } } return -code error "Unable to normalize OS: $os" } proc _normalizeCPU {cpu} { set cpu [string tolower [string trim $cpu]] switch -glob -- $cpu { "i?86" { return "ix86" } "x86_64" { return $cpu } "noarch" - "none" - "any" - "all" { return "noarch" } } return -code error "Unable to normalize CPU: $cpu" } proc init {} { |
︙ | |||
137 138 139 140 141 142 143 | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - + | } proc download {hostname hash {method sha1}} { set url "http://$hostname/appfs/$method/$hash" set file [_cachefile $url $hash] if {![file exists $file]} { |
︙ | |||
171 172 173 174 175 176 177 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + | catch { set token [::http::geturl $url] if {[::http::ncode $token] == "200"} { set indexhash_data [::http::data $token] } ::http::reset $token |
︙ | |||
207 208 209 210 211 212 213 | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | + - - - - - - - + + + + + + + + + + | if {$line == ""} { continue } set work [split $line ","] unset -nocomplain pkgInfo if {[catch { |
︙ |
Added sha1.tcl version [a8b3b2afbe].