From 1eb4c1007b3b55f0726ecfaefeb2600aeed1a2ab Mon Sep 17 00:00:00 2001 From: tigro Date: Mon, 16 Dec 2024 15:04:22 +0300 Subject: [PATCH] Use lua for some scriptlets to avoid missing /bin/sh --- SOURCES/90-default.preset | 3 +++ SPECS/sphere-release.spec | 32 +++++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/SOURCES/90-default.preset b/SOURCES/90-default.preset index c462b65..cdc8773 100644 --- a/SOURCES/90-default.preset +++ b/SOURCES/90-default.preset @@ -465,3 +465,6 @@ enable cockpit.socket # https://fedoraproject.org/wiki/Changes/EnableFwupdRefreshByDefault enable fwupd-refresh.timer + +# RHEL-67012 +enable fips-crypto-policy-overlay.service diff --git a/SPECS/sphere-release.spec b/SPECS/sphere-release.spec index c55ced2..4523d4c 100644 --- a/SPECS/sphere-release.spec +++ b/SPECS/sphere-release.spec @@ -3,12 +3,11 @@ %global release_name Certified Server ARM Cinnamon KDE XFCE %global major 10 %global minor 0 -# FIXME -%global eol_date 2035-04-01 +%global eol_date 2035-06-01 Name: sphere-release Version: %{major}.%{minor} -Release: 0.2%{?dist} +Release: 0.3%{?dist} Summary: %{distro} release files License: GPLv2 URL: https://msvsphere-os.ru @@ -535,13 +534,13 @@ sed -i "s@\$releasever@%{major}.%{minor}-beta@g" %{buildroot}%{_sysconfdir}/yum. install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/rpm-gpg install -p -m 0644 %{SOURCE100} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/ -%pre -n sphere-release-common # Workarround for redhat-server-eula problem -if [ $1 = 1 ]; then - if [ -d /usr/share/redhat-release ]; then - rm -rf /usr/share/redhat-release - fi -fi +%pre -p -n sphere-release-common +st = posix.stat("/usr/share/redhat-release") +if st and st.type == "directory" then + os.remove("/usr/share/redhat-release") +end +return 0 %post -n sphere-repos-flatpak /usr/bin/flatpak remote-add --system --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo ||: @@ -551,20 +550,20 @@ fi /usr/bin/flatpak remote-delete --system flathub ||: /usr/bin/flatpak remote-delete --system fedora ||: -%post identity-arm -/usr/bin/ln -srf /usr/share/sphere-release/EULA-ARM /usr/share/sphere-release/EULA +%posttrans -p identity-arm +os.execute("/usr/bin/ln -srf /usr/share/sphere-release/EULA-ARM /usr/share/sphere-release/EULA") %preun identity-arm /usr/bin/rm -f /usr/share/sphere-release/EULA -%post identity-certified -/usr/bin/ln -srf /usr/share/sphere-release/EULA-CERTIFIED /usr/share/sphere-release/EULA +%posttrans -p identity-certified +os.execute("/usr/bin/ln -srf /usr/share/sphere-release/EULA-CERTIFIED /usr/share/sphere-release/EULA") %preun identity-certified /usr/bin/rm -f /usr/share/sphere-release/EULA -%post identity-server -/usr/bin/ln -srf /usr/share/sphere-release/EULA-SERVER /usr/share/sphere-release/EULA +%posttrans -p identity-server +os.execute("/usr/bin/ln -srf /usr/share/sphere-release/EULA-SERVER /usr/share/sphere-release/EULA") %preun identity-server /usr/bin/rm -f /usr/share/sphere-release/EULA @@ -656,6 +655,9 @@ fi %changelog +* Mon Dec 16 2024 Arkady L. Shane - 10.0-0.3 +- Use lua for some scriptlets to avoid missing /bin/sh + * Mon Dec 16 2024 Arkady L. Shane - 10.0-0.2 - enable fips-crypto-policy-overlay.service