Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10037

Redhat/Centos rpm moves aside existing config files during install/upgrade

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core, other
    • Labels:
    • Environment:
      Redhat, Centos 5 and Fedora
    • Similar Issues:

      Description

      During an upgrade of the jenkins package via the official repository, the /etc/sysconfig/jenkins and /etc/init.d/jenkins files are moved to .rpmsave and new versions created instead.
      I have a custom configuration for our environment and upgrading jenkins breaks things bad when it rotates out my configs.
      The rpm should create a new config with .rpmnew instead of rotating out existing configs.

        Attachments

          Activity

          Hide
          thomasmorse Thomas Morse added a comment -

          Here is a diff that would create the new files as .rpmnew

          — jenkins.spec 2011-06-20 15:28:00.000000000 -0700
          +++ jenkins.spec.new 2011-06-20 15:31:51.000000000 -0700
          @@ -134,8 +134,8 @@
          %attr(0755,jenkins,jenkins) %dir %

          {workdir}

          %attr(0750,jenkins,jenkins) /var/log/jenkins
          %config /etc/logrotate.d/%

          {name}
          -%config /etc/init.d/%{name}

          -%config /etc/sysconfig/%

          {name}
          +%config(noreplace) /etc/init.d/%{name}

          +%config(noreplace) /etc/sysconfig/%

          {name}
          /etc/yum.repos.d/jenkins.repo
          /usr/sbin/rc%{name}
          Show
          thomasmorse Thomas Morse added a comment - Here is a diff that would create the new files as .rpmnew — jenkins.spec 2011-06-20 15:28:00.000000000 -0700 +++ jenkins.spec.new 2011-06-20 15:31:51.000000000 -0700 @@ -134,8 +134,8 @@ %attr(0755,jenkins,jenkins) %dir % {workdir} %attr(0750,jenkins,jenkins) /var/log/jenkins %config /etc/logrotate.d/% {name} -%config /etc/init.d/%{name} -%config /etc/sysconfig/% {name} +%config(noreplace) /etc/init.d/%{name} +%config(noreplace) /etc/sysconfig/% {name} /etc/yum.repos.d/jenkins.repo /usr/sbin/rc%{name}
          Hide
          brunojcm Bruno Medeiros added a comment -

          I got the same problem, it's very critical in my point of view. People that don't know that much about rpm will got everything messed up without realize why.
          RPM should keep the existing config file as far as it can!

          Show
          brunojcm Bruno Medeiros added a comment - I got the same problem, it's very critical in my point of view. People that don't know that much about rpm will got everything messed up without realize why. RPM should keep the existing config file as far as it can!
          Hide
          brunojcm Bruno Medeiros added a comment -

          Thomas Morse, could you submit a pull request?

          Show
          brunojcm Bruno Medeiros added a comment - Thomas Morse, could you submit a pull request?
          Hide
          thomasmorse Thomas Morse added a comment -
          Show
          thomasmorse Thomas Morse added a comment - Submitted pull request. https://github.com/jenkinsci/jenkins/pull/209
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Thomas Morse
          Path:
          changelog.html
          rpm/SPECS/jenkins.spec
          http://jenkins-ci.org/commit/jenkins/469c6e947a3ee6477758cc99f261d082c19ac923
          Log:
          [FIXED JENKINS-10037]
          The rpm should create a new config with .rpmnew instead of rotating out existing configs.
          This is a fix for JENKINS-10037.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Thomas Morse Path: changelog.html rpm/SPECS/jenkins.spec http://jenkins-ci.org/commit/jenkins/469c6e947a3ee6477758cc99f261d082c19ac923 Log: [FIXED JENKINS-10037] The rpm should create a new config with .rpmnew instead of rotating out existing configs. This is a fix for JENKINS-10037 .
          Hide
          dogfood dogfood added a comment -
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1034
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Thomas Morse
          Path:
          changelog.html
          rpm/SPECS/jenkins.spec
          http://jenkins-ci.org/commit/jenkins/469c6e947a3ee6477758cc99f261d082c19ac923
          Log:
          [FIXED JENKINS-10037]
          The rpm should create a new config with .rpmnew instead of rotating out existing configs.
          This is a fix for JENKINS-10037.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Thomas Morse Path: changelog.html rpm/SPECS/jenkins.spec http://jenkins-ci.org/commit/jenkins/469c6e947a3ee6477758cc99f261d082c19ac923 Log: [FIXED JENKINS-10037] The rpm should create a new config with .rpmnew instead of rotating out existing configs. This is a fix for JENKINS-10037 .
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Thomas Morse
          Path:
          changelog.html
          rpm/SPECS/jenkins.spec
          http://jenkins-ci.org/commit/jenkins/469c6e947a3ee6477758cc99f261d082c19ac923
          Log:
          [FIXED JENKINS-10037]
          The rpm should create a new config with .rpmnew instead of rotating out existing configs.
          This is a fix for JENKINS-10037.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Thomas Morse Path: changelog.html rpm/SPECS/jenkins.spec http://jenkins-ci.org/commit/jenkins/469c6e947a3ee6477758cc99f261d082c19ac923 Log: [FIXED JENKINS-10037] The rpm should create a new config with .rpmnew instead of rotating out existing configs. This is a fix for JENKINS-10037 .
          Hide
          integer Kanstantsin Shautsou added a comment -

          Why init.d script is noreplaced?

          Show
          integer Kanstantsin Shautsou added a comment - Why init.d script is noreplaced?
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Thomas Morse
          Path:
          SPECS/jenkins.spec
          http://jenkins-ci.org/commit/packaging/2791df41bee6bd631adf49bddd16738bfa4659b9
          Log:
          [FIXED JENKINS-10037]
          The rpm should create a new config with .rpmnew instead of rotating out existing configs.
          This is a fix for JENKINS-10037.

          Originally-From: jenkins-ci.org/commit/core/469c6e947a3ee6477758cc99f261d082c19ac923

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Thomas Morse Path: SPECS/jenkins.spec http://jenkins-ci.org/commit/packaging/2791df41bee6bd631adf49bddd16738bfa4659b9 Log: [FIXED JENKINS-10037] The rpm should create a new config with .rpmnew instead of rotating out existing configs. This is a fix for JENKINS-10037 . Originally-From: jenkins-ci.org/commit/core/469c6e947a3ee6477758cc99f261d082c19ac923

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            thomasmorse Thomas Morse
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: