Jeff Sheltren wrote:

> On Fri, Oct 31, 2014 at 5:42 AM, Rex Dieter
> <[email protected]> wrote:
> 
>> Rex Dieter wrote:
>>
>> > +%epel %{?rhel}%{!?:rhel:7}
>>
>> typo alert ^^ (in the second part), but hopefully you get the idea.
>>
>> Or, if you'd rather not depend on %rhel macro, and just hard-code to 7,
>> that
>> would be fine too.
>>
> 
> 
> The approach looks good to me.
> 
> The patch needs a little work though: besides the typo you mentioned, the
> install line is copying the wrong SOURCE file.
> 
> I see %rhel is present on CentOS -- I can't speak to other rebuilds
> though. It would be nice to verify that.
> 
> Bonus points for a second patch to remove all the extra trailing
> whitespace happening in this spec :)

OK (attached).

-- Rex
>From a7d7f02dd295bd977a1bc7a20b6b961183455dd2 Mon Sep 17 00:00:00 2001
From: Rex Dieter <[email protected]>
Date: Tue, 11 Nov 2014 13:57:21 -0600
Subject: [PATCH 1/2] implement %epel macro

---
 epel-release.spec | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/epel-release.spec b/epel-release.spec
index 9427b01..1540704 100644
--- a/epel-release.spec
+++ b/epel-release.spec
@@ -1,6 +1,6 @@
 Name:           epel-release       
 Version:        7
-Release:        2
+Release:        3
 Summary:        Extra Packages for Enterprise Linux repository configuration
 
 Group:          System Environment/Base 
@@ -14,6 +14,7 @@ Source0:        http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
 Source1:        GPL	
 Source2:        epel.repo	
 Source3:        epel-testing.repo	
+Source4:        macros.epel
 
 BuildArch:     noarch
 Requires:      redhat-release >=  %{version} 
@@ -41,6 +42,7 @@ install -Dpm 644 %{SOURCE0} \
 install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
 install -pm 644 %{SOURCE2} %{SOURCE3}  \
     $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
+install -pm -D ${SOURCE4} $RPM_BUILD_ROOT/usr/lib/rpm/macros.d/macros.epel
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -50,9 +52,13 @@ rm -rf $RPM_BUILD_ROOT
 %doc GPL
 %config(noreplace) /etc/yum.repos.d/*
 /etc/pki/rpm-gpg/*
+/usr/lib/rpm/macros.d/macros.epel
 
 
 %changelog
+* Tue Nov 11 2014 Rex Dieter <[email protected]> 7-3
+- implement %%epel macro
+
 * Tue Sep 02 2014 Kevin Fenzi <[email protected]> 7-2
 - Make repo files config(noreplace). Fixes bug #1135576
 
-- 
2.1.0


>From 309c6b9cf94fdecb7345a3fcc4ee657e14017a22 Mon Sep 17 00:00:00 2001
From: Rex Dieter <[email protected]>
Date: Tue, 11 Nov 2014 13:58:58 -0600
Subject: [PATCH 2/2] fix trailing whitespace

---
 epel-release.spec | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/epel-release.spec b/epel-release.spec
index 1540704..f2a273a 100644
--- a/epel-release.spec
+++ b/epel-release.spec
@@ -1,9 +1,9 @@
-Name:           epel-release       
+Name:           epel-release
 Version:        7
 Release:        3
 Summary:        Extra Packages for Enterprise Linux repository configuration
 
-Group:          System Environment/Base 
+Group:          System Environment/Base
 License:        GPLv2
 
 # This is a EPEL maintained package which is specific to
@@ -11,13 +11,13 @@ License:        GPLv2
 # within this srpm.
 URL:            http://download.fedoraproject.org/pub/epel
 Source0:        http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
-Source1:        GPL	
-Source2:        epel.repo	
-Source3:        epel-testing.repo	
+Source1:        GPL
+Source2:        epel.repo
+Source3:        epel-testing.repo
 Source4:        macros.epel
 
 BuildArch:     noarch
-Requires:      redhat-release >=  %{version} 
+Requires:      redhat-release >=  %{version}
 
 %description
 This package contains the Extra Packages for Enterprise Linux (EPEL) repository
-- 
2.1.0


_______________________________________________
epel-devel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/epel-devel

Reply via email to