tree checksum vpatch file split hunks

all signers: diana_coman

antecedents: v_mod6_genesis

press order:

v_mod6_genesisdiana_coman
v_mod6_99993diana_coman

patch:

- 5FC781391183934125154CE25C932B651B9B49F1A6BED879E124F6F9A2AD7C16543B0763731147634A224832206E94D1FCD3119C074B4D4FC225C4252257032D
+ C97446D52E0E61E4453130BF0C3E3DFCEB4C03AB336718629BE96BA1E364313DD3F8D1787F40AC235DF4DEDAD50D6E64C1C78709D4545A73C0217450591AD750
v/v.pl
(1 . 6)(1 . 6)
5 #!/usr/bin/perl
6
7 # (C) 2014 - 2017 The Bitcoin Foundation. You do not have, nor can you ever
8 # (C) 2014 - 2018 The Bitcoin Foundation. You do not have, nor can you ever
9 # acquire the right to use, copy or distribute this software ; Should you use
10 # this software for any purpose, or copy and distribute it to anyone or in any
11 # manner, you are breaking the laws of whatever soi-disant jurisdiction, and
(10 . 24)(10 . 32)
13
14 use strict;
15
16 my $version = "99994 K ";
17 my $version = "99993 K ";
18
19 my $tdir = get_homedir() . "/.gnupgtmp";
20 my $tdir = "";
21
22 my $graph;
23 my %wot = ();
24 my %map = ();
25 my %tmp_map = ();
26 my %banners = ();
27 my %ante_map = ();
28 my %desc_map = ();
29 my %vp_map = ();
30
31 my ($pdir, $sdir, $wdir) = "";
32 my (@pfiles, @sfiles, @wfiles) = ();
33
34 sub get_homedir {
35 my $home = `echo \$HOME`; chomp($home);
36 return $home;
37 my @dep_bins = ("cat", "echo", "gpg", "ls", "mkdir", "patch", "pwd",
38 "rm", "sha512sum", "sort", "wget", "which", "mktemp");
39
40 sub check_required_bins {
41 my (@bins) = @_;
42
43 foreach my $bin (@bins) {
44 my $res = `command -v $bin >&1`; chomp($res);
45 death("Dependent program not found! : $bin\n") if $res eq "";
46 }
47 }
48
49 sub get_pwd {
(271 . 7)(279 . 28)
51 }
52 @flow = toposort(%desc_map);
53 %map = scrub_map(@flow);
54 return @flow;
55 return reverse @flow;
56 }
57
58 sub calc_press_path {
59 my ($head) = @_;
60 traverse_press_path($head);
61 return toposort(%ante_map);
62 }
63
64 sub traverse_press_path {
65 my ($vp) = @_;
66
67 my %ante = antecedents($vp);
68
69 if(%ante) {
70 $ante_map{$vp} = [keys %ante];
71 foreach my $a (keys %ante) {
72 traverse_press_path($a);
73 }
74 } else {
75 $ante_map{$vp} = [];
76 }
77 }
78
79 sub scrub_map {
(387 . 7)(416 . 7)
81 death("Cyclic Graph!\n");
82 }
83 }
84 return reverse @flow;
85 return @flow;
86 }
87
88 sub press_vpatches {
(395 . 9)(424 . 10)
90 my @press = @{$p};
91 my $v = 1 and shift @press if $press[0] =~ /^v$|^verbose$/i;
92 death("HEAD: $press[1] not found in flow\n") if !grep /^$press[1]$/, @flow;
93 `rm -rf $press[0]` if -d $press[0];
94 my @pp = calc_press_path($press[1]);
95 death("Directory $press[0] already exists! Halting press.\n") if -d $press[0];
96 `mkdir -p $press[0]`;
97 foreach my $vp (@flow) {
98 foreach my $vp (@pp) {
99 if($v) {
100 my @out = `patch -F 0 -E --dir $press[0] -p1 < $pdir/$vp 2>&1`;
101 print "$vp\n";
(553 . 8)(583 . 9)
103 }
104
105 sub make_tmpdir {
106 my ($dir) = @_;
107 `mkdir -p $dir && chmod 0700 $dir` if !-d $dir or die "$dir exists! $!";
108 if(-d "/tmp") { $tdir = `mktemp -d`; } else { $tdir = `mktemp -d -p .`; }
109 chomp($tdir);
110 death("Failed to create tempdir!\n") if $tdir eq "";
111 }
112
113 sub death {
(694 . 6)(725 . 12)
115 foreach(@flow) { print "$_ " . get_signatories($_) . "\n"; }
116 }
117
118 sub print_press_path {
119 my ($head) = @_;
120 my @pp = calc_press_path($head);
121 foreach(@pp) { print "$_ " . get_signatories($_) . "\n"; }
122 }
123
124 sub get_version {
125 my $version_text = << "END_VERSION_TEXT";
126 ################################################################################
(729 . 6)(766 . 7)
128 # (l | leafs) #
129 # (f | flow) #
130 # (p | press) (<press_dir> <head>) #
131 # (pp | press-path) (<head>) #
132 # (ss | sync-seals) (<mirror_url> <sdir>) #
133 # (sv | sync-vpatches) (<mirror_url> <pdir> <vpatches>... ) #
134 # (sa | sync-all-vpatches) (<mirror_url> <pdir>) #
(738 . 7)(776 . 7)
136 # (o | origin) (<sha512_hash>) #
137 # (g | graph) (<output_dotfile> [<output_svg_html_file>]) #
138 # (v | version) #
139 # (h | ? | help) #
140 # (h | help) #
141 # #
142 END_SHORT_HELP
143 my $l = "########################################" .
(753 . 8)(791 . 9)
145 # Commands: #
146 # m, mirrors (<output_dir>) #
147 # Will attempt to retrieve, cryptographically verify and print entries #
148 # in this list for usage in other commands. Mirrors command my only be #
149 # invoked by itself. [See: sync-seals, sync-vpatches, sync-everything] #
150 # in this list for usage in other commands. Mirrors command may only #
151 # be invoked by itself. [See: sync-seals, sync-vpatches, #
152 # sync-everything] #
153 # #
154 # i, init (<mirror_url>) [(<pdir> <sdir>)] #
155 # init should be run as the first command executed with V. init only #
(803 . 6)(842 . 10)
157 # is supplied immediately after ( p | press ) option. #
158 # See: ( f | flow ) to view the topological ordering. #
159 # #
160 # pp, press-path (<head>) #
161 # Print the actual path to be pressed, given a <head> found in the #
162 # flow. #
163 # #
164 # ss, sync-seals (<mirror_url> <sdir>) #
165 # Given required options of <mirror_url> and output directory <sdir> #
166 # will pull all of the available seal files from the given mirror into #
(845 . 7)(888 . 7)
168 # v, version #
169 # Prints the version message. #
170 # #
171 # h, ?, help #
172 # h, help #
173 # Prints this full help message. #
174 # #
175 ################################################################################
(854 . 11)(897 . 12)
177 }
178
179 sub main {
180 check_required_bins(@dep_bins);
181
182 my $cmd;
183 if(@ARGV > 0) { $cmd = shift @ARGV; }
184 else { print "Unknown or missing option!\n"; print short_help("t"); return; }
185
186 my $home = get_homedir();
187 my $pwd = get_pwd();
188 $wdir = "$pwd/.wot";
189 $pdir = "$pwd/patches";
(900 . 7)(944 . 7)
191 @wfiles = set_files($wdir);
192 build_wot();
193
194 if($cmd =~ /^h$|^help$|^\?$/) { print long_help(); return; }
195 if($cmd =~ /^h$|^help$/) { print long_help(); return; }
196 if($cmd =~ /^i$|^init$/) {
197 if(@ARGV == 1) {
198 init(@ARGV, $pdir, $sdir); return;
(927 . 6)(971 . 7)
200 if ($cmd =~ /^r$|^roots$/) { print_roots(); }
201 elsif($cmd =~ /^l$|^leafs$/) { print_leafs(); }
202 elsif($cmd =~ /^f$|^flow$/) { print_flow(@flow); }
203 elsif($cmd =~ /^pp$|^press-path$/) { print_press_path(@ARGV); }
204 elsif($cmd =~ /^p$|^press$/) {
205 if(@ARGV < 2) {
206 print "$cmd requires two arguments: (<press_dir> <head>)\n\n";
(964 . 6)(1009 . 6)
208 else { print "Unknown option: \"$cmd\"\n"; print short_help("t"); }
209 }
210
211 make_tmpdir($tdir);
212 make_tmpdir();
213 main();
214 remove_tmpdir($tdir);
- 48D9A73B6BC7AEBC3A70BFFF5BD8568DB21A641BD28D0042CEB0E0BCBC397AEDF7291670C4B4987ED952471D62F450FFBEBD1C9134E70EB040CABFC0637C3B3E
+ 4E168B252C971A33E205E6E2B7026BB20B968C5F8F286C6B2C27C9884864F0BD5D8218C628A573AC062C163C428CDB2581F42FA7446F4830E5F8F801A04BEFC2
v/v_quick_start.txt
(1 . 7)(1 . 7)
219 ..::[ The Bitcoin Foundation: V Quick Start ]::..
220
221
222 Doc Version: 99994 K
223 Doc Version: 99993 K
224 Author: mod6
225 Fingerprint: 0x027A8D7C0FB8A16643720F40721705A8B71EADAF
226
(18 . 24)(18 . 35)
228 0x011: cpan | cpanm [CPAN | cpanminus]
229 0x012: Graph::Easy [Nice to have, not required]
230 0x013: graphviz [Nice to have, not required]
231 0x014: gpg [GnuPG]
232 0x014: gpg [GnuPG 1.4.x]
233 0x015: wget
234 0x016: cat
235 0x017: echo
236 0x018: ls
237 0x019: mkdir
238 0x01A: patch
239 0x01B: pwd
240 0x01C: rm
241 0x01D: sha512sum
242 0x01E: sort
243 0x01F: which
244 0x020: mktmp
245
246 0x02]: Where do I get V ?
247
248 curl -s http://thebitcoin.foundation/v/V-20170317.tar.gz \
249 -o V-20170317.tar.gz
250 curl -s http://thebitcoin.foundation/v/V-20170317.tar.gz.mod6.sig \
251 -o V-20170317.tar.gz.mod6.sig
252 curl -s http://thebitcoin.foundation/v/V-20180222.tar.gz \
253 -o V-20180222.tar.gz
254 curl -s http://thebitcoin.foundation/v/V-20180222.tar.gz.mod6.sig \
255 -o V-20180222.tar.gz.mod6.sig
256
257 gpg --keyserver pool.sks-keyservers.net \
258 --recv-keys 0x027A8D7C0FB8A16643720F40721705A8B71EADAF
259
260 gpg --verify V-20170317.tar.gz.mod6.sig V-20170317.tar.gz
261 gpg --verify V-20180222.tar.gz.mod6.sig V-20180222.tar.gz
262
263 If the signature is good, now extract the archive.
264
265 tar -xf V-20170317.tar.gz
266 tar -xf V-20180222.tar.gz
267
268 0x03]: How do I setup V?
269
(59 . 7)(70 . 7)
271
272 ./v.pl m mirrors
273
274 Then run the intial sync of the vpatches and seals from a given mirror:
275 Then run the initial sync of the vpatches and seals from a given mirror:
276
277 ./v.pl i http://thebitcoin.foundation
278
- 12CCA3D90B11AD346B6224E009E263BE37361B8EB80E523C3B3F694586AB4E057B07B191ECDABAF4F73DB778F1C23D7FC78241F48D1CB5E1DE566A7F1BEECBB0
+ 37EF9B4DA1F2D0D09343DAC421FC3D4497F210EA669F602ED6D73539F3DF3B62DC3F68D8B12BA28F1BED130FBE2E3DA3227A29669A55E1F131A08C830C58DBE6
v/v_users_manual.txt
(1 . 7)(1 . 7)
283 ..::[ The Bitcoin Foundation: V Users Manual ]::..
284
285
286 Doc Version: 99994 K
287 Doc Version: 99993 K
288 Author: mod6
289 Fingerprint: 0x027A8D7C0FB8A16643720F40721705A8B71EADAF
290
(44 . 16)(44 . 14)
292 Graph::Easy perl library can be installed.
293
294 Ubuntu:
295
296 apt-get install cpanminus
297 cpanm -i Graph::Easy
298
299 Gentoo [x86-64]:
300
301 emerge g-cpan
302
303 [ NOTE: Copy the next nine lines exacty as they are presented here and ]
304 [ then paste them into the shell. ]
305 [ NOTE: Copy the next nine lines exactly as they are presented here and ]
306 [ then paste them into the shell. ]
307
308 cat <<EOF > /etc/portage/package.accept_keywords
309 # required by perl-gcpan/JSON-MaybeXS-1.003005::x-g-cpan
(89 . 6)(87 . 33)
311 Gentoo:
312 emerge wget
313
314 [ Additional UNIX Commands Required ]:
315
316 Recent distributions of Linux seem ship without tools that one would
317 automatically imagine are included by default. Unfortunate users have
318 found this out the hard way. You will need the following binaries
319 on your system, or V will not run. If V does not find one of these
320 binaries on your system, it will report which one it can not find and exit.
321
322 They are, as follows (instructions on `gpg` and `wget are posted above):
323
324 gpg [GnuPG]
325 wget
326 cat
327 echo
328 ls
329 mkdir
330 patch
331 pwd
332 rm
333 sha512sum
334 sort
335 which
336 mktmp
337
338 If you do not have one of these binaries on your system, for whatever
339 reason, consult your OS documentation to determine how to install it.
340
341 [ Install GraphViz ]:
342
343 In addition to Graph::Easy, if you wish to have V automatically build the
(103 . 12)(128 . 18)
345 etc-update [ enter -5 when prompted ]
346 emerge -a graphviz [ Answer Yes at prompt ]
347
348 NOTE: Some people have had issue with getting a proper graphviz installed,
349 and subsequently no `dot` binary on their system. It may be resolved by
350 doing the following:
351
352 emerge media-gfx/graphviz
353
354 [ Download V Archive ]:
355
356 Now you must obtain the V archive & signature from:
357
358 http://thebitcoin.foundation/v/V-20170317.tar.gz
359 http://thebitcoin.foundation/v/V-20170317.tar.gz.mod6.sig
360 http://thebitcoin.foundation/v/V-20180222.tar.gz
361 http://thebitcoin.foundation/v/V-20180222.tar.gz.mod6.sig
362
363 Then check the PGP signatures supplied:
364
(117 . 11)(148 . 11)
366
367 [ Key Fingerprint: 0x027A8D7C0FB8A16643720F40721705A8B71EADAF ]
368
369 gpg --verify V-20170317.tar.gz.mod6.sig V-20170317.tar.gz
370 gpg --verify V-20180222.tar.gz.mod6.sig V-20180222.tar.gz
371
372 Then unpack the archive:
373
374 tar -xf V-20170317.tar.gz
375 tar -xf V-20180222.tar.gz
376
377 [ Start V for the first time ]:
378
(155 . 7)(186 . 7)
380 0x01]: V Usage
381
382 At this point the user has installed all of V's requirements, performed a
383 lookup of available signed mirrors, and sync'd the WoT, Patches and Seals.
384 look up of available signed mirrors, and sync'd the WoT, Patches and Seals.
385
386 What follows are usages and definitions of V's options with examples.
387
(171 . 7)(202 . 7)
389 The m or mirrors command is available to connect to the main V site:
390 http://thebitcoin.foundation Here, V can connect and pull the list of
391 available mirrors, signed by mirror administrators with L1 trust with
392 assbot and are in good standing in the WoT. Ask mod6 about this if you
393 deedbot and are in good standing in the WoT. Ask mod6 about this if you
394 want to run an authorized, signed mirror of V.
395
396 The mirrors command takes one required argument, an output directory for the
(194 . 7)(225 . 7)
398 directory) and Seals (.seals in the current working directory) directories
399 by not setting the two <pdir> or <sdir> options -- only passing a mirror URL
400 argument to the init command. If the user wishes to use their own named
401 directories, simply pass in those arguements in the exact order specified.
402 directories, simply pass in those arguments in the exact order specified.
403
404 Example:
405 ./v.pl i http://thebitcoin.foundation
(257 . 11)(288 . 11)
407 Options:
408 [ finger ]
409
410 The w or wot command will build a list of WoT entities eligable for
411 The w or wot command will build a list of WoT entities eligible for
412 creating seals for approved vpatches. If a specific vpatch has not
413 been signed by a WoT entity, it is considered a 'WILD' vpatch, and will be
414 ignored. A vpatch must be signed by both Co-Chairs of The Bitcoin Foundation
415 to be considered approved for release.
416 ignored. A vpatch must be signed by both Co-Chairs of The Bitcoin Foundation
417 to be considered approved for release.
418
419 Example:
420 ./v.pl w
(269 . 7)(300 . 6)
422 ben_vulpes:4F7907942CA8B89B01E25A762AFA1A9FD2D031DA:Ben Vulpes <benkay@gmail.com>
423 mircea_popescu:6160E1CAC8A3C52966FD76998A736F0E2FB7B452:Mircea Popescu (Acest articol are apriori avantajul aliteralitatii alaturi.) <office@polimedia.us>
424 mod6:027A8D7C0FB8A16643720F40721705A8B71EADAF:mod6 (mod6) <modsix@gmail.com>
425 punkman:F28E0095843B91CB22E7D65533588BE08B232B13:punkman
426 trinque:FC66C0C5D98C42A1D4A98B6B42F9985AFAB953C4:Michael Trinque <mike@trinque.org>
427
428 ./v.pl w finger
(277 . 7)(307 . 6)
430 ben_vulpes-2AFA1A9FD2D031DA:4F7907942CA8B89B01E25A762AFA1A9FD2D031DA:Ben Vulpes <benkay@gmail.com>
431 mircea_popescu-8A736F0E2FB7B452:6160E1CAC8A3C52966FD76998A736F0E2FB7B452:Mircea Popescu (Acest articol are apriori avantajul aliteralitatii alaturi.) <office@polimedia.us>
432 mod6-721705A8B71EADAF:027A8D7C0FB8A16643720F40721705A8B71EADAF:mod6 (mod6) <modsix@gmail.com>
433 punkman-33588BE08B232B13:F28E0095843B91CB22E7D65533588BE08B232B13:punkman
434 trinque-42F9985AFAB953C4:FC66C0C5D98C42A1D4A98B6B42F9985AFAB953C4:Michael Trinque <mike@trinque.org>
435
436 [ r | roots ]:
(298 . 8)(327 . 8)
438 [ l | leafs ]:
439
440 The l or leafs command takes no options or arguments, unless a different
441 pd or patchdir is specified. It simply traverses the vpatch directories
442 contained vpatches and returns any leaf vpatches found in the topological
443 pd or patchdir is specified. It simply traverses the vpatches in the
444 vpatch directory and returns any leaf vpatches found in the topological
445 order.
446
447 Examples:
(313 . 7)(342 . 7)
449
450 [ f | flow ]:
451
452 The f or flow command prints a topoligical flow of vpatches based on
453 The f or flow command prints a topological flow of vpatches based on
454 precedence. By default will look for the 'patches' directory in the present
455 working directory of V and print the flow to stdout.
456
(353 . 12)(382 . 12)
458 (<press_dir> <head>)
459
460 The p or press command is available to apply vpatches up through <head> in
461 topological order (see flow command) to an output directory <press_dir>.
462 There are two required arguments; an output directory for applied patches
463 <press_dir> and a vpatch <head> as the tip of the tree to press up through.
464 By default, no output is shown; however if the user supplies `v' or
465 `verbose' directly after the p or press command then the output from the
466 patching applcation process will be directed to stdout.
467 topological order (see press-path command) to an output directory
468 <press_dir>. There are two required arguments; an output directory for
469 applied patches <press_dir> and a vpatch <head> as the tip of the tree to
470 press up through. By default, no output is shown; however if the user
471 supplies `v' or `verbose' directly after the p or press command then the
472 output from the patching application process will be directed to stdout.
473
474 Example:
475 ./v.pl p press_output genesis.vpatch
(382 . 12)(411 . 28)
477 patching file bitcoin/src/init.cpp
478 ...
479
480
481 *** SEE ALSO 'press-path' ***
482
483 [ pp | press-path ]:
484
485 Arguments:
486 (<head>)
487
488 The pp or press-path command is available to allow the user to view (via
489 stdout) the actual path to be pressed, given a <head> found in the flow.
490
491 It is encouraged that a V user run this command before pressing to a given
492 <head>. From release 99993 forward, the flow is no longer used to calculate
493 the press path from a given <head>. Instead, with a given <head>, recurse
494 all of the <head>'s antecedents and press those only.
495
496 [ ss | sync-seals ]:
497
498 Arguments:
499 (<mirror_url> <sdir>)
500
501 The ss or sync-seals command is avilable to allow the user to sync seal to
502 The ss or sync-seals command is available to allow the user to sync seal to
503 an alternative directory. Two arguments are required; the <mirror_url>
504 from which to sync and the alternative or existing seals directory <sdir>.
505
(400 . 7)(445 . 7)
507 Arguments:
508 (<mirror_url> <pdir> <vpatches>... )
509
510 The sv or sync-vpatches command is availabe to allow the user to sync one or
511 The sv or sync-vpatches command is available to allow the user to sync one or
512 more individual vpatches to a alternative output directory. Three arguments
513 are required; the <mirror_url> from which to sync, the alternative or
514 existing directory <pdir> and one or more <vpatches>.
(419 . 7)(464 . 7)
516 Arguments:
517 (<mirror_url> <pdir>)
518
519 The sa or sync-all-vpatches command is avilable to allow the user to sync
520 The sa or sync-all-vpatches command is available to allow the user to sync
521 all vpatches from a given mirror to an alternative output directory. Two
522 arguments are required; the <mirror_url> from which to sync and the
523 alternative or existing patches directory <pdir>.
(492 . 7)(537 . 7)
525 Arguments:
526 (<sha512_hash>)
527
528 The o or origin command is avaliable to allow the user to pass a sha512
529 The o or origin command is available to allow the user to pass a sha512
530 hash and view where the given hash originated in the source tree.
531
532 [ g | graph ]:
(500 . 7)(545 . 7)
534 Arguments & Options:
535 (<output_dotfile> [<output_svg_html_file>])
536
537 The g or graph command is available to produce a topoligical flow graph in
538 The g or graph command is available to produce a topological flow graph in
539 SVG format. The command has a required argument, the <output_dotfile>.
540 The output Dot language file can be used to generate the SVG HTML output
541 file with the `dot` binary. To produce the output Dot language file, the
(510 . 7)(555 . 7)
543 should be available for V to invoke and generate the SVG HTML output for
544 the user automatically. If it is not possible for the user to install
545 'graphviz' on the local environment for whatever reason, the Dot language
546 output file can be copied to a seperate environment where 'graphviz' can be
547 output file can be copied to a separate environment where 'graphviz' can be
548 installed. A command like this is used to generate the SVG HTML output
549 with the `dot` binary: `dot -Tsvg v-graph.dot > v-graph.html`.
550
(530 . 7)(575 . 7)
552 The v or version command simply prints the current version of V to stdout.
553 This command takes no options or arguments.
554
555 [ h | ? | help ]:
556 [ h | help ]:
557
558 The h or ? or help command will print a longer, more verbose help message
559 The h or help command will print a longer, more verbose help message
560 to stdout. This command takes no options or arguments.