Skip to content

Commit

Permalink
Merge pull request #1540 from craigcomstock/3.21.x
Browse files Browse the repository at this point in the history
ENT-11901: Remove /etc/init.d/cfengine3 from EL8+ packages (3.21)
  • Loading branch information
craigcomstock authored Nov 18, 2024
2 parents 3a2d3c2 + 7ddd1e8 commit d7b1c25
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
9 changes: 9 additions & 0 deletions packaging/cfengine-community/cfengine-community.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ rm -f $RPM_BUILD_ROOT%{prefix}/bin/openssl
rm -f $RPM_BUILD_ROOT%{prefix}/bin/curl
rm -rf $RPM_BUILD_ROOT%{prefix}/ssl

%if %{?rhel}%{!?rhel:0} >= 9
rm -f $RPM_BUILD_ROOT/etc/sysconfig/cfengine3
rm -f $RPM_BUILD_ROOT/etc/init.d/cfengine3
rm -f $RPM_BUILD_ROOT/etc/profile.d/cfengine3.sh
%endif

%clean
#rm -rf $RPM_BUILD_ROOT
Expand Down Expand Up @@ -123,9 +128,13 @@ rm -rf $RPM_BUILD_ROOT%{prefix}/ssl
%endif

# Globally installed configs, scripts
%if %{?rhel}%{!?rhel:0} < 9
%attr(644,root,root) /etc/sysconfig/cfengine3
%attr(755,root,root) /etc/profile.d/cfengine3.sh
# ENT-11901
# For el9+ we started seeing issues from other packages not expecting init scripts
%attr(755,root,root) /etc/init.d/cfengine3
%endif

# Systemd units
%defattr(644,root,root,755)
Expand Down
11 changes: 11 additions & 0 deletions packaging/cfengine-nova-hub/cfengine-nova-hub.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ mkdir -p $RPM_BUILD_ROOT%{prefix}
cp -a %{prefix}/* $RPM_BUILD_ROOT%{prefix}
cp -a %{_basedir}/cfengine/dist/* $RPM_BUILD_ROOT

# ENT-11901
# For el9+ we started seeing issues from other packages not expecting init scripts
%if %{?rhel}%{!?rhel:0} >= 9
rm -f $RPM_BUILD_ROOT/etc/sysconfig/cfengine3
rm -f $RPM_BUILD_ROOT/etc/init.d/cfengine3
rm -f $RPM_BUILD_ROOT/etc/profile.d/cfengine.sh
%endif
# Remove useless stuff

rm -f $RPM_BUILD_ROOT%{prefix}/lib/libpromises.la
Expand Down Expand Up @@ -314,9 +321,13 @@ exit 0

# Initscript, other configuration
%defattr(755,root,root,755)
# ENT-11901
# For el9+ we started seeing issues from other packages not expecting init scripts
%if %{?rhel}%{!?rhel:0} < 9
/etc/init.d/cfengine3
/etc/profile.d/cfengine.sh
%attr(644,root,root) /etc/sysconfig/cfengine3
%endif

# Systemd units
%defattr(644,root,root,755)
Expand Down
11 changes: 11 additions & 0 deletions packaging/cfengine-nova/cfengine-nova.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ mkdir -p $RPM_BUILD_ROOT%{prefix}
cp -a %{prefix}/* $RPM_BUILD_ROOT%{prefix}
cp -a %{_basedir}/cfengine/dist/* $RPM_BUILD_ROOT

# ENT-11901
# For el9+ we started seeing issues from other packages not expecting init scripts
%if %{?rhel}%{!?rhel:0} >= 9
rm -f $RPM_BUILD_ROOT/etc/sysconfig/cfengine3
rm -f $RPM_BUILD_ROOT/etc/profile.d/cfengine.sh
rm -f $RPM_BUILD_ROOT/etc/init.d/cfengine3
%endif

# Remove useless stuff

Expand Down Expand Up @@ -137,9 +144,13 @@ exit 0
%endif

# Globally installed configs, scripts
# ENT-11901
# For el9+ we started seeing issues from other packages not expecting init scripts
%if %{?rhel}%{!?rhel:0} < 9
%attr(755,root,root) /etc/init.d/cfengine3
%attr(644,root,root) /etc/sysconfig/cfengine3
%attr(755,root,root) /etc/profile.d/cfengine.sh
%endif

# Systemd units
%defattr(644,root,root,755)
Expand Down
2 changes: 1 addition & 1 deletion packaging/common/cfengine-hub/preremove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi

case "`os_type`" in
redhat)
test -x /sbin/chkconfig && chkconfig --del cfengine3
test -x /sbin/chkconfig && test -f /etc/init.d/cfengine3 && chkconfig --del cfengine3
;;
debian)
update-rc.d -f cfengine3 remove
Expand Down
2 changes: 1 addition & 1 deletion packaging/common/cfengine-non-hub/preremove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ case `os_type` in
#
# Unregister CFEngine initscript on uninstallation.
#
test -x /sbin/chkconfig && chkconfig --del cfengine3
test -x /sbin/chkconfig && test -f /etc/init.d/cfengine3 && chkconfig --del cfengine3

#
# systemd support
Expand Down

0 comments on commit d7b1c25

Please sign in to comment.