Re: Trying to cross-compile rsync 3.2.3 for an M1 Mac

2022-01-06 Thread Fred Fugate via rsync
Thanks Wayne, that worked for 3.2.3. I will explore 3.2.4pre1 as well.

Fred

On Thu, Jan 6, 2022 at 12:29 AM Wayne Davison  wrote:

> On Tue, Jan 4, 2022 at 7:39 PM Fred Fugate via rsync <
> rsync@lists.samba.org> wrote:
>
>> It seems that the rsync source tarfile includes lib/md5-asm-x86_64.S, but
>> for my compilation to work, I need a file called lib/md5-asm-aarch64.S ?
>>
>
> Try configuring with --disable-asm.  I imagine 3.2.4pre1
> <https://rsync.samba.org/> would have done that for you with its various
> configure improvements.
>
> ..wayne..
>
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Trying to cross-compile rsync 3.2.3 for an M1 Mac

2022-01-04 Thread Fred Fugate via rsync
Hi,

On an Intel Mac, I'm trying to cross-compile rsync 3.2.3 for an M1 Mac. I
configured like this:

./configure \
CFLAGS='-target arm64-apple-macos' \
--host=aarch64-apple-darwin \
--prefix=/opt/fred \
--with-rsyncd-conf=/opt/fred/etc/rsyncd.conf  \
--disable-openssl \
--disable-xxhash \
--disable-zstd \
--disable-lz4 \
--disable-simd



configure ran well enough, but unfortunately I'm running into the following
issue at the end of the compilation:

[SNIP...]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:56:9:
note: previous definition is here
#define snprintf(str, len, ...) \
^
1 warning generated.
gcc -I./zlib -I./popt -target arm64-apple-macos -DHAVE_CONFIG_H -Wall -W
 -o rsync flist.o rsync.o generator.o receiver.o cleanup.o sender.o
exclude.o util.o util2.o main.o checksum.o match.o syscall.o log.o backup.o
delete.o options.o io.o compat.o hlink.o token.o uidlist.o socket.o
hashtable.o usage.o fileio.o batch.o clientname.o chmod.o acls.o xattrs.o
progress.o pipe.o lib/md5-asm-x86_64.o  params.o loadparm.o clientserver.o
access.o connection.o authenticate.o lib/wildmatch.o lib/compat.o
lib/snprintf.o lib/mdfour.o lib/md5.o lib/permstring.o lib/pool_alloc.o
lib/sysacls.o lib/sysxattrs.o  zlib/deflate.o zlib/inffast.o zlib/inflate.o
zlib/inftrees.o zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o
zlib/crc32.o popt/findme.o  popt/popt.o  popt/poptconfig.o popt/popthelp.o
popt/poptparse.o -liconv

ld: warning: ignoring file lib/md5-asm-x86_64.o, building for macOS-arm64
but attempting to link with file built for unknown-x86_64

Undefined symbols for architecture arm64:
  "_md5_process_asm", referenced from:
  _md5_update in md5.o

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see
invocation)

make: *** [rsync] Error 1




It seems that the rsync source tarfile includes lib/md5-asm-x86_64.S, but
for my compilation to work, I need a file called lib/md5-asm-aarch64.S ?

Where would I get this file? (or how would I build my
own lib/md5-asm-aarch64.S ?)


Thanks,
Fred
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Workaround for rsyncing when fileflag schg is set?

2021-11-01 Thread Fred Fugate via rsync
Thanks Kevin.

I tried leaving off --fileflags and got entirely different error output:

rsync: [generator] failed to set file flags on
"/Users/redacted/Library/Accounts": Operation not permitted (1)

In this example, the Library subdir on the source has the "hidden" flag
set; my understanding of this error is that it is not able to set that flag
on the destination.

# ls -laO@ /Users/redacted/Library
total 96
drwx--@   72 502  staff  hidden   2448 Oct  8 18:27 .


When I checked the Library subdir on the destination after copying, it was
indeed missing the hidden flag.

I'm not sure how I could work around both the original error caused by
using --fileflags, and this error caused by omitting --fileflags.

Also not sure why rsync is trying to honor the hidden flag when I'm NOT
using --fileflags, but that is another post for the future.


I do have a solution currently: rsync 3.0.9, the only other version I keep
installed on my systems. It does not have a problem with --fileflags. So
for this task I am downgrading to version 3.0.9.

I guess using 3.0.9 will be fine. But if anyone has any insight or
cautionary advice on 3.0.9 vs 3.2.3, I want to hear it. The systems are
Macs, some still with HFS+ file systems and others with APFS.


Thanks,
Fred

On Sun, Oct 31, 2021 at 6:51 AM Kevin Korb via rsync 
wrote:

