Bug #38453 File name (of incude test file) too long for HP-UX tar
Submitted: 30 Jul 2008 11:05 Modified: 20 Aug 2008 19:39
Reporter: Joerg Bruehe Email Updates:
Status: Verified Impact on me:
None 
Category:Tests: Server Severity:S3 (Non-critical)
Version:5.1 OS:Other (HP-UX, AIX, I5/OS, Solaris)
Assigned to: CPU Architecture:Any

[30 Jul 2008 11:05] Joerg Bruehe
Description:
When installing the 5.1.27 package locally on HP-UX 11.11 for a test,
I accidentally used HP-UX "tar" and not GNU "tar".

In the resulting tree, several tests failed on this statement:
-- source include/have_binlog_format_mixed_or_statement.inc

The problem was that the file name had silently got truncated:
in the file system, we had
          include/have_binlog_format_mixed_or_statement.in

How to repeat:
Install a 5.1 package using HP-UX "tar".

Suggested fix:
Shorten the file name !

Yes, I know the file name should give a hint what it is about,
but why not use
  have_binlog_mixed_or_stmt.inc  ?

IMO, all 
  have_binlog_format_*.inc
could at least do without "_format" without losing readability and meaning.

In addition, make it *very* clear in the docs that HP-UX "tar" is broken,
and GNU "tar" should be used.
[20 Aug 2008 19:17] Lars Thalmann
The tools need to be able to handle long file names.
[20 Aug 2008 19:39] Joerg Bruehe
I immediately agree with "the tools should be able".

I will agree with "need to" if you manage
- either to change the native "tar" provided by our target platforms
- or to strike all platforms with such software from the list of supported platforms.

Assuming you can do neither, I want to see a compelling reason for your "Won't fix" statement before I accept that.
[21 Aug 2008 5:30] Daniel Fischer
Lars, this is not an acceptable answer. We can use GNU tar to create our packages; however, if there is a file name that is longer than the maximum specified in POSIX, GNU tar will store it in a way that is incompatible with POSIX-compliant tar implementations. Some files missing when the package is extracted with a POSIX-compliant tar is the best case; the behaviour is really undefined. As long as we officially support platforms where there typically is no GNU tar, we need to be able to build packages that can be installed without GNU tar.
[6 Jan 2011 17:43] Luis Soares
I have found that this has much broader scope than just replication
test names or include files. As a matter of fact, replication files
seem to be a small part of it:

grep -v -E "rpl|binlog" offending_names.txt | wc -l
1063

grep -E "rpl|binlog" offending_names.txt | wc -l
415

From a total of 1478 files that exceed the 100 chars filename limit 
imposed by HPUX tar, only 415 were related to replication. The other
ones are spread among parts, funcs, innodb_plugin, engines, ndb, ...

The states were taken from a mysql-enterprise-gpl-5.1.54-hpux11.31-ia64-64bit
package.
[6 Jan 2011 20:30] Joerg Bruehe
A shell one-liner to get the base names above 50 characters
(off by one, the trailing new line):

ls -R1 mysql-test/ | while read F; do if echo $F | fgrep / >/dev/null; then echo; fi; echo `echo $F | wc -c` $F; done | egrep '/|^[5-9][0-9]|^$' | more