Skip to content

Instantly share code, notes, and snippets.

@junsionzhang
Last active January 7, 2023 02:09
Show Gist options
  • Save junsionzhang/ab77cf97cab5f76f91c3f571368af4e4 to your computer and use it in GitHub Desktop.
Save junsionzhang/ab77cf97cab5f76f91c3f571368af4e4 to your computer and use it in GitHub Desktop.
How to install & compile rsync on Mac OSX
#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.1.2.tar.gz
tar -xzvf rsync-3.1.2.tar.gz
rm rsync-3.1.2.tar.gz
curl -O http://rsync.samba.org/ftp/rsync/src/rsync-patches-3.1.2.tar.gz
tar -xzvf rsync-patches-3.1.2.tar.gz
rm rsync-patches-3.1.2.tar.gz
cd rsync-3.1.2
#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
./prepare-source
./configure
make
sudo make install
#Verify your installation
/usr/local/bin/rsync --version
#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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment