From a659d8d6594ec24baa9b1ffc51b06e8fd69a0199 Mon Sep 17 00:00:00 2001 From: Filippos Sotiropoulos Date: Wed, 11 Dec 2024 09:50:35 +0000 Subject: [PATCH 1/3] Modify universal-robots-client-library build to export files --- .../1.5.0.bcr.1/MODULE.bazel | 9 + .../1.5.0.bcr.1/patches/add_build_file.patch | 410 ++++++++++++++++++ .../1.5.0.bcr.1/patches/add_module_file.patch | 15 + .../1.5.0.bcr.1/presubmit.yml | 27 ++ .../1.5.0.bcr.1/source.json | 10 + .../metadata.json | 3 +- 6 files changed, 473 insertions(+), 1 deletion(-) create mode 100644 modules/universal-robots-client-library/1.5.0.bcr.1/MODULE.bazel create mode 100644 modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_build_file.patch create mode 100644 modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_module_file.patch create mode 100644 modules/universal-robots-client-library/1.5.0.bcr.1/presubmit.yml create mode 100644 modules/universal-robots-client-library/1.5.0.bcr.1/source.json diff --git a/modules/universal-robots-client-library/1.5.0.bcr.1/MODULE.bazel b/modules/universal-robots-client-library/1.5.0.bcr.1/MODULE.bazel new file mode 100644 index 00000000000..18ace243ec2 --- /dev/null +++ b/modules/universal-robots-client-library/1.5.0.bcr.1/MODULE.bazel @@ -0,0 +1,9 @@ +module( + name = "universal-robots-client-library", + version = "1.5.0.bcr.1", + compatibility_level = 1, +) + +# Most recent version from https://registry.bazel.build/modules/googletest +bazel_dep(name = "googletest", version = "1.15.2") +bazel_dep(name = "rules_license", version = "0.0.8") diff --git a/modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_build_file.patch b/modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_build_file.patch new file mode 100644 index 00000000000..d0c9d4754f1 --- /dev/null +++ b/modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_build_file.patch @@ -0,0 +1,410 @@ +diff --git a/BUILD b/1.4.0/BUILD +new file mode 100644 +index 00000000..8a192238 +--- /dev/null ++++ b/BUILD +@@ -0,0 +1,401 @@ ++load("@rules_license//rules:license.bzl", "license") ++ ++package( ++ default_applicable_licenses = [":license", ":license_bsd", ":license_zlib"], ++ default_visibility = ["//visibility:public"], ++) ++ ++exports_files([ ++ "LICENSE_apache_2_0", ++ "include/ur_client_library/queue/LICENSE.md", ++ "include/ur_client_library/queue/atomicops.h", ++ "examples/resources/rtde_input_recipe.txt", ++ "examples/resources/rtde_output_recipe.txt", ++ "resources/external_control.urscript", ++]) ++ ++license( ++ name = "license", ++ package_name = "universal-robots-client-library", ++ license_kinds = [ ++ "@rules_license//licenses/spdx:Apache-2.0", ++ ], ++ license_text = "LICENSE_apache_2_0", ++) ++ ++license( ++ name = "license_bsd", ++ package_name = "universal-robots-client-library", ++ license_kinds = [ ++ "@rules_license//licenses/spdx:BSD-2-Clause", ++ ], ++ license_text = "include/ur_client_library/queue/LICENSE.md", ++) ++ ++license( ++ name = "license_zlib", ++ package_name = "universal-robots-client-library", ++ license_kinds = [ ++ "@rules_license//licenses/spdx:Zlib", ++ ], ++ license_text = "include/ur_client_library/queue/atomicops.h", ++) ++ ++filegroup( ++ name = "rtde_files", ++ srcs = [ ++ "examples/resources/rtde_input_recipe.txt", ++ "examples/resources/rtde_output_recipe.txt", ++ "resources/external_control.urscript", ++ ], ++) ++ ++DEFAULT_OPTIONS = ["-fexceptions"] ++ ++PEDANTIC_OPTIONS = [ ++ "-fexceptions", ++ "-Wall", ++ "-pedantic", ++] ++ ++cc_library( ++ name = "ur_client_library", ++ srcs = glob( ++ [ ++ "src/**/*.cpp", ++ ], ++ ), ++ hdrs = glob( ++ [ ++ "include/**/*.h", ++ ], ++ exclude = [], ++ ), ++ copts = PEDANTIC_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ includes = ["include"], ++) ++ ++cc_binary( ++ name = "full_driver", ++ srcs = [ ++ "examples/full_driver.cpp", ++ ], ++ copts = PEDANTIC_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ ], ++) ++ ++cc_binary( ++ name = "primary_pipeline", ++ srcs = [ ++ "examples/primary_pipeline.cpp", ++ ], ++ copts = PEDANTIC_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ ], ++) ++ ++cc_binary( ++ name = "primary_pipeline_calibration", ++ srcs = [ ++ "examples/primary_pipeline_calibration.cpp", ++ ], ++ copts = PEDANTIC_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ ], ++) ++ ++cc_binary( ++ name = "rtde_client", ++ srcs = [ ++ "examples/rtde_client.cpp", ++ ], ++ copts = PEDANTIC_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ ], ++) ++ ++cc_binary( ++ name = "dashboard_example", ++ srcs = [ ++ "examples/dashboard_example.cpp", ++ ], ++ copts = PEDANTIC_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ ], ++) ++ ++cc_test( ++ name = "test_bin_parser", ++ srcs = ["tests/test_bin_parser.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_package_serializer", ++ srcs = ["tests/test_package_serializer.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_primary_parser", ++ srcs = ["tests/test_primary_parser.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_rtde_control_package_pause", ++ srcs = ["tests/test_rtde_control_package_pause.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_rtde_control_package_setup_inputs", ++ srcs = ["tests/test_rtde_control_package_setup_inputs.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_rtde_control_package_setup_outputs", ++ srcs = ["tests/test_rtde_control_package_setup_outputs.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_rtde_control_package_start", ++ srcs = ["tests/test_rtde_control_package_start.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_rtde_data_package", ++ srcs = ["tests/test_rtde_data_package.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_rtde_get_urcontrol_version", ++ srcs = ["tests/test_rtde_get_urcontrol_version.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_rtde_parser", ++ srcs = ["tests/test_rtde_parser.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_rtde_request_protocol_version", ++ srcs = ["tests/test_rtde_request_protocol_version.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ tags = [ ++ "requires-net:ipv4", ++ "requires-net:loopback", ++ ], ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_rtde_writer", ++ srcs = ["tests/test_rtde_writer.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ tags = [ ++ "notsan", ++ "requires-net:ipv4", ++ "requires-net:loopback", ++ ], ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_script_sender", ++ srcs = ["tests/test_script_sender.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ tags = [ ++ "requires-net:ipv4", ++ "requires-net:loopback", ++ ], ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_stream", ++ srcs = ["tests/test_stream.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ tags = [ ++ "notsan", ++ "requires-net:ipv4", ++ "requires-net:loopback", ++ ], ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_tcp_server", ++ srcs = ["tests/test_tcp_server.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ tags = [ ++ "notsan", ++ "requires-net:ipv4", ++ "requires-net:loopback", ++ ], ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_tcp_socket", ++ srcs = ["tests/test_tcp_socket.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ tags = [ ++ "notsan", ++ "requires-net:ipv4", ++ "requires-net:loopback", ++ ], ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_trajectory_point_interface", ++ srcs = ["tests/test_trajectory_point_interface.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ tags = [ ++ "notsan", ++ "requires-net:ipv4", ++ "requires-net:loopback", ++ ], ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) ++ ++cc_test( ++ name = "test_version_information", ++ srcs = ["tests/test_version_information.cpp"], ++ copts = ++ DEFAULT_OPTIONS, ++ features = ["-use_header_modules"], # Incompatible with -fexceptions. ++ deps = [ ++ ":ur_client_library", ++ "@googletest//:gtest", ++ "@googletest//:gtest_main", ++ ], ++) diff --git a/modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_module_file.patch b/modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_module_file.patch new file mode 100644 index 00000000000..be1a4c67adf --- /dev/null +++ b/modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_module_file.patch @@ -0,0 +1,15 @@ +diff --git a/MODULE.bazel b/MODULE.bazel +new file mode 100644 +index 00000000..32fbd345 +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -0,0 +1,9 @@ ++module( ++ name = "universal-robots-client-library", ++ version = "1.5.0.bcr.1", ++ compatibility_level = 1, ++) ++ ++# Most recent version from https://registry.bazel.build/modules/googletest ++bazel_dep(name = "googletest", version = "1.15.2") ++bazel_dep(name = "rules_license", version = "0.0.8") diff --git a/modules/universal-robots-client-library/1.5.0.bcr.1/presubmit.yml b/modules/universal-robots-client-library/1.5.0.bcr.1/presubmit.yml new file mode 100644 index 00000000000..74fe3d7360f --- /dev/null +++ b/modules/universal-robots-client-library/1.5.0.bcr.1/presubmit.yml @@ -0,0 +1,27 @@ +matrix: + platform: + - centos7 + - debian10 + - ubuntu2004 + bazel: + - 7.x +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_flags: + - '--cxxopt=-std=c++17' + - '--host_cxxopt=-std=c++17' + - "--copt=-pthread" + - "--linkopt=-pthread" + test_flags: + - '--cxxopt=-std=c++17' + - '--host_cxxopt=-std=c++17' + - "--copt=-pthread" + - "--linkopt=-pthread" + build_targets: + - '@universal-robots-client-library//:*' + test_targets: + - '@universal-robots-client-library//:test_bin_parser' + - '@universal-robots-client-library//:test_primary_parser' diff --git a/modules/universal-robots-client-library/1.5.0.bcr.1/source.json b/modules/universal-robots-client-library/1.5.0.bcr.1/source.json new file mode 100644 index 00000000000..693e98e3c38 --- /dev/null +++ b/modules/universal-robots-client-library/1.5.0.bcr.1/source.json @@ -0,0 +1,10 @@ +{ + "url": "https://github.com/UniversalRobots/Universal_Robots_Client_Library/archive/refs/tags/1.5.0.tar.gz", + "integrity": "sha256-sXk5vqpmqubhCGWJuybgoUuZc6txo822noYcU9gQ0mA=", + "strip_prefix": "Universal_Robots_Client_Library-1.5.0", + "patch_strip": 1, + "patches": { + "add_build_file.patch": "sha256-ftcGvz5bgieBEMyKqQ4Vw/kKc3zbEYxpzHGnvFZkvQI=", + "add_module_file.patch": "sha256-la5lnc3tFsqOyoClHdp/faVRwUF+SE6KMaMfoZKQBMk=" + } +} diff --git a/modules/universal-robots-client-library/metadata.json b/modules/universal-robots-client-library/metadata.json index 5a2cff6068b..a0bdf65aafd 100644 --- a/modules/universal-robots-client-library/metadata.json +++ b/modules/universal-robots-client-library/metadata.json @@ -13,7 +13,8 @@ "versions": [ "1.4.0", "1.4.0.bcr.1", - "1.5.0" + "1.5.0", + "1.5.0.bcr.1" ], "yanked_versions": {} } From 50574311f27421bffc2b02693fd1f1bfa97fdb40 Mon Sep 17 00:00:00 2001 From: Filippos Sotiropoulos Date: Wed, 11 Dec 2024 09:50:35 +0000 Subject: [PATCH 2/3] fix patch lines --- .../1.5.0.bcr.1/patches/add_build_file.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_build_file.patch b/modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_build_file.patch index d0c9d4754f1..7bbc74df20f 100644 --- a/modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_build_file.patch +++ b/modules/universal-robots-client-library/1.5.0.bcr.1/patches/add_build_file.patch @@ -3,7 +3,7 @@ new file mode 100644 index 00000000..8a192238 --- /dev/null +++ b/BUILD -@@ -0,0 +1,401 @@ +@@ -0,0 +1,404 @@ +load("@rules_license//rules:license.bzl", "license") + +package( From bf2b55bac138682c7029b84d371812f2d4f3b41a Mon Sep 17 00:00:00 2001 From: Filippos Sotiropoulos Date: Wed, 11 Dec 2024 09:50:35 +0000 Subject: [PATCH 3/3] update integrity --- modules/universal-robots-client-library/1.5.0.bcr.1/source.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/universal-robots-client-library/1.5.0.bcr.1/source.json b/modules/universal-robots-client-library/1.5.0.bcr.1/source.json index 693e98e3c38..95da4866b29 100644 --- a/modules/universal-robots-client-library/1.5.0.bcr.1/source.json +++ b/modules/universal-robots-client-library/1.5.0.bcr.1/source.json @@ -4,7 +4,7 @@ "strip_prefix": "Universal_Robots_Client_Library-1.5.0", "patch_strip": 1, "patches": { - "add_build_file.patch": "sha256-ftcGvz5bgieBEMyKqQ4Vw/kKc3zbEYxpzHGnvFZkvQI=", + "add_build_file.patch": "sha256-RNzPU2KRvqDrxDIdFodVV/eBdeLI2pJBIoFWuhFT8v8=", "add_module_file.patch": "sha256-la5lnc3tFsqOyoClHdp/faVRwUF+SE6KMaMfoZKQBMk=" } }