mirror of
https://github.com/jtesta/ssh-audit.git
synced 2025-06-22 10:43:41 +02:00
Added snap package support.
This commit is contained in:
1
packages/MANIFEST.in
Normal file
1
packages/MANIFEST.in
Normal file
@ -0,0 +1 @@
|
||||
include sshaudit/LICENSE
|
14
packages/Makefile.pypi
Normal file
14
packages/Makefile.pypi
Normal file
@ -0,0 +1,14 @@
|
||||
all:
|
||||
cp ../ssh-audit.py sshaudit/sshaudit.py
|
||||
cp ../LICENSE sshaudit/LICENSE
|
||||
cp ../README.md sshaudit/README.md
|
||||
python3 setup.py sdist bdist_wheel
|
||||
|
||||
uploadtest:
|
||||
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
|
||||
|
||||
uploadprod:
|
||||
twine upload dist/*
|
||||
|
||||
clean:
|
||||
rm -rf parts/ prime/ snap/ stage/ build/ dist/ *.egg-info/ sshaudit/sshaudit.py sshaudit/LICENSE sshaudit/README.md ssh-audit*.snap
|
8
packages/Makefile.snap
Normal file
8
packages/Makefile.snap
Normal file
@ -0,0 +1,8 @@
|
||||
all:
|
||||
cp ../ssh-audit.py sshaudit/sshaudit.py
|
||||
cp ../README.md sshaudit/README.md
|
||||
echo -e "\n\nDid you remember to bump the version number in snapcraft.yaml?\n\n"
|
||||
snapcraft
|
||||
|
||||
clean:
|
||||
rm -rf parts/ prime/ snap/ stage/ build/ dist/ *.egg-info/ sshaudit/sshaudit.py sshaudit/LICENSE sshaudit/README.md ssh-audit*.snap
|
41
packages/notes.txt
Normal file
41
packages/notes.txt
Normal file
@ -0,0 +1,41 @@
|
||||
= PyPI =
|
||||
|
||||
To create package and upload to test server:
|
||||
|
||||
# apt install virtualenv
|
||||
$ virtualenv -p /usr/bin/python3 /tmp/pypi_upload
|
||||
$ cd /tmp/pypi_upload; source bin/activate
|
||||
$ pip3 install twine
|
||||
$ cp -R path/to/ssh-audit .
|
||||
$ cd ssh-audit/pypi
|
||||
$ make -f Makefile.pypi
|
||||
$ make -f Makefile.pypi uploadtest
|
||||
|
||||
|
||||
To download from test server and verify:
|
||||
|
||||
$ virtualenv -p /usr/bin/python3 /tmp/pypi_test
|
||||
$ cd /tmp/pypi_test; source bin/activate
|
||||
$ pip3 install --index-url https://test.pypi.org/simple ssh-audit
|
||||
|
||||
|
||||
To upload to production server:
|
||||
|
||||
$ cd /tmp/pypi_upload; source bin/activate
|
||||
$ cd ssh-audit/pypi
|
||||
$ make -f Makefile.pypi uploadprod
|
||||
|
||||
|
||||
To download from production server and verify:
|
||||
|
||||
$ virtualenv -p /usr/bin/python3 /tmp/pypi_prod
|
||||
$ cd /tmp/pypi_prod; source bin/activate
|
||||
$ pip3 install ssh-audit
|
||||
|
||||
----
|
||||
|
||||
= Snap =
|
||||
|
||||
To create the snap package, simply run:
|
||||
|
||||
$ make -f Makefile.snap
|
38
packages/setup.py
Normal file
38
packages/setup.py
Normal file
@ -0,0 +1,38 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
import re
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
version = re.search('^VERSION\s*=\s*\'v(\d\.\d\.\d)\'', open('sshaudit/sshaudit.py').read(), re.M).group(1)
|
||||
print("\n\nPackaging ssh-audit v%s...\n\n" % version)
|
||||
|
||||
with open("sshaudit/README.md", "rb") as f:
|
||||
long_descr = f.read().decode("utf-8")
|
||||
|
||||
|
||||
setup(
|
||||
name = "ssh-audit",
|
||||
packages = ["sshaudit"],
|
||||
license = 'MIT',
|
||||
entry_points = {
|
||||
"console_scripts": ['ssh-audit = sshaudit.sshaudit:main']
|
||||
},
|
||||
version = version,
|
||||
description = "An SSH server & client configuration security auditing tool",
|
||||
long_description = long_descr,
|
||||
long_description_content_type = "text/markdown",
|
||||
author = "Joe Testa",
|
||||
author_email = "jtesta@positronsecurity.com",
|
||||
url = "https://github.com/jtesta/ssh-audit",
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Intended Audience :: Information Technology",
|
||||
"Intended Audience :: System Administrators",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Topic :: Security",
|
||||
"Topic :: Security :: Cryptography"
|
||||
])
|
21
packages/snapcraft.yaml
Normal file
21
packages/snapcraft.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
name: ssh-audit
|
||||
version: '2.2.0-1'
|
||||
license: 'MIT'
|
||||
summary: ssh-audit
|
||||
description: |
|
||||
SSH server and client security configuration auditor. Official repository: <https://github.com/jtesta/ssh-audit>
|
||||
|
||||
base: core18
|
||||
grade: stable
|
||||
confinement: strict
|
||||
|
||||
apps:
|
||||
ssh-audit:
|
||||
command: bin/ssh-audit
|
||||
plugs: [network,network-bind]
|
||||
|
||||
parts:
|
||||
ssh-audit:
|
||||
plugin: python
|
||||
python-version: python3
|
||||
source: .
|
0
packages/sshaudit/__init__.py
Normal file
0
packages/sshaudit/__init__.py
Normal file
4
packages/sshaudit/__main__.py
Normal file
4
packages/sshaudit/__main__.py
Normal file
@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from .sshaudit import main
|
||||
main()
|
Reference in New Issue
Block a user