Difference between revisions of "Rsync"

From CBLFS
Jump to navigationJump to search
(add optional dependency on "attr" and fix minor typo)
 
(9 intermediate revisions by 4 users not shown)
Line 2: Line 2:
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| http://samba.anu.edu.au/ftp/rsync/rsync-{{Rsync-Version}}.tar.gz
+
| http://samba.anu.edu.au/ftp/rsync/src/rsync-{{Rsync-Version}}.tar.gz
|-
+
 
!Required Patch:
 
| http://svn.cross-lfs.org/svn/repos/patches/rsync/rsync-{{Rsync-Version}}-acl-2.patch
 
 
|}
 
|}
  
 
----
 
----
{{Package-Introduction|According to it's website, rsync is an open source utility that provides fast incremental file transfer.|http://samba.org/rsync/}}
+
{{Package-Introduction|According to its website, rsync is an open source utility that provides fast incremental file transfer.|http://samba.anu.edu.au/rsync}}
  
 
== Dependencies ==
 
== Dependencies ==
Line 16: Line 14:
 
* [[Popt]] (Has an included version)
 
* [[Popt]] (Has an included version)
 
* [[Acl]]
 
* [[Acl]]
 +
* [[Attr]]
 +
 +
== Configuration Information ==
 +
 +
{|style="text-align: left"
 +
|<i>--enable-acl-support</i> builds with acl support.
 +
|}
  
 
== Creating the rsyncd User/Group ==
 
== Creating the rsyncd User/Group ==
Line 26: Line 31:
 
Compile the package:
 
Compile the package:
  
patch -Np1 -i ../rsync-{{Rsync-Version}}-acl-1.patch &&
+
  ./configure --prefix=/usr &&
  ./configure --prefix=/usr --enable-acl-support &&
 
 
  make
 
  make
  
Line 36: Line 40:
 
== Multilib ==
 
== Multilib ==
 
'''''This package does not provide any libraries so only one installation is needed.'''''
 
'''''This package does not provide any libraries so only one installation is needed.'''''
 
=== 32Bit ===
 
 
Compile the package:
 
 
patch -Np1 -i ../rsync-{{Rsync-Version}}-acl-1.patch &&
 
CC="gcc ${BUILD32}" \
 
./configure --prefix=/usr --enable-acl-support &&
 
make
 
 
Install the package:
 
 
make install
 
 
=== N32 ===
 
 
Compile the package:
 
 
patch -Np1 -i ../rsync-{{Rsync-Version}}-acl-1.patch &&
 
CC="gcc ${BUILDN32}" \
 
./configure --prefix=/usr --enable-acl-support &&
 
make
 
 
Install the package:
 
 
make install
 
  
 
=== 64Bit ===
 
=== 64Bit ===
Line 67: Line 45:
 
Compile the package:
 
Compile the package:
  
patch -Np1 -i ../rsync-{{Rsync-Version}}-acl-1.patch &&
 
 
  CC="gcc ${BUILD64}" \
 
  CC="gcc ${BUILD64}" \
  ./configure --prefix=/usr --enable-acl-support &&
+
  ./configure --prefix=/usr &&
 
  make
 
  make
  
Line 97: Line 74:
 
  EOF
 
  EOF
  
=== BootScript ===
+
=== Bootscript ===
  
Create the bootscript:
+
Install the init script provided by the [[bootscripts]] package:
 
 
cat > /etc/rc.d/init.d/rsyncd << "EOF"
 
#!/bin/sh
 
# Begin $rc_base/init.d/rsyncd
 
 
 
. /etc/sysconfig/rc
 
. ${rc_functions}
 
 
case "${1}" in
 
        start)
 
                boot_mesg "Starting The RSYNC Daemon..."
 
                loadproc /usr/bin/rsync --daemon
 
                ;;
 
 
        stop)
 
                boot_mesg "Stopping The RSYNC Daemon..."
 
                killproc /usr/bin/rsync
 
                ;;
 
 
        restart)
 
                ${0} stop
 
                sleep 1
 
                ${0} start
 
                ;;
 
 
        status)
 
                statusproc /usr/bin/rsync
 
                ;;
 
 
        *)
 
                echo "Usage: ${0} {start|stop|restart|status}"
 
                exit 1
 
                ;;
 
esac
 
 
# End $rc_base/init.d/rsyncd
 
EOF
 
chmod -v 754 /etc/rc.d/init.d/rsyncd
 
  
Link it into the runlevels:
+
make install-rsyncd
  
for link in /etc/rc.d/rc{{0,1,6}.d/K30,{2,3,4,5}.d/S30}rsyncd; do
+
[[Category:Servers]]
  ln -sfv ../init.d/rsyncd $link;
 
done
 

Latest revision as of 20:17, 2 August 2010

Download Source: http://samba.anu.edu.au/ftp/rsync/src/rsync-3.0.7.tar.gz

Introduction to Rsync

According to its website, rsync is an open source utility that provides fast incremental file transfer.

Project Homepage: http://samba.anu.edu.au/rsync

Dependencies

Optional

Configuration Information

--enable-acl-support builds with acl support.

Creating the rsyncd User/Group

groupadd -g 49 rsyncd &&
useradd -c "rsyncd Daemon" -d /home/rsync -g rsyncd -s /bin/false -u 49 rsyncd

Non-Multilib

Compile the package:

./configure --prefix=/usr &&
make

Install the package:

make install

Multilib

This package does not provide any libraries so only one installation is needed.

64Bit

Compile the package:

CC="gcc ${BUILD64}" \
./configure --prefix=/usr &&
make

Install the package:

make install

Configuring

If you would like to run the daemon create a config file and then the bootscript.

rsyncd.conf

Example configuration, See rsyncd.conf{5} and/or http://rsync.samba.org/documentation.html for more information:

cat > /etc/rsyncd.conf << "EOF"
motd file = /home/rsync/welcome.msg
use chroot = yes
uid = rsyncd
gid = rsyncd

[localhost]
  path = /home/rsync
  comment = Default rsync module
  read only = yes
  list = yes
EOF

Bootscript

Install the init script provided by the bootscripts package:

make install-rsyncd