Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions .github/workflows/docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: |
pip3 install --upgrade pip
cd kernelci-core
python3 -m pip install '.[dev]' --break-system-packages
python3 -m pip install -r requirements-dev.txt --break-system-packages
sudo cp -R config /etc/kernelci/
- name: Cache apt packages
uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # v1.5.4
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
run: |
pip3 install --upgrade pip
cd kernelci-core
python3 -m pip install '.[dev]' --break-system-packages
python3 -m pip install -r requirements-dev.txt --break-system-packages
sudo cp -R config /etc/kernelci/
- name: Cache apt packages
uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # v1.5.4
Expand Down Expand Up @@ -202,4 +202,3 @@ jobs:
DHNAME=$(./kci docker name --prefix=kernelci/staging- ${{ matrix.kcicmd }})
docker tag $NAME $DHNAME
docker push $DHNAME

17 changes: 17 additions & 0 deletions kernelci/kbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,16 @@ def _build_with_tuxmake(self):
tuxmake_cmd = " ".join(cmd_parts)
print(f"[_build_with_tuxmake] Command: {tuxmake_cmd}")
print(f"[_build_with_tuxmake] Output directory: {self._af_dir}")
# rpm defaults to /var/lib/rpm which a non-root build user cannot
# write to. Redirect _dbpath and _topdir into the workspace via
# ~/.rpmmacros so rpmdb and any rpmbuild invoked by tuxmake's
# *rpm-pkg targets share a writable location.
rpm_root = f"{self._workspace}/rpm"
self.addcmd(f"mkdir -p {rpm_root}/db {rpm_root}/build")
self.addcmd(
f"printf '%%_dbpath {rpm_root}/db\\n"
f"%%_topdir {rpm_root}/build\\n' > $HOME/.rpmmacros"
)
self.addcmd("rpmdb --initdb 2>/dev/null || true")
self.addcmd("stage=1") # stage 1 failure is build failure
self.addcmd(tuxmake_cmd)
Expand All @@ -868,6 +878,13 @@ def _build_with_tuxmake(self):
f"fi"
)

# Collect any rpm/srpm artifacts produced under our _topdir
# (set in ~/.rpmmacros above) so they land in af_dir for upload.
self.addcmd(
f"find {rpm_root}/build \\( -name '*.rpm' -o -name '*.src.rpm' \\) "
f"-exec cp {{}} {self._af_dir}/ \\; 2>/dev/null || true"
)

self.addcmd("cd ..")

if not self._dtbs_check and self._kselftest:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dev = [
"mypy==1.19.1",
"pre-commit==4.3.0",
"pytest-mock==3.15.1",
"ruff >= 0.9.0",
"ruff==0.11.5",
"types-PyYAML==6.0.12.20250915",
"types-requests==2.32.4.20260107",
"types-urllib3==1.26.25.14",
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mypy==1.19.1
pre-commit==4.3.0
pytest-mock==3.15.1
ruff>=0.9.0
ruff==0.11.5
types-PyYAML==6.0.12.20250915
types-requests==2.32.4.20260107
types-urllib3==1.26.25.14
Loading