RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1392354 - %_pkgdocdir macro not versioned
Summary: %_pkgdocdir macro not versioned
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: redhat-rpm-config
Version: 7.4
Hardware: All
OS: Linux
high
urgent
Target Milestone: rc
: ---
Assignee: Florian Festi
QA Contact: Jan Blazek
URL:
Whiteboard:
Depends On:
Blocks: 1393866
TreeView+ depends on / blocked
 
Reported: 2016-11-07 10:00 UTC by Mattias Ellert
Modified: 2020-01-31 07:32 UTC (History)
11 users (show)

Fixed In Version: redhat-rpm-config-9.1.0-75.el7.src.rpm
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:34:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1403697 0 unspecified CLOSED qhttpengine uses hardcoded unversioned _pkgdocdir 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2017:2161 0 normal SHIPPED_LIVE redhat-rpm-config bug fix update 2017-08-01 18:17:32 UTC

Internal Links: 1403697

Description Mattias Ellert 2016-11-07 10:00:44 UTC
Description of problem:

The %_pkgdocdir recently added to redhat-rpm-config in RHEL 7 is not versioned, even though the commit message adding the macro to the source rpm says "Add macros but keep it versioned for RHEL 7".

https://git.centos.org/blob/rpms!redhat-rpm-config/cff7e8db4ebdd45848c4ac26ea1c430d670efadb/SOURCES!redhat-rpm-config-9.1.0-Add-_pkgdocdir.patch

The macro is

%_pkgdocdir             %{_docdir}/%{name}

instead of the expected

%_pkgdocdir             %{_docdir}/%{name}-%{version}

(The added macro for %_docdir_fmt is properly versioned though as expected.)

Version-Release number of selected component (if applicable):

redhat-rpm-config-9.1.0-72.el7

How reproducible:

always

Steps to Reproduce:
1. Update redhat-rpm-config to latest version

Actual results:
Non-versioned %_pkgdocdir

Expected results:
Versioned %_pkgdocdir

Additional info:
Since, for some reason, different architectures use different versions of redhat-rpm-config - at least on the Fedora EPEL koji build servers - rpms built for different architectures that use %_pkgdocdir now put the documentation in different directories. Packages that produce noarch subpackages, which are supposed to be architecture independent, now create noarch subpackages with the files located in different directories since the %_pkgdocdir definition does not agree. Koji then decides to declare the task failed since the builds on the different architectures don't agree what the content on the noarch subpackages should be. So please fix as soon as possible to make it possible to build packages for EPEL 7 in koji again!

Comment 3 Ken Dreyer (Red Hat) 2016-11-30 20:53:35 UTC
This is messy. I'm seeing several EPEL packages (babeltrace, lttng-ust, others) now fail to build from source with a RHEL 7.3 buildroot.

Comment 7 Greg Bailey 2016-12-05 00:40:14 UTC
Is there a suggested workaround with macros magic?  Or should I wait for this to be resolved and then resubmit a build to koji?

Comment 8 Greg Bailey 2016-12-05 00:53:48 UTC
Looks like it was introduced via:
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=1057327

Comment 9 Orion Poplawski 2016-12-06 17:52:51 UTC
I've submitted an update and buildroot override to fix this for EPEL7 - 
https://bodhi.fedoraproject.org/updates/epel-rpm-macros-7-11

Please test.

