On 02/01/2017 09:58 AM, Stephen Gallagher wrote:
> On 01/30/2017 05:03 PM, Vivek Goyal wrote:
>> On Mon, Jan 30, 2017 at 05:00:34PM -0500, Lokesh Mandvekar wrote:
>>> I'm looking at the per-product packaging doc at
>>> and I see that variants for all products are installed at package install
>>> the ghost file pointing to the appropriate product variant.
>>> Just wondering if there's a reason for installing all variants and/or if
>>> worth considering installation of just the particular variant appropriate
>>> the system at install time?
>> We are looking at installing per-product configuration for
>> docker-storage-setup. Now we are ending up with many configuration
>> This really looks ugly. So question is can we just install the default
>> and config file specific to that product and ignore rest?
> The reason for this is because there are situations where it is impossible to
> know what variant is in use until the %posttrans scripts have fired. (This is
> because on initial system installation, the variant is selected when the
> fedora-release-$EDITION package %post has been run).
> All file installation happens well before the %post and %posttrans operations
> are run, and therefore there isn't any way to determine which file belongs on
> the system.
> I *do* recommend that you consider moving the original, versioned config files
> into a subdirectory somewhere and only include the `docker-storage-setup`
> symlink in the actual end-user location.
> The reason for using symlinks rather than copies here was originally to support
> the possibility of converting between editions (such as promoting Fedora Cloud
> to a Fedora Server Edition) and having the configuration automatically swapped
> for you, but that never got implemented.
> Given that this is never going to happen (we decided that changing the config
> implicitly is a bad idea), I should update the policy to recommend using copies
> rather than symlinks and keeping the variant configs in /usr/share instead of in
> the /etc hierarchy.
> So in this specific case, I'd recommend that you install:
> And then copy the appropriate one from there to
> /etc/sysconfig/docker-storage-setup in %posttrans.
> I'll also note that you only need individual config files *if they differ*. For
> example, if the "atomic" and "cloud" configs are identical,
it's okay to skip
> the duplication. Ditto if "default" and "server" should be the
> devel mailing list -- devel(a)lists.fedoraproject.org
> To unsubscribe send an email to devel-leave(a)lists.fedoraproject.org
This works for me. As long as it is a real file and not a symlink which would
lead to an
admin editing files in /usr.
The docker package should ghost the /etc/sysconfig/docker-storage-setup file though.
Both of those requirements are explicitly called out in the Per-Product
Configuration guidelines (as of the update I just submitted to FPC)