Source rpm check-rpaths

Hi, this question is about RPM packaging for RHEL 8

I am aware of your beautiful repository, but I want to package PS for MySQL with a couple of changes for my personal use.

I downloaded the PS for MySQL 8.0.27 source RPM, as a test I tried to package it as-is with no changes to the spec file, using --define "debug_package %{nil}" -bb ~/rpmbuild/SPECS/percona-server.spec and I get a couple of errors:

  1. I get a linker error with TokuDB - no problem, I don’t need TokuDB so I disabled it in the spec by editing the line %{!?with_tokudb: %global tokudb 1} to %{!?with_tokudb: %global tokudb 0}

  2. Now I get this error

ERROR   0002: file '/usr/lib64/mysql/plugin/debug/' contains an invalid rpath '/home/jeffrey/rpmbuild/BUILD/percona-server-8.0.27-18/debug/library_output_directory' in [$ORIGIN/../../private:/home/jeffrey/rpmbuild/BUILD/percona-server-8.0.27-18/debug/library_output_directory:]
ERROR   0010: file '/usr/lib64/mysql/plugin/debug/' contains an empty rpath in [$ORIGIN/../../private:/home/jeffrey/rpmbuild/BUILD/percona-server-8.0.27-18/debug/library_output_directory:]
error: Bad exit status from /var/tmp/rpm-tmp.ez7uIg (%install)

Why do I get all these errors?

What should I do to get past them without destroying the runtime?

1 Like

I tried to reproduce your issue but without success.
If you want to rebuild packages you can use information from our blogpost

1 Like