From fba28f19754f62b5227650143d5441fc86d4c7d7 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 25 Apr 2018 21:33:33 +0200 Subject: Revert "Update NSS to 3.35-RTM" This reverts commit f1a0f0a56fdd0fc39f255174ce08c06b91c66c94. --- .../automation/taskcluster/scripts/build_gyp.sh | 9 ++--- .../automation/taskcluster/scripts/build_image.sh | 24 ------------- .../automation/taskcluster/scripts/gen_certs.sh | 9 ++--- .../nss/automation/taskcluster/scripts/run_hacl.sh | 40 ---------------------- .../nss/automation/taskcluster/scripts/split.sh | 6 ++++ 5 files changed, 10 insertions(+), 78 deletions(-) delete mode 100644 security/nss/automation/taskcluster/scripts/build_image.sh delete mode 100644 security/nss/automation/taskcluster/scripts/run_hacl.sh (limited to 'security/nss/automation/taskcluster/scripts') diff --git a/security/nss/automation/taskcluster/scripts/build_gyp.sh b/security/nss/automation/taskcluster/scripts/build_gyp.sh index fb3a33a52..7190bd5c4 100755 --- a/security/nss/automation/taskcluster/scripts/build_gyp.sh +++ b/security/nss/automation/taskcluster/scripts/build_gyp.sh @@ -9,10 +9,5 @@ hg_clone https://hg.mozilla.org/projects/nspr ./nspr default nss/build.sh -g -v "$@" # Package. -if [[ $(uname) = "Darwin" ]]; then - mkdir -p public - tar cvfjh public/dist.tar.bz2 dist -else - mkdir artifacts - tar cvfjh artifacts/dist.tar.bz2 dist -fi +mkdir artifacts +tar cvfjh artifacts/dist.tar.bz2 dist diff --git a/security/nss/automation/taskcluster/scripts/build_image.sh b/security/nss/automation/taskcluster/scripts/build_image.sh deleted file mode 100644 index b422214e7..000000000 --- a/security/nss/automation/taskcluster/scripts/build_image.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -vex - -set -x -e -v - -# Prefix errors with taskcluster error prefix so that they are parsed by Treeherder -raise_error() { - echo - echo "[taskcluster-image-build:error] $1" - exit 1 -} - -# Ensure that the PROJECT is specified so the image can be indexed -test -n "$PROJECT" || raise_error "Project must be provided." -test -n "$HASH" || raise_error "Context Hash must be provided." - -CONTEXT_PATH=/home/worker/nss/$CONTEXT_PATH - -test -d $CONTEXT_PATH || raise_error "Context Path $CONTEXT_PATH does not exist." -test -f "$CONTEXT_PATH/Dockerfile" || raise_error "Dockerfile must be present in $CONTEXT_PATH." - -docker build -t $PROJECT:$HASH $CONTEXT_PATH - -mkdir /artifacts -docker save $PROJECT:$HASH > /artifacts/image.tar diff --git a/security/nss/automation/taskcluster/scripts/gen_certs.sh b/security/nss/automation/taskcluster/scripts/gen_certs.sh index c03db7e9c..b8d4f60ba 100755 --- a/security/nss/automation/taskcluster/scripts/gen_certs.sh +++ b/security/nss/automation/taskcluster/scripts/gen_certs.sh @@ -12,10 +12,5 @@ NSS_TESTS=cert NSS_CYCLES="standard pkix sharedb" $(dirname $0)/run_tests.sh echo 1 > tests_results/security/localhost # Package. -if [[ $(uname) = "Darwin" ]]; then - mkdir -p public - tar cvfjh public/dist.tar.bz2 dist tests_results -else - mkdir artifacts - tar cvfjh artifacts/dist.tar.bz2 dist tests_results -fi +mkdir artifacts +tar cvfjh artifacts/dist.tar.bz2 dist tests_results diff --git a/security/nss/automation/taskcluster/scripts/run_hacl.sh b/security/nss/automation/taskcluster/scripts/run_hacl.sh deleted file mode 100644 index 281075eef..000000000 --- a/security/nss/automation/taskcluster/scripts/run_hacl.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -if [[ $(id -u) -eq 0 ]]; then - # Drop privileges by re-running this script. - # Note: this mangles arguments, better to avoid running scripts as root. - exec su worker -c "$0 $*" -fi - -set -e -x -v - -# The docker image this is running in has the HACL* and NSS sources. -# The extracted C code from HACL* is already generated and the HACL* tests were -# successfully executed. - -# Verify Poly1305 (doesn't work in docker image build) -make verify -C ~/hacl-star/code/poly1305 -j$(nproc) - -# Add license header to specs -spec_files=($(find ~/hacl-star/specs -type f -name '*.fst')) -for f in "${spec_files[@]}"; do - cat /tmp/license.txt "$f" > /tmp/tmpfile && mv /tmp/tmpfile "$f" -done - -# Format the extracted C code. -cd ~/hacl-star/snapshots/nss -cp ~/nss/.clang-format . -find . -type f -name '*.[ch]' -exec clang-format -i {} \+ - -# These diff commands will return 1 if there are differences and stop the script. -files=($(find ~/nss/lib/freebl/verified/ -type f -name '*.[ch]')) -for f in "${files[@]}"; do - diff $f $(basename "$f") -done - -# Check that the specs didn't change either. -cd ~/hacl-star/specs -files=($(find ~/nss/lib/freebl/verified/specs -type f)) -for f in "${files[@]}"; do - diff $f $(basename "$f") -done diff --git a/security/nss/automation/taskcluster/scripts/split.sh b/security/nss/automation/taskcluster/scripts/split.sh index fded64e1b..4d18385ec 100644 --- a/security/nss/automation/taskcluster/scripts/split.sh +++ b/security/nss/automation/taskcluster/scripts/split.sh @@ -23,10 +23,16 @@ split_util() { # Copy everything. cp -R $nssdir $dstdir + # Skip gtests when building. + sed '/^DIRS = /s/ cpputil gtests$//' $nssdir/manifest.mn > $dstdir/manifest.mn-t && mv $dstdir/manifest.mn-t $dstdir/manifest.mn + # Remove subdirectories that we don't want. rm -rf $dstdir/cmd + rm -rf $dstdir/tests rm -rf $dstdir/lib rm -rf $dstdir/automation + rm -rf $dstdir/gtests + rm -rf $dstdir/cpputil rm -rf $dstdir/doc # Start with an empty cmd lib directories to be filled selectively. -- cgit v1.2.3