> No, rsync normally handles such problems well.  Unfortunately,
> --fileflags is an OS vendor added feature rather than an official rsync
> feature so it is less well thought out.
>
> On 10/31/21 3:51 AM, Perry Hutchison wrote:
> > That sort of snafu is why find(1) has the -depth directive.
> > Does rsync have anything similar?
> >
> > Kevin Korb via rsync  wrote:
> >
> >> There maybe a proper solution but an obvious workaround would be to run
> >> rsync twice.  The first time without the --fileflags option.
> >>
> >> --no-perms wouldn't help.  That is only the standard unix permissions.
> >>
> >> On 10/30/21 8:04 PM, Fred Fugate via rsync wrote:
> >>> Hi,
> >>>
> >>> I have some subdirectories within a home directory that are chflagged
> >>> schg, aka system immutable.
> >>>
> >>> When I rsync the home directory to another machine, I get lots of
> errors
> >>> for these subdirectories and they fail to copy to the target. NOTE: The
> >>> target is empty; rsync is copying to an empty remote machine, not
> trying
> >>> to overwrite anything.
> >>>
> >>> I understand why this is happening; it's the schg flag. But is there a
> >>> workaround using some combination of rsync options or multiple passes?
> >>>
> >>> Here is an example.
> >>>
> >>> The source directory is /Users/redacted.
> >>>
> >>> Within /Users/redacted is a subdirectory foo that has flag schg set:
> >>> /Users/redacted/Documents/artwork/foo
> >>>
> >>> # ls -laO /Users/redacted/Documents/artwork
> >>> total 80
> >>> drwxr-xr-x ?? 20 redacted ??staff ??- ?? ?? ?? ??680 Sep 21 21:06 .
> >>> drwx--@ 609 redacted ??staff ??- ?? ?? ??20706 Oct 29 16:07 ..
> >>> -rw-r--r--@ ?? 1 redacted ??staff ??- ?? ?? ??18436 Sep 21 20:55
> somefile
> >>> drwxrwxrwx@ ??18 redacted ??staff ??schg ?? ?? 612 Apr 12 ??2006 foo
> >>>
> >>>
> >>> My rsync args are:
> >>>
> >>> --verbose --archive --one-file-system --acls --hard-links --xattrs
> >>> --protect-args --delete-after --numeric-ids --itemize-changes --crtimes
> >>> --fileflags --force-change
> >>> --rsync-path=/opt/rsync323/bin/rsync
> >>>
> >>> My rsync version is 3.2.3
> >>>
> >>> My execution and output looks like this, run as root:
> >>>
> >>> # /opt/rsync323/bin/rsync [ARGS ABOVE] /Users/redacted
> >>> remotemachine.domain.com:/Users
> >>> .
> >>> .
> >>> rsync: [receiver] mkstemp
> >>> "/Users/redacted/Documents/artwork/foo/bar/.background.tiff.vYOAS2"
> >>> failed: Operation not permitted (1)
> >>> rsync: [receiver] mkstemp
> >>>
> "/Users/redacted/Documents/artwork/foo/bar/.dc4.orange.CMYK.tiff.rYCmAP"
> >>> failed: Operation not permitted (1)
> >>> rsync: [receiver] mkstemp
> >>> "/Users/redacted/Documents/artwork/foo/bar/.barcode.tiff.2E4mec"
> failed:
> >>> Operation not permitted (1)
> >>> .
> >>> .
> >>>
> >>> In a nutshell:
> >>

Workaround for rsyncing when fileflag schg is set?

2021-10-30 Thread Fred Fugate via rsync
Hi,

I have some subdirectories within a home directory that are chflagged schg,
aka system immutable.

When I rsync the home directory to another machine, I get lots of errors
for these subdirectories and they fail to copy to the target. NOTE: The
target is empty; rsync is copying to an empty remote machine, not trying to
overwrite anything.

I understand why this is happening; it's the schg flag. But is there a
workaround using some combination of rsync options or multiple passes?



Here is an example.

The source directory is /Users/redacted.

Within /Users/redacted is a subdirectory foo that has flag schg set:
/Users/redacted/Documents/artwork/foo

# ls -laO /Users/redacted/Documents/artwork
total 80
drwxr-xr-x   20 redacted  staff  -680 Sep 21 21:06 .
drwx--@ 609 redacted  staff  -  20706 Oct 29 16:07 ..
-rw-r--r--@   1 redacted  staff  -  18436 Sep 21 20:55 somefile
drwxrwxrwx@  18 redacted  staff  schg 612 Apr 12  2006 foo


My rsync args are:

--verbose --archive --one-file-system --acls --hard-links --xattrs
--protect-args --delete-after --numeric-ids --itemize-changes --crtimes
--fileflags --force-change
--rsync-path=/opt/rsync323/bin/rsync

My rsync version is 3.2.3

My execution and output looks like this, run as root:


# /opt/rsync323/bin/rsync [ARGS ABOVE] /Users/redacted
remotemachine.domain.com:/Users
.
.
rsync: [receiver] mkstemp
"/Users/redacted/Documents/artwork/foo/bar/.background.tiff.vYOAS2" failed:
Operation not permitted (1)
rsync: [receiver] mkstemp
"/Users/redacted/Documents/artwork/foo/bar/.dc4.orange.CMYK.tiff.rYCmAP"
failed: Operation not permitted (1)
rsync: [receiver] mkstemp
"/Users/redacted/Documents/artwork/foo/bar/.barcode.tiff.2E4mec" failed:
Operation not permitted (1)
.
.





In a nutshell:

Subdirectory foo gets created on the receiver, but it gets created with the
schg flag set.

No further copying into foo can happen after that, because the schg flag
prevents that.

Subdirectory bar cannot be created under foo, and .background.tiff.vYOAS2
and other files cannot be created under bar, etc.

How can I force the schg flags to be set on the receiver AFTER everything
has been copied from the source?

I really don't want to remove all of my schg settings on the source before
rsyncing to the target.

Would --no-perms allow this? But what would it break?



Thanks,
Fred
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html