From ed024a889743b4b7fadb9cb34bd08b49c1edd846 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Fri, 26 Jan 2024 16:45:13 -0800 Subject: [PATCH] [protobuf] Delete unused backends from sources. (#36377) We have an internal Microsoft report of dependency tracking tools complaining about requirements.txt in the Python backend of protobuf after a build. It's just as likely that similar alerts will be fired for other unused language backends. However, they're unused, so we can delete them. --- ports/protobuf/portfile.cmake | 11 +++++++++++ ports/protobuf/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/p-/protobuf.json | 5 +++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index bdb5fe069c..69a28ed207 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -33,6 +33,17 @@ if (VCPKG_DOWNLOAD_MODE) vcpkg_find_acquire_program(PKGCONFIG) endif() +# Delete language backends we aren't targeting to reduce false positives in automated dependency +# detectors like Dependabot. +file(REMOVE_RECURSE + "${SOURCE_PATH}/csharp" + "${SOURCE_PATH}/java" + "${SOURCE_PATH}/objectivec" + "${SOURCE_PATH}/php" + "${SOURCE_PATH}/python" + "${SOURCE_PATH}/ruby" +) + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS diff --git a/ports/protobuf/vcpkg.json b/ports/protobuf/vcpkg.json index bda8f27072..61344a19bf 100644 --- a/ports/protobuf/vcpkg.json +++ b/ports/protobuf/vcpkg.json @@ -1,6 +1,7 @@ { "name": "protobuf", "version": "3.21.12", + "port-version": 1, "description": "Protocol Buffers - Google's data interchange format", "homepage": "https://github.com/protocolbuffers/protobuf", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index 6421de3ba6..05be781698 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6854,7 +6854,7 @@ }, "protobuf": { "baseline": "3.21.12", - "port-version": 0 + "port-version": 1 }, "protobuf-c": { "baseline": "1.4.1", diff --git a/versions/p-/protobuf.json b/versions/p-/protobuf.json index 73ecbe3844..470827282b 100644 --- a/versions/p-/protobuf.json +++ b/versions/p-/protobuf.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8d742753b6c35666168a4178f0aae986740ae42c", + "version": "3.21.12", + "port-version": 1 + }, { "git-tree": "3b145508ba614fe26989b23f6317f15bf6467be4", "version": "3.21.12",