Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2dddcfc
Add AGENTS.md with attribution requirements for AI-assisted commits
samip5 Nov 5, 2025
22a631c
Add automation scripts for kernel ebuild generation and manifest mana…
samip5 Nov 5, 2025
45c8a4c
Add GitHub Actions workflow for automatic manifest regeneration
samip5 Nov 5, 2025
a1b71dd
Merge branch 'master' into kernel_bump_and_ci
samip5 Nov 5, 2025
02acb5c
Merge branch 'master' into kernel_bump_and_ci
samip5 Nov 5, 2025
2edb7d8
Add Docker-compatible sandbox settings and binary package caching
samip5 Nov 5, 2025
9bdd9d1
Fix working directory for git commands in CI workflow
samip5 Nov 5, 2025
17f1afd
ci: checkout the repo just step before it needs to be used.
samip5 Nov 5, 2025
6c05fe4
ci: That checksum wouldn't really work.
samip5 Nov 5, 2025
7bb5d9f
Update workflow to use action-changed-files action
samip5 Nov 5, 2025
55b8e00
Update manifest regeneration workflow to use correct action outputs
samip5 Nov 5, 2025
f7720e4
Simplify manifest change detection and commit logic
samip5 Nov 5, 2025
96db6ba
ci: Add git config
samip5 Nov 5, 2025
1946083
ci: Try to get it to work
samip5 Nov 5, 2025
2f84a4c
ci: Try to get it to work, part two
samip5 Nov 5, 2025
fbb794b
ci: Try to get it to work, part three
samip5 Nov 5, 2025
6a81b53
ci: Try to get it to work, part four
samip5 Nov 5, 2025
8863c2e
ci: Try to get it to work, part five
samip5 Nov 5, 2025
016f4bb
Update REQUIRED_USE handling for EAPI 8 compatibility
samip5 Nov 5, 2025
9fbbc23
ci: Some more tweaks
samip5 Nov 5, 2025
3fc5bf5
ci: Some more tweaks, part two
samip5 Nov 5, 2025
91bf6e3
ci: Some more tweaks, part three
samip5 Nov 5, 2025
2a88ba2
ci: Some more tweaks, part four
samip5 Nov 5, 2025
cd008b0
ci: Some more tweaks, part four.5
samip5 Nov 5, 2025
739bb73
ci: Some more tweaks, part five
samip5 Nov 5, 2025
9f6096b
ci: Some more tweaks, part six
samip5 Nov 5, 2025
55c44f2
sys-kernel/raspberrypi-kernel: Yeet old version that doesn't probably…
samip5 Nov 5, 2025
7f38e38
Regenerate manifests for modified ebuilds
github-actions[bot] Nov 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 61 additions & 66 deletions .github/workflows/regenerate-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,79 @@ on:
workflow_dispatch:

jobs:
regenerate-manifests:
regenerate:
runs-on: ubuntu-latest
container:
image: gentoo/stage3:latest
options: --privileged

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Gentoo packages
uses: actions/cache@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: |
/var/db/repos/gentoo
/var/cache/binpkgs
key: gentoo-${{ runner.os }}
restore-keys: |
gentoo-${{ runner.os }}

- name: Configure Gentoo environment
run: |
# Disable sandbox features that don't work in Docker
cat >> /etc/portage/make.conf <<EOF
FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox"
FEATURES="\${FEATURES} buildpkg"
EMERGE_DEFAULT_OPTS="--usepkg --binpkg-respect-use=y"
EOF

# Sync portage tree (minimal sync)
emerge-webrsync || emerge --sync
if [ ! -d "/var/db/repos/gentoo/profiles" ]; then
emerge-webrsync || emerge --sync
else
echo "Portage tree already synced (from cache)"
fi

# Install dev-util/pkgdev for manifest generation
emerge dev-util/pkgdev

- name: Find modified ebuilds
id: find-ebuilds
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Verify repository is in container
run: |
# Find modified and new ebuild files
MODIFIED_EBUILDS=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep '\.ebuild$' || true)
echo "Running in directory: $(pwd)"
echo "Workspace contents:"
ls -lA

