<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-cite-prefix">On 5/5/14, 7:04 AM, Jan Lieskovsky
      wrote:<br>
    </div>
    <blockquote
      cite="mid:295911339.687922.1399287864674.JavaMail.zimbra@redhat.com"
      type="cite">
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-unicode">
        <pre wrap="">Patch summary:
--------------

This change is similar / the same for RHEL like the one:
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://git.fedorahosted.org/cgit/scap-security-guide.git/commit/?id=494df01ad169bcc4b49cea15ba933909009e2125">https://git.fedorahosted.org/cgit/scap-security-guide.git/commit/?id=494df01ad169bcc4b49cea15ba933909009e2125</a>
for Fedora was, i.e.:

* allow flexible versioning scheme (make multiple rc's prior
  new stable release),

* but on the other hand make Release: tag / flag to contain
  only fixed number (as required by Red Hat Enterprise Linux
  build system), so Release: can be easily incremented in
  case RHEL- specific package rebuild without the corresponding
  upstream change would be necessary.

Testing report:
---------------

Tested all combinations of:
  * upper level: make / make srpm (with or without remote tarball fetch) 
                 / make rpm / make fedora-srpm / make fedora-rpm

    The change returns PASS in all cases (IOW no regression).

  * RHEL/{6,7}, Fedora: make / make validate

    The change returns PASS in all cases (IOW no regression).


Please review the change (it's necessary / required me to be able to build native
RHEL-6 channels RPM package).

Thank you &amp;&amp; Regards, Jan.
--
Jan iankko Lieskovsky / Red Hat Security Technologies Team
</pre>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"><legend
          class="mimeAttachmentHeaderName">0001-RHEL-6-Change-naming-scheme-0.1-16-0.1.16.patch</legend></fieldset>
      <br>
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-western">
        <pre wrap="">From 0dbf62df3e0f9d50ea3aceb0a083434055be07ab Mon Sep 17 00:00:00 2001
From: Jan Lieskovsky <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:jlieskov@redhat.com">&lt;jlieskov@redhat.com&gt;</a>
Date: Mon, 5 May 2014 12:51:13 +0200
Subject: [PATCH] [RHEL/6] Change naming scheme (0.1-16 =&gt; 0.1.16)

Similar like in 494df01ad169bcc4b49cea15ba933909009e2125 change
for Fedora, this change for RHEL is required to be able:
* on one hand to use flexible versioning scheme (have couple of rc
  candidates prior final stable release),
* but on the other have Release: tag to contain just fixed number,
  so it can be easily incremented (in case RHEL- specific update
  would be required without the corresponding upstream change)

Signed-off-by: Jan Lieskovsky <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:jlieskov@redhat.com">&lt;jlieskov@redhat.com&gt;</a>
---
 Fedora/scap-security-guide.spec |  8 ++++----
 Makefile                        | 28 +++++++++++++++-------------
 scap-security-guide.spec        | 13 ++++++++-----
 3 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/Fedora/scap-security-guide.spec b/Fedora/scap-security-guide.spec
index ef6bf71..c5a8911 100644
--- a/Fedora/scap-security-guide.spec
+++ b/Fedora/scap-security-guide.spec
@@ -10,7 +10,7 @@
 
 # Used to specify RHEL scap-security-guide tarball source
 # (needs to match latest EPEL-6 scap-security-guide RPM release)
-%global        rhelssgsource                0.1-16
+%global        rhelssgversion                0.1.16
 
 Name:                scap-security-guide
 Version:        0.1.%{fedorassgversion}
@@ -20,7 +20,7 @@ Group:                Applications/System
 License:        Public Domain
 URL:                <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://fedorahosted.org/scap-security-guide/">https://fedorahosted.org/scap-security-guide/</a>
 Source0:        <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://fedorapeople.org/%7Ejlieskov/%">http://fedorapeople.org/~jlieskov/%</a>{name}-%{version}.tar.gz
-Source1:        <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://repos.ssgproject.org/sources/%">http://repos.ssgproject.org/sources/%</a>{name}-%{rhelssgsource}.tar.gz
+Source1:        <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://repos.ssgproject.org/sources/%">http://repos.ssgproject.org/sources/%</a>{name}-%{rhelssgversion}.tar.gz
 BuildArch:        noarch
 BuildRequires:        libxslt, expat, python, openscap-utils &gt;= 0.9.1, python-lxml
 Requires:        xml-common, openscap-utils &gt;= 0.9.1
@@ -46,7 +46,7 @@ further information.
 # Build Fedora distribution content
 (cd Fedora &amp;&amp; make dist)
 # Change CWD to point to RHEL content. Build RHEL content
