From f340c5ca5b953181aa55eaf8829ab483e9ae9889 Mon Sep 17 00:00:00 2001 From: Sam Wu Date: Fri, 11 Aug 2023 16:12:57 -0600 Subject: [PATCH 1/2] update documentation requirements and dependabot configuration Change-Id: I652872286c5975d770abb97513469f4527807d7f [ROCm/amdsmi commit: 18ef8628862a0de5fdd055fabecee40035b7ce1d] --- projects/amdsmi/.github/dependabot.yml | 7 +++++++ projects/amdsmi/docs/sphinx/requirements.in | 2 +- projects/amdsmi/docs/sphinx/requirements.txt | 18 ++---------------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/projects/amdsmi/.github/dependabot.yml b/projects/amdsmi/.github/dependabot.yml index 276690bd4f..d8cc6f4422 100644 --- a/projects/amdsmi/.github/dependabot.yml +++ b/projects/amdsmi/.github/dependabot.yml @@ -10,3 +10,10 @@ updates: open-pull-requests-limit: 10 schedule: interval: "daily" + target-branch: "master" + labels: + - "documentation" + - "dependencies" + - "ci:docs-only" + reviewers: + - "samjwu" diff --git a/projects/amdsmi/docs/sphinx/requirements.in b/projects/amdsmi/docs/sphinx/requirements.in index fa5d0b479a..63ee84f240 100644 --- a/projects/amdsmi/docs/sphinx/requirements.in +++ b/projects/amdsmi/docs/sphinx/requirements.in @@ -1 +1 @@ -rocm-docs-core[api_reference]==0.13.3 +rocm-docs-core[api_reference]>=0.20.0 diff --git a/projects/amdsmi/docs/sphinx/requirements.txt b/projects/amdsmi/docs/sphinx/requirements.txt index 45eb5a313c..ca744335cb 100644 --- a/projects/amdsmi/docs/sphinx/requirements.txt +++ b/projects/amdsmi/docs/sphinx/requirements.txt @@ -53,18 +53,12 @@ idna==3.4 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==6.6.0 - # via sphinx -importlib-resources==5.12.0 - # via rocm-docs-core jinja2==3.1.2 # via # myst-parser # sphinx libsass==0.22.0 # via doxysphinx -linkify-it-py==1.0.3 - # via myst-parser lxml==4.9.2 # via doxysphinx markdown-it-py==2.2.0 @@ -79,7 +73,7 @@ mdurl==0.1.2 # via markdown-it-py mpire==2.7.1 # via doxysphinx -myst-parser[linkify]==1.0.0 +myst-parser==1.0.0 # via rocm-docs-core packaging==23.1 # via @@ -107,8 +101,6 @@ pynacl==1.5.0 # via pygithub pyparsing==3.0.9 # via doxysphinx -pytz==2023.3 - # via babel pyyaml==6.0 # via # myst-parser @@ -118,7 +110,7 @@ requests==2.30.0 # via # pygithub # sphinx -rocm-docs-core[api_reference]==0.13.3 +rocm-docs-core[api_reference]>=0.20.0 # via -r requirements.in smmap==5.0.0 # via gitdb @@ -163,13 +155,7 @@ tqdm==4.65.0 # via mpire typing-extensions==4.5.0 # via pydata-sphinx-theme -uc-micro-py==1.0.2 - # via linkify-it-py urllib3==2.0.2 # via requests wrapt==1.15.0 # via deprecated -zipp==3.15.0 - # via - # importlib-metadata - # importlib-resources From 20f853deb9bf9a4de8c4452aae3710879b734e23 Mon Sep 17 00:00:00 2001 From: "Galantsev, Dmitrii" Date: Thu, 17 Aug 2023 01:33:12 -0500 Subject: [PATCH 2/2] RPM:DEB: replace rocm_smi with amd_smi where needed __pycache__ directory wasn't getting removed. Turns out we missed some rocm-smi renames when merging changes from it. Culprit: I695bd085d4a43b678b563b4c35f6d2e8ddfa7d7c Change-Id: Ieb0db41163af0337f1a3c06eb63a6960e6c52ff6 Signed-off-by: Galantsev, Dmitrii [ROCm/amdsmi commit: 7cd72a583d796c3620483bec592936a3d7c95f6c] --- projects/amdsmi/DEBIAN/postinst.in | 8 ++++---- projects/amdsmi/DEBIAN/prerm.in | 4 ++-- ...brocm_smi_lib.conf => x86_64-libamd_smi_lib.conf} | 0 projects/amdsmi/RPM/post.in | 12 ++++++------ projects/amdsmi/RPM/postun.in | 2 +- projects/amdsmi/RPM/preun.in | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) rename projects/amdsmi/DEBIAN/{x86_64-librocm_smi_lib.conf => x86_64-libamd_smi_lib.conf} (100%) diff --git a/projects/amdsmi/DEBIAN/postinst.in b/projects/amdsmi/DEBIAN/postinst.in index cb52dd1a08..a0ecb7fdb1 100755 --- a/projects/amdsmi/DEBIAN/postinst.in +++ b/projects/amdsmi/DEBIAN/postinst.in @@ -25,11 +25,11 @@ do_configureLogrotate() { if [ ! -f $logrotateConfFile ]; then sudo touch "${logrotateConfFile}" sudo chmod 644 "${logrotateConfFile}" # root r/w, all others read - # ROCm SMI logging rotation, rotates files using root user/group + # AMD SMI logging rotation, rotates files using root user/group # Hourly logrotation check # Only rotates if size grew larger than 1MB # Max of 4 rotation files, oldest will be removed - # Rotated files use date extention of ex. ROCm-SMI-lib.log.2023-05-09_16:51:42 + # Rotated files use date extention of ex. AMD-SMI-lib.log.2023-05-09_16:51:42 cat << EOF | sudo tee "${logrotateConfFile}" >/dev/null ${logFile} { su root root @@ -49,7 +49,7 @@ EOF # https://rpm-software-management.github.io/rpm/manual/spec.html sudo sed -i s/%%/%/g "${logrotateConfFile}" # workaround: remove extra 'OURCE' text - # from rocm_smi.conf. Unsure if CMAKE, + # from amd_smi.conf. Unsure if CMAKE, # bash, or here document # issue (only seen on RHEL 8.7) sudo sed -i s/OURCE//g "${logrotateConfFile}" @@ -108,7 +108,7 @@ EOF do_ldconfig() { # left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build if [ "@ENABLE_LDCONFIG@" == "ON" ]; then - echo @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ > /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf + echo @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ > /etc/ld.so.conf.d/x86_64-libamd_smi_lib.conf ldconfig fi } diff --git a/projects/amdsmi/DEBIAN/prerm.in b/projects/amdsmi/DEBIAN/prerm.in index 615428771e..2de4969580 100755 --- a/projects/amdsmi/DEBIAN/prerm.in +++ b/projects/amdsmi/DEBIAN/prerm.in @@ -28,14 +28,14 @@ return_logrotateToOrigConfig() { rm_ldconfig() { # left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build if [ "@ENABLE_LDCONFIG@" == "ON" ]; then - rm -f /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf + rm -f /etc/ld.so.conf.d/x86_64-libamd_smi_lib.conf ldconfig fi } rm_pyc() { # remove pyc file generated by python - rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/rocm_smi/__pycache__ + rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/amd_smi/__pycache__ } case "$1" in diff --git a/projects/amdsmi/DEBIAN/x86_64-librocm_smi_lib.conf b/projects/amdsmi/DEBIAN/x86_64-libamd_smi_lib.conf similarity index 100% rename from projects/amdsmi/DEBIAN/x86_64-librocm_smi_lib.conf rename to projects/amdsmi/DEBIAN/x86_64-libamd_smi_lib.conf diff --git a/projects/amdsmi/RPM/post.in b/projects/amdsmi/RPM/post.in index 0822d298e6..4a8ed2876c 100755 --- a/projects/amdsmi/RPM/post.in +++ b/projects/amdsmi/RPM/post.in @@ -25,11 +25,11 @@ do_configureLogrotate() { if [ ! -f $logrotateConfFile ]; then sudo touch "${logrotateConfFile}" sudo chmod 644 "${logrotateConfFile}" # root r/w, all others read - # ROCm SMI logging rotation, rotates files using root user/group + # AMD SMI logging rotation, rotates files using root user/group # Hourly logrotation check # Only rotates if size grew larger than 1MB # Max of 4 rotation files, oldest will be removed - # Rotated files use date extention of ex. ROCm-SMI-lib.log.2023-05-09_16:51:42 + # Rotated files use date extention of ex. AMD-SMI-lib.log.2023-05-09_16:51:42 cat << EOF | sudo tee "${logrotateConfFile}" >/dev/null ${logFile} { su root root @@ -49,7 +49,7 @@ EOF # https://rpm-software-management.github.io/rpm/manual/spec.html sudo sed -i s/%%/%/g "${logrotateConfFile}" # workaround: remove extra 'OURCE' text - # from rocm_smi.conf. Unsure if CMAKE, + # from amd_smi.conf. Unsure if CMAKE, # bash, or here document # issue (only seen on RHEL 8.7) sudo sed -i s/OURCE//g "${logrotateConfFile}" @@ -108,14 +108,14 @@ EOF do_ldconfig() { # left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build if [ "@ENABLE_LDCONFIG@" == "ON" ]; then - echo @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ > /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf + echo @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ > /etc/ld.so.conf.d/x86_64-libamd_smi_lib.conf ldconfig fi } # left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build if [ "@ENABLE_LDCONFIG@" == "ON" ]; then - echo -e "@CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" > /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf + echo -e "@CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" > /etc/ld.so.conf.d/x86_64-libamd_smi_lib.conf ldconfig fi @@ -123,4 +123,4 @@ fi if [ $1 -ge 1 ]; then do_addLogFolder do_configureLogrotate -fi \ No newline at end of file +fi diff --git a/projects/amdsmi/RPM/postun.in b/projects/amdsmi/RPM/postun.in index 0dd41d82d8..7b71daf8eb 100755 --- a/projects/amdsmi/RPM/postun.in +++ b/projects/amdsmi/RPM/postun.in @@ -3,6 +3,6 @@ # second term originates from ENABLE_LDCONFIG = ON/OFF at package build if [ $1 -le 1 ] && [ "@ENABLE_LDCONFIG@" == "ON" ]; then # perform the below actions for rpm remove($1=0) or upgrade($1=1) operations - rm -f /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf + rm -f /etc/ld.so.conf.d/x86_64-libamd_smi_lib.conf ldconfig fi diff --git a/projects/amdsmi/RPM/preun.in b/projects/amdsmi/RPM/preun.in index 6d42dd5a72..521c420be9 100755 --- a/projects/amdsmi/RPM/preun.in +++ b/projects/amdsmi/RPM/preun.in @@ -30,7 +30,7 @@ return_logrotateToOrigConfig() { if [ $1 -le 1 ]; then # perform the below actions for rpm remove($1=0) or upgrade($1=1) operations # remove pyc file generated by python - rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/rocm_smi/__pycache__ + rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/amd_smi/__pycache__ rm_logFolder return_logrotateToOrigConfig fi