From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 728F51395E2 for ; Fri, 25 Nov 2016 14:40:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C794BE0B7F; Fri, 25 Nov 2016 14:40:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9A7ECE0B7F for ; Fri, 25 Nov 2016 14:40:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 34AB833D3C7 for ; Fri, 25 Nov 2016 14:40:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A1DE248B for ; Fri, 25 Nov 2016 14:40:23 +0000 (UTC) From: "Manuel Rüger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Manuel Rüger" Message-ID: <1480084809.01037ba0bd9409a6aed51e0302a042d823eac4e3.mrueg@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/tini/, sys-process/tini/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-process/tini/files/tini-0.13.0-preprocessed-license.patch sys-process/tini/tini-0.13.0-r1.ebuild X-VCS-Directories: sys-process/tini/files/ sys-process/tini/ X-VCS-Committer: mrueg X-VCS-Committer-Name: Manuel Rüger X-VCS-Revision: 01037ba0bd9409a6aed51e0302a042d823eac4e3 X-VCS-Branch: master Date: Fri, 25 Nov 2016 14:40:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 762cba4b-e554-4d14-8acd-c1dbb8e5c896 X-Archives-Hash: 086d428a9ef09937e470ceb687cb1768 commit: 01037ba0bd9409a6aed51e0302a042d823eac4e3 Author: Manuel Rüger gentoo org> AuthorDate: Fri Nov 25 14:39:58 2016 +0000 Commit: Manuel Rüger gentoo org> CommitDate: Fri Nov 25 14:40:09 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01037ba0 sys-process/tini: Add preprocessed license and remove dependency on vim-core Gentoo-Bug: 600150 Package-Manager: portage-2.3.2 .../files/tini-0.13.0-preprocessed-license.patch | 165 +++++++++++++++++++++ sys-process/tini/tini-0.13.0-r1.ebuild | 45 ++++++ 2 files changed, 210 insertions(+) diff --git a/sys-process/tini/files/tini-0.13.0-preprocessed-license.patch b/sys-process/tini/files/tini-0.13.0-preprocessed-license.patch new file mode 100644 index 00000000..87e62bf --- /dev/null +++ b/sys-process/tini/files/tini-0.13.0-preprocessed-license.patch @@ -0,0 +1,165 @@ +From 325bf786742aaf76918a15412c707de6f1c027c8 Mon Sep 17 00:00:00 2001 +From: Thomas Orozco +Date: Thu, 17 Nov 2016 20:19:48 +0100 +Subject: [PATCH] Include pre-processed license in repo + +Also adding a test in run_build.sh to ensure that the pre-processed +license is always up to date with the actual license file. + +To recreate: `xxd -i LICENSE > src/license.h` +--- + CMakeLists.txt | 10 ------ + ci/install_deps.sh | 2 +- + ci/run_build.sh | 2 +- + src/tiniLicense.h | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 97 insertions(+), 12 deletions(-) + create mode 100644 src/tiniLicense.h + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e16d8c2..b5b93ba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,16 +58,6 @@ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bsymbolic-functions + + # Build + +-execute_process( +- COMMAND xxd -i "LICENSE" "${PROJECT_BINARY_DIR}/tiniLicense.h" +- WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" +- RESULT_VARIABLE xxd_ret +-) +- +-if(NOT "${xxd_ret}" EQUAL 0) +- message(SEND_ERROR "xxd on LICENSE failed: ${xxd_ret}") +-endif() +- + configure_file ( + "${PROJECT_SOURCE_DIR}/src/tiniConfig.h.in" + "${PROJECT_BINARY_DIR}/tiniConfig.h" +diff --git a/ci/install_deps.sh b/ci/install_deps.sh +index da7412d..ce5d104 100755 +--- a/ci/install_deps.sh ++++ b/ci/install_deps.sh +@@ -7,7 +7,7 @@ apt-get update + apt-get install --no-install-recommends --yes \ + build-essential git gdb valgrind cmake rpm \ + python-dev libcap-dev python-pip python-virtualenv \ +- hardening-includes gnupg vim-common \ ++ hardening-includes gnupg \ + gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu libc6-dev-arm64-cross \ + gcc-arm-linux-gnueabihf binutils-arm-linux-gnueabi libc6-dev-armhf-cross + +diff --git a/ci/run_build.sh b/ci/run_build.sh +index 728da5c..7658ac7 100755 +--- a/ci/run_build.sh ++++ b/ci/run_build.sh +@@ -118,7 +118,7 @@ if [[ -n "${ARCH_NATIVE:=}" ]]; then + "${tini}" -h + + echo "Testing $tini for license" +- "${tini}" -l | grep -q -i "mit license" ++ "$tini" -l | diff - "${SOURCE_DIR}/LICENSE" + + echo "Testing $tini with: true" + "${tini}" -vvv true +diff --git a/src/tiniLicense.h b/src/tiniLicense.h +new file mode 100644 +index 0000000..db230ad +--- /dev/null ++++ b/src/tiniLicense.h +@@ -0,0 +1,95 @@ ++unsigned char LICENSE[] = { ++ 0x54, 0x68, 0x65, 0x20, 0x4d, 0x49, 0x54, 0x20, 0x4c, 0x69, 0x63, 0x65, ++ 0x6e, 0x73, 0x65, 0x20, 0x28, 0x4d, 0x49, 0x54, 0x29, 0x0a, 0x0a, 0x43, ++ 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, ++ 0x20, 0x32, 0x30, 0x31, 0x35, 0x20, 0x54, 0x68, 0x6f, 0x6d, 0x61, 0x73, ++ 0x20, 0x4f, 0x72, 0x6f, 0x7a, 0x63, 0x6f, 0x20, 0x3c, 0x74, 0x68, 0x6f, ++ 0x6d, 0x61, 0x73, 0x40, 0x6f, 0x72, 0x6f, 0x7a, 0x63, 0x6f, 0x2e, 0x66, ++ 0x72, 0x3e, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, ++ 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x68, 0x65, 0x72, 0x65, 0x62, 0x79, ++ 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x66, 0x72, ++ 0x65, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, ++ 0x2c, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x65, 0x72, ++ 0x73, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, ++ 0x67, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x0a, 0x6f, 0x66, 0x20, ++ 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, ++ 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, ++ 0x61, 0x74, 0x65, 0x64, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, ++ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, ++ 0x20, 0x28, 0x74, 0x68, 0x65, 0x20, 0x22, 0x53, 0x6f, 0x66, 0x74, 0x77, ++ 0x61, 0x72, 0x65, 0x22, 0x29, 0x2c, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x65, ++ 0x61, 0x6c, 0x0a, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x6f, ++ 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, ++ 0x75, 0x74, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, ++ 0x6f, 0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, ++ 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x6c, 0x69, ++ 0x6d, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, ++ 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x0a, 0x74, 0x6f, 0x20, 0x75, ++ 0x73, 0x65, 0x2c, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x2c, 0x20, 0x6d, 0x6f, ++ 0x64, 0x69, 0x66, 0x79, 0x2c, 0x20, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x2c, ++ 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x2c, 0x20, 0x64, 0x69, ++ 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2c, 0x20, 0x73, 0x75, ++ 0x62, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, ++ 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x6c, 0x6c, 0x0a, 0x63, 0x6f, ++ 0x70, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, ++ 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x2c, 0x20, 0x61, 0x6e, ++ 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x20, ++ 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x77, ++ 0x68, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, ++ 0x77, 0x61, 0x72, 0x65, 0x20, 0x69, 0x73, 0x0a, 0x66, 0x75, 0x72, 0x6e, ++ 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x6f, 0x20, ++ 0x73, 0x6f, 0x2c, 0x20, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, ++ 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, ++ 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, ++ 0x6f, 0x6e, 0x73, 0x3a, 0x0a, 0x0a, 0x54, 0x68, 0x65, 0x20, 0x61, 0x62, ++ 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, ++ 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, ++ 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, ++ 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, ++ 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x63, ++ 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x0a, 0x61, 0x6c, 0x6c, ++ 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x73, ++ 0x75, 0x62, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x70, ++ 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, ++ 0x68, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x2e, ++ 0x0a, 0x0a, 0x54, 0x48, 0x45, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, ++ 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, ++ 0x45, 0x44, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x2c, 0x20, ++ 0x57, 0x49, 0x54, 0x48, 0x4f, 0x55, 0x54, 0x20, 0x57, 0x41, 0x52, 0x52, ++ 0x41, 0x4e, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x41, 0x4e, 0x59, 0x20, ++ 0x4b, 0x49, 0x4e, 0x44, 0x2c, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, ++ 0x53, 0x20, 0x4f, 0x52, 0x0a, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, ++ 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, ++ 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x20, 0x4c, 0x49, 0x4d, 0x49, ++ 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x20, 0x54, 0x48, 0x45, 0x20, 0x57, ++ 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, ++ 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, ++ 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x0a, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, ++ 0x53, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, ++ 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, ++ 0x53, 0x45, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4e, 0x4f, 0x4e, 0x49, 0x4e, ++ 0x46, 0x52, 0x49, 0x4e, 0x47, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x2e, 0x20, ++ 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, ++ 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x0a, 0x41, 0x55, ++ 0x54, 0x48, 0x4f, 0x52, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x50, ++ 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, ++ 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, ++ 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x43, 0x4c, 0x41, ++ 0x49, 0x4d, 0x2c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, ++ 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x0a, 0x4c, 0x49, 0x41, ++ 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, ++ 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x20, 0x41, 0x43, ++ 0x54, 0x49, 0x4f, 0x4e, 0x20, 0x4f, 0x46, 0x20, 0x43, 0x4f, 0x4e, 0x54, ++ 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x20, 0x4f, ++ 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x2c, ++ 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x46, 0x52, 0x4f, ++ 0x4d, 0x2c, 0x0a, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x4f, 0x52, ++ 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, ++ 0x4f, 0x4e, 0x20, 0x57, 0x49, 0x54, 0x48, 0x20, 0x54, 0x48, 0x45, 0x20, ++ 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x4f, 0x52, 0x20, ++ 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, ++ 0x54, 0x48, 0x45, 0x52, 0x20, 0x44, 0x45, 0x41, 0x4c, 0x49, 0x4e, 0x47, ++ 0x53, 0x20, 0x49, 0x4e, 0x0a, 0x54, 0x48, 0x45, 0x20, 0x53, 0x4f, 0x46, ++ 0x54, 0x57, 0x41, 0x52, 0x45, 0x2e, 0x0a ++}; ++unsigned int LICENSE_len = 1099; diff --git a/sys-process/tini/tini-0.13.0-r1.ebuild b/sys-process/tini/tini-0.13.0-r1.ebuild new file mode 100644 index 00000000..5a716a5 --- /dev/null +++ b/sys-process/tini/tini-0.13.0-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit cmake-utils flag-o-matic + +DESCRIPTION="A tiny but valid init for containers" +HOMEPAGE="https://github.com/krallin/tini" +SRC_URI="https://github.com/krallin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+args static" + +PATCHES=( "${FILESDIR}"/${P}-preprocessed-license.patch ) + +src_prepare() { + default + # Do not strip binary + sed -i -e 's/-Wl,-s")$/")/' CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=() + use args || mycmakeargs+=(-DMINIMAL=ON) + + cmake-utils_src_configure +} + +src_compile() { + append-cflags -DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37 + cmake-utils_src_compile +} + +src_install() { + cmake-utils_src_install + if use static; then + mv "${ED%/}"/usr/bin/{${PN}-static,${PN}} || die + else + rm "${ED%/}"/usr/bin/${PN}-static || die + fi +}