Skip to content

Commit b08cb86

Browse files
committed
(real aur worker fix; i think)
1 parent 76fc6ed commit b08cb86

3 files changed

Lines changed: 36 additions & 28 deletions

File tree

.github/aur/.SRCINFO

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
pkgbase = gitfetch-python
22
pkgdesc = A neofetch-style CLI tool for GitHub statistics
3-
pkgver = 1.3.2
3+
pkgver = 1.3.3
44
pkgrel = 1
55
url = https://github.com/Matars/gitfetch
66
arch = any
77
license = GPL-2.0
8-
makedepends = python-requests
9-
makedepends = python-readchar
10-
makedepends = python-pip
8+
makedepends = python-build
9+
makedepends = python-installer
10+
makedepends = python-setuptools
11+
makedepends = python-wheel
12+
depends = python
1113
depends = python-requests
1214
depends = python-readchar
13-
source = gitfetch-python-1.3.2.tar.gz::https://github.com/Matars/gitfetch/archive/refs/tags/v1.3.2.tar.gz
14-
sha256sums = 8f3ec7969798dbc929f07665d980b51d4b27d420240a249989edd2b1bda4b4c4
15+
depends = python-webcolors
16+
provides = gitfetch
17+
source = gitfetch-python-1.3.3.tar.gz::https://github.com/Matars/gitfetch/archive/refs/tags/v1.3.3.tar.gz
18+
sha256sums = SKIP
1519

1620
pkgname = gitfetch-python

.github/aur/PKGBUILD

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# Maintainer: Matar <khaledmatar19733@gmail.com>
22
pkgname=gitfetch-python
3-
pkgver=1.3.2
3+
pkgver=1.3.3
44
pkgrel=1
55
pkgdesc="A neofetch-style CLI tool for GitHub statistics"
66
arch=('any')
77
url="https://github.com/Matars/gitfetch"
88
license=('GPL-2.0')
9-
depends=("python-requests" "python-readchar")
10-
makedepends=("python-requests" "python-readchar" "python-pip")
9+
depends=("python" "python-requests" "python-readchar" "python-webcolors")
10+
makedepends=("python-build" "python-installer" "python-setuptools" "python-wheel")
1111
provides=('gitfetch')
1212
source=("$pkgname-$pkgver.tar.gz::https://github.com/Matars/gitfetch/archive/refs/tags/v$pkgver.tar.gz")
13-
sha256sums=('8f3ec7969798dbc929f07665d980b51d4b27d420240a249989edd2b1bda4b4c4')
13+
sha256sums=('SKIP')
14+
15+
build() {
16+
cd "gitfetch-$pkgver"
17+
python -m build --wheel --no-isolation
18+
}
1419

1520
package() {
1621
cd "gitfetch-$pkgver"
17-
python -m pip install --root="$pkgdir" --no-deps --no-warn-script-location .
22+
python -m installer --destdir="$pkgdir" dist/*.whl
1823
}

.github/workflows/update-aur.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ jobs:
1212

1313
steps:
1414
- name: Install dependencies
15-
run: pacman -Syu --noconfirm git openssh curl
15+
run: |
16+
# Disable pacman sandbox to avoid seccomp issues in containers
17+
sed -i 's/^#\?DisableSandboxSyscalls.*/DisableSandboxSyscalls/' /etc/pacman.conf
18+
pacman -Syu --noconfirm git openssh curl base-devel
1619
1720
- name: Checkout main repo
1821
uses: actions/checkout@v4
@@ -23,43 +26,39 @@ jobs:
2326
VERSION=$(grep '^version =' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
2427
echo "version=$VERSION" >> $GITHUB_OUTPUT
2528
26-
- name: Update PKGBUILD and .SRCINFO
29+
- name: Update PKGBUILD and generate .SRCINFO
2730
run: |
2831
VERSION=${{ steps.get_version.outputs.version }}
2932
cd .github/aur
30-
33+
3134
SOURCE_URL="https://github.com/Matars/gitfetch/archive/refs/tags/v${VERSION}.tar.gz"
3235
SHA256=$(curl -sL "$SOURCE_URL" | sha256sum | awk '{print $1}')
33-
36+
3437
sed -i "s/^pkgver=.*/pkgver=$VERSION/" PKGBUILD
3538
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
36-
sed -i "s|source=.*|source=(\"\$pkgname-\$pkgver.tar.gz::$SOURCE_URL\")|" PKGBUILD
3739
sed -i "s/^sha256sums=.*/sha256sums=('$SHA256')/" PKGBUILD
38-
39-
sed -i "s/pkgver = .*/pkgver = $VERSION/" .SRCINFO
40-
sed -i "s/pkgrel = .*/pkgrel = 1/" .SRCINFO
41-
sed -i "s|source = .*|source = gitfetch-python-$VERSION.tar.gz::$SOURCE_URL|" .SRCINFO
42-
sed -i "s/sha256sums = .*/sha256sums = $SHA256/" .SRCINFO
40+
41+
# makepkg cannot run as root, create a builder user
42+
useradd -m builder
43+
chown -R builder: .
44+
su builder -c "makepkg --printsrcinfo > .SRCINFO"
4345
4446
- name: Setup SSH for AUR
4547
run: |
4648
mkdir -p ~/.ssh
4749
echo "${{ secrets.AUR_SSH_KEY }}" > ~/.ssh/aur_key
4850
chmod 600 ~/.ssh/aur_key
49-
cat >> ~/.ssh/config << EOF
50-
Host aur.archlinux.org
51-
IdentityFile ~/.ssh/aur_key
52-
User aur
53-
EOF
51+
printf 'Host aur.archlinux.org\n IdentityFile ~/.ssh/aur_key\n User aur\n' > ~/.ssh/config
52+
chmod 600 ~/.ssh/config
5453
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
5554
5655
- name: Clone and update AUR
5756
run: |
5857
git clone ssh://aur@aur.archlinux.org/gitfetch-python.git aur-repo
59-
58+
6059
cp .github/aur/PKGBUILD aur-repo/
6160
cp .github/aur/.SRCINFO aur-repo/
62-
61+
6362
cd aur-repo
6463
git config user.name "Matar"
6564
git config user.email "khaledmatar19733@gmail.com"

0 commit comments

Comments
 (0)