Skip to content

.github: workflows: rebase-and-build.yml: add#26

Open
DaniilKl wants to merge 1 commit intomasterfrom
add-rebase-workflow
Open

.github: workflows: rebase-and-build.yml: add#26
DaniilKl wants to merge 1 commit intomasterfrom
add-rebase-workflow

Conversation

@DaniilKl
Copy link
Copy Markdown

Related to TrenchBoot/.github#16 .

@DaniilKl DaniilKl marked this pull request as draft April 10, 2026 19:00
Comment thread .github/workflows/rebase-and-build.yml Outdated
Comment thread .github/workflows/rebase-and-build.yml Outdated
Comment thread .github/workflows/rebase-and-build.yml Outdated
@DaniilKl DaniilKl force-pushed the add-rebase-workflow branch 3 times, most recently from 976adbe to e87d261 Compare April 14, 2026 16:14
@DaniilKl DaniilKl changed the base branch from aem-next to master April 14, 2026 16:15
@DaniilKl DaniilKl force-pushed the add-rebase-workflow branch 2 times, most recently from 15e1a9d to ea0cec8 Compare April 15, 2026 09:36
@DaniilKl DaniilKl marked this pull request as ready for review April 15, 2026 09:36
@DaniilKl DaniilKl force-pushed the add-rebase-workflow branch from ea0cec8 to c268f01 Compare April 15, 2026 09:44
@DaniilKl DaniilKl force-pushed the add-rebase-workflow branch from c268f01 to 4976812 Compare April 15, 2026 10:08
DaniilKl added a commit to TrenchBoot/.github that referenced this pull request Apr 15, 2026
This is because it is being used in other TrenchBoot repos as well but
on other branches because of:

TrenchBoot/grub#32
TrenchBoot/qubes-antievilmaid#15
TrenchBoot/xen#26

IMHO there is no reason to mention every use of this workflow.

Signed-off-by: Danil Klimuk <[email protected]>
@DaniilKl DaniilKl force-pushed the add-rebase-workflow branch from 4976812 to 445d8b0 Compare April 15, 2026 12:59
DaniilKl added a commit to TrenchBoot/.github that referenced this pull request Apr 15, 2026
This is because it is being used in other TrenchBoot repos as well but
on other branches because of:

TrenchBoot/grub#32
TrenchBoot/qubes-antievilmaid#15
TrenchBoot/xen#26

IMHO there is no reason to mention every use of this workflow.

Signed-off-by: Danil Klimuk <[email protected]>
DaniilKl added a commit to TrenchBoot/.github that referenced this pull request Apr 15, 2026
This is because it is being used in other TrenchBoot repos as well but
on other branches because of:

TrenchBoot/grub#32
TrenchBoot/qubes-antievilmaid#15
TrenchBoot/xen#26

IMHO there is no reason to mention every use of this workflow.

Signed-off-by: Danil Klimuk <[email protected]>
DaniilKl added a commit to TrenchBoot/.github that referenced this pull request Apr 15, 2026
This is because it is being used in other TrenchBoot repos as well but
on other branches because of:

TrenchBoot/grub#32
TrenchBoot/qubes-antievilmaid#15
TrenchBoot/xen#26

IMHO there is no reason to mention every use of this workflow.

Signed-off-by: Danil Klimuk <[email protected]>
Comment thread .github/workflows/rebase.yml Outdated
@DaniilKl DaniilKl force-pushed the add-rebase-workflow branch 2 times, most recently from 8dcb580 to 93194e3 Compare April 16, 2026 08:56
We cannot simply rebase commits from TrenchBoot/xen on top of the
commits in the QubesOS/qubes-vmm-xen, because:

1. The actual history for xen component is held in patches in the
   QubesOS/qubes-vmm-xen repository, so we need to do a convertion from
   patches to commits every time we want to try to rebase.
2. We want to track the changes to the other files from the
   QubesOS/qubes-vmm-xen except the patches for the xen component, as
   versions of these files might be closesly related to the changes in
   the patches for the xen component.

