CLEANFILES += \
src/buildservice/constants.py
+api_PYTHON = \
+ src/api/__init__.py \
+ src/api/app.py \
+ src/api/builds.py
+
+apidir = $(pkgpythondir)/api
+
web_PYTHON = \
src/web/__init__.py \
src/web/auth.py \
# ------------------------------------------------------------------------------
systemdsystemunit_DATA = \
+ src/systemd/pakfire-api.service \
src/systemd/pakfire-web.service
CLEANFILES += \
$(systemdsystemunitdir)
EXTRA_DIST += \
+ src/systemd/pakfire-api.service.in \
src/systemd/pakfire-web.service.in
dist_database_DATA = \
--- /dev/null
+###############################################################################
+# #
+# Pakfire - The IPFire package management system #
+# Copyright (C) 2025 Pakfire development team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+# Import the app
+from .app import app
+
+from . import builds
--- /dev/null
+###############################################################################
+# #
+# Pakfire - The IPFire package management system #
+# Copyright (C) 2025 Pakfire development team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+import fastapi
+
+app = fastapi.FastAPI(
+ title = "Pakfire Build Service API",
+ version = "0.0.1",
+
+ # Enable debug mode
+ debug = True,
+)
--- /dev/null
+###############################################################################
+# #
+# Pakfire - The IPFire package management system #
+# Copyright (C) 2025 Pakfire development team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+from .app import app
+
+@app.get("/builds/{build_id}")
+async def get(build_id: str):
+ return { "GOT" : "HERE" }
--- /dev/null
+[Unit]
+Description=Pakfire API
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/uvicorn pbs.api:app --port=9001
+User=_pakfire
+
+[Install]
+WantedBy=multi-user.target