[MDEV-74] RPM package scripts needs updating for 5.5 Created: 2012-01-06  Updated: 2012-05-22  Due: 2012-05-24  Resolved: 2012-05-22

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.5.24

Type: Bug Priority: Critical
Reporter: Kristian Nielsen Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: packaging

Attachments: File 5.5.21.output     File mariadb-5.5.23.spec     File mariadb-jb.spec     File mariadb.5.5.20.spec    
Issue Links:
Blocks
Duplicate
Relates
relates to MDEV-55 5.5 DEB packages are not built Closed

 Description   

rpm aren't supported in the new cmake based build framework yet.
this has to be fixed.



 Comments   
Comment by Kristian Nielsen [ 2012-02-11 ]

Until we have .spec files for 5.5 rpms, I've disabled rpm builders in 5.5 Buildbot.
So this issue is no longer blocking MDEV-31.

Comment by Colin Charles [ 2012-03-20 ]

tested on centos 6.2, against mariadb 5.5.20 alpha. Will try for beta next

Comment by Colin Charles [ 2012-03-23 ]

Spec file builds on CentOS 6.2

Comment by Colin Charles [ 2012-03-23 ]

I then tried this is 5.5.21, and got a bunch of weird errors (that should not have occurred). I have attached the error log here, because I'm unsure what I've done differently

Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/byte/rpmbuild/BUILDROOT/MariaDB-5.5.20-1.linux2.6.x86_64

RPM build errors:

Comment by Colin Charles [ 2012-03-23 ]

It claims there are unpackaged files... the directory structure in ~/rpmbuild/BUILDROOT/MariaDB-5.5.20-1.linux2.6.x86_64 is naturally still there but this matches previous release plus mysql-5.5.21 which I can build fine with a similar spec file

Comment by Sergei Golubchik [ 2012-04-02 ]

here's how they do it in mageia: http://paste.pocoo.org/show/575119/

Comment by Colin Charles [ 2012-04-10 ]

Jani, can you please help update what you've done so far? I've asked a community contributor to assit me based on the current spec file, and even he has failed. Latest response 10 days later: "I've done a ton of work on it, but I cannot get it to work. This baffles me. I am continuing." Via Joshua C. Butcher.

Comment by Colin Charles [ 2012-04-12 ]

ok, we have a spec file that builds – please pop this into buildbot

Comment by Colin Charles [ 2012-04-12 ]

Joshua worked on this. Its based on the Percona spec files

Comment by George L [ 2012-04-14 ]

Hi guys will MariaDB 5.5 RPMs inclue the Percona equivalent shared-compat RPM as well ?

Comment by Colin Charles [ 2012-04-22 ]

