summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Imhof <tantive@gentoo.org>2003-02-10 21:55:16 +0000
committerMichael Imhof <tantive@gentoo.org>2003-02-10 21:55:16 +0000
commitd899fdc9f48663101adfed5823e33caebe0591b5 (patch)
treecdbdba27f55055cf246fb32510c212f1f8947a9c /app-admin/gentoo-rsync-mirror
parentAdded ~alpha to KEYWORDS in tcpdump-3.7.1.ebuild. (diff)
downloadhistorical-d899fdc9f48663101adfed5823e33caebe0591b5.tar.gz
historical-d899fdc9f48663101adfed5823e33caebe0591b5.tar.bz2
historical-d899fdc9f48663101adfed5823e33caebe0591b5.zip
New ebuild, makes the setup of a gentoo rsync mirror very easy.
Diffstat (limited to 'app-admin/gentoo-rsync-mirror')
-rw-r--r--app-admin/gentoo-rsync-mirror/ChangeLog9
-rw-r--r--app-admin/gentoo-rsync-mirror/files/digest-gentoo-rsync-mirror-1.00
-rw-r--r--app-admin/gentoo-rsync-mirror/files/rsync-gentoo-portage.sh16
-rw-r--r--app-admin/gentoo-rsync-mirror/files/rsyncd.conf22
-rw-r--r--app-admin/gentoo-rsync-mirror/files/rsyncd.init25
-rw-r--r--app-admin/gentoo-rsync-mirror/files/rsyncd.motd1
-rw-r--r--app-admin/gentoo-rsync-mirror/gentoo-rsync-mirror-1.0.ebuild41
7 files changed, 114 insertions, 0 deletions
diff --git a/app-admin/gentoo-rsync-mirror/ChangeLog b/app-admin/gentoo-rsync-mirror/ChangeLog
new file mode 100644
index 000000000000..343af4130084
--- /dev/null
+++ b/app-admin/gentoo-rsync-mirror/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for app-sci/xephem
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
+# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoo-rsync-mirror/ChangeLog,v 1.1 2003/02/10 21:55:16 tantive Exp $
+
+
+*gentoo-rsync-mirror-1.0 (10 Feb 2003)
+
+ 10 Feb 2003; Michael Imhof <tantive@gentoo.org> :
+ Initial release.
diff --git a/app-admin/gentoo-rsync-mirror/files/digest-gentoo-rsync-mirror-1.0 b/app-admin/gentoo-rsync-mirror/files/digest-gentoo-rsync-mirror-1.0
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/app-admin/gentoo-rsync-mirror/files/digest-gentoo-rsync-mirror-1.0
diff --git a/app-admin/gentoo-rsync-mirror/files/rsync-gentoo-portage.sh b/app-admin/gentoo-rsync-mirror/files/rsync-gentoo-portage.sh
new file mode 100644
index 000000000000..3c69d2998eb2
--- /dev/null
+++ b/app-admin/gentoo-rsync-mirror/files/rsync-gentoo-portage.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+RSYNC="/usr/bin/rsync"
+OPTS="--quiet --recursive --links --perms --times --devices --compress --delete --timeout=600"
+#Uncomment the following line only if you have been granted access to rsync1.us.gentoo.org
+#SRC="rsync://rsync1.us.gentoo.org/gentoo-portage"
+#If you are waiting for access to our master mirror, select one of our mirrors to mirror from:
+SRC="rsync://rsync.gentoo.org/gentoo-portage"
+DST="/opt/gentoo-rsync/portage/"
+
+echo "Started update at" `date` >> $0.log 2>&1
+logger -t rsync "re-rsyncing the gentoo-portage tree"
+${RSYNC} ${OPTS} ${SRC} ${DST} >> $0.log 2>&1
+
+echo "End: "`date` >> $0.log 2>&1
+
diff --git a/app-admin/gentoo-rsync-mirror/files/rsyncd.conf b/app-admin/gentoo-rsync-mirror/files/rsyncd.conf
new file mode 100644
index 000000000000..cc9295b9c5b0
--- /dev/null
+++ b/app-admin/gentoo-rsync-mirror/files/rsyncd.conf
@@ -0,0 +1,22 @@
+#uid = nobody
+#gid = nobody
+use chroot = no
+max connections = 20
+pid file = /var/run/rsyncd.pid
+motd file = /etc/rsync/rsyncd.motd
+transfer logging = yes
+log format = %t %a %m %f %b
+syslog facility = local3
+timeout = 300
+
+[gentoo-x86-portage]
+#this entry is for compatibility
+path = /opt/rsync-mirror/portage
+comment = Gentoo Linux Portage tree
+
+[gentoo-portage]
+#modern versions of portage use this entry
+path = /opt/rsync-mirror/portage
+comment = Gentoo Linux Portage tree mirror
+exclude = distfiles
+
diff --git a/app-admin/gentoo-rsync-mirror/files/rsyncd.init b/app-admin/gentoo-rsync-mirror/files/rsyncd.init
new file mode 100644
index 000000000000..ff6f11b4a25f
--- /dev/null
+++ b/app-admin/gentoo-rsync-mirror/files/rsyncd.init
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoo-rsync-mirror/files/rsyncd.init,v 1.1 2003/02/10 21:55:16 tantive Exp $
+
+depend() {
+need net
+}
+
+# FYI: --sparce seems to cause problems.
+RSYNCOPTS="--daemon --safe-links --compress --bwlimit=700 --timeout=1800"
+
+start() {
+ebegin "Starting rsync daemon"
+start-stop-daemon --start --quiet --pidfile /var/run/rsyncd.pid --exec /usr/bin/rsync -- ${RSYNCOPTS}
+eend $?
+}
+
+stop() {
+ebegin "Stopping rsync daemon"
+start-stop-daemon --stop --quiet --pidfile /var/run/rsyncd.pid
+eend $?
+}
+
+
diff --git a/app-admin/gentoo-rsync-mirror/files/rsyncd.motd b/app-admin/gentoo-rsync-mirror/files/rsyncd.motd
new file mode 100644
index 000000000000..35950dd898dd
--- /dev/null
+++ b/app-admin/gentoo-rsync-mirror/files/rsyncd.motd
@@ -0,0 +1 @@
+This is rsync[number].[country].gentoo.org.
diff --git a/app-admin/gentoo-rsync-mirror/gentoo-rsync-mirror-1.0.ebuild b/app-admin/gentoo-rsync-mirror/gentoo-rsync-mirror-1.0.ebuild
new file mode 100644
index 000000000000..159663f70bf7
--- /dev/null
+++ b/app-admin/gentoo-rsync-mirror/gentoo-rsync-mirror-1.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoo-rsync-mirror/gentoo-rsync-mirror-1.0.ebuild,v 1.1 2003/02/10 21:55:16 tantive Exp $
+
+S=${WORKDIR}/gentoo-rsync-mirror-${PV}
+DESCRIPTION="Ebuild for setting up an gentoo rsync mirror"
+HOMEPAGE="http://www.gentoo.org/doc/en/rsync.xml"
+IUSE=""
+
+DEPEND="virtual/glibc"
+RDEPEND="net-misc/rsync"
+SLOT="0"
+LICENSE="unknown"
+KEYWORDS="~x86 ~ppc ~sparc ~alpha"
+
+src_install() {
+ dodir /opt/gentoo-rsync
+ cp ${FILESDIR}/rsync-gentoo-portage.sh ${D}/opt/gentoo-rsync
+ insinto etc/rsync
+ doins ${FILESDIR}/rsyncd.conf
+ doins ${FILESDIR}/rsyncd.motd
+ dodir /opt/gentoo-rsync/portage
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/rsyncd.init rsyncd
+}
+
+pkg_postinst() {
+ einfo "The rsync-mirror is now installed into /opt/gentoo-rsync"
+ einfo "The local portage copy resists in /opt/gentoo-rsync/portage"
+ einfo "Please change /opt/gentoo-rsync/rsync-gentoo-portage.sh for"
+ einfo "configuration of your main rsync server and use it so sync."
+ einfo "Change /etc/rsync/rsyncd.motd to display your correct alias."
+ einfo
+ einfo "The service can be started using /etc/init.d/rsyncd start"
+ einfo "Don't forget to add"
+ einfo "00,30 * * * * root /opt/gentoo-rsync/rsync-gentoo-portage.sh"
+ einfo "to your /etc/crontab to sync your tree every 30 minutes."
+ einfo
+ einfo "For more information visit: http://www.gentoo.org/doc/en/rsync.xml"
+}
+