@@ -332,17 +332,16 @@ reproducibility at build time, but not at run time.
332
332
# figure (
333
333
{
334
334
sourcefile (
335
- file : " montecarlo-pi.c" ,
336
- lang : " c" ,
337
- read (" ../../resources/sourcecode/montecarlo-pi.c" ),
335
+ lang : " C" ,
336
+ file : " ../../../resources/sourcecode/montecarlo-pi.c" ,
338
337
)
339
338
},
340
- caption : [` montecarlo-pi.c` ],
339
+ caption : [Sourcecode of montecarlo-pi.c],
341
340
) <montecarlo-pi.c>
342
341
343
342
# figure (
344
343
{
345
- shell (read ( " ../../resources/sourcecode/montecarlo-pi-compilation.log" ) )
344
+ shell (file : " ../../../ resources/sourcecode/montecarlo-pi-compilation.log" )
346
345
},
347
346
caption : [
348
347
Building the same source code multiple times always yields the same binary
@@ -365,7 +364,7 @@ the validity of the algorithm but rather is a characteristic of its
365
364
probabilistic approach to problem-solving.
366
365
367
366
# figure (
368
- shell (read ( " ../../resources/sourcecode/montecarlo-pi.c.log" ) ),
367
+ shell (file : " ../../../ resources/sourcecode/montecarlo-pi.c.log" ),
369
368
caption : [
370
369
Running the binary multiple times does not always yields the same result
371
370
],
@@ -398,9 +397,8 @@ key attributes for creating reliable and maintainable systems in the long run.
398
397
# figure (
399
398
{
400
399
sourcefile (
401
- file : " montecarlo-pi.c" ,
402
- lang : " c" ,
403
- read (" ../../resources/sourcecode/montecarlo-pi-fix.c" ),
400
+ file : " ../../../resources/sourcecode/montecarlo-pi-fix.c" ,
401
+ lang : " C" ,
404
402
)
405
403
},
406
404
caption : [`montecarlo-pi-fix.c` with deterministic random number generator],
@@ -418,9 +416,8 @@ build time.
418
416
# figure (
419
417
{
420
418
sourcefile (
421
- file : " datetime.c" ,
422
- lang : " c" ,
423
- read (" ../../resources/sourcecode/datetime.c" ),
419
+ lang : " C" ,
420
+ file : " ../../../resources/sourcecode/datetime.c" ,
424
421
)
425
422
},
426
423
caption : [Sourcecode of `datetime.c` , a C program with macros],
@@ -433,7 +430,7 @@ code. In such a case, runtime reproducibility between the original and another
433
430
user is not assured.
434
431
435
432
# figure (
436
- shell (read ( " ../../resources/sourcecode/datetime.c.log" ) ),
433
+ shell (file : " ../../../ resources/sourcecode/datetime.c.log" ),
437
434
caption : [
438
435
An example of program that it neither reproducible at build time and
439
436
run time.
@@ -468,9 +465,8 @@ pretty much impossible. We will consider these challenges in more detail in
468
465
469
466
# figure (
470
467
sourcefile (
471
- file : " nodejs.dockerfile" ,
472
- lang : " dockerfile" ,
473
- read (" ../../resources/sourcecode/nodejs.dockerfile" ),
468
+ lang : " Dockerfile" ,
469
+ file : " ../../../resources/sourcecode/nodejs.dockerfile" ,
474
470
),
475
471
caption : [An example of `Dockerfile` ],
476
472
) <dockerfile-example>
@@ -1550,9 +1546,8 @@ reproducibility.
1550
1546
1551
1547
# figure (
1552
1548
sourcefile (
1553
- file : " composer.json" ,
1554
1549
lang : " json" ,
1555
- read ( " ../../resources/sourcecode/composer.json" ) ,
1550
+ file : " ../../../ resources/sourcecode/composer.json" ,
1556
1551
),
1557
1552
caption : [A `composer.json` file, used by the PHP package manager, Composer],
1558
1553
) <composer-json>
@@ -1608,7 +1603,7 @@ Version information like commit identifiers can be used to precisely identify
1608
1603
the source code used to build a program.
1609
1604
1610
1605
# figure (
1611
- shell (read ( " ../../resources/sourcecode/listing-typst-version.log" ) ),
1606
+ shell (file : " ../../../ resources/sourcecode/listing-typst-version.log" ),
1612
1607
caption : [Example of program including a commit ID],
1613
1608
) <listing-typst-version>
1614
1609
@@ -1665,7 +1660,7 @@ the directory based on a specific criterion, such as their names or modification
1665
1660
timestamps.
1666
1661
1667
1662
# figure (
1668
- shell (read ( " ../../resources/sourcecode/tar-sort-name-flag.log" ) ),
1663
+ shell (file : " ../../../ resources/sourcecode/tar-sort-name-flag.log" ),
1669
1664
caption : [
1670
1665
Use of `--sort=name` flag to ensure a stable order of files in an archive
1671
1666
],
@@ -1703,7 +1698,7 @@ file system ordering, from specific file and archive formats.
1703
1698
==== Locale Environment Variables
1704
1699
1705
1700
# figure (
1706
- shell (read ( " ../../resources/sourcecode/date-format-flags.log" ) ),
1701
+ shell (file : " ../../../ resources/sourcecode/date-format-flags.log" ),
1707
1702
caption : [Use `LC_ALL` and `-u` flags to configure the date format],
1708
1703
) <listing-date-format-flags>
1709
1704
@@ -1745,7 +1740,7 @@ First, we compile the sourcecode twice, creating `build1` and `build2`:
1745
1740
1746
1741
# figure (
1747
1742
shell (
1748
- read ( " ../../resources/sourcecode/bash/bash-gcc-not-reproducible-builds.log" ) ,
1743
+ file : " ../../../ resources/sourcecode/bash/bash-gcc-not-reproducible-builds.log" ,
1749
1744
),
1750
1745
caption : [
1751
1746
Compilation of non-reproducible programs and the use of their checksums for
@@ -1756,7 +1751,7 @@ First, we compile the sourcecode twice, creating `build1` and `build2`:
1756
1751
Then, we use `diffoscope` to compare these builds:
1757
1752
1758
1753
# figure (
1759
- shell (read ( " ../../resources/sourcecode/bash/bash-diffoscope-comparison.log" ) ),
1754
+ shell (file : " ../../../ resources/sourcecode/bash/bash-diffoscope-comparison.log" ),
1760
1755
) <bash-diffoscope-comparison>
1761
1756
1762
1757
The tool will generate a detailed report (@diffoscope-report ) highlighting the
@@ -1789,7 +1784,7 @@ during the build process, ensuring consistency across compilations and thus
1789
1784
contributing to reproducibility.
1790
1785
1791
1786
# figure (
1792
- shell (read ( " ../../resources/sourcecode/bash/bash-fixing-builds.log" ) ),
1787
+ shell (file : " ../../../ resources/sourcecode/bash/bash-fixing-builds.log" ),
1793
1788
caption : [Fix builds using an environment variable],
1794
1789
) <bash-fixing-builds>
1795
1790
0 commit comments