public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/fedpkg] 1.48-1: Backporting support for epel*-playground branch requests
Date: Mon, 10 Aug 2026 21:45:43 GMT	[thread overview]
Message-ID: <178639834343.1.11377008292298382597.rpms-fedpkg-b51af335356b@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/fedpkg
            Branch : 1.48-1
            Commit : b51af335356bbca9361a3c96f5027954798c7011
            Author : Ondřej Nosek <onosek@redhat.com>
            Date   : 2019-07-18T08:56:10+00:00
            Stats  : +100/-1 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/fedpkg/c/b51af335356bbca9361a3c96f5027954798c7011?branch=1.48-1

            Log:
            Backporting support for epel*-playground branch requests

Signed-off-by: Ondřej Nosek <onosek@redhat.com>

---
diff --git a/0002-Support-for-epel-playground-branch-requests.patch b/0002-Support-for-epel-playground-branch-requests.patch
new file mode 100644
index 0000000..7f07f0c
--- /dev/null
+++ b/0002-Support-for-epel-playground-branch-requests.patch
@@ -0,0 +1,68 @@
+From eabb5ae7dd0495f67b73d76137df78b84e2792ec Mon Sep 17 00:00:00 2001
+From: Mohan Boddu <mboddu@bhujji.com>
+Date: Tue, 9 Jul 2019 22:07:06 -0400
+Subject: [PATCH 1/2] Support for epel*-playground branch requests
+
+Fixes: #334
+JIRA: COMPOSE-3677
+Merges: https://pagure.io/fedpkg/pull-request/336
+
+Signed-off-by: Mohan Boddu <mboddu@bhujji.com>
+---
+ fedpkg/cli.py | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/fedpkg/cli.py b/fedpkg/cli.py
+index d7b0872..1732a22 100644
+--- a/fedpkg/cli.py
++++ b/fedpkg/cli.py
+@@ -904,10 +904,26 @@ targets to build the package for a particular stream.
+                                 'a git repository')
+ 
+         pdc_url = config.get('{0}.pdc'.format(name), 'url')
++        # When a 'epel\d' branch is requested, it should automatically request
++        # 'epel\d+-playground' branch.
++        epel_playground = False
++        epel_version = None
+         if branch:
++            # Check if the requested branch is an epel branch
++            match = re.match(r'^epel(?P<epel_version>\d+)$', branch)
++            if match:
++                epel_playground = True
++                epel_version = int(match.groupdict()["epel_version"])
++
+             if is_epel(branch):
+                 assert_valid_epel_package(repo_name, branch)
+ 
++            # Requesting epel\d-playground branches is not allowed
++            if bool(re.match(r'^epel\d+-playground$', branch)):
++                raise rpkgError(
++                    'You cannot directly request {0} branch, as they are '
++                    'created as part of epel branch requests'.format(branch))
++
+             if ns in ['modules', 'test-modules', 'flatpaks']:
+                 branch_valid = bool(re.match(r'^[a-zA-Z0-9.\-_+]+$', branch))
+                 if not branch_valid:
+@@ -941,6 +957,11 @@ targets to build the package for a particular stream.
+                 *list(get_release_branches(pdc_url).values())))
+             branches = [b for b in release_branches
+                         if re.match(r'^(f\d+)$', b)]
++        # If the requested branch is epel branch then also add epel\d+-playground branch
++        # to the request list.
++        # TODO: Remove the check for epel version >= 7 when we enable playground for epel7
++        elif epel_playground and epel_version >= 7:
++            branches = [branch, branch+"-playground"]
+         else:
+             branches = [branch]
+ 
+@@ -968,6 +989,7 @@ targets to build the package for a particular stream.
+             auto_module = (
+                 ns == 'rpms'
+                 and not re.match(RELEASE_BRANCH_REGEX, b)
++                and not epel_playground  # Dont run auto_module on epel requests
+                 and not no_auto_module
+             )
+             if auto_module:
+-- 
+2.20.1
+

diff --git a/0003-Allow-epel-playground-requests-for-epel8-and-newer.patch b/0003-Allow-epel-playground-requests-for-epel8-and-newer.patch
new file mode 100644
index 0000000..06c175d
--- /dev/null
+++ b/0003-Allow-epel-playground-requests-for-epel8-and-newer.patch
@@ -0,0 +1,26 @@
+From f97d06c785a837ed860a20660ac6344ec546802c Mon Sep 17 00:00:00 2001
+From: Ondrej Nosek <onosek@redhat.com>
+Date: Thu, 18 Jul 2019 10:01:27 +0200
+Subject: [PATCH 2/2] Allow epel*-playground requests for epel8 and newer
+
+Signed-off-by: Ondrej Nosek <onosek@redhat.com>
+---
+ fedpkg/cli.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fedpkg/cli.py b/fedpkg/cli.py
+index 1732a22..8e73f0f 100644
+--- a/fedpkg/cli.py
++++ b/fedpkg/cli.py
+@@ -960,7 +960,7 @@ targets to build the package for a particular stream.
+         # If the requested branch is epel branch then also add epel\d+-playground branch
+         # to the request list.
+         # TODO: Remove the check for epel version >= 7 when we enable playground for epel7
+-        elif epel_playground and epel_version >= 7:
++        elif epel_playground and epel_version >= 8:
+             branches = [branch, branch+"-playground"]
+         else:
+             branches = [branch]
+-- 
+2.20.1
+

diff --git a/fedpkg.spec b/fedpkg.spec
index b8c2ac5..2c2384c 100644
--- a/fedpkg.spec
+++ b/fedpkg.spec
@@ -5,7 +5,7 @@
 
 Name:           fedpkg
 Version:        1.37
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Fedora utility for working with dist-git
 
 License:        GPLv2+
@@ -14,6 +14,8 @@ Source0:        https://pagure.io/releases/fedpkg/%{name}-%{version}.tar.bz2
 
 BuildArch:      noarch
 Patch0:         0001-Bump-check-for-bodhi-client.patch
+Patch1:         0002-Support-for-epel-playground-branch-requests.patch
+Patch2:         0003-Allow-epel-playground-requests-for-epel8-and-newer.patch
 
 # fedpkg command switched to python3 on Fedora 29 and RHEL > 7:
 %if 0%{?fedora} > 28 || 0%{?rhel} > 7
@@ -164,6 +166,9 @@ nosetests
 
 
 %changelog
+* Thu Jul 18 2019 Ondřej Nosek <onosek@redhat.com> - 1.37-3
+- Backport: Support for epel*-playground branch requests
+
 * Fri May 31 2019 Ondřej Nosek <onosek@redhat.com> - 1.37-2
 - Backport: Bump check for bodhi client (version 4)
 

                 reply	other threads:[~2026-08-10 21:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178639834343.1.11377008292298382597.rpms-fedpkg-b51af335356b@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox