Build with lz4 build-dep instead of bundled

Bug #1631339 reported by Lars Tangvald on 2016-10-07
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Lars Tangvald

Bug Description

MySQL 5.7 source package has liblz4-dev as a build-dep, but it isn't actually used because the build defaults to using a bundled version.

[Impact]
No known user impact at present (other than a small difference in binary footprint), but builds shouldn't use bundled libraries when it's available in the system.

[racb] However a future security update in liblz4-dev will not update MySQL. We fixed this in sid, and I think it's appropriate to backport given that we've tested it in Yakkety.

Add cmake flag -DWITH_LZ4=system to use the correct version.

[Test case]
* Build package
* Run ldd on usr/lib/lz4_decompress and see it doesn't link in liblz4 from the system.

[Regression potential]
This change has been in Yakkety for some time (5.7.15-0ubuntu2).

Database dump-related utils like mysqlpump and lz4_decompress could be impacted if any significant changes arise between the version of liblz4 available on user systems and what is used to test upstream.

Lars Tangvald (lars-tangvald) wrote :

Fix released in mysql-5.7 (5.7.15-0ubuntu2) yakkety

Changed in mysql-5.7 (Ubuntu):
status: New → Fix Released
description: updated
Changed in mysql-5.7 (Ubuntu Xenial):
assignee: nobody → Lars Tangvald (lars-tangvald)
status: New → Fix Committed
Changed in mysql-5.7 (Ubuntu Xenial):
status: Fix Committed → In Progress
Robie Basak (racb) on 2017-01-06
Changed in mysql-5.7 (Ubuntu Xenial):
milestone: none → xenial-updates
Robie Basak (racb) wrote :

Lars, is there a test case we can add for this that exercises mysqldump's lz4 capability, so that we know that it still functions?

description: updated

There's a test in the mtr suite: main.mysqlpump_basic (not mysqldump)
that should cover this.

But for extra testing:

* Create a database test with a table and a row or two
* Run:
  mysqlpump -uroot -p --compress-output=LZ4 test > testdb.lz
* Run
  /usr/lib/mysql/lz4_decompress testdb.lz testdb.out
* Compare testdb.out with the output of
  mysqlpump -uroot -p test

--
Lars

On 02/03/2017 06:44 PM, Robie Basak wrote:
> Lars, is there a test case we can add for this that exercises
> mysqldump's lz4 capability, so that we know that it still functions?
>
> ** Description changed:
>
> MySQL 5.7 source package has liblz4-dev as a build-dep, but it isn't
> actually used because the build defaults to using a bundled version.
>
> [Impact]
> No known user impact at present (other than a small difference in binary footprint), but builds shouldn't use bundled libraries when it's available in the system.
> +
> + [racb] However a future security update in liblz4-dev will not update
> + MySQL. We fixed this in sid, and I think it's appropriate to backport
> + given that we've tested it in Yakkety.
>
> Add cmake flag -DWITH_LZ4=system to use the correct version.
>
> [Test case]
> * Build package
> * Run ldd on usr/lib/lz4_decompress and see it doesn't link in liblz4 from the system.
>
> [Regression potential]
> This change has been in Yakkety for some time (5.7.15-0ubuntu2).
>
> Database dump-related utils like mysqlpump and lz4_decompress could be
> impacted if any significant changes arise between the version of liblz4
> available on user systems and what is used to test upstream.
>

Hello Lars, or anyone else affected,

Accepted mysql-5.7 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mysql-5.7/5.7.17-0ubuntu0.16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mysql-5.7 (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Lars Tangvald (lars-tangvald) wrote :

Verified:
5.7.17-0ubuntu0.16.04.1:
ldd /usr/lib/mysql/lz4_decompress
 linux-vdso.so.1 => (0x00007ffc04d3e000)
 libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7937247000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7936e7e000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7936b74000)
 /lib64/ld-linux-x86-64.so.2 (0x000055b76f49f000)
 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f793695e000)

5.7.17-0ubuntu0.16.04.2:
ldd /usr/lib/mysql/lz4_decompress
 linux-vdso.so.1 => (0x00007ffdea34d000)
 liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fcd3b862000)
 libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fcd3b4e0000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcd3b116000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcd3ae0d000)
 /lib64/ld-linux-x86-64.so.2 (0x000055d24fabd000)
 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fcd3abf7000)

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-5.7 - 5.7.17-0ubuntu0.16.04.2

---------------
mysql-5.7 (5.7.17-0ubuntu0.16.04.2) xenial; urgency=medium

  * Add libjson-perl dependency for test suite (LP: #1631338)
    The last two python tests in the mtr suite were rewritten
    in perl, and require this package. Added for mysql-testsuite
    and as a build-dep.
  * Build with DWITH_LZ4=system (LP: #1631339)
    Package was previously built with bundled liblz4, though it
    was specified as a build-dep.
  * Add support for custom datadir to systemd service (LP: #1574782)
    The service was reporting an error if no database could be found in
    /var/lib/mysql. It now checks the location specified in the config.
    Note that user must still handle apparmor access for custom datadir.
  * Fix copy of soft-link datadir to /var/lib/mysql-upgrade (LP: #1474212)
    Upgrade would sometimes fail if mysql-upgrade already contained a
    link copy from a previous upgrade.
  * Escape special characters in password (LP: #1598992)
    Special characters in the root password would cause syntax errors
    and postinst failures.
  * Failing tests on platforms supported by upstream fail build (LP: #1646488)
    A passing test suite is now enforced on i386 and amd64 platforms at
    build-time.
  * d/copyright: Updated with information about new source files
  * Unstable test main.xa_prepared_binlog_off disabled pending upstream fix.
    Upstream bug report: http://bugs.mysql.com/bug.php?id=83340
  * d/lintian-overrides: Updated line numbers

 -- Lars Tangvald <email address hidden> Fri, 03 Feb 2017 08:53:04 +0100

Changed in mysql-5.7 (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for mysql-5.7 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.