From 47b59a4d123807164d4cabb15733eef7ca76d164 Mon Sep 17 00:00:00 2001 From: Fermin Galan Date: Mon, 24 Nov 2014 12:54:55 +0100 Subject: [PATCH 1/2] FIX RPM package so PID file is stored in /var/run/contextBroker instead of /var/log/contextBroker. --- CHANGES_NEXT_RELEASE | 1 + etc/config/contextBroker | 2 +- rpm/SPECS/contextBroker.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 6662e3a32d..10d8cd8630 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -19,3 +19,4 @@ Fix: Changed max-length of service path elements from 10 characteres to 50. (Iss Fix: Service path is no longer ignored at entity creation time for entities without type. (Issue #642) Fix: The broker crashed on receiving compounds for some convops, e.g. /v1/contextEntities/{entityId} (Issue #647) Fix: Using 443 as default port for "https" notifications. (Issue #639) +Fix: Fixed RPM package so PID file is stored in /var/run/contextBroker instead of /var/log/contextBroker. (Issue #612) diff --git a/etc/config/contextBroker b/etc/config/contextBroker index e53065f5d9..462f2a7362 100644 --- a/etc/config/contextBroker +++ b/etc/config/contextBroker @@ -35,7 +35,7 @@ BROKER_PORT=1026 BROKER_LOG_DIR=/var/log/contextBroker # BROKER_PID_FILE - Where to store the pid for orion-broker -BROKER_PID_FILE=/var/log/contextBroker/contextBroker.pid +BROKER_PID_FILE=/var/run/contextBroker.pid ## Database configuration for orion-broker BROKER_DATABASE_HOST=localhost diff --git a/rpm/SPECS/contextBroker.spec b/rpm/SPECS/contextBroker.spec index 702b51de1b..e7358df725 100644 --- a/rpm/SPECS/contextBroker.spec +++ b/rpm/SPECS/contextBroker.spec @@ -72,7 +72,9 @@ exit 0 DATE=$(date "+%Y-%m-%d") /sbin/chkconfig --add %{name} mkdir -p /var/log/%{name} +mkdir -p /var/run/%{name} chown -R %{owner}:%{owner} /var/log/%{name} +chown -R %{owner}:%{owner} /var/run/%{name} # Secure the configuration file to prevent un-authorized access chown %{owner}:%{owner} /etc/sysconfig/%{name} chmod 600 /etc/sysconfig/%{name} @@ -103,7 +105,8 @@ cp -R %{_sourcedir}/etc $RPM_BUILD_ROOT # it as part of our install script strip $RPM_BUILD_ROOT/usr/bin/contextBroker chmod 555 $RPM_BUILD_ROOT/usr/bin/contextBroker -mkdir -p $RPM_BUILD_ROOT/var/%{name} +#FIXME: I think next line is not actually needed, thus it has been commented out for a quarentine period (starting on 24/11/2014) +#mkdir -p $RPM_BUILD_ROOT/var/%{name} mkdir -p $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/etc/profile.d mkdir -p $RPM_BUILD_ROOT/usr/share/contextBroker/tests From 8c530b27ff2f9313a039cf28e6183180a0ed3d34 Mon Sep 17 00:00:00 2001 From: Fermin Galan Date: Tue, 25 Nov 2014 09:30:11 +0100 Subject: [PATCH 2/2] FIX path for PID file in configuration file --- etc/config/contextBroker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/config/contextBroker b/etc/config/contextBroker index 462f2a7362..9dc1b51f1c 100644 --- a/etc/config/contextBroker +++ b/etc/config/contextBroker @@ -35,7 +35,7 @@ BROKER_PORT=1026 BROKER_LOG_DIR=/var/log/contextBroker # BROKER_PID_FILE - Where to store the pid for orion-broker -BROKER_PID_FILE=/var/run/contextBroker.pid +BROKER_PID_FILE=/var/run/contextBroker/contextBroker.pid ## Database configuration for orion-broker BROKER_DATABASE_HOST=localhost