Add a script to "retire" a packager #9633

Merged
jnsamyak merged 2 commits from master into master 2026-06-08 03:11:32 +00:00
Contributor

Basically, this script lists who maintains what and if given the
--retire argument, it will orphan all the packages for which the
packager(s) is/are main admin, it will remove the ACL for the
packager(s) on packages they have commit on and will reset their watch
status for everything they watch.

This script can be used when someone goes MIA and we want to mass-orphan
their packages. It can also be used when an account no longer has a valid
bugzilla account associated with their email in FAS.

Finally, the script can also only lists/acts on packages the packagers
maintain (via the --maintain argument) or only packages they watch
(via the --watch argument). Allowing to better tune the action
performed.

The second commit removes the who_maintains_what script whose
functionality is included in distgit/retire_packagers.py.

Basically, this script lists who maintains what and if given the ``--retire`` argument, it will orphan all the packages for which the packager(s) is/are main admin, it will remove the ACL for the packager(s) on packages they have commit on and will reset their watch status for everything they watch. This script can be used when someone goes MIA and we want to mass-orphan their packages. It can also be used when an account no longer has a valid bugzilla account associated with their email in FAS. Finally, the script can also only lists/acts on packages the packagers maintain (via the ``--maintain`` argument) or only packages they watch (via the ``--watch`` argument). Allowing to better tune the action performed. The second commit removes the ``who_maintains_what`` script whose functionality is included in ``distgit/retire_packagers.py``.
Author
Contributor

rebased onto e221c00412aac2f79666df1c4a5d3553bad7e2ef

rebased onto e221c00412aac2f79666df1c4a5d3553bad7e2ef
Author
Contributor

rebased onto 0a2f00ae2b2674c22cbe9fb26c46d556beea9654

rebased onto 0a2f00ae2b2674c22cbe9fb26c46d556beea9654
Author
Contributor

rebased onto 967a3a582f

