From b0f2a9d2efe0edc6fc80cca9ccc2a174557161a9 Mon Sep 17 00:00:00 2001 From: Charis Poag Date: Wed, 31 May 2023 10:41:44 -0500 Subject: [PATCH] [SWDEV-402336 + SWDEV-398070] Fix RPM install - override macros Updates: * [rocm-smi] RPM installation now overrides macro usage Change-Id: I2a5ba14670becc178f672182eabe71965a526178 Signed-off-by: Charis Poag --- DEBIAN/postinst.in | 7 ++++++- RPM/post.in | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/DEBIAN/postinst.in b/DEBIAN/postinst.in index c3176bb6c6..98e9365825 100755 --- a/DEBIAN/postinst.in +++ b/DEBIAN/postinst.in @@ -35,9 +35,14 @@ do_configureLogrotate() { size 1M copytruncate dateext - dateformat .%Y-%m-%d_%H:%M:%S + dateformat .%%Y-%%m-%%d_%H:%%M:%%S } EOF + # Fix for %S argument not found (now we escape with %%) + # issue was RPM build thought we were using macros + # https://gitlab.kitware.com/cmake/cmake/-/issues/22965 + # https://rpm-software-management.github.io/rpm/manual/spec.html + sudo sed -i s/%%/%/g /etc/logrotate.d/rocm_smi.conf # workaround: remove extra 'OURCE' text # from rocm_smi.conf. Unsure if CMAKE, # bash, or here document diff --git a/RPM/post.in b/RPM/post.in index d1992de5ba..bfb0613388 100755 --- a/RPM/post.in +++ b/RPM/post.in @@ -34,9 +34,14 @@ do_configureLogrotate() { size 1M copytruncate dateext - dateformat .%Y-%m-%d_%H:%M:%S + dateformat .%%Y-%%m-%%d_%H:%%M:%%S } EOF + # Fix for %S argument not found (now we escape with %%) + # issue was RPM build thought we were using macros + # https://gitlab.kitware.com/cmake/cmake/-/issues/22965 + # https://rpm-software-management.github.io/rpm/manual/spec.html + sudo sed -i s/%%/%/g /etc/logrotate.d/rocm_smi.conf # workaround: remove extra 'OURCE' text # from rocm_smi.conf. Unsure if CMAKE, # bash, or here document