2 Commits

Author SHA1 Message Date
bda9bc5aa5 0.3.2: resolve package names to Arch git repos
All checks were successful
App Image CI / Build app image (push) Successful in -1m0s
Docker Image CI / Build build images (arch) (push) Successful in -6s
Docker Image CI / Build build images (artix) (push) Successful in -28s
NPM Audit Check / Check NPM audit (push) Successful in -2m6s
2025-12-14 00:25:55 -05:00
adb7400e87 add DisableSandbox to pacman.conf
All checks were successful
App Image CI / Build app image (push) Successful in -1m19s
Docker Image CI / Build build images (arch) (push) Successful in -7s
Docker Image CI / Build build images (artix) (push) Successful in -25s
NPM Audit Check / Check NPM audit (push) Successful in -2m7s
2025-12-14 00:17:05 -05:00
6 changed files with 16 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
FROM node:23-alpine AS base FROM node:24-alpine AS base
FROM base AS build-env FROM base AS build-env
WORKDIR /build WORKDIR /build

View File

@@ -18,6 +18,7 @@ NoProgressBar
VerbosePkgLists VerbosePkgLists
ParallelDownloads = 5 ParallelDownloads = 5
DownloadUser = alpm DownloadUser = alpm
DisableSandbox
SigLevel = Required DatabaseOptional SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional LocalFileSigLevel = Optional

View File

@@ -18,6 +18,7 @@ NoProgressBar
VerbosePkgLists VerbosePkgLists
ParallelDownloads = 5 ParallelDownloads = 5
DownloadUser = alpm DownloadUser = alpm
DisableSandbox
SigLevel = Required DatabaseOptional SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional LocalFileSigLevel = Optional

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "archery", "name": "archery",
"version": "0.3.1", "version": "0.3.2",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "archery", "name": "archery",
"version": "0.3.1", "version": "0.3.2",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"body-parser": "^2.2.1", "body-parser": "^2.2.1",

View File

@@ -1,6 +1,6 @@
{ {
"name": "archery", "name": "archery",
"version": "0.3.1", "version": "0.3.2",
"description": "Build Arch packages through a web interface", "description": "Build Arch packages through a web interface",
"keywords": [ "keywords": [
"docker", "docker",

View File

@@ -53,13 +53,20 @@ function splitLines(lines: LogChunk[]) {
return lines.map(logChunk => logChunk.chunk.split('\n')).flat().map(line => line.substring(line.lastIndexOf('\r') + 1)); return lines.map(logChunk => logChunk.chunk.split('\n')).flat().map(line => line.substring(line.lastIndexOf('\r') + 1));
} }
function resolvePackageRepo(repo: string) {
if (/^[a-zA-Z]+:\/\//.test(repo) || repo.toLowerCase().endsWith('.git')) {
return repo;
}
return `https://gitlab.archlinux.org/archlinux/packaging/packages/${repo}.git`;
}
class Web { class Web {
private _webserver: http.Server | null = null; private _webserver: http.Server | null = null;
private db: DB; private db: DB;
private buildController: BuildController; private buildController: BuildController;
private app: expressWs.Application; private app: expressWs.Application;
private port: number; private port: number;
private options:WebConfig; private options: WebConfig;
constructor(options: WebConfig = {}) { constructor(options: WebConfig = {}) {
this.options = options; this.options = options;
@@ -268,7 +275,7 @@ class Web {
app.post('/build{/}', async (req, res) => { app.post('/build{/}', async (req, res) => {
const buildId = await this.db.createBuild( const buildId = await this.db.createBuild(
req.body.repo, resolvePackageRepo(req.body.repo),
req.body.commit || null, req.body.commit || null,
req.body.patch || null, req.body.patch || null,
req.body.distro || 'arch', req.body.distro || 'arch',
@@ -299,7 +306,7 @@ class Web {
app.post('/build/:id/persist', async (req, res) => { app.post('/build/:id/persist', async (req, res) => {
const build = await this.db.getBuild(sqids.decode(req.params.id)?.[0]); const build = await this.db.getBuild(sqids.decode(req.params.id)?.[0]);
const persist = !! req?.body?.persist; const persist = !!req?.body?.persist;
if (!build) { if (!build) {
res.sendStatus(404); res.sendStatus(404);
return; return;