For all you folks out there using rsync on HP-UX, be warned that HP-UX is still broken with regard to large files. I opened a bug report with HP last year, as described here:
http://lists.samba.org/archive/rsync/2004-July/010226.html I've been periodically checking on the status and today I was told that it's been officially filed as a "we won't fix this", citing that the mkstemp() library call wasn't mentioned in the /usr/share/doc/lg_files.txt document. (For some reason HP favors using the insecure "tmpfile()" call instead.) Despite HP's intransigence, I'd like to have an rsync that builds out of the box with working large file support. I figure there are several ways to accomplish this, and I'd like some input on the best way to proceed. I've come up with five possible options, though if anyone has an idea not listed here, please feel free to suggest it! 1) Change the autoconf environment to build rsync as a 64-bit binary by default on HP-UX. This results in a working mkstemp() but gives a binary that won't work on ancient HP hardware. 2) Change the autoconf environment to detect HP-UX and unset HAVE_SECURE_MKSTEMP even though the test for it succeeded. This would fall back to mktemp() very much like the manual process I use now, but would be automatic. This also means that if HP-UX were ever fixed (HA!), the new mkstemp() wouldn't get used. 3) Write a new autoconf test for a broken mkstemp() by creating a large sparse file in the current directory and automatically unsetting HAVE_SECURE_MKSTEMP. This would work on non-HP systems that were similarly broken and allow the use of mkstemp() if HP-UX were ever fixed (HA!) This may falsely fail if the current filesystem doesn't allow for large files (common on HP systems) and if the system doesn't support sparse files this test could fill up the filesystem. 4) Implement HP's suggested workaround of a fcntl() to set O_LARGEFILE on the file handle returned by mkstemp() inside syscall.c. This is essentially non-portable and indeed won't even work on HP-UX if building a 64-bit binary. 5) Document the workarounds for HP-UX in the INSTALL file (e.g. comment out HAVE_SECURE_MKSTEMP in config.h after running "configure" but before running "make", or build a 64-bit binary.) What do you all think the best approach would be? I'd suggest #5 at a minimum. -- Steve -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html