Re: package for Fedora and EPEL from one spec source?

2011-02-01 Thread Steve Traylen
On Tue, Feb 1, 2011 at 3:23 PM, Gerd v. Egidy li...@egidy.de wrote:

 Hi,

 I've submitted my first Fedora package for review and sponsoring recently:

 https://bugzilla.redhat.com/show_bug.cgi?id=673175

 I want to submit it for Fedora and EPEL 5. The differences between the two
 are
 minimal, there are just some programs missing in EPEL which need to be
 commented out in the default config.


This page
http://fedoraproject.org/wiki/DistTag
and the buildsys macros RPM on EPEL5 should help you.
http://buildsys.fedoraproject.org/buildgroups/rhel5/x86_64/

yes is perfectly possible to have one .spec file for all at the start though
they may diverge due to difference update policies in particular.
Steve.



 What is the best way to handle this? Can I keep one spec for both and use
 conditionals to always build the right way?

 I've seen code like %if 0%{?rhel} somewhere on the net, but that didn't
 work
 for me. I guess the %rhel-macro should be defined in /etc/rpm/macros.dist
 where I usually find stuff like %fedora but that doesn't exist on my Centos
 5.

 Or am I supposed to create a completely separate .spec for EPEL once the
 review, sponsoring etc. for Fedora is done?

 Kind regards,

 Gerd

 --
 Address (better: trap) for people I really don't want to get mail from:
 jo...@cactusamerica.com
 --
 devel mailing list
 devel@lists.fedoraproject.org
 https://admin.fedoraproject.org/mailman/listinfo/devel




-- 
Steve Traylen
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Re: package for Fedora and EPEL from one spec source?

2011-02-01 Thread Jason L Tibbitts III
 GvE == Gerd v Egidy li...@egidy.de writes:

GvE What is the best way to handle this? Can I keep one spec for both
GvE and use conditionals to always build the right way?

You can.  Do keep in mind, however, that the amount of conditional
garbage you have to pile into the spec file can get to be a bit much,
and it is often much simpler to just have a different spec on el5.
These days modern Fedora packaging has diverged quite significantly from
what can be supported on el5.

 - J
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: package for Fedora and EPEL from one spec source?

2011-02-01 Thread Gerd v. Egidy
Hi Steve,

  I want to submit it for Fedora and EPEL 5. The differences between the
  two are
  minimal, there are just some programs missing in EPEL which need to be
  commented out in the default config.
 
 This page
 http://fedoraproject.org/wiki/DistTag
 and the buildsys macros RPM on EPEL5 should help you.
 http://buildsys.fedoraproject.org/buildgroups/rhel5/x86_64/

Thanks for the pointers. Installing the buildsys-macros did it.

How can I make sure that buildsys-macros is installed?
BuildRequires: buildsys-macros
won't work because there is no buildsys-macros on Fedora. And

%if 0%{?rhel}
BuildRequires: buildsys-macros
%endif

is not going to work too...

BTW, why must buildsys-macros be downloaded manually from the above URL and is 
not included in the regular EPEL repository?

Kind regards,

Gerd

-- 
Address (better: trap) for people I really don't want to get mail from:
jo...@cactusamerica.com
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: package for Fedora and EPEL from one spec source?

2011-02-01 Thread Kevin Kofler
Gerd v. Egidy wrote:
 I've seen code like %if 0%{?rhel} somewhere on the net, but that didn't
 work for me. I guess the %rhel-macro should be defined in
 /etc/rpm/macros.dist where I usually find stuff like %fedora but that
 doesn't exist on my Centos 5.

%{rhel} is defined in the EPEL build system. If you want to use it in local 
builds, you have to use the EPEL mock configs (which also define this) or 
define it yourself (but normally you're supposed to use mock for builds, not 
rpmbuild directly).

Alternatively, you can use if !0%{?fedora} instead. Fedora always defines 
%{fedora}.

Kevin Kofler

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: package for Fedora and EPEL from one spec source?

2011-02-01 Thread Michael Cronenworth
On 02/01/2011 09:27 AM, Gerd v. Egidy wrote:
 How can I make sure that buildsys-macros is installed?
 BuildRequires: buildsys-macros
 won't work because there is no buildsys-macros on Fedora. And

You don't need to do that as buildsys-macros is part of the buildroot in 
koji for EPEL5.

$ koji list-groups dist-5E-build build
[snip]
buildsys-macros: None, default  [dist-5E-build]
[snip]

 BTW, why must buildsys-macros be downloaded manually from the above URL and is
 not included in the regular EPEL repository?

I don't know why, but it wouldn't be a bad thing to have it in the 
repository like a normal package, IMO.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


Re: package for Fedora and EPEL from one spec source?

2011-02-01 Thread Jason L Tibbitts III
 MC == Michael Cronenworth m...@cchtml.com writes:

MC I don't know why, but it wouldn't be a bad thing to have it in the
MC repository like a normal package, IMO.

Not that this will really explain anything, but:

https://bugzilla.redhat.com/show_bug.cgi?id=563176

 - J
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel