#10852 %dist is not set correctly on `epel9-next-build`
Opened 2 months ago by gotmax23. Modified 19 days ago

  • Describe the issue
    On el9, %dist is set to %{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print("%{?distprefix" .. i .."}") end}}.el9%{?with_bootstrap:~bootstrap} in /usr/lib/rpm/macros.d/macros.dist, just like it is in Fedora. However, the epel9-next-build tag completely overrides this to .el9.next instead of of simply appending .next. This breaks the forge macros, the go macros (and other macros that depend on the forge macros or otherwise rely on %distprefix), and the %bcond_without bootstrap behavior.
  • When do you need this? (YYYY/MM/DD)
    Not really time constrained
  • When is this no longer needed or useful? (YYYY/MM/DD)
    When c9s and thus epel9-next are EOL'd
  • If we cannot complete your request, what is the impact?
    NEVR collisions and update issues will occur. Packagers will be confused.

Metadata Update from @zlopez:
- Issue tagged with: medium-gain, medium-trouble, ops

2 months ago

Any ideas where this is coming from @carlwgeorge ?

Metadata Update from @humaton:
- Issue untagged with: medium-gain, medium-trouble, ops

2 months ago

Metadata Update from @humaton:
- Issue tagged with: medium-gain, medium-trouble

2 months ago

We discussed this at today's release engineering meeting. The only solution that we find is to create epel9-next-release.rpm that would carry correct macros. There may be a different solution that we are missing.

Currently this is set in the koji tag, where I am pretty sure we can't use macros. ;(

What if we add %{?distsuffix} to the %dist definition and define that in koji instead of %dist?

The only solution that we find is to create epel9-next-release.rpm that would carry correct macros.

We already have epel-next-release and epel-rpm-macros. We could override %dist in one of those as long as the file name sorts after macros.dist in %{_rpmmacrodir}.

What if we add %{?distsuffix} to the %dist definition and define that in koji instead of %dist?

That should work. I assume we would override %dist to include %{?distsuffix} in one of the aforementioned packages? Currently, it is defined in redhat-release / centos-release / ${rebuild}-release.

Currently this is set in the koji tag, where I am pretty sure we can't use macros. ;(

FWIW, mock-core-configs has

$ rg '%dist.*%'                                                           
templates/opensuse-tumbleweed.tpl
6:config_opts['macros']['%dist'] = '.suse.tw%(sh -c ". /etc/os-release; echo \$VERSION_ID")'

which has a macro within the %dist macro. I'm not sure how/if this translates to koji

What if we add %{?distsuffix} to the %dist definition and define that in koji instead of %dist?

That should work. I assume we would override %dist to include %{?distsuffix} in one of the aforementioned packages? Currently, it is defined in redhat-release / centos-release / ${rebuild}-release.

My idea was to add this to the source in c9s and RHEL.

My idea was to add this to the source in c9s and RHEL.

I've submitted https://gitlab.com/redhat/centos-stream/rpms/centos-release/-/merge_requests/30. I tried to make a case for why this is generally applicable instead of just saying, "this breaks EPEL; please fix it." I suppose we can override it in EPEL if they don't accept it.

So, I guess that MR is just still waiting?

Yes, it is. I'll ping them again.

Currently this is set in the koji tag, where I am pretty sure we can't use macros. ;(

What are you talking about? Of course you can. That's been possible since Koji 1.18. We use this for ELN right now.

Don't bother adjusting centos-release. Just set the %dist macro override in the epel9-next build tag. We do this in ELN, which @sgallagh and @mohanboddu did and can help replicate this for EPEL Next.

$ koji taginfo eln-build
Tag: eln-build [22493]
Arches: i686 x86_64 aarch64 ppc64le s390x
Groups: appliance-build, build, livecd-build, livemedia-build, srpm-build
Tag options:
  mock.new_chroot : 0          [f37]
  mock.package_manager : 'dnf' [f37]
  rpm.macro.dist : ('%{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do '
 'print("%{?distprefix" .. i .."}") '
 'end}}.eln%{eln}%{?with_bootstrap:~bootstrap}')
  rpm.macro.eln : 121
  rpm.macro.rhel : 10
This tag is a buildroot for one or more targets
Current repo: repo#4729897: 2022-07-27 15:01:35.132131+00:00
Targets that build from this tag:
  eln-rebuild
  eln
  eln-candidate
Inheritance:
  0    .... eln [22492]
  5    .... f37-build [50468]

Login to comment on this ticket.

Metadata