Skip to content

docker: initialise the rpm database in the container image - #3180

Merged
nuclearcat merged 1 commit into
kernelci:mainfrom
bhcopeland:move-rpmdb-init-to-container
Aug 7, 2026
Merged

docker: initialise the rpm database in the container image#3180
nuclearcat merged 1 commit into
kernelci:mainfrom
bhcopeland:move-rpmdb-init-to-container

Conversation

@bhcopeland

Copy link
Copy Markdown
Member

The rpm database that tuxmake's *rpm-pkg targets need was created by 'rpmdb --initdb' at the start of every build. It does not change between builds, so create it once in the kernelci docker fragment instead.

/var/lib/rpm is not writable by the build user, so the database lives under the kernelci home directory and ~/.rpmmacros points _dbpath at it via %{getenv:HOME}. _topdir stays in the per-build workspace, since rpmbuild output is collected from there into the artifacts directory.

The initdb is tolerant of rpm being missing, as images built from base/python.jinja2 do not install it.

The rpm database that tuxmake's *rpm-pkg targets need was created by
'rpmdb --initdb' at the start of every build. It does not change
between builds, so create it once in the kernelci docker fragment
instead.

/var/lib/rpm is not writable by the build user, so the database lives
under the kernelci home directory and ~/.rpmmacros points _dbpath at
it via %{getenv:HOME}. _topdir stays in the per-build workspace, since
rpmbuild output is collected from there into the artifacts directory.

The initdb is tolerant of rpm being missing, as images built from
base/python.jinja2 do not install it.

Signed-off-by: Ben Copeland <ben.copeland@linaro.org>
@bhcopeland
bhcopeland requested review from nuclearcat and roxell August 6, 2026 14:58
@roxell

roxell commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Yes that was what I meant with my comment in #3178

@bhcopeland

Copy link
Copy Markdown
Member Author

Thanks @roxell (I split the pr's out on purpose)

@nuclearcat

Copy link
Copy Markdown
Member

@nuclearcat
nuclearcat added this pull request to the merge queue Aug 7, 2026
Merged via the queue into kernelci:main with commit 9bcd487 Aug 7, 2026
3 checks passed
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.

3 participants