Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packaging/cfengine-community/cfengine-community.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ rm -f $RPM_BUILD_ROOT%{prefix}/bin/curl
rm -f $RPM_BUILD_ROOT%{prefix}/bin/wcurl
rm -rf $RPM_BUILD_ROOT%{prefix}/ssl

# For el9+ and suse-15+ we started seeing issues from other packages not expecting init scripts
%if %{?rhel}%{!?rhel:0} >= 9 || %{?suse_version}%{!?suse_version:0} >= 1500
# For el8+ and suse-15+ we started seeing issues from other packages not expecting init scripts
%if %{?rhel}%{!?rhel:0} >= 8 || %{?suse_version}%{!?suse_version:0} >= 1500
rm -f $RPM_BUILD_ROOT/etc/sysconfig/cfengine3
rm -f $RPM_BUILD_ROOT/etc/init.d/cfengine3
rm -f $RPM_BUILD_ROOT/etc/init.d/cf-php-fpm
rm -f $RPM_BUILD_ROOT/etc/profile.d/cfengine3.sh
%endif

Expand Down Expand Up @@ -149,12 +150,13 @@ done
%endif

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

# Systemd units
Expand Down
12 changes: 8 additions & 4 deletions packaging/cfengine-nova-hub/cfengine-nova-hub.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ 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
# For el8+ we started seeing issues from other packages not expecting init scripts
# If sysvinit scripts other than cfengine3 are present, such as cf-php-fpm, they will fail with systemctl operations due to not supporting chkconfig.
%if %{?rhel}%{!?rhel:0} >= 8
rm -f $RPM_BUILD_ROOT/etc/sysconfig/cfengine3
rm -f $RPM_BUILD_ROOT/etc/init.d/cfengine3
rm -f $RPM_BUILD_ROOT/etc/init.d/cf-php-fpm
rm -f $RPM_BUILD_ROOT/etc/profile.d/cfengine.sh
%endif
# Remove useless stuff
Expand Down Expand Up @@ -347,9 +349,11 @@ 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
# For el8+ we started seeing issues from other packages not expecting init scripts
# ENT-13319 we found that rhel-8 also exhibited this behavior so adjusted el9+ to el8+
%if %{?rhel}%{!?rhel:0} < 8
/etc/init.d/cfengine3
/etc/init.d/cf-php-fpm
/etc/profile.d/cfengine.sh
%attr(644,root,root) /etc/sysconfig/cfengine3
%endif
Expand Down
3 changes: 3 additions & 0 deletions packaging/cfengine-nova/cfengine-nova.spec.aix.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ rm -f $RPM_BUILD_ROOT%{prefix}/bin/openssl
rm -f $RPM_BUILD_ROOT%{prefix}/bin/curl
rm -rf $RPM_BUILD_ROOT%{prefix}/ssl

# For client we never want hub-specific things
rm -f $RPM_BUILD_ROOT/init.d/cf-php-fpm

%clean
rm -rf $RPM_BUILD_ROOT

Expand Down
3 changes: 3 additions & 0 deletions packaging/cfengine-nova/cfengine-nova.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ mkdir -p $RPM_BUILD_ROOT%{prefix}
cp -a %{prefix}/* $RPM_BUILD_ROOT%{prefix}
cp -a %{_basedir}/cfengine/dist/* $RPM_BUILD_ROOT

# for cfengine-nova (client) we never want cf-php-fpm service, that is only for cfengine-nova-hub
rm -f $RPM_BUILD_ROOT/etc/init.d/cf-php-fpm

# ENT-11901
# For el9+ and suse-15+ we started seeing issues from other packages not expecting init scripts
%if %{?rhel}%{!?rhel:0} >= 9 || %{?suse_version}%{!?suse_version:0} >= 1500
Expand Down
3 changes: 2 additions & 1 deletion packaging/cfengine-nova/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ install: build
rm -f $(CURDIR)/debian/tmp$(PREFIX)/bin/openssl
rm -f $(CURDIR)/debian/tmp$(PREFIX)/bin/curl
rm -rf $(CURDIR)/debian/tmp$(PREFIX)/ssl

# remove hub-specific files
rm -f $(CURDIR)/debian/tmp/etc/init.d/cf-php-fpm

# Debian is different

Expand Down