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

Mark /etc/ccm.conf as noreplace #69

Merged
merged 1 commit into from
Oct 1, 2015
Merged

Mark /etc/ccm.conf as noreplace #69

merged 1 commit into from
Oct 1, 2015

Conversation

piojo-zz
Copy link
Member

Existing configurations may be lost. According to http://www.mojohaus.org/rpm-maven-plugin/map-params.html this value should mark noreplace explicitly.

Existing configurations may be lost.  According to http://www.mojohaus.org/rpm-maven-plugin/map-params.html this value should mark noreplace explicitly.
@ned21
Copy link
Contributor

ned21 commented Sep 29, 2015

Given that the docs say the old value should work, and it worked correctly in previous releases, do we understand the root cause here?

@stdweird
Copy link
Member

@Piojo and how many other repos need this fix?

@jouvin
Copy link
Contributor

jouvin commented Sep 30, 2015

I agree with @ned21 : the true value should be fine. What is the problem you want to solve?

@stdweird
Copy link
Member

15.8_rc3 rpms overwrite the /etc/ccm.conf

@jouvin
Copy link
Contributor

jouvin commented Sep 30, 2015

If your change fixes the problem, I am fine. But the description at the URL you mentioned suggests that this should be what happens with the true value if the directory containing the configuration files is properly defined. And in fact, it worked in the past...

@piojo-zz
Copy link
Member Author

@guillaume-philippon mentioned 15.8_rc3 overwrites this file. I haven't validated the change - I don't have a host with Maven and RPM at this moment. I'd appreciate if somebody could build it, and then validate that the old file is kept.

@jouvin
Copy link
Contributor

jouvin commented Sep 30, 2015

@Piojo we can probably do it at LAL as we reported the problem! But the question remains why the problem appeared as the pom file should be ok with the current value...

@piojo-zz
Copy link
Member Author

@stdweird , I'd review cdp-listend, ncm-ncd and ncm-cdispd for a similar pattern.

rpm -qc --qf '%{filenames}: %{fileflags}\n' cdp-listend ncm-ncd ncm-cdispd

And then, those files should show flags&16!=0

@stdweird
Copy link
Member

@Piojo aii also has config files i think

@jouvin
Copy link
Contributor

jouvin commented Sep 30, 2015

Before modifying things, I insist that we need to understand the problem. Based on the first investigation, this is a bug in the Maven plugin that doesn't set properly the noreplace flag when configuration=true. In particular ccm 15.4 has the flag properly set but not the last RPM without any change in the pom file. I'm trying to rebuild the RPM on another machine to see if this could be caused by the environmnent used to build the release... Else we need to open a bug against the plugin and see if using noreplace as proposed by Stijn works as a workaround.

@jrha jrha added this to the 15.8 milestone Sep 30, 2015
@jouvin
Copy link
Contributor

jouvin commented Sep 30, 2015

I rebuild the CCM RPM on one of our machine and reproduced the problem. Thus the Maven plugin seems the culprit: I'll try to report it to RPM plugin module. In the meantime, I confirm that the change proposed by Stijn works around the problem (at the expense of properly handling config files only with RPM conversely to the true value that does what is appropriate for any packaging format... but probably not an issue for us).

@jouvin
Copy link
Contributor

jouvin commented Sep 30, 2015

Issue opened against Maven RPM plugin: mojohaus/rpm-maven-plugin#19.

@jouvin
Copy link
Contributor

jouvin commented Oct 1, 2015

In fact, looking in more details at the Mojo RPM plugin site, it seems the last release is 2.1.4 (less than one month ago) when we are using 2.1-alpha1 according to Maven output which is pretty old... The problem may be on our side then... I'm trying to investigate.

@jouvin
Copy link
Contributor

jouvin commented Oct 1, 2015

After more investigation, we found that the value used to be noreplace and that the change was introduced by mistake in b9be30f. Thus merging this PR that reverts the change in fact...

jouvin added a commit that referenced this pull request Oct 1, 2015
Mark /etc/ccm.conf as noreplace
@jouvin jouvin merged commit 0e3dd01 into master Oct 1, 2015
@stdweird
Copy link
Member

stdweird commented Oct 1, 2015

@jouvin thanks for figuring this out and my apologies for making the mistake

@piojo-zz piojo-zz deleted the piojo-ccm.conf branch October 1, 2015 12:00
@jouvin
Copy link
Contributor

jouvin commented Oct 2, 2015

Just for the record, RPM maven plugin maintainer answered that configuration=true is not equivalent to noreplace but ensure that the local file, if it exists, is renamed with suffix .rpmold before installing the new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants