On 10/26/13, 10:25 AM, Jan Lieskovsky wrote:
This patch changes Source0 location in RHEL-6's / main SPEC file to use the remote one instead of a local one.
Also changes the main Makefile, so when building SRPM the remote tarball would be retrieved first (and [S]RPM content built from it).
Basic regression && sanity testing:
- all of make tarball, srpm, rpm and
- basic RHEL-6 make rules have passed.
Please review.
Thank you && Regards, Jan.
Jan iankko Lieskovsky / Red Hat Security Technologies Team
P.S.: scap-security-guide-0.1-15.rc5.tar.gz has been uploaded to upstream location: http://repos.ssgproject.org/sources/
P.S.#2: Remember when making changes in the future, the new workflow to be as follows: * make tarball * upload the new tarball tohttp://repos.ssgproject.org/sources/ * then make srpm / rpm etc.
0001-RHEL6-0.1-15.rc5.patch
From e3c6dfd3a5d0aeb2854f1441e9f98bdd6f1fbf5d Mon Sep 17 00:00:00 2001 From: Jan Lieskovskyjlieskov@redhat.com Date: Sat, 26 Oct 2013 16:15:39 +0200 Subject: [PATCH] [RHEL6] 0.1-15.rc5: - Point the spec's source to proper remote tarball location - Modify the main Makefile to use remote tarball when building RHEL6's SRPM
Signed-off-by: Jan Lieskovskyjlieskov@redhat.com
Makefile | 16 +++++++++++++--- scap-security-guide.spec | 8 ++++++-- 2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile index 8a067bc..1a1c388 100644 --- a/Makefile +++ b/Makefile @@ -109,8 +109,18 @@ zipfile: mv $(PKG)-$(RELEASE).zip $(RPM_TOPDIR)/ZIP/
srpm: $(RPM_DEPS)
- @echo "Building $(PKGNAME) SRPM..."
# Obtain the source from RedHat's spec file
$(eval SOURCE := $(shell sed -ne 's/Source0:\t(.*)/\1/p' $(RPM_SPEC)))
# Substitute %{name}, %{version}, and %{redhatssgrelease} with their actual values
$(eval SOURCE := $(shell echo $(SOURCE) | sed -ne "s/%{name}/$(PKGNAME)/p"))
$(eval SOURCE := $(shell echo $(SOURCE) | sed -ne "s/%{version}/$(VERSION)/p"))
$(eval SOURCE := $(shell echo $(SOURCE) | sed -ne "s/%{redhatssgrelease}/$(REDHAT_SSG_RELEASE)/p"))
# Download the tarball
@echo "Downloading the $(SOURCE) tarball..."
@wget -O $(TARBALL) $(SOURCE)
@echo "Copying the SPEC file to proper location..." cat $(RPM_SPEC) > $(RPM_TOPDIR)/SPECS/$(notdir $(RPM_SPEC))
@echo "Building $(PKGNAME) SRPM..." cd $(RPM_TOPDIR) && rpmbuild $(RPMBUILD_ARGS) --target=$(ARCH) -bs SPECS/$(notdir $(RPM_SPEC)) --nodeps
fedora-srpm: $(FEDORA_RPM_DEPS)
@@ -123,9 +133,9 @@ fedora-srpm: $(FEDORA_RPM_DEPS) $(eval FEDORA_SOURCE := $(shell echo $(FEDORA_SOURCE) | sed -ne "s/%{version}/$(FEDORA_VERSION)/p")) $(eval FEDORA_SOURCE := $(shell echo $(FEDORA_SOURCE) | sed -ne "s/%{fedorassgrelease}/$(FEDORA_SSG_RELEASE)/p")) # Download the tarball
- @echo "Downloading the $(FEDORA_TARBALL) tarball..."
- @echo "Downloading the $(FEDORA_SOURCE) tarball..." @wget -O $(FEDORA_TARBALL) $(FEDORA_SOURCE)
- @echo "Copying $(FEDORA_SPEC) file to proper location..."
- @echo "Copying the SPEC file to proper location..." cat $(FEDORA_SPEC) > $(RPM_TOPDIR)/SPECS/$(notdir $(FEDORA_SPEC)) @echo "Building Fedora source $(PKGNAME) RPM package..." cd $(RPM_TOPDIR) && rpmbuild $(RPMBUILD_ARGS) --target=$(ARCH) -bs SPECS/$(notdir $(FEDORA_SPEC)) --nodeps
diff --git a/scap-security-guide.spec b/scap-security-guide.spec index f9828fc..678031d 100644 --- a/scap-security-guide.spec +++ b/scap-security-guide.spec @@ -1,5 +1,5 @@
-%global redhatssgrelease 15.rc4 +%global redhatssgrelease 15.rc5
Name: scap-security-guide Version: 0.1 @@ -11,7 +11,7 @@ Group: System Environment/Base License: Public Domain URL: https://fedorahosted.org/scap-security-guide/
-Source0: %{name}-%{version}-%{redhatssgrelease}.tar.gz +Source0: http://repos.ssgproject.org/sources/%%7Bname%7D-%%7Bversion%7D-%%7Bredhatssg...
BuildArch: noarch
@@ -52,6 +52,10 @@ cp -a RHEL6/input/auxiliary/scap-security-guide.8 %{buildroot}%{_mandir}/en/man8 %doc RHEL6/LICENSE RHEL6/output/rhel6-guide.html RHEL6/output/table-rhel6-cces.html RHEL6/output/table-rhel6-nistrefs-common.html RHEL6/output/table-rhel6-nistrefs.html RHEL6/output/table-rhel6-srgmap-flat.html RHEL6/output/table-rhel6-srgmap-flat.xhtml RHEL6/output/table-rhel6-srgmap.html RHEL6/output/table-rhel6-stig.html JBossEAP5/docs/JBossEAP5_Guide.html
%changelog +* Sat Oct 26 2013 Jan iankko Lieskovskyjlieskov@redhat.com 0.1-15.rc5 +- Point the spec's source to proper remote tarball location +- Modify the main Makefile to use remote tarball when building RHEL6's SRPM
- Sat Oct 26 2013 Jan iankko Lieskovskyjlieskov@redhat.com 0.1-15.rc4
- Don't include the table html files two times
- Remove makewhatis
-- 1.8.3.1
pushed https://git.fedorahosted.org/cgit/scap-security-guide.git/commit/?id=9f38a16...