It would be nice if SystemTap package could provide %{tapset_dir} convenient macro to allow other packages to easily package .stp files. The [1] guideline could followed to accomplish this. Thank you. [1] https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_of_Additional_RPM_Macros
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Or pkgconfig might provide such information at least ...
commit e914597c18f918668cf0381f59d7c8117b17688d adds %_systemtap_tapsetdir
(In reply to Frank Ch. Eigler from comment #4) > commit e914597c18f918668cf0381f59d7c8117b17688d No workie with rhel7 and older, where %{_rpmmacrodir} evals to empty string. `make rpm` then ends up with: ======= RPM build errors: File must begin with "/": %{_rpmmacrodir}/macros.systemtap make: *** [rpm] Error 1 ======= Tested following possible fix on rhel-6+ and Fedora-28: ======= diff --git a/systemtap.spec b/systemtap.spec index 4392b1b..61c09bb 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -73,6 +73,12 @@ %define dracutbindir %{_bindir} %endif +%if 0%{?rhel} == 6 + %{!?_rpmmacrodir: %define _rpmmacrodir /etc/rpm/} +%else + %{!?_rpmmacrodir: %define _rpmmacrodir %{_rpmconfigdir}/macros.d} +%endif + # To avoid testsuite/*/*.stp has shebang which doesn't start with '/' %undefine __brp_mangle_shebangs ======= This by default - (always allows overriding _rpmmacrodir with a custom value) - on rhel6 does %define _rpmmacrodir /etc/rpm/ - on rhel7 does %define _rpmmacrodir %{_rpmconfigdir}/macros.d (evals to /usr/lib/rpm/macros.d) - on fedora does nothing With this, %{_systemtap_tapsetdir} gets defined on rhel6+ and fedora as expected.
(In reply to Martin Cermak from comment #5) > ======= > diff --git a/systemtap.spec b/systemtap.spec > index 4392b1b..61c09bb 100644 > --- a/systemtap.spec > +++ b/systemtap.spec > @@ -73,6 +73,12 @@ > %define dracutbindir %{_bindir} > %endif > > +%if 0%{?rhel} == 6 > + %{!?_rpmmacrodir: %define _rpmmacrodir /etc/rpm/} > +%else > + %{!?_rpmmacrodir: %define _rpmmacrodir %{_rpmconfigdir}/macros.d} > +%endif > + > # To avoid testsuite/*/*.stp has shebang which doesn't start with '/' > %undefine __brp_mangle_shebangs > ======= The RHEL condition is useless IMO. Just test the existence of macros and act upon it.
Problem is that on rhel-6, %{_rpmconfigdir}/macros.d evals to /usr/lib/rpm/macros.d, but rpm doesn't actually use it. Instead, on rhel6, rpm loads it's macros from /etc/rpm/. So rhel-6 is sort of a special case, I'd say.
(In reply to Martin Cermak from comment #7) Ah, I did not know that. In that case it seems reasonable ...
Fixed in commit 9297d41f049795323066314d70b82c98a750cb8c .