aboutsummaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-07-26 00:29:11 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-07-26 00:29:11 +0200
commitcc9cc8b245bc785a44e3fe37ca59960d5eb604cd (patch)
treef86564f42fc45b6337c391f1b9e9e7a26c954e9b /debug
parentb73de1d5904a9c6f29b619675c54a0bca1802168 (diff)
downloadaurbuilder-cc9cc8b245bc785a44e3fe37ca59960d5eb604cd.tar.gz
move testscripts to own folder
Diffstat (limited to 'debug')
-rwxr-xr-xdebug/build.sh9
-rwxr-xr-xdebug/manage_repository.sh11
-rwxr-xr-xdebug/testrun.sh17
3 files changed, 37 insertions, 0 deletions
diff --git a/debug/build.sh b/debug/build.sh
new file mode 100755
index 0000000..f9fef13
--- /dev/null
+++ b/debug/build.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+DOCKER=podman
+
+#podman image prune
+
+$DOCKER pull archlinux:base-devel
+$DOCKER build --no-cache -t aurbuilder ../container/
+#$DOCKER build -t aurbuilder docker/
diff --git a/debug/manage_repository.sh b/debug/manage_repository.sh
new file mode 100755
index 0000000..5f0f01b
--- /dev/null
+++ b/debug/manage_repository.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#Custom_local_repository
+
+OUTDIR="testrun/db/"
+PKGDIR="testrun/pkgout/"
+
+mkdir -p "$OUTDIR"
+
+repo-add -p -R "$OUTDIR/repo.db.tar.gz" "$PKGDIR/"*.pkg.*
+
+rm "$OUTDIR/"*.old
diff --git a/debug/testrun.sh b/debug/testrun.sh
new file mode 100755
index 0000000..2329cf5
--- /dev/null
+++ b/debug/testrun.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+DOCKER=podman
+
+mkdir -p testrun/pkgout
+
+CHOWN_TO="$USER"
+OUTPUT="$(pwd)/testrun/pkgout"
+
+#./build.sh
+
+$DOCKER run --userns=host --name archpkg-test --env PACKAGE_NAME=minipro \
+ --env FORCE_REBUILD=yes --env CHOWN="$(id -u "$CHOWN_TO"):$(id -g "$CHOWN_TO")" \
+ -v "$OUTPUT:/pkgout:z" \
+ aurbuilder
+
+$DOCKER rm archpkg-test