From 6cb222b2170351f8019954dec52be02cb1013f41 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Wed, 2 Oct 2024 16:11:33 -0400 Subject: [PATCH 01/32] Move GHA prereqs to examples and refactor --- .../setup/ros_humble}/binary_install_prereqs | 7 -- .../setup/ubuntu/binary_install_prereqs | 86 +++++++++++++++++++ .../setup/ubuntu/binary_install_prereqs | 85 ++++++++++++++++++ .../setup/ubuntu/binary_install_prereqs | 85 ++++++++++++++++++ 4 files changed, 256 insertions(+), 7 deletions(-) rename {scripts/setup/linux/ubuntu/jammy => drake_ament_cmake_installed/setup/ros_humble}/binary_install_prereqs (97%) create mode 100644 drake_bazel_download/setup/ubuntu/binary_install_prereqs create mode 100644 drake_catkin_installed/setup/ubuntu/binary_install_prereqs create mode 100644 drake_cmake_installed/setup/ubuntu/binary_install_prereqs diff --git a/scripts/setup/linux/ubuntu/jammy/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs similarity index 97% rename from scripts/setup/linux/ubuntu/jammy/binary_install_prereqs rename to drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index 5e712361..f30d816a 100755 --- a/scripts/setup/linux/ubuntu/jammy/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -108,10 +108,3 @@ if [[ ${ros_humble} -eq 1 ]]; then ros-humble-ament-lint-auto EOF ) -else - apt-get install --no-install-recommends $(cat <&2 + exit 2 +fi + +apt-get update +apt-get install --no-install-recommends lsb-release + +if [[ "$(lsb_release -sc)" != 'jammy' ]]; then + echo 'This script requires Ubuntu 22.04 (Jammy)' >&2 + exit 3 +fi + +apt-get install --no-install-recommends $(cat < /etc/apt/sources.list.d/bazel.list + +apt-get update +apt-get install --no-install-recommends $(cat <&2 + exit 2 +fi + +apt-get update +apt-get install --no-install-recommends lsb-release + +if [[ "$(lsb_release -sc)" != 'jammy' ]]; then + echo 'This script requires Ubuntu 22.04 (Jammy)' >&2 + exit 3 +fi + +apt-get install --no-install-recommends $(cat < /etc/apt/sources.list.d/bazel.list + +apt-get update +apt-get install --no-install-recommends $(cat <&2 + exit 2 +fi + +apt-get update +apt-get install --no-install-recommends lsb-release + +if [[ "$(lsb_release -sc)" != 'jammy' ]]; then + echo 'This script requires Ubuntu 22.04 (Jammy)' >&2 + exit 3 +fi + +apt-get install --no-install-recommends $(cat < /etc/apt/sources.list.d/bazel.list + +apt-get update +apt-get install --no-install-recommends $(cat < Date: Wed, 2 Oct 2024 16:32:14 -0400 Subject: [PATCH 02/32] Use new example prereqs path for ubuntu setups --- drake_ament_cmake_installed/.github/ros_humble_setup | 2 +- drake_bazel_download/.github/ubuntu_setup | 2 +- drake_catkin_installed/.github/ubuntu_setup | 2 +- drake_cmake_installed/.github/ubuntu_setup | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drake_ament_cmake_installed/.github/ros_humble_setup b/drake_ament_cmake_installed/.github/ros_humble_setup index 3a0c2a73..0f030d51 100755 --- a/drake_ament_cmake_installed/.github/ros_humble_setup +++ b/drake_ament_cmake_installed/.github/ros_humble_setup @@ -8,4 +8,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -./scripts/setup/linux/ubuntu/jammy/binary_install_prereqs --ros-humble +./drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs --ros-humble diff --git a/drake_bazel_download/.github/ubuntu_setup b/drake_bazel_download/.github/ubuntu_setup index 9aa94662..e1e16fb7 100755 --- a/drake_bazel_download/.github/ubuntu_setup +++ b/drake_bazel_download/.github/ubuntu_setup @@ -8,4 +8,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -./scripts/setup/linux/ubuntu/jammy/binary_install_prereqs \ No newline at end of file +./drake_bazel_download/setup/ubuntu/binary_install_prereqs \ No newline at end of file diff --git a/drake_catkin_installed/.github/ubuntu_setup b/drake_catkin_installed/.github/ubuntu_setup index 9aa94662..f86ae63f 100755 --- a/drake_catkin_installed/.github/ubuntu_setup +++ b/drake_catkin_installed/.github/ubuntu_setup @@ -8,4 +8,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -./scripts/setup/linux/ubuntu/jammy/binary_install_prereqs \ No newline at end of file +./drake_catkin_installed/setup/ubuntu/binary_install_prereqs \ No newline at end of file diff --git a/drake_cmake_installed/.github/ubuntu_setup b/drake_cmake_installed/.github/ubuntu_setup index 6039181f..3a2e6dfe 100755 --- a/drake_cmake_installed/.github/ubuntu_setup +++ b/drake_cmake_installed/.github/ubuntu_setup @@ -8,4 +8,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -./scripts/setup/linux/ubuntu/jammy/binary_install_prereqs +./drake_cmake_installed/setup/ubuntu/binary_install_prereqs From 81eaf40969ba55e896cbc2052914ee1deae26edb Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Wed, 2 Oct 2024 16:54:29 -0400 Subject: [PATCH 03/32] Add exec perms to prereqs and fi to ros prereq --- .../setup/ros_humble/binary_install_prereqs | 1 + drake_bazel_download/setup/ubuntu/binary_install_prereqs | 0 drake_catkin_installed/setup/ubuntu/binary_install_prereqs | 0 drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 0 4 files changed, 1 insertion(+) mode change 100644 => 100755 drake_bazel_download/setup/ubuntu/binary_install_prereqs mode change 100644 => 100755 drake_catkin_installed/setup/ubuntu/binary_install_prereqs mode change 100644 => 100755 drake_cmake_installed/setup/ubuntu/binary_install_prereqs diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index f30d816a..16fbe2d8 100755 --- a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -108,3 +108,4 @@ if [[ ${ros_humble} -eq 1 ]]; then ros-humble-ament-lint-auto EOF ) +fi \ No newline at end of file diff --git a/drake_bazel_download/setup/ubuntu/binary_install_prereqs b/drake_bazel_download/setup/ubuntu/binary_install_prereqs old mode 100644 new mode 100755 diff --git a/drake_catkin_installed/setup/ubuntu/binary_install_prereqs b/drake_catkin_installed/setup/ubuntu/binary_install_prereqs old mode 100644 new mode 100755 diff --git a/drake_cmake_installed/setup/ubuntu/binary_install_prereqs b/drake_cmake_installed/setup/ubuntu/binary_install_prereqs old mode 100644 new mode 100755 From b9c525ea7c44ed834093f26a2d21b94052248173 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Wed, 2 Oct 2024 17:02:11 -0400 Subject: [PATCH 04/32] Remove bazel from non bazel examples --- .../setup/ros_humble/binary_install_prereqs | 1 - drake_catkin_installed/setup/ubuntu/binary_install_prereqs | 1 - drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 1 - 3 files changed, 3 deletions(-) diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index 16fbe2d8..f746eb9b 100755 --- a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -82,7 +82,6 @@ echo 'deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8' \ apt-get update apt-get install --no-install-recommends $(cat < Date: Wed, 2 Oct 2024 17:07:59 -0400 Subject: [PATCH 05/32] Remove catkin from non catkin examples --- drake_bazel_download/setup/ubuntu/binary_install_prereqs | 1 - drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 1 - 2 files changed, 2 deletions(-) diff --git a/drake_bazel_download/setup/ubuntu/binary_install_prereqs b/drake_bazel_download/setup/ubuntu/binary_install_prereqs index 2904c3ca..f343da73 100755 --- a/drake_bazel_download/setup/ubuntu/binary_install_prereqs +++ b/drake_bazel_download/setup/ubuntu/binary_install_prereqs @@ -79,7 +79,6 @@ EOF locale-gen en_US.UTF-8 apt-get install --no-install-recommends $(cat < Date: Wed, 2 Oct 2024 17:13:26 -0400 Subject: [PATCH 06/32] Try to remove python3-pkg-resources --- drake_bazel_download/setup/ubuntu/binary_install_prereqs | 5 +---- drake_catkin_installed/setup/ubuntu/binary_install_prereqs | 1 - drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 5 +---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drake_bazel_download/setup/ubuntu/binary_install_prereqs b/drake_bazel_download/setup/ubuntu/binary_install_prereqs index f343da73..28161776 100755 --- a/drake_bazel_download/setup/ubuntu/binary_install_prereqs +++ b/drake_bazel_download/setup/ubuntu/binary_install_prereqs @@ -78,8 +78,5 @@ EOF locale-gen en_US.UTF-8 -apt-get install --no-install-recommends $(cat < Date: Wed, 2 Oct 2024 17:25:28 -0400 Subject: [PATCH 07/32] Remove locales --- .../setup/ros_humble/binary_install_prereqs | 3 --- drake_bazel_download/setup/ubuntu/binary_install_prereqs | 8 +------- .../setup/ubuntu/binary_install_prereqs | 3 --- drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 7 +------ 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index f746eb9b..9143578c 100755 --- a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -83,14 +83,11 @@ echo 'deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8' \ apt-get update apt-get install --no-install-recommends $(cat < Date: Wed, 2 Oct 2024 19:00:08 -0400 Subject: [PATCH 08/32] Remove python3-all-dev --- .../setup/ros_humble/binary_install_prereqs | 1 - drake_bazel_download/setup/ubuntu/binary_install_prereqs | 1 - drake_catkin_installed/setup/ubuntu/binary_install_prereqs | 1 - drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 1 - 4 files changed, 4 deletions(-) diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index 9143578c..7676cead 100755 --- a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -84,7 +84,6 @@ apt-get update apt-get install --no-install-recommends $(cat < Date: Wed, 2 Oct 2024 19:05:29 -0400 Subject: [PATCH 09/32] Add back python3-all-dev for cmake installed --- drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 1 + 1 file changed, 1 insertion(+) diff --git a/drake_cmake_installed/setup/ubuntu/binary_install_prereqs b/drake_cmake_installed/setup/ubuntu/binary_install_prereqs index cffa176d..fb5c1fd3 100755 --- a/drake_cmake_installed/setup/ubuntu/binary_install_prereqs +++ b/drake_cmake_installed/setup/ubuntu/binary_install_prereqs @@ -70,5 +70,6 @@ apt-get update apt-get install --no-install-recommends $(cat < Date: Thu, 3 Oct 2024 09:37:12 -0400 Subject: [PATCH 10/32] Remove pkg-config from binary prereqs --- .../setup/ros_humble/binary_install_prereqs | 1 - drake_bazel_download/setup/ubuntu/binary_install_prereqs | 1 - drake_catkin_installed/setup/ubuntu/binary_install_prereqs | 1 - drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 1 - 4 files changed, 4 deletions(-) diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index 7676cead..d5db7562 100755 --- a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -83,7 +83,6 @@ echo 'deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8' \ apt-get update apt-get install --no-install-recommends $(cat < Date: Thu, 3 Oct 2024 09:44:14 -0400 Subject: [PATCH 11/32] Remove libgflags-dev from binary prereqs --- .../setup/ros_humble/binary_install_prereqs | 4 ---- drake_bazel_download/setup/ubuntu/binary_install_prereqs | 1 - drake_catkin_installed/setup/ubuntu/binary_install_prereqs | 4 ---- drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 1 - 4 files changed, 10 deletions(-) diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index d5db7562..f6bab3ea 100755 --- a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -81,10 +81,6 @@ echo 'deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8' \ > /etc/apt/sources.list.d/bazel.list apt-get update -apt-get install --no-install-recommends $(cat < /etc/apt/sources.list.d/bazel.list apt-get update -apt-get install --no-install-recommends $(cat < Date: Thu, 3 Oct 2024 09:49:37 -0400 Subject: [PATCH 12/32] Add back libgflags-dev for cmake_installed --- drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 1 + 1 file changed, 1 insertion(+) diff --git a/drake_cmake_installed/setup/ubuntu/binary_install_prereqs b/drake_cmake_installed/setup/ubuntu/binary_install_prereqs index 2dd6bd62..0f485b5a 100755 --- a/drake_cmake_installed/setup/ubuntu/binary_install_prereqs +++ b/drake_cmake_installed/setup/ubuntu/binary_install_prereqs @@ -68,6 +68,7 @@ echo 'deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8' \ apt-get update apt-get install --no-install-recommends $(cat < Date: Thu, 3 Oct 2024 12:37:58 -0400 Subject: [PATCH 13/32] Remove bazel fetch from non bazel examples --- .../setup/ros_humble/binary_install_prereqs | 6 ------ drake_catkin_installed/setup/ubuntu/binary_install_prereqs | 5 ----- drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 4 ---- 3 files changed, 15 deletions(-) diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index f6bab3ea..8259f455 100755 --- a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -76,12 +76,6 @@ echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" apt-get install --no-install-recommends gnupg -apt-key adv --fetch-keys https://bazel.build/bazel-release.pub.gpg -echo 'deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8' \ - > /etc/apt/sources.list.d/bazel.list - -apt-get update - if [[ ${ros_humble} -eq 1 ]]; then apt-key adv --fetch-keys \ https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc diff --git a/drake_catkin_installed/setup/ubuntu/binary_install_prereqs b/drake_catkin_installed/setup/ubuntu/binary_install_prereqs index b3935ba1..abbea0ce 100755 --- a/drake_catkin_installed/setup/ubuntu/binary_install_prereqs +++ b/drake_catkin_installed/setup/ubuntu/binary_install_prereqs @@ -62,12 +62,7 @@ echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" apt-get install --no-install-recommends gnupg -apt-key adv --fetch-keys https://bazel.build/bazel-release.pub.gpg -echo 'deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8' \ - > /etc/apt/sources.list.d/bazel.list - apt-get update - apt-get install --no-install-recommends $(cat < /etc/apt/sources.list.d/bazel.list - apt-get update apt-get install --no-install-recommends $(cat < Date: Thu, 3 Oct 2024 12:52:21 -0400 Subject: [PATCH 14/32] Remove gnupg --- .../setup/ros_humble/binary_install_prereqs | 2 -- drake_bazel_download/setup/ubuntu/binary_install_prereqs | 2 -- drake_catkin_installed/setup/ubuntu/binary_install_prereqs | 3 --- drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 2 -- 4 files changed, 9 deletions(-) diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index 8259f455..fa3b7244 100755 --- a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -74,8 +74,6 @@ echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" /opt/drake/share/drake/setup/install_prereqs -apt-get install --no-install-recommends gnupg - if [[ ${ros_humble} -eq 1 ]]; then apt-key adv --fetch-keys \ https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc diff --git a/drake_bazel_download/setup/ubuntu/binary_install_prereqs b/drake_bazel_download/setup/ubuntu/binary_install_prereqs index ae499368..761218a8 100755 --- a/drake_bazel_download/setup/ubuntu/binary_install_prereqs +++ b/drake_bazel_download/setup/ubuntu/binary_install_prereqs @@ -60,8 +60,6 @@ echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" /opt/drake/share/drake/setup/install_prereqs -apt-get install --no-install-recommends gnupg - apt-key adv --fetch-keys https://bazel.build/bazel-release.pub.gpg echo 'deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8' \ > /etc/apt/sources.list.d/bazel.list diff --git a/drake_catkin_installed/setup/ubuntu/binary_install_prereqs b/drake_catkin_installed/setup/ubuntu/binary_install_prereqs index abbea0ce..32f48cee 100755 --- a/drake_catkin_installed/setup/ubuntu/binary_install_prereqs +++ b/drake_catkin_installed/setup/ubuntu/binary_install_prereqs @@ -60,9 +60,6 @@ echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" /opt/drake/share/drake/setup/install_prereqs -apt-get install --no-install-recommends gnupg - -apt-get update apt-get install --no-install-recommends $(cat < Date: Thu, 3 Oct 2024 13:13:17 -0400 Subject: [PATCH 15/32] Add back gnupg for ros and bazel download --- .../setup/ros_humble/binary_install_prereqs | 2 ++ drake_bazel_download/setup/ubuntu/binary_install_prereqs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index fa3b7244..8259f455 100755 --- a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -74,6 +74,8 @@ echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" /opt/drake/share/drake/setup/install_prereqs +apt-get install --no-install-recommends gnupg + if [[ ${ros_humble} -eq 1 ]]; then apt-key adv --fetch-keys \ https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc diff --git a/drake_bazel_download/setup/ubuntu/binary_install_prereqs b/drake_bazel_download/setup/ubuntu/binary_install_prereqs index 761218a8..ae499368 100755 --- a/drake_bazel_download/setup/ubuntu/binary_install_prereqs +++ b/drake_bazel_download/setup/ubuntu/binary_install_prereqs @@ -60,6 +60,8 @@ echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" /opt/drake/share/drake/setup/install_prereqs +apt-get install --no-install-recommends gnupg + apt-key adv --fetch-keys https://bazel.build/bazel-release.pub.gpg echo 'deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8' \ > /etc/apt/sources.list.d/bazel.list From 3851cacdaacb4774af55301eaffdedfd19537910 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Thu, 3 Oct 2024 13:20:00 -0400 Subject: [PATCH 16/32] Remove echo VERSION.TXT --- .../setup/ros_humble/binary_install_prereqs | 3 --- drake_bazel_download/setup/ubuntu/binary_install_prereqs | 3 --- drake_catkin_installed/setup/ubuntu/binary_install_prereqs | 3 --- drake_cmake_installed/setup/ubuntu/binary_install_prereqs | 3 --- 4 files changed, 12 deletions(-) diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs index 8259f455..f8129af2 100755 --- a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs +++ b/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs @@ -69,9 +69,6 @@ wget -O drake.tar.gz \ trap 'rm -f drake.tar.gz' EXIT tar -xf drake.tar.gz -C /opt -# Show version for debugging; use echo for newline / readability. -echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" - /opt/drake/share/drake/setup/install_prereqs apt-get install --no-install-recommends gnupg diff --git a/drake_bazel_download/setup/ubuntu/binary_install_prereqs b/drake_bazel_download/setup/ubuntu/binary_install_prereqs index ae499368..a9af9468 100755 --- a/drake_bazel_download/setup/ubuntu/binary_install_prereqs +++ b/drake_bazel_download/setup/ubuntu/binary_install_prereqs @@ -55,9 +55,6 @@ wget -O drake.tar.gz \ trap 'rm -f drake.tar.gz' EXIT tar -xf drake.tar.gz -C /opt -# Show version for debugging; use echo for newline / readability. -echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" - /opt/drake/share/drake/setup/install_prereqs apt-get install --no-install-recommends gnupg diff --git a/drake_catkin_installed/setup/ubuntu/binary_install_prereqs b/drake_catkin_installed/setup/ubuntu/binary_install_prereqs index 32f48cee..5b7688d1 100755 --- a/drake_catkin_installed/setup/ubuntu/binary_install_prereqs +++ b/drake_catkin_installed/setup/ubuntu/binary_install_prereqs @@ -55,9 +55,6 @@ wget -O drake.tar.gz \ trap 'rm -f drake.tar.gz' EXIT tar -xf drake.tar.gz -C /opt -# Show version for debugging; use echo for newline / readability. -echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" - /opt/drake/share/drake/setup/install_prereqs apt-get install --no-install-recommends $(cat < Date: Thu, 3 Oct 2024 13:31:24 -0400 Subject: [PATCH 17/32] Unsync ubuntu_setup due to diff file paths --- private/test/file_sync_test.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/private/test/file_sync_test.py b/private/test/file_sync_test.py index 321d7f49..6d5cda5d 100755 --- a/private/test/file_sync_test.py +++ b/private/test/file_sync_test.py @@ -39,11 +39,6 @@ "drake_cmake_installed/LICENSE", "drake_cmake_installed_apt/LICENSE", ), - ( - "drake_bazel_download/.github/ubuntu_setup", - "drake_catkin_installed/.github/ubuntu_setup", - "drake_cmake_installed/.github/ubuntu_setup", - ), ) found_errors = False From 589ae6630919678b115a61e576a4a047ab40e7c1 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Thu, 3 Oct 2024 15:54:32 -0400 Subject: [PATCH 18/32] Use relative path to prereqs for ros setup --- drake_ament_cmake_installed/.github/ros_humble_setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drake_ament_cmake_installed/.github/ros_humble_setup b/drake_ament_cmake_installed/.github/ros_humble_setup index 0f030d51..07550419 100755 --- a/drake_ament_cmake_installed/.github/ros_humble_setup +++ b/drake_ament_cmake_installed/.github/ros_humble_setup @@ -8,4 +8,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -./drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs --ros-humble +../setup/ros_humble/binary_install_prereqs --ros-humble From 67b586cef413a85c1619ee601f567805015b70d6 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Thu, 3 Oct 2024 15:58:22 -0400 Subject: [PATCH 19/32] Add . to ros path to try using relative path --- drake_ament_cmake_installed/.github/ros_humble_setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drake_ament_cmake_installed/.github/ros_humble_setup b/drake_ament_cmake_installed/.github/ros_humble_setup index 07550419..8f1e78b2 100755 --- a/drake_ament_cmake_installed/.github/ros_humble_setup +++ b/drake_ament_cmake_installed/.github/ros_humble_setup @@ -8,4 +8,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -../setup/ros_humble/binary_install_prereqs --ros-humble +.../setup/ros_humble/binary_install_prereqs --ros-humble From 472d98f2553f83c564192bdc87e6466d4b68ec5a Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Thu, 3 Oct 2024 16:04:01 -0400 Subject: [PATCH 20/32] add " around .. for ros relative path --- drake_ament_cmake_installed/.github/ros_humble_setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drake_ament_cmake_installed/.github/ros_humble_setup b/drake_ament_cmake_installed/.github/ros_humble_setup index 8f1e78b2..777541a8 100755 --- a/drake_ament_cmake_installed/.github/ros_humble_setup +++ b/drake_ament_cmake_installed/.github/ros_humble_setup @@ -8,4 +8,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -.../setup/ros_humble/binary_install_prereqs --ros-humble +".."/setup/ros_humble/binary_install_prereqs --ros-humble From 111eb579e28a965874613b87f0ab8a0cfff2eed9 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Mon, 7 Oct 2024 12:15:51 -0400 Subject: [PATCH 21/32] Modify ros path to relative using BASH_SOURCE --- drake_ament_cmake_installed/.github/ros_humble_setup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drake_ament_cmake_installed/.github/ros_humble_setup b/drake_ament_cmake_installed/.github/ros_humble_setup index 777541a8..55528ca9 100755 --- a/drake_ament_cmake_installed/.github/ros_humble_setup +++ b/drake_ament_cmake_installed/.github/ros_humble_setup @@ -8,4 +8,5 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -".."/setup/ros_humble/binary_install_prereqs --ros-humble +cd "$(dirname "${BASH_SOURCE}")" +. "../setup/ros_humble/binary_install_prereqs" --ros-humble From c9a71fd6ce45f28db471cbc95eb9d6bc276edcf9 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Mon, 7 Oct 2024 12:34:10 -0400 Subject: [PATCH 22/32] Change ubuntu setups absolute path to relative --- drake_bazel_download/.github/ubuntu_setup | 3 ++- drake_catkin_installed/.github/ubuntu_setup | 3 ++- drake_cmake_installed/.github/ubuntu_setup | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drake_bazel_download/.github/ubuntu_setup b/drake_bazel_download/.github/ubuntu_setup index e1e16fb7..63c7e049 100755 --- a/drake_bazel_download/.github/ubuntu_setup +++ b/drake_bazel_download/.github/ubuntu_setup @@ -8,4 +8,5 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -./drake_bazel_download/setup/ubuntu/binary_install_prereqs \ No newline at end of file +cd "$(dirname "${BASH_SOURCE}")" +. "../setup/ubuntu/binary_install_prereqs" \ No newline at end of file diff --git a/drake_catkin_installed/.github/ubuntu_setup b/drake_catkin_installed/.github/ubuntu_setup index f86ae63f..63c7e049 100755 --- a/drake_catkin_installed/.github/ubuntu_setup +++ b/drake_catkin_installed/.github/ubuntu_setup @@ -8,4 +8,5 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -./drake_catkin_installed/setup/ubuntu/binary_install_prereqs \ No newline at end of file +cd "$(dirname "${BASH_SOURCE}")" +. "../setup/ubuntu/binary_install_prereqs" \ No newline at end of file diff --git a/drake_cmake_installed/.github/ubuntu_setup b/drake_cmake_installed/.github/ubuntu_setup index 3a2e6dfe..49263371 100755 --- a/drake_cmake_installed/.github/ubuntu_setup +++ b/drake_cmake_installed/.github/ubuntu_setup @@ -8,4 +8,5 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -./drake_cmake_installed/setup/ubuntu/binary_install_prereqs +cd "$(dirname "${BASH_SOURCE}")" +. "../setup/ubuntu/binary_install_prereqs" From 3f66d80c528dec79f4f6e6d1348b90f335984f97 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Wed, 9 Oct 2024 15:06:00 -0400 Subject: [PATCH 23/32] Simplify relative ubuntu setup paths --- drake_ament_cmake_installed/.github/ros_humble_setup | 4 ++-- drake_catkin_installed/.github/ubuntu_setup | 4 ++-- drake_cmake_installed/.github/ubuntu_setup | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drake_ament_cmake_installed/.github/ros_humble_setup b/drake_ament_cmake_installed/.github/ros_humble_setup index 55528ca9..7f63304e 100755 --- a/drake_ament_cmake_installed/.github/ros_humble_setup +++ b/drake_ament_cmake_installed/.github/ros_humble_setup @@ -8,5 +8,5 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -cd "$(dirname "${BASH_SOURCE}")" -. "../setup/ros_humble/binary_install_prereqs" --ros-humble +cd $(dirname "${BASH_SOURCE}")/.. +setup/ros_humble/binary_install_prereqs --ros-humble diff --git a/drake_catkin_installed/.github/ubuntu_setup b/drake_catkin_installed/.github/ubuntu_setup index 63c7e049..af7cf421 100755 --- a/drake_catkin_installed/.github/ubuntu_setup +++ b/drake_catkin_installed/.github/ubuntu_setup @@ -8,5 +8,5 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -cd "$(dirname "${BASH_SOURCE}")" -. "../setup/ubuntu/binary_install_prereqs" \ No newline at end of file +cd $(dirname "${BASH_SOURCE}")/.. +setup/ubuntu/binary_install_prereqs \ No newline at end of file diff --git a/drake_cmake_installed/.github/ubuntu_setup b/drake_cmake_installed/.github/ubuntu_setup index 49263371..b6905adf 100755 --- a/drake_cmake_installed/.github/ubuntu_setup +++ b/drake_cmake_installed/.github/ubuntu_setup @@ -8,5 +8,5 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -cd "$(dirname "${BASH_SOURCE}")" -. "../setup/ubuntu/binary_install_prereqs" +cd $(dirname "${BASH_SOURCE}")/.. +setup/ubuntu/binary_install_prereqs From 499528fc087458b987f57ec084e73c0e3fb7d0f6 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Wed, 9 Oct 2024 15:14:41 -0400 Subject: [PATCH 24/32] Simplify bazel download ubuntu setup relative path --- drake_bazel_download/.github/ubuntu_setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drake_bazel_download/.github/ubuntu_setup b/drake_bazel_download/.github/ubuntu_setup index 63c7e049..af7cf421 100755 --- a/drake_bazel_download/.github/ubuntu_setup +++ b/drake_bazel_download/.github/ubuntu_setup @@ -8,5 +8,5 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' -cd "$(dirname "${BASH_SOURCE}")" -. "../setup/ubuntu/binary_install_prereqs" \ No newline at end of file +cd $(dirname "${BASH_SOURCE}")/.. +setup/ubuntu/binary_install_prereqs \ No newline at end of file From b9a28df437be76ab6cf79d4639a53379000fb3d6 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Wed, 9 Oct 2024 15:41:21 -0400 Subject: [PATCH 25/32] Rename prereqs files --- drake_ament_cmake_installed/.github/ros_humble_setup | 2 +- .../{ros_humble/binary_install_prereqs => install_prereqs} | 0 drake_bazel_download/.github/ubuntu_setup | 2 +- .../setup/{ubuntu/binary_install_prereqs => install_prereqs} | 0 drake_catkin_installed/.github/ubuntu_setup | 2 +- .../setup/{ubuntu/binary_install_prereqs => install_prereqs} | 0 drake_cmake_installed/.github/ubuntu_setup | 2 +- .../setup/{ubuntu/binary_install_prereqs => install_prereqs} | 0 8 files changed, 4 insertions(+), 4 deletions(-) rename drake_ament_cmake_installed/setup/{ros_humble/binary_install_prereqs => install_prereqs} (100%) rename drake_bazel_download/setup/{ubuntu/binary_install_prereqs => install_prereqs} (100%) rename drake_catkin_installed/setup/{ubuntu/binary_install_prereqs => install_prereqs} (100%) rename drake_cmake_installed/setup/{ubuntu/binary_install_prereqs => install_prereqs} (100%) diff --git a/drake_ament_cmake_installed/.github/ros_humble_setup b/drake_ament_cmake_installed/.github/ros_humble_setup index 7f63304e..957e7385 100755 --- a/drake_ament_cmake_installed/.github/ros_humble_setup +++ b/drake_ament_cmake_installed/.github/ros_humble_setup @@ -9,4 +9,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' cd $(dirname "${BASH_SOURCE}")/.. -setup/ros_humble/binary_install_prereqs --ros-humble +setup/install_prereqs --ros-humble diff --git a/drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs b/drake_ament_cmake_installed/setup/install_prereqs similarity index 100% rename from drake_ament_cmake_installed/setup/ros_humble/binary_install_prereqs rename to drake_ament_cmake_installed/setup/install_prereqs diff --git a/drake_bazel_download/.github/ubuntu_setup b/drake_bazel_download/.github/ubuntu_setup index af7cf421..e91ff905 100755 --- a/drake_bazel_download/.github/ubuntu_setup +++ b/drake_bazel_download/.github/ubuntu_setup @@ -9,4 +9,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' cd $(dirname "${BASH_SOURCE}")/.. -setup/ubuntu/binary_install_prereqs \ No newline at end of file +setup/install_prereqs \ No newline at end of file diff --git a/drake_bazel_download/setup/ubuntu/binary_install_prereqs b/drake_bazel_download/setup/install_prereqs similarity index 100% rename from drake_bazel_download/setup/ubuntu/binary_install_prereqs rename to drake_bazel_download/setup/install_prereqs diff --git a/drake_catkin_installed/.github/ubuntu_setup b/drake_catkin_installed/.github/ubuntu_setup index af7cf421..e91ff905 100755 --- a/drake_catkin_installed/.github/ubuntu_setup +++ b/drake_catkin_installed/.github/ubuntu_setup @@ -9,4 +9,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' cd $(dirname "${BASH_SOURCE}")/.. -setup/ubuntu/binary_install_prereqs \ No newline at end of file +setup/install_prereqs \ No newline at end of file diff --git a/drake_catkin_installed/setup/ubuntu/binary_install_prereqs b/drake_catkin_installed/setup/install_prereqs similarity index 100% rename from drake_catkin_installed/setup/ubuntu/binary_install_prereqs rename to drake_catkin_installed/setup/install_prereqs diff --git a/drake_cmake_installed/.github/ubuntu_setup b/drake_cmake_installed/.github/ubuntu_setup index b6905adf..0a1ac2ad 100755 --- a/drake_cmake_installed/.github/ubuntu_setup +++ b/drake_cmake_installed/.github/ubuntu_setup @@ -9,4 +9,4 @@ echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90-get-assume-yes export DEBIAN_FRONTEND='noninteractive' cd $(dirname "${BASH_SOURCE}")/.. -setup/ubuntu/binary_install_prereqs +setup/install_prereqs diff --git a/drake_cmake_installed/setup/ubuntu/binary_install_prereqs b/drake_cmake_installed/setup/install_prereqs similarity index 100% rename from drake_cmake_installed/setup/ubuntu/binary_install_prereqs rename to drake_cmake_installed/setup/install_prereqs From cb822806bf459a78a93d100fb133373517bd2e30 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Wed, 9 Oct 2024 16:03:28 -0400 Subject: [PATCH 26/32] Add back debug help + ubuntu setup sync --- drake_ament_cmake_installed/setup/install_prereqs | 3 +++ drake_bazel_download/setup/install_prereqs | 3 +++ drake_catkin_installed/setup/install_prereqs | 3 +++ drake_cmake_installed/setup/install_prereqs | 3 +++ private/test/file_sync_test.py | 5 +++++ 5 files changed, 17 insertions(+) diff --git a/drake_ament_cmake_installed/setup/install_prereqs b/drake_ament_cmake_installed/setup/install_prereqs index f8129af2..8259f455 100755 --- a/drake_ament_cmake_installed/setup/install_prereqs +++ b/drake_ament_cmake_installed/setup/install_prereqs @@ -69,6 +69,9 @@ wget -O drake.tar.gz \ trap 'rm -f drake.tar.gz' EXIT tar -xf drake.tar.gz -C /opt +# Show version for debugging; use echo for newline / readability. +echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" + /opt/drake/share/drake/setup/install_prereqs apt-get install --no-install-recommends gnupg diff --git a/drake_bazel_download/setup/install_prereqs b/drake_bazel_download/setup/install_prereqs index a9af9468..ae499368 100755 --- a/drake_bazel_download/setup/install_prereqs +++ b/drake_bazel_download/setup/install_prereqs @@ -55,6 +55,9 @@ wget -O drake.tar.gz \ trap 'rm -f drake.tar.gz' EXIT tar -xf drake.tar.gz -C /opt +# Show version for debugging; use echo for newline / readability. +echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" + /opt/drake/share/drake/setup/install_prereqs apt-get install --no-install-recommends gnupg diff --git a/drake_catkin_installed/setup/install_prereqs b/drake_catkin_installed/setup/install_prereqs index 5b7688d1..32f48cee 100755 --- a/drake_catkin_installed/setup/install_prereqs +++ b/drake_catkin_installed/setup/install_prereqs @@ -55,6 +55,9 @@ wget -O drake.tar.gz \ trap 'rm -f drake.tar.gz' EXIT tar -xf drake.tar.gz -C /opt +# Show version for debugging; use echo for newline / readability. +echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" + /opt/drake/share/drake/setup/install_prereqs apt-get install --no-install-recommends $(cat < Date: Fri, 11 Oct 2024 10:25:34 -0400 Subject: [PATCH 27/32] Single prereqs script for cmake_installed dir --- .github/workflows/ci.yml | 2 +- .../setup/{mac => }/Brewfile | 0 drake_cmake_installed/setup/install_prereqs | 89 +++++++++++++------ 3 files changed, 64 insertions(+), 27 deletions(-) rename drake_cmake_installed/setup/{mac => }/Brewfile (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73f26d6e..393be12b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: brew unlink python@3.11 && brew link python@3.11 pip3.11 --version - name: setup - run: ./drake_cmake_installed/setup/mac/install_prereqs + run: ./drake_cmake_installed/setup/install_prereqs --mac shell: zsh -efuo pipefail {0} - name: cmake_installed build and test run: ./drake_cmake_installed/.github/ci_build_test diff --git a/drake_cmake_installed/setup/mac/Brewfile b/drake_cmake_installed/setup/Brewfile similarity index 100% rename from drake_cmake_installed/setup/mac/Brewfile rename to drake_cmake_installed/setup/Brewfile diff --git a/drake_cmake_installed/setup/install_prereqs b/drake_cmake_installed/setup/install_prereqs index d826514c..d17f936c 100755 --- a/drake_cmake_installed/setup/install_prereqs +++ b/drake_cmake_installed/setup/install_prereqs @@ -31,38 +31,75 @@ set -euxo pipefail -if [[ "${EUID:-}" -ne 0 ]]; then - echo 'This script must be run as root' >&2 - exit 2 -fi +mac=0 -apt-get update -apt-get install --no-install-recommends lsb-release +while [ "${1:-}" != "" ]; do + case "$1" in + --mac) + mac=1 + ;; + *) + echo 'Invalid command line argument' >&2 + exit 1 + esac + shift +done -if [[ "$(lsb_release -sc)" != 'jammy' ]]; then - echo 'This script requires Ubuntu 22.04 (Jammy)' >&2 - exit 3 -fi +if [[ ${mac} -eq 1 ]]; then + if [[ "${EUID}" -eq 0 ]]; then + echo 'This script must NOT be run as root' >&2 + exit 1 + fi + + if [[ ! -d /opt/drake ]]; then + sudo mkdir -p /opt/drake + sudo chmod g+rwx /opt/drake + sudo chown "${USER}" /opt/drake + sudo chgrp admin /opt/drake + fi + + # Install Drake dependencies. + curl -o drake.tar.gz https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-mac-arm64.tar.gz + trap 'rm -f drake.tar.gz' EXIT + tar -xf drake.tar.gz -C /opt + + # Install additional dependencies needed to build example + brew bundle --file="$(dirname ${(%):-%x})/Brewfile" + +else + if [[ "${EUID:-}" -ne 0 ]]; then + echo 'This script must be run as root' >&2 + exit 2 + fi + + apt-get update + apt-get install --no-install-recommends lsb-release -apt-get install --no-install-recommends $(cat <&2 + exit 3 + fi + + apt-get install --no-install-recommends $(cat < Date: Fri, 11 Oct 2024 10:36:13 -0400 Subject: [PATCH 28/32] Check if original mac prereqs work --- .github/workflows/ci.yml | 2 +- drake_cmake_installed/setup/{ => mac}/Brewfile | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename drake_cmake_installed/setup/{ => mac}/Brewfile (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 393be12b..73f26d6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: brew unlink python@3.11 && brew link python@3.11 pip3.11 --version - name: setup - run: ./drake_cmake_installed/setup/install_prereqs --mac + run: ./drake_cmake_installed/setup/mac/install_prereqs shell: zsh -efuo pipefail {0} - name: cmake_installed build and test run: ./drake_cmake_installed/.github/ci_build_test diff --git a/drake_cmake_installed/setup/Brewfile b/drake_cmake_installed/setup/mac/Brewfile similarity index 100% rename from drake_cmake_installed/setup/Brewfile rename to drake_cmake_installed/setup/mac/Brewfile From 7c2f3ac96e32aa3a413d1ad8606793372821f991 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Fri, 11 Oct 2024 10:45:57 -0400 Subject: [PATCH 29/32] Move brew install pos in mac setup --- drake_cmake_installed/setup/mac/install_prereqs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drake_cmake_installed/setup/mac/install_prereqs b/drake_cmake_installed/setup/mac/install_prereqs index cfb9f317..523f88cb 100755 --- a/drake_cmake_installed/setup/mac/install_prereqs +++ b/drake_cmake_installed/setup/mac/install_prereqs @@ -20,10 +20,13 @@ curl -o drake.tar.gz https://drake-packages.csail.mit.edu/drake/nightly/drake-la trap 'rm -f drake.tar.gz' EXIT tar -xf drake.tar.gz -C /opt +# Install additional dependencies needed to build example +brew bundle --file="$(dirname ${(%):-%x})/Brewfile" + # Show version for debugging; use echo for newline / readability. echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" /opt/drake/share/drake/setup/install_prereqs # Install additional dependencies needed to build example -brew bundle --file="$(dirname ${(%):-%x})/Brewfile" +#brew bundle --file="$(dirname ${(%):-%x})/Brewfile" From 5e65a2ede506d4d5c17170abaedfc87a5fc9b7e8 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Fri, 11 Oct 2024 11:11:28 -0400 Subject: [PATCH 30/32] Modify main prereq mac brew to use BASH_SOURCE --- .github/workflows/ci.yml | 2 +- drake_cmake_installed/setup/{mac => }/Brewfile | 0 drake_cmake_installed/setup/install_prereqs | 2 +- drake_cmake_installed/setup/mac/install_prereqs | 5 +---- 4 files changed, 3 insertions(+), 6 deletions(-) rename drake_cmake_installed/setup/{mac => }/Brewfile (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73f26d6e..393be12b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: brew unlink python@3.11 && brew link python@3.11 pip3.11 --version - name: setup - run: ./drake_cmake_installed/setup/mac/install_prereqs + run: ./drake_cmake_installed/setup/install_prereqs --mac shell: zsh -efuo pipefail {0} - name: cmake_installed build and test run: ./drake_cmake_installed/.github/ci_build_test diff --git a/drake_cmake_installed/setup/mac/Brewfile b/drake_cmake_installed/setup/Brewfile similarity index 100% rename from drake_cmake_installed/setup/mac/Brewfile rename to drake_cmake_installed/setup/Brewfile diff --git a/drake_cmake_installed/setup/install_prereqs b/drake_cmake_installed/setup/install_prereqs index d17f936c..da734937 100755 --- a/drake_cmake_installed/setup/install_prereqs +++ b/drake_cmake_installed/setup/install_prereqs @@ -64,7 +64,7 @@ if [[ ${mac} -eq 1 ]]; then tar -xf drake.tar.gz -C /opt # Install additional dependencies needed to build example - brew bundle --file="$(dirname ${(%):-%x})/Brewfile" + brew bundle --file="$(dirname "${BASH_SOURCE}")/Brewfile" else if [[ "${EUID:-}" -ne 0 ]]; then diff --git a/drake_cmake_installed/setup/mac/install_prereqs b/drake_cmake_installed/setup/mac/install_prereqs index 523f88cb..cfb9f317 100755 --- a/drake_cmake_installed/setup/mac/install_prereqs +++ b/drake_cmake_installed/setup/mac/install_prereqs @@ -20,13 +20,10 @@ curl -o drake.tar.gz https://drake-packages.csail.mit.edu/drake/nightly/drake-la trap 'rm -f drake.tar.gz' EXIT tar -xf drake.tar.gz -C /opt -# Install additional dependencies needed to build example -brew bundle --file="$(dirname ${(%):-%x})/Brewfile" - # Show version for debugging; use echo for newline / readability. echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" /opt/drake/share/drake/setup/install_prereqs # Install additional dependencies needed to build example -#brew bundle --file="$(dirname ${(%):-%x})/Brewfile" +brew bundle --file="$(dirname ${(%):-%x})/Brewfile" From c1e93ab542ea2259fe6407856477b35e94c43042 Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Fri, 11 Oct 2024 11:37:36 -0400 Subject: [PATCH 31/32] Remove mac only prereq script --- drake_cmake_installed/setup/install_prereqs | 2 ++ .../setup/mac/install_prereqs | 29 ------------------- 2 files changed, 2 insertions(+), 29 deletions(-) delete mode 100755 drake_cmake_installed/setup/mac/install_prereqs diff --git a/drake_cmake_installed/setup/install_prereqs b/drake_cmake_installed/setup/install_prereqs index da734937..af4bbe7e 100755 --- a/drake_cmake_installed/setup/install_prereqs +++ b/drake_cmake_installed/setup/install_prereqs @@ -45,6 +45,7 @@ while [ "${1:-}" != "" ]; do shift done +# Mac specific installations if [[ ${mac} -eq 1 ]]; then if [[ "${EUID}" -eq 0 ]]; then echo 'This script must NOT be run as root' >&2 @@ -66,6 +67,7 @@ if [[ ${mac} -eq 1 ]]; then # Install additional dependencies needed to build example brew bundle --file="$(dirname "${BASH_SOURCE}")/Brewfile" +# Ubuntu specific installations else if [[ "${EUID:-}" -ne 0 ]]; then echo 'This script must be run as root' >&2 diff --git a/drake_cmake_installed/setup/mac/install_prereqs b/drake_cmake_installed/setup/mac/install_prereqs deleted file mode 100755 index cfb9f317..00000000 --- a/drake_cmake_installed/setup/mac/install_prereqs +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/zsh -# SPDX-License-Identifier: MIT-0 - -set -euxo pipefail - -if [[ "${EUID}" -eq 0 ]]; then - echo 'This script must NOT be run as root' >&2 - exit 1 -fi - -if [[ ! -d /opt/drake ]]; then - sudo mkdir -p /opt/drake - sudo chmod g+rwx /opt/drake - sudo chown "${USER}" /opt/drake - sudo chgrp admin /opt/drake -fi - -# Install Drake dependencies. -curl -o drake.tar.gz https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-mac-arm64.tar.gz -trap 'rm -f drake.tar.gz' EXIT -tar -xf drake.tar.gz -C /opt - -# Show version for debugging; use echo for newline / readability. -echo -e "\ndrake VERSION.TXT: $(cat /opt/drake/share/doc/drake/VERSION.TXT)\n" - -/opt/drake/share/drake/setup/install_prereqs - -# Install additional dependencies needed to build example -brew bundle --file="$(dirname ${(%):-%x})/Brewfile" From bc0859b7f35ab328c8ba6bafab9aabd12e99911d Mon Sep 17 00:00:00 2001 From: Nicole Cheetham Date: Fri, 11 Oct 2024 13:46:46 -0400 Subject: [PATCH 32/32] Remove --mac in GHA ci --- .github/workflows/ci.yml | 2 +- drake_cmake_installed/setup/install_prereqs | 117 +++++++++----------- 2 files changed, 54 insertions(+), 65 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 393be12b..7dc770df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: brew unlink python@3.11 && brew link python@3.11 pip3.11 --version - name: setup - run: ./drake_cmake_installed/setup/install_prereqs --mac + run: ./drake_cmake_installed/setup/install_prereqs shell: zsh -efuo pipefail {0} - name: cmake_installed build and test run: ./drake_cmake_installed/.github/ci_build_test diff --git a/drake_cmake_installed/setup/install_prereqs b/drake_cmake_installed/setup/install_prereqs index af4bbe7e..76138c8a 100755 --- a/drake_cmake_installed/setup/install_prereqs +++ b/drake_cmake_installed/setup/install_prereqs @@ -31,75 +31,64 @@ set -euxo pipefail -mac=0 - -while [ "${1:-}" != "" ]; do - case "$1" in - --mac) - mac=1 - ;; - *) - echo 'Invalid command line argument' >&2 +case "$OSTYPE" in + darwin*) + # Mac specific installations + if [[ "${EUID}" -eq 0 ]]; then + echo 'This script must NOT be run as root' >&2 exit 1 - esac - shift -done - -# Mac specific installations -if [[ ${mac} -eq 1 ]]; then - if [[ "${EUID}" -eq 0 ]]; then - echo 'This script must NOT be run as root' >&2 - exit 1 - fi - - if [[ ! -d /opt/drake ]]; then - sudo mkdir -p /opt/drake - sudo chmod g+rwx /opt/drake - sudo chown "${USER}" /opt/drake - sudo chgrp admin /opt/drake - fi - - # Install Drake dependencies. - curl -o drake.tar.gz https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-mac-arm64.tar.gz - trap 'rm -f drake.tar.gz' EXIT - tar -xf drake.tar.gz -C /opt - - # Install additional dependencies needed to build example - brew bundle --file="$(dirname "${BASH_SOURCE}")/Brewfile" - -# Ubuntu specific installations -else - if [[ "${EUID:-}" -ne 0 ]]; then - echo 'This script must be run as root' >&2 - exit 2 - fi - - apt-get update - apt-get install --no-install-recommends lsb-release - - if [[ "$(lsb_release -sc)" != 'jammy' ]]; then - echo 'This script requires Ubuntu 22.04 (Jammy)' >&2 - exit 3 - fi - - apt-get install --no-install-recommends $(cat <&2 + exit 2 + fi + + apt-get update + apt-get install --no-install-recommends lsb-release + + if [[ "$(lsb_release -sc)" != 'jammy' ]]; then + echo 'This script requires Ubuntu 22.04 (Jammy)' >&2 + exit 3 + fi + + apt-get install --no-install-recommends $(cat <