Skip to content

Commit

Permalink
Merge pull request #178 from marcus67/master
Browse files Browse the repository at this point in the history
Version 0.4.26
  • Loading branch information
marcus67 authored Jul 28, 2023
2 parents 9bec6a2 + 6ca017a commit 9506895
Show file tree
Hide file tree
Showing 117 changed files with 3,283 additions and 857 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:
- store_artifacts:
path: htmlcov
- store_artifacts:
path: debian/little-brother_0.4.19_121.deb
path: debian/little-brother_0.4.26_133.deb
- persist_to_workspace:
root: debian
paths:
- little-brother_0.4.19_121.deb
- little-brother_0.4.26_133.deb
build_pypi:
#working_directory: ~
docker:
Expand All @@ -60,11 +60,11 @@ jobs:
- run: git submodule update --init
- run: PYTHONPATH=contrib/python_base_app python3 ci_toolbox.py --execute-stage BUILD --use-dev-dir=.
- store_artifacts:
path: "dist/little-brother-0.4.19.tar.gz"
path: "dist/little-brother-0.4.26.tar.gz"
- persist_to_workspace:
root: dist
paths:
- "little-brother-0.4.19.tar.gz"
- "little-brother-0.4.26.tar.gz"
install_pypi:
#working_directory: ~
docker:
Expand Down Expand Up @@ -136,14 +136,14 @@ workflows:
- docker:
requires:
- build
- publish_pypi
- build_pypi
- install_pypi:
requires:
- build_pypi
- publish_pypi:
requires:
- install_pypi
- docker
filters:
branches:
only:
Expand Down
53 changes: 45 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ stages:
- build
- install_and_check
- analyze
- deploy
- owasp_check
- owasp_upload
- publish
- deploy

build_debian:
image: marcusrickert/docker-python-app:latest
Expand Down Expand Up @@ -68,7 +70,7 @@ build_pypi:
artifacts:
when: always
paths:
- dist/little-brother-0.4.19.tar.gz
- dist/little-brother-0.4.26.tar.gz
variables:
# Suppress automatic checkout for all sub modules
GIT_SUBMODULE_STRATEGY: recursive
Expand Down Expand Up @@ -101,6 +103,47 @@ analyze:
# Suppress automatic checkout for all sub modules
GIT_SUBMODULE_STRATEGY: recursive



owasp_check:
image:
name: registry.gitlab.com/gitlab-ci-utils/docker-dependency-check:latest
entrypoint: [""]
stage: owasp_check
script:
# Job will scan the project root folder and fail if any vulnerabilities with CVSS > 0 are found
- /usr/share/dependency-check/bin/dependency-check.sh --enableExperimental --scan "./" --format XML --project "$CI_PROJECT_NAME"
# Dependency Check will only fail the job based on CVSS scores, and in some cases vulnerabilities do not
# have CVSS scores (e.g. those from NPM audit), so they don't cause failure. To fail for any vulnerabilities
# grep the resulting report for any "vulnerabilities" sections and exit if any are found (count > 0).
allow_failure: false
artifacts:
when: always
paths:
# Save the HTML and JSON report artifacts
- "./dependency-check-report.xml"

owasp_upload:
image:
name: "$VULSCAN_ADAPTER_IMAGE"
entrypoint: ["python", "run.py"]
stage: owasp_upload
allow_failure: false
variables:
VULSCAN_SERVER_URL: "$VULSCAN_URL/analyzer/api"
REPORT_FILE_NAME: dependency-check-report.xml
FILE_FORMAT: xml
TOOL_NAME: owasp
PROJECT_ID: "little-brother"
PROJECT_NAME: "little-brother"
script:
- echo "Analysis successful."

publish_pypi:
image: marcusrickert/docker-python-app:latest
stage: publish
script:
- PYTHONPATH=contrib/python_base_app python3 ci_toolbox.py --execute-stage PUBLISH-PYPI-PACKAGE --use-dev-dir=.
docker:
image: marcusrickert/docker-docker-ci:release-0.9.1
stage: deploy
Expand All @@ -109,9 +152,3 @@ docker:
variables:
# Activate automatic checkout for all sub modules
GIT_SUBMODULE_STRATEGY: recursive

publish_pypi:
image: marcusrickert/docker-python-app:latest
stage: publish
script:
- PYTHONPATH=contrib/python_base_app python3 ci_toolbox.py --execute-stage PUBLISH-PYPI-PACKAGE --use-dev-dir=.
197 changes: 154 additions & 43 deletions ADVANCED_TOPICS.md

Large diffs are not rendered by default.

63 changes: 57 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,57 @@

This document lists all changes of `LittleBrother` with the most recent changes at the top.

## Version 0.4.26 Revision 133 (July 25th, 2023)

