public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/fedpkg] 1.48-1: Patch: Default branches on different namespaces
Date: Mon, 10 Aug 2026 21:45:57 GMT	[thread overview]
Message-ID: <178639835751.1.309454306623149560.rpms-fedpkg-5b2131f49d8e@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/fedpkg
            Branch : 1.48-1
            Commit : 5b2131f49d8e5df47a2ece1c0009f615e2c8b89c
            Author : Ondřej Nosek <onosek@redhat.com>
            Date   : 2021-03-01T23:43:24+00:00
            Stats  : +278/-5 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/fedpkg/c/5b2131f49d8e5df47a2ece1c0009f615e2c8b89c?branch=1.48-1

            Log:
            Patch: Default branches on different namespaces

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

---
diff --git a/0006-Default-branches-on-different-namespaces.patch b/0006-Default-branches-on-different-namespaces.patch
new file mode 100644
index 0000000..3bcd4a8
--- /dev/null
+++ b/0006-Default-branches-on-different-namespaces.patch
@@ -0,0 +1,99 @@
+From f9530a420b255ad7ef8e228c77191312ffd16d54 Mon Sep 17 00:00:00 2001
+From: Mohan Boddu <mboddu@bhujji.com>
+Date: Wed, 24 Feb 2021 12:24:56 -0500
+Subject: [PATCH 1/2] Default branches on different namespaces
+
+Changes after the migration from 'master' branches.
+Default branches for namespaces:
+ * 'rpms', 'container', 'modules' - branch 'rawhide'
+ * 'flatpaks'  - 'stable'
+ * 'tests' - 'main'
+
+Fixes: #428
+JIRA: RHELCMP-4161
+Merges: https://pagure.io/fedpkg/pull-request/430
+
+Signed-off-by: Mohan Boddu <mboddu@bhujji.com>
+---
+ fedpkg/__init__.py | 6 +++---
+ fedpkg/cli.py      | 5 ++++-
+ fedpkg/utils.py    | 4 ++--
+ 3 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/fedpkg/__init__.py b/fedpkg/__init__.py
+index 2ec2d6e..155b6d7 100644
+--- a/fedpkg/__init__.py
++++ b/fedpkg/__init__.py
+@@ -169,7 +169,7 @@ class Commands(pyrpkg.Commands):
+                 "--define 'rhel %s'" % macros['rhel'],
+             ]
+         # rawhide (previously master branch)
+-        elif re.match(r'(master|rawhide|main)$', self.branch_merge):
++        elif re.match(r'(rawhide|main)$', self.branch_merge):
+             self._distval = self._findrawhidebranch()
+             self._distvar = 'fedora'
+             self._disttag = 'fc%s' % self._distval
+@@ -204,13 +204,13 @@ class Commands(pyrpkg.Commands):
+             self._rpmdefines.extend(extra_rpmdefines)
+ 
+     def build_target(self, release):
+-        if release in ('rawhide', 'main', 'master'):
++        if release in ('rawhide', 'main'):
+             return 'rawhide'
+         else:
+             return '%s-candidate' % release
+ 
+     def load_container_build_target(self):
+-        if self.branch_merge in ('rawhide', 'main', 'master'):
++        if self.branch_merge in ('rawhide', 'main'):
+             self._container_build_target = 'rawhide-%s-candidate' % self.ns
+         else:
+             super(Commands, self).load_container_build_target()
+diff --git a/fedpkg/cli.py b/fedpkg/cli.py
+index 1d790ee..406151f 100644
+--- a/fedpkg/cli.py
++++ b/fedpkg/cli.py
+@@ -912,7 +912,7 @@ class fedpkgClient(cliClient):
+ 
+             ticket_body = {
+                 'action': 'new_repo',
+-                'branch': 'rawhide',
++                'branch': 'main',
+                 'bug_id': bug or '',
+                 'monitor': 'no-monitoring',
+                 'namespace': 'tests',
+@@ -920,6 +920,9 @@ class fedpkgClient(cliClient):
+                 'description': description,
+             }
+         else:
++            # Default branch is rawhide, but for flatpaks namespace its 'stable'
++            if ns == 'flatpaks':
++                branch = 'stable'
+             ticket_body = {
+                 'action': 'new_repo',
+                 'branch': branch,
+diff --git a/fedpkg/utils.py b/fedpkg/utils.py
+index 6bf3d0a..046ead3 100644
+--- a/fedpkg/utils.py
++++ b/fedpkg/utils.py
+@@ -436,7 +436,7 @@ def get_stream_branches(server_url, package_name):
+     # should be ok to remove if from this list.
+     stream_branches = []
+     for item in branches:
+-        if item['name'] in ('master', 'rawhide', 'main'):
++        if item['name'] in ('rawhide', 'main'):
+             continue
+         elif re.match(r'^(f|el)\d+$', item['name']):
+             continue
+@@ -469,7 +469,7 @@ def expand_release(rel, active_releases):
+         returned from `get_release_branches`.
+     :return: list of releases, for example ``[f28]``, or ``[el6, epel7]``.
+     """
+-    if rel in ('master', 'rawhide', 'main'):
++    if rel in ('rawhide', 'main'):
+         return ['rawhide']
+     elif rel == 'fedora':
+         return active_releases['fedora']
+-- 
+2.29.2
+

diff --git a/0007-Unittests-for-new-default-branches.patch b/0007-Unittests-for-new-default-branches.patch
new file mode 100644
index 0000000..df8b697
--- /dev/null
+++ b/0007-Unittests-for-new-default-branches.patch
@@ -0,0 +1,169 @@
+From a04ee35c6db7979792ce3a59071b7446c77b98f9 Mon Sep 17 00:00:00 2001
+From: Ondrej Nosek <onosek@redhat.com>
+Date: Tue, 2 Mar 2021 00:18:49 +0100
+Subject: [PATCH 2/2] Unittests for new default branches
+
+Signed-off-by: Ondrej Nosek <onosek@redhat.com>
+---
+ test/fedpkg-stage.conf |  2 +-
+ test/fedpkg-test.conf  |  2 +-
+ test/test_cli.py       |  4 ++--
+ test/test_commands.py  | 12 ++++++------
+ test/test_retire.py    |  8 ++++----
+ test/test_utils.py     |  6 +++---
+ 6 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/test/fedpkg-stage.conf b/test/fedpkg-stage.conf
+index 2f52251..49089c4 100644
+--- a/test/fedpkg-stage.conf
++++ b/test/fedpkg-stage.conf
+@@ -4,7 +4,7 @@ gitbaseurl = ssh://%(user)s@pkgs.stg.example.com/%(repo)s
+ lookaside_cgi = https://pkgs.stg.example.com/repo/pkgs/upload.cgi
+ lookasidehash = sha512
+ lookaside = http://pkgs.stg.example.com/repo/pkgs
+-branchre = f\d$|f\d\d$|el\d$|olpc\d$|master$
++branchre = f\d$|f\d\d$|el\d$|olpc\d$|rawhide$
+ kojiprofile = koji
+ build_client = koji
+ distgit_namespaced = True
+diff --git a/test/fedpkg-test.conf b/test/fedpkg-test.conf
+index 9559288..6774f31 100644
+--- a/test/fedpkg-test.conf
++++ b/test/fedpkg-test.conf
+@@ -4,7 +4,7 @@ gitbaseurl = ssh://%(user)s@pkgs.example.com/%(repo)s
+ lookaside_cgi = https://pkgs.example.com/repo/pkgs/upload.cgi
+ lookasidehash = sha512
+ lookaside = http://pkgs.example.com/repo/pkgs
+-branchre = f\d$|f\d\d$|el\d$|olpc\d$|master$
++branchre = f\d$|f\d\d$|el\d$|olpc\d$|rawhide$
+ kojiprofile = koji
+ build_client = koji
+ distgit_namespaced = True
+diff --git a/test/test_cli.py b/test/test_cli.py
+index a20357f..4327990 100644
+--- a/test/test_cli.py
++++ b/test/test_cli.py
+@@ -1481,7 +1481,7 @@ class TestRequestTestsRepo(CliTestCase):
+ 
+         expected_issue_content = {
+             'action': 'new_repo',
+-            'branch': 'rawhide',
++            'branch': 'main',
+             'bug_id': '',
+             'monitor': 'no-monitoring',
+             'namespace': 'tests',
+@@ -2153,7 +2153,7 @@ class TestReadReleasesFromLocalConfig(CliTestCase):
+         self.package_cfg = os.path.join(self.cloned_repo_path,
+                                         fedpkg.cli.LOCAL_PACKAGE_CONFIG)
+         self.write_file(self.package_cfg,
+-                        content='[koji]\ntargets=master f28 fedora epel')
++                        content='[koji]\ntargets=rawhide f28 fedora epel')
+ 
+     @patch('os.path.exists', return_value=False)
+     def test_no_config_file_is_create(self, exists):
+diff --git a/test/test_commands.py b/test/test_commands.py
+index c45d251..0c1a77d 100644
+--- a/test/test_commands.py
++++ b/test/test_commands.py
+@@ -68,8 +68,8 @@ class TestLoadTarget(CommandTestCase):
+         self.cmd = self.make_commands()
+ 
+     @patch('pyrpkg.Commands.branch_merge', new_callable=PropertyMock)
+-    def test_load_from_master(self, branch_merge):
+-        branch_merge.return_value = 'master'
++    def test_load_from_rawhide(self, branch_merge):
++        branch_merge.return_value = 'rawhide'
+ 
+         self.cmd.load_target()
+         self.assertEqual('rawhide', self.cmd._target)
+@@ -91,9 +91,9 @@ class TestLoadContainerBuildTarget(CommandTestCase):
+ 
+     @patch('pyrpkg.Commands.branch_merge', new_callable=PropertyMock)
+     @patch('pyrpkg.Commands.ns', new_callable=PropertyMock)
+-    def test_load_from_master(self, ns, branch_merge):
++    def test_load_from_rawhide(self, ns, branch_merge):
+         ns.return_value = 'container'
+-        branch_merge.return_value = 'master'
++        branch_merge.return_value = 'rawhide'
+ 
+         self.cmd.load_container_build_target()
+         self.assertEqual('rawhide-container-candidate',
+@@ -263,9 +263,9 @@ class TestLoadRpmDefines(CommandTestCase):
+ 
+     @patch('pyrpkg.Commands.branch_merge', new_callable=PropertyMock)
+     @patch('fedpkg.Commands._findrawhidebranch')
+-    def test_load_master_dist_tag(self, _findrawhidebranch, branch_merge):
++    def test_load_rawhide_dist_tag(self, _findrawhidebranch, branch_merge):
+         _findrawhidebranch.return_value = '28'
+-        branch_merge.return_value = 'master'
++        branch_merge.return_value = 'rawhide'
+ 
+         self.cmd.load_rpmdefines()
+ 
+diff --git a/test/test_retire.py b/test/test_retire.py
+index f6b40cc..db30e13 100644
+--- a/test/test_retire.py
++++ b/test/test_retire.py
+@@ -75,7 +75,7 @@ class RetireTestCase(unittest.TestCase):
+     @mock.patch("requests.get", new=lambda *args, **kwargs: mock.Mock(status_code=404))
+     def test_retire_with_namespace(self):
+         self._setup_repo('ssh://git@pkgs.example.com/rpms/fedpkg')
+-        args = ['fedpkg', '--dist=master', 'retire', 'my reason']
++        args = ['fedpkg', '--dist=rawhide', 'retire', 'my reason']
+ 
+         client = self._fake_client(args)
+         client.retire()
+@@ -86,7 +86,7 @@ class RetireTestCase(unittest.TestCase):
+     @mock.patch("requests.get", new=lambda *args, **kwargs: mock.Mock(status_code=404))
+     def test_retire_without_namespace(self):
+         self._setup_repo('ssh://git@pkgs.example.com/fedpkg')
+-        args = ['fedpkg', '--dist=master', 'retire', 'my reason']
++        args = ['fedpkg', '--dist=rawhide', 'retire', 'my reason']
+ 
+         client = self._fake_client(args)
+         client.retire()
+@@ -100,7 +100,7 @@ class RetireTestCase(unittest.TestCase):
+         with open(os.path.join(self.tmpdir, 'dead.package'), 'w') as f:
+             f.write('dead package')
+ 
+-        args = ['fedpkg', '--release=master', 'retire', 'my reason']
++        args = ['fedpkg', '--release=rawhide', 'retire', 'my reason']
+         client = self._fake_client(args)
+         client.log = mock.Mock()
+         client.retire()
+@@ -116,7 +116,7 @@ class RetireTestCase(unittest.TestCase):
+     )
+     def test_package_on_retired(self):
+         self._setup_repo("ssh://git@pkgs.example.com/fedpkg")
+-        args = ["fedpkg", "--dist=master", "retire", "my reason"]
++        args = ["fedpkg", "--dist=rawhide", "retire", "my reason"]
+ 
+         client = self._fake_client(args)
+         client.retire()
+diff --git a/test/test_utils.py b/test/test_utils.py
+index 939f60b..96ad3a1 100644
+--- a/test/test_utils.py
++++ b/test/test_utils.py
+@@ -474,7 +474,7 @@ class TestGetStreamBranches(unittest.TestCase):
+                 {'name': '10'},
+                 {'name': 'f28'},
+                 {'name': 'epel7'},
+-                {'name': 'master'},
++                {'name': 'rawhide'},
+                 {'name': 'epel8'},
+                 {'name': 'epel8-playground'}
+             ],
+@@ -503,8 +503,8 @@ class TestExpandRelease(unittest.TestCase):
+         result = utils.expand_release('epel', self.releases)
+         self.assertEqual(self.releases['epel'], result)
+ 
+-    def test_expand_master(self):
+-        result = utils.expand_release('master', self.releases)
++    def test_expand_main(self):
++        result = utils.expand_release('main', self.releases)
+         self.assertEqual(['rawhide'], result)
+ 
+     def test_expand_rawhide(self):
+-- 
+2.29.2
+

diff --git a/fedpkg.spec b/fedpkg.spec
index c7ecdbe..d16bdf8 100644
--- a/fedpkg.spec
+++ b/fedpkg.spec
@@ -5,7 +5,7 @@
 
 Name:           fedpkg
 Version:        1.40
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Fedora utility for working with dist-git
 
 License:        GPLv2+
@@ -18,6 +18,8 @@ Patch2:         0002-Fedpkg-update-didn-t-read-bug-numbers-from-changelog.patch
 Patch3:         0003-New-default-dist-git-branch-rawhide.patch
 Patch4:         0004-New-default-dist-git-branch-rawhide-unittests.patch
 Patch5:         0005-Clone-rawhide-branch-with-clone-B.patch
+Patch6:         0006-Default-branches-on-different-namespaces.patch
+Patch7:         0007-Unittests-for-new-default-branches.patch
 
 # RHEL7 is currently the only release that is built for Python 2.
 %if 0%{?fedora} || 0%{?rhel} > 7
@@ -40,7 +42,7 @@ Requires:       redhat-rpm-config
 
 BuildRequires:  python2-devel
 # We br these things for man page generation due to imports
-BuildRequires:  python2-rpkg >= 1.62-1
+BuildRequires:  python2-rpkg >= 1.62-3
 BuildRequires:  python2-distro
 BuildRequires:  python2-fedora
 # For testing
@@ -54,7 +56,7 @@ BuildRequires:  python-bugzilla
 
 Requires:       bodhi-client >= 2.0
 Requires:       python-bugzilla
-Requires:       python2-rpkg >= 1.62-1
+Requires:       python2-rpkg >= 1.62-3
 Requires:       python2-distro
 Requires:       python2-fedora
 Requires:       python2-openidc-client >= 0.6.0
@@ -65,7 +67,7 @@ Requires:       python2-openidc-client >= 0.6.0
 %global __python %{__python3}
 
 BuildRequires:  python3-devel
-BuildRequires:  python3-rpkg >= 1.62-1
+BuildRequires:  python3-rpkg >= 1.62-3
 BuildRequires:  python3-distro
 BuildRequires:  python3-fedora
 # For testing
@@ -78,7 +80,7 @@ BuildRequires:  python3-bodhi-client
 
 
 Requires:       python3-bugzilla
-Requires:       python3-rpkg >= 1.62-1
+Requires:       python3-rpkg >= 1.62-3
 Requires:       python3-distro
 Requires:       python3-fedora
 Requires:       python3-openidc-client >= 0.6.0
@@ -147,6 +149,9 @@ mv %{buildroot}%{compdir}/fedpkg.bash %{buildroot}%{compdir}/fedpkg
 
 
 %changelog
+* Mon Mar 01 2021 Ondřej Nosek <onosek@redhat.com> - 1.40-5
+- Patch: Default branches on different namespaces
+
 * Wed Feb 03 2021 Ondřej Nosek <onosek@redhat.com> - 1.40-4
 - Patch: Clone rawhide branch with clone -B
 

                 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=178639835751.1.309454306623149560.rpms-fedpkg-5b2131f49d8e@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