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

Fixes #5223 - Fix migration of rudder-webapp to 2.11 on RPM #442

Merged
merged 1 commit into from
Jul 8, 2014
Merged

Fixes #5223 - Fix migration of rudder-webapp to 2.11 on RPM #442

merged 1 commit into from
Jul 8, 2014

Conversation

nperron
Copy link
Contributor

@nperron nperron commented Jul 8, 2014

Fixes #5223 - Fix migration of rudder-webapp to 2.11 on RPM

cf http://www.rudder-project.org/redmine/issues/5223

The migration removed the file /opt/rudder/jetty7/contexts/rudder.xml since it was not owned by package.

I've built a package to try the patch and it worked

@@ -179,6 +179,10 @@ mkdir -p %{buildroot}/etc/%{apache_vhost_dir}/
mkdir -p %{buildroot}/etc/sysconfig/
mkdir -p %{buildroot}/usr/share/doc/rudder

# Emulate installation of file rudder.xml in order to be owned by package
mkdir -p %{buildroot}%{rudderdir}/jetty7/contexts/
touch %{buildroot}%{rudderdir}/jetty7/contexts/rudder.xml
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure we don't want to install an empty file.

My understanding of the %ghost directive is that you can just specify it, and RPM will "own" the file, but not install it. Since you don't install it, you don't need it.

Did you test this with just the "%ghost", and no file, and have problems? If so, please explain what they were.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is explained in the documentation (http://www.rpm.org/max-rpm-snapshot/s1-rpm-inside-files-list-directives.html) that we need to use a dummy file in the buildroot:
"The way to achieve this, is to use the %ghost directive. By adding this directive to the line containing a file, RPM will know about the ghosted file, but will not add it to the package. However it still needs to be in the buildroot."

jooooooon added a commit that referenced this pull request Jul 8, 2014
…11_on_rpm

Fixes #5223 - Fix migration of rudder-webapp to 2.11 on RPM
@jooooooon jooooooon merged commit 99d1e84 into Normation:branches/rudder/2.11 Jul 8, 2014
This pull request was closed.
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