[Rpm-ecosystem] RFC #417 %optional file attribute
Neal Gompa
ngompa13 at gmail.com
Mon Mar 26 17:32:08 UTC 2018
On Mon, Mar 26, 2018 at 1:29 PM, Dmitry V. Levin <ldv at altlinux.org> wrote:
> On Mon, Mar 26, 2018 at 01:08:15PM -0400, Neal Gompa wrote:
>> On Mon, Mar 26, 2018 at 6:43 AM, Florian Festi <ffesti at redhat.com> wrote:
>> > Hi!
>> >
>> > We are currently pondering about #417 [1]. For adding a %optional file
>> > attribute that would allow adding file to to %files sections that may
>> > not be built under some circumstances (e.g. some architectures).
>> >
>> > It is already perfectly legal to have files not listed explicitly if
>> > they are within a directory that is included in the %file section. But
>> > some packages (examples wanted) may have trouble using this due to the
>> > way the package files are laid out.
>> >
>> > Otoh %optional would be another spec language key word that packagers
>> > have to deal with and we as RPM upstream developers have a hard time
>> > judging whether the benefit of the attribute really out weights the cost
>> > of bloating the spec language.
>> >
>> > Any input - especially with real world packages that would benefit such
>> > an addition - is welcome.
>> >
>>
>> I personally wouldn't use %optional in most cases, just like I avoid
>> %missingok (the install-time counterpart to this).
>
> %missingok is *not* an install-time counterpart to %optional.
>
> Imagine you have the following use of %missignok:
>
> %ghost %attr(644,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) /etc/postfix/*.db
> - this means that some of /etc/postfix/*.db files listed in %files
> *might* be created by the package during its lifetime.
>
> In contrast, %optional means that it's explicitly OK for some of files
> listed in %files to disappear from the package at build time for any reason.
>
That's the missingok modifier. IIRC, there's also a %missingok that exempts
any file for verification because it may be deleted during the
lifetime of its usage, and so it doesn't matter whether it is there or
not, or what happens to it.
--
真実はいつも一つ!/ Always, there's only one truth!
More information about the Rpm-ecosystem
mailing list