Skip to content

Instantly share code, notes, and snippets.

@benfry
Last active June 27, 2025 10:45
Show Gist options
  • Select an option

  • Save benfry/6c9b319bf1b5a0a3a1c47cb1c275ade4 to your computer and use it in GitHub Desktop.

Select an option

Save benfry/6c9b319bf1b5a0a3a1c47cb1c275ade4 to your computer and use it in GitHub Desktop.

Revisions

  1. benfry revised this gist Jun 27, 2025. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install-rsync-macosx.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    # Compile rsync 3.2.3
    # Originally from https://gist.github.com/Sounds-of-Science
    # with updates for 3.2.3 instead of 3.0.7, and other path changes

    Follow these instructions in Terminal on both the client and server to download and compile rsync on macOS

  2. benfry revised this gist Apr 30, 2021. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions install-rsync-macosx.sh
    Original file line number Diff line number Diff line change
    @@ -6,8 +6,8 @@ Follow these instructions in Terminal on both the client and server to download

    cd ~/Desktop
    curl -O https://rsync.samba.org/ftp/rsync/src/rsync-3.2.3.tar.gz
    tar xvfz rsync-3.2.3.tar.gz
    curl -O https://rsync.samba.org/ftp/rsync/src/rsync-patches-3.2.3.tar.gz
    tar xvfz rsync-3.2.3.tar.gz
    tar xvfz rsync-patches-3.2.3.tar.gz
    cd rsync-3.2.3

    @@ -27,12 +27,16 @@ patch -p1 <patches/fileflags.diff
    #export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include"
    export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
    export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
    # alternate version, these didn't work either
    export LDFLAGS="-L/usr/local/opt/openssl/lib"
    export CPPFLAGS="-static -I/usr/local/opt/openssl/include"

    # Configure, make, install
    ./prepare-source
    ./configure
    make
    sudo make install
    # don't use sudo if mixing with a Homebrew install
    make install

    #Verify your installation
    /usr/local/bin/rsync --version
  3. benfry revised this gist Apr 30, 2021. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions install-rsync-macosx.sh
    Original file line number Diff line number Diff line change
    @@ -22,10 +22,12 @@ patch -p1 <patches/fileflags.diff
    #patch -p1 <patches/hfs-compression.diff

    # make use openssl can be found (install first with Homebrew)
    export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib"
    export CFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include"
    export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include"

    #export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib"
    #export CFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include"
    #export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include"
    export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
    export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

    # Configure, make, install
    ./prepare-source
    ./configure
  4. benfry revised this gist Apr 30, 2021. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion install-rsync-macosx.sh
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,10 @@ patch -p1 <patches/fileflags.diff
    # looks like crtimes was moved to master:
    # https://github.com/WayneD/rsync-patches/commit/f6849a44b46a8b422438fd6fd2b4cd739a90c244
    #patch -p1 <patches/crtimes.diff
    patch -p1 <patches/hfs-compression.diff

    # No longer work, patch contains:
    # "$$$ERROR$$$ the old patch needs reworking since rsync_xal_get() has totally changed!"
    #patch -p1 <patches/hfs-compression.diff

    # make use openssl can be found (install first with Homebrew)
    export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib"
  5. benfry revised this gist Apr 30, 2021. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions install-rsync-macosx.sh
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,11 @@ patch -p1 <patches/fileflags.diff
    #patch -p1 <patches/crtimes.diff
    patch -p1 <patches/hfs-compression.diff

    # make use openssl can be found (install first with Homebrew)
    export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib"
    export CFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include"
    export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include"

    # Configure, make, install
    ./prepare-source
    ./configure
  6. benfry revised this gist Apr 30, 2021. No changes.
  7. benfry revised this gist Apr 30, 2021. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions install-rsync-macosx.sh
    Original file line number Diff line number Diff line change
    @@ -5,20 +5,20 @@ Follow these instructions in Terminal on both the client and server to download
    # Download and unarchive rsync and its patches

    cd ~/Desktop
    curl -O http://rsync.samba.org/ftp/rsync/src/rsync-3.2.3.tar.gz
    tar -xzvf rsync-3.2.3.tar.gz
    rm rsync-3.2.3.tar.gz
    curl -O http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.2.3.tar.gz
    tar -xzvf rsync-patches-3.2.3.tar.gz
    rm rsync-patches-3.2.3.tar.gz
    curl -O https://rsync.samba.org/ftp/rsync/src/rsync-3.2.3.tar.gz
    tar xvfz rsync-3.2.3.tar.gz
    curl -O https://rsync.samba.org/ftp/rsync/src/rsync-patches-3.2.3.tar.gz
    tar xvfz rsync-patches-3.2.3.tar.gz
    cd rsync-3.2.3

    # Apply patches relevant to preserving Mac OS X metadata
    patch -p1 <patches/fileflags.diff
    patch -p1 <patches/crtimes.diff
    # looks like crtimes was moved to master:
    # https://github.com/WayneD/rsync-patches/commit/f6849a44b46a8b422438fd6fd2b4cd739a90c244
    #patch -p1 <patches/crtimes.diff
    patch -p1 <patches/hfs-compression.diff

    #Configure, make, install
    # Configure, make, install
    ./prepare-source
    ./configure
    make
  8. benfry revised this gist Apr 30, 2021. 1 changed file with 12 additions and 11 deletions.
    23 changes: 12 additions & 11 deletions install-rsync-macosx.sh
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,19 @@
    #Compile rsync 3.0.7
    # Compile rsync 3.2.3

    #Follow these instructions in Terminal on both the client and server to download and compile rsync 3.0.7:
    Follow these instructions in Terminal on both the client and server to download and compile rsync on macOS

    # Download and unarchive rsync and its patches

    #Download and unarchive rsync and its patches
    cd ~/Desktop
    curl -O http://rsync.samba.org/ftp/rsync/src/rsync-3.0.7.tar.gz
    tar -xzvf rsync-3.0.7.tar.gz
    rm rsync-3.0.7.tar.gz
    curl -O http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.0.7.tar.gz
    tar -xzvf rsync-patches-3.0.7.tar.gz
    rm rsync-patches-3.0.7.tar.gz
    cd rsync-3.0.7
    curl -O http://rsync.samba.org/ftp/rsync/src/rsync-3.2.3.tar.gz
    tar -xzvf rsync-3.2.3.tar.gz
    rm rsync-3.2.3.tar.gz
    curl -O http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.2.3.tar.gz
    tar -xzvf rsync-patches-3.2.3.tar.gz
    rm rsync-patches-3.2.3.tar.gz
    cd rsync-3.2.3

    #Apply patches relevant to preserving Mac OS X metadata
    # Apply patches relevant to preserving Mac OS X metadata
    patch -p1 <patches/fileflags.diff
    patch -p1 <patches/crtimes.diff
    patch -p1 <patches/hfs-compression.diff
  9. @Sounds-of-Science Sounds-of-Science revised this gist Nov 20, 2013. 1 changed file with 10 additions and 19 deletions.
    29 changes: 10 additions & 19 deletions install-rsync-macosx.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    Compile rsync 3.0.7
    #Compile rsync 3.0.7

    Follow these instructions in Terminal on both the client and server to download and compile rsync 3.0.7:
    #Follow these instructions in Terminal on both the client and server to download and compile rsync 3.0.7:

    Download and unarchive rsync and its patches
    #Download and unarchive rsync and its patches
    cd ~/Desktop
    curl -O http://rsync.samba.org/ftp/rsync/src/rsync-3.0.7.tar.gz
    tar -xzvf rsync-3.0.7.tar.gz
    @@ -12,28 +12,19 @@ tar -xzvf rsync-patches-3.0.7.tar.gz
    rm rsync-patches-3.0.7.tar.gz
    cd rsync-3.0.7

    Apply patches relevant to preserving Mac OS X metadata
    #Apply patches relevant to preserving Mac OS X metadata
    patch -p1 <patches/fileflags.diff
    patch -p1 <patches/crtimes.diff
    patch -p1 <patches/hfs-compression.diff

    Configure, make, install
    #Configure, make, install
    ./prepare-source
    ./configure
    make
    sudo make install

    Verify your installation
    [bombich:~] /usr/local/bin/rsync --version
    rsync version 3.0.7 protocol version 30
    Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
    Web site: http://rsync.samba.org/
    Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, no iconv, symtimes, file-flags
    #Verify your installation
    /usr/local/bin/rsync --version

    rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
    are welcome to redistribute it under certain conditions. See the GNU
    General Public Licence for details.

    By default, rsync will be installed in /usr/local/bin. If that isn't in your path, you will need to call your new version of rsync by its absolute path (/usr/local/bin/rsync).
    #By default, rsync will be installed in /usr/local/bin.
    #If that isn't in your path, you will need to call your new version of rsync by its absolute path (/usr/local/bin/rsync).
  10. @Sounds-of-Science Sounds-of-Science created this gist Nov 20, 2013.
    39 changes: 39 additions & 0 deletions install-rsync-macosx.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    Compile rsync 3.0.7

    Follow these instructions in Terminal on both the client and server to download and compile rsync 3.0.7:

    Download and unarchive rsync and its patches
    cd ~/Desktop
    curl -O http://rsync.samba.org/ftp/rsync/src/rsync-3.0.7.tar.gz
    tar -xzvf rsync-3.0.7.tar.gz
    rm rsync-3.0.7.tar.gz
    curl -O http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.0.7.tar.gz
    tar -xzvf rsync-patches-3.0.7.tar.gz
    rm rsync-patches-3.0.7.tar.gz
    cd rsync-3.0.7

    Apply patches relevant to preserving Mac OS X metadata
    patch -p1 <patches/fileflags.diff
    patch -p1 <patches/crtimes.diff

    Configure, make, install
    ./prepare-source
    ./configure
    make
    sudo make install

    Verify your installation
    [bombich:~] /usr/local/bin/rsync --version
    rsync version 3.0.7 protocol version 30
    Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
    Web site: http://rsync.samba.org/
    Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, no iconv, symtimes, file-flags

    rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
    are welcome to redistribute it under certain conditions. See the GNU
    General Public Licence for details.

    By default, rsync will be installed in /usr/local/bin. If that isn't in your path, you will need to call your new version of rsync by its absolute path (/usr/local/bin/rsync).