Merge 'master' into staging

(relatively simple conflicts)
This commit is contained in:
Vladimír Čunát
2015-04-26 22:52:08 +02:00
508 changed files with 26127 additions and 13733 deletions
+6 -6
View File
@@ -11,9 +11,9 @@ right QEMU version and options in `qemu.nix`:
https://github.com/mirrorer/afl/blob/master/qemu_mode/build_qemu_support.sh
`afl-config.h` and `afl-qemu-cpu-inl.h` are part of the afl source
code, and copied from `config.h` and `afl-qemu-cpu-inl.h`
appropriately. The QEMU patches need to be slightly adjusted to
`#include` these files (the patches try to otherwise include files
like `../../config.h` which causes the build to fail). See `qemu.nix`
for details.
`afl-config.h`, `afl-types.h`, and `afl-qemu-cpu-inl.h` are part of
the afl source code, and copied from `config.h`, `types.h` and
`afl-qemu-cpu-inl.h` appropriately. These files and the QEMU patches
need to be slightly adjusted to fix their `#include`s (the patches
try to otherwise include files like `../../config.h` which causes the
build to fail).
+33 -6
View File
@@ -1,4 +1,5 @@
{ stdenv, fetchurl, bash, callPackage, makeWrapper }:
{ stdenv, fetchurl, bash, callPackage, makeWrapper
, clang, llvm, which, libcgroup }:
let
afl-qemu = callPackage ./qemu.nix {};
@@ -8,16 +9,21 @@ let
in
stdenv.mkDerivation rec {
name = "afl-${version}";
version = "1.58b";
version = "1.67b";
src = fetchurl {
url = "http://lcamtuf.coredump.cx/afl/releases/${name}.tgz";
sha256 = "1szggm4x9i9bsrcb99s5vbgncagp7jvhz8cg9amkx7p6mp2x4pld";
sha256 = "11763zgwqg2b5hak006rp0jb3w252js067z9ibgl4nj3br2ncmd2";
};
buildInputs = [ makeWrapper ];
# Note: libcgroup isn't needed for building, just for the afl-cgroup
# script.
buildInputs = [ makeWrapper clang llvm which ];
buildPhase = "make PREFIX=$out";
buildPhase = ''
make PREFIX=$out
cd llvm_mode && make && cd ..
'';
installPhase = ''
# Do the normal installation
make install PREFIX=$out
@@ -25,13 +31,34 @@ stdenv.mkDerivation rec {
# Install the custom QEMU emulator for binary blob fuzzing.
cp ${afl-qemu}/bin/${qemu-exe-name} $out/bin/afl-qemu-trace
# Install the cgroups wrapper for asan-based fuzzing.
cp experimental/asan_cgroups/limit_memory.sh $out/bin/afl-cgroup
chmod +x $out/bin/afl-cgroup
substituteInPlace $out/bin/afl-cgroup \
--replace "cgcreate" "${libcgroup}/bin/cgcreate" \
--replace "cgexec" "${libcgroup}/bin/cgexec" \
--replace "cgdelete" "${libcgroup}/bin/cgdelete"
# Patch shebangs before wrapping
patchShebangs $out/bin
# Wrap every program with a custom $AFL_PATH; I believe there is a
# bug in afl which causes it to fail to find `afl-qemu-trace`
# relative to `afl-fuzz` or `afl-showmap`, so we instead set
# $AFL_PATH as a workaround, which allows it to be found.
for x in `ls $out/bin/afl-*`; do
for x in `ls $out/bin/afl-* | grep -v afl-clang-fast`; do
wrapProgram $x --prefix AFL_PATH : "$out/bin"
done
# Wrap afl-clang-fast(++) with a *different* AFL_PATH, because it
# has totally different semantics in that case(?) - and also set a
# proper AFL_CC and AFL_CXX so we don't pick up the wrong one out
# of $PATH.
for x in $out/bin/afl-clang-fast $out/bin/afl-clang-fast++; do
wrapProgram $x \
--prefix AFL_PATH : "$out/lib/afl" \
--prefix AFL_CC : "${clang}/bin/clang" \
--prefix AFL_CXX : "${clang}/bin/clang++"
done
'';
meta = {
@@ -138,6 +138,11 @@
#define TMIN_MAX_FILE (10 * 1024 * 1024)
/* Block normalization steps for afl-tmin: */
#define TMIN_SET_MIN_SIZE 4
#define TMIN_SET_STEPS 128
/* Maximum dictionary token size (-x), in bytes: */
#define MAX_DICT_FILE 128
@@ -134,6 +134,12 @@ static void afl_setup(void) {
if (afl_area_ptr == (void*)-1) exit(1);
/* With AFL_INST_RATIO set to a low value, we want to touch the bitmap
so that the parent doesn't give up on us. */
if (inst_r) afl_area_ptr[0] = 1;
}
if (getenv("AFL_INST_LIBS")) {
+1 -1
View File
@@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
homepage = http://www.qemu.org/;
description = "Fork of QEMU with American Fuzzy Lop instrumentation support";
description = "Fork of QEMU with AFL instrumentation support";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ thoughtpolice ];
platforms = platforms.linux;
+22 -14
View File
@@ -3,12 +3,13 @@
rootdb="/etc/pki/nssdb"
userdb="$HOME/.pki/nssdb"
dbentry="Belgium eID"
libfile="/run/current-system/sw/libbeidpkcs11.so"
libfile="/run/current-system/sw/lib/libbeidpkcs11.so"
dbdir="$userdb"
case "$1" in
--help) cat << EOF
while true; do
case "$1" in
--help|"") cat << EOF
(Un)register $dbentry with NSS-compatible browsers.
Usage: `basename "$0"` [OPTION] ACTION [LIBRARY]
@@ -27,14 +28,20 @@ Actions:
Default arguments if unspecified:
LIBRARY $libfile
EOF
exit ;;
--db) dbdir="$2"
shift 2 ;;
--user) shift ;;
--system)
dbdir="$rootdb"
shift ;;
esac
exit ;;
--db) dbdir="$2"
shift 2 ;;
--user) dbdir="$userdb"
shift ;;
--system)
dbdir="$rootdb"
shift ;;
-*) echo "$0: unknown option: '$1'" >&2
echo "Try --help for usage information."
exit 1 ;;
*) break ;;
esac
done
if [ "$2" ]; then
libfile="$2"
@@ -50,9 +57,6 @@ if ! [ -d "$dbdir" ]; then
exit 1
fi
echo "NSS database: $dbdir"
echo "BEID library: $libfile"
dbdir="sql:$dbdir"
case "$1" in
@@ -63,6 +67,7 @@ remove) echo "Removing $dbentry from database:"
modutil -dbdir "$dbdir" -delete "$dbentry" ;;
show) echo "Displaying $dbentry database entry, if any:"
echo "Note: this may fail if you don't have the correct permissions." ;;
'') exec "$0" --help ;;
*) echo "$0: unknown action: '$1'" >&2
echo "Try --help for usage information."
exit 1 ;;
@@ -70,6 +75,9 @@ esac
ret=$?
echo "NSS database: $dbdir"
echo "BEID library: $libfile"
modutil -dbdir "$dbdir" -list "$dbentry" 2>/dev/null
exit $ret
+2 -2
View File
@@ -13,11 +13,11 @@ with stdenv.lib;
assert x11Support -> pinentry != null;
stdenv.mkDerivation rec {
name = "gnupg-2.1.2";
name = "gnupg-2.1.3";
src = fetchurl {
url = "mirror://gnupg/gnupg/${name}.tar.bz2";
sha256 = "14k7c5spai3yppz6izf1ggbnffskl54ln87v1wgy9pwism1mlks0";
sha256 = "1vf8fmwcq81abzw2mypz5j7m4xy0vl4z6lri5lxfbd2bsyq7ygi1";
};
patches = [ ./socket-activate-2.1.1.patch ];
+2 -6
View File
@@ -3,23 +3,19 @@
stdenv.mkDerivation rec {
name = "lastpass-cli-${version}";
version = "0.4.0";
version = "0.5.1";
src = fetchFromGitHub {
owner = "lastpass";
repo = "lastpass-cli";
rev = "v${version}";
sha256 = "1r06lifjc28sm88d6x3xwn76l9fjwjmd1wbmvr9j8rna889q0wl9";
sha256 = "0k2dbfizd6gwd4s8badm50qg2djrh22szd932l1a96mn79q8zb70";
};
buildInputs = [
openssl curl libxml2 pkgconfig asciidoc docbook_xsl libxslt
];
prePatch = ''
substituteInPlace version.h --replace "0.3.0" "0.4.0"
'';
makeFlags = "PREFIX=$(out)";
installTargets = "install install-doc";
+17 -7
View File
@@ -1,5 +1,5 @@
{ stdenv, fetchurl
, coreutils, gnused, getopt, pwgen, git, tree, gnupg
, coreutils, gnused, getopt, pwgen, git, tree, gnupg, which
, makeWrapper
, xclip ? null, xdotool ? null, dmenu ? null
@@ -59,6 +59,16 @@ stdenv.mkDerivation rec {
'' else ""}
'';
wrapperPath = with stdenv.lib; makeSearchPath "bin/" ([
coreutils
gnused
getopt
git
gnupg
tree
which
] ++ ifEnable x11Support [ dmenu xclip xdotool ]);
postFixup = ''
# Fix program name in --help
substituteInPlace $out/bin/pass \
@@ -66,11 +76,11 @@ stdenv.mkDerivation rec {
# Ensure all dependencies are in PATH
wrapProgram $out/bin/pass \
--prefix PATH : "${coreutils}/bin:${gnused}/bin:${getopt}/bin:${gnupg}/bin:${git}/bin:${tree}/bin:${pwgen}/bin${if x11Support then ":${xclip}/bin" else ""}"
${if x11Support then ''
wrapProgram $out/bin/passmenu \
--prefix PATH : "$out/bin:${xdotool}/bin:${dmenu}/bin"
'' else ""}
--prefix PATH : "${wrapperPath}"
'' + stdenv.lib.optionalString x11Support ''
# We just wrap passmenu with the same PATH as pass. It doesn't
# need all the tools in there but it doesn't hurt either.
wrapProgram $out/bin/passmenu \
--prefix PATH : "$out/bin:${wrapperPath}"
'';
}
+2 -2
View File
@@ -10,11 +10,11 @@ let
in
with stdenv.lib;
stdenv.mkDerivation rec {
name = "pinentry-0.9.0";
name = "pinentry-0.9.1";
src = fetchurl {
url = "mirror://gnupg/pinentry/${name}.tar.bz2";
sha256 = "1awhajq21hcjgqfxg9czaxg555gij4bba6axrwg8w6lfmc3ml14h";
sha256 = "15cn7q6wg3k433l9ks48pz4dbikp7ysp0h8jqynz6p9rdf2qxl4w";
};
buildInputs = [ libcap gtk2 ncurses qt4 ];
+3 -3
View File
@@ -20,13 +20,13 @@ let
in stdenv.mkDerivation rec {
name = "tor-browser-${version}";
version = "4.0.6";
version = "4.0.8";
src = fetchurl {
url = "https://archive.torproject.org/tor-package-archive/torbrowser/${version}/tor-browser-linux${bits}-${version}_en-US.tar.xz";
sha256 = if bits == "64" then
"d954510bf812f624945bdba8e1c37e23573de89e2f159d7c89a3e3589a765559" else
"89ce71312f5d73fc2af637a93d7697587b2132fce0e9f6e815b25ddba66518d0";
"d8e1ff1865542eb358834bd6f095a2bfa2a991a30ca5188a5752883636a31a36" else
"152186ff31425660675c082af1759ef6cc65f618b6e49e25385c7ccacfe70061";
};
patchPhase = ''