-pushd %{name}-%{rhelssgsource}
+pushd %{name}-%{rhelssgversion}
 (cd RHEL/6 &amp;&amp; make dist)
 (cd RHEL/7 &amp;&amp; make dist)
 # Restore CWD to old value
@@ -65,7 +65,7 @@ cp -a Fedora/input/auxiliary/scap-security-guide.8 %{buildroot}%{_mandir}/en/man
 
 # Change CWD to point to RHEL content. Copy
 # datastreams to appropriate buildroot places
-pushd %{name}-%{rhelssgsource}
+pushd %{name}-%{rhelssgversion}
 # Add in datastream form of RHEL-6 benchmark
 cp -a RHEL/6/dist/content/ssg-rhel6-ds.xml %{buildroot}%{_datadir}/xml/scap/ssg/rhel6
 # Add in datastream form of RHEL-7 benchmark
diff --git a/Makefile b/Makefile
index cfd9548..44ceae3 100644
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,12 @@
 ROOT_DIR ?= $(CURDIR)
 RPM_SPEC := $(ROOT_DIR)/scap-security-guide.spec
 PKGNAME := $(shell sed -ne 's/Name:\t\t\(.*\)/\1/p' $(RPM_SPEC))
+REDHAT_SSG_VERSION := $(shell sed -ne 's/^\(.*\)redhatssgversion\t\(.*\)/\2/p' $(RPM_SPEC))
+REDHAT_RPM_VERSION := $(shell sed -ne 's/Version:\t\(.*\)/\1/p' $(RPM_SPEC))
+$(eval REDHAT_RPM_VERSION := $(shell echo $(REDHAT_RPM_VERSION) | sed -ne 's/%{redhatssgversion}/$(REDHAT_SSG_VERSION)/p'))
 VERSION := $(shell sed -ne 's/Version:\t\(.*\)/\1/p' $(RPM_SPEC))
-REDHAT_SSG_RELEASE := $(shell sed -ne 's/^\(.*\)redhatssgrelease\t\(.*\)/\2/p' $(RPM_SPEC))
 REDHAT_DIST := $(shell rpm --eval '%{dist}')
-RELEASE := $(REDHAT_SSG_RELEASE)$(REDHAT_DIST)
-PKG := $(PKGNAME)-$(VERSION)-$(REDHAT_SSG_RELEASE)
+PKG := $(PKGNAME)-$(REDHAT_RPM_VERSION)
 
 ARCH := noarch
 TARBALL = $(RPM_TOPDIR)<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>SOURCES<span class="moz-txt-tag">/</span></i>$(PKG).tar.gz
@@ -76,7 +77,7 @@ tarball:
         (cd $(RPM_TMPDIR)/$(PKG)/RHEL/6/ &amp;&amp; $(MAKE) clean)
         (cd $(RPM_TMPDIR)/$(PKG)/RHEL/7/ &amp;&amp; $(MAKE) clean)
 
-        # Create the source tar, copy it to $TARBALL
+        # Create the source tar, copy it to TARBALL
         # (e.g. somewhere in the SOURCES directory)
         cd $(RPM_TMPDIR) &amp;&amp; tar -czf $(PKG).tar.gz $(PKG)
         cp $(RPM_TMPDIR)/$(PKG).tar.gz $(TARBALL)
@@ -116,17 +117,16 @@ zipfile:
         # at working directory. Should look into this sometime
         #
         #cd $(RPM_TOPDIR)/ZIP
-        #zip -r $(PKG)-$(RELEASE).zip . * -j
-        zip -r $(PKG)-$(RELEASE).zip $(RPM_TOPDIR)<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>ZIP<span class="moz-txt-tag">/</span></i>* -j
-        mv $(PKG)-$(RELEASE).zip $(RPM_TOPDIR)<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>ZIP<span class="moz-txt-tag">/</span></i>
+        #zip -r $(PKG).zip . * -j
+        zip -r $(PKG).zip $(RPM_TOPDIR)<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>ZIP<span class="moz-txt-tag">/</span></i>* -j
+        mv $(PKG).zip $(RPM_TOPDIR)<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>ZIP<span class="moz-txt-tag">/</span></i>
 
 srpm: $(RPM_DEPS)
         # 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"))
+        # Substitute %{name} and %{version} with their actual values
+        $(eval SOURCE := $(shell echo $(SOURCE) | sed -ne 's/%{name}/$(PKGNAME)/p'))
+        $(eval SOURCE := $(shell echo $(SOURCE) | sed -ne 's/%{version}/$(REDHAT_RPM_VERSION)/p'))
         # Download the tarball
         @echo "Downloading the $(SOURCE) tarball..."
         # If performing a real RPM build, uncomment the next line
