Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-6495

RPM and DEB maintainer scripts remove OPENNMS_HOME/data tree

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.12.5
    • Fix Version/s: 1.12.6
    • Component/s: Build / Packaging
    • Security Level: Default (Default Security Scheme)
    • Labels:
    • Environment:
      CentOS 6.5 x86_64
      Also reported on a RHEL 5.something x86_64 system

      Description

      How to reproduce:

      rm -rf /opt/opennms
      sudo yum -y install opennms-core
      ...
      - cleaning up $OPENNMS_HOME/data... done
      
       *** Installation complete.  You must still run the installer at
       *** $OPENNMS_HOME/bin/install to be sure your database is up
       *** to date before you start OpenNMS.  See the install guide at
       *** http://www.opennms.org/wiki/Installation:RPM and the
       *** release notes for details.
      
        Verifying  : opennms-core-1.12.5-1.noarch                                                                                                                 1/1 
      
      Installed:
        opennms-core.noarch 0:1.12.5-1                                                                                                                                
      
      Complete!
      
      
      rpm --verify opennms-core
      missing     /opt/opennms/data
      missing     /opt/opennms/data/tmp
      missing     /opt/opennms/data/tmp/README
      

      This looks self-inflicted, in the "%post core" maintainer script:

      printf -- "- cleaning up \$OPENNMS_HOME/data... "
      if [ -d "$RPM_INSTALL_PREFIX0/data" ]; then
              rm -rf "$RPM_INSTALL_PREFIX0/data"
      fi
      echo "done"
      

      The customer who reported this problem (https://mynms.opennms.com/Ticket/Display.html?id=2949) has their own enterprisey software distribution system (in lieu of YUM) which requires rpm --verify to come back with no missing files in order to consider a package installed. I think that's a reasonable thing to expect of a freshly-installed package.

        Attachments

          Activity

            People

            Assignee:
            jeffg Jeff Gehlbach
            Reporter:
            jeffg Jeff Gehlbach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: