Bug 1074272 - drupal7 installs macros files to /etc/rpm
Summary: drupal7 installs macros files to /etc/rpm
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: drupal7
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL: https://lists.fedoraproject.org/piper...
Whiteboard:
Depends On:
Blocks: 1074261
TreeView+ depends on / blocked
 
Reported: 2014-03-09 10:52 UTC by Ville Skyttä
Modified: 2014-03-10 14:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-10 13:16:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ville Skyttä 2014-03-09 10:52:24 UTC
The proper location for rpm macros files in rpm >= 4.11 is
%{_rpmconfigdir}/macros.d, please move them there from /etc/rpm.

If this package's specfile targets Fedora and EL >= 7 only, the
location for macro files can be simply changed from /etc/rpm to
%{_rpmconfigdir}/macros.d. If it is intended to work on EL 5 and/or 6
as well, you can define a macros dir for example as follows (all on
one line) and install the macros to %{macrosdir}:

%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)

Comment 1 Gwyn Ciesla 2014-03-10 13:16:35 UTC
Completed in rawhide, able to be used in other branches.

Comment 2 Ville Skyttä 2014-03-10 13:33:28 UTC
http://pkgs.fedoraproject.org/cgit/drupal7.git/commit/?id=bd7dbcd0b0707769b15218a1abbe58ba98c660c4

This commit defines %{macrosdir} but doesn't use it but installs files to %{_rpmconfigdir}/macros.d so this won't work with EL 5 and 6.

There's also some cosmetic macro/nonmacro mismatching where the macros files get installed as macros.%{name} but are referred to as macros.drupal7 in %files. But that's not introduced by the above change.

Comment 3 Gwyn Ciesla 2014-03-10 13:46:09 UTC
So in install and files it should simply be %{macrosdir} and not %{_rpmconfigdir}/macros.d?

Comment 4 Ville Skyttä 2014-03-10 13:58:50 UTC
Defining %{macrosdir} without using it doesn't do anything; either also use it or remove the definition. See the initial comment in this bug for more info.

Comment 5 Gwyn Ciesla 2014-03-10 14:26:32 UTC
Gotcha.  Corrected that and the cosmetic issue.


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