Bug 1400981 - wrong macro leads to failing build on RHEL-7
Summary: wrong macro leads to failing build on RHEL-7
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mariadb
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1400486
TreeView+ depends on / blocked
 
Reported: 2016-12-02 13:28 UTC by Honza Horak
Modified: 2016-12-20 17:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 16:55:25 UTC
Type: Bug


Attachments (Terms of Use)

Description Honza Horak 2016-12-02 13:28:02 UTC
Description of problem:

When trying to build the package on RHEL, some files are not deleted as expected, because macros are defined differently on RHEL. It leads to build failures, because there are unpacked files in /opt/rh/rh-mariadb101/root/usr/share/doc/mariadb/MariaDB-server-10.1.19/ directory. Fix should be easy (not tested yet though):

diff --git a/mariadb.spec b/mariadb.spec
index be0493b..6bc94f5 100644
--- a/mariadb.spec
+++ b/mariadb.spec
@@ -657,7 +657,7 @@ install -p -m 0755 scripts/mysql_config_multilib %{buildroot}%{_bindir}/mysql_co
 # but that's pretty wacko --- see also %%{name}-file-contents.patch)
 install -p -m 644 Docs/INFO_SRC %{buildroot}%{_libdir}/mysql/
 install -p -m 644 Docs/INFO_BIN %{buildroot}%{_libdir}/mysql/
-rm -rf %{buildroot}%{_pkgdocdir}/MariaDB-server-%{version}/
+rm -rf %{buildroot}%{_pkgdocdirname}/MariaDB-server-%{version}/
 
 mkdir -p %{buildroot}%{logfiledir}
 chmod 0750 %{buildroot}%{logfiledir}

Comment 1 Michal Schorm 2016-12-20 02:21:11 UTC
I wasn't able to reproduce this issue.
And I won't fix it - even thought it would be elementary fix - if it seems unnessecary.

---

I took latest content from Fedora Rawhide branch (version 3:10.1.20-1).
I disabled the testsuite, since it should not have any impact on this bug.
I made srpm using "fedpkg srpm", then rebuilt with "rpmbuild --rebuild" on a clean RHEL 7.3 machine.

Rebuild succeeded.

---

To investigate this issue further, I need more info to reproduce it:
 * source (that should be Fedora git branch, packed with "fedpkg srpm")
 * destination (that should be clean RHEL 7.3 machine)
or any other hints that can point me at the right direction.

Comment 2 Pavel Raiskup 2016-12-20 09:05:06 UTC
> And I won't fix it - even thought it would be elementary fix - if it seems
> unnessecary.

I believe this deserves fix, just be patient to find the reproducer.

> -rm -rf %{buildroot}%{_pkgdocdir}/MariaDB-server-%{version}/
> +rm -rf %{buildroot}%{_pkgdocdirname}/MariaDB-server-%{version}/

This looks like typo;  %_pkgdocdir is full /usr/share/../ path while
%_pkgdocdirname is (or could be) '%(basename %_pkgdocdir)'.

Comment 3 Honza Horak 2016-12-20 16:55:25 UTC
I've tested the following patch on the problematic system and it fixed the problem:

http://pkgs.fedoraproject.org/cgit/rpms/mariadb.git/commit/?id=220a57c9a37a0ccf9a321b4335a54dbcc8d2d5f3

So I've just pushed it and I consider this fixed.

Comment 4 Michal Schorm 2016-12-20 17:32:37 UTC
I pushed your change also to F25 and F24 branches, in order to keep those 3 branches consistent.


Note You need to log in before you can comment on or make changes to this bug.