Other changes that should be done due to history format difference
between the QubesOS/qubes-vmm-xen and TrenchBoot/xen should be resolved
by TrenchBoot maintainers in the same way done in the follwoing commit:

TrenchBoot/grub@2f477ee

Except from the above, there are three workarounds:

1. The "Fix malformed patch header (split URL line in 0627 patch)",
   otherwise git will not apple the patch.
2. Renaming QubesOS/qubes-vmm-xen/config to
   TrenchBoot/xen/config-qubesos, so it will not conflict with an
   already exesting directory "config" in the xen source code.
3. Renaming QubesOS/qubes-vmm-xen/xen.spec.in to
   QubesOS/qubes-vmm-xen/vmm-xen.spec.in. This is done because the
   qubes-dom0-packagev2.yml expects the file to have name
   ${{ inputs.qubes-component }}.spec.in and the correct name for this
   component in QubesOS is vmm-xen, not xen.

Signed-off-by: Danil Klimuk <[email protected]>
@DaniilKl DaniilKl force-pushed the add-rebase-workflow branch from 93194e3 to 7f4daed Compare April 16, 2026 10:58
Copy link
Copy Markdown

@m-iwanicki m-iwanicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Pass commit message through a spellchecker

run: |
git remote add upstream https://xenbits.xenproject.org/git-http/xen.git
git fetch upstream "refs/tags/${UPSTREAM_TAG}:refs/tags/${UPSTREAM_TAG}"
- name: Fix malformed patch header (split URL line in 0627 patch)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe sed -n '/^From: /,$p' | git am for every patch to just remove everything before From: would work? As those parts are lost anyway during commit. That way you won't have to add hardcoded workarounds for single patch. Not only that but this patch name or number can change (e.g. it's 0268 on Trenchboot fork)

- name: Checkout downstream xen repository
uses: actions/checkout@v6
with:
repository: trenchboot/xen
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
repository: trenchboot/xen
repository: TrenchBoot/xen

done
- name: Copy QubesOS RPM files to downstream repository, rename spec.in
run: |
mv qubes-vmm-xen/config qubes-vmm-xen/config-qubesos
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why rename? Maybe short comment?

name: Rebase and build the last successful automatic rebase of aem-next branch

on:
workflow_dispatch:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add dry_run flag that'll do rebase but skip bulding/publishing? So we can at least partially test this in the future?

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 6'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if cron + workflow_dispatch won't conflict (race condition). Maybe add concurrency?

ref: 'master'
inputs: >-
--input GITHUB_REPO=xen
--input GITHUB_SHA=${{ github.sha }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run: |
mv qubes-vmm-xen/config qubes-vmm-xen/config-qubesos
sed -i 's/^Source3:[[:space:]]*config$/Source3: config-qubesos/' qubes-vmm-xen/xen.spec.in
cp -r qubes-vmm-xen/* xen/
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if you replace some already existing, important files (maybe not currently but in the future)?

git commit -m "QubesOS RPM files and Qubes builder metadata"
- name: Push qubes-vmm-xen-with-patches branch to downstream
working-directory: xen
run: git push origin qubes-vmm-xen-with-patches-rebase-prep
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this will fail if this branch already exists and cleanup-after-rebase-attempt didn't run (because previous job failed)

ref: 'aem-next-rebased'
- name: Read version of the QubesOS Component from version file
id: read-version
run: echo "version=$(cat version)" >> $GITHUB_OUTPUT
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
run: echo "version=$(cat version)" >> $GITHUB_OUTPUT
run: echo "version=$(cat version)" >> "$GITHUB_OUTPUT"

actionlint suggestion

@@ -0,0 +1,137 @@
name: Rebase and build the last successful automatic rebase of aem-next branch
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we want Qubes patches on aem-next branch? We are/were using this branch for e.g. upstreaming Trenchboot changes. Maybe separate qubes+aem-next branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants