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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • core, other
    • Redhat, Centos 5 and Fedora

    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

          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}
          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}

          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!

          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!

          Thomas Morse, could you submit a pull request?

          brunojcm Bruno Medeiros added a comment - Thomas Morse, could you submit a pull request?
          thomasmorse Thomas Morse added a comment - Submitted pull request. https://github.com/jenkinsci/jenkins/pull/209

          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.

          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 .
          dogfood dogfood added a comment -
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1034

          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.

          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 .

          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.

          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 .

          Why init.d script is noreplaced?

          integer Kanstantsin Shautsou added a comment - Why init.d script is noreplaced?

          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

          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

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

            Dates

              Created:
              Updated:
              Resolved: