Compare commits

...
4 Commits
7 changed files with 29 additions and 36 deletions
@@ -94,7 +94,7 @@ class Setup(Handler):
""" """
parser = root.add_parser("service-setup", aliases=["init", "repo-init", "repo-setup", "setup"], parser = root.add_parser("service-setup", aliases=["init", "repo-init", "repo-setup", "setup"],
help="initial service configuration", help="initial service configuration",
description="create initial service configuration, requires root", description="create initial service configuration as the repository owner",
epilog="Create minimal configuration for the service according to provided options.") epilog="Create minimal configuration for the service according to provided options.")
parser.add_argument("--build-as-user", help="force makepkg user to the specific one") parser.add_argument("--build-as-user", help="force makepkg user to the specific one")
parser.add_argument("--from-configuration", help="path to default devtools pacman configuration", parser.add_argument("--from-configuration", help="path to default devtools pacman configuration",
+2 -1
View File
@@ -1 +1,2 @@
ahriman ALL= NOPASSWD:SETENV: /usr/bin/ahriman-archbuild * Defaults!/usr/bin/ahriman-archbuild env_keep += "SOURCE_DATE_EPOCH SRCDEST SRCPKGDEST PKGDEST LOGDEST NPROC MAKEFLAGS PACKAGER GNUPGHOME"
ahriman ALL= NOPASSWD:NOSETENV: /usr/bin/ahriman-archbuild *
+1 -1
View File
@@ -8,7 +8,7 @@ ARG BUILD_DATE
RUN useradd -m -d "/home/build" -s "/usr/bin/nologin" build RUN useradd -m -d "/home/build" -s "/usr/bin/nologin" build
## extract container creation date and set mirror for this timestamp, set PKGEXT and refresh database next ## extract container creation date and set mirror for this timestamp, set PKGEXT and refresh database next
RUN echo "Server = https://archive.archlinux.org/repos/${BUILD_DATE//-/\/}/\$repo/os/\$arch" > "/etc/pacman.d/mirrorlist" && \ RUN echo "Server = https://archive.archlinux.org/repos/${BUILD_DATE//-//}/\$repo/os/\$arch" > "/etc/pacman.d/mirrorlist" && \
pacman -Syyuu --noconfirm pacman -Syyuu --noconfirm
## setup package cache ## setup package cache
RUN runuser -u build -- mkdir "/tmp/pkg" && \ RUN runuser -u build -- mkdir "/tmp/pkg" && \
+17 -26
View File
@@ -10,41 +10,32 @@ Initial setup
.. code-block:: shell .. code-block:: shell
sudo ahriman -a x86_64 -r aur service-setup ... sudo -u ahriman -- ahriman -a x86_64 -r aur service-setup \
--packager "ahriman bot <ahriman@example.com>" ...
.. admonition:: Details .. admonition:: Details
:collapsible: closed :collapsible: closed
``service-setup`` literally does the following steps: ``service-setup`` does the following steps:
#. #.
Create ``/var/lib/ahriman/.makepkg.conf`` with ``makepkg.conf`` overrides if required (at least you might want to set ``PACKAGER``): Create a repository-specific ahriman configuration below
``/var/lib/ahriman/.config/ahriman/ahriman.ini.d``. This configuration stores the
.. code-block:: shell packager identity, ``MAKEFLAGS`` and other options supplied on the command line.
echo 'PACKAGER="ahriman bot <ahriman@example.com>"' | sudo -u ahriman tee -a /var/lib/ahriman/.makepkg.conf
#. #.
Configure build tools (it is required for correct dependency management system): Generate the devtools pacman configuration in
``/var/lib/ahriman/.config/ahriman/pacman.conf.d``. The file is based on the
configuration selected by ``--from-configuration`` and contains the requested mirror,
multilib settings and the ahriman repository path.
#. #.
Create configuration file ``{name}.conf`` or ``{name}-{arch}.conf``, where ``name`` is the repostory name and ``arch`` is the repository architecture, e.g.: Create the repository directories, initialize the package repository and synchronize
its pacman database.
.. code-block:: shell Both configuration locations are below the repository root and must be writable by the
user running ahriman. Existing system-wide overrides remain supported; see
cp /usr/share/devtools/pacman.conf.d/{extra,aur-x86_64}.conf :doc:`the 2.22.0 migration guide <migrations/2.22.0>` when upgrading.
#.
Change configuration file, add your own repository, add multilib repository etc:
.. code-block:: shell
echo '[multilib]' | tee -a /usr/share/devtools/pacman.conf.d/aur-x86_64.conf
echo 'Include = /etc/pacman.d/mirrorlist' | tee -a /usr/share/devtools/pacman.conf.d/aur-x86_64.conf
echo '[aur]' | tee -a /usr/share/devtools/pacman.conf.d/aur-x86_64.conf
echo 'SigLevel = Optional TrustAll' | tee -a /usr/share/devtools/pacman.conf.d/aur-x86_64.conf
echo 'Server = file:///var/lib/ahriman/repository/$repo/$arch' | tee -a /usr/share/devtools/pacman.conf.d/aur-x86_64.conf
This command supports several arguments, kindly refer to its help message. This command supports several arguments, kindly refer to its help message.
@@ -53,14 +44,14 @@ Initial setup
.. code-block:: shell .. code-block:: shell
systemctl enable --now ahriman@x86_64-aur.timer sudo systemctl enable --now ahriman@x86_64-aur.timer
#. #.
Start and enable status page: Start and enable status page:
.. code-block:: shell .. code-block:: shell
systemctl enable --now ahriman-web sudo systemctl enable --now ahriman-web
#. #.
Add packages by using ``ahriman package-add {package}`` command: Add packages by using ``ahriman package-add {package}`` command:
+5 -5
View File
@@ -2,9 +2,9 @@
"dependencies": { "dependencies": {
"@emotion/react": ">=11.14.0 <11.15.0", "@emotion/react": ">=11.14.0 <11.15.0",
"@emotion/styled": ">=11.14.0 <11.15.0", "@emotion/styled": ">=11.14.0 <11.15.0",
"@mui/icons-material": ">=9.2.0 <9.3.0", "@mui/icons-material": ">=9.3.0 <9.4.0",
"@mui/material": ">=9.2.0 <9.3.0", "@mui/material": ">=9.3.0 <9.4.0",
"@mui/x-data-grid": ">=9.10.0 <9.11.0", "@mui/x-data-grid": ">=9.11.0 <9.12.0",
"@tanstack/react-query": ">=5.101.0 <5.102.0", "@tanstack/react-query": ">=5.101.0 <5.102.0",
"chart.js": ">=4.5.0 <4.6.0", "chart.js": ">=4.5.0 <4.6.0",
"react": ">=19.2.0 <19.3.0", "react": ">=19.2.0 <19.3.0",
@@ -26,8 +26,8 @@
"eslint-plugin-react-refresh": ">=0.5.0 <0.6.0", "eslint-plugin-react-refresh": ">=0.5.0 <0.6.0",
"eslint-plugin-simple-import-sort": ">=14.0.0 <14.1.0", "eslint-plugin-simple-import-sort": ">=14.0.0 <14.1.0",
"typescript": ">=6.0.0 <6.1.0", "typescript": ">=6.0.0 <6.1.0",
"typescript-eslint": ">=8.64.0 <8.65.0", "typescript-eslint": ">=8.67.0 <8.68.0",
"vite": ">=8.1.0 <8.2.0" "vite": ">=8.2.0 <8.3.0"
}, },
"name": "ahriman", "name": "ahriman",
"private": true, "private": true,
+1 -1
View File
@@ -19,7 +19,7 @@ export default defineConfig({
build: { build: {
chunkSizeWarningLimit: 10000, chunkSizeWarningLimit: 10000,
emptyOutDir: false, emptyOutDir: false,
outDir: path.resolve(__dirname, "../ahriman-web/package/share/ahriman/templates"), outDir: path.resolve(import.meta.dirname, "../ahriman-web/package/share/ahriman/templates"),
rolldownOptions: { rolldownOptions: {
output: { output: {
assetFileNames: "static/[name].[ext]", assetFileNames: "static/[name].[ext]",
+1
View File
@@ -266,6 +266,7 @@ description = "Build frontend HTML and JS"
allowlist_externals = [ allowlist_externals = [
"npm", "npm",
] ]
skip_install = true
commands = [ commands = [
{ replace = "ref", of = ["commands", "npm_install"], extend = true }, { replace = "ref", of = ["commands", "npm_install"], extend = true },
[ [