From patchwork Mon Jun 19 21:14:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 777979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ws3dg67LCz9s2P for ; Tue, 20 Jun 2017 07:14:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7CFC1861F7; Mon, 19 Jun 2017 21:14:45 +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 XmDm53M18ujE; Mon, 19 Jun 2017 21:14:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 97F2A85672; Mon, 19 Jun 2017 21:14:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id A0F851C0F65 for ; Mon, 19 Jun 2017 21:14:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9ABAB85672 for ; Mon, 19 Jun 2017 21:14:42 +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 CPdKugrrip09 for ; Mon, 19 Jun 2017 21:14:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from secvs02.rockwellcollins.com (smtpimr.rockwellcollins.com [205.175.225.241]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 50A148566B for ; Mon, 19 Jun 2017 21:14:41 +0000 (UTC) Received: from ofwgwc03.rockwellcollins.com (HELO ciulimr01.rockwellcollins.com) ([205.175.225.12]) by secvs02.rockwellcollins.com with ESMTP; 19 Jun 2017 16:14:41 -0500 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by ciulimr01.rockwellcollins.com (Postfix) with ESMTP id D919661631; Mon, 19 Jun 2017 16:14:39 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 19 Jun 2017 16:14:36 -0500 Message-Id: <1497906876-27014-1-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 Cc: David Graziano Subject: [Buildroot] [PATCH 1/1] paxtest: 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" PaX regression test suite Signed-off-by: David Graziano Signed-off-by: Matthew Weber --- package/Config.in | 1 + .../0001-genpaxtest-move-log-location.patch | 54 ++++++++++++++++++++++ package/paxtest/Config.in | 5 ++ package/paxtest/paxtest.hash | 2 + package/paxtest/paxtest.mk | 30 ++++++++++++ 5 files changed, 92 insertions(+) create mode 100644 package/paxtest/0001-genpaxtest-move-log-location.patch create mode 100644 package/paxtest/Config.in create mode 100644 package/paxtest/paxtest.hash create mode 100644 package/paxtest/paxtest.mk diff --git a/package/Config.in b/package/Config.in index c997e2a..b9d5f9b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1774,6 +1774,7 @@ endmenu menu "Security" source "package/checkpolicy/Config.in" + source "package/paxtest/Config.in" source "package/policycoreutils/Config.in" source "package/refpolicy/Config.in" source "package/sepolgen/Config.in" diff --git a/package/paxtest/0001-genpaxtest-move-log-location.patch b/package/paxtest/0001-genpaxtest-move-log-location.patch new file mode 100644 index 0000000..9fc898d --- /dev/null +++ b/package/paxtest/0001-genpaxtest-move-log-location.patch @@ -0,0 +1,54 @@ +From 623d99e4f557ef9cd771006e4f916c12d22a07a8 Mon Sep 17 00:00:00 2001 +From: David Graziano +Date: Mon, 12 Jun 2017 10:41:45 -0500 +Subject: [PATCH] genpaxtest: move log location + +Move log location to /tmp instead of local directory. +(For read-only filesystems) + +Signed-off-by: David Graziano +--- + genpaxtest | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/genpaxtest b/genpaxtest +index 5a22e15..d62b15e 100644 +--- a/genpaxtest ++++ b/genpaxtest +@@ -43,26 +43,26 @@ else + fi + export LD_LIBRARY_PATH + +-cat <<__end__ | tee paxtest.log ++cat <<__end__ | tee /tmp/paxtest.log + PaXtest - Copyright(c) 2003,2004 by Peter Busser + Released under the GNU Public Licence version 2 or later + + __end__ + +-echo "Mode: \$1" >>paxtest.log +-uname -a >>paxtest.log +-echo >>paxtest.log ++echo "Mode: \$1" >>/tmp/paxtest.log ++uname -a >>/tmp/paxtest.log ++echo >>/tmp/paxtest.log + +-echo 'Writing output to paxtest.log' ++echo 'Writing output to /tmp/paxtest.log' + echo 'It may take a while for the tests to complete' + + for i in $* + do + ${RUNDIR}/\$i +-done >>paxtest.log 2>&1 ++done >>/tmp/paxtest.log 2>&1 + + echo "Test results:" +-cat paxtest.log ++cat /tmp/paxtest.log + + echo + +-- +1.9.1 + diff --git a/package/paxtest/Config.in b/package/paxtest/Config.in new file mode 100644 index 0000000..f5ed60d --- /dev/null +++ b/package/paxtest/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_PAXTEST + bool "paxtest" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + PaX regression test suite diff --git a/package/paxtest/paxtest.hash b/package/paxtest/paxtest.hash new file mode 100644 index 0000000..3fe4ee5 --- /dev/null +++ b/package/paxtest/paxtest.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 c36fbc1c95d11b2c8c92ae8a9a1a40dbe98c7f6725621c7a46807a022a18a54c paxtest_0.9.11.orig.tar.gz diff --git a/package/paxtest/paxtest.mk b/package/paxtest/paxtest.mk new file mode 100644 index 0000000..bc4b9e5 --- /dev/null +++ b/package/paxtest/paxtest.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# paxtest +# +################################################################################ + +PAXTEST_VERSION = 0.9.11 +PAXTEST_SOURCE = paxtest_$(PAXTEST_VERSION).orig.tar.gz +PAXTEST_SITE = http://http.debian.net/debian/pool/main/p/paxtest +PAXTEST_LICENSE = GPL-2.0+ +PAXTEST_LICENSE_FILES = README + +PAXTEST_MAKE_OPTS = \ + CC=$(TARGET_CC) \ + LD=$(TARGET_LD) + +PAXTEST_INSTALL_TARGET_OPTS = \ + DESTDIR=$(TARGET_DIR) \ + BINDIR="usr/bin" \ + RUNDIR="usr/lib" + +define PAXTEST_BUILD_CMDS + $(MAKE) -C $(@D) $(PAXTEST_MAKE_OPTS) linux +endef + +define PAXTEST_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) -f Makefile.psm install $(PAXTEST_INSTALL_TARGET_OPTS) +endef + +$(eval $(generic-package))