Re: Rules regarding whitespace inside .spec files

2016-01-15 Thread Andrew Toskin
> A better approach if you care about readability is to stop trying to use > one spec across everything. You don't need any > %if clauses at all if you do that. Well, I have not yet even written anything new to the spec file. This is a fork of an official Fedora package, and I'm still trying to

Re: Rules regarding whitespace inside .spec files

2016-01-14 Thread Richard W.M. Jones
On Wed, Jan 13, 2016 at 06:35:08PM -0600, Jason L Tibbitts III wrote: > > "AT" == Andrew Toskin writes: > > AT> Is there a way to convert tags like "BuildRequires:" into %macros so > AT> that they *can* be indented? > > Sure there is, but please don't actually try to do

Re: Rules regarding whitespace inside .spec files

2016-01-13 Thread Michael Schwendt
On Wed, 13 Jan 2016 06:18:31 -, Andrew Toskin wrote: > > error: line 102: Unknown tag: Source1: firefox-45.0a2.tar.bz2 > > ...and removing the leading whitespace removes the error. If you test with elemental tags, such as Name, Version and Release, you can observe that they are not

Re: Rules regarding whitespace inside .spec files

2016-01-13 Thread Jonathan Wakely
On 13/01/16 23:19 -, Andrew Toskin wrote: Is there a way to convert tags like "BuildRequires:" into %macros so that they *can* be indented? That would be highly unconventional, and so unlikely to make the .spec file easier to follow. If it's really a problem you could use comments: %if

Re: Rules regarding whitespace inside .spec files

2016-01-13 Thread Jason L Tibbitts III
> "AT" == Andrew Toskin writes: AT> Is there a way to convert tags like "BuildRequires:" into %macros so AT> that they *can* be indented? Sure there is, but please don't actually try to do that in Fedora packages. There are cases where such things might be easier to

Re: Rules regarding whitespace inside .spec files

2016-01-13 Thread Andrew Toskin
That's unfortunate. The spec file I've forked has certain tags *inside* of %if blocks. Things like this: %if %{?system_cairo} BuildRequires: pkgconfig(cairo) >= %{cairo_version} %endif In some of the longer blocks, no indentation makes it much harder to tell where the %if begins and ends. Is

Re: Rules regarding whitespace inside .spec files

2016-01-12 Thread Luya Tshimbalanga
On 12/01/16 10:18 PM, Andrew Toskin wrote: > I'm new to RPM packaging. I've recently forked a repository, and one of the > first things I tried to do was clean up formatting of the .spec file. > Particularly the %if blocks were hard to follow because the previous author > did not use any

Rules regarding whitespace inside .spec files

2016-01-12 Thread Andrew Toskin
I'm new to RPM packaging. I've recently forked a repository, and one of the first things I tried to do was clean up formatting of the .spec file. Particularly the %if blocks were hard to follow because the previous author did not use any indentation at all. However, it seems like maybe

Re: Rules regarding whitespace inside .spec files

2016-01-12 Thread Florian Weimer
On 01/13/2016 08:24 AM, Luya Tshimbalanga wrote: > In general, leading whitespace is only allowed when making conditional > statement or using backslash like these following examples: > > --- Example #1 --- > %if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7) >