Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple issues on el8 packages (was clarify el7 / el8 spec file vs mysql) #96

Open
julthomas opened this issue Apr 5, 2021 · 5 comments

Comments

@julthomas
Copy link

Hello guys,

Would it be possible to clarify which rsyslog v8-stable spec file is actually used for building RPMS in Adiscon repository? In particular if you look at branch rsyslog-8.2102.0-release history, looks like only v8-stable-el7.spec was updated. So should we conclude el8 RPMS where built from it as well? Looking at the el8 src.rpm I know the answer is "yes" but I find it particularly confusing to keep both v8-stable-el7.spec and v8-stable.spec, especially since we can have conditions on the target in a spec file. I am probably missing something here so please correct me if I'm wrong, it's just that it makes contributing to this repo difficult and confusing.

In fact I would like to propose a change in build dependencies regarding the mysql subpackage (ommysql). The reason is that on your el8 build, rsyslog-mysql requires mysql because the build was linked with libmysqlclient. I have not quite checked the el7 build but both el7 and el8 you should not require mysql, mariadb libs should be fine. At the moment on el8 the build require to enable the mysql stream which I believe is not desirable since the orientation of the distro is to prefer mariadb. What do you think?

Here is how I believe we should do:

%package mysql
[...]

# mysql_config is required by rsyslog configure script
%if 0%{?rhel} >= 8
# on el8, mariadb-connector-c-devel contains mysql_config;
# dependencies install libs and headers; mysql is still available
# via stream but mariadb should be preferred.
BuildRequires: mariadb-connector-c-devel
%else
%if 0%{?rhel} == 7
# on el7, mariadb-devel (which provides mysql-devel) contains
# mysql_config; dependencies install libs and headers
BuildRequires: mariadb-devel
%else
%if 0%{?rhel} <= 6
# on el6, mysql contains the libs and mysql_config but does not
# depends on the headers so we need mysql-devel as well
BuildRequires: mysql
BuildRequires: mysql-devel
%endif
%endif
%endif

Cheers,
Julien

@rgerhards
Copy link
Member

@friedl can you pls answer

@julthomas julthomas changed the title Clarify el7 / el8 spec file vs mysql Multiple issues on el8 packages (was clarify el7 / el8 spec file vs mysql) Apr 11, 2021
@julthomas
Copy link
Author

julthomas commented Apr 11, 2021

Hi,

Also there is an issue with the renaming of libfastjson[4] (liblognorm[5] also but it does not complain - maybe because I did not have the distro package installed).
Basically you cannot replace the redhat package libfastjson with the libfastjson4 from Adiscon el8 repo.
You can still install the rsyslog from Adiscon repo if you do not update (install) libfastjson4.

[root@rhel83 ~]# rpm -qa |grep -E 'rsyslog|estr|relp|lognorm|fastjson'
libestr-0.1.10-1.el8.x86_64
libfastjson-0.99.8-2.el8.x86_64
rsyslog-8.1911.0-6.el8.x86_64

[root@rhel83 ~]# dnf shell <(printf 'update rsyslog libestr\nremove libfastjson\ninstall rsyslog-mysql rsyslog-relp rsyslog-mmnormalize liblognorm5 libfastjson4\nrun\n')
Updating Subscription Management repositories.
Last metadata expiration check: 0:29:36 ago on Sun 11 Apr 2021 10:15:09 PM CEST.

 Problem: package rsyslog-8.2102.0-1.el8.x86_64 requires libfastjson >= 0.99.8, but none of the providers can be installed
  - package rsyslog-mysql-8.2102.0-1.el8.x86_64 requires rsyslog = 8.2102.0-1.el8, but none of the providers can be installed
  - libfastjson-0.99.8-2.el8.i686 has inferior architecture
  - cannot install the best candidate for the job
  - conflicting requests

Or also:

[root@rhel83 ~]# dnf shell <(printf 'update rsyslog libestr\ninstall rsyslog-mysql rsyslog-relp rsyslog-mmnormalize liblognorm5 libfastjson4\nrun\n')
Updating Subscription Management repositories.
Last metadata expiration check: 0:25:14 ago on Sun 11 Apr 2021 10:15:09 PM CEST.
========================================================================================================================================
 Package                       Architecture     Version                                           Repository                       Size
