[MDEV-24996] file conflict in rpm packages Created: 2020-10-22  Updated: 2021-05-24  Resolved: 2021-05-22

Status: Closed
Project: MariaDB Server
Component/s: Packaging
Affects Version/s: 10.2
Fix Version/s: 10.2.39, 10.3.30, 10.4.20, 10.5.11

Type: Bug Priority: Critical
Reporter: Timofey Turenko Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

Tried to build 10.2 (using 3.16.4) and then install it:

STDERR: Error: Transaction test error:
  file /usr/share/man/man1 from install of MariaDB-client-10.2.35-1.el8.x86_64 conflicts with file from package filesystem-3.8-2.el8.x86_64
  file /usr/share/man/man1 from install of MariaDB-server-10.2.35-1.el8.x86_64 conflicts with file from package filesystem-3.8-2.el8.x86_64
  file /usr/share/man/man8 from install of MariaDB-server-10.2.35-1.el8.x86_64 conflicts with file from package filesystem-3.8-2.el8.x86_64
  file /usr/lib/sysusers.d from install of MariaDB-server-10.2.35-1.el8.x86_64 conflicts with file from package systemd-239-31.el8_2.2.x86_64
---- End output of ["dnf", "-y", "install", "MariaDB-server-0:10.2.35-1.el8.x86_64"] ----
Ran ["dnf", "-y", "install", "MariaDB-server-0:10.2.35-1.el8.x86_64"] returned 1

short investigation showed:



 Comments   
Comment by Sergei Golubchik [ 2020-11-12 ]

How do I repeat it? Build where? How?

Comment by Timofey Turenko [ 2021-02-25 ]

my build process:

build source tar

git submodule init
git submodule update
cd build
cmake ..
make package_source
 

build RPM:

tar xf *.tar.gz --strip-components=1 -C server
 
rm -fr /home/timofey_turenko_mariadb_com/server/scripts/../build
mkdir -p /home/timofey_turenko_mariadb_com/server/scripts/../build /home/timofey_turenko_mariadb_com/server/scripts/../target
cd /home/timofey_turenko_mariadb_com/server/scripts/../build
curl -o /home/timofey_turenko_mariadb_com/server/scripts/../../MariaDB-shared-5.3.x.rpm http://yum.mariadb.org/5.3/centos5-amd64/rpms/MariaDB-shared-5.3.12-122.el5.x86_64.rpm
curl -o /home/timofey_turenko_mariadb_com/server/scripts/../../MariaDB-shared-10.1.x.rpm http://yum.mariadb.org/10.1/centos7-amd64/rpms/MariaDB-shared-10.1.41-1.el7.centos.x86_64.rpm
cmake .. -DSPIDER_WITH_UNIXODBC=ON -DRPM=rhel7 -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j8 package VERBOSE=1

cmake version is 3.16.4

it is not reproducible with >= 10.3 after https://github.com/MariaDB/server/commit/7337abd2f7b0104f2a6c862c1829ac3a034d89a2

some info also here https://jira.mariadb.org/browse/MDEV-22813

I do not understand how does it work in http://buildbot.askmonty.org/ (different cmake version?) and why `sudo make package` solves the problem.

Comment by Daniel Bartholomew [ 2021-02-26 ]

We don't build 10.2 on RHEL/CentOS 8 because they have 10.3 in their repositories. I'm not saying that that is what is causing the issue, just that in general MariaDB 10.2 rpms are going to have issues related to the package manager seeing its own version of MariaDB as a higher version and will constantly want to upgrade it unless you do something to stop it. I can't remember how right now on RHEL/CentOS, on Debian/Ubuntu you 'pin' the package to prevent apt from trying to update it, but anyway, the short answer is that because they already have 10.3 we don't build 10.2 for it.

Comment by Timofey Turenko [ 2021-03-03 ]

it is RHEL 7

Comment by Timofey Turenko [ 2021-05-06 ]

it is still reproducible. I can't get proper CS PRM package.

Comment by Daniel Bartholomew [ 2021-05-11 ]

Not sure I'm the correct person for this, but I will try to repeat and see if I can get a better understanding of the issue.

Comment by Daniel Bartholomew [ 2021-05-13 ]

I was not able to reproduce on our CentOS 7 builder (which uses cmake 3.14.0) building the latest MariaDB 10.2.38.

The commands I used to build MariaDB were the same as in our buildbot:

# first download the shared rpms and MariaDB source tarball to the build VM, then:
cd;rm -Rf buildbot && mkdir -v buildbot && cd buildbot
mkdir padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX && cd $_
mkdir -v rpms srpms
cp -v ~/*shared*rpm .
tar xf ~/${release_ver}.tar.gz ; cd ${release_ver}
cmake .  -DBUILD_CONFIG=mysql_release $NO_DEBUGINFO -DCMAKE_COMMAND_DEP=cmake -DRPM=centos74
umask 022
if grep -qw CPACK_RPM_SOURCE_PKG_BUILD_PARAMS CPackSourceConfig.cmake; then
  make package_source
  mv -v *.src.rpm ../srpms/
fi
make -j4 package VERBOSE=1
mv -v *.rpm ../rpms

Then to install, I had to first remove CentOS's mariadb-libs package first, which was expected, but there was no conflict seen with the filesystem package. Commands run were:

sudo yum remove mariadb-libs
sudo yum -y install ~/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/rpms/MariaDB-server-10.2.38-1.el7.centos.x86_64.rpm \
    ~/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/rpms/MariaDB-client-10.2.38-1.el7.centos.x86_64.rpm \
    ~/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/rpms/MariaDB-common-10.2.38-1.el7.centos.x86_64.rpm \
    ~/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/rpms/MariaDB-shared-10.2.38-1.el7.centos.x86_64.rpm

Generated at Thu Feb 08 09:34:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.