>From 991d1d8404e54110d8678a42b7a281358eafc394 Mon Sep 17 00:00:00 2001 From: Shawn Wells Date: Sat, 21 Apr 2012 08:34:06 -0400 Subject: [PATCH 2/2] High Priority: Fix for "tar: Cowardly refusing to create an empty archive" from 'make tarball' After pull'ing the recent RPM build patches I received an error when doing a 'make all': > tar -czf /var/www/html/scap-security-guide/rhel6/src/scap-security-guide-0.1.tar.gz > tar: Cowardly refusing to create an empty archive > Try `tar --help' or `tar --usage' for more information. > make: *** [/var/www/html/scap-security-guide/rhel6/src/scap-security-guide-0.1.tar.gz] Error 2 This appears to be from a line in the make file, specifically $@ wasn't being expanded: > tarball: $(TARBALL) > > $(TARBALL): dist $(TAR_DEPS) > tar -czf $@ $(TAR_DEPS) I updated the tar -czf to give full paths and now the build process works. Verified by running a 'make all' and not getting any errors. Also the SRPM and RPM are properly created now. -Shawn --- rhel6/src/Makefile | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/rhel6/src/Makefile b/rhel6/src/Makefile index 462a2ae..ebb84ab 100644 --- a/rhel6/src/Makefile +++ b/rhel6/src/Makefile @@ -127,7 +127,8 @@ dist: content guide tables tarball: $(TARBALL) $(TARBALL): dist $(TAR_DEPS) - tar -czf $@ $(TAR_DEPS) +# tar -czf $@ $(TAR_DEPS) + tar -czf $(SRPM_OUTPUT_DIR)/$(DIST).tar.gz $(DIST)/* srpm: $(SRPM_OUTPUT_DIR)/$(DIST)-$(RELEASE).src.rpm -- 1.7.1