summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2013-08-02 22:46:02 +0000
committerMichael Weber <xmw@gentoo.org>2013-08-02 22:46:02 +0000
commit2eafd7af20c03e6d71206bc87b5ccfe59a2596eb (patch)
tree200c03eafa46f9c94d1e4f88fa0fed5b5f7a14a6 /net-misc
parentInitial import, request and ebuild by robbat2 (bug 478852). (diff)
downloadhistorical-2eafd7af20c03e6d71206bc87b5ccfe59a2596eb.tar.gz
historical-2eafd7af20c03e6d71206bc87b5ccfe59a2596eb.tar.bz2
historical-2eafd7af20c03e6d71206bc87b5ccfe59a2596eb.zip
Initial import, request and ebuild by robbat2 (bug 478852).
Package-Manager: portage-2.2.0_alpha191/cvs/Linux x86_64 Manifest-Sign-Key: 0x62EEF090
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/rancid-git/Manifest13
-rw-r--r--net-misc/rancid-git/files/rancid-2.3.8-buildsystem.patch64
-rw-r--r--net-misc/rancid-git/files/rancid-2.3.8-config.patch33
-rw-r--r--net-misc/rancid-git/files/rancid-2.3.8-mailprefix.patch178
-rw-r--r--net-misc/rancid-git/metadata.xml12
-rw-r--r--net-misc/rancid-git/rancid-git-2.3.8.ebuild114
6 files changed, 413 insertions, 1 deletions
diff --git a/net-misc/rancid-git/Manifest b/net-misc/rancid-git/Manifest
index faf7257ede37..67c5ddad879a 100644
--- a/net-misc/rancid-git/Manifest
+++ b/net-misc/rancid-git/Manifest
@@ -1,6 +1,17 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX rancid-2.3.8-buildsystem.patch 1741 SHA256 6addb41b560b1cfa74e9aa4c526ea7622f5809310ae749505763e510b5ea0388 SHA512 2ce1befcd4898654958e8a961156a6eda95da319d98ca66c9cb216ab46b80166571146b631a699be5702d5bb7baa8301b570fe82fb89ba8096a941807005f9ab WHIRLPOOL e10781cc3e9bd8dad3d2ec970b3def5893d2411bf2bc0e929d6803292c2b928efbb9d9e0f8fd62a8113219f96b9a59d174eeeab2db06972509978c8332fc4d2b
AUX rancid-2.3.8-config.patch 1241 SHA256 66cb3e28127b2e8336cf315b5004bd6ea1d83a4af803f89fd535b9af450fbcbf SHA512 abad6758dbe89eacf566b5cc931749ed9667ec7f7e824a8091f5a02edfeacb4497b1dfc5444ae41f5652a479791c585e4625b8877e710f460698a8bb2cccce9c WHIRLPOOL 271911b9c89a3fa7aa2d3b078bc832b1eff85343770b4f73352615ab53c1c9b4eb28827dfd17b10b9eba7bcb651c846f39f20f14506ec82dc8a8671a29ea3379
AUX rancid-2.3.8-mailprefix.patch 5878 SHA256 1703c25a50667c3f979010e883da8a83d540a551922716c0e4de09b3a4bdbbf3 SHA512 c01cdaafd599c8b1559b158ba0999c1e79c40dc4c8f6c0f5aa284225a5903ba967b742cee7d81f2edeb07c6e7e344c1208c018421c023a7f678204c647f3e8bd WHIRLPOOL 9e0d0c22c24386231aa029a0e5e1bf78df56bd75558f8c12aabcee5a2ab75ef25b21569334318351f700eb55cec0ef3d7864f65eb87d12035aebb9e3766c2df5
DIST rancid-git-2.3.8.tar.gz 388121 SHA256 c90c80fb25354c6d7a8ae7c4137ca96625338a8cbe6ad5756b073e0d4f257b31 SHA512 14a4fa097a31e2772d83e72cdcfb5488bf3e1c69e8065286c52eb554a392eb4257a0dc38fad5d79819fb417e699fb4e2c265ef5cfbf018418d9550eb653fa551 WHIRLPOOL 513c5f4ee27fd84ce12dff145652802350a00e9c9f9d3e5b5fb906a3f03d617cc73459dd658586dd5f81e21e7eca3220ba77890a59c4b06fc928fae3f0b6c123
-EBUILD rancid-git-2.3.8.ebuild 3285 SHA256 84442f2c856283794370f942b752826a58890d9fb4b58f3ba2e22b88c69c11d5 SHA512 b2ff02a7134bbaafe03f470ac2e493ab6174a49b91e85a3f1dd776a67f1df3ba8c1b9d9a39ea35940df5ac566f5abc7c601d85a15a644f33428c014b84eb7ffe WHIRLPOOL 3414046f04d91cbb363601b49ba3d5ae7f59ad145c3e3cedd2810d1264d1b8164fc7743f490bb3ef3db20c330dd5b1e3c8a63ad8ea81d5f34cdc97773bf019ff
+EBUILD rancid-git-2.3.8.ebuild 3288 SHA256 14153c263923bdc4006071bcc3f957b5e9d3448b7c1f4c8a72fe2e88c3aa334b SHA512 716c60ca6d2029144e3b9747e979d628b3581ea11846385f2b0534879f5744aab91d1991cf99f9df2f283f9dabbfa82597c96dcbb32f8b3fe4c2a4029eee7a2a WHIRLPOOL 56588eab170c99e84cc699669314c798f9e63a4f101cac25ba5311a234883467b826d9638292c879b8a2e9696375cf8407ea9a72bff146916daf6e378790bce4
+MISC ChangeLog 505 SHA256 0922cadc77bd3dd7cd4f0122fcc2b0d86abed0c1abf8b262859d3173711729d4 SHA512 60e2a96bae9c134438f2f827342df70c92ba634e14f77bcd5cda970eac346c8c8f08be3fa5549e104b1549bc94501ce8d4d210197ab52c2f160c46315d0199c7 WHIRLPOOL d6cfb5be40a8ab703cab3dc5866a8c8e7bb56059ace0645b2eeac07c245252c216d881a842605be93b6a23900c105220de9f4138874d37558d7cfaa4ab1b5e8c
MISC metadata.xml 330 SHA256 93d92a78b3898889f0cbbbc0ed5214a8ecfd82fa9f07d80e69c9e1ebf8f75819 SHA512 a92f0d82d11e4526498d89f2755cd4cf9f999168bee0393cca1b3bc0c6684a601f855c8386085a554aa2e19e0d5ccfba047fd097146032c28d5c4045e61f7d72 WHIRLPOOL 155451228f02aec9b2c42add4772a3c693189caf1e8eccd823a0514dbe7f52854730f540bcf9f8df83408d1cf198f0f72e108dc66e1882b3e5b4d95d3f20ed07
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.20 (GNU/Linux)
+
+iF4EAREIAAYFAlH8NqIACgkQknrdDGLu8JDJbwEAjqoX9DTSTeb+YpQYJGz/pFJK
+TPW6KI6DFR9N1UyryfQA/3XmLFePtN65zi6H/MoIdP59JJsTYmoJI5sNCb0q6roq
+=kZmC
+-----END PGP SIGNATURE-----
diff --git a/net-misc/rancid-git/files/rancid-2.3.8-buildsystem.patch b/net-misc/rancid-git/files/rancid-2.3.8-buildsystem.patch
new file mode 100644
index 000000000000..4a06b5c63723
--- /dev/null
+++ b/net-misc/rancid-git/files/rancid-2.3.8-buildsystem.patch
@@ -0,0 +1,64 @@
+--- rancid-2.3.8/configure.in
++++ rancid-2.3.8/configure.in
+@@ -17,7 +17,7 @@
+ dnl default install location
+ AC_PREFIX_DEFAULT(/usr/local/rancid)
+
+-dnl AM_MAINTAINER_MODE()
++AM_MAINTAINER_MODE()
+
+ dnl AC_CONFIG_SUBDIRS(util)
+
+@@ -35,7 +35,6 @@
+
+ # compiler specifics
+ AC_PROG_CC
+-AM_C_PROTOTYPES
+ AC_PROG_CPP
+ AC_C_CONST
+ AC_C_INLINE
+@@ -212,7 +212,7 @@
+ # is good enough -- if we can't find GNU tar, we don't really care.
+ AC_CHECK_PROGS(TAR, gnutar gtar tar)
+
+-AC_CHECK_PROGS(AUTOMAKE, automake)
++dnl AC_CHECK_PROGS(AUTOMAKE, automake)
+
+ dnl locate perl 5 and expect.
+ AC_PROG_INSTALL
+--- rancid-2.3.8/Makefile.am
++++ rancid-2.3.8/Makefile.am
+@@ -24,7 +24,7 @@
+
+ @SET_MAKE@
+
+-pkgdata_DATA = COPYING CHANGES FAQ README README.lg UPGRADING cloginrc.sample
++dist_doc_DATA = COPYING CHANGES FAQ README README.lg UPGRADING cloginrc.sample
+ EXTRA_DIST = BUGS Todo configure install-sh \
+ mkinstalldirs Makefile.in Todo $(pkgdata_DATA)
+ #DIST_COMMON =
+--- rancid-2.3.8/share/Makefile.am
++++ rancid-2.3.8/share/Makefile.am
+@@ -50,8 +50,9 @@
+
+ pkgdata_SCRIPTS= rancid-cvspurge rtrfilter downreport
+ dist_pkgdata_SCRIPTS=getipacctg
+-dist_pkgdata_DATA=README.misc cisco-load.exp cisco-reload.exp \
+- index.html lgnotes.html
++dist_pkgdata_DATA=cisco-load.exp cisco-reload.exp
++dist_doc_DATA=README.misc
++dist_html_DATA=index.html lgnotes.html
+
+ EXTRA_DIST = rancid-cvspurge.in rancid.spec rtrfilter.in downreport.in
+
+--- rancid-2.3.8/etc/Makefile.am
++++ rancid-2.3.8/etc/Makefile.am
+@@ -48,7 +48,7 @@
+ #AUTOMAKE_OPTIONS=foreign no-dependencies
+ AUTOMAKE_OPTIONS=foreign
+
+-pkgdata_DATA= lg.conf.sample rancid.conf.sample
++dist_doc_DATA= lg.conf.sample rancid.conf.sample
+ EXTRA_DIST= $(pkgdata_DATA:%=%.in)
+
+ CLEANFILES= $(pkgdata_DATA)
diff --git a/net-misc/rancid-git/files/rancid-2.3.8-config.patch b/net-misc/rancid-git/files/rancid-2.3.8-config.patch
new file mode 100644
index 000000000000..f39f28382da8
--- /dev/null
+++ b/net-misc/rancid-git/files/rancid-2.3.8-config.patch
@@ -0,0 +1,33 @@
+--- etc/rancid.conf.sample.in
++++ etc/rancid.conf.sample.in
+@@ -42,7 +42,10 @@
+ RCSSYS=@RCSSYS@; export RCSSYS
+ #
+ # if ACLSORT is NO, access-lists will NOT be sorted.
+-#ACLSORT=YES; export ACLSORT
++#
++#Gentoo - changing default to NO because access-list order matters in most instances
++#and many people expect to use rancid as a backup system
++ACLSORT=NO; export ACLSORT
+ #
+ # if NOPIPE is set, temp files will be used instead of a cmd pipe during
+ # collection from the router(s).
+@@ -50,10 +53,16 @@
+ #
+ # FILTER_PWDS determines which passwords are filtered from configs by the
+ # value set (NO | YES | ALL). see rancid.conf(5).
+-#FILTER_PWDS=YES; export FILTER_PWDS
++#
++#Gentoo - changing default to ALL; diffs are emailed and even the most secure
++#password hashes on most routers are easily brute-forceable with modern systems
++FILTER_PWDS=ALL; export FILTER_PWDS
+ #
+ # if NOCOMMSTR is set, snmp community strings will be stripped from the configs
+-#NOCOMMSTR=YES; export NOCOMMSTR
++#
++#Gentoo - changing default to YES; diffs are emailed and SNMP communities
++#can be just as dangerous as passwords
++NOCOMMSTR=YES; export NOCOMMSTR
+ #
+ # How many times failed collections are retried (for each run) before
+ # giving up. Minimum: 1
diff --git a/net-misc/rancid-git/files/rancid-2.3.8-mailprefix.patch b/net-misc/rancid-git/files/rancid-2.3.8-mailprefix.patch
new file mode 100644
index 000000000000..171a380679dc
--- /dev/null
+++ b/net-misc/rancid-git/files/rancid-2.3.8-mailprefix.patch
@@ -0,0 +1,178 @@
+--- rancid-2.3.8/bin/Makefile.am
++++ rancid-2.3.8/bin/Makefile.am
+@@ -96,8 +96,6 @@
+ -e 's,@PERLV\@,$(PERLV),g' \
+ -e 's,@PERLV_PATH\@,$(PERLV_PATH),g' \
+ -e 's,@LG_PING_CMD\@,$(LG_PING_CMD),g' \
+- -e 's,@ADMINMAILPLUS\@,$(ADMINMAILPLUS),g' \
+- -e 's,@MAILPLUS\@,$(MAILPLUS),g' \
+ -e 's,@PACKAGE\@,$(PACKAGE),g' \
+ -e 's,@SVN_FSTYPE\@,$(SVN_FSTYPE),g' \
+ -e 's,@VERSION\@,$(VERSION),g' \
+--- rancid-2.3.8/bin/control_rancid.in
++++ rancid-2.3.8/bin/control_rancid.in
+@@ -118,8 +118,8 @@
+ fi
+
+ # the receipient(s) of diffs & mail options
+-mailrcpt=${mailrcpt:-"@MAILPLUS@${GROUP}${MAILDOMAIN}"}; export mailrcpt
+-adminmailrcpt=${adminmailrcpt:-"@ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"};
++mailrcpt=${mailrcpt:-"${MAILPREFIX}${GROUP}${MAILDOMAIN}"}; export mailrcpt
++adminmailrcpt=${adminmailrcpt:-"${ADMINMAILPREFIX}${GROUP}${MAILDOMAIN}"};
+ export adminmailrcpt
+ set | grep MAILHEADERS= > /dev/null 2>&1
+ if [ $? -ne 0 ] ; then
+--- rancid-2.3.8/bin/rancid-run.in
++++ rancid-2.3.8/bin/rancid-run.in
+@@ -147,7 +147,7 @@
+ if [ -s $TMPDIR/.$GROUP.old ]
+ then
+ (
+- echo "To: @ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"
++ echo "To: ${ADMINMAILPREFIX}${GROUP}${MAILDOMAIN}"
+ echo "Subject: rancid hung - $GROUP"
+ echo "Precedence: bulk"
+ echo ""
+--- rancid-2.3.8/configure.in
++++ rancid-2.3.8/configure.in
+@@ -163,46 +163,6 @@
+ AC_SUBST(SVN_FSTYPE)
+ rd_cv_RCSSYS=$RCSSYS
+
+-# Check for a preference for using mail addresses like rancid+group
+-# instead of the standard rancid-group
+-AC_MSG_CHECKING([whether mail addresses should be in the rancid+ form])
+-AC_ARG_ENABLE(mail-plus,
+- AS_HELP_STRING([--enable-mail-plus], [enable mail to rancid+ addresses, instead of rancid-]),
+-[if test "$enable_mail_plus" = yes; then
+- AC_MSG_RESULT(yes)
+- MAILPLUS="rancid+"
+- AC_SUBST(MAILPLUS)
+-else
+- AC_MSG_RESULT(no)
+- MAILPLUS="rancid-"
+- AC_SUBST(MAILPLUS)
+-fi],
+-[AC_MSG_RESULT(no)
+- MAILPLUS="rancid-"
+- AC_SUBST(MAILPLUS)
+-])
+-rd_cv_MAILPLUS=$MAILPLUS
+-
+-# Check for a preference for using mail addresses like rancid+admin-group
+-# instead of the standard rancid-admin-group
+-AC_MSG_CHECKING([whether admin mail addresses should be in the rancid-admin+ form])
+-AC_ARG_ENABLE(adminmail-plus,
+- AS_HELP_STRING([--enable-adminmail-plus], [enable mail to rancid-admin+ addresses, instead of rancid-admin-]),
+-[if test "$enable_adminmail_plus" = yes; then
+- AC_MSG_RESULT([rancid-admin+])
+- ADMINMAILPLUS="rancid-admin+"
+- AC_SUBST(ADMINMAILPLUS)
+-else
+- AC_MSG_RESULT([${MAILPLUS}admin-])
+- ADMINMAILPLUS="${MAILPLUS}admin-"
+- AC_SUBST(ADMINMAILPLUS)
+-fi],
+-[AC_MSG_RESULT([${MAILPLUS}admin-])
+- ADMINMAILPLUS="${MAILPLUS}admin-"
+- AC_SUBST(ADMINMAILPLUS)
+-])
+-rd_cv_ADMINMAILPLUS=$ADMINMAILPLUS
+-
+ AC_PATH_PROG(DIRNAME,dirname,no)
+
+ # locate GNU diff (one supporting the -u option)
+--- rancid-2.3.8/etc/rancid.conf.sample.in
++++ rancid-2.3.8/etc/rancid.conf.sample.in
+@@ -71,6 +71,21 @@
+ # The number of devices to collect simultaneously.
+ #PAR_COUNT=5; export PAR_COUNT
+ #
++# Define the prefixes for regular and administrative email groups
++# configuration diffs will be emailed to {MAILPREFIX}{GROUPNAME}
++# eg. rancid-routers
++# problems/errors will be emailed to {ADMINMAILPREFIX}{GROUPNAME}
++# eg. rancid-admin-routers
++#
++MAILPREFIX="rancid-"; export MAILPREFIX
++ADMINMAILPREFIX="rancid-admin-"; export ADMINMAILPREFIX
++#
++# To use a delimiter-based system instead of email aliases,
++# comment the above 2 lines and uncomment the following two lines:
++#MAILPREFIX="rancid+"; export MAILPREFIX
++#ADMINMAILPREFIX="rancid-admin+"; export ADMINMAILPREFIX
++#
++#
+ # list of rancid groups
+ #LIST_OF_GROUPS="sl joebobisp"
+ # more groups...
+--- rancid-2.3.8/man/Makefile.am
++++ rancid-2.3.8/man/Makefile.am
+@@ -79,9 +79,7 @@
+ -e 's,@bindir\@,$(bindir),g' \
+ -e 's,@localstatedir\@,$(localstatedir),g' \
+ -e 's,@sysconfdir\@,$(sysconfdir),g' \
+- -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
+- -e 's,@ADMINMAILPLUS\@,$(ADMINMAILPLUS),g' \
+- -e 's,@MAILPLUS\@,$(MAILPLUS),g'
++ -e 's,@pkgdatadir\@,$(pkgdatadir),g'
+
+ lg.conf.5: Makefile $(srcdir)/lg.conf.5.in
+ rm -f lg.conf.5 lg.conf.5.tmp; \
+--- rancid-2.3.8/man/rancid.conf.5.in
++++ rancid-2.3.8/man/rancid.conf.5.in
+@@ -81,6 +81,19 @@
+ are always filtered (e.g.: Alteon passwords).
+ .\"
+ .TP
++.B MAILPREFIX
++Sets the mail prefix that is used to generate group emails. Configuration
++diffs are emailed to an address of the form {MAILPREFIX}{GROUPNAME}
++eg. rancid-routers
++.sp
++Default: rancid-
++.B ADMINMAILPREFIX
++Sets the mail prefix that is used to generate admin group emails.
++problems/errors are emailed to an address of the form
++{ADMINMAILPREFIX}{GROUPNAME}
++eg. rancid-admin-routers
++.sp
++Default: rancid-admin-
+ .B LIST_OF_GROUPS
+ Defines a list of group names of routers separated by white-space. These
+ names become the directory names in $BASEDIR which contain the data
+@@ -104,10 +117,10 @@
+ .sp
+ .in +1i
+ .nf
+-@MAILPLUS@uofo: frank
+-@ADMINMAILPLUS@uofo: joe,bob
+-@MAILPLUS@usfs: frank
+-@ADMINMAILPLUS@usfs: joe,bob
++rancid-uofo: frank
++rancid-admin-uofo: joe,bob
++randid-usfs: frank
++rancid-admin-usfs: joe,bob
+ .fi
+ .sp
+ .in -1i
+@@ -129,7 +142,7 @@
+ .B MAILDOMAIN
+ Define the domain part of addresses for administrative and diff e-mail.
+ The value of this variable is simply appended to the normal mail addresses.
+-For example @MAILPLUS@usfs@example.com, if
++For example rancid-usfs@example.com, if
+ .B MAILDOMAIN
+ had been set to "@example.com".
+ .\"
+--- rancid-2.3.8/share/downreport.in
++++ rancid-2.3.8/share/downreport.in
+@@ -73,7 +73,7 @@
+
+ for GROUP in $LIST_OF_GROUPS; do
+ (
+- echo "To: @MAILPLUS@admin-$GROUP"
++ echo "To: ${ADMINMAILPREFIX}$GROUP"
+ echo "Subject: Down router report - $GROUP"
+ echo "$MAILHEADERS" | awk '{gsub(/\\n/,"\n");print;}'
+ echo ""
diff --git a/net-misc/rancid-git/metadata.xml b/net-misc/rancid-git/metadata.xml
new file mode 100644
index 000000000000..3d8137323622
--- /dev/null
+++ b/net-misc/rancid-git/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maint</herd>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<use>
+ <flag name="git">Enable git (version control system) support</flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/rancid-git/rancid-git-2.3.8.ebuild b/net-misc/rancid-git/rancid-git-2.3.8.ebuild
new file mode 100644
index 000000000000..9b2fd5299317
--- /dev/null
+++ b/net-misc/rancid-git/rancid-git-2.3.8.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/rancid-git/rancid-git-2.3.8.ebuild,v 1.1 2013/08/02 22:45:58 xmw Exp $
+
+EAPI=5
+
+inherit autotools eutils readme.gentoo user
+
+DESCRIPTION="Really Awesome New Cisco confIg Differ with git extensions and support for colorized emails!"
+HOMEPAGE="http://dotwaffle.github.com/rancid-git"
+#SRC_URI="ftp://ftp.shrubbery.net/pub/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/dotwaffle/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD-4"
+
+SLOT="0"
+RESTRICT="mirror"
+KEYWORDS="~amd64 ~x86"
+IUSE="+git cvs subversion"
+REQUIRED_USE="^^ ( git cvs subversion )"
+
+# app-arch/par is blocker, due to bug #455838
+DEPEND="!app-arch/par
+ dev-lang/perl
+ dev-lang/tcl
+ dev-tcltk/expect
+ sys-apps/diffutils
+ git? ( dev-vcs/git )
+ cvs? ( dev-vcs/cvs )
+ subversion? ( dev-vcs/subversion )
+ || (
+ net-misc/netkit-telnetd
+ net-misc/telnet-bsd
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P/-git}-mailprefix.patch
+ epatch "${FILESDIR}"/${P/-git}-config.patch
+ epatch "${FILESDIR}"/${P/-git}-buildsystem.patch
+
+ # respect CFLAGS, bug #455840
+ sed -i -e '/^CFLAGS/d' bin/Makefile.am || die 'sed on bin/Makefile.am failed'
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}"/var/${PN} \
+ --enable-conf-install \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ `use_with subversion svn fsfs` \
+ `use_with git`
+}
+
+src_install() {
+ default
+
+ if use subversion ; then
+ sed -e 's/^RCSSYS=cvs/RCSSYS=svn/' \
+ -i "${D}"/etc/rancid.conf || die
+ fi
+
+ echo "CONFIG_PROTECT=\"${EPREFIX}/var/rancid/.cloginrc\"" > "${T}"/99${PN}
+ doenvd "${T}"/99${PN}
+
+ readme.gentoo_src_install
+}
+
+pkg_preinst() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 /bin/bash "${EPREFIX}"/var/rancid ${PN}
+
+ keepdir /var/${PN}{,/logs}
+ touch "${ED}"/var/${PN}/.cloginrc
+
+ fperms ug=rwX,o= /var/${PN}/{,logs,.cloginrc}
+ fowners ${PN}:${PN} /var/${PN}/{,logs,.cloginrc}
+}
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="Micro-HOWTO on how to get running:
+
+1) Modify MAILPREFIX, ADMINMAILPREFIX, and LIST_OF_GROUPS
+in /etc/rancid.conf:
+MAILPREFIX=\"rancid-\"
+ADMINMAILPREFIX=\"rancid-admin-\"
+LIST_OF_GROUPS=\"routers switches\"
+
+2) Setup email aliases for rancid:
+you will need to define mail aliases for {MAILPREFIX}{GROUP}
+and {ADMINMAILPREFIX}{GROUP} for each group you defined above
+How to do this depends on your mailserver
+
+3) Run rancid-cvs as the rancid user to initialise directories and
+repositories; eg. su -c /usr/bin/rancid-cvs - rancid
+Note the command is the same even if you are using subversion
+
+4) Populate /var/rancid/{GROUPNAME}/router.db with nodes
+see man 5 router.db for detailed formatting information
+
+5) Populate /var/rancid/.cloginrc with credentials
+see /usr/share/rancid/cloginrc.sample for an example
+
+6) Test clogin access with: clogin -f /var/rancid/.clogin hostname
+
+7) Add a cronjob for the rancid user to regularly call rancid-run
+eg: run crontab -u rancid -e and add the lines below
+# run rancid once an hour
+0 * * * * /usr/bin/rancid-run
+# cleanup old logfiles generated by rancid once a day
+50 23 * * * /usr/bin/find /var/rancid/logs -type f -mtime +2 -exec rm {} \;
+"