mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-07-13 22:31:07 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e2e013a33b | |||
| da0853b6f1 | |||
| 7db38ff9e4 | |||
| 92ac036f78 | |||
| aef7fa5f93 | |||
| c412b08135 | |||
| a3b6372c11 | |||
| 78288befb8 | |||
| 49cd3d43c8 | |||
| d9b52806c0 | |||
| 774db2d780 | |||
| 68afda4c71 | |||
| fa9fa73078 | |||
| 3e1e24cb50 | |||
| 18fe38c30b | |||
| 6ee8b26bd5 | |||
| fce49f22c9 |
@@ -26,6 +26,10 @@ jobs:
|
|||||||
|
|
||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Set image date
|
||||||
|
id: args
|
||||||
|
run: echo "::set-output name=date::$(date -d yesterday +'%Y-%m-%d')"
|
||||||
|
|
||||||
- name: Login to docker hub
|
- name: Login to docker hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -53,6 +57,8 @@ jobs:
|
|||||||
- name: Build an image and push
|
- name: Build an image and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
|
build-args: |
|
||||||
|
BUILD_DATE=${{ steps.args.outputs.date }}
|
||||||
file: docker/Dockerfile
|
file: docker/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ pacman -Syyu --noconfirm
|
|||||||
# main dependencies
|
# main dependencies
|
||||||
pacman -S --noconfirm devtools git npm pyalpm python-bcrypt python-filelock python-inflection python-pyelftools python-requests python-systemd sudo
|
pacman -S --noconfirm devtools git npm pyalpm python-bcrypt python-filelock python-inflection python-pyelftools python-requests python-systemd sudo
|
||||||
# make dependencies
|
# make dependencies
|
||||||
pacman -S --noconfirm --asdeps base-devel python-build python-flit python-installer python-tox python-wheel
|
pacman -S --noconfirm --asdeps base-devel python-build python-hatchling python-installer python-tox python-wheel
|
||||||
# optional dependencies
|
# optional dependencies
|
||||||
if [[ -z $MINIMAL_INSTALL ]]; then
|
if [[ -z $MINIMAL_INSTALL ]]; then
|
||||||
# web server
|
# web server
|
||||||
pacman -S --noconfirm python-aioauth-client python-aiohttp python-aiohttp-apispec-git python-aiohttp-cors python-aiohttp-jinja2 python-aiohttp-security python-aiohttp-session python-cryptography python-jinja
|
pacman -S --noconfirm python-aioauth-client python-aiohttp python-aiohttp-apispec-git python-aiohttp-cors python-aiohttp-jinja2 python-aiohttp-security python-aiohttp-session python-aiohttp-sse-git python-cryptography python-jinja
|
||||||
# additional features
|
# additional features
|
||||||
pacman -S --noconfirm gnupg ipython python-boto3 python-cerberus python-matplotlib rsync
|
pacman -S --noconfirm gnupg ipython python-boto3 python-cerberus python-matplotlib rsync
|
||||||
fi
|
fi
|
||||||
|
|||||||
+5
-2
@@ -103,5 +103,8 @@ docs/html/
|
|||||||
# Frontend
|
# Frontend
|
||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
package/share/ahriman/templates/static/index.js
|
ahriman-web/package/share/ahriman/templates/static/index.js
|
||||||
package/share/ahriman/templates/static/index.css
|
ahriman-web/package/share/ahriman/templates/static/index.css
|
||||||
|
|
||||||
|
# local configs
|
||||||
|
/*.ini
|
||||||
|
|||||||
@@ -2,4 +2,6 @@
|
|||||||
addopts = --cov=ahriman --cov-report=term-missing:skip-covered --no-cov-on-fail --cov-fail-under=100 --spec
|
addopts = --cov=ahriman --cov-report=term-missing:skip-covered --no-cov-on-fail --cov-fail-under=100 --spec
|
||||||
asyncio_default_fixture_loop_scope = function
|
asyncio_default_fixture_loop_scope = function
|
||||||
asyncio_mode = auto
|
asyncio_mode = auto
|
||||||
|
pythonpath = tests
|
||||||
|
resource-path.directory-name-test-resources = ../../tests/testresources
|
||||||
spec_test_format = {result} {docstring_summary}
|
spec_test_format = {result} {docstring_summary}
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ version: 2
|
|||||||
build:
|
build:
|
||||||
os: ubuntu-lts-latest
|
os: ubuntu-lts-latest
|
||||||
tools:
|
tools:
|
||||||
python: "3.12"
|
python: "3.13"
|
||||||
apt_packages:
|
apt_packages:
|
||||||
- graphviz
|
- graphviz
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "ahriman-core"
|
||||||
|
description = "ArcH linux ReposItory MANager, core package"
|
||||||
|
readme = "../README.md"
|
||||||
|
requires-python = ">=3.13"
|
||||||
|
license = {file = "../COPYING"}
|
||||||
|
authors = [
|
||||||
|
{name = "ahriman team"},
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"bcrypt",
|
||||||
|
"filelock",
|
||||||
|
"inflection",
|
||||||
|
"pyelftools",
|
||||||
|
"requests",
|
||||||
|
]
|
||||||
|
dynamic = ["version"]
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
journald = [
|
||||||
|
"systemd-python",
|
||||||
|
]
|
||||||
|
# FIXME technically this dependency is required, but in some cases we do not have access to
|
||||||
|
# the libalpm which is required in order to install the package. Thus in case if we do not
|
||||||
|
# really need to run the application we can move it to "optional" dependencies
|
||||||
|
pacman = [
|
||||||
|
"pyalpm",
|
||||||
|
]
|
||||||
|
reports = [
|
||||||
|
"Jinja2",
|
||||||
|
]
|
||||||
|
s3 = [
|
||||||
|
"boto3",
|
||||||
|
]
|
||||||
|
shell = [
|
||||||
|
"IPython",
|
||||||
|
]
|
||||||
|
stats = [
|
||||||
|
"matplotlib",
|
||||||
|
]
|
||||||
|
unixsocket = [
|
||||||
|
"requests-unixsocket2",
|
||||||
|
]
|
||||||
|
validator = [
|
||||||
|
"cerberus",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
ahriman = "ahriman.application.ahriman:run"
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Documentation = "https://ahriman.readthedocs.io/"
|
||||||
|
Repository = "https://github.com/arcan1s/ahriman"
|
||||||
|
Changelog = "https://github.com/arcan1s/ahriman/releases"
|
||||||
|
|
||||||
|
[tool.hatch.version]
|
||||||
|
path = "src/ahriman/__init__.py"
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel]
|
||||||
|
packages = ["src/ahriman"]
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel.shared-data]
|
||||||
|
"package/lib" = "lib"
|
||||||
|
"package/share" = "share"
|
||||||
+4
-4
@@ -72,17 +72,17 @@ class PackageArchive:
|
|||||||
if not PackageArchive.is_elf(binary_file):
|
if not PackageArchive.is_elf(binary_file):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
elf_file = ELFFile(binary_file) # type: ignore[no-untyped-call]
|
elf_file = ELFFile(binary_file)
|
||||||
dynamic_section = next(
|
dynamic_section = next(
|
||||||
(section for section in elf_file.iter_sections() # type: ignore[no-untyped-call]
|
(section for section in elf_file.iter_sections()
|
||||||
if isinstance(section, DynamicSection)),
|
if isinstance(section, DynamicSection)),
|
||||||
None)
|
None)
|
||||||
if dynamic_section is None:
|
if dynamic_section is None:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
return [
|
return [
|
||||||
tag.needed
|
tag.needed # type: ignore[attr-defined]
|
||||||
for tag in dynamic_section.iter_tags() # type: ignore[no-untyped-call]
|
for tag in dynamic_section.iter_tags()
|
||||||
if tag.entry.d_tag == "DT_NEEDED"
|
if tag.entry.d_tag == "DT_NEEDED"
|
||||||
]
|
]
|
||||||
|
|
||||||
+1
-1
@@ -80,7 +80,7 @@ class Configuration(configparser.RawConfigParser):
|
|||||||
"""
|
"""
|
||||||
configparser.RawConfigParser.__init__(
|
configparser.RawConfigParser.__init__(
|
||||||
self,
|
self,
|
||||||
dict_type=ConfigurationMultiDict if allow_multi_key else dict, # type: ignore[arg-type]
|
dict_type=ConfigurationMultiDict if allow_multi_key else dict,
|
||||||
allow_no_value=allow_no_value,
|
allow_no_value=allow_no_value,
|
||||||
strict=False,
|
strict=False,
|
||||||
empty_lines_in_values=not allow_multi_key,
|
empty_lines_in_values=not allow_multi_key,
|
||||||
+2
-2
@@ -150,6 +150,6 @@ class ShellTemplate(Template):
|
|||||||
break
|
break
|
||||||
|
|
||||||
kwargs.update(mapping)
|
kwargs.update(mapping)
|
||||||
substituted = dict(generator(kwargs))
|
kwargs.update(dict(generator(kwargs)))
|
||||||
|
|
||||||
return self.safe_substitute(kwargs | substituted)
|
return self.safe_substitute(kwargs)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user