commit 3a3a9c16a9d0b66fa44309bade175d6a1034f769 Author: Nicolas Vigier boklm@torproject.org Date: Thu Jun 25 20:01:32 2015 +0200
Add libdmg-hfsplus --- projects/libdmg-hfsplus/build | 16 ++++++++++++++ projects/libdmg-hfsplus/config | 19 +++++++++++++++++ projects/libdmg-hfsplus/libdmg.patch | 39 ++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+)
diff --git a/projects/libdmg-hfsplus/build b/projects/libdmg-hfsplus/build new file mode 100644 index 0000000..2903150 --- /dev/null +++ b/projects/libdmg-hfsplus/build @@ -0,0 +1,16 @@ +#!/bin/sh +set -e +distdir=$(pwd)/dist +mkdir -p $distdir/[% project %] +tar xf [% project %]-[% c('version') %].tar.gz +cd [% project %]-[% c('version') %] +patch -p1 < ../libdmg.patch +cmake -DCMAKE_INSTALL_PREFIX:PATH=$distdir/[% project %] CMakeLists.txt +cd dmg +make -j4 +make install +cd $distdir +[% c('tar', { + tar_src => [ project ], + tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'), + }) %] diff --git a/projects/libdmg-hfsplus/config b/projects/libdmg-hfsplus/config new file mode 100644 index 0000000..eb02168 --- /dev/null +++ b/projects/libdmg-hfsplus/config @@ -0,0 +1,19 @@ +# vim: filetype=yaml sw=2 +version: '[% c("abbrev") %]' +git_url: https://github.com/vasi/libdmg-hfsplus +git_hash: dfd5e5cc3dc1191e37d3c3a6118975afdd1d7014 +filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz' +remote_docker: 1 +lsb_release: + id: Ubuntu + release: 12.04 + codename: precise +var: + deps: + - build-essential + - cmake + - zlib1g-dev + - libbz2-dev +input_files: + - filename: libdmg.patch + - project: docker-image diff --git a/projects/libdmg-hfsplus/libdmg.patch b/projects/libdmg-hfsplus/libdmg.patch new file mode 100644 index 0000000..a84ac3e --- /dev/null +++ b/projects/libdmg-hfsplus/libdmg.patch @@ -0,0 +1,39 @@ +From d1a5eca891f32103ccda80ee75e158dfc7ece70d Mon Sep 17 00:00:00 2001 +From: Mike Perry mikeperry-git@torproject.org +Date: Thu, 6 Mar 2014 19:47:05 -0800 +Subject: [PATCH] Memset a UDIF header to ensure archive reproducibility. + +Some of the struct padding and fields contained unitialized memory, which +caused two successive invocations to produce archives that differed in some +bytes. +--- + dmg/dmglib.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/dmg/dmglib.c b/dmg/dmglib.c +index f481b1f..b74e50b 100644 +--- a/dmg/dmglib.c ++++ b/dmg/dmglib.c +@@ -108,7 +108,8 @@ int buildDmg(AbstractFile* abstractIn, AbstractFile* abstractOut) { + ChecksumToken dataForkToken; + + UDIFResourceFile koly; +- ++ memset(&koly, 0, sizeof(koly)); ++ + off_t plistOffset; + uint32_t plistSize; + uint32_t dataForkChecksum; +@@ -284,7 +285,8 @@ int convertToDMG(AbstractFile* abstractIn, AbstractFile* abstractOut) { + uint64_t numSectors; + + UDIFResourceFile koly; +- ++ memset(&koly, 0, sizeof(koly)); ++ + char partitionName[512]; + + off_t fileLength; +-- +1.8.1.2 +
tor-commits@lists.torproject.org