Update of the fish package

Axel Liljencrantz liljencrantz at gmail.com
Mon Jul 31 23:59:04 UTC 2006


On 8/1/06, Michael Schwendt <bugs.michael at gmx.net> wrote:
> On Mon, 31 Jul 2006 21:43:34 +0200, Axel Liljencrantz wrote:
>
> > > How about signing up as a Fedora Extras Contributor?
> >
> > I could do that. I have a bugzilla account, (liljencrantz at gmail.com),
> > and I belive I have performed all steps outlined on
> > http://fedoraproject.org/wiki/Extras/Contributors up until 'Get
> > Sponsored' except 'Make review request', but that should be
> > superflous, since the package I want to become a contributor for is
> > already in extras, was originally created by me, put through a review
> > process, etc. Anyone willing to sponsor me?
>
> Yes, go ahead, and I'll sponsor you.

Thank you. The account name 'Liljencrantz' was too long, so I chose 'ascii'.

>
> > That said, the package has a kludge in it that didn't exist at the
> > time of the original review. A utility shipped with fish needs various
> > X headers to compile, and the name of the package providing X headers
> > has changed from fc3 to fc4, and the file location has changed from
> > fc4 to fc5, to work around that and make a single package that builds
> > on all fedoras, I had to do a semi-ugly hack using a %define in the
> > spec:
> >
> > %define xinclude %( if test -d /usr/X11R6/include; then echo
> > /usr/X11R6/include; else echo /usr/include; fi )
> >
> > I asked on the main rpm mailing list how to do this and used the
> > pointers I got, but if anyone has a better suggestion, I'd be happy to
> > listen.
>
> Since the X11 header package names have changed, you need a hack also for
> the BuildRequires. And in that area it becomes dangerous, since run-time
> detected "BuildRequires" package names become "Requires" of the src.rpm,
> and you cannot rely on that the src.rpm is built on the target platform.
>
> The least painful way is to create distribution specific spec files which
> work only for one distribution until package names change. In Fedora
> Extras CVS you have a separate branch directory for every distribution
> release.

Least painful is always relative. The benefits I see of using a single
spec file:

* When changes are made to the spec, you only have to edit one file,
which reduces the amount of typing, and given my clumsy fingers, the
error rate goes way down.

* I can test the spec file locally on my box and catch most errors. I
don't have e.g. a core 3 system available, so I can't test its spec
file before uploading it.

On the other hand, if using a single spec file means creating ahuge
hairy mess of a file, that disadvantage outweighs the advantage.

>
> Another way is to evaluate the Fedora specific %fedora macro, which is set
> inside the build system, and set it in the spec file to a good default
> _if_ it is not defined:
>
> %{!?fedora: %define fedora 6}
>
> Your src.rpm then defaults to Fedora Core 6, and you can use conditionals
> like this:
>
> %if "%fedora" >= "5"
> BuildRequires: libXfoo-devel
> %define something /usr/include
> %else
> BuildRequires: foo-devel
> %define something /usr/X11R6/include
> %endif
>
> %if "%fedora" = "3"
> rm -f $RPM_BUILD_ROOT%{_bindir}/dont-want-that-file
> %endif
>
> and so on. More about this and the %{?dist} tag can be found here:

Thank you. So the following

%{!?fedora: %define fedora 6}
%if "%fedora" >= "5"
BuildRequires: xorg-x11-proto-devel libX11-devel libXt-devel
%else
BuildRequires: xorg-x11-devel
%endif

would be considered nicer than the original spec? I guess I'd agree.
The main downside is that it will not work on non-fedora systems which
do not use the same package names as fedora 5, which should be all pre
X.org-7.0 systems. But I guess I can accept having a fedora specific
spec file for the fedora extras rpm and use a different spec file for
the 'generic' rpm provided on the fish download page.

>
> http://fedoraproject.org/wiki/Packaging/DistTag
>
>
> --
> fedora-extras-list mailing list
> fedora-extras-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-extras-list
>


-- 
Axel




More information about the fedora-extras-list mailing list