Small script written in Python that prints Fedora user access information parsed from the Fedora Pagure API. Licensed under GPLv3.
There is only Copr and manual installation process available at the moment.
- For Fedora you can use Copr builds.
# dnf copr enable panovotn/fedown
# dnf install fedown
- See the Copr repository for more information.
- The
~/.local/bindirectory needs to be included in yourPATHenvironment variable or replaced with one that is.
$ git clone https://github.com/UncleAlbie/fedown.git
$ cd fedown
$ cp fedown/fedown.py ~/.local/bin/fedown
$ chmod +x ~/.local/bin/fedown
To show the usage screen use parameter -h or --help.
$ fedown -h
Use fedown to query information for given repositories.
- With no extra parameters,
fedownprints owner for each given repository. The default namespace isrpms.
$ fedown REPOSITORY [REPOSITORY..]
-
For different Pagure access types use parameter
-tor--typeto specify the type. -
Available types:
ownerquery for owner access typeadminquery for admin access typecommitquery for commit access typeallquery for all access types above
$ fedown -t TYPE REPOSITORY [REPOSITORY..]
-
To query different namespace use parameter
-nor--namespaceto specify the namespace. -
Available namespaces:
rpmsquery for rpms namespacemodulesquery for modules namespacecontainersquery for containers namespacetestsquery for tests namespace
-
There is one special namespace
userswhich behaves differently from the namespaces above. See user query for more information.
$ fedown -n NAMESPACE REPOSITORY [REPOSITORY..]
- Replace
fakerepowith existing repository name.
$ fedown fakerepo
fakeowner
$ fedown -n tests -t admin fakerepo
fakeadmin01
fakeadmin02
fakeadmin03
Use fedown to query information for given users.
- To query access information for given users use parameter
-nor--namespaceto specify theusersnamespace.
$ fedown -n users USERNAME [USERNAME..]
- For other access type control use the
-tor--typeparameter the same way as with repo queries.
$ fedown -n users -t admin USERNAME [USERNAME..]
-
Option parameter
-For--include-forkscan be used to include forks in the listing. -
Option parameter
-Nor--names-onlycan be used to exclude repository namespace prefix from listing.
- Replace
fakeuserwith existing username.
$ fedown -n users fakeuser
rpms/fakerepo02
$ fedown -n users -F fakeuser
rpms/fakerepo02
forks/fakeuser/fakerepo01
forks/fakeuser/fakerepo03
$ fedown -n users -F -N fakeuser
fakerepo02
fakerepo01
fakerepo03
$ fedown -n users -t admin fakeuser
rpms/fakerepo03
rpms/fakerepo04
tests/fakerepo01
modules/fakerepo01
Some options to control the fedown output format are available.
- Option parameter
-Hor--human-readablecan be used to enable human readable ouput format.
$ fedown -H REPOSITORY [REPOSITORY..]
- Option parameter
-Cor--colorscan be used to enable colors (only works with-Hor--human-readable).
$ fedown -H -C REPOSITORY [REPOSITORY..]
Some options to control the fedown behaviour are available.
- By default
fedownquits on Pagure API request failure and prints error message tostderr. - Option parameter
-Sor--skip-on-failurecan be used to prevent quitting on Pagure API request failure.
$ fedown -S REPOSITORY [REPOSITORY..]
Recommended Bash aliases.
- Basic repository queries.
alias fo='fedown -S'
alias fousers='fedown -Sn users'- Basic repository queries (colored human readable).
alias foh='fedown -SHC'
alias fohusers='fedown -SHCFn users'- Query all information in human readable format.
alias foall='fedown -SHCt all'
alias foallusers='fedown -SHCFt all -n users'-
Repository owner query for requires based on
$PWD.- Requires current working directory name to be a rpms repository name
(eg.~/sources/pagure/fedora/rpms/fakerepoforfakerepoquery). - Works with the
rpmsnamespace. - Output format:
repository: owner - For requires in
rawhideadd--repo=rawhideoption argument to thednfcommand bellow.
- Requires current working directory name to be a rpms repository name
alias forequires='for dep in $(dnf -q repoquery --whatrequires ${PWD##*/} --qf "%{source_name}" | uniq); do echo "${dep}: $(fedown ${dep})"; done'