As I told Serg, Jani, please help do:
1. I need him to test the spec file (I have only tested it against RH6.2/centos 6.2, he's supposed to also look at it for RH5/centos5)
2. I need him to put the spec file into buildbot so we get builds (he is now controlling buildbot it seems?)

Comment by Rasmus Johansson (Inactive) [ 2012-04-23 ]

Jani, reach out to Colin and the other guy to get documentation and steps on the spec file that works
Also add the working spec file to buildbot so that we start getting RPMs that are available for download at downloads.askmonty.org

Comment by Sergei Golubchik [ 2012-05-01 ]

the patch builds rpms using CPackRPM, and not using any spec files.
Issues:

  • /sbin/rcmysql is missing
  • rpm owns /etc/init.d/ which creates conflicts with other packages
  • identical summaries/descriptions for all packages. We can probably like with that.
Comment by George L [ 2012-05-12 ]

Wondering how the status is for MariaDB 5.5 rpms ?

I ask as I fumbled through merging 2x MariaDB 5.5.23 spec files from Joshua (attached one) and Shawn Sterling https://github.com/shawn-sterling/mysql_stuff/tree/master/mariadb-5.5.23 and seem to have finally managed to compile MariaDB 5.5.23 RPM on CentOS 6.2 64bit OS.

Merged spec file at http://vbtechsupport.com/mariadb55/rpmbuild/spec/mariadb5523v2.spec

Seems to work although after rpm install doesn't seem MariaDB server automatically starts up ? But service start works.

rpm -qa | grep MariaDB
MariaDB-Server-shared-55-5.5.23-20.0.rhel6.x86_64
MariaDB-Server-devel-55-5.5.23-20.0.rhel6.x86_64
MariaDB-Server-client-55-5.5.23-20.0.rhel6.x86_64
MariaDB-Server-server-55-5.5.23-20.0.rhel6.x86_64
MariaDB-Server-test-55-5.5.23-20.0.rhel6.x86_64

mysqladmin ver
mysqladmin Ver 9.0 Distrib 5.5.23-MariaDB, for Linux on x86_64
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc,
2009 Monty Program Ab
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 5.5.23-MariaDB-55
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 5 sec

Threads: 1 Questions: 1 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 0.200

mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.23-MariaDB-55 MariaDB Server (GPL), Release beta20.0, Revision %

{gotrevision}

This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show plugins;
------------------------------------------------------------------------

Name Status Type Library License

------------------------------------------------------------------------

binlog ACTIVE STORAGE ENGINE NULL GPL
mysql_native_password ACTIVE AUTHENTICATION NULL GPL
mysql_old_password ACTIVE AUTHENTICATION NULL GPL
CSV ACTIVE STORAGE ENGINE NULL GPL
MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL
MyISAM ACTIVE STORAGE ENGINE NULL GPL
MEMORY ACTIVE STORAGE ENGINE NULL GPL
Aria ACTIVE STORAGE ENGINE NULL GPL
FEDERATED ACTIVE STORAGE ENGINE NULL GPL
InnoDB ACTIVE STORAGE ENGINE NULL GPL
INNODB_RSEG ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_TRX ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_LOCKS ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_LOCK_WAITS ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_CMP ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_CMP_RESET ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_CMPMEM ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_CMPMEM_RESET ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_SYS_TABLES ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_SYS_TABLESTATS ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_SYS_INDEXES ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_SYS_COLUMNS ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_SYS_FIELDS ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_SYS_FOREIGN ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_SYS_FOREIGN_COLS ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_SYS_STATS ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_TABLE_STATS ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_INDEX_STATS ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_BUFFER_POOL_PAGES ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_BUFFER_POOL_PAGES_INDEX ACTIVE INFORMATION SCHEMA NULL GPL
INNODB_BUFFER_POOL_PAGES_BLOB ACTIVE INFORMATION SCHEMA NULL GPL
XTRADB_ADMIN_COMMAND ACTIVE INFORMATION SCHEMA NULL GPL
ARCHIVE ACTIVE STORAGE ENGINE NULL GPL
BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL
PERFORMANCE_SCHEMA ACTIVE STORAGE ENGINE NULL GPL
FEEDBACK DISABLED INFORMATION SCHEMA NULL GPL
partition ACTIVE STORAGE ENGINE NULL GPL

------------------------------------------------------------------------
37 rows in set (0.00 sec)

I'm no RPM building expert, so you'd probably need to double check what i did

There is a mysql-libs conflict with CentOS 6.2 when installing RPMs i.e. https://kb.askmonty.org/en/centos-5x6x-mysql-lib-conflicts-and-postfix

file /usr/share/mysql/czech/errmsg.sys from install of MariaDB-Server-server-55-5.5.23-20.0.rhel6.x86_64 conflicts with file from package mysql-libs-5.1.61-1.el6_2.1.x86_64

I just did the following prior to installing RPMs

MYSQLLIBRPM=`rpm -qa | grep mysql-libs`
rpm -e --nodeps $MYSQLLIBRPM

Hope official MariaDB 5.5 RPMs are available soon .. lots of folks I know waiting for them

cheers

Comment by Sergei Golubchik [ 2012-05-12 ]

RPMs are built ok (at last) and available for testing from

http://terrier.askmonty.org/archive/pack/5.5-serg/build-2150/

For the sake of CentOS 6, mariadb-shared now provides mysql-libs.

Comment by Sergei Golubchik [ 2012-05-15 ]

Colin, please, have a final look over rpms before a release

Comment by Ralf Becker [ 2012-05-17 ]

That's the spec we use to build MariaDB 5.5.23 for RHEL 5/6
It's derived from MySQL 5.5 spec.

Comment by Colin Charles [ 2012-05-18 ]

Serg, where is CentOS 6? I can only see builds for centos 5 and rhel 5.

Don't we have rhel6/centos6 build machines too?

Comment by Colin Charles [ 2012-05-18 ]

Where are the SRPMS that should be generated from the buildsystem? We only seem to have RPMs as well. We need to provide SRPMS for download (SRPMS). And only by expanding SRPMS can I make sure SPEC files that are auto-generated from CMAKE are also sensible.

Comment by Sergei Golubchik [ 2012-05-18 ]

as far as I know, we don't

Comment by Colin Charles [ 2012-05-18 ]

We need to add Conflicts: mysql-libs. Currently there are quite some files that are conflicting with mysql-libs so the only way to install it is to --force or uninstall MySQL. So I suggest mysql-libs to be added to the Conflicts: field in cmake

Comment by Colin Charles [ 2012-05-18 ]

OK, RPMs tested to work on RHEL 6.2 as well. Just need to fix the Conflicts: mysql-libs.

We need to provide RHEL6/CentOS 6 builds as well (even though these work, its important to run natively there, since there are newer gcc's, etc.)

And of course, ensure we generate SRPMS

Comment by Colin Charles [ 2012-05-18 ]

Also, we need to get Daniel to put all this into the yum repository!

Comment by Sergei Golubchik [ 2012-05-18 ]

cmake cannot build SRPM's yet. the way to build rpms is "make package" from the source tree.

we provide mysql-libs, why should we conflict with that?
our -shared rpm obsoletes mysql-shared, so one will have to uninstall that to install mariadb-shared.
and we provide mysql-libs for the sake of RHEL6/CentOS 6 (where various client packages depend on it)

Comment by Colin Charles [ 2012-05-19 ]

Serg, since we provide it, we should also conflict with it because we want to replace it with a system that already has it installed. We want a seamless upgrade process, i.e. not one where people have to uninstall mariadb-shared and mysql-libs (which can take away a lot of connectors for example).

I'm wondering if its better to use Obsoletes: rather than Conflicts: in this case

Reading the documentation (http://jfearn.fedorapeople.org/en-US/RPM/0.1/html/RPM_Guide/ch-advanced-packaging.html), it seems that not only do we Provides: mysql-libs, we also Obsolete: mysql-libs and Conflicts: mysql-libs (conflict with system-provided mysql-libs)

I'm just thinking of seamless upgrades when mysql or some part of it it already installed.

So if we follow the above idea, we become a true drop-in replacement to anyone "upgrading" to MariaDB who already has MySQL installed provided by CentOS/RHEL.

Comment by Sergei Golubchik [ 2012-05-19 ]

Obsoletes is what OurDelta 5.3 spec file uses.
And all other spec files attached to or linked from this issue use
Obsoletes, not Conflicts.

I'm not sure I understand the fine distinction between the two.

Shall we replace all Obsoletes with Conflicts ?

Comment by Colin Charles [ 2012-05-20 ]

Don't replace, I think we might want to add. We want Obsoletes and Conflicts I think (in the case of mysql-libs). Can you push and get me another build to test? I will also then perform upgrade testing

Thanks

Comment by Colin Charles [ 2012-05-20 ]

Serg, in terms of the files being generated, we have had a request to build with the "rhel5" or "rhel6" tag in the filename (i.e. OS-release). This is supposedly less confusing and is what mysql does

An example: mariadb-5.5.23-linux-x86_64-client.rpm is what we currently do. It would be better if we did MySQL-client-5.5.23-1.rhel5.x86_64.rpm. The bit that says "rhel5" rather than just generic linux

Also, upon closer look, we seem to be skipping the -embedded builds as well (something that Mysql provides). Should we be providing this as well, for things like amarok?

Comment by Sergei Golubchik [ 2012-05-20 ]

I've added Conflicts: mysql-lib, rpms are being built.
I've changed the naming scheme to be, like, MariaDB-5.5.23-rhel6-x86_64-server.rpm but it's not pushed yet.

As for embedded - we never had it, as far as I can see.
I've created it, adding libmysqld.a and libmsyqld.so, and moved mysql_embedded from *-test.rpm to *-embedde.rpm.
But it's all not very logical. embedded rpm will probably not work without a server rpm, as it has no charset and errmsg files. Also it includes libmysqld.a which is only needed in *-devel rpms.

Suggestion: don't do embedded rpm. Add libmysqld.so to the server rpm and add libmysqld.a to the devel rpm.

We only have few RPMs. DEBs are more fine-grained, there it would've make sense to create -server-shared, -server-embedded, -embedded-devel, and so on.

Comment by Sergei Golubchik [ 2012-05-21 ]

Conflicts: mysql-libs does not work, rpms cannot be installed. It fails with

sudo rpm -i rpms/mariadb-5.5.23-linux-i686-client.rpm rpms/mariadb-5.5.23-linux-i686-devel.rpm rpms/mariadb-5.5.23-linux-i686-server.rpm rpms/mariadb-5.5.23-linux-i686-shared.rpm rpms/mariadb-5.5.23-linux-i686-test.rpm
error: Failed dependencies:
mysql-libs conflicts with MariaDB-shared-5.5.23-1.i386
mysql-libs conflicts with MariaDB-test-5.5.23-1.i386

apparently you cannot provide something and conflict with it at the same time.

Comment by Colin Charles [ 2012-05-21 ]

Odd. Can you push and give me a new build with the new name. forget conflicts:mysql-libs

I'll set up a local yum repository to test that against, and if it passes upgrades from mysql, and installs, I will give it the go ahead

Comment by Sergei Golubchik [ 2012-05-21 ]

Here. With embedded server (not in a new RPM, added to existing ones) and with a new name:

http://terrier.askmonty.org/archive/pack/5.5-serg/build-2196/

rhel5-x86 rpms aren't built (because I've restarted buildbot and it got confused), use centos5 rpms if you need x86.

Comment by Colin Charles [ 2012-05-22 ]

OK, this is good. This issue can be closed and we should start releasing it.

Now I see this as outstanding:

  • no yum repository yet (we have a bug open for this)
  • no RHEL6/CentOS6 buildbot host (we can use either one, we don't need both)

Where we differ from mysql and need to document:

  • we don't provide mariadb-embedded
  • we don't provide the SRPM because CMake doesn't generate it

We should also probably document how someone can make a RPM from a full-checkout of the source.

That is all.

Comment by Rasmus Johansson (Inactive) [ 2012-05-22 ]

Daniel, make the finalization of the YUM repository according to comments here and RHEL6 buildbot your top priority

Generated at Thu Feb 08 06:26:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.