[PATCH] build: fix "make rpm" to work more reliably
Jim Meyering
jim at meyering.net
Wed Jun 8 16:26:37 UTC 2011
Jim Meyering wrote:
> At first I couldn't build "make rpm" today.
> It was failing like this:
>
> extracting debug info from /h/j/rpmbuild/BUILDROOT/iwhd-0.95.12.8c49.dirty-1.fc15
> .x86_64/usr/bin/dc-vmware-image
> *** ERROR: No build ID note found in /h/j/rpmbuild/BUILDROOT/iwhd-0.95.12.8c49.dirty-1.fc15.x86_64/usr/bin/dc-vmware-image
> error: Bad exit status from /var/tmp/rpm-tmp.qtHFFg (%install)
>
> Seeing that I looked at the spec file and noticed a minor problem.
> That new program name wasn't listed in the %files section.
> Patch below.
>
> Finally, I worked around the "No build ID note..." problem by doing this:
>
> make clean && make LDFLAGS='-Wl,--build-id' && make rpm
>
> I'll put that in the rpm rule, eventually.
Might as well do it:
>From 08bc1d43c430e831b1f9ea97f11caa6ce89f52d4 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Wed, 8 Jun 2011 18:18:39 +0200
Subject: [PATCH] build: fix "make rpm" to work more reliably
* Makefile.am (rpm): Set LDFLAGS to add --build-id.
Otherwise, "make rpm" fails with a "No build ID note found in ..."
diagnostic for each of the dc-*-image programs.
---
Makefile.am | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 1b6b5f8..e1ae819 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -79,8 +79,10 @@ iwhd.spec: iwhd.spec.in Makefile
# like "0.0.273-1621" that contain a "-". Repack the tarball
# to one with "." substituted for any - in the version string.
.PHONY: rpm
-rpm: dist iwhd.spec
- chmod 644 $(distdir).tar.gz
+rpm:
+ $(MAKE) clean
+ umask 022; $(MAKE) LDFLAGS='-Wl,--build-id' dist
+ umask 022; export LDFLAGS='-Wl,--build-id'; \
case $(VERSION) in \
*-*) \
v=$$(echo $(VERSION)|tr - .); \
--
1.7.6.rc0.293.g40857
More information about the iwhd-devel
mailing list