Re: Mass changes to packaging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/22/2012 06:22 PM, Lennart Poettering wrote:
> On Wed, 22.08.12 19:17, Tom Lane (tgl@xxxxxxxxxx) wrote:
> 
>>
>> Lennart Poettering <mzerqung@xxxxxxxxxxx> writes:
>>> On Wed, 22.08.12 09:25, Kevin Fenzi (kevin@xxxxxxxxx) wrote:
>>>> I'll add a me too here. 
>>>>
>>>> Any word on if the macros can/will be back-ported to f16/f17? 
>>
>>> The preset logic is actually already available in F17, so we could
>>> theoretically backport that, but this would mean we'd also have to
>>> create and maintain a preset policy file for F17, and that's the bit I
>>> am not sure i'd like to do.
>>
>>> Without the preset policy the macros would only turn things off after
>>> installation, never on.
>>
>> What I would want to see in F16/F17 is macros that exactly duplicate the
>> previously-standard snippets they are supposed to replace.  Nobody is
>> suggesting that the preset stuff ought to go into the released branches;
>> only that we don't want to have to maintain different specfile versions
>> for the different branches.  And if these things are macros, we should
>> not have to.
> 
> The thing is that previously we had to different snippets, one for
> enabling a service after installation, one for leaving it disabled. With
> the macros there is only one which checks the preset policy whether
> something should be enabled. Hence we can't really map the old logic to
> the new macros, I fear.

I think we can manage this. In the F17 and F16 systemd, provide the same
macros, except:

1) %systemd_post should be redefined as follows:

%systemd_post() \
if [ $1 -eq 1 ] ; then \
        # Initial installation \
       	/bin/systemctl daemon-reload >/dev/null 2>&1 || : \
fi \
%{nil}

2) Create another macro:

%systemd_post_enable() \
if [ $1 -eq 1 ] ; then \
        # Initial installation \
        /bin/systemctl enable %{?*} >/dev/null 2>&1 || : \
fi \
%{nil}

3) We'll adjust the guidelines like this:

If your service is explicitly enabled by default in Fedora 16 or 17, and
you wish to have a shared spec file, you will need to add a
conditionalized call to the "%systemd_post_enable" macro, as follows:

%post
%if %{defined fc16} || %{defined fc17}
%systemd_post_enable apache-httpd.service
%else
%systemd_post apache-httpd.service
%endif

Thoughts?

~tom

==
Fedora Project
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux