fedpkg 1.45 Release Notes

Released on June 26, 2024

This release requires rpkg >= 1.67-1. rpkg-1.67 release notes

Python compatibility

fedpkg works with Python 3.6, 3.9, and 3.12

What’s new in fedpkg 1.45

Not everything is actually new. The next description covers changes since last 1.44 release. Since then some of features/fixes were already released as patches.

Remove Python 2.7 support

Currently, the only supported release that uses Python 2.7 is epel7 which is ending by the end of June (as per #238). Therefore I removing the support for this old Python version. Code will stay as it is for now, only modifying scripts and configurations for testing and other Python 2 mentions. This also means that future code changes can break Python 2 compatibility.

Remove pdc calls, use bodhi instead

Since PDC is going to be dismissed, all existing PDC queries should be removed and replaced with appropriate calls to the Bodhi API or distgit API.

More information: #535, #537

Allow package.cfg on rawhide/main branch

Certain packages (such as fwupd and grub2) cannot be auto-rebuilt for Fedora ELN due to signing requirements. They have to be built manually by one of the short list of people that have the correct privilege. It’s easy to forget to build for both releases, so it would be ideal if we could instead allow them to carry a package.cfg file on the Rawhide branch that would result in fedpkg build building for both Rawhide and ELN at the same time.

This patch leaves in place the check for release branches (f40, f39, etc.) so that the presence of the package.cfg will not have an effect once Rawhide is branched.

Methods for setting API tokens use getpass

The methods set-distgit-token, set-pagure-token originally accepted a token as a command-line argument and this wasn’t a sane approach. Now the token is safely put via getpass method.

Also the code was moved to a shared place in rpkg because other tool uses it too.

disable-monitoring: run manually only

In the past, after the retire function, disable-monitoring was executed automatically. This functionality wasn’t clear for users. Now only a manual run is possible.

Also, more description was added to disable-monitoring –help page. It should prevent confusion when the operation fails (most likely because of a missing token or token with a lower ACL).

Remove epel-playground support

EPEL Playground has been shut down in January 2022. Thus, carrying support for it only needlessly complicates the codebase. Remove all support and test cases for EPEL Playground.

fedpkg update: add option --severity

So far –severity was present only in a template and had to be uncommented in case of a security update. Now the update subcommand has this option with ‘unspecified’ as a default value.

Allow fetching release from branch basename

In case fetching release information from the whole branch fails, retry with just part of branch name delimited by ‘-’. This should allow branches like rawhide-staging or f38-bz1234 to be recognized as a supported staging branches.

Those are expected to be non-production, feature-only branches. It should not allow to build these branches as a production build.

Lookaside cache operations retries

Both upload and download network operations might fail and in this case, a retry mechanism was implemented.

In case of failure, there is a delay and another attempt(s).

Delays are increasing with every attempt. A new key ‘lookaside_attempts’ in the configuration is there to parameterize such behavior. It expresses a maximum number of attempts to try the operation. Without this key, fedpkg will work the same as before = single attempt.

Values ‘lookaside_attempts = 1’ or ‘lookaside_attempts = 0’ effectively disable retries too.

The second new key ‘lookaside_delay’ is the initial delay (in seconds) between attempts that is doubled with each iteration.

Improve invalid branch name error message

Currently, if the resolved release name does not match any supported pattern (‘rawhide’, ‘f38’ or so), the following error is printed:

(foo) $ fedpkg prep
Could not execute prep: Could not find the release/dist from branch name foo
Please specify with --release

This is fine when the current Git branch name was used when resolving the release. However, the exact same error is printed even if the ‘–release’ option was used, like this:

$ fedpkg --release foo prep
Could not execute prep: Could not find the release/dist from branch name foo
Please specify with --release

The error message is split into two cases depending on if –release was used (detected by checking if ‘self.dist’ is truthy):

(foo) $ fedpkg prep
Could not execute prep: Could not find release from branch name 'foo'. Please specify with --release.
$ fedpkg --release foo prep
Could not execute prep: Invalid release 'foo'.

Update docker image for Jenkinks tests

Regenerate the docker image: Fedora 33 –> Fedora 37.

With the newer image, it appeared some files were missing in the ‘MANIFEST.in’.

Jenkinsfile as a pipeline script is unified with rpkg.

Other small fixes

  • Fix datetime.utcnow deprecation warning

  • Fix tests on Python 3.12 by fixing pkg_resources dependency

  • Update docker image for Jenkinks tests - Regenerate the docker image: Fedora 37 –> Fedora 39.

  • Update the sendemail.to Fedora email addresses - EmailAliases

  • check_branch: Fix backwards error message. When the user requests a branch that matches the branch regex, but is not active, the error message was backwards.

  • Fix flake8 complaints

  • fix: change changelog link

  • Update link to the ‘Share Test Code’ documentation.

  • Corrected the description of –namespace.

  • Fix unittests after –path argument is validated

  • Remove unused arches from completion

Change Logs

  • Allow package.cfg on rawhide/main branch (sgallagh)

  • Fix datetime.utcnow deprecation warning (dherrera)

  • Remove Python 2.7 support (onosek)

  • Fix tests on Python 3.12 by fixing pkg_resources dependency (dherrera)

  • Remove traces of PDC in docstrings (lsegura)

  • Remove function get_sl_type, no longer needed (lsegura)

  • Remove pdc calls, use bodhi instead (lsegura)

  • Update docker image for Jenkinks tests (onosek)

  • Methods for setting API tokens use getpass - rhbz#2089694 (onosek)

  • Update the sendemail.to Fedora email addresses (miro)

  • Remove epel-playground support (otto.liljalaakso)

  • disable-monitoring: run manually only (onosek)

  • fedpkg update: add option –severity (onosek)

  • Allow fetching release from branch basename (pemensik)

  • Lookaside cache operations retries (onosek)

  • check_branch: Fix backwards error message (otaylor)

  • Fix flake8 complaints (onosek)

  • fix: change changelog link (amedvede)

  • Update link to the Share Test Code documentation (psplicha)

  • Corrected the description of –namespace. (Bjorn)

  • Improve invalid branch name error message (otto.liljalaakso)

  • Fix unittests after ‘–path’ argument is validated (onosek)

  • Remove unused arches from completion (mikel)

  • Update docker image for Jenkinks tests (onosek)