From patchwork Thu Dec 13 21:47:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 206241 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 8BDAF2C00A4 for ; Fri, 14 Dec 2012 08:52:17 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 375008C669; Thu, 13 Dec 2012 21:52:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I5x2ykgRUatQ; Thu, 13 Dec 2012 21:51:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 90B7A8C846; Thu, 13 Dec 2012 21:49:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3DA198F74B for ; Thu, 13 Dec 2012 21:48:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A78B98C846 for ; Thu, 13 Dec 2012 21:48:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27sltrwosJSN for ; Thu, 13 Dec 2012 21:48:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id A79F48CE2D for ; Thu, 13 Dec 2012 21:47:40 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id e12so1050092wge.10 for ; Thu, 13 Dec 2012 13:47:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references; bh=gkOOk59DLpTJC+LUziovmF7Rn84NJuAD0wMLqHWH6D4=; b=lgLPdan9GKq9w9tdkRCwUaCjc+PMybCMxR4gmy46L4Vv79EsuhtJa9MDtlfE9925Tl p+dtp09AzAdWCr29byBX8pJ7/W03rM4VynUd/8w8/pYpKhTDEp3BT+tBDOF9QaIgOgMp ic4+gSFogGjgMa49KEjikg/wrYhh/xTyZcSvy0uw7XfB23Sg9iN2N3UUru8+FM+aKwyx 8BjU7GswWmjYSroYQWF/oYBMWDCpSnU8ZK6FUEE7sSRQORcqFO1/dr6MBC4O6HqCWLJX z1aKs6qnycFbsl5nmJ9eClpdiWde5/nA18F8S7kXy9mFpiaWb4Bdpi0XYmPD/mO5NpH4 hhEA== Received: by 10.194.108.106 with SMTP id hj10mr554787wjb.10.1355435259050; Thu, 13 Dec 2012 13:47:39 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-41-119.w90-32.abo.wanadoo.fr. [90.32.24.119]) by mx.google.com with ESMTPS id h19sm9673341wiv.7.2012.12.13.13.47.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Dec 2012 13:47:38 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Thu, 13 Dec 2012 22:47:13 +0100 Message-Id: X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 13/20] package/libseccomp: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net Signed-off-by: "Yann E. MORIN" --- package/Config.in | 1 + package/libseccomp/Config.in | 13 +++++++++++ ...ibseccomp-use-system-headers-from-sysroot.patch | 17 +++++++++++++++ package/libseccomp/libseccomp.mk | 22 ++++++++++++++++++++ 4 files changed, 53 insertions(+), 0 deletions(-) create mode 100644 package/libseccomp/Config.in create mode 100644 package/libseccomp/libseccomp-use-system-headers-from-sysroot.patch create mode 100644 package/libseccomp/libseccomp.mk diff --git a/package/Config.in b/package/Config.in index 79a1342..6ab638d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -521,6 +521,7 @@ source "package/libical/Config.in" source "package/libnspr/Config.in" source "package/libsigc/Config.in" source "package/libtpl/Config.in" +source "package/libseccomp/Config.in" source "package/liburcu/Config.in" source "package/linux-pam/Config.in" source "package/lttng-libust/Config.in" diff --git a/package/libseccomp/Config.in b/package/libseccomp/Config.in new file mode 100644 index 0000000..183cf4e --- /dev/null +++ b/package/libseccomp/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBSECCOMP + bool "libseccomp" + help + High level interface to the Linux Kernel's seccomp filter + + The libseccomp library provides and easy to use, platform independent, + interface to the Linux Kernel's syscall filtering mechanism: seccomp. + The libseccomp API is designed to abstract away the underlying BPF + based syscall filter language and present a more conventional + function-call based filtering interface that should be familiar to, + and easily adopted by application developers. + + http://sourceforge.net/projects/libseccomp/ diff --git a/package/libseccomp/libseccomp-use-system-headers-from-sysroot.patch b/package/libseccomp/libseccomp-use-system-headers-from-sysroot.patch new file mode 100644 index 0000000..0997edd --- /dev/null +++ b/package/libseccomp/libseccomp-use-system-headers-from-sysroot.patch @@ -0,0 +1,17 @@ +configure: check headers in sysroot, not in host's system headers + +Signed-off-by: "Yann E. MORIN" + +diff -durN libseccomp-1.0.0.orig/configure libseccomp-1.0.0/configure +--- libseccomp-1.0.0.orig/configure 2012-07-27 22:35:05.000000000 +0200 ++++ libseccomp-1.0.0/configure 2012-10-27 00:12:50.739196219 +0200 +@@ -205,7 +205,8 @@ + # + + # system seccomp includes +-if [[ -r "/usr/include/linux/seccomp.h" ]]; then ++# ${SYSROOT} added by buildroot for cross-compilation ++if [[ -r "${SYSROOT}/usr/include/linux/seccomp.h" ]]; then + opt_sysinc_seccomp="yes" + else + opt_sysinc_seccomp="no" diff --git a/package/libseccomp/libseccomp.mk b/package/libseccomp/libseccomp.mk new file mode 100644 index 0000000..73fe632 --- /dev/null +++ b/package/libseccomp/libseccomp.mk @@ -0,0 +1,22 @@ +############################################################# +# +# libseccomp +# +############################################################# + +LIBSECCOMP_VERSION = 1.0.0 +LIBSECCOMP_SOURCE = libseccomp-$(LIBSECCOMP_VERSION).tar.gz +LIBSECCOMP_SITE = http://downloads.sourceforge.net/project/libseccomp +LIBSECCOMP_LICENSE = LGPLv2.1 +LIBSECCOMP_LICENSE_FILES = LICENSE +LIBSECCOMP_INSTALL_STAGING = YES + +# Needed for configure to find our system headers: +LIBSECCOMP_CONF_ENV = SYSROOT=$(STAGING_DIR) +LIBSECCOMP_MAKE_ENV = $(TARGET_CONFIGURE_OPTS) +LIBSECCOMP_MAKE_OPT = SUBDIRS_BUILD=src +LIBSECCOMP_INSTALL_STAGING_OPT = SUBDIRS_BUILD=src SUBDIRS_INSTALL="src include" DESTDIR=$(STAGING_DIR) install +LIBSECCOMP_INSTALL_TARGET_OPT = SUBDIRS_BUILD=src SUBDIRS_INSTALL="src include" DESTDIR=$(TARGET_DIR) install + +# Not a real autotools package, but works quite OK nonetheless +$(eval $(autotools-package))