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

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