Fix mockbuild user missing in chroot
The AlmaLinux 10 mock base config does not create the mockbuild user inside the chroot, causing 'Failed to resolve user mockbuild' during SRPM installation. Add explicit user creation via mock --chroot after --init, and use --scrub=all + --no-clean to prevent stale state from interfering.
This commit is contained in:
parent
a55dbbd764
commit
ea2a9b2d96
1 changed files with 6 additions and 8 deletions
|
|
@ -50,7 +50,7 @@ jobs:
|
|||
|
||||
- name: Build RPM with mock
|
||||
run: |
|
||||
cat > /tmp/mock-custom.cfg <<'MOCKEOF'
|
||||
cat > /etc/mock/custom.cfg <<'MOCKEOF'
|
||||
include('/etc/mock/alma+epel-10-x86_64.cfg')
|
||||
config_opts['root'] = 'custom'
|
||||
config_opts['yum.conf'] += """
|
||||
|
|
@ -71,13 +71,11 @@ jobs:
|
|||
enabled=1
|
||||
"""
|
||||
MOCKEOF
|
||||
cp /tmp/mock-custom.cfg /etc/mock/custom.cfg
|
||||
mock --root custom --scrub=chroot || true
|
||||
mock \
|
||||
--root custom \
|
||||
--resultdir "${HOME}/mock-results" \
|
||||
--clean \
|
||||
--rebuild "${{ env.SRPM_PATH }}"
|
||||
|
||||
mock --root custom --scrub=all || true
|
||||
mock --root custom --init
|
||||
mock --root custom --chroot 'groupadd -g 135 mock 2>/dev/null || true; useradd -u 135 -g 135 -d /builddir -s /bin/bash mockbuild 2>/dev/null || true'
|
||||
mock --root custom --resultdir "${HOME}/mock-results" --no-clean --rebuild "${{ env.SRPM_PATH }}"
|
||||
|
||||
- name: Upload RPMs to Forgejo Package Registry
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue