#72 Add support for epel9-next
Merged 2 years ago by mohanboddu. Opened 2 years ago by carlwgeorge.
carlwgeorge/fedscm-admin epel9_support  into  main

file modified
+10
@@ -40,6 +40,16 @@ 

      'main': {

          'rawhide': '2222-01-01'

      },

+     'epel9': {

+         'stable_api': '2032-05-31',

+         'security_fixes': '2032-05-31',

+         'bug_fixes': '2032-05-31'

+     },

+     'epel9-next': {

+         'stable_api': '2027-05-31',

+         'security_fixes': '2027-05-31',

+         'bug_fixes': '2027-05-31'

+     },

      'epel8': {

          'stable_api': '2029-05-31',

          'security_fixes': '2029-05-31',

file modified
+40 -21
@@ -763,27 +763,46 @@ 

      """

      # Extract any digits in the branch name to determine the EL version

      version = ''.join([i for i in branch if re.match(r'\d', i)])

-     url = f'https://infrastructure.fedoraproject.org/repo/json/pkg_el{version}.json'

-     rv = requests_wrapper(

-         url, timeout=60, service_name='infrastructure.fedoraproject.org')

-     rv_json = get_request_json(rv, 'getting the list of official EL packages')

-     # Remove noarch from this because noarch is treated specially

-     all_arches = set(rv_json['arches']) - set(['noarch'])

-     # On EL6, also remove ppc and i386 as many packages will

-     # have these arches missing and cause false positives

-     if int(version) == 6:

-         all_arches = all_arches - set(['ppc', 'i386'])

-     # On EL7 and later, also remove ppc and i686 as many packages will

-     # have these arches missing and cause false positives

-     elif int(version) >= 7:

-         all_arches = all_arches - set(['ppc', 'i686'])

-     for pkg_name, pkg_info in rv_json['packages'].items():

-         # If the EL package is noarch only or is available on all supported

-         # arches, then don't allow an EPEL branch

-         if pkg_name == name:

-             pkg_arches = set(pkg_info['arch'])

-             if pkg_arches == set(['noarch']) or not (all_arches - pkg_arches):

-                 return False

+ 

+     # Starting with epel9 and epel9-next, check against CentOS compose metadata.

+     if int(version) >= 9:

+         # Currently we only have a latest symlink.  In the future we'll need

+         # separate latest symlinks that include the major version.

+         # https://bugzilla.redhat.com/show_bug.cgi?id=2005139

+         url = 'https://composes.stream.centos.org/production/latest-CentOS-Stream/compose/metadata/rpms.json'

+         rv = requests_wrapper(url, timeout=60, service_name='composes.stream.centos.org')

+         rv_json = get_request_json(rv, 'getting the list of official EL packages')

+         pkg_names = {

+             # convert name-epoch:version-release.arch key to just the name

+             nevra.rsplit('.', maxsplit=1)[0].rsplit('-', maxsplit=2)[0]

+             # only packages from these repos are forbidden in epel

+             for repo in ['BaseOS', 'AppStream', 'CRB']

+             for arch in rv_json['payload']['rpms'][repo].keys()

+             for nevra in rv_json['payload']['rpms'][repo][arch].keys()

+         }

+         if name in pkg_names:

+             return False

+     else:

+         url = f'https://infrastructure.fedoraproject.org/repo/json/pkg_el{version}.json'

+         rv = requests_wrapper(url, timeout=60, service_name='infrastructure.fedoraproject.org')

+         rv_json = get_request_json(rv, 'getting the list of official EL packages')

+         # Remove noarch from this because noarch is treated specially

+         all_arches = set(rv_json['arches']) - set(['noarch'])

+         # On EL6, also remove ppc and i386 as many packages will

+         # have these arches missing and cause false positives

+         if int(version) == 6:

+             all_arches = all_arches - set(['ppc', 'i386'])

+         # On EL7 and later, also remove ppc and i686 as many packages will

+         # have these arches missing and cause false positives

+         elif int(version) >= 7:

+             all_arches = all_arches - set(['ppc', 'i686'])

+         for pkg_name, pkg_info in rv_json['packages'].items():

+             # If the EL package is noarch only or is available on all supported

+             # arches, then don't allow an EPEL branch

+             if pkg_name == name:

+                 pkg_arches = set(pkg_info['arch'])

+                 if pkg_arches == set(['noarch']) or not (all_arches - pkg_arches):

+                     return False

      return True

  

  

  • add branch SLAs
  • modify valid_epel_package to check CentOS compose metadata for 9+

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

  • tox : FAILURE in 6m 01s

Looks good to me too.

@humaton you want to do a release / build / ask scm-admins to update?

Pull-Request has been merged by mohanboddu

2 years ago

@humaton you want to do a release / build / ask scm-admins to update?

https://pagure.io/fedscm-admin/issue/73