opensuse / SLE conditional logic?

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

opensuse / SLE conditional logic?

gregfreemyer
All,

What's the correct way in a spec file to write:

%if opensuse/SLE
...
%if opensuse
...
%if Leap 42.1 or newer (including Factory)
...
%endif
%endif
%endig

I've written the below logic, but I don't think is_opensuse is defined
in 13.1 / 13.2:

====
%if %{defined suse_version}
...
%if 0%{?is_opensuse}
...
%if 0%{?suse_version} == 1315 || 0%{?suse_version} > 1320
...
%endif
%endif
%endif
=====

Thanks
Greg
--
Greg Freemyer
Upset at the Hillary/Trump choice
So are Utah voters, Evan McMullin is leading there among voters age 25-34
Vote Evan McMullin for President
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

Darin Perusich-3
Lots of details on conditionals on the cross distro howto.


https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
https://en.opensuse.org/openSUSE:Specfile_guidelines

--
Later,
Darin


On Wed, Oct 5, 2016 at 3:54 PM, Greg Freemyer <[hidden email]> wrote:

> All,
>
> What's the correct way in a spec file to write:
>
> %if opensuse/SLE
> ...
> %if opensuse
> ...
> %if Leap 42.1 or newer (including Factory)
> ...
> %endif
> %endif
> %endig
>
> I've written the below logic, but I don't think is_opensuse is defined
> in 13.1 / 13.2:
>
> ====
> %if %{defined suse_version}
> ...
> %if 0%{?is_opensuse}
> ...
> %if 0%{?suse_version} == 1315 || 0%{?suse_version} > 1320
> ...
> %endif
> %endif
> %endif
> =====
>
> Thanks
> Greg
> --
> Greg Freemyer
> Upset at the Hillary/Trump choice
> So are Utah voters, Evan McMullin is leading there among voters age 25-34
> Vote Evan McMullin for President
> --
> To unsubscribe, e-mail: [hidden email]
> To contact the owner, e-mail: [hidden email]
>
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

gregfreemyer
On Wed, Oct 5, 2016 at 4:03 PM, Darin Perusich <[hidden email]> wrote:
> Lots of details on conditionals on the cross distro howto.
>
>
> https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
> https://en.opensuse.org/openSUSE:Specfile_guidelines

Lots of detail, yes.  But not enough. :(

My impression is that "is_opensuse" is only defined for Leap 42.1 and
newer (including factory).

There's nothing in either page that tells me that, so I'm in the world
of undocumented features.

At its simplest my question is how to write a conditional such that it
is true for 13.1/13.2/42.1/42.2/Factory, but false for all versions of
SLE:

------
My thought was:

%if 0%{?is_opensuse}

but that seems to only be true for 42.1/42.2/Factory.
------

fyi: This relates to SR#433496 which I think you will be reviewing.
Maybe it needs to be revoked until I figure it out.

https://build.opensuse.org/request/show/433496

Thanks
Greg
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

Simon Lees-3


On 10/06/2016 07:21 AM, Greg Freemyer wrote:

> On Wed, Oct 5, 2016 at 4:03 PM, Darin Perusich <[hidden email]> wrote:
>> Lots of details on conditionals on the cross distro howto.
>>
>>
>> https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
>> https://en.opensuse.org/openSUSE:Specfile_guidelines
>
> Lots of detail, yes.  But not enough. :(
>
> My impression is that "is_opensuse" is only defined for Leap 42.1 and
> newer (including factory).
>
> There's nothing in either page that tells me that, so I'm in the world
> of undocumented features.
>
> At its simplest my question is how to write a conditional such that it
> is true for 13.1/13.2/42.1/42.2/Factory, but false for all versions of
> SLE:
>
> ------
> My thought was:
>
> %if 0%{?is_opensuse}
>
> but that seems to only be true for 42.1/42.2/Factory.
> ------
>
> fyi: This relates to SR#433496 which I think you will be reviewing.
> Maybe it needs to be revoked until I figure it out.
>
> https://build.opensuse.org/request/show/433496
>
> Thanks
> Greg
>
Yeah the conditional madness here is pretty crazy you probably want
something like,

%if 0%{?suse_version} && !((!0%{?is_opensuse}) && 0%{?suse_version} == 1315)

Will give you all of openSUSE (although it will also give you
SLE10/SLE11 but not SLE12), the logic is first check that we have a
SUSE/openSUSE version, then check that its not SLE12.

It would be really nice if there was a simpler better way but currently
there is not, By March next year 13.2 will be out of support though and
then is_opensuse will cover all supported openSUSE versions so at this
stage there probably isn't point in doing much else.

* Disclamer, I didn't check that line but have used similar in the past.

--

Simon Lees (Simotek)                            http://simotek.net

Emergency Update Team                           keybase.io/simotek
SUSE Linux                            Adeliade Australia, UTC+9:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B


signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

Darin Perusich-3
In reply to this post by gregfreemyer
On Wed, Oct 5, 2016 at 4:51 PM, Greg Freemyer <[hidden email]> wrote:

> On Wed, Oct 5, 2016 at 4:03 PM, Darin Perusich <[hidden email]> wrote:
>> Lots of details on conditionals on the cross distro howto.
>>
>>
>> https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
>> https://en.opensuse.org/openSUSE:Specfile_guidelines
>
> Lots of detail, yes.  But not enough. :(
>
> My impression is that "is_opensuse" is only defined for Leap 42.1 and
> newer (including factory).
>
> There's nothing in either page that tells me that, so I'm in the world
> of undocumented features.
>
> At its simplest my question is how to write a conditional such that it
> is true for 13.1/13.2/42.1/42.2/Factory, but false for all versions of
> SLE:
>
> ------
> My thought was:
>
> %if 0%{?is_opensuse}
>
> but that seems to only be true for 42.1/42.2/Factory.
> ------
>
> fyi: This relates to SR#433496 which I think you will be reviewing.
> Maybe it needs to be revoked until I figure it out.
>
> https://build.opensuse.org/request/show/433496
>

Actually the way I think this should be solved is by linkpac'ing
hiredis into server:monitoring and only enabling it for SLE ;-)
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

gregfreemyer
On Wed, Oct 5, 2016 at 7:49 PM, Darin Perusich <[hidden email]> wrote:

>
> On Wed, Oct 5, 2016 at 4:51 PM, Greg Freemyer <[hidden email]> wrote:
> > On Wed, Oct 5, 2016 at 4:03 PM, Darin Perusich <[hidden email]> wrote:
> >> Lots of details on conditionals on the cross distro howto.
> >>
> >>
> >> https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
> >> https://en.opensuse.org/openSUSE:Specfile_guidelines
> >
> > Lots of detail, yes.  But not enough. :(
> >
> > My impression is that "is_opensuse" is only defined for Leap 42.1 and
> > newer (including factory).
> >
> > There's nothing in either page that tells me that, so I'm in the world
> > of undocumented features.
> >
> > At its simplest my question is how to write a conditional such that it
> > is true for 13.1/13.2/42.1/42.2/Factory, but false for all versions of
> > SLE:
> >
> > ------
> > My thought was:
> >
> > %if 0%{?is_opensuse}
> >
> > but that seems to only be true for 42.1/42.2/Factory.
> > ------
> >
> > fyi: This relates to SR#433496 which I think you will be reviewing.
> > Maybe it needs to be revoked until I figure it out.
> >
> > https://build.opensuse.org/request/show/433496
> >
>
> Actually the way I think this should be solved is by linkpac'ing
> hiredis into server:monitoring and only enabling it for SLE ;-)

Darin,

I can't do the linkpac because I'm not a project maintainer.  You are,
so if you linkpac it in, I'll revise the logic.

Note it needs to build for SLE 12, opensuse 13.1 and 13.2 to satisfy
the suricata needs.

Greg
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

Andrei Borzenkov
In reply to this post by Simon Lees-3
06.10.2016 00:35, Simon Lees пишет:

>
>
> On 10/06/2016 07:21 AM, Greg Freemyer wrote:
>> On Wed, Oct 5, 2016 at 4:03 PM, Darin Perusich <[hidden email]> wrote:
>>> Lots of details on conditionals on the cross distro howto.
>>>
>>>
>>> https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
>>> https://en.opensuse.org/openSUSE:Specfile_guidelines
>>
>> Lots of detail, yes.  But not enough. :(
>>
>> My impression is that "is_opensuse" is only defined for Leap 42.1 and
>> newer (including factory).
>>
>> There's nothing in either page that tells me that, so I'm in the world
>> of undocumented features.
>>
>> At its simplest my question is how to write a conditional such that it
>> is true for 13.1/13.2/42.1/42.2/Factory, but false for all versions of
>> SLE:
>>
>> ------
>> My thought was:
>>
>> %if 0%{?is_opensuse}
>>
>> but that seems to only be true for 42.1/42.2/Factory.
>> ------
>>
>> fyi: This relates to SR#433496 which I think you will be reviewing.
>> Maybe it needs to be revoked until I figure it out.
>>
>> https://build.opensuse.org/request/show/433496
>>
>> Thanks
>> Greg
>>
>
> Yeah the conditional madness here is pretty crazy you probably want
> something like,
>
> %if 0%{?suse_version} && !((!0%{?is_opensuse}) && 0%{?suse_version} == 1315)
>
> Will give you all of openSUSE (although it will also give you
> SLE10/SLE11 but not SLE12), the logic is first check that we have a
> SUSE/openSUSE version, then check that its not SLE12.
>
I'd make it

0%{?suse_version} > 1300 && !((!0%{?is_opensuse}) && 0%{?suse_version}
== 1315)

The first filters out SLE10/SLE11, the second takes in account future
SLE13 (or whatever).

> It would be really nice if there was a simpler better way but currently
> there is not, By March next year 13.2 will be out of support though and
> then is_opensuse will cover all supported openSUSE versions so at this
> stage there probably isn't point in doing much else.
>
> * Disclamer, I didn't check that line but have used similar in the past.
>



signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

Darin Perusich-3
In reply to this post by gregfreemyer
Greg,

I've created linkpac's for unresolvable packages for SLE_12* and their
dependencies, which will take some time to build. I think I have all
the ocaml deps linked, but we'll need to wait and see and adjust as
needed.
--
Later,
Darin


On Wed, Oct 5, 2016 at 9:47 PM, Greg Freemyer <[hidden email]> wrote:

> On Wed, Oct 5, 2016 at 7:49 PM, Darin Perusich <[hidden email]> wrote:
>>
>> On Wed, Oct 5, 2016 at 4:51 PM, Greg Freemyer <[hidden email]> wrote:
>> > On Wed, Oct 5, 2016 at 4:03 PM, Darin Perusich <[hidden email]> wrote:
>> >> Lots of details on conditionals on the cross distro howto.
>> >>
>> >>
>> >> https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
>> >> https://en.opensuse.org/openSUSE:Specfile_guidelines
>> >
>> > Lots of detail, yes.  But not enough. :(
>> >
>> > My impression is that "is_opensuse" is only defined for Leap 42.1 and
>> > newer (including factory).
>> >
>> > There's nothing in either page that tells me that, so I'm in the world
>> > of undocumented features.
>> >
>> > At its simplest my question is how to write a conditional such that it
>> > is true for 13.1/13.2/42.1/42.2/Factory, but false for all versions of
>> > SLE:
>> >
>> > ------
>> > My thought was:
>> >
>> > %if 0%{?is_opensuse}
>> >
>> > but that seems to only be true for 42.1/42.2/Factory.
>> > ------
>> >
>> > fyi: This relates to SR#433496 which I think you will be reviewing.
>> > Maybe it needs to be revoked until I figure it out.
>> >
>> > https://build.opensuse.org/request/show/433496
>> >
>>
>> Actually the way I think this should be solved is by linkpac'ing
>> hiredis into server:monitoring and only enabling it for SLE ;-)
>
> Darin,
>
> I can't do the linkpac because I'm not a project maintainer.  You are,
> so if you linkpac it in, I'll revise the logic.
>
> Note it needs to build for SLE 12, opensuse 13.1 and 13.2 to satisfy
> the suricata needs.
>
> Greg
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

gregfreemyer
On Thu, Oct 6, 2016 at 9:10 AM, Darin Perusich <[hidden email]> wrote:
> Greg,
>
> I've created linkpac's for unresolvable packages for SLE_12* and their
> dependencies, which will take some time to build. I think I have all
> the ocaml deps linked, but we'll need to wait and see and adjust as
> needed.
> --
> Later,
> Darin


Great.  Suricata is a pretty major package.  I think it would be worth
the effort to get into SLE 12 SP2, but I know nothing about that
process.

Greg
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

Darin Perusich-3
On Thu, Oct 6, 2016 at 10:41 AM, Greg Freemyer <[hidden email]> wrote:

> On Thu, Oct 6, 2016 at 9:10 AM, Darin Perusich <[hidden email]> wrote:
>> Greg,
>>
>> I've created linkpac's for unresolvable packages for SLE_12* and their
>> dependencies, which will take some time to build. I think I have all
>> the ocaml deps linked, but we'll need to wait and see and adjust as
>> needed.
>> --
>> Later,
>> Darin
>
>
> Great.  Suricata is a pretty major package.  I think it would be worth
> the effort to get into SLE 12 SP2, but I know nothing about that
> process.
>

Getting the ocaml dependencies building in server:monitoring is
proving to be a pain due to some cyclic  dependencies. Probably won't
have time to look into it much more today but I'll try to get it
resolved soonish.
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

gregfreemyer
On Thu, Oct 6, 2016 at 11:45 AM, Darin Perusich <[hidden email]> wrote:

> On Thu, Oct 6, 2016 at 10:41 AM, Greg Freemyer <[hidden email]> wrote:
>> On Thu, Oct 6, 2016 at 9:10 AM, Darin Perusich <[hidden email]> wrote:
>>> Greg,
>>>
>>> I've created linkpac's for unresolvable packages for SLE_12* and their
>>> dependencies, which will take some time to build. I think I have all
>>> the ocaml deps linked, but we'll need to wait and see and adjust as
>>> needed.
>>> --
>>> Later,
>>> Darin
>>
>>
>> Great.  Suricata is a pretty major package.  I think it would be worth
>> the effort to get into SLE 12 SP2, but I know nothing about that
>> process.
>>
>
> Getting the ocaml dependencies building in server:monitoring is
> proving to be a pain due to some cyclic  dependencies. Probably won't
> have time to look into it much more today but I'll try to get it
> resolved soonish.

No issue / urgency on my end.

What do you want me to do with the 13.1 / 13.2 builds?  Just disable?
(I don't see suricata being used at this late stage of those 2
releases life.)

Thanks
Greg
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

Darin Perusich-3
The deps for SLE_12 are resolved and suricata is building now.
--
Later,
Darin


On Thu, Oct 6, 2016 at 11:51 AM, Greg Freemyer <[hidden email]> wrote:

> On Thu, Oct 6, 2016 at 11:45 AM, Darin Perusich <[hidden email]> wrote:
>> On Thu, Oct 6, 2016 at 10:41 AM, Greg Freemyer <[hidden email]> wrote:
>>> On Thu, Oct 6, 2016 at 9:10 AM, Darin Perusich <[hidden email]> wrote:
>>>> Greg,
>>>>
>>>> I've created linkpac's for unresolvable packages for SLE_12* and their
>>>> dependencies, which will take some time to build. I think I have all
>>>> the ocaml deps linked, but we'll need to wait and see and adjust as
>>>> needed.
>>>> --
>>>> Later,
>>>> Darin
>>>
>>>
>>> Great.  Suricata is a pretty major package.  I think it would be worth
>>> the effort to get into SLE 12 SP2, but I know nothing about that
>>> process.
>>>
>>
>> Getting the ocaml dependencies building in server:monitoring is
>> proving to be a pain due to some cyclic  dependencies. Probably won't
>> have time to look into it much more today but I'll try to get it
>> resolved soonish.
>
> No issue / urgency on my end.
>
> What do you want me to do with the 13.1 / 13.2 builds?  Just disable?
> (I don't see suricata being used at this late stage of those 2
> releases life.)
>
> Thanks
> Greg
> --
> To unsubscribe, e-mail: [hidden email]
> To contact the owner, e-mail: [hidden email]
>
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

gregfreemyer
On Thu, Oct 6, 2016 at 1:09 PM, Darin Perusich <[hidden email]> wrote:
> The deps for SLE_12 are resolved and suricata is building now.
> --
> Later,
> Darin

Great,

Now time to do some testing!

Greg
--
Greg Freemyer
Upset at the Hillary/Trump choice
So are Utah voters, Evan McMullin is leading there among voters age 25-34
Vote Evan McMullin for President
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

Peter Linnell-4
In reply to this post by gregfreemyer
On Thu, 6 Oct 2016 10:41:49 -0400
Greg Freemyer <[hidden email]> wrote:

> On Thu, Oct 6, 2016 at 9:10 AM, Darin Perusich <[hidden email]>
> wrote:
> > Greg,
> >
> > I've created linkpac's for unresolvable packages for SLE_12* and
> > their dependencies, which will take some time to build. I think I
> > have all the ocaml deps linked, but we'll need to wait and see and
> > adjust as needed.
> > --
> > Later,
> > Darin  
>
>
> Great.  Suricata is a pretty major package.  I think it would be worth
> the effort to get into SLE 12 SP2, but I know nothing about that
> process.
>
> Greg

Hi Greg,

Getting a package into the enterprise SLES is a much more complex
process which involves Product Management, many different Engineering
departments etc.

Where SLE12SP2 in the release cycle, it is way too late to add a
package to the distro.

Now I did have a look at Suricata and I can see this would be very
valuable to paying enterprise customers of SUSE.  There is a
alternative called Package Hub. See: https://packagehub.suse.com

Call it a "soft opening", but expect a lot more noise about this around
the time of SUSECon in November.

Thanks,
Peter
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: opensuse / SLE conditional logic?

gregfreemyer
On Fri, Oct 7, 2016 at 11:40 PM, Peter Linnell <[hidden email]> wrote:

> On Thu, 6 Oct 2016 10:41:49 -0400
> Greg Freemyer <[hidden email]> wrote:
>
>> On Thu, Oct 6, 2016 at 9:10 AM, Darin Perusich <[hidden email]>
>> wrote:
>> > Greg,
>> >
>> > I've created linkpac's for unresolvable packages for SLE_12* and
>> > their dependencies, which will take some time to build. I think I
>> > have all the ocaml deps linked, but we'll need to wait and see and
>> > adjust as needed.
>> > --
>> > Later,
>> > Darin
>>
>>
>> Great.  Suricata is a pretty major package.  I think it would be worth
>> the effort to get into SLE 12 SP2, but I know nothing about that
>> process.
>>
>> Greg
>
> Hi Greg,
>
> Getting a package into the enterprise SLES is a much more complex
> process which involves Product Management, many different Engineering
> departments etc.
>
> Where SLE12SP2 in the release cycle, it is way too late to add a
> package to the distro.
>
> Now I did have a look at Suricata and I can see this would be very
> valuable to paying enterprise customers of SUSE.  There is a
> alternative called Package Hub. See: https://packagehub.suse.com
>
> Call it a "soft opening", but expect a lot more noise about this around
> the time of SUSECon in November.
>
> Thanks,
> Peter

Thanks for the feedback Peter.  I was actually thinking of SLES 12 SP3
(or whatever SLES SP2->next is).

Note that Suricata, libprelude, and the Prelude SIEM all work
together.  libprelude is a major project of its own and is
incorporated into the Prelude SIEM.  libprelude and the Prelude SIEM
just went into factory last couple months. Getting libprelude, Prelude
SIEM, and Suricata into SP3 might be a fairly involved process, but an
effort worth making in my uninformed opinion.

Regardless of what the  SUSE team chooses to do, I plan to submit
Suricata to factory in the not too distant future.  That will complete
the libprelude / Suricata / Prelude SIEM package set.

The Suricata package isn't yet up to factory standards in my opinion
and there may need to be a supplemental package or 2.  (ie.
suricata-rules is in someones home project.  We may want that for
factory as well.)

Greg
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]