rebased onto 967a3a582fdd527e90d4b9477198dc905e8185c6
Contributor
$ python retire_packagers.py pingou
pingou is main admin of rpms/R2spec
pingou is watching rpms/bzr-fastimport
pingou is main admin of rpms/dummy-test-package-crested
pingou is main admin of rpms/dummy-test-package-gloster
pingou is main admin of rpms/dummy-test-package-rubino
pingou is main admin of rpms/fedora-gather-easyfix
pingou is maintainer of rpms/fedora-review
pingou is maintainer of rpms/geany
Retrying (Retry(total=4, connect=5, read=4, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /api/0/rpms/geany-plugins
pingou is maintainer of rpms/geany-plugins
pingou is watching rpms/geanyvc
pingou is main admin of rpms/guake
pingou is maintainer of rpms/homebank
pingou is watching rpms/libdivecomputer
Retrying (Retry(total=4, connect=5, read=4, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /api/0/rpms/maven-resources-plugin
pingou is maintainer of rpms/maven-resources-plugin
pingou is maintainer of rpms/mirrormanager
pingou is main admin of rpms/pagure
pingou is main admin of rpms/pagure-dist-git
pingou is maintainer of rpms/pass
pingou is main admin of rpms/primer3
pingou is maintainer of rpms/python-GeoIP
pingou is main admin of rpms/python-arrow
pingou is main admin of rpms/python-bcrypt
pingou is maintainer of rpms/python-billiard
pingou is main admin of rpms/python-binaryornot
pingou is maintainer of rpms/python-case
pingou is maintainer of rpms/python-celery
pingou is maintainer of rpms/python-chai
pingou is main admin of rpms/python-contextlib2
pingou is main admin of rpms/python-flask-multistatic
pingou is main admin of rpms/python-flask-wtf
pingou is main admin of rpms/python-flask-xml-rpc
pingou is maintainer of rpms/python-grokmirror
pingou is maintainer of rpms/python-hypothesis
pingou is maintainer of rpms/python-igraph
pingou is maintainer of rpms/python-kitchen
pingou is maintainer of rpms/python-kombu
pingou is maintainer of rpms/python-nose-cover3
pingou is maintainer of rpms/python-pygit2
pingou is maintainer of rpms/python-rdflib
pingou is main admin of rpms/python-schema
pingou is main admin of rpms/python-sqlalchemy-utils
pingou is main admin of rpms/python-straight-plugin
pingou is main admin of rpms/python-summershum
pingou is main admin of rpms/python-trollius-redis
pingou is maintainer of rpms/python-vine
pingou is main admin of rpms/python-vobject
pingou is main admin of rpms/python-watchdog
pingou is maintainer of rpms/python-wtforms
pingou is maintainer of rpms/python-xlrd
pingou is watching rpms/repo_manager

``` $ python retire_packagers.py pingou pingou is main admin of rpms/R2spec pingou is watching rpms/bzr-fastimport pingou is main admin of rpms/dummy-test-package-crested pingou is main admin of rpms/dummy-test-package-gloster pingou is main admin of rpms/dummy-test-package-rubino pingou is main admin of rpms/fedora-gather-easyfix pingou is maintainer of rpms/fedora-review pingou is maintainer of rpms/geany Retrying (Retry(total=4, connect=5, read=4, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /api/0/rpms/geany-plugins pingou is maintainer of rpms/geany-plugins pingou is watching rpms/geanyvc pingou is main admin of rpms/guake pingou is maintainer of rpms/homebank pingou is watching rpms/libdivecomputer Retrying (Retry(total=4, connect=5, read=4, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /api/0/rpms/maven-resources-plugin pingou is maintainer of rpms/maven-resources-plugin pingou is maintainer of rpms/mirrormanager pingou is main admin of rpms/pagure pingou is main admin of rpms/pagure-dist-git pingou is maintainer of rpms/pass pingou is main admin of rpms/primer3 pingou is maintainer of rpms/python-GeoIP pingou is main admin of rpms/python-arrow pingou is main admin of rpms/python-bcrypt pingou is maintainer of rpms/python-billiard pingou is main admin of rpms/python-binaryornot pingou is maintainer of rpms/python-case pingou is maintainer of rpms/python-celery pingou is maintainer of rpms/python-chai pingou is main admin of rpms/python-contextlib2 pingou is main admin of rpms/python-flask-multistatic pingou is main admin of rpms/python-flask-wtf pingou is main admin of rpms/python-flask-xml-rpc pingou is maintainer of rpms/python-grokmirror pingou is maintainer of rpms/python-hypothesis pingou is maintainer of rpms/python-igraph pingou is maintainer of rpms/python-kitchen pingou is maintainer of rpms/python-kombu pingou is maintainer of rpms/python-nose-cover3 pingou is maintainer of rpms/python-pygit2 pingou is maintainer of rpms/python-rdflib pingou is main admin of rpms/python-schema pingou is main admin of rpms/python-sqlalchemy-utils pingou is main admin of rpms/python-straight-plugin pingou is main admin of rpms/python-summershum pingou is main admin of rpms/python-trollius-redis pingou is maintainer of rpms/python-vine pingou is main admin of rpms/python-vobject pingou is main admin of rpms/python-watchdog pingou is maintainer of rpms/python-wtforms pingou is maintainer of rpms/python-xlrd pingou is watching rpms/repo_manager ```
Owner

LGTM

LGTM
Owner

Pull-Request has been merged by humaton

Pull-Request has been merged by humaton
Owner

@churchyard hm, is that a problem? My understanding is that this is pagure API behavior.

@churchyard hm, is that a problem? My understanding is that this is pagure API behavior.
Contributor

I am testing this further. Could the token be read from a "standard" location? AFAIK give-package.py reads it from ~/.config/fedscm-admin/config.ini somehow.

I am testing this further. Could the token be read from a "standard" location? AFAIK `give-package.py` reads it from `~/.config/fedscm-admin/config.ini` somehow.
Contributor

I assume this is a missing scope problem?

$ PAGURE_TOKEN=... python retire_packagers.py --from-file nonresponsives --retire
avesh is maintainer of rpms/ima-evm-utils
**** REQUEST FAILED
  - Remove ACL
https://src.fedoraproject.org/rpms/ima-evm-utils/git/modifyacls
{'user_type': 'user', 'name': 'avesh'}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>

  avesh is no longer watching rpms/ima-evm-utils
avesh is maintainer of rpms/libtnc
**** REQUEST FAILED
  - Remove ACL
https://src.fedoraproject.org/rpms/libtnc/git/modifyacls
{'user_type': 'user', 'name': 'avesh'}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>

  avesh is no longer watching rpms/libtnc
avesh is watching rpms/openpts
  avesh is no longer watching rpms/openpts
avesh is watching rpms/openswan
I assume this is a missing scope problem? ``` $ PAGURE_TOKEN=... python retire_packagers.py --from-file nonresponsives --retire avesh is maintainer of rpms/ima-evm-utils **** REQUEST FAILED - Remove ACL https://src.fedoraproject.org/rpms/ima-evm-utils/git/modifyacls {'user_type': 'user', 'name': 'avesh'} <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>404 Not Found</title> <h1>Not Found</h1> <p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p> avesh is no longer watching rpms/ima-evm-utils avesh is maintainer of rpms/libtnc **** REQUEST FAILED - Remove ACL https://src.fedoraproject.org/rpms/libtnc/git/modifyacls {'user_type': 'user', 'name': 'avesh'} <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>404 Not Found</title> <h1>Not Found</h1> <p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p> avesh is no longer watching rpms/libtnc avesh is watching rpms/openpts avesh is no longer watching rpms/openpts avesh is watching rpms/openswan ```
Contributor

OTOH, the token has "Modify an existing project" ACL.

OTOH, the token has "Modify an existing project" ACL.
Author
Contributor
$ PAGURE_TOKEN=... python retire_packagers.py --from-file nonresponsives --retire
avesh is maintainer of rpms/ima-evm-utils
**** REQUEST FAILED
  - Remove ACL

I actually fixed this in a subsequent push, the version that has been merged shouldn't have this problem

```` $ PAGURE_TOKEN=... python retire_packagers.py --from-file nonresponsives --retire avesh is maintainer of rpms/ima-evm-utils **** REQUEST FAILED - Remove ACL ```` I actually fixed this in a subsequent push, the version that has been merged shouldn't have this problem
Author
Contributor

I actually fixed this in a subsequent push, the version that has been merged shouldn't have this problem

Apparently nope, submitting a new PR for this

> I actually fixed this in a subsequent push, the version that has been merged shouldn't have this problem Apparently nope, submitting a new PR for this
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
releng/tickets!9633
No description provided.