Skip to content

Commit 63fc2b1

Browse files
luke-jrlaanwj
authored andcommitted
gitian: Properly quote arguments in wrappers
1 parent 798bc0b commit 63fc2b1

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ script: |
6464
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
6565
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog}
6666
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
67-
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
67+
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${prog}
6868
chmod +x ${WRAP_DIR}/${prog}
6969
done
7070
}
@@ -78,7 +78,7 @@ script: |
7878
echo "REAL=\`which -a ${i}-${prog}-8 | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
7979
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog}
8080
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
81-
echo "\$REAL \"\$@\"" >> $WRAP_DIR/${i}-${prog}
81+
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${i}-${prog}
8282
chmod +x ${WRAP_DIR}/${i}-${prog}
8383
fi
8484
done

contrib/gitian-descriptors/gitian-osx-signer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ script: |
3131
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
3232
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog}
3333
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
34-
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
34+
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${prog}
3535
chmod +x ${WRAP_DIR}/${prog}
3636
done
3737

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ script: |
6363
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
6464
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog}
6565
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
66-
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
66+
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${prog}
6767
chmod +x ${WRAP_DIR}/${prog}
6868
done
6969
}
@@ -75,7 +75,7 @@ script: |
7575
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
7676
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog}
7777
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
78-
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
78+
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${i}-${prog}
7979
chmod +x ${WRAP_DIR}/${i}-${prog}
8080
done
8181
done

contrib/gitian-descriptors/gitian-win.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ script: |
5555
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
5656
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog}
5757
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
58-
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
58+
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${prog}
5959
chmod +x ${WRAP_DIR}/${prog}
6060
done
6161
}
@@ -67,7 +67,7 @@ script: |
6767
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
6868
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog}
6969
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
70-
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
70+
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${i}-${prog}
7171
chmod +x ${WRAP_DIR}/${i}-${prog}
7272
done
7373
done
@@ -81,7 +81,7 @@ script: |
8181
echo "REAL=\`which -a ${i}-${prog}-posix | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
8282
echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog}
8383
echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
84-
echo "\$REAL \"\$@\"" >> $WRAP_DIR/${i}-${prog}
84+
echo "exec \"\$REAL\" \"\$@\"" >> $WRAP_DIR/${i}-${prog}
8585
chmod +x ${WRAP_DIR}/${i}-${prog}
8686
done
8787
done

0 commit comments

Comments
 (0)