2020-10-29 02:01:47 +01:00
= Windows =
An executable can only be made on a Windows host because the PyInstaller tool (https://www.pyinstaller.org/) does not support cross-compilation.
On a Windows machine, do the following:
1.) Install Python v3.7.x from https://www.python.org/. (As of this writing v3.8.0 isn't supported.) To make life easier, check the option to add Python to the PATH environment variable.
2.) Using pip, install pyinstaller and colorama:
pip install pyinstaller colorama
3.) Create the executable with:
cd src\ssh_audit
rename ssh_audit.py ssh-audit.py
pyinstaller -F --icon ..\..\windows_icon.ico ssh-audit.py
---
2020-03-13 02:56:23 +01:00
= PyPI =
2019-11-14 17:06:05 +01:00
To create package and upload to test server:
2020-10-20 20:04:14 +02:00
$ sudo apt install python3-virtualenv
2020-03-13 02:56:23 +01:00
$ make -f Makefile.pypi
$ make -f Makefile.pypi uploadtest
2019-11-14 17:06:05 +01:00
To download from test server and verify:
2019-11-26 18:12:47 +01:00
$ virtualenv -p /usr/bin/python3 /tmp/pypi_test
$ cd /tmp/pypi_test; source bin/activate
2019-11-14 17:06:05 +01:00
$ pip3 install --index-url https://test.pypi.org/simple ssh-audit
2020-03-11 17:45:28 +01:00
2020-10-20 20:04:14 +02:00
To upload to production server (hint: use username '__token__' and API token):
2020-03-11 17:45:28 +01:00
2020-03-13 02:56:23 +01:00
$ make -f Makefile.pypi uploadprod
2020-03-11 17:45:28 +01:00
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
2020-03-13 02:56:23 +01:00
----
= Snap =
2020-09-29 16:24:36 +02:00
To create the snap package, run a fully-updated Ubuntu Server 20.04 VM.
2020-03-13 02:56:23 +01:00
2020-10-29 02:01:47 +01:00
Install pre-requisites with:
$ sudo apt install make snapcraft
$ sudo snap install review-tools
2020-09-29 16:24:36 +02:00
2020-10-29 02:01:47 +01:00
Initialize LXD (leave all options default):
$ sudo lxd init
2020-09-29 16:24:36 +02:00
2020-10-20 21:30:04 +02:00
Bump the version number in snapcraft.yaml. Then run:
2020-09-29 16:24:36 +02:00
2020-10-29 02:01:47 +01:00
$ make -f Makefile.snap
Upload the snap with:
$ snapcraft login
$ snapcraft upload --release=stable ssh-audit_*.snap
2020-10-20 17:31:50 +02:00
----
= Docker =
Build image with:
$ make -f Makefile.docker
Then upload them to Dockerhub with:
$ make -f Makefile.docker upload