diff options
author | 2021-04-02 12:04:44 +0200 | |
---|---|---|
committer | 2021-04-02 12:04:44 +0200 | |
commit | b626e67544b166813669b54835108a43ade9d2ac (patch) | |
tree | f6d9530256dd53bdd7511ff33cd3f60e0ebe1e82 /scripts | |
parent | sci-biology/abyss: version bump (diff) | |
download | sci-b626e67544b166813669b54835108a43ade9d2ac.tar.gz sci-b626e67544b166813669b54835108a43ade9d2ac.tar.bz2 sci-b626e67544b166813669b54835108a43ade9d2ac.zip |
.github/workflows: always use the latest version of repoman
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-duplicates.sh | 2 | ||||
-rwxr-xr-x | scripts/setup-and-run-repoman.sh | 30 | ||||
-rwxr-xr-x | scripts/setup-master-gentoo.sh | 10 |
3 files changed, 40 insertions, 2 deletions
diff --git a/scripts/check-duplicates.sh b/scripts/check-duplicates.sh index d8e56463e..3f1c38329 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=( @@ -73,6 +72,5 @@ if [[ -n ${PKG_EXACT_MATCH} ]]; then printf "\nERROR: The following packages override packages in the main Gentoo repository:\n" printf "${PKG_EXACT_MATCH}" printf "Please remove these packages.\n" - # do not fatally exit # exit 1 fi 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 diff --git a/scripts/setup-master-gentoo.sh b/scripts/setup-master-gentoo.sh new file mode 100755 index 000000000..a2939721a --- /dev/null +++ b/scripts/setup-master-gentoo.sh @@ -0,0 +1,10 @@ +#! /usr/bin/env bash +# Maintainer: Andrew Ammerlaan <andrewammerlaan@riseup.net> +# +# Fetch and setup the latest ::gentoo + +sudo mkdir -p /var/db/repos/gentoo /etc/portage /var/cache/distfiles +wget -qO - "https://github.com/gentoo-mirror/gentoo/archive/master.tar.gz" | sudo tar xz -C /var/db/repos/gentoo --strip-components=1 +sudo wget "https://www.gentoo.org/dtd/metadata.dtd" -O /var/cache/distfiles/metadata.dtd +sudo wget "https://gitweb.gentoo.org/proj/portage.git/plain/cnf/repos.conf" -O /etc/portage/repos.conf +sudo ln -s /var/db/repos/gentoo/profiles/default/linux/amd64/17.1 /etc/portage/make.profile |