Skip to content

Commit

Permalink
Drop the %_dbpath override from our test-container
Browse files Browse the repository at this point in the history
This override exists to make system rpmdb accessible in eg "make shell"
but it causes complications wrt the prefix (see below + next commits) and
also masks test bugs (see previous commits).

We can resurrect this functionality later on if we find solutions that
avoid the issues.

This is the first step to fixing rpm-software-management#3521.
  • Loading branch information
pmatilai committed Jan 17, 2025
1 parent ae2a61a commit 995b4a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tests/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ RUN rm -f /usr/lib/rpm/macros.d/macros.transaction_ima
RUN dnf -y --enablerepo=updates install "sequoia-sq >= 1.0"
RUN dnf clean all

RUN echo "%_dbpath $(rpm --eval '%_dbpath')" > /root/.rpmmacros

# Workaround for pkgconf(1)'s unlisted dependency on rpm.
# This is needed for cmake to work without an rpm installation.
RUN ln -sf $(rpm --eval '%{_target_platform}%{?_gnu}')-pkg-config \
Expand Down
6 changes: 6 additions & 0 deletions tests/mktree.common
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ make_install()
mkdir -p $DESTDIR/build
ln -sf ../data/SOURCES $DESTDIR/build/

# setup an empty db that all tests are pointed to by default
dbpath="/var/lib/rpm-testsuite"
mkdir -p $DESTDIR/$dbpath
echo "%_dbpath $dbpath" > $DESTDIR/@CMAKE_INSTALL_FULL_SYSCONFDIR@/rpm/macros.db
rpmdb --dbpath $DESTDIR/$dbpath --initdb

# append in case Dockerfile put something in there already
cat @CMAKE_CURRENT_SOURCE_DIR@/data/macros.testenv >> $DESTDIR/root/.rpmmacros
# gpg-connect-agent is very, very unhappy if this doesn't exist
Expand Down

0 comments on commit 995b4a3

Please sign in to comment.