.. _release_1.41:

fedpkg 1.41 Release Notes
=========================

Released on *August 25, 2021*

This release requires ``rpkg >= 1.63-1``.

Python compatibility
--------------------

fedpkg works with Python 2.7, 3.6 and 3.9

What's new in fedpkg 1.41
-------------------------

New commands for storing 'Pagure' and 'dist-git' tokens into fedpkg's configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A new commmands ``set-distgit-token`` and ``set-pagure-token`` were added.

It is still needed to request tokens manually (there is no accessible API for this operation) on the webpage (URL and information on how to select ACLs is provided in the help texts), but commands make the setting of tokens into fedpkg's configuration easier.
Valid tokens are needed for requesting new branches or repositories (Pagure token) and ``fork`` command (dist-git token).
Advertisement for these commands was added into failure messages when a token is missing or expired.

Add support for epel*-next branches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Default branches on different namespaces
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Changes after the migration from 'master' branches.
Default branches for namespaces:

 * 'rpms', 'container', 'modules' - branch 'rawhide'
 * 'flatpaks' - branch 'stable'
 * 'tests' - branch 'main'

New default dist-git branch: 'rawhide'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In some places we also reference main which will be a symlink to the rawhide branch and we currently still reference master to be backward compatible (even though once the rawhide branch appears the master branch will be removed and blocked).

Use rpkg layouts for rpmdefines and add default configuration for 'resultsdir'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Earlier, rpkg's layout mechanism was bypassed and rpmdefines were set in a fixed way by fedpkg. This breaks the new results dir feature from `#540`_
Rpmdefines are changed to be read from the selected layout here, including the new 'rpmfilename' layout property.

Rpkg added support for new configuration option 'resultsdir' in `[1]`_. 'results' directory is ignored by git by default, and 'resultsdir' option set of 'root', in order to preserve the current behaviour by default and make the new 'subdir' option opt-in.

Look for bug numbers in commit message instead of changelog
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This relates to rpmautospec feature.

Jenkins unittests run in docker container
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Prepared dockerfiles for creating a testing environment in containers. Two containers are prepared. The first for normal Python3 and the second one runs in CentOS 7. A tox configuration is customized for supported versions of Python. Minor syntax changes were done to silence flake8 in Python2.

Fedpkg update didn't read bug numbers from changelog
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes the regular expression by accepting whitespaces at the beginning of the pattern which finds bug numbers.

Bash completion changes
~~~~~~~~~~~~~~~~~~~~~~~
 * Added ``fork`` command to the bash completion
 * Added ``set-pagure-token`` and ``set-distgit-token`` to the bash completion
 * Added ``request-tests-repo`` command to the bash completion - 'request-tests-repo' method was hidden without completion and therefore 'request-repo' was often used instead. But for the 'tests' namespace it is not possible.
 * Added '--rpmlintconf' to ``lint`` command completion
 * Removed duplicated definition for ``lint``
 * Fixed completion of arches

Other small fixes
~~~~~~~~~~~~~~~~~
* Drop Python 2.6 support - removed Python 2.6 dependencies and mentions mostly from metadata and help files.
* Clone 'rawhide' branch with `clone -B`
* Deprecated argument ``--dist`` was been removed
* `request-tests-repo`: add empty 'upstreamurl' item - This was added to fit with fedscm-admin change.

Change Logs
-----------
- Look for bug number in commit message instead of changelog (zebob.m)
- Add default configuration for `resultsdir` (oturpe)
- Use rpkg layouts for rpmdefines (oturpe)
- Advertised set-x-token method in do_fork and set_pagure_issue - `#192`_ (jkunstle)
- Pagure / DistGit token config-file cli-interface - `#192`_ (jkunstle)
- Deprecated arguments --dist have been removed, and related tests have been updated. (abisoi)
- Add support for epel*-next branches (carl)
- Pagure token request - ACL specification - `#440`_ (jkunstle)
- request-tests-repo: add empty 'upstreamurl' item - `rhbz#1854987`_ (onosek)
- Jenkins unittests run in docker container (onosek)
- Drop Python 2.6 support (onosek)
- Bash completion for request-tests-repo - `#433`_ (onosek)
- Unittests for new default branches (onosek)
- Default branches on different namespaces - `#428`_ (mboddu)
- Clone rawhide branch with clone -B - `#427`_ (lsedlar)
- Fix completion of arches (lsedlar)
- Add --rpmlintconf to lint command completion (lsedlar)
- Remove duplicated definition for lint (lsedlar)
- Add fork to bash completion - `rhbz#1920997`_ (lsedlar)
- New default dist-git branch: rawhide - unittests (lsedlar)
- New default dist-git branch: rawhide (pingou)
- Fedpkg update didn't read bug numbers from changelog - `rhbz#1912555`_ (onosek)

.. _`#192`: https://pagure.io/fedpkg/issue/192
.. _`#440`: https://pagure.io/fedpkg/issue/440
.. _`rhbz#1854987`: https://bugzilla.redhat.com/show_bug.cgi?id=1854987
.. _`#433`: https://pagure.io/fedpkg/issue/433
.. _`#428`: https://pagure.io/fedpkg/issue/428
.. _`#427`: https://pagure.io/fedpkg/issue/427
.. _`rhbz#1920997`: https://bugzilla.redhat.com/show_bug.cgi?id=1920997
.. _`rhbz#1912555`: https://bugzilla.redhat.com/show_bug.cgi?id=1912555

.. _`#540`: https://pagure.io/rpkg/pull-request/540
.. _`[1]` : https://pagure.io/rpkg/c/89bc57df4f2dcc22004c3e412df3013b62b70ffb?branch=master