Skip to content

Commit

Permalink
Merge pull request #139 from vsoch/add/rpm
Browse files Browse the repository at this point in the history
adding rpm file
  • Loading branch information
vsoch committed Aug 15, 2018
2 parents 0026c75 + 887cdde commit 6797e3c
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The versions coincide with releases on pip. Only major versions will be released

## [0.0.x](https://github.com/singularityhub/sregistry-cli/tree/master) (0.0.x)
- image URI tag should not be changed to lowercase (0.0.89)
- adding rpm spec file, sregistry.cli.spec
- adding chunked upload to chunk uploads to Singularity Registry (0.0.88)
- fixing shell client bug (0.0.87)
- updating Dockerfile and Singularity recipt with additional dependencies for 2.5 (0.0.86).
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,38 @@ Singularity Global Client is an interface to interact with Singularity container

See our [installation guide](https://singularityhub.github.io/sregistry-cli/install) to get started. For more details, please refer to our [documentation](docs)

## Building the RPM

The file [sregistry-cli.spec](sregistry-cli.spec) is provided to build an rpm for a specified version,
typcailly the current release on pypi, and was discussed [here](https://github.com/singularityhub/sregistry-cli/issues/138#issuecomment-413323717).
You should do the following:

1. Update the version to be the current in pypi specified in [sregistry/version.py](sregistry/version.py).

```bash
Version: 0.0.89
```

2. Create a [new release](https://github.com/singularityhub/sregistry-cli/releases/new) on Github with the version spec file added.
3. Download the .tar.gz file from the release

```bash
VERSION=0.0.89
wget https://github.com/singularityhub/sregistry-cli/archive/0.0.${VERSION}.tar.gz
```

4. Use rpmbuild to build it.

```bash
rpmbuild -ta sregistry-$version.tar.gz
```

You should get an srpm which that can be distributed and anyone can be rebuilt:

```bash
rpmbuild --rebuild sregistry-cli.srpm
```

## License

This code is licensed under the Affero GPL, version 3.0 or later [LICENSE](LICENSE).
36 changes: 36 additions & 0 deletions sregistry-cli.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# https://www.ibm.com/developerworks/library/l-rpm1/
#
# spec file for package sregistry-cli
# credit for work goes to the amazing @griznog, John Hanks
#
Name: python-sregistry
Version: 0.0.89
Release: 0
Url: http://www.github.com/singularityhub/sregistry-cli
Summary: Command line tool for working with container storage
License: LICENSE (FIXME:No SPDX)
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/s/sregistry/sregistry-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
%description
# Singularity Global Client
Hi Friends! Are your containers lonely? Singularity containers thrive in happiness when they are shared. This means that wherever you might have them in these cloudy places, they are easy to find and move around.
## What is this?
Singularity Global Client is an interface to interact with Singularity containers in many different storage locations. We are able to use modern APIs by way of providing and using the software within a Singularity container!
See our [installation guide](https://singularityhub.github.io/sregistry-cli/install) to get started.
## License
This code is licensed under the Affero GPL, version 3.0 or later [LICENSE](LICENSE).
%prep
%setup -q -n sregistry-%{version}
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{python_sitelib}/*
/usr/bin/sregistry
%changelog

0 comments on commit 6797e3c

Please sign in to comment.