Bug 22695 - "make rpm" broken by commit 3128ca27f67476fdd5f26a44bc3809fa8396e749
Summary: "make rpm" broken by commit 3128ca27f67476fdd5f26a44bc3809fa8396e749
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: releng (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-10 21:11 UTC by William Cohen
Modified: 2018-03-31 12:43 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Cohen 2018-01-10 21:11:18 UTC
When attempting to build rpms from the git repo with "make rpm" I found that the build would fail:

RPM build errors:
    File not found: /home/wcohen/rpmbuild/BUILDROOT/systemtap-3.3-1.fc27.x86_64/usr/libexec/systemtap/python/stap-resolve-module-function.py
    File not found: /home/wcohen/rpmbuild/BUILDROOT/systemtap-3.3-1.fc27.x86_64/usr/libexec/systemtap/python/stap-resolve-module-function.py?
make: *** [Makefile:2482: rpm] Error 1

The install places the stap-resolve-module-function.py in the wrong place as seen in the output of the build:

 /usr/bin/mkdir -p '/home/wcohen/rpmbuild/BUILDROOT/systemtap-3.3-1.fc27.x86_64/home/wcohen/rpmbuild/BUILDROOT/systemtap-3.3-1.fc27.x86_64/usr/libexec/systemtap/python'
 /usr/bin/install -c -m 644 stap-resolve-module-function.py '/home/wcohen/rpmbuild/BUILDROOT/systemtap-3.3-1.fc27.x86_64/home/wcohen/rpmbuild/BUILDROOT/systemtap-3.3-1.fc27.x86_64/usr/libexec/systemtap/python'


The problem is caused by the following commit:

commit 3128ca27f67476fdd5f26a44bc3809fa8396e749
Author: David Smith <dsmith@redhat.com>
Date:   Thu Nov 16 13:23:17 2017 -0600

    Add a small fix to python/Makefile.am.
    
    * python/Makefile.am: Add DESTDIR to pkglibexecpythondir.
    * python/Makefile.in: Regenerated.

diff --git a/python/Makefile.am b/python/Makefile.am
index a254480f9..79fbfd7a3 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -14,7 +14,7 @@ pkglibexecpython_PYTHON =
 
 pkglibexecpython_DATA =
 
-pkglibexecpythondir = $(pkglibexecdir)/python
+pkglibexecpythondir = $(DESTDIR)$(pkglibexecdir)/python
 
 if HAVE_PYTHON_PROBES
 
diff --git a/python/Makefile.in b/python/Makefile.in
index 51ae9230c..bf3b1a3da 100644
--- a/python/Makefile.in
+++ b/python/Makefile.in
@@ -382,7 +382,7 @@ AM_CPPFLAGS = -I$(srcdir)/../includes \
 # install time.
 pkglibexecpython_PYTHON = 
 pkglibexecpython_DATA = $(am__append_1)
-pkglibexecpythondir = $(pkglibexecdir)/python
+pkglibexecpythondir = $(DESTDIR)$(pkglibexecdir)/python
 all: all-am
 
 .SUFFIXES:
Comment 1 David Smith 2018-01-11 20:46:39 UTC
Fixed by reverting that last commit in new commit da3464e4f.