#1077 Drop usage of --vendor from .desktop files
Closed None Opened 11 years ago by toshio.

= phenomenon =

Many Fedora packages are using the --vendor flag to install .desktop files. This is starting to cause real world problems.

= background analysis =

In the very long ago past, the Fedora Guidelines asked to install .desktop files using the --vendor flag. Unfortunately the implementation of --vendor changed the file name of the .desktop package. Very little of the software that processed .desktop files was able to deal with .desktop files with changing names. The various pieces of software would treat fedora-gimp.desktop as a separate entry from gimp.desktop.

At the time when this was recognized, the FPC decided to ban all further use of --vendor in new packages but also required that previous packages that used the --vendor flag would continue to use it. This was seen as the best practice because it did not lead to duplication and churn for end users if they had previously customized their menus and therefore had a copy of the "fedora-APPLICATION.desktop" file in their home directories.

Fast forward many years to the present. https://fedorahosted.org/fpc/ticket/247 and the mailing list thread around it show that present software is depending on the filename of the .desktop filename even more than before leading to real-world breakage if the --vendor flag is used. FPC decided that it was time to remove the --vendor flag altogether. This would necessitate a flag day for F19 where people who had customized those entries might end up with duplicate entries or other corner-case brokenness on upgrade. But it would allow us to finally get rid of the --vendor prefix mess.

However, doing this as maintainers got around to it would be a mess as it could mean that the breakage would extend out over many releases with end users having the same symptoms for different packages as each package chose to upgrade.

= implementation recommendation =

To make the flag day effective, the change to .desktop files should happen in a single release. We'll need someone to:

  • Identify the .desktop files that are installed with --vendor. This should be doable by scanning the repodata for instances of fedora-*.desktop
  • Change all those .spec files from: {{{desktop-file-install --vendor="fedora"}}} to: {{{desktop-file-install}}}
  • Rebuild the packages

The latter two steps require provenpackager permissions.


The PyXML and python-pillow changes are winding down so I can take on the task of coordinating this. Additional provenpackagers would be much appreciated as the initial estimate is that there's going to be over 600 packages that need changing.

http://lists.fedoraproject.org/pipermail/packaging/2013-January/008880.html

page with repoquery commands and the list of packages that need changing:

https://fedoraproject.org/wiki/User:Toshio/Devendorize_desktop_files

Should we begin fixing our own or wait for the flag day?

Please start fixing on your own and other people's too :-). Remove packages from the [​https://fedoraproject.org/wiki/User:Toshio/Devendorize_desktop_files Devendorize] list as you fix them (I'll regenerate the list eventually but not until we've whittled it down some). Note that by "flag day" we mean "by the release of F19" rather than one single day.

Some packages are synchronized between Fedora branches, i.e. the branches have the same head and so all Fedora versions build from the same spec file. When implementing this change in such a package, one needs to ensure that the vendor tag is retained up to Fedora 18. I've added a warning to the wiki page, with a linked example how to do this.

  • Defining the variable for all subsequent conditionals at the top is a nice approach.
  • I think using bcond is a bit of overkill (really, what's the use case for overriding this on the rpm commandline).
  • Making the spec file conditionals with a ternary is more compact than %if but I was just reading a mailing list post about spec files that have mistyped ternary macros leading to silent failures. Not sure if I'd want to put that out there as a generic example that I expected people who didn't know the specifics to copy and paste.

About the update to the wiki page: would you consider putting your example in the existing Porting section and having the {{admon/warning||}} at the top point to that section instead of directly at the xsane.spec?

Hehe, there's no use case I can think of, I used %bcond_with/out just as a convoluted way to be able to use "speaking" macros like %{with ...} etc. throughout the rest of the spec file. That someone could switch it on/off on the command line is just a side effect. I agree that the %{?with:...} constructs are a bit obscure and will change that to something less risky.

I've updated the wiki page: moved admon/warning to the porting section, updated the examples so they're generic to be copy/pasted (and didn't use %bcond_with/out :-).

Thanks! I made a small correction to the conditional. Since one of 0%{?rhel} or 0%{?fedora} will always evaluate to "0" we can't check if the values of those are less than a specific version without some trickery. We also need to set the %with_desktop_vendor_tag macro to some value on either branch of the condition or the %if statements later will fail.

Is there an update on this - how has this progressed?

Good question. It was announced that it was finished. I just did a repoquery on rawhide and came out with these packages:

So unless we want to do something about the ftbfs packages we should be able to thank the [https://fedoraproject.org/wiki/User:Toshio/Devendorize_desktop_files#List_of_affected_packages people who participated in the cleanup] and close this ticket.

List of people who participating in devendorizing desktop files
vendor-honor-list

I've added a list of people who are listed on the wiki page as correcting vendor in at least one package. I've asked Ralph Bean about awarding a Fedora Badge to all of these people.

The badge has been created and awarded to the participants.

https://badges.fedoraproject.org/badge/devendorizor

Thanks everyone for your work!

Thanks to everyone who participated!

Login to comment on this ticket.

Metadata