• Bug#1100575: mariadb-server-core: Invalid file '/usr/sbin/mysqld' for c

    From NStorm@21:1/5 to All on Sat Mar 15 16:40:01 2025
    Package: mariadb-server-core
    Version: 1:10.11.11-0+deb12u1
    Severity: normal
    X-Debbugs-Cc: lists@nstorm.slmail.me

    Hello,

    When libcap2-bin installed and setcap available, mariadb-server-core packages prints this error on install:
    Invalid file '/usr/sbin/mysqld' for capability operation
    Setcap failed on /usr/sbin/mysqld, required with --memlock if insufficent RLIMIT_MEMLOCK

    This happens due to this line in package postinst script:
    PROGRAM=$(dpkg-divert --truename /usr/sbin/mysqld)

    /usr/sbin/mysqld is a symlink to mariadbd and dpkg-divert --truename aren't resolving it
    to target:

    root@debian:~# dpkg-divert --truename /usr/sbin/mysqld
    /usr/sbin/mysqld
    root@debian:~# file /usr/sbin/mysqld
    /usr/sbin/mysqld: symbolic link to mariadbd

    -- System Information:
    Debian Release: 12.10
    APT prefers stable-updates
    APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
    Architecture: amd64 (x86_64)
    Foreign Architectures: i386

    Kernel: Linux 6.1.0-31-amd64 (SMP w/8 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
    Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages mariadb-server-core depends on:
    ii libc6 2.36-9+deb12u10
    ii libcrypt1 1:4.4.33-2
    ii libgcc-s1 12.2.0-14
    ii libnuma1 2.0.16-1
    ii libpcre2-8-0 10.42-1
    ii libssl3 3.0.15-1~deb12u1
    ii libstdc++6 12.2.0-14
    ii libsystemd0 252.36-1~deb12u1
    ii liburing2 2.3-3
    ii mariadb-common 1:10.11.11-0+deb12u1
    ii zlib1g 1:1.2.13.dfsg-1

    mariadb-server-core recommends no packages.

    mariadb-server-core suggests no packages.

    -- no debconf information

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?T3R0byBLZWvDpGzDpGluZW4=?@21:1/5 to All on Sun Mar 16 07:30:01 2025
    Hi!

    Thanks for reporting. This is a regression from https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/db57c0d8f20ebfe9f54f98941eabb1c774e696a3

    The warning is just a warning and the installation/upgrade still
    completes, right?

    Seems upstream is aware of this issue and reworking this for next
    MariaDB minor releases in https://github.com/MariaDB/server/pull/3873

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From lists@nstorm.slmail.me@21:1/5 to All on Sun Mar 16 08:10:01 2025
    Hello,

    Thanks for the information on upstream issue!

    Yes, the installation completes after that. But I guess that because
    setcap failed, it won't start with --memlock switch. I guesstimate this
    based just on the error message during install, which suggest on why it
    tried to setcap on server binary.

    As a temporary workaround until upstream addresses this issue, it can be
    easily fixed after install by running setcap manually on mariadbd binary.

    16.03.2025 9:24, Otto Kekäläinen - otto at debian.org wrote:
    Hi!

    Thanks for reporting. This is a regression from https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/db57c0d8f20ebfe9f54f98941eabb1c774e696a3

    The warning is just a warning and the installation/upgrade still
    completes, right?

    Seems upstream is aware of this issue and reworking this for next
    MariaDB minor releases in https://github.com/MariaDB/server/pull/3873


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?T3R0byBLZWvDpGzDpGluZW4=?@21:1/5 to All on Fri Apr 11 18:00:01 2025
    Hi!

    Can you confirm if this issue is fixed with latest MariaDB versions in Debian?

    If not, can you provide exact steps on how to reproduce the issue so I
    can test it myself easily or add it into CI?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From lists@nstorm.slmail.me@21:1/5 to All on Sat Apr 12 02:10:02 2025
    Hello,

    If by this you mean versions from the current stable Debian version
    (12), mariadb-server-core package wasn't updated since I've reported
    this issue: https://packages.debian.org/bookworm/mariadb-server-core
    Latest for Debian 12 is still 1:10.11.11-0+deb12u1 as I've reported.

    Steps to reproduce should be pretty straightforward and obvious from my
    report:

    1./(should be installed on most of the standard setups already)/ apt-get install libcap2-bin
    2. apt-get install mariadb-server

    You'll get the same error messages during mariadb-server-core package
    install. Nothing volatile or conditional here pretty much it should
    always happen based on the install script.

    On 11.04.2025 18:48, Otto Kekäläinen - otto at debian.org wrote:
    Hi!

    Can you confirm if this issue is fixed with latest MariaDB versions in Debian?

    If not, can you provide exact steps on how to reproduce the issue so I
    can test it myself easily or add it into CI?

    <!DOCTYPE html><html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <body>
    <p>Hello,</p>
    <p>If by this you mean versions from the current stable Debian
    version (12), mariadb-server-core package wasn't updated since
    I've reported this issue:
    <a class="moz-txt-link-freetext" href="https://packages.debian.org/bookworm/mariadb-server-core">https://packages.debian.org/bookworm/mariadb-server-core</a><br>
    Latest for Debian 12 is still 1:10.11.11-0+deb12u1 as I've
    reported.</p>
    <p>Steps to reproduce should be pretty straightforward and obvious
    from my report:</p>
    <pre>1. <i>(should be installed on most of the standard setups already)</i> apt-get install libcap2-bin
    2. apt-get install mariadb-server</pre>
    <p>You'll get the same error messages during mariadb-server-core
    package install. Nothing volatile or conditional here pretty much
    it should always happen based on the install script.<br>
    </p>
    <div class="moz-cite-prefix">On 11.04.2025 18:48, Otto Kekäläinen -
    otto at debian.org wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAOU6tAA133GMnGxXmxCQ6uYJCc=gMeCJzaoBoVzxEcFohQhzhw@mail.gmail.com">
    <pre wrap="" class="moz-quote-pre">Hi!

    Can you confirm if this issue is fixed with latest MariaDB versions in Debian?

    If not, can you provide exact steps on how to reproduce the issue so I
    can test it myself easily or add it into CI?

    </pre>
    </blockquote>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?T3R0byBLZWvDpGzDpGluZW4=?@21:1/5 to All on Sat Apr 12 20:30:01 2025
    Roger, so steps to reproduce:

    apt update
    apt install -y libcap2-bin
    apt install -y mariadb-server
    ...
    Setting up mariadb-server-core (1:10.11.11-0+deb12u1) ...
    Invalid file '/usr/sbin/mysqld' for capability operation
    Setcap failed on /usr/sbin/mysqld, required with --memlock if
    insufficent RLIMIT_MEMLOCK
    Setting up libperl5.36:amd64 (5.36.0-7+deb12u1) ...

    Apt however completes without exit code, so any test for this needs to specifically test for the capability usage.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?T3R0byBLZWvDpGzDpGluZW4=?@21:1/5 to All on Sat Apr 19 20:50:01 2025
    Forwarded: https://github.com/MariaDB/server/pull/3873

    This does not affect MariaDB 11.8.1 in unstable/Trixie, but it does
    affect mariadb/1:10.11.11-0+deb12u1 in Bookworm, and will
    automatically be fixed with next upstream release as upstream fixed
    this.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)