From 7d9febbb0043c9e895b86762badae329150a352a Mon Sep 17 00:00:00 2001 From: Stefan Bluhm Date: Thu, 28 Sep 2023 22:31:55 +0200 Subject: [PATCH] Replace filesize with stat --- spacewalk/setup/spacewalk-setup.changes.sbluhm.Replace_filesize | 1 + spacewalk/setup/spacewalk-setup.spec | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 spacewalk/setup/spacewalk-setup.changes.sbluhm.Replace_filesize diff --git a/spacewalk/setup/spacewalk-setup.changes.sbluhm.Replace_filesize b/spacewalk/setup/spacewalk-setup.changes.sbluhm.Replace_filesize new file mode 100644 index 000000000000..e6b70623a38e --- /dev/null +++ b/spacewalk/setup/spacewalk-setup.changes.sbluhm.Replace_filesize @@ -0,0 +1 @@ +- Replace "filesize" in spec file with "stat" to allow installation on Enterprise Linux. diff --git a/spacewalk/setup/spacewalk-setup.spec b/spacewalk/setup/spacewalk-setup.spec index 86ebc41de04a..94643f39ae74 100644 --- a/spacewalk/setup/spacewalk-setup.spec +++ b/spacewalk/setup/spacewalk-setup.spec @@ -191,7 +191,7 @@ install -Dd -m 0755 %{buildroot}%{_prefix}/share/salt-formulas/states install -Dd -m 0755 %{buildroot}%{_prefix}/share/salt-formulas/metadata %post -if [ ! -f /etc/rhn/rhn.conf -o $(filesize /etc/rhn/rhn.conf) -eq 0 ]; then +if [ ! -f /etc/rhn/rhn.conf -o $(stat -c %%s "/etc/rhn/rhn.conf") -eq 0 ]; then # rhn.conf does not exists or is empty, this is new installation or update of new installation CURRENT_DATE=$(date +"%%Y-%%m-%%dT%%H:%%M:%%S.%%3N") cp /etc/tomcat/server.xml /etc/tomcat/server.xml.$CURRENT_DATE