summaryrefslogtreecommitdiffstats
path: root/package/libyaml/libyaml-0003-string-overflow.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-02-04 14:36:56 +0100
committerPeter Korsgaard <peter@korsgaard.com>2014-02-04 15:15:48 +0100
commitfecf5b522b651f1304fdc8976e98776f3a130830 (patch)
treec0d1e4c6107f6e6b556ebfe21908de34df476122 /package/libyaml/libyaml-0003-string-overflow.patch
parentdd712eb31cd041eb51c2731a0cdf0422681bb67d (diff)
downloadbuildroot-fecf5b522b651f1304fdc8976e98776f3a130830.tar.gz
buildroot-fecf5b522b651f1304fdc8976e98776f3a130830.zip
pkg-download: make sure git downloads fail for unknown versions
The current git download helper creates the tarball by doing: git archive <version> | gzip -c > <tarball> Unfortunately, even if "git archive" fails and returns a non-zero error code, gzip ignores that, compresses nothing, and returns success (zero error code). The consequence of this behavior is that when the git version provided in the package is incorrect, we are not failing during the download step, but later on when trying to extract the tarball (which was incorrectly created as a result of the failing git archive). To fix this, we change the tarball creation logic to: git archive -o <tarball>.tmp <version> && gzip -c <tarball>.tmp > <tarball> && rm -f <tarball>.tmp If the build is interrupted during the "gzip" command, we may leave the .tmp file behind us, but this also happens with wget downloads, and is generally not considered a problem, since this temporary file will be overwritten next time we attempt to do download this package. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/libyaml/libyaml-0003-string-overflow.patch')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud