From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) Description of problem: rcp, as derived from the netkit-rsh-0.17 source in Red Hat 7.x, doesn't handle files larger than 2GB. There are two types of failure: - an existing large file can't be opened by rcp (the open() call fails with EFBIG) - trying to write a file on a Red Hat system that the remote side claims is larger than 2GB will result in the size variable in sink(), which is declared as an int, not to reflect the actual size of the file (it might be negative, or it might be filesize%4GB, because of the overflow) and the copy will be aborted prematurely after the Red Hat system's rcp believes it has read in the correct number of bytes. Fix: more recent versions of freebsd's rcp fix the C code. The snprintf expression involving stb.st_size should cast it to (long long) and use %lld instead of % ld. size should be declared as off_t rather than int. And appropriate CFLAGS should be defined in the Makefile so that 64-bit versions of off_t, open(), and stat() get used; I happened to fix this by adding "CFLAGS += - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" to the Makefile. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. rcp largefile remote:destfile 2. (from another system whose rcp supports large files) rcp largefile redhatsystem:destfile 3. Additional info:
This is still present in phoebe/rawhide and RHL 8.0 as well. Adding this to the MCONFIG-editing part and patching it as described by mp above fixes it for me: s,-O2,\$(RPM_OPT_FLAGS) -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,;
Created attachment 89423 [details] Fix rcp with filesizes > 2GB
Fixed in rsh-0.17-13 (available via rawhide shortly). Read ya, Phil
*** Bug 87860 has been marked as a duplicate of this bug. ***