Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed RPM package so PID file is stored in /var/run/contextBroker #662

Merged
merged 3 commits into from
Nov 25, 2014

Conversation

fgalan
Copy link
Member

@fgalan fgalan commented Nov 24, 2014

Implements #612

@@ -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}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this line was there, but it seems it has no effect. As far as I understand, it would create the "/var/contextBroker" directory but, after installing package, such directory doesn't exist:

[fermin@centollo fiware-orion]$ ls /var/contextBroker
ls: no se puede acceder a /var/contextBroker: No existe el fichero o el directorio

Thus, probably this lines has no effect. Anway, it's weird.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I don't really understand the need for such directory, so I think is a good idea to remove it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's have the line commented for a while, then remove it permanently after a while.

NTC

@@ -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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you are creating the /var/runn/contextBroker folder, but you are leaving the contextBroker.pid file in /var/run/contextBroker.pid. Did you do that intentionally?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's is done at etc/config/contextBroker file:

BROKER_PID_FILE=/var/run/contextBroker.pid

@dmoranj
Copy link
Contributor

dmoranj commented Nov 25, 2014

LGTM

dmoranj added a commit that referenced this pull request Nov 25, 2014
Fixed RPM package so PID file is stored in /var/run/contextBroker
@dmoranj dmoranj merged commit ce8ecc7 into develop Nov 25, 2014
@dmoranj dmoranj deleted the hardening/612_pid_on_run_dir branch November 25, 2014 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants