[mythtv-users] systemd packaging problwm [WAS: Systemd File For MythTV on Fedora Questions]

Richard Shaw hobbes1069 at gmail.com
Tue May 15 00:15:09 UTC 2012

On Mon, May 14, 2012 at 6:42 PM, Harry Orenstein <holists at verizon.net> wrote:
> This is related to this topic, so I hope you don't mind a little
> thread-jacking  :)
> It seems you wrote the rpm packaging mods to support systemd.  I tried
> modifying build_myth.sh to enable systemd (adding --with systemd) and
> got this error when mythtv.spec is built:
> error: syntax error in expression
> error: /home/mythtv/mythtv/0.25-fixes/packaging/rpm/mythtv.spec:159:
> parseExpressionBoolean returns -1
> This is the first instance of "%if %{with_systemd}" and I cannot figure
> out how to address the error short of commenting out all of the "then"
> clauses (so that systemd is the default for compile).  I'm running
> Fedora 16 (if that makes a difference).  I cannot see how a value of -1
> gets set if 0 and 1 are the only defined values (in the %define).

I'm going to guess that it's because with_systemd isn't defined unless
you use it. Changing to something like

%if 0%{?with_systemd}

Notice the "0" & "?". This means if it is defined it will be used, if
it's not then it will be ignored, so the "0" makes the conditional

Hopefully that fixes it. I still struggle sometimes with all the weird
ways you can do if's in spec files.


More information about the mythtv-users mailing list