Fossil SCM
Added an "Addenda" section as a place for describing the file format algorithms in more detail (hints for implementors).
Commit
1b5513cba379ce5157d654d8a51fa253f9583604
Parent
75e042503bfe901…
1 file changed
+34
+34
| --- www/fileformat.wiki | ||
| +++ www/fileformat.wiki | ||
| @@ -731,5 +731,39 @@ | ||
| 731 | 731 | <td align=center><b>R</b></td> |
| 732 | 732 | <td align=center><b>R</b></td> |
| 733 | 733 | <td align=center><b>R</b></td> |
| 734 | 734 | </tr> |
| 735 | 735 | </table> |
| 736 | + | |
| 737 | + | |
| 738 | +<h2>Addenda</h2> | |
| 739 | + | |
| 740 | +This section contains additional information which may be useful when | |
| 741 | +implementing algorithms described above. | |
| 742 | + | |
| 743 | +<h3>R Card Hash Calculation</h3> | |
| 744 | + | |
| 745 | +Given a manifest file named <tt>MF</tt> the following Bash shell code | |
| 746 | +demonstrates how to compute the value of the R card in that manifest. | |
| 747 | +This example uses manifest [28987096ac]. Lines starting with <tt>#</tt> are | |
| 748 | +shell input, and other lines are output. | |
| 749 | + | |
| 750 | +<nowiki><pre> | |
| 751 | +# head MF | |
| 752 | +-----BEGIN PGP SIGNED MESSAGE----- | |
| 753 | +Hash: SHA1 | |
| 754 | + | |
| 755 | +C Make\sthe\s"clearsign"\sPGP\ssigning\sdefault\sto\soff. | |
| 756 | +D 2010-02-23T15:33:14 | |
| 757 | +F BUILD.txt 4f7988767e4e48b29f7eddd0e2cdea4555b9161c | |
| 758 | +F COPYRIGHT-GPL2.txt 06877624ea5c77efe3b7e39b0f909eda6e25a4ec | |
| 759 | +... | |
| 760 | + | |
| 761 | +# grep '^R ' MF | |
| 762 | +R c0788982781981c96a0d81465fec7192 | |
| 763 | + | |
| 764 | +# for i in $(awk '/^F /{print $2}' MF); do \ | |
| 765 | + echo $i $(stat -c '%s' $i); \ | |
| 766 | + cat $i; \ | |
| 767 | +done | md5sum | |
| 768 | +c0788982781981c96a0d81465fec7192 - | |
| 769 | +</pre></nowik> | |
| 736 | 770 |
| --- www/fileformat.wiki | |
| +++ www/fileformat.wiki | |
| @@ -731,5 +731,39 @@ | |
| 731 | <td align=center><b>R</b></td> |
| 732 | <td align=center><b>R</b></td> |
| 733 | <td align=center><b>R</b></td> |
| 734 | </tr> |
| 735 | </table> |
| 736 |
| --- www/fileformat.wiki | |
| +++ www/fileformat.wiki | |
| @@ -731,5 +731,39 @@ | |
| 731 | <td align=center><b>R</b></td> |
| 732 | <td align=center><b>R</b></td> |
| 733 | <td align=center><b>R</b></td> |
| 734 | </tr> |
| 735 | </table> |
| 736 | |
| 737 | |
| 738 | <h2>Addenda</h2> |
| 739 | |
| 740 | This section contains additional information which may be useful when |
| 741 | implementing algorithms described above. |
| 742 | |
| 743 | <h3>R Card Hash Calculation</h3> |
| 744 | |
| 745 | Given a manifest file named <tt>MF</tt> the following Bash shell code |
| 746 | demonstrates how to compute the value of the R card in that manifest. |
| 747 | This example uses manifest [28987096ac]. Lines starting with <tt>#</tt> are |
| 748 | shell input, and other lines are output. |
| 749 | |
| 750 | <nowiki><pre> |
| 751 | # head MF |
| 752 | -----BEGIN PGP SIGNED MESSAGE----- |
| 753 | Hash: SHA1 |
| 754 | |
| 755 | C Make\sthe\s"clearsign"\sPGP\ssigning\sdefault\sto\soff. |
| 756 | D 2010-02-23T15:33:14 |
| 757 | F BUILD.txt 4f7988767e4e48b29f7eddd0e2cdea4555b9161c |
| 758 | F COPYRIGHT-GPL2.txt 06877624ea5c77efe3b7e39b0f909eda6e25a4ec |
| 759 | ... |
| 760 | |
| 761 | # grep '^R ' MF |
| 762 | R c0788982781981c96a0d81465fec7192 |
| 763 | |
| 764 | # for i in $(awk '/^F /{print $2}' MF); do \ |
| 765 | echo $i $(stat -c '%s' $i); \ |
| 766 | cat $i; \ |
| 767 | done | md5sum |
| 768 | c0788982781981c96a0d81465fec7192 - |
| 769 | </pre></nowik> |
| 770 |