gentoo-rsync-mirror-1.0-r4.ebuild 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. DESCRIPTION="Ebuild for setting up a Gentoo rsync mirror"
  4. HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Infrastructure/Rsync"
  5. SRC_URI=""
  6. LICENSE="GPL-2"
  7. SLOT="0"
  8. KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
  9. IUSE=""
  10. src_install() {
  11. dodir /opt/gentoo-rsync
  12. cp "${FILESDIR}"/rsync-gentoo-portage.sh "${D}"/opt/gentoo-rsync
  13. cp "${FILESDIR}"/rsynclogparse-extended.pl "${D}"/opt/gentoo-rsync
  14. insinto etc/rsync
  15. doins "${FILESDIR}"/rsyncd.conf
  16. doins "${FILESDIR}"/rsyncd.motd
  17. doins "${FILESDIR}"/gentoo-mirror.conf
  18. dodir /opt/gentoo-rsync/portage
  19. }
  20. pkg_postinst() {
  21. elog "The rsync-mirror is now installed into /opt/gentoo-rsync"
  22. elog "The local portage copy resides in /opt/gentoo-rsync/portage"
  23. elog "Please change /opt/gentoo-rsync/rsync-gentoo-portage.sh for"
  24. elog "configuration of your main rsync server and use it so sync."
  25. elog "Change /etc/rsync/rsyncd.motd to display your correct alias."
  26. elog
  27. elog "RSYNC_OPTS="--config=/etc/rsync/rsyncd.conf" needs"
  28. elog "to be set in /etc/conf.d/rsyncd to make allow syncing."
  29. elog
  30. elog "The service can be started using /etc/init.d/rsyncd start"
  31. elog "If you are setting up an official mirror, don't forget to add"
  32. elog "00,30 * * * * root /opt/gentoo-rsync/rsync-gentoo-portage.sh"
  33. elog "to your /etc/crontab to sync your tree every 30 minutes."
  34. elog
  35. elog "If you are setting up a private (unofficial) mirror, you can add"
  36. elog "0 3 * * * root /opt/gentoo-rsync/rsync-gentoo-portage.sh"
  37. elog "to your /etc/crontab to sync your tree once per day."
  38. elog
  39. elog "****IMPORTANT****"
  40. elog "If you are setting up a private mirror, DO NOT sync against the"
  41. elog "gentoo.org official rotations more than once a day. Doing so puts"
  42. elog "you at risk of having your IP address banned from the rotations."
  43. elog
  44. elog "For more information visit: https://wiki.gentoo.org/wiki/Project:Infrastructure/Rsync"
  45. }