@@ -158,8 +158,10 @@ fedora-srpm: $(FEDORA_RPM_DEPS)
         cd $(RPM_TOPDIR) &amp;&amp; rpmbuild $(RPMBUILD_ARGS) --target=$(ARCH) -bs SPECS/$(notdir $(FEDORA_SPEC)) --nodeps
 
 rpm: srpm
-         @echo "Building $(PKG) RPM..."
-         cd $(RPM_TOPDIR)/SRPMS &amp;&amp; rpmbuild --rebuild --target=$(ARCH) $(RPMBUILD_ARGS) --buildroot $(RPM_BUILDROOT) -bb $(PKG)$(REDHAT_DIST).src.rpm
+        $(eval REDHAT_RPM_RELEASE := $(shell sed -ne 's/Release:\t\(.*\)/\1/p' $(RPM_SPEC)))
+        $(eval REDHAT_RPM_RELEASE := $(shell echo $(REDHAT_RPM_RELEASE) | sed -ne 's/%{?dist}/$(REDHAT_DIST)/p'))
+        @echo "Building $(PKG) RPM..."
+        cd $(RPM_TOPDIR)/SRPMS &amp;&amp; rpmbuild --rebuild --target=$(ARCH) $(RPMBUILD_ARGS) --buildroot $(RPM_BUILDROOT) -bb $(PKG)-$(REDHAT_RPM_RELEASE).src.rpm
 
 fedora-rpm: fedora-srpm
         $(eval FEDORA_RPM_RELEASE := $(shell sed -ne 's/Release:\t\(.*\)/\1/p' $(FEDORA_SPEC)))
diff --git a/scap-security-guide.spec b/scap-security-guide.spec
index 786a8eb..73f0062 100644
--- a/scap-security-guide.spec
+++ b/scap-security-guide.spec
@@ -1,8 +1,8 @@
-%global                redhatssgrelease        16
+%global                redhatssgversion        16
 
 Name:                scap-security-guide
-Version:        0.1
-Release:        %{redhatssgrelease}%{?dist}
+Version:        0.1.%{redhatssgversion}
+Release:        1%{?dist}
 Summary:        Security guidance and baselines in SCAP formats
 Vendor:                scap-security-guide
 
@@ -10,7 +10,7 @@ Group:                System Environment/Base
 License:        Public Domain
 URL:                <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://fedorahosted.org/scap-security-guide/">https://fedorahosted.org/scap-security-guide/</a>
 
-Source0:        <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://repos.ssgproject.org/sources/%">http://repos.ssgproject.org/sources/%</a>{name}-%{version}-%{redhatssgrelease}.tar.gz
+Source0:        <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://repos.ssgproject.org/sources/%">http://repos.ssgproject.org/sources/%</a>{name}-%{version}.tar.gz
 
 BuildArch:        noarch
 
@@ -29,7 +29,7 @@ from the openscap-utils package to verify that the system conforms to provided
 guideline. Refer to scap-security-guide(8) manual page for further information.
 
 %prep
-%setup -q -n %{name}-%{version}-%{redhatssgrelease}
+%setup -q -n %{name}-%{version}
 
 %build
 (cd RHEL/6 &amp;&amp; make dist)
@@ -53,6 +53,9 @@ cp -a RHEL/6/input/auxiliary/scap-security-guide.8 %{buildroot}%{_mandir}/en/man
 %doc RHEL/6/LICENSE RHEL/6/output/rhel6-guide.html RHEL/6/output/table-rhel6-cces.html RHEL/6/output/table-rhel6-nistrefs-common.html RHEL/6/output/table-rhel6-nistrefs.html RHEL/6/output/table-rhel6-srgmap-flat.html RHEL/6/output/table-rhel6-srgmap-flat.xhtml RHEL/6/output/table-rhel6-srgmap.html RHEL/6/output/table-rhel6-stig.html JBossEAP5/docs/JBossEAP5_Guide.html
 
 %changelog
+* Mon May 05 2014 Jan iankko Lieskovsky &lt;<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:jlieskov@redhat.com">jlieskov@redhat.com</a>) 0.1.16-1
+- Change naming scheme (0.1-16 =&gt; 0.1.16-1)
+
 * Fri Feb 21 2014 Jan iankko Lieskovsky <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:jlieskov@redhat.com">&lt;jlieskov@redhat.com&gt;</a> 0.1-16
 - Include datastream files into RHEL6 and RHEL7 RPM packages too
 - Bump version
<div class="moz-txt-sig">-- 
1.8.3.1</div></pre>
      </div>
    </blockquote>
    <br>
    <br>
    <br>
    Ack, and thanks for the clean up<br>
  </body>
</html>