On Wed, 2020-09-02 at 21:54 +0100, Sérgio Basto wrote:
On Wed, 2020-09-02 at 12:12 +0200, Miro Hrončok wrote:
> Hello,
>
> an interesting problem has been reported in Bugzilla 3 years ago:
>
>
>
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugzilla.redhat.com_...
>
>
> tl;dr There are generated files in /usr/share/mime without owning
> packages.
>
>
> When update-mime-database database is run (by RPM trigger), files
> are
> generated
> in /usr/share/mime, such as:
>
> /usr/share/mime
> ├── XMLnamespaces
> ├── aliases
> ├── application
> │ ├── andrew-inset.xml
> │ ├── annodex.xml
> │ ├── ...
> │ └── zstd.xml
> ├── ...
> ├── x-content
> │ ├── audio-cdda.xml
> │ ├── ....
> │ └── win32-software.xml
> └── x-epoc
> └── x-sisx-app.xml
>
>
> The files are generated based on content form multiple packages.
> I.e.
> shared-mime-info cannot list all the files as %ghosts because the
> list of files
> is volatile.
>
>
> As a specific example, on my system, I have:
>
> /usr/share/mime/application/x-openscad.xml
> /usr/share/mime/packages/openscad.xml
>
>
> The file in packages/ is shipped and owned by the openscad package.
> The file in application/ is generated by update-mime-database.
>
>
> So I guess the questions are:
>
> Should shared-mime-info %ghost all files created by update-mime-
> database when
> only shared-mime-info is installed? (That seems to be easy enough).
>
> Should individual packages shipping mime files %ghost the files
> generated from
> them? E.g. should openscad %ghost /usr/share/mime/application/x-
> openscad.xml?
>
> Is there a better (possibly automated) way of doing it? Or is it
> not
> worth it
> and we simply say that the files are OK not being owned?
I think and at least for me, it very common have also mime files in
[1] Conclusion, is very difficult track files generated by update-
mime-database
[1]
$HOME/.local/share/mime/application/
Generally speaking, I'd not want files inside of $HOME to be owned by
rpm. But when the system generates mime info in /usr/share/mime/ I
feel like that should 'come from somewhere'.
Pat