Re: per-product packaging question

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

 



On 02/01/2017 10:48 AM, Daniel J Walsh wrote:
> 
> 
> 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:
>>>> Hi,
>>>>
>>>> I'm looking at the per-product packaging doc at
>>>> https://fedoraproject.org/wiki/Packaging:Per-Product_Configuration
>>>> and I see that variants for all products are installed at package install time, with
>>>> the ghost file pointing to the appropriate product variant.
>>>>
>>>> Just wondering if there's a reason for installing all variants and/or if it's
>>>> worth considering installation of just the particular variant appropriate for
>>>> 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
>>> files.
>>>
>>> /etc/sysconfig/docker-storage-setup-default
>>> /etc/sysconfig/docker-storage-setup-server
>>> /etc/sysconfig/docker-storage-setup-workstation
>>> /etc/sysconfig/docker-storage-setup-atomic
>>> /etc/sysconfig/docker-storage-setup-cloud
>>>
>>> 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:
>> /usr/share/docker-storage-setup/docker-storage-setup-default
>> /usr/share/docker-storage-setup/docker-storage-setup-server
>> /usr/share/docker-storage-setup/docker-storage-setup-workstation
>> /usr/share/docker-storage-setup/docker-storage-setup-atomic
>> /usr/share/docker-storage-setup/docker-storage-setup-cloud
>>
>> 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 same, etc.
>>
>>
>>
>> _______________________________________________
>> devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
>> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> 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)

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx

[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