import newer upstream version of rsync

pulls in contrib scripts, fixed buffer overflow, better hardlink handling.

BUG=chromium-os:24203
TEST=`emerge rsync` # required by portage, used only in host.

Change-Id: Idb46f02c7e316dc10b8ad67f2b5d9dde28115bf2
Reviewed-on: https://gerrit.chromium.org/gerrit/13398
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
This commit is contained in:
Brian Harring 2011-12-22 01:00:57 -08:00 committed by Gerrit
parent 63c99ed87d
commit a23e463044
7 changed files with 132 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST rsync-3.0.8.tar.gz 790722 RMD160 f00c5ba42e33a1745976c9af5e770c220a6fa4a6 SHA1 10e80173c7e9ed8b8a4dc9e8fdab08402da5f08d SHA256 4b3fc271f4c96036b4c73fb019be078e4d8cce2defe1e7ae7cde1117859a2114

View File

@ -0,0 +1,15 @@
# /etc/rsyncd.conf
# Minimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help
# This line is required by the /etc/init.d/rsyncd script
pid file = /var/run/rsyncd.pid
use chroot = yes
read only = yes
# Simple example for enabling your own local rsync server
#[gentoo-portage]
# path = /usr/portage
# comment = Gentoo Portage tree
# exclude = /distfiles /packages

View File

@ -0,0 +1,5 @@
# /etc/conf.d/rsyncd: config file for /etc/init.d/rsyncd
# see man pages for rsync or run `rsync --help`
# for valid cmdline options
#RSYNC_OPTS=""

View File

@ -0,0 +1,23 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/rsync/files/rsyncd.init.d,v 1.5 2007/02/23 11:33:59 uberlord Exp $
depend() {
use net
}
start() {
ebegin "Starting rsyncd"
start-stop-daemon --start --exec /usr/bin/rsync \
--pidfile /var/run/rsyncd.pid \
-- --daemon ${RSYNC_OPTS}
eend $?
}
stop() {
ebegin "Stopping rsyncd"
start-stop-daemon --stop --exec /usr/bin/rsync \
--pidfile /var/run/rsyncd.pid
eend $?
}

View File

@ -0,0 +1,9 @@
/var/log/rsync.log {
compress
maxage 365
rotate 7
size=+1024k
notifempty
missingok
copytruncate
}

View File

@ -0,0 +1,10 @@
service rsync
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
disable = yes
}

View File

@ -0,0 +1,69 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/rsync/rsync-3.0.8.ebuild,v 1.6 2011/04/02 14:29:43 armin76 Exp $
inherit eutils flag-o-matic
DESCRIPTION="File transfer program to keep remote files into sync"
HOMEPAGE="http://rsync.samba.org/"
SRC_URI="http://rsync.samba.org/ftp/rsync/src/${P/_/}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
IUSE="acl iconv ipv6 static xattr"
DEPEND=">=dev-libs/popt-1.5
acl? ( virtual/acl )
xattr? ( kernel_linux? ( sys-apps/attr ) )
iconv? ( virtual/libiconv )"
S=${WORKDIR}/${P/_/}
src_unpack() {
unpack ${A}
cd "${S}"
epatch_user
}
src_compile() {
use static && append-ldflags -static
econf \
--without-included-popt \
$(use_enable acl acl-support) \
$(use_enable xattr xattr-support) \
$(use_enable ipv6) \
$(use_enable iconv) \
--with-rsyncd-conf=/etc/rsyncd.conf \
|| die
emake || die
}
src_install() {
emake DESTDIR="${D}" install || die
newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd
newinitd "${FILESDIR}"/rsyncd.init.d rsyncd || die
dodoc NEWS OLDNEWS README TODO tech_report.tex
insinto /etc
doins "${FILESDIR}"/rsyncd.conf || die
insinto /etc/logrotate.d
newins "${FILESDIR}"/rsyncd.logrotate rsyncd
insinto /etc/xinetd.d
newins "${FILESDIR}"/rsyncd.xinetd rsyncd
# Install the useful contrib scripts
exeinto /usr/share/rsync
doexe support/* || die
rm -f "${D}"/usr/share/rsync/{Makefile*,*.c}
}
pkg_postinst() {
if egrep -qis '^[[:space:]]use chroot[[:space:]]*=[[:space:]]*(no|0|false)' \
"${ROOT}"/etc/rsyncd.conf "${ROOT}"/etc/rsync/rsyncd.conf ; then
ewarn "You have disabled chroot support in your rsyncd.conf. This"
ewarn "is a security risk which you should fix. Please check your"
ewarn "/etc/rsyncd.conf file and fix the setting 'use chroot'."
fi
}