Skip to content

Commit

Permalink
Merge pull request #1407 from vpodzime/master-no_runalerts_service
Browse files Browse the repository at this point in the history
Drop cf-runalerts.service and the runalerts stamp directory
  • Loading branch information
vpodzime authored May 2, 2024
2 parents 79c4769 + 63d99d2 commit a7e0210
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 24 deletions.
1 change: 0 additions & 1 deletion packaging/cfengine-community/cfengine-community.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ rm -rf $RPM_BUILD_ROOT%{prefix}/ssl
/usr/lib/systemd/system/cf-reactor.service
/usr/lib/systemd/system/cf-monitord.service
/usr/lib/systemd/system/cf-postgres.service
/usr/lib/systemd/system/cf-runalerts.service
/usr/lib/systemd/system/cf-serverd.service

# Documentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/usr/lib/systemd/system/cf-reactor.service
/usr/lib/systemd/system/cf-monitord.service
/usr/lib/systemd/system/cf-postgres.service
/usr/lib/systemd/system/cf-runalerts.service
/usr/lib/systemd/system/cf-serverd.service
/etc/default/cfengine3
/etc/profile.d/cfengine3.sh
Expand Down
7 changes: 1 addition & 6 deletions packaging/cfengine-nova-hub/cfengine-nova-hub.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ rm -f $RPM_BUILD_ROOT%{prefix}/lib/php/cfengine-enterprise-api.la

cp -R %{_basedir}/mission-portal $RPM_BUILD_ROOT%prefix/share/GUI

rm -f $RPM_BUILD_ROOT%prefix/share/GUI/runalerts.php
cp -v %{_basedir}/mission-portal/runalerts.php $RPM_BUILD_ROOT%prefix/bin/runalerts.php

cp -vR %{_basedir}/mission-portal/Apache-htaccess $RPM_BUILD_ROOT%prefix/share/GUI/htaccess
mkdir -p $RPM_BUILD_ROOT%prefix/share/GUI/api
cp -R %{_basedir}/nova/api/http/* $RPM_BUILD_ROOT%prefix/share/GUI/api
Expand Down Expand Up @@ -217,10 +214,9 @@ exit 0
# Nova-only binaries
%prefix/bin/cf-hub
%prefix/bin/cf-reactor
%prefix/bin/runalerts.php

# Only verify owner group mode maj min symlink
# Don't verify md5, size, mtime
%verify(not md5 size mtime) %prefix/bin/runalerts.php
#rsync
%prefix/bin/rsync
# init.d script enterprise part
Expand Down Expand Up @@ -334,7 +330,6 @@ exit 0
/usr/lib/systemd/system/cf-reactor.service
/usr/lib/systemd/system/cf-monitord.service
/usr/lib/systemd/system/cf-postgres.service
/usr/lib/systemd/system/cf-runalerts.service
/usr/lib/systemd/system/cf-serverd.service

%if %{?rhel}%{!?rhel:0} > 7
Expand Down
2 changes: 0 additions & 2 deletions packaging/cfengine-nova-hub/debian/cfengine-nova-hub.install
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/usr/lib/systemd/system/cf-reactor.service
/usr/lib/systemd/system/cf-monitord.service
/usr/lib/systemd/system/cf-postgres.service
/usr/lib/systemd/system/cf-runalerts.service
/usr/lib/systemd/system/cf-serverd.service
/var/cfengine/bin/cf-agent
/var/cfengine/bin/cf-check
Expand All @@ -21,7 +20,6 @@
/var/cfengine/bin/cf-secret
/var/cfengine/bin/cf-serverd
/var/cfengine/bin/cf-support
/var/cfengine/bin/runalerts.php
/var/cfengine/bin/rsync
/var/cfengine/bin/cfengine3-nova-hub-init-d.sh
/var/cfengine/bin/git
Expand Down
3 changes: 0 additions & 3 deletions packaging/cfengine-nova-hub/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ install: build
# GUI, REST, KB
cp -R $(BASEDIR)/mission-portal $(CURDIR)/debian/tmp$(PREFIX)/share/GUI

rm -f $(CURDIR)/debian/tmp$(PREFIX)/share/GUI/runalerts.php
cp -v $(BASEDIR)/mission-portal/runalerts.php $(CURDIR)/debian/tmp$(PREFIX)/bin/runalerts.php

mkdir $(CURDIR)/debian/tmp$(PREFIX)/share/GUI/api
cp -R $(BASEDIR)/nova/api/http/* $(CURDIR)/debian/tmp$(PREFIX)/share/GUI/api
chmod 700 $(CURDIR)/debian/tmp$(PREFIX)/share/GUI/api/dc-scripts/*.sh
Expand Down
1 change: 0 additions & 1 deletion packaging/cfengine-nova/cfengine-nova.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ exit 0
/usr/lib/systemd/system/cf-reactor.service
/usr/lib/systemd/system/cf-monitord.service
/usr/lib/systemd/system/cf-postgres.service
/usr/lib/systemd/system/cf-runalerts.service
/usr/lib/systemd/system/cf-serverd.service

# Documentation
Expand Down
1 change: 0 additions & 1 deletion packaging/cfengine-nova/debian/cfengine-nova.install
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/usr/lib/systemd/system/cf-reactor.service
/usr/lib/systemd/system/cf-monitord.service
/usr/lib/systemd/system/cf-postgres.service
/usr/lib/systemd/system/cf-runalerts.service
/usr/lib/systemd/system/cf-serverd.service
/var/cfengine/bin/cf-agent
/var/cfengine/bin/cf-check
Expand Down
9 changes: 0 additions & 9 deletions packaging/common/cfengine-hub/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1045,18 +1045,9 @@ fi

(cd /tmp && su cfpostgres -c "$PREFIX/bin/pg_ctl stop -D $PREFIX/state/pg/data -m smart" || su cfpostgres -c "$PREFIX/bin/pg_ctl stop -D $PREFIX/state/pg/data -m fast")

##
# ENT-3921: Make bin/runalerts.php executable
#
chmod 755 $PREFIX/bin/runalerts.php

# ENT-9711: Ensure $PREFIX/httpd/php/runalerts-stamp is created and has proper owner/permissions
# Have to be careful here because httpd/php/bin wants to be root:root
mkdir -p "$PREFIX/httpd/php/runalerts-stamp"
chown root:$MP_APACHE_USER $PREFIX/httpd/php
chown -R root:$MP_APACHE_USER $PREFIX/httpd/php/runalerts-stamp
chmod g+rX "$PREFIX/httpd/php"
chmod -R g+rX "$PREFIX/httpd/php/runalerts-stamp"

#
# Register CFEngine initscript, if not yet.
Expand Down
5 changes: 5 additions & 0 deletions packaging/common/cfengine-hub/preinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -395,4 +395,9 @@ if is_upgrade && egrep '^3\.([2-9]|1[012345])\.' "$PREFIX/UPGRADED_FROM.txt" >/d
true "Done removing keys"
fi

# Since 3.24.0 runalerts is part of cf-reactor with no stamp files
if is_upgrade && test -d "$PREFIX/httpd/php/runalerts-stamp"; then
rm -rf "$PREFIX/httpd/php/runalerts-stamp"
fi

exit 0

0 comments on commit a7e0210

Please sign in to comment.