Add patch to avoid letting bash trim whitespace when compiling .drv files; should make the build reproducible
Didier Raboud
7 years ago
0 | Description: Set IFS when looping over the file to avoid letting /bin/bash trim the whitespace | |
1 | as this makes the build unreproducible. | |
2 | The whitespace in the original .drv.in files should be fixed nevertheless. | |
3 | Author: Didier Raboud | |
4 | Last-Update: 2016-06-12 | |
5 | ||
6 | --- a/ppd/compile.sh | |
7 | +++ b/ppd/compile.sh | |
8 | @@ -14,7 +14,7 @@ | |
9 | # Function parseFile | |
10 | # | |
11 | parseFile() { | |
12 | - while read LINE; do | |
13 | + while IFS= read LINE; do | |
14 | if [ -n "`echo "$LINE" | grep '^[ \t]*#import[ \t]*"[a-zA-Z0-9\.\-]*"'`" ]; then | |
15 | FILE=`echo "$LINE" | sed -re 's/[ \t]*#import[ \t]"([a-zA-Z0-9\.\-]*)"/\1/'` | |
16 | parseFile $FILE $2 |