if [ -z "$MODIFIED_EBUILDS" ]; then
echo "No modified ebuild files found."
echo "has_changes=false" >> $GITHUB_OUTPUT
exit 0
fi
- name: Configure Git
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Find modified files
uses: bjw-s-labs/action-changed-files@v0.4.1
id: find-changed
with:
patterns: '**/*.ebuild'

echo "Modified ebuilds:"
echo "$MODIFIED_EBUILDS"
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "ebuilds<<EOF" >> $GITHUB_OUTPUT
echo "$MODIFIED_EBUILDS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Fix distfiles permissions
run: |
mkdir -p /var/cache/distfiles
chown portage:portage /var/cache/distfiles
chmod 775 /var/cache/distfiles

- name: Regenerate manifests
if: steps.find-ebuilds.outputs.has_changes == 'true'
if: steps.find-changed.outputs.changed_files
run: |
# Set the repository location
export PORTDIR_OVERLAY="${GITHUB_WORKSPACE}"

echo "${{ steps.find-ebuilds.outputs.ebuilds }}" | while read -r EBUILD; do
# Process each modified ebuild
echo "${{ steps.find-changed.outputs.changed_files }}" | tr ' ' '\n' | while read -r EBUILD; do
EBUILD=$(echo "$EBUILD" | tr -d "[]'")
if [ -z "$EBUILD" ]; then
continue
fi
Expand All @@ -77,49 +103,18 @@ jobs:
echo "✓ Manifest generated for $EBUILD"
done

- name: Check for manifest changes
if: steps.find-ebuilds.outputs.has_changes == 'true'
id: check-changes
run: |
if git diff --quiet '**/Manifest'; then
echo "No manifest changes detected."
echo "manifests_changed=false" >> $GITHUB_OUTPUT
else
echo "Manifest changes detected:"
git diff --name-only '**/Manifest'
echo "manifests_changed=true" >> $GITHUB_OUTPUT
fi

- name: Commit and push manifest changes
if: steps.check-changes.outputs.manifests_changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Add all Manifest files
git add '**/Manifest'

# Commit
git commit -m "chore: regenerate manifests

🤖 Generated with GitHub Actions"

# Push to the PR branch
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.find-changed.outputs.changed_files
uses: EndBug/add-and-commit@v9.1.4
with:
message: "Regenerate manifests for modified ebuilds"
add: '**/Manifest'
author_name: 'github-actions[bot]'
author_email: 'github-actions[bot]@users.noreply.github.com'
push: true

- name: Summary
if: steps.find-ebuilds.outputs.has_changes == 'true'
if: steps.find-changed.outputs.changed_files
run: |
echo "## Manifest Regeneration Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

if [ "${{ steps.check-changes.outputs.manifests_changed }}" == "true" ]; then
echo "✅ Manifests were regenerated and committed to the PR" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Modified Manifests:" >> $GITHUB_STEP_SUMMARY
git diff HEAD~1 --name-only '**/Manifest' | sed 's/^/- /' >> $GITHUB_STEP_SUMMARY
else
echo "ℹ️ No manifest changes were needed" >> $GITHUB_STEP_SUMMARY
fi
echo "✅ Manifests regenerated for modified ebuilds" >> $GITHUB_STEP_SUMMARY
13 changes: 13 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Attribution Requirements

AI agents must disclose what tool and model they are using in the "Assisted-by" commit footer:

```text
Assisted-by: [Model Name] via [Tool Name]
```

Example:

```text
Assisted-by: GLM 4.6 via Claude Code
```
6 changes: 5 additions & 1 deletion eclass/pikernel-build.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
inherit kernel-build

IUSE="+bcm2711 +bcm2712 -initramfs"
REQUIRED_USE="|| ( bcm2711 bcm2712)"
if [[ ${EAPI} == 8 ]]; then
REQUIRED_USE+=" || ( bcm2711 bcm2712 )"
else
REQUIRED_USE+=" bcm2711? ( bcm2711 ) bcm2712? ( bcm2712 )"
fi

SLOT="0"

Expand Down
Loading