Bug 248318 - net/rsync: Fails to patch with ACL=ON (3.2.2)
Summary: net/rsync: Fails to patch with ACL=ON (3.2.2)
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Rodrigo Osorio
URL:
Keywords: needs-patch, regression
: 248388 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-07-28 09:39 UTC by daniel.engberg.lists
Modified: 2020-08-01 04:39 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (rodrigo)
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description daniel.engberg.lists 2020-07-28 09:39:23 UTC
===>  Patching for rsync-3.2.2
===>  Applying extra patch /usr/ports/net/rsync/work/rsync-3.2.2/patches/acls.diff
===>  Applying extra patch /usr/ports/net/rsync/files/extrapatch-acl
Ignoring previously applied (or reversed) patch.
2 out of 2 hunks ignored--saving rejects to rsync.c.rej
===>  FAILED Applying extra patch /usr/ports/net/rsync/files/extrapatch-acl
*** Error code 1
Comment 1 dewayne 2020-07-31 22:12:57 UTC
(In reply to daniel.engberg.lists from comment #0)
Thanks Daniel, I'm having the same problem on FreeBSD12.1S amd64, with 
# make -C /usr/ports/net/rsync showconfig
===> The following configuration options are available for rsync-3.2.2:
     DOCS=on: Build and/or install documentation
     ICONV=on: Encoding conversion support via iconv
     POPT_PORT=off: Use popt from devel/popt instead of bundled one
     SSH=on: Use SSH instead of RSH
     ZLIB_BASE=off: Use zlib from base instead of bundled one
====> Functionality provided by third party patches: you can only select none or one of them
     TIMELIMIT=off: Time limit patch
     RENAMED=off: Add support for renamed file detection
     FLAGS=off: File system flags support patch, adds --fileflags
     ATIMES=off: Preserve access times, adds --atimes (BROKEN)
     ACL=on: Add backward-compatibility for the --acls option
Comment 2 dewayne 2020-07-31 22:16:35 UTC
*** Bug 248388 has been marked as a duplicate of this bug. ***
Comment 3 dewayne 2020-07-31 23:37:01 UTC
(In reply to dewayne from comment #1)
Solution: remove the /usr/ports/net/rsync/files/extrapatch-acl patch, and its call in Makefile

Detail:
Have checked these parts of /usr/ports/net/rsync/files/extrapatch-acl in
rsync.h, rsync.c, lib/sysacls.h, lib/sysacls.c but not others,
and our patch seems to have been applied upstream. 

So running the following tests on rsync 3.1.3, and then rsync 3.2.2 without the files/extrapatch-acl, the results were the same.

Note: In building 3.2.2, I only commented out 
#ACL_EXTRA_PATCHES=             ${WRKSRC}/patches/acls.diff \
#                               ${FILESDIR}/extrapatch-acl
---
Test using rsync 3.1.3 and 3.2.2 after removing files/extrapatch-acl. Results were identical.

rm /tmp/file.txt /tmp/b2/file.txt || true

echo Hello> /tmp/file.txt
setextattr system s text1 /tmp/file.txt
setextattr user u text2 /tmp/file.txt
getextattr system s /tmp/file.txt
getextattr user u /tmp/file.txt
setfacl -m u:www:rx /tmp/file.txt
getfacl /tmp/file.txt

rsync -Av /tmp/file.txt /tmp/b2/
getfacl /tmp/b2/file.txt
# As expected

rm /tmp/b2/file.txt

rsync -Xv /tmp/file.txt /tmp/b2/
getextattr system s /tmp/b2/file.txt
getextattr user u /tmp/b2/file.txt
# As expected. system namespace isn't copied (its the way it is...)

rm /tmp/b2/file.txt

rsync -AXv /tmp/file.txt /tmp/b2/
getextattr system s /tmp/b2/file.txt
getextattr user u /tmp/b2/file.txt
getfacl /tmp/b2/file.txt
# As expected.  All good! :)

Interesting comparison:
# For 3.1.3
# ldd `which rsync`
/usr/local/bin/rsync:
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x8012d9000)
        libc.so.7 => /lib/libc.so.7 (0x8015d2000)

# For 3.2.2
# ldd `which rsync`
/usr/local/bin/rsync:
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x8012de000)
        liblz4.so.1 => /usr/local/lib/liblz4.so.1 (0x8015d7000)
        libzstd.so.1 => /usr/local/lib/libzstd.so.1 (0x801803000)
        libxxhash.so.0 => /usr/local/lib/libxxhash.so.0 (0x801ad0000)
        libcrypto.so.11 => /usr/local/lib/libcrypto.so.11 (0x801e00000)
        libc.so.7 => /lib/libc.so.7 (0x8022bc000)
        libthr.so.3 => /lib/libthr.so.3 (0x801cdc000)

Rodrigo, thank-you for your efforts to update and provide a functioning rsync.
:)