#1543 Please set "Vendor" tag in RPMs to copr:// URI for vendor stickiness
Closed: Fixed 3 years ago by praiskup. Opened 3 years ago by ngompa.

Starting with DNF 4.4.1, it will be possible to "lock" onto packages provided by a specific "Vendor", using the string in the Vendor tag as the identifier, if the feature is switched on.

This means, for example, that if a package from Fedora is replaced with a package from COPR, then the Fedora package should not automatically replace the COPR one later if the feature is activated.

In order for this to work, COPR packages need to be built with a unique vendor string encoded in them, similar to how the openSUSE Build Service does it.

OBS packages usually have the obs:// URI set as the vendor string. For example, my builds of libdnf snapshots for openSUSE in OBS have the Vendor string obs://build.opensuse.org/home:Pharaoh_Atem.

For COPR, I propose the same solution. That is, copr://<hostname>/<owner>. For example, for my builds of the Fedora AAA solution, the Vendor string should be set to copr://copr.fedorainfracloud.org/ngompa.


Alternatively, if we want vendors to map to a specific coprs rather than copr owners, then we can do the full copr:// URI.

Metadata Update from @frostyx:
- Issue tagged with: RFE

3 years ago

Hello @ngompa,
thank you for the RFE.

I couldn't find much relevant documentation for this, so my main question was "And how do I even set a vendor?". For anyone who is going to implement this RFE, it should be as simple as:

See, that you don't set any vendor by default:

$ mock -r fedora-32-x86_64 ~/rpmbuild/SRPMS/hello-2.8-2.fc32.src.rpm
$ rpm -qp /var/lib/mock/fedora-32-x86_64/result/hello-2.8-2.fc32.x86_64.rpm --qf '%{NAME} - %{VENDOR}\n'
hello - (none)

Update your mock config, for the laziness on my part just /etc/mock/fedora-32-x86_64.cfg, but you ideally want to customize your personal copy of that file and put the following line into it

config_opts['macros']['%vendor'] = "myself"

Build the package once again, it will have a vendor set now

$ mock -r fedora-32-x86_64 ~/rpmbuild/SRPMS/hello-2.8-2.fc32.src.rpm
$ rpm -qp /var/lib/mock/fedora-32-x86_64/result/hello-2.8-2.fc32.x86_64.rpm --qf '%{NAME} - %{VENDOR}\n'
hello - myself

I am marking it as easyfix.

Metadata Update from @frostyx:
- Issue tagged with: easyfix

3 years ago

While I sort of like the copr:// proposal, is there an attempt to somehow standardize the Vendor tag format, any guidelines, or anything?

The default Fedora packages have just the Fedora Project string. So we might as well do something like: Fedora Copr - group @copr and it would be a bit more human friendly.

There's no standard. The important thing is to make vendor strings unique so that the solver treats them correctly when sticky vendors are enabled.

The copr:// variant would be pretty nonstandard on Fedora:

$ rpm -qa --qf "%{VENDOR}\n" | sort | uniq -c
      2 Adobe Systems Inc.
   3640 Fedora Project
     50 (none)
      6 Red Hat, Inc.
     21 RPM Fusion

I'd propose Fedora Copr : owner, see PR#1548.

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1548 Merged 3 years ago