Metadata-Version: 2.1
Name: cvmfsutils
Version: 0.0.0
Summary: Inspect CernVM-FS repositories
Home-page: http://cernvm.cern.ch
Author: Rene Meusel
Author-email: rene.meusel@cern.ch
License: BSD
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Filesystems
Classifier: Topic :: System :: Networking :: Monitoring
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: COPYING
Requires-Dist: python-dateutil >=1.4.1
Requires-Dist: requests >=1.1.0
Requires-Dist: cryptography >=2.8
Provides-Extra: test
Requires-Dist: unittest-xml-reporting ; extra == 'test'

# CernVM-FS Python Utilities

The CernVM-FS python package allows for the inspection of CernVM-FS
repositories using python. In particular to browse their file catalog
hierarchy, inspect CernVM-FS repository manifests (a.k.a. .cvmfspublished
files) and the history of named snapshots inside any CernVM-FS repository.

The support for this package is low: best effort, and with very
limited testing.

## Example Usage

```python
import cvmfs

repo = cvmfs.open_repository('http://cvmfs.fnal.gov/cvmfs/grid.cern.ch')
print('Last Revision:', repo.manifest.revision, repo.manifest.last_modified)
root_catalog = repo.retrieve_catalog(repo.manifest.root_catalog)
print('Catalog Schema:', root_catalog.schema)
for nested_catalog_ref in root_catalog.list_nested():
    print('Nested Catalog at:', nested_catalog_ref.root_path)
print('Listing repository')
for full_path, dirent in repo:
    print(full_path)
```

## Utilities

Example programs "big_catalogs" and "catdirusage" are supplied in the
"utils" directory, which are also useful for figuring out where to
split up the catalogs in a cvmfs repository. Also, "cvmfs_search" is
useful as a way to find out the original path(s) that correspond to a
cvmfs hash.

## Installation

Rpms are available in the cvmfs-contrib yum repositories for current versions of Enterprise Linux.
See https://cvmfs-contrib.github.io for instructions to enable one
of those repositories. Then to install simply do:

```bash
yum install -y python-cvmfsutils
```

## Testing

The full test suite can be run by this command in the cvmfs subdirectory:

```bash
python3 test
```

The signature verification tests fail by default on EL9 because sha1 is
disallowed there for certificate checks. That can be worked around with:

```bash
update-crypto-policies --set DEFAULT:SHA1
```
