Ticket #20583: 0001-Bug-20583-make-the-downloads.json-file-reproducible.patch

File 0001-Bug-20583-make-the-downloads.json-file-reproducible.patch, 903 bytes (added by boklm, 3 years ago)
  • tools/update-responses/update_responses

    From a9b104229064830ce0fb8a5184dac27d94e5115d Mon Sep 17 00:00:00 2001
    From: Nicolas Vigier <boklm@torproject.org>
    Date: Sat, 5 Nov 2016 19:46:09 +0100
    Subject: [PATCH] Bug 20583: make the downloads.json file reproducible
    
    ---
     tools/update-responses/update_responses | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/tools/update-responses/update_responses b/tools/update-responses/update_responses
    index ceba144233cd..bca338606792 100755
    a b sub write_downloads_json { 
    379379            version => $version,
    380380            downloads => get_version_downloads($config, $version),
    381381        };
    382         write_htdocs($channel, 'downloads.json', encode_json($data));
     382        write_htdocs($channel, 'downloads.json',
     383            JSON->new->utf8->canonical->encode($data));
    383384    }
    384385}
    385386