Description:
From http://www.redhat.com/archives/fedora-list/2003-November/msg05431.html :
I tried to compile the latest mysql source rpm (4.0.16) from mysql.com
on fedora.
The compilation is ok , but when I try to install the compiled
MySQL-client rpm the system exits with:
perl(the) is needed by MySQL-client-4.0.16-0
How to repeat:
Try to rebuild the 4.0.16 SRPM on Fedora Linux
Suggested fix:
From http://www.redhat.com/archives/fedora-list/2003-November/msg05753.html :
The problem is probably in a document file where the word 'use the' is
the head of a line. I got this problem the other day, maybe the exact
one, and had to drop in a source patch for it.
This kind of a bug maybe shouldn't happen, yeah, but it does. In this
case, the find-requires is not skipping the heredoc in the perl in two
perl scripts.
I grabbed the SRPM and built it:
http://www.mysql.com/get/Downloads/MySQL-4.0/MySQL-4.0.16-0.src.rpm/from/http://mysql.mirrored.ca/
Checking the dep-build, it's
/var/tmp/MySQL-4.0.16-build/usr/bin/mysqlaccess that may be triggering
the improper build:
/var/tmp/MySQL-4.0.16-build/usr/bin/mysqlaccess:289: use the option --old_server.
So, a tiny source-patch can also be used to work around this:
--- /home/bishop/RPM/BUILD/mysql-4.0.16/scripts/mysqlaccess~ 2003-11-22 06:15:51.000000000 -0800
+++ /home/bishop/RPM/BUILD/mysql-4.0.16/scripts/mysqlaccess 2003-11-22 06:35:53.000000000 -0800
@@ -286,7 +286,7 @@
* --old_server: mysqlaccess will now use a full where clause when
retrieving information from the MySQL-server. If
you are connecting to an old server (before v3.21)
- use the option --old_server.
+ then use the option --old_server.
2.03 : (1998-02-27)
- bugfix:
* in Host::MatchTemplate: incorrect match if host-field was left empty.
There's a similar one needed if we wanted to work around a perl(this) requirement:
--- /home/bishop/RPM/BUILD/mysql-4.0.16/sql-bench/bench-init.pl.sh~ 2003-10-16 22:29:16.000000000 -0700
+++ /home/bishop/RPM/BUILD/mysql-4.0.16/sql-bench/bench-init.pl.sh 2003-11-22 06:50:15.000000000 -0800
@@ -509,7 +509,7 @@
--socket='socket'
If the database supports connecting through a Unix socket,
- use this socket to connect
+ then use this socket to connect
--regions
This is a test specific option that is only used when debugging a test.
So, we can work around them in source. Maybe, may-be, a patch can be made to the RPM find-dep tool, which seems to be tripping on here-docs. Aren't here-docs just strings and not source?
I'm not toally satisfied with the find-dep post-processing, but it may be the best way to avoid actually digging into the code and finding the parts that trip up the packaging tools.
Anyway, it can now be the choice of the packager, now that you know what to look for.
- bish