Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19706

RPM no longer installs init script on systemd systems, but preun script still tries to erase it

Details

    Description

      After the fix for MDEV-10797, RPMs no longer install the init script on systems that use systemd. However, the RPM preun script still tries to erase the init script. See here:

      https://github.com/MariaDB/server/blob/mariadb-10.4.5/support-files/rpm/server-preun.sh#L12

      This leads to the following problem:

      $ rpm -e MariaDB-server
      error: %preun(MariaDB-server-10.4.5-1.el7.centos.x86_64) scriptlet failed, exit status 1
      error: MariaDB-server-10.4.5-1.el7.centos.x86_64: erase failed
      

      More verbose output shows:

      + '[' -x /sbin/chkconfig ']'
      + /sbin/chkconfig --del mysql
      D: %preun(MariaDB-server-10.4.5-1.el7.centos.x86_64): waitpid(3107) rc 3107 status 100
      error: %preun(MariaDB-server-10.4.5-1.el7.centos.x86_64) scriptlet failed, exit status 1
      error: MariaDB-server-10.4.5-1.el7.centos.x86_64: erase failed
      

      Attachments

        Issue Links

          Activity

            GeoffMontee Geoff Montee (Inactive) created issue -
            GeoffMontee Geoff Montee (Inactive) made changes -
            Field Original Value New Value
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            juan.vera Juan added a comment -

            Currently you can work around the error by suppressing the problem script:

            rpm -e --noscripts MariaDB-server
            

            juan.vera Juan added a comment - Currently you can work around the error by suppressing the problem script: rpm -e --noscripts MariaDB-server
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]

            Because chkconfig is

            a simple command-line tool for maintaining the /etc/rc[0-6].d directory hierarchy by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories

            I'll change to run it only if /etc/init.d/mysql exists

            serg Sergei Golubchik added a comment - Because chkconfig is a simple command-line tool for maintaining the /etc/rc[0-6].d directory hierarchy by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories I'll change to run it only if /etc/init.d/mysql exists
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.4.6 [ 23412 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Component/s Platform RedHat [ 11302 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 97394 ] MariaDB v4 [ 156324 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 128778

            People

              serg Sergei Golubchik
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.