My yesterday's Fedora change:
  
https://lists.fedorahosted.org/pipermail/scap-security-guide/2014-February/005047.html

broke the work of Fedora's "make fedora-srpm / make fedora-rpm" Make targets
(functionality to allow the users to build srpm / rpm locally on the system
outside of the Koji build system).

This patch fixes it (the targets to work again).

No other change has been made to the content, just this Fedora build process 
one.

Change has been tested && pushed to master.

Thank you && Regards, Jan.
--
Jan iankko Lieskovsky / Red Hat Security Technologies Team
From 1bb9376224e3c17b0656081aad4377995fbd80ac Mon Sep 17 00:00:00 2001
From: Jan Lieskovsky <[email protected]>
Date: Thu, 27 Feb 2014 15:25:43 +0100
Subject: [PATCH] [Fedora] Fix fedora-srpm and fedora-rpm Make targets to work
 again

Signed-off-by: Jan Lieskovsky <[email protected]>
---
 Fedora/scap-security-guide.spec |  5 +++--
 Makefile                        | 10 ++++++++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/Fedora/scap-security-guide.spec b/Fedora/scap-security-guide.spec
index 4bb4a37..ef6bf71 100644
--- a/Fedora/scap-security-guide.spec
+++ b/Fedora/scap-security-guide.spec
@@ -40,7 +40,7 @@ conforms to provided guideline. Refer to scap-security-guide(8) manual page for
 further information.
 
 %prep
-%setup -q -T -D -n %{name}-%{version} -a1
+%setup -q -D -n %{name}-%{version} -a1
 
 %build
 # Build Fedora distribution content
@@ -80,7 +80,8 @@ popd
 
 
 %changelog
-* Wed Feb 26 2014 Jan iankko Lieskovsky <[email protected]> 0.1.5-1
+* Thu Feb 27 2014 Jan iankko Lieskovsky <[email protected]> 0.1.5-1
+- Fix fedora-srpm and fedora-rpm Make targets to work again
 - Include RHEL-6 and RHEL-7 datastream files to support remote RHEL system scans
 - EOL for Fedora 18 support
 - Include Fedora datastream file for remote Fedora system scans
diff --git a/Makefile b/Makefile
index 00c53e9..cfd9548 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,9 @@ RPMBUILD_ARGS := --define '_topdir $(RPM_TOPDIR)'  --define '_tmppath $(RPM_TMPD
 
 # Define Fedora specific variables below
 FEDORA_SPEC := $(ROOT_DIR)/Fedora/scap-security-guide.spec
-FEDORA_RPM_DEPS := $(FEDORA_SPEC) Makefile
+# srpm target in FEDORA_RPM_DEPS below is needed to get value of SOURCE
+# variable evaluated for its subsequent use in fedora-srpm target
+FEDORA_RPM_DEPS := $(FEDORA_SPEC) Makefile srpm
 FEDORA_NAME := $(PKGNAME)
 FEDORA_SSG_VERSION := $(shell sed -ne 's/^\(.*\)\tfedorassgversion\t\(.*\)/\2/p' $(FEDORA_SPEC))
 FEDORA_RPM_VERSION := $(shell sed -ne 's/Version:\t\(.*\)/\1/p' $(FEDORA_SPEC))
@@ -143,9 +145,13 @@ fedora-srpm: $(FEDORA_RPM_DEPS)
 	# Substitute %{name} and %{version} with their actual values
 	$(eval FEDORA_SOURCE := $(shell echo $(FEDORA_SOURCE) | sed -ne "s/%{name}/$(FEDORA_NAME)/p"))
 	$(eval FEDORA_SOURCE := $(shell echo $(FEDORA_SOURCE) | sed -ne "s/%{version}/$(FEDORA_RPM_VERSION)/p"))
-	# Download the tarball
+	# Download the tarballs
+	# Fedora one
 	@echo "Downloading the $(FEDORA_SOURCE) tarball..."
 	@wget -O $(FEDORA_TARBALL) $(FEDORA_SOURCE)
+	# RHEL one
+	@echo "Downloading the $(SOURCE) tarball..."
+	@wget -O $(TARBALL) $(SOURCE)
 	@echo "Copying the SPEC file to proper location..."
 	cat $(FEDORA_SPEC) > $(RPM_TOPDIR)/SPECS/$(notdir $(FEDORA_SPEC))
 	@echo "Building Fedora source $(PKGNAME) RPM package..."
-- 
1.8.3.1

_______________________________________________
scap-security-guide mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide

Reply via email to