Uploaded image for project: 'RDO Project'
  1. RDO Project
  2. RDO-182

Remove usage of "autorelease" macro when imporing fedora srpms

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • 3
    • False
    • Hide

      None

      Show
      None
    • False

      Current situation:

      When  we import a depencency from fedora srpm which is using rpmautospec, we get %autorelease as Release value but also we have the definition of autorelease dynamically added into the spec. i.e.:

      {{}}

      ## START: Set by rpmautospec

      {{## (rpmautospec version 0.3.5) }}

      {{## RPMAUTOSPEC: autorelease, autochangelog }}

      %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:

        release_number = 1;

        base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));

        print(release_number + base_release_number - 1);

      }%{?-e:.%{-e*%{?-s:.%{-s*}}%{!?-n:%{?dist}}}}

      ## END: Set by rpmautospec

      {{}}

       

      [...]

       

      Release: %autorelease

       

      So we don't need rpmautospec and we are actually not running it at all but reusing the values that rpmautospec defined in fedora.

      Some docs in https://docs.pagure.org/fedora-infra.rpmautospec/ 

      The problem:

      If we use the spec we import in a mock o koji instance with support for rpmautospec, the plugin detects that rpmautospec is required by the mere presence of "%autorelease" macro and will try to install it and run it again, which is not the behavior we desire.

      Proposed solution:

      To avoid this situation, I think we should avoid using %autorelease macro when importing deps.

       

            kkula@redhat.com Karolina Kula
            amoralej1@redhat.com Alfredo Moralejo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: