From patchwork Sun Mar 29 14:22:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 455787 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id B3D401400DE for ; Mon, 30 Mar 2015 01:22:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EDA6C3341E; Sun, 29 Mar 2015 14:22:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LLbo3HZVbB0d; Sun, 29 Mar 2015 14:22:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7D2913340C; Sun, 29 Mar 2015 14:22:39 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 301271C0EC7 for ; Sun, 29 Mar 2015 14:22:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2B31CA265F for ; Sun, 29 Mar 2015 14:22:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mmRQZw7DPc8q for ; Sun, 29 Mar 2015 14:22:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout08.t-online.de (mailout08.t-online.de [194.25.134.20]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 67EFFA265A for ; Sun, 29 Mar 2015 14:22:36 +0000 (UTC) Received: from fwd41.aul.t-online.de (fwd41.aul.t-online.de [172.20.27.139]) by mailout08.t-online.de (Postfix) with SMTP id C3A023614D7 for ; Sun, 29 Mar 2015 16:22:34 +0200 (CEST) Received: from fli4l.lan.fli4l (STDX-kZbghuwdK469WP0fO-7aNYSPdFSJXO5prnnZs9IxhPNdXXEDcFEyXuG+6OZ01@[79.247.128.253]) by fwd41.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1YcE6j-0bHmAC0; Sun, 29 Mar 2015 16:22:33 +0200 Received: from fli4lbuild64.lan.fli4l ([192.168.1.51]:39112) by fli4l.lan.fli4l with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85) (envelope-from ) id 1YcE6i-0002hN-Ka; Sun, 29 Mar 2015 16:22:33 +0200 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sun, 29 Mar 2015 16:22:29 +0200 Message-Id: <1427638949-3191-2-git-send-email-bernd.kuhls@t-online.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1427638949-3191-1-git-send-email-bernd.kuhls@t-online.de> References: <1427638949-3191-1-git-send-email-bernd.kuhls@t-online.de> X-ID: STDX-kZbghuwdK469WP0fO-7aNYSPdFSJXO5prnnZs9IxhPNdXXEDcFEyXuG+6OZ01 X-TOI-MSGID: 716bcb7a-3111-4df5-9fdd-6ea4b5d2ace9 Cc: Bernd Kuhls Subject: [Buildroot] [PATCH 2/2] package/tor: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Bernd Kuhls --- package/Config.in | 1 + package/tor/0001-openssl-libz.patch | 89 +++++++++++++++++++++++++++++++++++ package/tor/Config.in | 13 +++++ package/tor/tor.hash | 2 + package/tor/tor.mk | 36 ++++++++++++++ 5 files changed, 141 insertions(+) create mode 100644 package/tor/0001-openssl-libz.patch create mode 100644 package/tor/Config.in create mode 100644 package/tor/tor.hash create mode 100644 package/tor/tor.mk diff --git a/package/Config.in b/package/Config.in index 566a78a..2771ba7 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1233,6 +1233,7 @@ endif source "package/tinc/Config.in" source "package/tinyhttpd/Config.in" source "package/tn5250/Config.in" + source "package/tor/Config.in" source "package/transmission/Config.in" source "package/tvheadend/Config.in" source "package/udpcast/Config.in" diff --git a/package/tor/0001-openssl-libz.patch b/package/tor/0001-openssl-libz.patch new file mode 100644 index 0000000..802555e --- /dev/null +++ b/package/tor/0001-openssl-libz.patch @@ -0,0 +1,89 @@ +Adjust link order of libz to solve bug with static linking +and remove host paths when looking for openssl. + +Signed-off-by: Bernd Kuhls + +diff -uNr tor-0.2.5.11.org/configure.ac tor-0.2.5.11/configure.ac +--- tor-0.2.5.11.org/configure.ac 2015-03-12 17:49:50.000000000 +0100 ++++ tor-0.2.5.11/configure.ac 2015-03-29 14:32:05.058142751 +0200 +@@ -559,11 +559,11 @@ + fi + ]) + +-TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto $TOR_LIB_GDI], ++TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto -lz $TOR_LIB_GDI], + [#include ], + [void RAND_add(const void *buf, int num, double entropy);], + [RAND_add((void*)0,0,0); exit(0);], [], +- [/usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/athena /opt/openssl]) ++ []) + + dnl XXXX check for OPENSSL_VERSION_NUMBER == SSLeay() + +diff -uNr tor-0.2.5.11.org/src/or/include.am tor-0.2.5.11/src/or/include.am +--- tor-0.2.5.11.org/src/or/include.am 2015-03-12 17:49:50.000000000 +0100 ++++ tor-0.2.5.11/src/or/include.am 2015-03-29 14:37:35.409997674 +0200 +@@ -115,7 +115,7 @@ + src_or_tor_LDADD = src/or/libtor.a src/common/libor.a \ + src/common/libor-crypto.a $(LIBDONNA) \ + src/common/libor-event.a \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \ ++ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ \ + @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + + if COVERAGE_ENABLED +diff -uNr tor-0.2.5.11.org/src/test/include.am tor-0.2.5.11/src/test/include.am +--- tor-0.2.5.11.org/src/test/include.am 2015-03-12 17:49:50.000000000 +0100 ++++ tor-0.2.5.11/src/test/include.am 2015-03-29 14:39:53.264265077 +0200 +@@ -59,16 +59,16 @@ + src_test_test_LDADD = src/or/libtor-testing.a src/common/libor-testing.a \ + src/common/libor-crypto-testing.a $(LIBDONNA) \ + src/common/libor-event-testing.a \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \ +- @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ ++ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \ ++ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + + src_test_bench_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \ + @TOR_LDFLAGS_libevent@ + src_test_bench_LDADD = src/or/libtor.a src/common/libor.a \ + src/common/libor-crypto.a $(LIBDONNA) \ + src/common/libor-event.a \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \ +- @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ ++ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \ ++ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + + noinst_HEADERS+= \ + src/test/test.h +@@ -79,8 +79,8 @@ + src_test_test_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ + src_test_test_ntor_cl_LDADD = src/or/libtor.a src/common/libor.a \ + src/common/libor-crypto.a $(LIBDONNA) \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \ +- @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ ++ @TOR_LIB_MATH@ \ ++ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + src_test_test_ntor_cl_AM_CPPFLAGS = \ + -I"$(top_srcdir)/src/or" + NTOR_TEST_DEPS=src/test/test-ntor-cl +diff -uNr tor-0.2.5.11.org/src/tools/include.am tor-0.2.5.11/src/tools/include.am +--- tor-0.2.5.11.org/src/tools/include.am 2014-06-18 21:11:45.000000000 +0200 ++++ tor-0.2.5.11/src/tools/include.am 2015-03-29 14:41:29.143058949 +0200 +@@ -9,14 +9,14 @@ + src_tools_tor_gencert_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ + src_tools_tor_gencert_LDADD = src/common/libor.a src/common/libor-crypto.a \ + $(LIBDONNA) \ +- @TOR_LIB_MATH@ @TOR_ZLIB_LIBS@ @TOR_OPENSSL_LIBS@ \ ++ @TOR_LIB_MATH@ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ \ + @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + + src_tools_tor_checkkey_SOURCES = src/tools/tor-checkkey.c + src_tools_tor_checkkey_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ + src_tools_tor_checkkey_LDADD = src/common/libor.a src/common/libor-crypto.a \ + $(LIBDONNA) \ +- @TOR_LIB_MATH@ @TOR_ZLIB_LIBS@ @TOR_OPENSSL_LIBS@ \ ++ @TOR_LIB_MATH@ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ \ + @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + + include src/tools/tor-fw-helper/include.am diff --git a/package/tor/Config.in b/package/tor/Config.in new file mode 100644 index 0000000..0f48d36 --- /dev/null +++ b/package/tor/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_TOR + bool "tor" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + Tor is free software and an open network that helps you defend against + traffic analysis, a form of network surveillance that threatens + personal freedom and privacy, confidential business activities and + relationships, and state security. + + https://www.torproject.org diff --git a/package/tor/tor.hash b/package/tor/tor.hash new file mode 100644 index 0000000..fdcb069 --- /dev/null +++ b/package/tor/tor.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 aee0faee9c3f1bb265ee8e94b4bb93967413f3c56e65f954db16b09451546769 tor-0.2.5.11.tar.gz diff --git a/package/tor/tor.mk b/package/tor/tor.mk new file mode 100644 index 0000000..1d0b117 --- /dev/null +++ b/package/tor/tor.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# tor +# +################################################################################ + +TOR_VERSION = 0.2.5.11 +TOR_SITE = https://dist.torproject.org +TOR_LICENSE = BSD-3c +TOR_LICENSE_FILES = LICENSE +TOR_DEPENDENCIES = libevent openssl zlib +TOR_AUTORECONF = YES + +TOR_CONF_OPTS = \ + --disable-gcc-hardening \ + --with-libevent-dir=$(STAGING_DIR)/usr \ + --with-openssl-dir=$(STAGING_DIR)/usr \ + --with-zlib-dir=$(STAGING_DIR)/usr + +ifeq ($(BR2_STATIC_LIBS),y) +TOR_CONF_OPTS += \ + --enable-static-libevent \ + --enable-static-openssl \ + --enable-static-tor \ + --enable-static-zlib +endif + +# libseccomp support depends on largefile, see src/common/sandbox.c, line 16 +ifeq ($(BR2_PACKAGE_LIBSECCOMP)$(BR2_LARGEFILE),yy) +TOR_CONF_OPTS += --enable-seccomp +TOR_DEPENDENCIES += libseccomp +else +TOR_CONF_OPTS += --disable-seccomp +endif + +$(eval $(autotools-package))