diff --git a/README.md b/README.md index a8c0789..3c0dde3 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # apt-server APT server with dynamic package pool handling. Dynamic behavior is achieved by listening file changes in package pool -directory and -on any .deb file change, the repository is updated and re-signed. +directory and on any .deb file change, the repository is updated and re-signed. ## Table of contents - [Features](#features) +- [Requirements](#requirements) - [Installation](#installation) - [From source](#from-source) - [From GitHub release](#from-github-release) @@ -22,9 +22,9 @@ on any .deb file change, the repository is updated and re-signed. ## Features -- Dynamic package pool handling -- Multiple architectures -- GPG signed repository +- [x] Dynamic package pool handling +- [x] Multiple architectures +- [x] GPG signed repository ## Requirements @@ -116,7 +116,7 @@ Output: The repository can be accessed by adding it to a sources list file, eg: ```commandline - echo "deb [arch=armhf] http://127.0.0.1:9000 stable main" | tee /etc/apt/sources.list.d/effective-range.list + echo "deb http://127.0.0.1:9000 stable main" | tee /etc/apt/sources.list.d/effective-range.list ``` 2. Add the public key to the keychain diff --git a/apt_server/py.typed b/apt_server/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/bin/apt-server.py b/bin/apt-server.py index f360e9f..a1b46e8 100644 --- a/bin/apt-server.py +++ b/bin/apt-server.py @@ -8,7 +8,7 @@ import os import signal from functools import partial -from http.server import SimpleHTTPRequestHandler, HTTPServer +from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer from pathlib import Path from typing import Any @@ -48,7 +48,7 @@ def main() -> None: APPLICATION_NAME, architectures, repository_dir, deb_package_dir, release_template_path) handler_class = partial(SimpleHTTPRequestHandler, directory=repository_dir) - web_server = HTTPServer(('', arguments.port), handler_class) + web_server = ThreadingHTTPServer(('', arguments.port), handler_class) apt_server = AptServer(apt_repository, apt_signer, Observer(), web_server, deb_package_dir) diff --git a/tests/aptServerIntegrationTest.py b/tests/aptServerIntegrationTest.py index 5b6b661..9dff965 100644 --- a/tests/aptServerIntegrationTest.py +++ b/tests/aptServerIntegrationTest.py @@ -1,6 +1,6 @@ import unittest from functools import partial -from http.server import HTTPServer, SimpleHTTPRequestHandler +from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer, HTTPServer from importlib.metadata import version from threading import Thread from unittest import TestCase @@ -114,7 +114,7 @@ def create_components(): apt_repository = LinkedPoolAptRepository(APPLICATION_NAME, [ARCHITECTURE], REPOSITORY_DIR, PACKAGE_DIR, TEMPLATE_PATH) handler_class = partial(SimpleHTTPRequestHandler, directory=REPOSITORY_DIR) - web_server = HTTPServer(('', 0), handler_class) + web_server = ThreadingHTTPServer(('', 0), handler_class) return apt_repository, apt_signer, web_server