On Thu, Oct 11, 2018 at 3:43 AM Christopher Engelhard <ce(a)lcts.de> wrote:
Hi,
one more question about the subpackage approach
On 10/8/18 12:39 AM, Dominik 'Rathann' Mierzejewski wrote:
>> 2) ship example config file as real config file, with upstream's example
>> config activated
>
> Ship this configuration in a subpackage (sshguard-iptables). Use rich
> dependencies to have it auto-installed if iptables-services is installed.
>
>> 3) ship custom config file preconfigured for Fedora defaults
>
> Ship this configuration in a subpackage (sshguard-firewalld). Use rich
> dependencies to have it auto-installed if firewalld is installed.
This implies that the spec contains multiple /etc/sshguard.conf files. I
can ship them as %doc sshguard.conf.<backend>, and then cp them to
sshguard.conf during %post <subpackage>, but then no package would own
that file, right?
I can of course create separate packages with separate spec files for
the config, but can this also be made to work with subpackages?
You can use "RemovePathPostfixes" to make it so they install properly.
This avoids the scriptlet messiness and should work as intended for
everything.
There are a couple of examples I'm aware of, but one that's in Fedora
that I know of is curl:
https://src.fedoraproject.org/rpms/curl/blob/master/f/curl.spec
--
真実はいつも一つ!/ Always, there's only one truth!