diff --git a/.devcontainer b/.devcontainer index 0ac4bac86f2f2..49be7504e19db 160000 --- a/.devcontainer +++ b/.devcontainer @@ -1 +1 @@ -Subproject commit 0ac4bac86f2f25110dcf941fb94820bd79c061ec +Subproject commit 49be7504e19dbad58d8166f98ef0c14b942ea58b diff --git a/.github/release-tag.json b/.github/release-tag.json new file mode 100644 index 0000000000000..032e8e8231e4e --- /dev/null +++ b/.github/release-tag.json @@ -0,0 +1,4 @@ +{ + "message": "xpro version 3.14.0.6 tag", + "tag": "xpv3.14.0.6" +} diff --git a/.github/release-tag.yml b/.github/release-tag.yml deleted file mode 100644 index 31320a63f2a90..0000000000000 --- a/.github/release-tag.yml +++ /dev/null @@ -1,2 +0,0 @@ -tag: xpv3.14.0.5 -message: "xpro version 3.14.0.5 tag" diff --git a/.github/workflows/xpbuild.yml b/.github/workflows/xpbuild.yml index 76b2701dea0c7..846ffc1d6547b 100644 --- a/.github/workflows/xpbuild.yml +++ b/.github/workflows/xpbuild.yml @@ -14,11 +14,15 @@ jobs: contents: read pull-requests: write packages: write - uses: externpro/externpro/.github/workflows/build-linux.yml@25.07.6 - secrets: inherit + uses: externpro/externpro/.github/workflows/build-linux.yml@26.01.1 + secrets: + automation_token: ${{ secrets.GHCR_TOKEN }} + with: {} macos: - uses: externpro/externpro/.github/workflows/build-macos.yml@25.07.6 + uses: externpro/externpro/.github/workflows/build-macos.yml@26.01.1 secrets: inherit + with: {} windows: - uses: externpro/externpro/.github/workflows/build-windows.yml@25.07.6 + uses: externpro/externpro/.github/workflows/build-windows.yml@26.01.1 secrets: inherit + with: {} diff --git a/.github/workflows/xpinit.yml b/.github/workflows/xpinit.yml new file mode 100644 index 0000000000000..4893a2bde4a6d --- /dev/null +++ b/.github/workflows/xpinit.yml @@ -0,0 +1,12 @@ +name: xpInit externpro +permissions: + contents: write + pull-requests: write + packages: write +on: + workflow_dispatch: +jobs: + init: + uses: externpro/externpro/.github/workflows/init-externpro.yml@main + secrets: + automation_token: ${{ secrets.XPRO_TOKEN }} diff --git a/.github/workflows/xprelease.yml b/.github/workflows/xprelease.yml index a2eb28224cada..ec3022d2a210b 100644 --- a/.github/workflows/xprelease.yml +++ b/.github/workflows/xprelease.yml @@ -34,7 +34,7 @@ jobs: # Upload build artifacts as release assets release-from-build: if: github.event_name == 'workflow_dispatch' - uses: externpro/externpro/.github/workflows/release-from-build.yml@25.07.6 + uses: externpro/externpro/.github/workflows/release-from-build.yml@26.01.1 with: workflow_run_url: ${{ github.event.inputs.workflow_run_url }} permissions: diff --git a/.github/workflows/xptag.yml b/.github/workflows/xptag.yml index b5ce9503a2a76..29462130eed07 100644 --- a/.github/workflows/xptag.yml +++ b/.github/workflows/xptag.yml @@ -8,9 +8,9 @@ on: jobs: tag: if: ${{ github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'xpro' && contains(github.event.pull_request.labels.*.name, 'release:tag') }} - uses: externpro/externpro/.github/workflows/tag-release.yml@25.07.6 + uses: externpro/externpro/.github/workflows/tag-release.yml@26.01.1 with: merge_sha: ${{ github.event.pull_request.merge_commit_sha }} pr_number: ${{ github.event.pull_request.number }} secrets: - workflow_write_token: ${{ secrets.XPUPDATE_TOKEN }} + automation_token: ${{ secrets.XPRO_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index fb2266a0d128c..0387ebf849f48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.1.3...3.31) -set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES .devcontainer/cmake/xproinc.cmake) +cmake_minimum_required(VERSION 3.1.3...4.3) project(protobuf_root) add_subdirectory(cmake) diff --git a/CMakePresets.json b/CMakePresets.json index f82cfdd2cf630..28efa3978f891 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -3,6 +3,7 @@ "include": [ ".devcontainer/cmake/presets/xpLinuxNinja.json", ".devcontainer/cmake/presets/xpDarwinNinja.json", - ".devcontainer/cmake/presets/xpWindowsVs2022.json" + ".devcontainer/cmake/presets/xpMswVs2022.json", + ".devcontainer/cmake/presets/xpMswVs2026.json" ] } diff --git a/CMakePresetsBase.json b/CMakePresetsBase.json index 4489d79c34cef..c54ade998adeb 100644 --- a/CMakePresetsBase.json +++ b/CMakePresetsBase.json @@ -6,7 +6,7 @@ "hidden": true, "binaryDir": "${sourceDir}/_bld-${presetName}", "cacheVariables": { - "XP_NAMESPACE": "xpro" + "CMAKE_EXPERIMENTAL_GENERATE_SBOM": "ca494ed3-b261-4205-a01f-603c95e4cae0" } } ], diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 248c8ec1721f7..73e50a7a836db 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1,5 +1,5 @@ # Minimum CMake required -cmake_minimum_required(VERSION 3.1.3...3.31) +cmake_minimum_required(VERSION 3.1.3...4.3) if(protobuf_VERBOSE) message(STATUS "Protocol Buffers Configuring...") @@ -56,8 +56,13 @@ cmake_dependent_option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime librari "NOT protobuf_BUILD_SHARED_LIBS" OFF) set(protobuf_WITH_ZLIB_DEFAULT ON) option(protobuf_WITH_ZLIB "Build with zlib support" ${protobuf_WITH_ZLIB_DEFAULT}) +if(DEFINED CMAKE_DEBUG_POSTFIX) + set(protobuf_DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} + CACHE STRING "Default debug postfix") +else() set(protobuf_DEBUG_POSTFIX "d" CACHE STRING "Default debug postfix") +endif() mark_as_advanced(protobuf_DEBUG_POSTFIX) # User options include(protobuf-options.cmake) @@ -116,32 +121,6 @@ if(protobuf_VERBOSE) message(STATUS "]") endif() -if(DEFINED XP_NAMESPACE) - set(CMAKE_NAMESPACE ${XP_NAMESPACE}) - string(JOIN "\n" EXT1 - "set(FPHSA_NAME_MISMATCHED TRUE) # FIND_PACKAGE_HANDLE_STANDARD_ARGS NAME_MISMATCHED" - "set(protobuf_MODULE_COMPATIBLE ON) # necessary for GENERATE_PROTOBUF_CPP" - "" - ) - string(JOIN "\n" EXT3 - "set(PROTOBUF_PROTOC_EXECUTABLE ${CMAKE_NAMESPACE}::protoc) # TRICKY: match name in -module.cmake" - "get_target_property(PROTOBUF_INCLUDE_DIR ${CMAKE_NAMESPACE}::libprotobuf INTERFACE_INCLUDE_DIRECTORIES)" - "list(APPEND reqVars PROTOBUF_INCLUDE_DIR PROTOBUF_PROTOC_EXECUTABLE)" - "" - ) - xpExternPackage(REPO_NAME protobuf NAMESPACE ${XP_NAMESPACE} ALIAS_NAMESPACE protobuf - TARGETS_FILE protobuf-config EXE protoc LIBRARIES libprotobuf - BASE ${protobuf_BASE_TAG} XPDIFF "patch" DEPS zlib - WEB "https://developers.google.com/protocol-buffers/" UPSTREAM "github.com/protocolbuffers/protobuf" - DESC "language-neutral, platform-neutral extensible mechanism for serializing structured data" - LICENSE "[BSD-3-Clause](https://github.com/protocolbuffers/protobuf/blob/v3.14.0/LICENSE 'BSD 3-Clause New or Revised License')" - ) - set(CMAKE_OPT_INSTALL FALSE) -else() - set(CMAKE_NAMESPACE protobuf) - set(CMAKE_OPT_INSTALL TRUE) -endif() - add_definitions(-DGOOGLE_PROTOBUF_CMAKE_BUILD) find_package(Threads REQUIRED) @@ -312,6 +291,30 @@ if (protobuf_BUILD_CONFORMANCE) include(conformance.cmake) endif (protobuf_BUILD_CONFORMANCE) +if(COMMAND xpExternPackage) + string(JOIN "\n" EXT1 + "set(FPHSA_NAME_MISMATCHED TRUE) # FIND_PACKAGE_HANDLE_STANDARD_ARGS NAME_MISMATCHED" + "set(protobuf_MODULE_COMPATIBLE ON) # necessary for GENERATE_PROTOBUF_CPP" + "" + ) + string(JOIN "\n" EXT3 + "set(PROTOBUF_PROTOC_EXECUTABLE ${PROJECT_NAME}::protoc) # TRICKY: match name in -module.cmake" + "get_target_property(PROTOBUF_INCLUDE_DIR ${PROJECT_NAME}::libprotobuf INTERFACE_INCLUDE_DIRECTORIES)" + "list(APPEND reqVars PROTOBUF_INCLUDE_DIR PROTOBUF_PROTOC_EXECUTABLE)" + "" + ) + xpExternPackage(REPO_NAME protobuf TARGETS_FILE protobuf-config-orig EXPORT protobuf-targets + EXE protoc LIBRARIES libprotobuf FIND_XPRO_CMAKE + BASE ${protobuf_BASE_TAG} XPDIFF "patch" + WEB "https://developers.google.com/protocol-buffers/" UPSTREAM "github.com/protocolbuffers/protobuf" + DESC "language-neutral, platform-neutral extensible mechanism for serializing structured data" + LICENSE "[BSD-3-Clause](https://github.com/protocolbuffers/protobuf/blob/v3.14.0/LICENSE 'BSD 3-Clause New or Revised License')" + ) + set(CMAKE_OPT_INSTALL FALSE) +else() + set(CMAKE_OPT_INSTALL TRUE) +endif() + include(install.cmake) if (protobuf_BUILD_EXAMPLES) diff --git a/cmake/install.cmake b/cmake/install.cmake index 4ea2c373a0408..a7a2d542720e8 100644 --- a/cmake/install.cmake +++ b/cmake/install.cmake @@ -116,7 +116,7 @@ endif() mark_as_advanced(CMAKE_INSTALL_CMAKEDIR) configure_file(protobuf-config.cmake.in - ${CMAKE_INSTALL_CMAKEDIR}/protobuf-config.cmake @ONLY) + ${CMAKE_INSTALL_CMAKEDIR}/protobuf-config-orig.cmake @ONLY) configure_file(protobuf-config-version.cmake.in ${CMAKE_INSTALL_CMAKEDIR}/protobuf-config-version.cmake @ONLY) configure_file(protobuf-module.cmake.in @@ -128,19 +128,19 @@ configure_file(protobuf-options.cmake if (protobuf_BUILD_PROTOC_BINARIES) export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc - NAMESPACE ${CMAKE_NAMESPACE}:: + NAMESPACE protobuf:: FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake ) else (protobuf_BUILD_PROTOC_BINARIES) export(TARGETS libprotobuf-lite libprotobuf - NAMESPACE ${CMAKE_NAMESPACE}:: + NAMESPACE protobuf:: FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake ) endif (protobuf_BUILD_PROTOC_BINARIES) install(EXPORT protobuf-targets DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" - NAMESPACE ${CMAKE_NAMESPACE}:: + NAMESPACE protobuf:: COMPONENT protobuf-export) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}/ diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake index 0c1e29c0e658d..6d325d5dcad42 100644 --- a/cmake/libprotobuf-lite.cmake +++ b/cmake/libprotobuf-lite.cmake @@ -81,5 +81,5 @@ endif() set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite - DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}") -add_library(${CMAKE_NAMESPACE}::libprotobuf-lite ALIAS libprotobuf-lite) + DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") +add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite) diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake index a6b961ebc98bf..a5be494fb702e 100644 --- a/cmake/libprotobuf.cmake +++ b/cmake/libprotobuf.cmake @@ -133,5 +133,5 @@ endif() set_target_properties(libprotobuf PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf - DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}") -add_library(${CMAKE_NAMESPACE}::libprotobuf ALIAS libprotobuf) + DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") +add_library(protobuf::libprotobuf ALIAS libprotobuf) diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake index bedf05a1c540c..b71f2f1ba9a69 100644 --- a/cmake/libprotoc.cmake +++ b/cmake/libprotoc.cmake @@ -177,5 +177,6 @@ set_target_properties(libprotoc PROPERTIES COMPILE_DEFINITIONS LIBPROTOC_EXPORTS VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protoc - DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}") -add_library(${CMAKE_NAMESPACE}::libprotoc ALIAS libprotoc) + DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") +add_library(protobuf::libprotoc ALIAS libprotoc) + diff --git a/cmake/protobuf-config.cmake.in b/cmake/protobuf-config.cmake.in index a7c93a90b297e..fac5efe44077e 100644 --- a/cmake/protobuf-config.cmake.in +++ b/cmake/protobuf-config.cmake.in @@ -129,9 +129,9 @@ function(protobuf_generate) add_custom_command( OUTPUT ${_generated_srcs} - COMMAND @CMAKE_NAMESPACE@::protoc + COMMAND protobuf::protoc ARGS --${protobuf_generate_LANGUAGE}_out ${_dll_export_decl}${protobuf_generate_PROTOC_OUT_DIR} ${_plugin} ${_protobuf_include_path} ${_abs_file} - DEPENDS ${_abs_file} @CMAKE_NAMESPACE@::protoc + DEPENDS ${_abs_file} protobuf::protoc COMMENT "Running ${protobuf_generate_LANGUAGE} protocol buffer compiler on ${_proto}" VERBATIM ) endforeach() diff --git a/cmake/protobuf-module.cmake.in b/cmake/protobuf-module.cmake.in index 3d7f26391787f..810256e54cfb4 100644 --- a/cmake/protobuf-module.cmake.in +++ b/cmake/protobuf-module.cmake.in @@ -95,13 +95,13 @@ function(_protobuf_find_libraries name filename) # Honor cache entry used by CMake 3.5 and lower. set(${name}_LIBRARIES "${${name}_LIBRARY}" PARENT_SCOPE) else() - get_target_property(${name}_LIBRARY_RELEASE @CMAKE_NAMESPACE@::lib${filename} + get_target_property(${name}_LIBRARY_RELEASE protobuf::lib${filename} LOCATION_RELEASE) - get_target_property(${name}_LIBRARY_RELWITHDEBINFO @CMAKE_NAMESPACE@::lib${filename} + get_target_property(${name}_LIBRARY_RELWITHDEBINFO protobuf::lib${filename} LOCATION_RELWITHDEBINFO) - get_target_property(${name}_LIBRARY_MINSIZEREL @CMAKE_NAMESPACE@::lib${filename} + get_target_property(${name}_LIBRARY_MINSIZEREL protobuf::lib${filename} LOCATION_MINSIZEREL) - get_target_property(${name}_LIBRARY_DEBUG @CMAKE_NAMESPACE@::lib${filename} + get_target_property(${name}_LIBRARY_DEBUG protobuf::lib${filename} LOCATION_DEBUG) select_library_configurations(${name}) @@ -144,26 +144,26 @@ if(UNIX) endif() # Set the include directory -get_target_property(Protobuf_INCLUDE_DIRS @CMAKE_NAMESPACE@::libprotobuf +get_target_property(Protobuf_INCLUDE_DIRS protobuf::libprotobuf INTERFACE_INCLUDE_DIRECTORIES) # Set the protoc Executable -get_target_property(Protobuf_PROTOC_EXECUTABLE @CMAKE_NAMESPACE@::protoc +get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc IMPORTED_LOCATION_RELEASE) if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}") - get_target_property(Protobuf_PROTOC_EXECUTABLE @CMAKE_NAMESPACE@::protoc + get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc IMPORTED_LOCATION_RELWITHDEBINFO) endif() if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}") - get_target_property(Protobuf_PROTOC_EXECUTABLE @CMAKE_NAMESPACE@::protoc + get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc IMPORTED_LOCATION_MINSIZEREL) endif() if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}") - get_target_property(Protobuf_PROTOC_EXECUTABLE @CMAKE_NAMESPACE@::protoc + get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc IMPORTED_LOCATION_DEBUG) endif() if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}") - get_target_property(Protobuf_PROTOC_EXECUTABLE @CMAKE_NAMESPACE@::protoc + get_target_property(Protobuf_PROTOC_EXECUTABLE protobuf::protoc IMPORTED_LOCATION_NOCONFIG) endif() diff --git a/cmake/protoc.cmake b/cmake/protoc.cmake index 6ade1ca4c02cf..1ba619483b0a6 100644 --- a/cmake/protoc.cmake +++ b/cmake/protoc.cmake @@ -10,7 +10,7 @@ endif() add_executable(protoc ${protoc_files} ${protoc_rc_files}) target_link_libraries(protoc libprotoc libprotobuf) -add_executable(${CMAKE_NAMESPACE}::protoc ALIAS protoc) +add_executable(protobuf::protoc ALIAS protoc) set_target_properties(protoc PROPERTIES - DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}") + DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 726f7440cd7b9..3e8e65414e1d5 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -41,7 +41,7 @@ foreach(example add_person list_people) target_include_directories(${executable_name} PUBLIC ${PROTOBUF_INCLUDE_DIRS}) target_link_libraries(${executable_name} ${PROTOBUF_LIBRARIES}) else() - target_link_libraries(${executable_name} ${CMAKE_NAMESPACE}::libprotobuf) + target_link_libraries(${executable_name} protobuf::libprotobuf) protobuf_generate(TARGET ${executable_name}) endif() diff --git a/xprodeps.md b/xprodeps.md index 402c16584e315..ff32736404683 100644 --- a/xprodeps.md +++ b/xprodeps.md @@ -3,7 +3,7 @@ |project|license [^_l]|description [dependencies]|version|source|diff [^_d]| |-------|-------------|--------------------------|-------|------|----------| |[protobuf](https://developers.google.com/protocol-buffers/)|[BSD-3-Clause](https://github.com/protocolbuffers/protobuf/blob/v3.14.0/LICENSE 'BSD 3-Clause New or Revised License')|language-neutral, platform-neutral extensible mechanism for serializing structured data [deps: _zlib_]| |[upstream](https://github.com/protocolbuffers/protobuf 'github.com/protocolbuffers/protobuf')| [patch]| -|[zlib](https://zlib.net 'zlib website')|[permissive](https://zlib.net/zlib_license.html 'zlib/libpng license, see https://en.wikipedia.org/wiki/Zlib_License')|compression library|[xpv1.3.1.4](https://github.com/externpro/zlib/releases/tag/xpv1.3.1.4 'release')|[repo](https://github.com/externpro/zlib 'github.com/externpro/zlib') [upstream](https://github.com/madler/zlib 'github.com/madler/zlib')|[diff](https://github.com/externpro/zlib/compare/v1.3.1...xpv1.3.1.4 'github.com/externpro/zlib/compare/v1.3.1...xpv1.3.1.4') [patch]| +|[zlib](https://zlib.net/ 'zlib website')|[Zlib](https://zlib.net/zlib_license.html 'zlib/libpng license, see https://en.wikipedia.org/wiki/Zlib_License')|a general-purpose lossless data-compression library|[xpv1.3.2.1](https://github.com/externpro/zlib/releases/tag/xpv1.3.2.1 'release')|[repo](https://github.com/externpro/zlib 'github.com/externpro/zlib') [upstream](https://github.com/madler/zlib 'github.com/madler/zlib')|[diff](https://github.com/externpro/zlib/compare/v1.3.2...xpv1.3.2.1 'github.com/externpro/zlib/compare/v1.3.2...xpv1.3.2.1') [patch]| ![deps](xprodeps.svg 'dependencies')