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

Give option to build client and server separately

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Packaging
    • None

    Description

      Two replies from "pkgsrc" (netbsd) distro package maintainer e-mail list that they need to be able to build MariaDB client and server separately. See e-mail replies below for exact quote, as well as other comments.

      ---------- Forwarded message ---------
      From: nia <nia@netbsd.org>
      Date: Thu, Nov 7, 2024 at 2:05 AM
      Subject: Re: Your tips to MariaDB?
      To: Robert Silén <robert.silen@mariadb.org>
      Cc: <pkgsrc-users@netbsd.org>

      On Wed, Nov 06, 2024 at 03:43:25PM +0200, Robert Siln wrote:
      > Thank you for your work with pkgsrc. We are reaching out to package
      > maintainers from MariaDB Foundation to inquire if you are content with
      > MariaDB. Do you have any tips or feedback on how we at the Foundation could
      > support effective or better packaging of MariaDB?

      Yes, we are shipping separate client and server packages.
      We've been doing this for MySQL long before MariaDB existed and
      our infrastrucutre is built around that model.

      This requires us to build the server separately from the client
      in a way where they don't install any conflicting files.

      Currently this isn't possible with upstream mariadb, and we have
      a lot of patches.

      Mostly ones that change

      IF(NOT WITHOUT_SERVER)
      [...build server stuff...]
      ENDIF()

      to

      IF(NOT WITHOUT_SERVER)
      [...build server stuff...]
      ELSE()
      [...build client stuff...]
      ENDIF()

      I would really appreciate a WITHOUT_CLIENT option to build
      just the server code when an installed client is already available.

      ---------- Forwarded message ---------
      From: Greg Troxel <gdt@lexort.com>
      Date: Thu, Nov 7, 2024 at 2:11 AM
      Subject: Re: Your tips to MariaDB?
      To: Robert Silén <robert.silen@mariadb.org>
      Cc: <pkgsrc-users@netbsd.org>

      Robert Silén <robert.silen@mariadb.org> writes:

      > Hello package maintainers at pkgsrc,
      >
      > Thank you for your work with pkgsrc. We are reaching out to package
      > maintainers from MariaDB Foundation to inquire if you are content with
      > MariaDB. Do you have any tips or feedback on how we at the Foundation could
      > support effective or better packaging of MariaDB?
      >
      > Thank you for taking the time to reply!
      >
      > Best regards,
      > Robert Silén

      You have reached the pkgsrc users list, which is what MAINTAINER= when
      there is no specific person maintainging a package. (That's totally
      fine.)

      I am not an expert in using MariaDB or packaging it, but I looked over
      the package and have a few comments.

      A meta-comment is that you could check out pkgsrc and read the control
      files for mariadb. Part of that content is working around issues of
      various sorts, and those could be viewed as bugs and fixed.

      https://www.pkgsrc.org/#index3h2

      Things that would be nice:

      • Allow building client and server separately. It's ok for the server
        build to expect the client part to be built and installed.
        Packaging systems want these separate, as many uses involves only
        client libs on some machine. You may be expecting typical
        GNU/Linux packaging where the package is expected to build
        everything and then assign files to split packages. pkgsrc isn't
        like that; each pacakge is built separately. This is more or less
        necessary for a packaging system that allows users to build
        packages, as it enables not building the server if you don't need
        it. More importantly (in the general case) it enables not building
        the extra prerequesite packages e.g. for the server.
      • It seems that some shell scripts have a bash #! line. Perhaps they
        even have non-POSIX syntax. Instead, use #!/bin/sh, and write in
        POSIX shell.
      • In all shell scripts, do not use "test ==". This is not legal per
        POSIX, and is a bashism.
      • Don't special-case APPLE. If mariadb is being built as a mac app,
        that's fine, but if it is just the that mostly-POSIXy computer one
        is using is APPLE, that's not a reason to do things differently
        (other than handling Apple's odd shlibs).
      • There are a lot of patches. A lot of these can likely mostly be
        viewed as bugs and applied upstream. Some I have commented on. I
        view this not so much as "accommodating NetBSD or pkgsrc" as "making
        the code more portable" although likely there is a little of the
        former.
      • There are things in the Makefile.common which are like patches.

      Another thing that would be great is to have upstream build and test on
      NetBSD, and particularly on some less common CPU architectures. Or the
      illumos family, which pkgsrc also supports. Even better to run CI on
      it.

      Probably others will have comments too.

      Greg

      Attachments

        Activity

          People

            Unassigned Unassigned
            rsilen Robert Silén
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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