From patchwork Mon Sep 16 17:03:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_D=C3=BCring?= X-Patchwork-Id: 1986204 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X6rqT59gKz1y1m for ; Tue, 17 Sep 2024 03:04:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6551C403B0; Mon, 16 Sep 2024 17:04:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id EXasnRwTnMKm; Mon, 16 Sep 2024 17:04:17 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 00BB94061C Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 00BB94061C; Mon, 16 Sep 2024 17:04:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3EF521BF34E for ; Mon, 16 Sep 2024 17:04:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3B1E260ADC for ; Mon, 16 Sep 2024 17:04:15 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id WRcuiIiQz3iU for ; Mon, 16 Sep 2024 17:04:14 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=85.13.150.162; helo=dd33218.kasserver.com; envelope-from=brpi@duering-andreas.de; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 3CF0860ACD DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3CF0860ACD Received: from dd33218.kasserver.com (dd33218.kasserver.com [85.13.150.162]) by smtp3.osuosl.org (Postfix) with ESMTPS id 3CF0860ACD for ; Mon, 16 Sep 2024 17:04:14 +0000 (UTC) Received: from localhost.localdomain (i6DFA2813.versanet.de [109.250.40.19]) by dd33218.kasserver.com (Postfix) with ESMTPSA id EA821200122C; Mon, 16 Sep 2024 19:04:10 +0200 (CEST) To: buildroot@buildroot.org Date: Mon, 16 Sep 2024 19:03:40 +0200 Message-Id: <20240916170340.13019-1-brpi@duering-andreas.de> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-Spamd-Bar: ++ X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=duering-andreas.de; s=kas201911161523; t=1726506251; bh=mQDeJTBzirFhIb9lS0i2D5wgcXB/k6vMRM3ujWRI1eU=; h=From:To:Cc:Subject:Date:From; b=mDrbhGs2jO/lYNkSY+t3584uDHUpzibsZYGlEU3FADL63zq4+0Ol8o+qDQTWSwe2Z xV48ldKw3+gYisBFamB45LXMbvAXYKVUSLUIkUC5h8epmDU2xo+btilHEsdxCO22RS zjTEa3pc31NabvmAARU4xyFP8n8YCVwYUQL7hegB60bnWeZIpDSBR7fIvv3IVuhHdx rwYEyw4GQjPC+jEUboIDtQJY3HmPy0Wfh94eId3Um8ADNB3ePQx64/YOuH/lMuPdMj kZMuR10KNb8NeX+PRxcfuSCb7TtXj/jNnJMg0z0PXBk2iwHrDuXFLEtdBE6+akn1ZU mA10NrVQRCzfQ== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=duering-andreas.de X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=duering-andreas.de header.i=@duering-andreas.de header.a=rsa-sha256 header.s=kas201911161523 header.b=mDrbhGs2 Subject: [Buildroot] [PATCH v1 1/1] package/mbedtls: Move test binaries to subdirectory X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Andreas_D=C3=BCring_via_buildroot?= From: =?utf-8?q?Andreas_D=C3=BCring?= Reply-To: =?utf-8?q?Andreas_D=C3=BCring?= Cc: Fabrice Fontaine , =?utf-8?q?Andreas_D=C3=BC?= =?utf-8?q?ring?= Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The mbedtls package has a config option BR2_PACKAGE_MBEDTLS_PROGRAMS, which enables some test programs to be built and installed. However, some of the test programs have unfortunate names, e.g. "hello" and "strerror", which may lead to name collisions (?) and also otherwise "pollute" /usr/bin/. Add a patch to the CMakeLists.txt files, so that the binaries go to /usr/bin/mbedtls. Signed-off-by: Andreas Düring --- ...001-install-programs-to-subdirectory.patch | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 package/mbedtls/0001-install-programs-to-subdirectory.patch diff --git a/package/mbedtls/0001-install-programs-to-subdirectory.patch b/package/mbedtls/0001-install-programs-to-subdirectory.patch new file mode 100644 index 0000000000..5a28dcfc31 --- /dev/null +++ b/package/mbedtls/0001-install-programs-to-subdirectory.patch @@ -0,0 +1,103 @@ +Install mbedtls test programs to a subdirectory + +This is to avoid collisions (e.g. "hello"). + +Signed-off-by: Andreas Düring +Index: mbedtls-2.28.8/programs/aes/CMakeLists.txt +=================================================================== +--- mbedtls-2.28.8.orig/programs/aes/CMakeLists.txt ++++ mbedtls-2.28.8/programs/aes/CMakeLists.txt +@@ -8,5 +8,5 @@ foreach(exe IN LISTS executables) + endforeach() + + install(TARGETS ${executables} +- DESTINATION "bin" ++ DESTINATION "bin/mbedtls" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +Index: mbedtls-2.28.8/programs/hash/CMakeLists.txt +=================================================================== +--- mbedtls-2.28.8.orig/programs/hash/CMakeLists.txt ++++ mbedtls-2.28.8/programs/hash/CMakeLists.txt +@@ -9,5 +9,5 @@ foreach(exe IN LISTS executables) + endforeach() + + install(TARGETS ${executables} +- DESTINATION "bin" ++ DESTINATION "bin/mbedtls" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +Index: mbedtls-2.28.8/programs/pkey/CMakeLists.txt +=================================================================== +--- mbedtls-2.28.8.orig/programs/pkey/CMakeLists.txt ++++ mbedtls-2.28.8/programs/pkey/CMakeLists.txt +@@ -35,5 +35,5 @@ foreach(exe IN LISTS executables_mbedcry + endforeach() + + install(TARGETS ${executables_mbedtls} ${executables_mbedcrypto} +- DESTINATION "bin" ++ DESTINATION "bin/mbedtls" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +Index: mbedtls-2.28.8/programs/psa/CMakeLists.txt +=================================================================== +--- mbedtls-2.28.8.orig/programs/psa/CMakeLists.txt ++++ mbedtls-2.28.8/programs/psa/CMakeLists.txt +@@ -18,4 +18,4 @@ install(TARGETS ${executables} + + install(PROGRAMS + key_ladder_demo.sh +- DESTINATION "bin") ++ DESTINATION "bin/mbedtls") +Index: mbedtls-2.28.8/programs/random/CMakeLists.txt +=================================================================== +--- mbedtls-2.28.8.orig/programs/random/CMakeLists.txt ++++ mbedtls-2.28.8/programs/random/CMakeLists.txt +@@ -10,5 +10,5 @@ foreach(exe IN LISTS executables) + endforeach() + + install(TARGETS ${executables} +- DESTINATION "bin" ++ DESTINATION "bin/mbedtls" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +Index: mbedtls-2.28.8/programs/ssl/CMakeLists.txt +=================================================================== +--- mbedtls-2.28.8.orig/programs/ssl/CMakeLists.txt ++++ mbedtls-2.28.8/programs/ssl/CMakeLists.txt +@@ -50,5 +50,5 @@ if(THREADS_FOUND) + endif(THREADS_FOUND) + + install(TARGETS ${executables} +- DESTINATION "bin" ++ DESTINATION "bin/mbedtls" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +Index: mbedtls-2.28.8/programs/test/CMakeLists.txt +=================================================================== +--- mbedtls-2.28.8.orig/programs/test/CMakeLists.txt ++++ mbedtls-2.28.8/programs/test/CMakeLists.txt +@@ -64,5 +64,5 @@ foreach(exe IN LISTS executables_libs ex + endforeach() + + install(TARGETS ${executables_libs} ${executables_mbedcrypto} +- DESTINATION "bin" ++ DESTINATION "bin/mbedtls" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +Index: mbedtls-2.28.8/programs/util/CMakeLists.txt +=================================================================== +--- mbedtls-2.28.8.orig/programs/util/CMakeLists.txt ++++ mbedtls-2.28.8/programs/util/CMakeLists.txt +@@ -13,5 +13,5 @@ foreach(exe IN LISTS executables) + endforeach() + + install(TARGETS ${executables} +- DESTINATION "bin" ++ DESTINATION "bin/mbedtls" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +Index: mbedtls-2.28.8/programs/x509/CMakeLists.txt +=================================================================== +--- mbedtls-2.28.8.orig/programs/x509/CMakeLists.txt ++++ mbedtls-2.28.8/programs/x509/CMakeLists.txt +@@ -27,5 +27,5 @@ endforeach() + target_link_libraries(cert_app ${mbedtls_target}) + + install(TARGETS ${executables} +- DESTINATION "bin" ++ DESTINATION "bin/mbedtls" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)