Use lua for some scriptlets to avoid missing /bin/sh

i10 changed/i10/sphere-release-10.0-0.3.el10
Arkady L. Shane 3 weeks ago
parent 16350f40db
commit 1eb4c1007b
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

@ -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

@ -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 <lua> -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 <lua> 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 <lua> 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 <lua> 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 <tigro@msvsphere-os.ru> - 10.0-0.3
- Use lua for some scriptlets to avoid missing /bin/sh
* Mon Dec 16 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 10.0-0.2
- enable fips-crypto-policy-overlay.service

Loading…
Cancel
Save