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/bin
directory needs to be included in yourPATH
environment 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,
fedown
prints owner for each given repository. The default namespace isrpms
.
$ fedown REPOSITORY [REPOSITORY..]
-
For different Pagure access types use parameter
-t
or--type
to specify the type. -
Available types:
owner
query for owner access typeadmin
query for admin access typecommit
query for commit access typeall
query for all access types above
$ fedown -t TYPE REPOSITORY [REPOSITORY..]
-
To query different namespace use parameter
-n
or--namespace
to specify the namespace. -
Available namespaces:
rpms
query for rpms namespacemodules
query for modules namespacecontainers
query for containers namespacetests
query for tests namespace
-
There is one special namespace
users
which behaves differently from the namespaces above. See user query for more information.
$ fedown -n NAMESPACE REPOSITORY [REPOSITORY..]
- Replace
fakerepo
with 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
-n
or--namespace
to specify theusers
namespace.
$ fedown -n users USERNAME [USERNAME..]
- For other access type control use the
-t
or--type
parameter the same way as with repo queries.
$ fedown -n users -t admin USERNAME [USERNAME..]
-
Option parameter
-F
or--include-forks
can be used to include forks in the listing. -
Option parameter
-N
or--names-only
can be used to exclude repository namespace prefix from listing.
- Replace
fakeuser
with 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
-H
or--human-readable
can be used to enable human readable ouput format.
$ fedown -H REPOSITORY [REPOSITORY..]
- Option parameter
-C
or--colors
can be used to enable colors (only works with-H
or--human-readable
).
$ fedown -H -C REPOSITORY [REPOSITORY..]
Some options to control the fedown
behaviour are available.
- By default
fedown
quits on Pagure API request failure and prints error message tostderr
. - Option parameter
-S
or--skip-on-failure
can 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/fakerepo
forfakerepo
query). - Works with the
rpms
namespace. - Output format:
repository: owner
- For requires in
rawhide
add--repo=rawhide
option argument to thednf
command 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'