-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathreportgen
executable file
·53 lines (39 loc) · 1.91 KB
/
reportgen
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
#!/bin/bash
: ${d:=$(date -u +%Y%m%d)}
lastmonth=$(date -d@$(($(date +%s)-38*24*60*60)) +%Y-%m)
thismonth=$(date -d@$(($(date +%s)-7*24*60*60)) +%Y%m)
cat - <<EOF
Hi,
$(cat ~/tmp/report-$thismonth.txt.in)
Here are the autogenerated bits:
last month's status:
$(head -1 ~/tmp/monthlyurl.txt)
Last months' reproducible builds project updates (including my work):
https://reproducible-builds.org/reports/$lastmonth/
I uploaded https://rb.zq1.de/compare.factory-$d/ today
https://rb.zq1.de/spec/glossar.txt explains the meaning of below values:
EOF
ring0=$(wc -l < /tmp/ring0)
ring1=$(wc -l < /tmp/ring1)
ringtotal=$((ring0+ring1))
ring0=$(($(fgrep -nm 1 -- "--- ring1 ---" ~/tmp/unreproduciblerings.txt | cut -d: -f1)-2))
ring1=$(($(fgrep -nm 1 -- "--- ringsle15 " ~/tmp/unreproduciblerings.txt | cut -d: -f1)-3-ring0))
compiled=$(echo $(grep build-succeeded ~/tmp/rbstats.txt| cut -d: -f2))
buildcomparefailed=$(echo $(grep build-compare-failed ~/tmp/rbstats.txt| cut -d: -f2))
unreproducible=$(echo $(grep not-bit-by-bit-identical: ~/tmp/rbstats.txt| cut -d: -f2))
cat << EOF
$(./rbstatsdiff < ~/f/.rbstats.ref)
https://rb.zq1.de/compare.factory-$d/graph.png
shows the change over time
https://rb.zq1.de/compare.factory-$d/unreproduciblerings.txt
lists very unreproducible core packages (bootstrap+DVD)
Of the badly unreproducible packages,
$ring0 were in ring0
$ring1 were in ring1
That makes it $((ring0+ring1))/$ringtotal => $(perl -e '@a=@ARGV;printf("%.2f %", 100*($a[0]+$a[1])/$a[2])' $ring0 $ring1 $ringtotal)
which is below the overall average of
$buildcomparefailed/$compiled => $(perl -e '@a=@ARGV;printf("%.2f %", 100*$a[0]/$a[1])' $buildcomparefailed $compiled)
$unreproducible/$compiled => $(perl -e '@a=@ARGV;printf("%.2f %", 100*$a[0]/$a[1])' $unreproducible $compiled) of packages are not perfectly reproducible
EOF
echo -e "\n\npackage notes:"
( cd ~/f && find -maxdepth 2 -name .rb.notes -mtime -39 | sort | xargs head -2)