aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@riseup.net>2021-04-02 09:16:15 +0200
committerAndrew Ammerlaan <andrewammerlaan@riseup.net>2021-04-02 11:52:30 +0200
commit292e03dc22ddc1d5a3bf143d311344f8cc0d9f75 (patch)
tree035196614689158c47d0009a96efb42ed1f415ef /scripts
parentapp-arch/tarlz: use := slot-operator for lzlib (diff)
downloadguru-292e03dc22ddc1d5a3bf143d311344f8cc0d9f75.tar.gz
guru-292e03dc22ddc1d5a3bf143d311344f8cc0d9f75.tar.bz2
guru-292e03dc22ddc1d5a3bf143d311344f8cc0d9f75.zip
.github/workflows/repoman.yml: Use script to auto run the latest rm
By using a seperate script instead of running everything in the yml file, we gain the ability to use and manipulate variables. This means that we can now automatically run the latest version of repoman, which should make this more hands-off by removing the need to update this every now and then. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-duplicates.sh1
-rwxr-xr-xscripts/setup-and-run-repoman.sh30
2 files changed, 30 insertions, 1 deletions
diff --git a/scripts/check-duplicates.sh b/scripts/check-duplicates.sh
index 8c6743bbd..ddd63fa68 100755
--- a/scripts/check-duplicates.sh
+++ b/scripts/check-duplicates.sh
@@ -4,7 +4,6 @@
#
# This checks for potential and exact package matches within an overlay & ::gentoo
# Note that this is not going to be 100% accurate
-#
GENTOO_DIR="/var/db/repos/gentoo"
GENTOO_PACKAGES=(
diff --git a/scripts/setup-and-run-repoman.sh b/scripts/setup-and-run-repoman.sh
new file mode 100755
index 000000000..f6607549d
--- /dev/null
+++ b/scripts/setup-and-run-repoman.sh
@@ -0,0 +1,30 @@
+#! /usr/bin/env bash
+# Maintainer: Andrew Ammerlaan <andrewammerlaan@riseup.net>
+#
+# This sets up repoman and runs the latest version
+#
+# TODO: Force repoman to output in colour
+
+### Setup prerequisites
+python3 -m pip install --upgrade pip
+pip install lxml pyyaml
+sudo groupadd -g 250 portage
+sudo useradd -g portage -d /var/tmp/portage -s /bin/false -u 250 portage
+
+### Sync the portage repository
+git clone https://github.com/gentoo/portage.git
+cd portage
+
+# Get all versions, and read into array
+mapfile -t RM_VERSIONS < <( git tag | grep repoman | sort -u )
+
+# Select latests version (last element in array)
+RM_VERS="${RM_VERSIONS[-1]}"
+
+# Checkout this version
+git checkout tags/${RM_VERS} -b ${RM_VERS}
+
+cd ..
+
+### Run repoman
+python3 portage/repoman/bin/repoman -dx full