Browse Source

.github/workflows: always use the latest version of repoman

Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
master
Andrew Ammerlaan 2 months ago
parent
commit
b626e67544
No known key found for this signature in database GPG Key ID: A19F636CD4EDBCD1
6 changed files with 46 additions and 28 deletions
  1. +1
    -5
      .github/workflows/duplicates.yml
  2. +1
    -3
      .github/workflows/pkgcheck.yml
  3. +4
    -18
      .github/workflows/repoman.yml
  4. +0
    -2
      scripts/check-duplicates.sh
  5. +30
    -0
      scripts/setup-and-run-repoman.sh
  6. +10
    -0
      scripts/setup-master-gentoo.sh

+ 1
- 5
.github/workflows/duplicates.yml View File

@ -15,11 +15,7 @@ jobs:
- uses: actions/checkout@v2
- name: Setup master gentoo repository
run: |
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
./scripts/setup-master-gentoo.sh
- name: Check for duplicates
run: |
./scripts/check-duplicates.sh

+ 1
- 3
.github/workflows/pkgcheck.yml View File

@ -12,9 +12,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: Run pkgcheck
uses: pkgcore/pkgcheck-action@v1
with:


+ 4
- 18
.github/workflows/repoman.yml View File

@ -13,24 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Setup repoman
run: |
python -m pip install --upgrade pip
pip install lxml pyyaml
wget -qO - "https://github.com/gentoo/portage/archive/portage-3.0.17.tar.gz" | tar xz
sudo groupadd -g 250 portage
sudo useradd -g portage -d /var/tmp/portage -s /bin/false -u 250 portage
- name: Setup master gentoo repository
run: |
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
- name: Test with repoman
./scripts/setup-master-gentoo.sh
- name: Setup and run Repoman
run: |
python3 portage-portage-3.0.17/repoman/bin/repoman full -dx
./scripts/setup-and-run-repoman.sh

+ 0
- 2
scripts/check-duplicates.sh View File

@ -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

+ 30
- 0
scripts/setup-and-run-repoman.sh View File

@ -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

+ 10
- 0
scripts/setup-master-gentoo.sh View File

@ -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

Loading…
Cancel
Save