Metadata-Version: 2.1
Name: repoaudit
Version: 0.2.1
Summary: CLI to validate yum/apt repositories
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: python-debian (>=0.1.44,<0.2.0)
Requires-Dist: python-gnupg (>=0.4.9,<0.5.0)
Requires-Dist: requests (>=2.28.1,<3.0.0)
Description-Content-Type: text/markdown

# repoaudit

A tool for validating apt and yum repositories.

## Installation and Usage

To install repoaudit from PyPI:

```
pip install repoaudit
```

Then run:

```
repoaudit --help
```

## Examples

```
# validate all distros of azure-cli apt repo
repoaudit apt https://packages.microsoft.com/repos/azure-cli/

# validate only focal and bionic distros of azure-cli apt repo
repoaudit apt --dists focal,bionic https://packages.microsoft.com/repos/azure-cli/

# validate azurecore repo
repoaudit yum https://packages.microsoft.com/yumrepos/azurecore/

# validate all nested yumrepos
repoaudit yum -r https://packages.microsoft.com/yumrepos/

# validate all nested aptrepos
repoaudit yum -r https://packages.microsoft.com/repos/

# output json results to a file
repoaudit yum -r https://packages.microsoft.com/yumrepos/ -o example_file.json

# check metadata signatures by providing public keys
repoaudit apt https://packages.microsoft.com/repos/cbl-d -p https://packages.microsoft.com/keys/microsoft.asc,https://packages.microsoft.com/keys/msopentech.asc
```

## Development

### Setup

First install poetry per the [installation docs](https://python-poetry.org/docs/#installation).

Then clone the repo, cd into the repoaudit directory, and run `poetry install`.

### Usage

To load the poetry shell and run repoaudit:

```
poetry shell
repoaudit
```

Alternatively you can run:

```
poetry run repoaudit
```

## Releasing

First bump the version in pyproject.toml. Then commit it:

```
git commit -am "0.2.0 Release"
```

Open a PR and get it merged. Then go to
[the Github new release page](https://github.com/microsoft/linux-package-repositories/releases/new)
and create a new release 

Once that's done, pull the tag and use poetry to build it:

```
git pull --tags
git checkout 0.2.0
poetry publish --build
```