========================================================================================================================================
Installing:
 libfastjson4                  x86_64           0.99.9-1.el8                                      rsyslog_v8                       81 k
 liblognorm5                   x86_64           2.0.6-1.el8                                       rsyslog_v8                       85 k
 rsyslog-mmnormalize           x86_64           8.2102.0-1.el8                                    rsyslog_v8                       43 k
 rsyslog-mysql                 x86_64           8.2102.0-1.el8                                    rsyslog_v8                       43 k
 rsyslog-relp                  x86_64           8.2102.0-1.el8                                    rsyslog_v8                       53 k
Upgrading:
 libestr                       x86_64           0.1.11-1.el8                                      rsyslog_v8                       14 k
 rsyslog                       x86_64           8.2102.0-1.el8                                    rsyslog_v8                      780 k
Installing dependencies:
 librelp                       x86_64           1.10.0-1.el8                                      rsyslog_v8                       74 k
 mysql-common                  x86_64           8.0.21-1.module+el8.2.0+7855+47abd494             rhel-83-iso-appstream           148 k
 mysql-libs                    x86_64           8.0.21-1.module+el8.2.0+7855+47abd494             rhel-83-iso-appstream           1.4 M

Transaction Summary
========================================================================================================================================
Install  8 Packages
Upgrade  2 Packages

Total size: 2.7 M
Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): librelp-1.10.0-1.el8.x86_64.rpm                                                                  207 kB/s |  74 kB     00:00    
(2/8): liblognorm5-2.0.6-1.el8.x86_64.rpm                                                               235 kB/s |  85 kB     00:00    
(3/8): libfastjson4-0.99.9-1.el8.x86_64.rpm                                                             205 kB/s |  81 kB     00:00    
(4/8): rsyslog-mmnormalize-8.2102.0-1.el8.x86_64.rpm                                                    508 kB/s |  43 kB     00:00    
(5/8): rsyslog-mysql-8.2102.0-1.el8.x86_64.rpm                                                          511 kB/s |  43 kB     00:00    
(6/8): rsyslog-relp-8.2102.0-1.el8.x86_64.rpm                                                           624 kB/s |  53 kB     00:00    
(7/8): libestr-0.1.11-1.el8.x86_64.rpm                                                                  178 kB/s |  14 kB     00:00    
(8/8): rsyslog-8.2102.0-1.el8.x86_64.rpm                                                                886 kB/s | 780 kB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                   883 kB/s | 1.1 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file /usr/lib64/libfastjson.so.4 from install of libfastjson4-0.99.9-1.el8.x86_64 conflicts with file from package libfastjson-0.99.8-2.el8.x86_64

I believe this is because of this dependency on v8-stable-el7.spec:

%if 0%{?rhel} >= 8
Requires: libfastjson >= 0.99.8
%else
Requires: libfastjson4 >= 0.99.8
%endif

I don't quite understand the special condition for el8 since the package is named libfastjson4 in the el8 repo.
I think to be compatible and smooth update-able from redhat/centos repo, you could either keep the package named libfastjson or Provide (maybe Obsolete, need to test) libfastjson in the libfastjson4 package.

Julien

@alorbach
Copy link
Member

alorbach commented Apr 13, 2021

First of all, we are only using "v8-stable-el7.spec" anymore - we do not use the other spec files anymore. Those are legady spec files, perhaps they should be removed.

The libfastjson dependency error should not be happening with v8-stable-el7.spec, can you confirm that?

@julthomas
Copy link
Author

OK so the right spec for all EL versions is currently v8-stable-el7.spec
My advise would be to cleanup and remove the unused ones, then rename v8-stable-el7.spec to v8-stable.spec.
After all the history is in the git. Would that be okay for you @alorbach?

I confirm the dependency issues are happening on centos8 or rhel8 with the current RPMS in Adiscon repo. It was tested after a wget -P /etc/yum.repos.d/ http://rpms.adiscon.com/v8-stable/rsyslog-rhel8.repo

Cheers,
Julien

@alorbach
Copy link
Member

@julthomas: we need to be carefully with the cleanup because we are using automated scripts that build rpm packages based on this git repo. But I agree there is room for cleanup of the specfiles to avoid confusion.

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

No branches or pull requests

3 participants