From a23e463044c0b1633551852f8f96c596483d7522 Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Thu, 22 Dec 2011 01:00:57 -0800 Subject: [PATCH] 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 Reviewed-by: Mike Frysinger Commit-Ready: Brian Harring --- .../portage-stable/net-misc/rsync/Manifest | 1 + .../net-misc/rsync/files/rsyncd.conf | 15 ++++ .../net-misc/rsync/files/rsyncd.conf.d | 5 ++ .../net-misc/rsync/files/rsyncd.init.d | 23 +++++++ .../net-misc/rsync/files/rsyncd.logrotate | 9 +++ .../net-misc/rsync/files/rsyncd.xinetd | 10 +++ .../net-misc/rsync/rsync-3.0.8.ebuild | 69 +++++++++++++++++++ 7 files changed, 132 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.conf create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.conf.d create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.init.d create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.logrotate create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.xinetd create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.0.8.ebuild diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/Manifest b/sdk_container/src/third_party/portage-stable/net-misc/rsync/Manifest new file mode 100644 index 0000000000..f31f3f084c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/Manifest @@ -0,0 +1 @@ +DIST rsync-3.0.8.tar.gz 790722 RMD160 f00c5ba42e33a1745976c9af5e770c220a6fa4a6 SHA1 10e80173c7e9ed8b8a4dc9e8fdab08402da5f08d SHA256 4b3fc271f4c96036b4c73fb019be078e4d8cce2defe1e7ae7cde1117859a2114 diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.conf b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.conf new file mode 100644 index 0000000000..252389fb92 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.conf @@ -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 diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.conf.d b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.conf.d new file mode 100644 index 0000000000..c3d897ed2f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.conf.d @@ -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="" diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.init.d b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.init.d new file mode 100644 index 0000000000..1b20282296 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.init.d @@ -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 $? +} diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.logrotate b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.logrotate new file mode 100644 index 0000000000..34bcf72d21 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.logrotate @@ -0,0 +1,9 @@ +/var/log/rsync.log { + compress + maxage 365 + rotate 7 + size=+1024k + notifempty + missingok + copytruncate +} diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.xinetd b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.xinetd new file mode 100644 index 0000000000..50b0dcfa1e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/rsyncd.xinetd @@ -0,0 +1,10 @@ +service rsync +{ + socket_type = stream + protocol = tcp + wait = no + user = root + server = /usr/bin/rsync + server_args = --daemon + disable = yes +} diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.0.8.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.0.8.ebuild new file mode 100644 index 0000000000..f9725b7061 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.0.8.ebuild @@ -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 +}