wrong libdir for plugins, rpm build failed

Bug #1151400 reported by Alexey Bychko
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Triaged
Medium
Ignacio Nin
5.1
Invalid
Undecided
Unassigned
5.5
Triaged
Medium
Ignacio Nin
5.6
Triaged
Medium
Ignacio Nin

Bug Description

from bug 1099809

...
error: File not found: /root/rpmbuild/BUILDROOT/Percona-Server-55-5.5.29-rel30.0.451.rhel.x86_64/usr/lib64/mysql/plugin/semisync_master.so
error: File not found: /root/rpmbuild/BUILDROOT/Percona-Server-55-5.5.29-rel30.0.451.rhel.x86_64/usr/lib64/mysql/plugin/semisync_slave.so
...
error: File not found: /root/rpmbuild/BUILDROOT/Percona-Server-55-5.5.29-rel30.0.451.rhel.x86_64/usr/lib64/mysql/plugin/auth_pam.so
error: File not found: /root/rpmbuild/BUILDROOT/Percona-Server-55-5.5.29-rel30.0.451.rhel.x86_64/usr/lib64/mysql/plugin/auth_pam_compat.so
....

The reason is that while the spec file is successfully expanding the %{_libdir} variable to /usr/lib64, the build process is installing the plugin modules into /usr/lib/

%attr(755, root, root) %{_libdir}/mysql/plugin/auth_pam.so

---

find BUILDROOT -name auth_pam.so

BUILDROOT/Percona-Server-55-5.5.29-rel30.0.451.rhel.x86_64/usr/lib/mysql/plugin/debug/auth_pam.so
BUILDROOT/Percona-Server-55-5.5.29-rel30.0.451.rhel.x86_64/usr/lib/mysql/plugin/auth_pam.so

i think the reason is in the build-rpm.sh

# "Fix" cmake destdirs, since we cannot alter SYSTEM_PROCESSOR
    if test "x$TARGET" != "x"
    then
        sed -i 's/lib64/lib/' "$PRODUCT/cmake/install_layout.cmake"
    fi

Tags: pkg
Alexey Bychko (abychko)
Changed in percona-server:
assignee: nobody → Ignacio Nin (ignacio-nin)
tags: added: pkg
Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

From what I see in 5.6 (cmake/install_layout.cmake):

...
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
  SET(INSTALL_LIBDIR_RPM "lib")
  SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
ELSE()
  SET(INSTALL_LIBDIR_RPM "lib")
  SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
ENDIF()
...

5.6 is also affected.

Revision history for this message
Aleksey Sanin (aleksey-l) wrote :

This patch helped with Percona 5.5.31 on CentOS 5 x86_64 (thanks to Valerii for the hint)

--- cmake/install_layout.cmake.orig 2013-08-09 11:33:07.000000000 -0700
+++ cmake/install_layout.cmake 2013-08-09 11:33:27.000000000 -0700
@@ -149,8 +149,8 @@
 SET(INSTALL_SCRIPTDIR_RPM "bin")
 #
 IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
- SET(INSTALL_LIBDIR_RPM "lib")
- SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
+ SET(INSTALL_LIBDIR_RPM "lib64")
+ SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin")
 ELSE()
   SET(INSTALL_LIBDIR_RPM "lib")
   SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")

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

Other bug subscribers

Remote bug watches

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