From bbde45f1585b13b39a5d7d68d5ef0d5e50494f6a Mon Sep 17 00:00:00 2001 From: Mattia Verga Date: Wed, 28 Feb 2024 18:51:06 +0100 Subject: [PATCH] bodhi: quick fix for DRPMs disabled in F40 Signed-off-by: Mattia Verga --- roles/bodhi2/backend/files/createrepo_c.ini | 5 +++++ roles/bodhi2/backend/templates/pungi.rpm.conf.j2 | 6 +++--- roles/openshift-apps/bodhi/templates/dockerfile-base | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/roles/bodhi2/backend/files/createrepo_c.ini b/roles/bodhi2/backend/files/createrepo_c.ini index 3d9b788751..22ca397e2c 100644 --- a/roles/bodhi2/backend/files/createrepo_c.ini +++ b/roles/bodhi2/backend/files/createrepo_c.ini @@ -13,6 +13,8 @@ repodata-compress-type = general-compress = False # zchunk is a boolean which enables zchunk on repodata zchunk = True +# drpms_enabled is a boolean which enables DRPMs generation +drpms_enabled = True # Here you can override default values by matching Release.prefix_id or Release.name # If a value is not overridden, those from DEFAULT are used @@ -26,3 +28,6 @@ zchunk = False updateinfo-compress-type = BZ2 repodata-compress-type = xz zchunk = False + +[release.F40] +drpms_enabled = False diff --git a/roles/bodhi2/backend/templates/pungi.rpm.conf.j2 b/roles/bodhi2/backend/templates/pungi.rpm.conf.j2 index 681c9b77f1..4d751faf23 100644 --- a/roles/bodhi2/backend/templates/pungi.rpm.conf.j2 +++ b/roles/bodhi2/backend/templates/pungi.rpm.conf.j2 @@ -85,13 +85,13 @@ check_deps = False repoclosure_backend = 'dnf' # CREATEREPO -[% if release.version_int >= 40 %] +[% if cr_config.drpms_enabled %] createrepo_deltas = [ - ('^Everything$', {'*': False}) + ('^Everything$', {'*': True}) ] [% else %] createrepo_deltas = [ - ('^Everything$', {'*': True}) + ('^Everything$', {'*': False}) ] [% endif %] createrepo_database = True diff --git a/roles/openshift-apps/bodhi/templates/dockerfile-base b/roles/openshift-apps/bodhi/templates/dockerfile-base index fafd8e7cd1..ac0cee98d3 100644 --- a/roles/openshift-apps/bodhi/templates/dockerfile-base +++ b/roles/openshift-apps/bodhi/templates/dockerfile-base @@ -23,6 +23,10 @@ RUN dnf install -y bodhi-server-{{bodhi_version}} python3-pyramid_sawing python3 RUN curl https://github.com/fedora-infra/bodhi/commit/0c302e26003756544f63bbeba016f75f3f037a03.patch -o /tmp/dbTimeout.patch RUN patch -p3 -ruN -d /usr/lib/python3.11/site-packages/bodhi < /tmp/dbTimeout.patch +# Hotfix for disabled DRPMs in F40 +RUN curl https://github.com/mattiaverga/bodhi/commit/7c1a32be013bfe529977c141e6b4206a6dfbb256.patch -o /tmp/dprms.patch +RUN patch -p3 -ruN -d /usr/lib/python3.11/site-packages/bodhi < /tmp/dprms.patch + # link the static files for a simpler httpd.conf RUN ln -s $(python3 -Ic "import sysconfig; print(sysconfig.get_path('purelib', 'rpm_prefix'))")/bodhi/server/static/ /srv/bodhi-static