* Rename pytest folder to `pytests` (see https://stackoverflow.com/questions/62581901/attribute-error-module-pytest-has-no-attribute-hookimpl/69062733#69062733)
* Fix error in `migrate_client_device_configs()`
* Fix error in `patched_firewall_handler_test_result()`
* General upgrade of most packages
* Bump python_base_app to 0.2.45
* Closes https://github.com/marcus67/little_brother/issues/177

## Version 0.4.25 Revision 132 (July 3rd, 2022)

* Re-activate all images (left deactivated by mistake for testing purposes)
* Upgrade to package `Flask` > 2
* Upgrade to `some-flask-helpers` 0.2.3

## Version 0.4.24 Revision 131 (July 3rd, 2022)

* Fixed broken Docker images (Debian, Ubuntu, and Alpine)
* Re-Activated Arch Linux Docker image
* Removed LDAP dependencies in all images
* Add missing PIP dependency for `packaging` (caused trouble on Alpine)
* Remove vagrant directory

## Version 0.4.23 Revision 129 (July 2nd, 2022)

* Closes #169, see [here](https://github.com/marcus67/little_brother/issues/169)
* Closes #172, see [here](https://github.com/marcus67/little_brother/issues/172)
* Closes #174, see [here](https://github.com/marcus67/little_brother/issues/174)
* Upgrade to `python_base_app` version 0.2.42
* Finalize renaming "slave" into "client"
* Lock width of multiline text fields in forms
* Bump `selenium` to 4.3.0

## Version 0.4.22 Revision 123 (March 6th, 2022)

* Deactivate Arch Linux Docker image due to incompatibility of `glibc`

## Version 0.4.21 Revision 123 (March 6th, 2022)

* Update documentation on generic installation script
* Update documentation on distributions
* Re-activate the build of all Docker images
* Upgrade to `python_base_app` version 0.2.38

## Version 0.4.20 Revision 122 (March 3rd, 2022)

* Configuration for Docker images based on Arch Linux and Alpine
* Use of corrected `generic-install.sh`
* Closes #170, see [here](https://github.com/marcus67/little_brother/issues/170)
* Upgrade to `python_base_app` version 0.2.37

## Version 0.4.19 Revision 121 (February 13th, 2022)

* Upgrade to `python_base_app` version 0.2.36 (lots of trouble releasing `python_base_app`)
Expand Down Expand Up @@ -50,7 +101,7 @@ This document lists all changes of `LittleBrother` with the most recent changes

## Version 0.4.11 Revision 110 (November 22nd, 2021)

* Requeue outgoing events on slave in case API call was not successful (potential fix for
* Requeue outgoing events on client in case API call was not successful (potential fix for
[issue 157](https://github.com/marcus67/little_brother/issues/157))

## Version 0.4.10 Revision 109 (October 12th, 2021)
Expand Down Expand Up @@ -294,7 +345,7 @@ This document lists all changes of `LittleBrother` with the most recent changes
## Version 0.3.1 Revision 67 (July 20th, 2020)

* Fix issue with master process not detecting user activity when new users are activated
* Change the default configuration on the Docker slave image:
* Change the default configuration on the Docker client image:
* Set sqlite as the default backend
* Deactivate audio output and pop notifications

Expand Down Expand Up @@ -329,7 +380,7 @@ This document lists all changes of `LittleBrother` with the most recent changes
* Deactivate settings changes to log handling by alembic
* Support broadcasting of user settings, activate on all relevant changes
* Increase connection pool size
* Activate mandatory sqlite backend for slaves
* Activate mandatory sqlite backend for clients
* Make sure database session are always closed
* Deploy etc/master.config as a template
* Closes #93, see [here](https://github.com/marcus67/little_brother/issues/93)
Expand Down Expand Up @@ -442,14 +493,14 @@ This document lists all changes of `LittleBrother` with the most recent changes

## Version 0.1 Revision 48 (December 26th, 2019)

* Added Docker image for slave process
* Added Docker image for client process
* Support for overriding of settings using environment
* Abstraction of the audio engine (class `BaseAudioPlayer`)
* Support for `mpg123` as audio engine (new)
* Support for `playsound` as audio engine (rewritten as engine)
* Support for `pyglet` as audio engine (new)
* Correct handling of default locale on slave device
* Distribution of login mappings from master to slave (for Docker containers and macOS)
* Correct handling of default locale on client host
* Distribution of login mappings from master to client (for Docker containers and macOS)
* New CI stage to build docker images
* Consistent hiding of sensitive variable values in logging
* Packages `sudo` and `procps` added to the Debian package dependencies
Expand Down
11 changes: 7 additions & 4 deletions DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@

## Overview

Currently, there are three Docker images available for `LittleBrother`:
Currently, there are four Docker images available for `LittleBrother`:
* [little-brother-client](https://hub.docker.com/repository/docker/marcusrickert/little-brother-client)
containing a LittleBrother client process based on a Debian base image.
containing a LittleBrother client based on a Debian base image.
* [little-brother-ubuntu-client](https://hub.docker.com/repository/docker/marcusrickert/little-brother-ubuntu-client)
containing a LittleBrother client process based on an Ubuntu base image.
containing a LittleBrother client based on an Ubuntu base image.
* [little-brother-alpine-client](https://hub.docker.com/repository/docker/marcusrickert/little-brother-alpine-client)
containing a LittleBrother client based on an Alpine Linux base image. This is the smallest image for
`LittleBrother`!
* [little-brother-slave](https://hub.docker.com/repository/docker/marcusrickert/little-brother-slave)
containing a LittleBrother client process based on a Debian base image. This image is obsolete for naming reasons
containing a LittleBrother client based on a Debian base image. This image is obsolete for naming reasons
and **will not be updated**. Please, migrate to one of the images above.

See [this repository](https://github.com/marcus67/docker-little-brother) for docker-compose support files.
Expand Down
55 changes: 31 additions & 24 deletions NON-DEBIAN-INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
![LittleBrother-Logo](little_brother/static/icons/icon-baby-panda-128x128.png)
![CentOS-Logo](doc/centos-logo.png)
![OpenSuSe-Logo](doc/opensuse-logo.png)
![ArchLinux-Logo](doc/arch-linux-logo.jpeg)
![Alpine-Logo](doc/alpine-linux-logo.png)

# Installation on Non-Debian Distributions

Expand All @@ -13,34 +15,39 @@ This page will outline how to do this.

Install the following Linux packages. Note that the exact names may differ in your distribution.

| Debian Package | CentOS Package | SuSe Package |
| ------------------ | --------------------- | ------------ |
| `python3` | `python3` | TODO |
| `python3-pip` | `python3-pip` | TODO |
| `python-dev` | `python2-devel` | TODO |
| `python3-dev` | `python3-devel` | TODO |
| `sudo` | `sudo` | TODO |
| `gcc` | `gcc` | TODO |
| `procps` | `procps-ng` | TODO |
| `virtualenv` | `python3-virtualenv` | TODO |
| Debian Package | CentOS Package | Arch Linux Package | Alpine package |
|--------------------------|-------------------------- |----------------------|-----------------------|
| preinstalled | preinstalled | preinstalled | `bash` |
| `python3` | `python3` | `python3` | `python3` |
| `python3-pip` | `python3-pip` | `python-pip` | `py3-pip` |
| `python3-dev` | `python3-devel` | not required | `python3-devel` |
| `sudo` | `sudo` | `sudo` | `sudo` |
| `procps` (master only) | `procps-ng` (master only) | TODO | TODO |
| `virtualenv` | `python3-virtualenv` | `python-virtualenv` | `py3-virtualenv` |
| `libsasl2-dev` | TODO | not required | `libsasl` |
| not required | TODO | not required | `libldap=2.5.58` |
| not required | TODO | not required | `libldapcpp=2.5.58` |
| `libldap2-dev` | TODO | not required | `openldap-dev=2.5.58` |
| not required | TODO | not required | `libffi-dev` |
| `libssl-dev` | TODO | not required | not required |
| not required | TODO | `curl` | `curl` |
| not required | TODO | `gcc` | `gcc` |

## Installation Steps

* Download the current GitHub project as a
[zipped tar file](https://github.com/marcus67/little_brother/archive/master.zip) and store it locally.
* Download the current GitHub project as a
[master branch zipped tar file](https://github.com/marcus67/little_brother/archive/master.zip) or
[release branch zipped tar file](https://github.com/marcus67/little_brother/archive/release.zip)
and store it locally.

* Unzip the archive by executing `unzip master.zip`.
* Unzip the archive by executing `unzip master.zip`.

* The base directory of the unzipped archive containing the `README.md` will be referenced as `$INSTALL_BASE_DIR`
* The base directory of the unzipped archive containing the `README.md` will be referenced as `$INSTALL_BASE_DIR`
hence forward.

* Download the current PIP3 packages for `LittleBrother`, `python_base_app` and `some_flask_helpers` from
the test PyPi repository using these links

* [LittleBrother](https://test.pypi.org/project/little-brother/#files)
* [python_base_app](https://test.pypi.org/project/python-base-app/#files)
* [some_flask_helpers](https://test.pypi.org/project/some-flask-helpers/#files)

and store a copy of them into `/tmp`.
Note: By default, these three files are included in the Debian package.
* Change to `root` and execute the script [`$INSTALL_BASE_DIR/bin/generic-install.sh`](bin/generic-install.sh)
* Open the script [`$INSTALL_BASE_DIR/bin/generic-install.sh`](bin/generic-install.sh) and scan the header
for required environment settings.

* Set environment variables if applicable (or patch the script).

* Change to `root` and execute the script [`$INSTALL_BASE_DIR/bin/generic-install.sh`](bin/generic-install.sh)
2 changes: 1 addition & 1 deletion OPERATIONAL_MONITORING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
The application `LittleBrother` has a simple HTTP health check endpoint with relative url `/health` which
can be monitored by systems such as `icinga`.
The endpoint will always return HTTP code `200` and the text `OK`. It is automatically active for the master
host since the master host always has its web frontend active anyway. For the slaves the endpoint has to be
host since the master host always has its web frontend active anyway. For the clients the endpoint has to be
activated by setting at least the port the section `[StatusServer]` as in the example below.

...
Expand Down
Loading

0 comments on commit 9506895

Please sign in to comment.