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

portability: use `uname -n` instead of `hostname`

Details

    Description

      Scripts included with mariadb use `hostname` to query the hostname, used to create logfiles, pidfiles, etc. However this command is not defined by POSIX and thus not guaranteed to work.

      Better use portable `uname -n` instead.

      See attached patch.

      Attachments

        Issue Links

          Activity

            I will happily drop the dependency, especially as it's old inetutils.
            Thanks!

            eworm Christian Hesse added a comment - I will happily drop the dependency, especially as it's old inetutils. Thanks!
            danblack Daniel Black added a comment -

            scripts/wsrep_sst_mysqldump.sh

                [ "$1" = "$(hostname -s)" ] && return 0
                [ "$1" = "$(hostname -f)" ] && return 0
                [ "$1" = "$(hostname -d)" ] && return 0
            

            Is the donor name passed though wsrep.

            https://galeracluster.com/library/documentation/scriptable-sst.html its specified as an IP.

            danblack Daniel Black added a comment - scripts/wsrep_sst_mysqldump.sh [ "$1" = "$(hostname -s)" ] && return 0 [ "$1" = "$(hostname -f)" ] && return 0 [ "$1" = "$(hostname -d)" ] && return 0 Is the donor name passed though wsrep. https://galeracluster.com/library/documentation/scriptable-sst.html its specified as an IP.

            I didn't verify that particular functionality, just added another item to that list of "anything that could match the local host". It's equivalent to the hostname -f that was already there, regardless of whether an FQDN would be valid input or not.

            ghen Geert Hendrickx added a comment - I didn't verify that particular functionality, just added another item to that list of "anything that could match the local host". It's equivalent to the hostname -f that was already there, regardless of whether an FQDN would be valid input or not.

            jplindst can you please take a look in wsrep change?

            anel Anel Husakovic added a comment - jplindst can you please take a look in wsrep change?

            Pushed with 1bb3ad6dfc885112d to 10.4.
            Note: wsrep change not pushed yet.

            anel Anel Husakovic added a comment - Pushed with 1bb3ad6dfc885112d to 10.4 . Note: wsrep change not pushed yet.

            People

              anel Anel Husakovic
              ghen Geert Hendrickx
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.