Comment 10 Mattias Ellert 2016-12-09 12:37:05 UTC
(In reply to Orion Poplawski from comment #9)
> I've submitted an update and buildroot override to fix this for EPEL7 - 
> https://bodhi.fedoraproject.org/updates/epel-rpm-macros-7-11
> 
> Please test.

Unfortunately it does not work:

[ellert@localhost ~]$ rpm -q redhat-rpm-config epel-rpm-macros
redhat-rpm-config-9.1.0-72.el7.centos.noarch
epel-rpm-macros-7-11.noarch
[ellert@localhost ~]$ rpm -E %_pkgdocdir
%{_docdir}/%{name}

If I rename macros-zzz-epel-override to macros.zzz-epel-override it works though:

[ellert@localhost ~]$ su -
Lösenord: 
Senaste inloggning: fre  9 dec 2016 13.14.22 CET på pts/0
[root@localhost ~]# mv /etc/rpm/macros-zzz-epel-override /etc/rpm/macros.zzz-epel-override 
[root@localhost ~]# exit
utloggning
[ellert@localhost ~]$ rpm -E %_pkgdocdir
%{_docdir}/%{name}-%{version}

Comment 11 Orion Poplawski 2016-12-09 15:56:19 UTC
Thanks for catching that.  New update submitted.

Comment 12 Greg Bailey 2016-12-13 14:52:44 UTC
Any update on this?  My koji build on EPEL7 is still failing and I'm unable to push out an update...

Comment 13 Orion Poplawski 2016-12-13 16:01:22 UTC
I've resubmitted a buildroot override for epel-rpm-macros-7-12.  Can you try now?

Comment 14 Greg Bailey 2016-12-13 18:03:23 UTC
(In reply to Orion Poplawski from comment #13)
> I've resubmitted a buildroot override for epel-rpm-macros-7-12.  Can you try
> now?

Yes, it builds successfully now.  Thanks!

Comment 15 Panu Matilainen 2017-01-12 11:41:34 UTC
Fixed in redhat-rpm-config-9.1.0-75.el7.src.rpm

Comment 18 errata-xmlrpc 2017-08-01 19:34:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2161

Comment 19 Colin Walters 2017-08-02 13:30:37 UTC
This didn't make it into the 7.4 buildroots apparently.  But you will get the new redhat-rpm-config if you e.g. set up a development container/VM using the latest from the repos.

Hence, packages will really need to build both with and without this change.  I ended up with this workaround:

From ecdda81c9b915ecbdea9438a0fa7a92d8f5bef46 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters>
Date: Mon, 31 Jul 2017 20:45:52 -0400
Subject: [PATCH] Tweak build to work both with and without BZ#1392354

I was trying to fix something else and ran into this.
---
 flatpak.spec | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/flatpak.spec b/flatpak.spec
index 6cb50cc..f83648c 100644
--- a/flatpak.spec
+++ b/flatpak.spec
@@ -2,7 +2,7 @@
 
 Name:           flatpak
 Version:        0.8.7
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Application deployment framework for desktop apps
 
 Group:          Development/Tools
@@ -142,7 +142,13 @@ sed -i s/ostree-1// %{name}.pc
 %install
 %make_install
 install root/lib/libostree-flatpak-1.so.1.0.0 %{buildroot}%{_libdir}
-install -pm 644 NEWS README.md %{buildroot}/%{_pkgdocdir}
+# Work around https://bugzilla.redhat.com/show_bug.cgi?id=1392354
+install -d %{buildroot}/%{_pkgdocdir}
+if test -d %{buildroot}/%{_docdir}/%{name}; then
+    mv %{buildroot}/%{_docdir}/%{name}/* %{buildroot}/%{_pkgdocdir}
+    rmdir %{buildroot}/%{_docdir}/%{name}/
+fi
+install -t %{buildroot}/%{_pkgdocdir} -pm 644 NEWS README.md
 # The system repo is not installed by the flatpak build system.
 install -d %{buildroot}%{_localstatedir}/lib/flatpak
 install -d %{buildroot}%{_sysconfdir}/flatpak/remotes.d
@@ -218,6 +224,9 @@ flatpak remote-list --system &> /dev/null || :
 
 
 %changelog
+* Tue Aug 01 2017 Colin Walters <walters> - 0.8.7-2
+- Tweak build to work both with and without BZ#1392354
+
 * Tue Jun 20 2017 Kalev Lember <klember> - 0.8.7-1
 - Update to 0.8.7
 - Resolves: #1391018
-- 
2.13.3

Comment 20 Florian Festi 2020-01-31 07:32:41 UTC
Clear needinfo


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