bump rancid-3.13

This commit is contained in:
Andreas Billmeier 2021-06-20 12:05:20 +02:00
parent af68f7cbd2
commit 1ceb119f91
2 changed files with 111 additions and 0 deletions

View File

@ -9,5 +9,7 @@ AUX rancid-3.8-buildsystem.patch 1419 BLAKE2B 679e2fb7b2499b5bf7ef0534667673cbba
AUX rancid-3.8-config.patch 1390 BLAKE2B 5c6f0e2ce8dbfe4467843038b5fe0a77aafab2f2361fb506ad21b4330e2c6123246bf99c50a2bc1830a6f79643100954f0a913f1c572ac5b9d6a653b48b15e27 SHA512 ff82143297cf874586a9d0e7c18702d9c4dd74fdede0fb95c222161188703342a8486addf15cdc939eef5382729d8c3727d4764778adc5b935a827b5b860b593
AUX rancid-3.9-buildsystem.patch 1419 BLAKE2B 679e2fb7b2499b5bf7ef0534667673cbbad75c6f2cd2b45e181117c9cb74ec08ed5f5d78479f1dfd242bfa74a0bc28ad28a003135e586f8ba27c09e0439e29e5 SHA512 17b030437fbc39859a45cf46554b3d27c54bbfa5d6d7466d26a861fc0694d8139427e48c5d0daaa420bfce627418656479734126faa912d1beec6a37b86655d5
AUX rancid-3.9-config.patch 1390 BLAKE2B 5c6f0e2ce8dbfe4467843038b5fe0a77aafab2f2361fb506ad21b4330e2c6123246bf99c50a2bc1830a6f79643100954f0a913f1c572ac5b9d6a653b48b15e27 SHA512 ff82143297cf874586a9d0e7c18702d9c4dd74fdede0fb95c222161188703342a8486addf15cdc939eef5382729d8c3727d4764778adc5b935a827b5b860b593
DIST rancid-3.13.tar.gz 506297 BLAKE2B cb28c03a09ecbc79b55c4962880c54088908598ceaacdc62751fdd2adf08fdb3e38917365c47e95eb7b49671731d8146bb6d6cb2f775cc9ff57c83eed92deb5e SHA512 2dbd8a743a03cd94b474c08b0bb1868a991353690b9f3ff2828d16a3a102ca68e4092cb07f24ec4e57c4436e6657f3f2638f890069fbbd35d6c7a34d5bd55df5
DIST rancid-3.9.tar.gz 515946 BLAKE2B 85f49e61c0e885d3bfacf917a3809c5bde01ac9e384ddc6bfcaa01588c8cb5f5632b572a5d732cad044e321aef815c93bbd382531bcf3c86a28f98cd7a624de0 SHA512 d3c88e2092aa907481dbdaa41baea413a5ab5ba194a80c644ae59faea4538b7377e20e15a81270d2e453ca78cc96bdbe3516ed75c9e9e61a7c3bcc7121fbc77c
EBUILD rancid-3.13.ebuild 2930 BLAKE2B c76ce2eb8c506e90be6a9f6ff63507216da3bac546b39416dc14d6f092a217177091196c9423fac31e17db59d0c0ac4a4cc1c533c5e7e59f0b4d8cbb9ec344d3 SHA512 0b5f5b728aa73f2f7a614ae201ab06b26c82fd7befa11f9889cc71934854d325606aef07ad02c7e7621abcc501b0fbbfc183b21e9c06e86821e4bd4e81d3f7f2
EBUILD rancid-3.9.ebuild 2998 BLAKE2B 37605679da9c57e083ab8b28c9975c4e7f54c6c1f8ac7b3b69161e01f8edae9feb2031a4f71f9616ca7e389aaa3203eb9cbf6779d314f93a502731ba87b8a977 SHA512 7c3b326e2d94a8f5be283a05e02b3c96048f8e00cec8d465f9506315f928ba6cc71924209666d924d8f6af092ad122b295e2189df518a689ae7ce8e3cf301c45

View File

@ -0,0 +1,109 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
inherit autotools eutils user
DESCRIPTION="Really Awesome New Cisco confIg Differ"
HOMEPAGE="http://www.shrubbery.net/rancid/"
SRC_URI="ftp://ftp.shrubbery.net/pub/${PN}/${P}.tar.gz"
LICENSE="BSD-4"
SLOT="0"
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:0=
=dev-tcltk/expect-5.45.4-r1
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() {
default
epatch "${FILESDIR}"/${P}-config.patch
epatch "${FILESDIR}"/${P}-buildsystem.patch
# respect CFLAGS, bug #455840
sed -i -e '/^CFLAGS/d' bin/Makefile.am || die 'sed on bin/Makefile.am failed'
}
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)
}
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 +5 -exec rm {} \;
"