summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-vcs/cvs
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-vcs/cvs')
-rw-r--r--dev-vcs/cvs/Manifest13
-rw-r--r--dev-vcs/cvs/cvs-1.11.23.ebuild62
-rw-r--r--dev-vcs/cvs/cvs-1.12.12-r10.ebuild90
-rw-r--r--dev-vcs/cvs/cvs-1.12.12-r6.ebuild82
-rw-r--r--dev-vcs/cvs/cvs-1.12.12-r7.ebuild83
-rw-r--r--dev-vcs/cvs/cvs-1.12.12-r8.ebuild84
-rw-r--r--dev-vcs/cvs/cvs-1.12.12-r9.ebuild89
-rw-r--r--dev-vcs/cvs/cvs-1.12.13-r1.ebuild131
-rw-r--r--dev-vcs/cvs/cvs-1.12.13-r2.ebuild132
-rw-r--r--dev-vcs/cvs/cvs-1.12.13.1-r1.ebuild154
-rw-r--r--dev-vcs/cvs/cvs-1.12.13.1-r2.ebuild155
-rw-r--r--dev-vcs/cvs/cvs-1.12.13.1.ebuild151
-rw-r--r--dev-vcs/cvs/files/01-cvs-env.d1
-rw-r--r--dev-vcs/cvs/files/cvs-1.11.23-CVE-2010-3846.patch167
-rw-r--r--dev-vcs/cvs/files/cvs-1.11.23-getline64.patch36
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-block-requests.patch140
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-cvs-custom.c58
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-cvs-gnulib-vasnprintf.patch34
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-cvsbug-tmpfix.patch22
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-fix-massive-leak.patch52
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-getdelim.patch21
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-hash-nameclash.patch42
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-install-sh.patch12
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch29
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-openat.patch21
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-rcs2log-coreutils.patch14
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.13-openat.patch21
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.13-zlib.patch31
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.13.1-block-requests.patch101
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.13.1-fix-gnulib-SEGV-vasnprintf.patch42
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.13.1-gl-mempcpy.patch24
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.13.1-hash-nameclash.patch43
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.13.1-use-include_next.patch30
-rw-r--r--dev-vcs/cvs/files/cvs.pam-include-1.12.124
-rw-r--r--dev-vcs/cvs/files/cvspserver.xinetd.d14
-rw-r--r--dev-vcs/cvs/metadata.xml8
36 files changed, 2193 insertions, 0 deletions
diff --git a/dev-vcs/cvs/Manifest b/dev-vcs/cvs/Manifest
new file mode 100644
index 000000000000..bda243d8d414
--- /dev/null
+++ b/dev-vcs/cvs/Manifest
@@ -0,0 +1,13 @@
+DIST cederqvist-1.11.23.html.bz2 112336 SHA256 7b44791e77d3cc56e2ce970303f4003a8a759e432cfa97de93fa45c4d78f80d9 SHA512 671d9d0d364c7ec21c8b5ae357bf7be097447342053b6eb442d6b367ff1b79e17b8494cac21a08c7a897c039ede7e08992d4af158fb2a68847506f7841f98789 WHIRLPOOL c58dba2bf0ca96a17099f5488f34b1343385e67a22a20697a0de4c9affb30f21fbd790b5fd874487e5f40ce2978ee961e8b876910ac520da35ec7ceb07edf139
+DIST cederqvist-1.11.23.pdf 1134081 SHA256 0ef6dc37510e43be1bcae50c635dedcbb2d56f16968946ff0a304a43f87a7d59 SHA512 6b5f7603ff38eaf0747d364f74960c5bb3ba172fd93436440644396ba9e94538cc3c258c8c44d5fc3437c73eacc8727381f0caa94651227a74353bb46029d490 WHIRLPOOL 31d5e9ff2abe0bf93f9be6f8657690a24c55037d621bc54e735d078a7ac1b089d55d0ea57b8450c47611d6ea7aff54aeed7f7bfbe1ff02188b25abcea164bcd0
+DIST cederqvist-1.11.23.ps 1129600 SHA256 6b35cbeecd6fa069e59743716f2766f5bfffe3013a59cf72d833e5837b20abc0 SHA512 0a0e14bb611a210d4fbacd187a8fd2d8ce2746df1487ec0272cb4abe9027194109adfa7ffe97fada1457203eac7428605e3b3def11a6fece4140e08b66ded17e WHIRLPOOL c24b5dea728a9a317fdbdf212351bb04525daebccc94a68fee8bc717f68ce8f1a9de7446422bffc07e9a27a005bf4a8d6bffcee31a2e83cb3cac34ee993f8cbb
+DIST cederqvist-1.12.12.html.tar.bz2 137581 SHA256 6bdd66581ec363e05313a14db27cd3c201b547cdfc9ea2f8edde74e78301f0f6 SHA512 c4f6bdc294b719c1c9f6e8b7d1d4faa9e2aafccd37924e9d4772f8d802da3e7f5ae1778b295989db256b23bb1d0914023db7237adaf07833caaee499ae6b6fa3 WHIRLPOOL 41dd1e0d944a02eeca10539b87b5cfcadbf4fd5923c872aa86e5673bb6a98f774d5378e8b4f1c2e6c6a62e6dc6a4d02c69b5e51ad03da899903070effd62adc9
+DIST cederqvist-1.12.12.pdf 1252423 SHA256 211c5792d24bfd5694f23bc217a161d880bfb2447c41016fab6f657168b041ce SHA512 aa90b76664ca103cf41831a5595d5e99df9fd87633aa5a500569f43854ca6e409a26b655f02ed59cde1c37ce88c40e06f3b3376ad71fdc9487032c3f0898706a WHIRLPOOL 88d015117c05716df6d0cdc763f16dc488f0641624475e9bd33478485dd32e36a7ee5c49a1789ebdd173e665ae5963e75975342d7308e8e453adb65dd31ec6c5
+DIST cederqvist-1.12.12.ps 1262208 SHA256 0e14189614e2c5ead49bfe0ecd187239f8adc3e66371b49d52163be821e44cab SHA512 9a061ef90c664fbb4f882644f72c4f80ffbe0233b6b364511b1c7f18f0a53383980a6ddda326b6df1f2fe1899aed3225de89b55a65a1d9101ba81d1c10c067e2 WHIRLPOOL fb1616ca734e51a626713e7e78786ecbff18378966c2c131f6992df248096d38e850123449d3a5a6aa111ee209f90ef48848da7366b21cb6befeccf07ce54ab6
+DIST cederqvist-1.12.13.html.tar.bz2 140382 SHA256 1a9a34e07c00de5102224b48cbc53384992aea197c91c20b6140dd6885b5ae87 SHA512 4305b5b5d6ec75288e8be0f818815898523de465bd2dc1f55dc277a423815608e619e6fb50d47d29c378249db53f7dba2cc6b4e996f8cd2c1eecf5b9db5957c3 WHIRLPOOL 8b72d282e466b85ad2e898c52a934df55af530a458c39171e4de31a71e1d7c0dbf85674387021f0bc4d87b480a3ff32084574294425923b64c10998e0716abdc
+DIST cederqvist-1.12.13.pdf 1297631 SHA256 4f24b2ac3b81c97798cad42cba8ffe6cc65405f13e5a58a4b063aa9fffc4a7bc SHA512 56ff658265a4e08df6bcd59b1bcb046cbcb92d4107fd4fc54a35601e379af048fdab720500207a4ea6b757058bb52973c7723a02f43b5de8c9fee7f09379ba1f WHIRLPOOL 5ca68dbc70dfbf98a61700f696c4b197a8943f3122d419e2ae2a1f085c589b02c3e90bdadfa657351e51dfbf4a40781babcc47319e157aede3f67be8edf08493
+DIST cederqvist-1.12.13.ps 1280573 SHA256 a955722b89155e390635b1220fa67a096c97141d83ac53a7840323c01d13aa91 SHA512 7a6e9605c82b4d105d37663b12ce9fc89eb8e9153897ceeb6d4fd18da07947180b96167f67cd04df0ec2682d431bbb6840c8c87ccd97ddb596dd2efd31bbf1e4 WHIRLPOOL 2b6249d9cba0d08b76e9d8ae24828cfbfae71c2f109e35ca425c0122a79dc3a66a52ec9506971eab031d730743ed3bc5c01b583e3e9a538f067e22e6d78a6c0f
+DIST cvs-1.11.23.tar.bz2 2942652 SHA256 400f51b59d85116e79b844f2d5dbbad4759442a789b401a94aa5052c3d7a4aa9 SHA512 d84360b51b966f19ac3f1728265ff25e46d3a3ce6d9e7e30b154f0975bb10ce4f82f5ca3f308d2ff169c2b5dd97b0243e910d2e8ad59a5857aef7a70b9026b19 WHIRLPOOL 0f4a14989c29ee76a911edcbcb9b946f3710d1015391e7a219c841bf3cd03678994d572f23a66975030e9ca2eb64abc7f7665a535203bc81653d754491039252
+DIST cvs-1.12.12.tar.bz2 3197171 SHA256 9fb9176d268b9019768fc57dedc2920c28fbeda5ba224c2348550d4f25043edc SHA512 31c679b77b887e02d9c8c381b0dfb42f1207ef4ca806cd92843638eb2126ed032e99bda70a3e20ea2a029670ff39c40088a43435632e381739e6c2f978e6f4bb WHIRLPOOL 74257976cdb957e86fb9fb7e54fc8c0b7210f72136ce05327203d935195e7a3bdda0c1d616dc04cb1d6495cb038ca7275e88488eddb5d936c1cfceb94583278c
+DIST cvs-1.12.13.1.tar.bz2 4075630 SHA256 de7f374d8c4ac414c04e8d44ce9a5d3da919825a6a332d747e299dc7a80c2218 SHA512 db318c0c70b47283bd469d792bdfe5335e5375e3b25beb79a7aea8435209b944cfa7ba51bdef9935f708e3a26a06b72defdb698974f2951cc9afd615f970986b WHIRLPOOL 3369e59e9f598cf6de28577302d62d3f6b00f705a0a5729c7ebf7b956d899e85afaaa160be2c4f7a4c710c1dd8860301ad1855c874229e39dbe60a5acc91a884
+DIST cvs-1.12.13.tar.bz2 3911104 SHA256 78853613b9a6873a30e1cc2417f738c330e75f887afdaf7b3d0800cb19ca515e SHA512 7d10f808de62190b18d4f706d2d03ab218a508bfb52047ff3e830e293ec40c5e8bf6cc743ef72a5c24be5aa867c9e4892d7d475a026a98b296a3764b4bd0f4d8 WHIRLPOOL 0662c898e05dfe9e45ee1615cfc86bdf664dfc74ddcbea8833e0f98b22e5ea65920d401d3f9a674d5e567eb10f94a29631487a2f8e43a49685888ca94f98ab62
diff --git a/dev-vcs/cvs/cvs-1.11.23.ebuild b/dev-vcs/cvs/cvs-1.11.23.ebuild
new file mode 100644
index 000000000000..b85ae1d530f7
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.11.23.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+SRC_URI="mirror://gnu/non-gnu/cvs/source/stable/${PV}/${P}.tar.bz2
+ doc? ( mirror://gnu/non-gnu/cvs/source/stable/${PV}/cederqvist-${PV}.html.bz2
+ mirror://gnu/non-gnu/cvs/source/stable/${PV}/cederqvist-${PV}.pdf
+ mirror://gnu/non-gnu/cvs/source/stable/${PV}/cederqvist-${PV}.ps )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+KEYWORDS="~arm64 ~ppc-aix ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc emacs"
+RESTRICT='test'
+
+DEPEND=">=sys-libs/zlib-1.1.4"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-CVE-2010-3846.patch
+ epatch "${FILESDIR}"/${P}-getline64.patch
+
+ # remove a useless binary
+ einfo "Removing a compiled binary"
+ find "${S}" -type f -name getdate -exec rm \{\} \;
+}
+
+src_configure() {
+ [[ ${CHOST} == *-interix* ]] && export ac_cv_header_inttypes_h=no
+
+ econf --with-tmpdir=/tmp --without-gssapi || die
+}
+
+src_install() {
+ einstall || die
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ if use emacs; then
+ insinto /usr/share/emacs/site-lisp
+ doins cvs-format.el || die "doins failed"
+ fi
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${PV}.ps
+ tar xjf "${DISTDIR}"/cederqvist-${PV}.html.tar.bz2
+ dohtml -r cederqvist-${PV}.html/*
+ cd "${ED}"/usr/share/doc/${PF}/html/
+ ln -s cvs.html index.html
+ fi
+}
diff --git a/dev-vcs/cvs/cvs-1.12.12-r10.ebuild b/dev-vcs/cvs/cvs-1.12.12-r10.ebuild
new file mode 100644
index 000000000000..5198af42911b
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.12-r10.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils pam toolchain-funcs
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+
+SRC_URI="mirror://gnu/non-gnu/cvs/source/feature/${PV}/${P}.tar.bz2
+ doc? ( mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.html.tar.bz2
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.pdf
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.ps )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt doc kerberos nls pam server"
+RESTRICT='test'
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${PV}.html.tar.bz2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cvsbug-tmpfix.patch
+ epatch "${FILESDIR}"/${P}-openat.patch
+ epatch "${FILESDIR}"/${P}-block-requests.patch
+ epatch "${FILESDIR}"/${P}-cvs-gnulib-vasnprintf.patch
+ epatch "${FILESDIR}"/${P}-install-sh.patch
+ epatch "${FILESDIR}"/${P}-hash-nameclash.patch # for AIX
+ epatch "${FILESDIR}"/${P}-getdelim.patch # 314791
+ epatch "${FILESDIR}"/${PN}-1.12.12-rcs2log-coreutils.patch # 144114
+ epatch "${FILESDIR}"/${P}-mktime-x32.patch # 395641
+ epatch "${FILESDIR}"/${P}-fix-massive-leak.patch
+ use server || elog "If you want any CVS server functionality, you MUST emerge with USE=server!"
+}
+
+src_configure() {
+ if tc-is-cross-compiler ; then
+ # Sane defaults when cross-compiling (as these tests want to
+ # try and execute code).
+ export cvs_cv_func_printf_ptr="yes"
+ fi
+ econf \
+ --with-external-zlib \
+ --with-tmpdir=/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ insinto /etc/xinetd.d
+ if use server; then
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+ fi
+ newenvd "${FILESDIR}"/01-cvs-env.d 01cvs
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ # Not installed into emacs site-lisp because it clobbers the normal C
+ # indentations.
+ dodoc cvs-format.el || die "dodoc failed"
+
+ use server && newdoc "${FILESDIR}"/cvs-1.12.12-cvs-custom.c cvs-custom.c
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${PV}.ps
+ tar xjf "${DISTDIR}"/cederqvist-${PV}.html.tar.bz2
+ dohtml -r cederqvist-${PV}.html/*
+ dosym cvs.html /usr/share/doc/${PF}/html/index.html
+ fi
+
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+}
diff --git a/dev-vcs/cvs/cvs-1.12.12-r6.ebuild b/dev-vcs/cvs/cvs-1.12.12-r6.ebuild
new file mode 100644
index 000000000000..4f5a3539155b
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.12-r6.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils pam toolchain-funcs
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+
+SRC_URI="mirror://gnu/non-gnu/cvs/source/feature/${PV}/${P}.tar.bz2
+ doc? ( mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.html.tar.bz2
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.pdf
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.ps )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+
+IUSE="crypt doc kerberos nls pam server"
+RESTRICT='test'
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${PV}.html.tar.bz2
+ EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${P}-cvsbug-tmpfix.patch
+ epatch "${FILESDIR}"/${P}-openat.patch
+ EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${P}-block-requests.patch
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-cvs-gnulib-vasnprintf.patch
+ epatch "${FILESDIR}"/${P}-install-sh.patch
+ epatch "${FILESDIR}"/${P}-mktime-x32.patch # 395641
+ use server || elog "If you want any CVS server functionality, you MUST emerge with USE=server!"
+}
+
+src_compile() {
+ if tc-is-cross-compiler ; then
+ # Sane defaults when cross-compiling (as these tests want to
+ # try and execute code).
+ export cvs_cv_func_printf_ptr="yes"
+ fi
+ econf \
+ --with-external-zlib \
+ --with-tmpdir=/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server) \
+ || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ # Not installed into emacs site-lisp because it clobbers the normal C
+ # indentations.
+ dodoc cvs-format.el || die "dodoc failed"
+
+ use server && newdoc "${FILESDIR}"/cvs-1.12.12-cvs-custom.c cvs-custom.c
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${PV}.ps
+ tar xjf "${DISTDIR}"/cederqvist-${PV}.html.tar.bz2
+ dohtml -r cederqvist-${PV}.html/*
+ cd "${D}"/usr/share/doc/${PF}/html/
+ ln -s cvs.html index.html
+ fi
+
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+}
diff --git a/dev-vcs/cvs/cvs-1.12.12-r7.ebuild b/dev-vcs/cvs/cvs-1.12.12-r7.ebuild
new file mode 100644
index 000000000000..754e0c143554
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.12-r7.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils pam toolchain-funcs
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+
+SRC_URI="mirror://gnu/non-gnu/cvs/source/feature/${PV}/${P}.tar.bz2
+ doc? ( mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.html.tar.bz2
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.pdf
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.ps )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt doc kerberos nls pam server"
+RESTRICT='test'
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${PV}.html.tar.bz2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cvsbug-tmpfix.patch
+ epatch "${FILESDIR}"/${P}-openat.patch
+ epatch "${FILESDIR}"/${P}-block-requests.patch
+ epatch "${FILESDIR}"/${P}-cvs-gnulib-vasnprintf.patch
+ epatch "${FILESDIR}"/${P}-install-sh.patch
+ epatch "${FILESDIR}"/${P}-hash-nameclash.patch # for AIX
+ elog "If you want any CVS server functionality, you MUST emerge with USE=server!"
+}
+
+src_configure() {
+ if tc-is-cross-compiler ; then
+ # Sane defaults when cross-compiling (as these tests want to
+ # try and execute code).
+ export cvs_cv_func_printf_ptr="yes"
+ fi
+ econf \
+ --with-external-zlib \
+ --with-tmpdir=/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ # Not installed into emacs site-lisp because it clobbers the normal C
+ # indentations.
+ dodoc cvs-format.el || die "dodoc failed"
+
+ use server && newdoc "${FILESDIR}"/cvs-1.12.12-cvs-custom.c cvs-custom.c
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${PV}.ps
+ tar xjf "${DISTDIR}"/cederqvist-${PV}.html.tar.bz2
+ dohtml -r cederqvist-${PV}.html/*
+ dosym cvs.html /usr/share/doc/${PF}/html/index.html
+ fi
+
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+}
diff --git a/dev-vcs/cvs/cvs-1.12.12-r8.ebuild b/dev-vcs/cvs/cvs-1.12.12-r8.ebuild
new file mode 100644
index 000000000000..18e0e6c1f374
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.12-r8.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils pam toolchain-funcs
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+
+SRC_URI="mirror://gnu/non-gnu/cvs/source/feature/${PV}/${P}.tar.bz2
+ doc? ( mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.html.tar.bz2
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.pdf
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.ps )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt doc kerberos nls pam server"
+RESTRICT='test'
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${PV}.html.tar.bz2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cvsbug-tmpfix.patch
+ epatch "${FILESDIR}"/${P}-openat.patch
+ epatch "${FILESDIR}"/${P}-block-requests.patch
+ epatch "${FILESDIR}"/${P}-cvs-gnulib-vasnprintf.patch
+ epatch "${FILESDIR}"/${P}-install-sh.patch
+ epatch "${FILESDIR}"/${P}-hash-nameclash.patch # for AIX
+ epatch "${FILESDIR}"/${P}-getdelim.patch # 314791
+ elog "If you want any CVS server functionality, you MUST emerge with USE=server!"
+}
+
+src_configure() {
+ if tc-is-cross-compiler ; then
+ # Sane defaults when cross-compiling (as these tests want to
+ # try and execute code).
+ export cvs_cv_func_printf_ptr="yes"
+ fi
+ econf \
+ --with-external-zlib \
+ --with-tmpdir=/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ # Not installed into emacs site-lisp because it clobbers the normal C
+ # indentations.
+ dodoc cvs-format.el || die "dodoc failed"
+
+ use server && newdoc "${FILESDIR}"/cvs-1.12.12-cvs-custom.c cvs-custom.c
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${PV}.ps
+ tar xjf "${DISTDIR}"/cederqvist-${PV}.html.tar.bz2
+ dohtml -r cederqvist-${PV}.html/*
+ dosym cvs.html /usr/share/doc/${PF}/html/index.html
+ fi
+
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+}
diff --git a/dev-vcs/cvs/cvs-1.12.12-r9.ebuild b/dev-vcs/cvs/cvs-1.12.12-r9.ebuild
new file mode 100644
index 000000000000..4531ce4b4e77
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.12-r9.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils pam toolchain-funcs
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+
+SRC_URI="mirror://gnu/non-gnu/cvs/source/feature/${PV}/${P}.tar.bz2
+ doc? ( mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.html.tar.bz2
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.pdf
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.ps )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt doc kerberos nls pam server"
+RESTRICT='test'
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${PV}.html.tar.bz2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cvsbug-tmpfix.patch
+ epatch "${FILESDIR}"/${P}-openat.patch
+ epatch "${FILESDIR}"/${P}-block-requests.patch
+ epatch "${FILESDIR}"/${P}-cvs-gnulib-vasnprintf.patch
+ epatch "${FILESDIR}"/${P}-install-sh.patch
+ epatch "${FILESDIR}"/${P}-hash-nameclash.patch # for AIX
+ epatch "${FILESDIR}"/${P}-getdelim.patch # 314791
+ epatch "${FILESDIR}"/${PN}-1.12.12-rcs2log-coreutils.patch # 144114
+ epatch "${FILESDIR}"/${P}-mktime-x32.patch # 395641
+ use server || elog "If you want any CVS server functionality, you MUST emerge with USE=server!"
+}
+
+src_configure() {
+ if tc-is-cross-compiler ; then
+ # Sane defaults when cross-compiling (as these tests want to
+ # try and execute code).
+ export cvs_cv_func_printf_ptr="yes"
+ fi
+ econf \
+ --with-external-zlib \
+ --with-tmpdir=/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ insinto /etc/xinetd.d
+ if use server; then
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+ fi
+ newenvd "${FILESDIR}"/01-cvs-env.d 01cvs
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ # Not installed into emacs site-lisp because it clobbers the normal C
+ # indentations.
+ dodoc cvs-format.el || die "dodoc failed"
+
+ use server && newdoc "${FILESDIR}"/cvs-1.12.12-cvs-custom.c cvs-custom.c
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${PV}.ps
+ tar xjf "${DISTDIR}"/cederqvist-${PV}.html.tar.bz2
+ dohtml -r cederqvist-${PV}.html/*
+ dosym cvs.html /usr/share/doc/${PF}/html/index.html
+ fi
+
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+}
diff --git a/dev-vcs/cvs/cvs-1.12.13-r1.ebuild b/dev-vcs/cvs/cvs-1.12.13-r1.ebuild
new file mode 100644
index 000000000000..a96af961bc85
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.13-r1.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils pam toolchain-funcs
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+
+SRC_URI="mirror://gnu/non-gnu/cvs/source/feature/${PV}/${P}.tar.bz2
+ doc? ( mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.html.tar.bz2
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.pdf
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.ps )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt doc emacs kerberos nls pam server"
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${PV}.html.tar.bz2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.12.12-cvsbug-tmpfix.patch
+ epatch "${FILESDIR}"/${P}-openat.patch
+ epatch "${FILESDIR}"/${P}-zlib.patch
+ epatch "${FILESDIR}"/${PN}-1.12.12-install-sh.patch
+ # this testcase was not updated
+ #sed -i.orig -e '/unrecognized keyword.*BogusOption/s,98,73,g' \
+ # ${S}/src/sanity.sh
+ # this one fails when the testpath path contains '.'
+ sed -i.orig -e '/newfile config3/s,a-z,a-z.,g' \
+ "${S}"/src/sanity.sh
+}
+
+src_configure() {
+ local myconf
+ # the tests need the server and proxy
+ if use test; then
+ use server || \
+ ewarn "The server and proxy code are enabled as they are required for tests."
+ myconf="--enable-server --enable-proxy"
+ fi
+ if tc-is-cross-compiler ; then
+ # Sane defaults when cross-compiling (as these tests want to
+ # try and execute code).
+ export cvs_cv_func_printf_ptr="yes"
+ fi
+ econf \
+ --with-external-zlib \
+ --with-tmpdir=/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server) \
+ $(use_enable server proxy)
+}
+
+src_install() {
+ einstall || die
+
+ if use server; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+ fi
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ if use emacs; then
+ insinto /usr/share/emacs/site-lisp
+ doins cvs-format.el || die "doins failed"
+ fi
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${PV}.ps
+ tar xjf "${DISTDIR}"/cederqvist-${PV}.html.tar.bz2
+ dohtml -r cederqvist-${PV}.html/*
+ dosym cvs.html /usr/share/doc/${PF}/html/index.html
+ fi
+
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+}
+
+src_test() {
+ einfo "If you want to see realtime status, or check out a failure,"
+ einfo "please look at ${S}/src/check.log*"
+ if [ -n "$TEST_REMOTE_AND_PROXY" ]; then
+ einfo "local, remote, and proxy tests enabled."
+ else
+ einfo "Only testing local mode. Please see ebuild for other modes."
+ fi
+
+ cd "${S}"/src
+ export TESTDIR="${T}/tests-local"
+ mkdir -p "$TESTDIR"
+ # we only do the local tests by default
+ make localcheck || die "Some local test failed."
+ mv -f check.log check.log-local
+
+ # if you want to test the remote and proxy modes, things get a little bit
+ # complicated. You need to set up a SSH config file at ~portage/.ssh/config
+ # that allows the portage user to login without any authentication, and also
+ # set up the ~portage/.ssh/known_hosts file for your machine.
+ # We do not do this by default, as it is unsafe from a security point of
+ # view, and requires root level ssh changes.
+ if [ -n "$TEST_REMOTE_AND_PROXY" ]; then
+ cd "${S}"/src
+ export TESTDIR="${T}/tests-remote"
+ mkdir -p "$TESTDIR"
+ make remotecheck || die "Some remote test failed."
+ mv -f check.log check.log-remote
+
+ cd "${S}"/src
+ export TESTDIR="${T}/tests-proxy"
+ mkdir -p "$TESTDIR"
+ make proxycheck || die "Some proxy test failed."
+ mv -f check.log check.log-proxy
+ fi
+}
diff --git a/dev-vcs/cvs/cvs-1.12.13-r2.ebuild b/dev-vcs/cvs/cvs-1.12.13-r2.ebuild
new file mode 100644
index 000000000000..de3d18dfe28c
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.13-r2.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils pam toolchain-funcs
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+
+SRC_URI="mirror://gnu/non-gnu/cvs/source/feature/${PV}/${P}.tar.bz2
+ doc? ( mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.html.tar.bz2
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.pdf
+ mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.ps )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt doc emacs kerberos nls pam server"
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${PV}.html.tar.bz2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.12.12-cvsbug-tmpfix.patch
+ epatch "${FILESDIR}"/${P}-openat.patch
+ epatch "${FILESDIR}"/${P}-zlib.patch
+ epatch "${FILESDIR}"/${PN}-1.12.12-install-sh.patch
+ epatch "${FILESDIR}"/${PN}-1.12.12-fix-massive-leak.patch
+ # this testcase was not updated
+ #sed -i.orig -e '/unrecognized keyword.*BogusOption/s,98,73,g' \
+ # ${S}/src/sanity.sh
+ # this one fails when the testpath path contains '.'
+ sed -i.orig -e '/newfile config3/s,a-z,a-z.,g' \
+ "${S}"/src/sanity.sh
+}
+
+src_configure() {
+ local myconf
+ # the tests need the server and proxy
+ if use test; then
+ use server || \
+ ewarn "The server and proxy code are enabled as they are required for tests."
+ myconf="--enable-server --enable-proxy"
+ fi
+ if tc-is-cross-compiler ; then
+ # Sane defaults when cross-compiling (as these tests want to
+ # try and execute code).
+ export cvs_cv_func_printf_ptr="yes"
+ fi
+ econf \
+ --with-external-zlib \
+ --with-tmpdir=/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server) \
+ $(use_enable server proxy)
+}
+
+src_install() {
+ einstall || die
+
+ if use server; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+ fi
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ if use emacs; then
+ insinto /usr/share/emacs/site-lisp
+ doins cvs-format.el || die "doins failed"
+ fi
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${PV}.ps
+ tar xjf "${DISTDIR}"/cederqvist-${PV}.html.tar.bz2
+ dohtml -r cederqvist-${PV}.html/*
+ dosym cvs.html /usr/share/doc/${PF}/html/index.html
+ fi
+
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+}
+
+src_test() {
+ einfo "If you want to see realtime status, or check out a failure,"
+ einfo "please look at ${S}/src/check.log*"
+ if [ -n "$TEST_REMOTE_AND_PROXY" ]; then
+ einfo "local, remote, and proxy tests enabled."
+ else
+ einfo "Only testing local mode. Please see ebuild for other modes."
+ fi
+
+ cd "${S}"/src
+ export TESTDIR="${T}/tests-local"
+ mkdir -p "$TESTDIR"
+ # we only do the local tests by default
+ make localcheck || die "Some local test failed."
+ mv -f check.log check.log-local
+
+ # if you want to test the remote and proxy modes, things get a little bit
+ # complicated. You need to set up a SSH config file at ~portage/.ssh/config
+ # that allows the portage user to login without any authentication, and also
+ # set up the ~portage/.ssh/known_hosts file for your machine.
+ # We do not do this by default, as it is unsafe from a security point of
+ # view, and requires root level ssh changes.
+ if [ -n "$TEST_REMOTE_AND_PROXY" ]; then
+ cd "${S}"/src
+ export TESTDIR="${T}/tests-remote"
+ mkdir -p "$TESTDIR"
+ make remotecheck || die "Some remote test failed."
+ mv -f check.log check.log-remote
+
+ cd "${S}"/src
+ export TESTDIR="${T}/tests-proxy"
+ mkdir -p "$TESTDIR"
+ make proxycheck || die "Some proxy test failed."
+ mv -f check.log check.log-proxy
+ fi
+}
diff --git a/dev-vcs/cvs/cvs-1.12.13.1-r1.ebuild b/dev-vcs/cvs/cvs-1.12.13.1-r1.ebuild
new file mode 100644
index 000000000000..8c06d888a320
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.13.1-r1.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils pam toolchain-funcs versionator
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+
+DOC_PV="$(get_version_component_range 1-3)"
+FEAT_URIBASE="mirror://gnu/non-gnu/cvs/source/feature/${PV}/"
+DOC_URIBASE="mirror://gnu/non-gnu/cvs/source/feature/${DOC_PV}/"
+SNAP_URIBASE="mirror://gnu/non-gnu/cvs/source/nightly-snapshots/feature/"
+SRC_URI="
+ ${FEAT_URIBASE}/${P}.tar.bz2
+ ${SNAP_URIBASE}/${P}.tar.bz2
+ doc? (
+ ${DOC_URIBASE}/cederqvist-${DOC_PV}.html.tar.bz2
+ ${DOC_URIBASE}/cederqvist-${DOC_PV}.pdf
+ ${DOC_URIBASE}/cederqvist-${DOC_PV}.ps
+ )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt doc kerberos nls pam server"
+
+RDEPEND=">=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${DOC_PV}.html.tar.bz2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.12.12-cvsbug-tmpfix.patch
+ epatch "${FILESDIR}"/${PN}-1.12.12-install-sh.patch
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-block-requests.patch
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-hash-nameclash.patch # for AIX
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-gl-mempcpy.patch # for AIX
+ epatch "${FILESDIR}"/${PN}-1.12.12-fix-massive-leak.patch
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-use-include_next.patch
+ # Applied by upstream:
+ #epatch "${FILESDIR}"/${PN}-1.12.13-openat.patch
+ #epatch "${FILESDIR}"/${PN}-1.12.13-zlib.patch
+
+ # this testcase was not updated
+ #sed -i.orig -e '/unrecognized keyword.*BogusOption/s,98,73,g' \
+ # ${S}/src/sanity.sh
+ # this one fails when the testpath path contains '.'
+ sed -i.orig \
+ -e '/newfile config3/s,a-z,a-z.,g' \
+ "${S}"/src/sanity.sh
+
+ elog "If you want any CVS server functionality, you MUST emerge with USE=server!"
+}
+
+src_configure() {
+ local myconf
+ # the tests need the server and proxy
+ if use test; then
+ use server || \
+ ewarn "The server and proxy code are enabled as they are required for tests."
+ myconf="--enable-server --enable-proxy"
+ fi
+ if tc-is-cross-compiler ; then
+ # Sane defaults when cross-compiling (as these tests want to
+ # try and execute code).
+ export cvs_cv_func_printf_ptr="yes"
+ fi
+ econf \
+ --with-external-zlib \
+ --with-tmpdir=/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server) \
+ $(use_enable server proxy) \
+ ${myconf}
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ if use server; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+ fi
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ # Not installed into emacs site-lisp because it clobbers the normal C
+ # indentations.
+ dodoc cvs-format.el || die "dodoc failed"
+
+ use server && newdoc "${FILESDIR}"/${PN}-1.12.12-cvs-custom.c cvs-custom.c
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${DOC_PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${DOC_PV}.ps
+ dohtml -r "${WORKDIR}"/cederqvist-${DOC_PV}.html/
+ dosym cvs.html /usr/share/doc/${PF}/html/index.html
+ fi
+
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+}
+
+_run_one_test() {
+ mode="$1" ; shift
+ einfo "Starting ${mode} test"
+ cd "${S}"/src
+ export TESTDIR="${T}/tests-${mode}"
+ rm -rf "$TESTDIR" # Clean up from any previous test passes
+ mkdir -p "$TESTDIR"
+ emake -j1 ${mode}check || die "Some ${mode} test failed."
+ mv -f check.log check.log-${mode}
+ einfo "${mode} test completed successfully, log is check.log-${mode}"
+}
+
+src_test() {
+ einfo "If you want to see realtime status, or check out a failure,"
+ einfo "please look at ${S}/src/check.log*"
+
+ if [ "$TEST_REMOTE_AND_PROXY" == "1" ]; then
+ einfo "local, remote, and proxy tests enabled."
+ else
+ einfo "Only testing local mode. Please see ebuild for other modes."
+ fi
+
+ # we only do the local tests by default
+ _run_one_test local
+
+ # if you want to test the remote and proxy modes, things get a little bit
+ # complicated. You need to set up a SSH config file at ~portage/.ssh/config
+ # that allows the portage user to login without any authentication, and also
+ # set up the ~portage/.ssh/known_hosts file for your machine.
+ # We do not do this by default, as it is unsafe from a security point of
+ # view, and requires root level ssh changes.
+ # Note that this also requires having a real shell for the portage user, so make
+ # sure that su -c 'ssh portage@mybox' portage works first!
+ # (It uses the local ip, not loopback)
+ if [ "$TEST_REMOTE_AND_PROXY" == "1" ]; then
+ _run_one_test remote
+ _run_one_test proxy
+ fi
+}
diff --git a/dev-vcs/cvs/cvs-1.12.13.1-r2.ebuild b/dev-vcs/cvs/cvs-1.12.13.1-r2.ebuild
new file mode 100644
index 000000000000..912f17e31f14
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.13.1-r2.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils pam toolchain-funcs versionator
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+
+DOC_PV="$(get_version_component_range 1-3)"
+FEAT_URIBASE="mirror://gnu/non-gnu/cvs/source/feature/${PV}/"
+DOC_URIBASE="mirror://gnu/non-gnu/cvs/source/feature/${DOC_PV}/"
+SNAP_URIBASE="mirror://gnu/non-gnu/cvs/source/nightly-snapshots/feature/"
+SRC_URI="
+ ${FEAT_URIBASE}/${P}.tar.bz2
+ ${SNAP_URIBASE}/${P}.tar.bz2
+ doc? (
+ ${DOC_URIBASE}/cederqvist-${DOC_PV}.html.tar.bz2
+ ${DOC_URIBASE}/cederqvist-${DOC_PV}.pdf
+ ${DOC_URIBASE}/cederqvist-${DOC_PV}.ps
+ )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt doc kerberos nls pam server"
+
+RDEPEND=">=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${DOC_PV}.html.tar.bz2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.12.12-cvsbug-tmpfix.patch
+ epatch "${FILESDIR}"/${PN}-1.12.12-install-sh.patch
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-block-requests.patch
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-hash-nameclash.patch # for AIX
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-gl-mempcpy.patch # for AIX
+ epatch "${FILESDIR}"/${PN}-1.12.12-fix-massive-leak.patch
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-use-include_next.patch
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-fix-gnulib-SEGV-vasnprintf.patch
+ # Applied by upstream:
+ #epatch "${FILESDIR}"/${PN}-1.12.13-openat.patch
+ #epatch "${FILESDIR}"/${PN}-1.12.13-zlib.patch
+
+ # this testcase was not updated
+ #sed -i.orig -e '/unrecognized keyword.*BogusOption/s,98,73,g' \
+ # ${S}/src/sanity.sh
+ # this one fails when the testpath path contains '.'
+ sed -i.orig \
+ -e '/newfile config3/s,a-z,a-z.,g' \
+ "${S}"/src/sanity.sh
+
+ elog "If you want any CVS server functionality, you MUST emerge with USE=server!"
+}
+
+src_configure() {
+ local myconf
+ # the tests need the server and proxy
+ if use test; then
+ use server || \
+ ewarn "The server and proxy code are enabled as they are required for tests."
+ myconf="--enable-server --enable-proxy"
+ fi
+ if tc-is-cross-compiler ; then
+ # Sane defaults when cross-compiling (as these tests want to
+ # try and execute code).
+ export cvs_cv_func_printf_ptr="yes"
+ fi
+ econf \
+ --with-external-zlib \
+ --with-tmpdir=/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server) \
+ $(use_enable server proxy) \
+ ${myconf}
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ if use server; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+ fi
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ # Not installed into emacs site-lisp because it clobbers the normal C
+ # indentations.
+ dodoc cvs-format.el || die "dodoc failed"
+
+ use server && newdoc "${FILESDIR}"/${PN}-1.12.12-cvs-custom.c cvs-custom.c
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${DOC_PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${DOC_PV}.ps
+ dohtml -r "${WORKDIR}"/cederqvist-${DOC_PV}.html/
+ dosym cvs.html /usr/share/doc/${PF}/html/index.html
+ fi
+
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+}
+
+_run_one_test() {
+ mode="$1" ; shift
+ einfo "Starting ${mode} test"
+ cd "${S}"/src
+ export TESTDIR="${T}/tests-${mode}"
+ rm -rf "$TESTDIR" # Clean up from any previous test passes
+ mkdir -p "$TESTDIR"
+ emake -j1 ${mode}check || die "Some ${mode} test failed."
+ mv -f check.log check.log-${mode}
+ einfo "${mode} test completed successfully, log is check.log-${mode}"
+}
+
+src_test() {
+ einfo "If you want to see realtime status, or check out a failure,"
+ einfo "please look at ${S}/src/check.log*"
+
+ if [ "$TEST_REMOTE_AND_PROXY" == "1" ]; then
+ einfo "local, remote, and proxy tests enabled."
+ else
+ einfo "Only testing local mode. Please see ebuild for other modes."
+ fi
+
+ # we only do the local tests by default
+ _run_one_test local
+
+ # if you want to test the remote and proxy modes, things get a little bit
+ # complicated. You need to set up a SSH config file at ~portage/.ssh/config
+ # that allows the portage user to login without any authentication, and also
+ # set up the ~portage/.ssh/known_hosts file for your machine.
+ # We do not do this by default, as it is unsafe from a security point of
+ # view, and requires root level ssh changes.
+ # Note that this also requires having a real shell for the portage user, so make
+ # sure that su -c 'ssh portage@mybox' portage works first!
+ # (It uses the local ip, not loopback)
+ if [ "$TEST_REMOTE_AND_PROXY" == "1" ]; then
+ _run_one_test remote
+ _run_one_test proxy
+ fi
+}
diff --git a/dev-vcs/cvs/cvs-1.12.13.1.ebuild b/dev-vcs/cvs/cvs-1.12.13.1.ebuild
new file mode 100644
index 000000000000..2422d3a225d9
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.13.1.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils pam toolchain-funcs versionator
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="http://www.nongnu.org/cvs/"
+
+DOC_PV="$(get_version_component_range 1-3)"
+FEAT_URIBASE="mirror://gnu/non-gnu/cvs/source/feature/${PV}/"
+DOC_URIBASE="mirror://gnu/non-gnu/cvs/source/feature/${DOC_PV}/"
+SNAP_URIBASE="mirror://gnu/non-gnu/cvs/source/nightly-snapshots/feature/"
+SRC_URI="
+ ${FEAT_URIBASE}/${P}.tar.bz2
+ ${SNAP_URIBASE}/${P}.tar.bz2
+ doc? (
+ ${DOC_URIBASE}/cederqvist-${DOC_PV}.html.tar.bz2
+ ${DOC_URIBASE}/cederqvist-${DOC_PV}.pdf
+ ${DOC_URIBASE}/cederqvist-${DOC_PV}.ps
+ )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE="crypt doc kerberos nls pam server"
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( virtual/pam )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${DOC_PV}.html.tar.bz2
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.12.12-cvsbug-tmpfix.patch
+ epatch "${FILESDIR}"/${PN}-1.12.12-install-sh.patch
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-block-requests.patch
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-hash-nameclash.patch # for AIX
+ epatch "${FILESDIR}"/${PN}-1.12.13.1-gl-mempcpy.patch # for AIX
+ # Applied by upstream:
+ #epatch "${FILESDIR}"/${PN}-1.12.13-openat.patch
+ #epatch "${FILESDIR}"/${PN}-1.12.13-zlib.patch
+
+ # this testcase was not updated
+ #sed -i.orig -e '/unrecognized keyword.*BogusOption/s,98,73,g' \
+ # ${S}/src/sanity.sh
+ # this one fails when the testpath path contains '.'
+ sed -i.orig \
+ -e '/newfile config3/s,a-z,a-z.,g' \
+ "${S}"/src/sanity.sh
+
+ elog "If you want any CVS server functionality, you MUST emerge with USE=server!"
+}
+
+src_configure() {
+ local myconf
+ # the tests need the server and proxy
+ if use test; then
+ use server || \
+ ewarn "The server and proxy code are enabled as they are required for tests."
+ myconf="--enable-server --enable-proxy"
+ fi
+ if tc-is-cross-compiler ; then
+ # Sane defaults when cross-compiling (as these tests want to
+ # try and execute code).
+ export cvs_cv_func_printf_ptr="yes"
+ fi
+ econf \
+ --with-external-zlib \
+ --with-tmpdir=/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server) \
+ $(use_enable server proxy) \
+ ${myconf}
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+
+ if use server; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
+ fi
+
+ dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
+ MINOR* NEWS PROJECTS README* TESTS TODO
+
+ # Not installed into emacs site-lisp because it clobbers the normal C
+ # indentations.
+ dodoc cvs-format.el || die "dodoc failed"
+
+ use server && newdoc "${FILESDIR}"/${PN}-1.12.12-cvs-custom.c cvs-custom.c
+
+ if use doc; then
+ dodoc "${DISTDIR}"/cederqvist-${DOC_PV}.pdf
+ dodoc "${DISTDIR}"/cederqvist-${DOC_PV}.ps
+ dohtml -r "${WORKDIR}"/cederqvist-${DOC_PV}.html/
+ dosym cvs.html /usr/share/doc/${PF}/html/index.html
+ fi
+
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+}
+
+_run_one_test() {
+ mode="$1" ; shift
+ einfo "Starting ${mode} test"
+ cd "${S}"/src
+ export TESTDIR="${T}/tests-${mode}"
+ rm -rf "$TESTDIR" # Clean up from any previous test passes
+ mkdir -p "$TESTDIR"
+ emake -j1 ${mode}check || die "Some ${mode} test failed."
+ mv -f check.log check.log-${mode}
+ einfo "${mode} test completed successfully, log is check.log-${mode}"
+}
+
+src_test() {
+ einfo "If you want to see realtime status, or check out a failure,"
+ einfo "please look at ${S}/src/check.log*"
+
+ if [ "$TEST_REMOTE_AND_PROXY" == "1" ]; then
+ einfo "local, remote, and proxy tests enabled."
+ else
+ einfo "Only testing local mode. Please see ebuild for other modes."
+ fi
+
+ # we only do the local tests by default
+ _run_one_test local
+
+ # if you want to test the remote and proxy modes, things get a little bit
+ # complicated. You need to set up a SSH config file at ~portage/.ssh/config
+ # that allows the portage user to login without any authentication, and also
+ # set up the ~portage/.ssh/known_hosts file for your machine.
+ # We do not do this by default, as it is unsafe from a security point of
+ # view, and requires root level ssh changes.
+ # Note that this also requires having a real shell for the portage user, so make
+ # sure that su -c 'ssh portage@mybox' portage works first!
+ # (It uses the local ip, not loopback)
+ if [ "$TEST_REMOTE_AND_PROXY" == "1" ]; then
+ _run_one_test remote
+ _run_one_test proxy
+ fi
+}
diff --git a/dev-vcs/cvs/files/01-cvs-env.d b/dev-vcs/cvs/files/01-cvs-env.d
new file mode 100644
index 000000000000..5c89358b9554
--- /dev/null
+++ b/dev-vcs/cvs/files/01-cvs-env.d
@@ -0,0 +1 @@
+CVS_RSH="ssh"
diff --git a/dev-vcs/cvs/files/cvs-1.11.23-CVE-2010-3846.patch b/dev-vcs/cvs/files/cvs-1.11.23-CVE-2010-3846.patch
new file mode 100644
index 000000000000..e1560cef82e7
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.11.23-CVE-2010-3846.patch
@@ -0,0 +1,167 @@
+From b122edcb68ff05bb6eb22f6e50423e7f1050841b Mon Sep 17 00:00:00 2001
+From: Larry Jones <lawrence.jones@siemens.com>
+Date: Thu, 21 Oct 2010 10:08:16 +0200
+Subject: [PATCH] Fix for CVE-2010-3846
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Mallformed RCS revision (delete after the end of input file, or overlayed
+deleted regions) screws output file image size computation. This leads to
+write attempt after the allocated memory opening hiden memory corruption
+driven by CVS server.
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ src/rcs.c | 52 +++++++++++++++++++++++++++++-----------------------
+ 1 files changed, 29 insertions(+), 23 deletions(-)
+
+diff --git a/src/rcs.c b/src/rcs.c
+index 7d0d078..2f88f85 100644
+--- a/src/rcs.c
++++ b/src/rcs.c
+@@ -7128,7 +7128,7 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
+ struct deltafrag *dfhead;
+ struct deltafrag **dftail;
+ struct deltafrag *df;
+- unsigned long numlines, lastmodline, offset;
++ unsigned long numlines, offset;
+ struct linevector lines;
+ int err;
+
+@@ -7202,12 +7202,12 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
+
+ /* New temp data structure to hold new org before
+ copy back into original structure. */
+- lines.nlines = lines.lines_alloced = numlines;
++ lines.lines_alloced = numlines;
+ lines.vector = xmalloc (numlines * sizeof *lines.vector);
+
+ /* We changed the list order to first to last -- so the
+ list never gets larger than the size numlines. */
+- lastmodline = 0;
++ lines.nlines = 0;
+
+ /* offset created when adding/removing lines
+ between new and original structure */
+@@ -7216,25 +7216,24 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
+ for (df = dfhead; df != NULL; )
+ {
+ unsigned int ln;
+- unsigned long deltaend;
++ unsigned long newpos = df->pos - offset;
+
+- if (df->pos > orig_lines->nlines)
++ if (newpos < lines.nlines || newpos > numlines)
+ err = 1;
+
+ /* On error, just free the rest of the list. */
+ if (!err)
+ {
+- /* Here we need to get to the line where the next insert will
++ /* Here we need to get to the line where the next change will
+ begin, which is DF->pos in ORIG_LINES. We will fill up to
+ DF->pos - OFFSET in LINES with original items. */
+- for (deltaend = df->pos - offset;
+- lastmodline < deltaend;
+- lastmodline++)
++ while (lines.nlines < newpos)
+ {
+ /* we need to copy from the orig structure into new one */
+- lines.vector[lastmodline] =
+- orig_lines->vector[lastmodline + offset];
+- lines.vector[lastmodline]->refcount++;
++ lines.vector[lines.nlines] =
++ orig_lines->vector[lines.nlines + offset];
++ lines.vector[lines.nlines]->refcount++;
++ lines.nlines++;
+ }
+
+ switch (df->type)
+@@ -7246,7 +7245,12 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
+ struct line *q;
+ int nextline_newline;
+ size_t nextline_len;
+-
++
++ if (newpos + df->nlines > numlines)
++ {
++ err = 1;
++ break;
++ }
+ textend = df->new_lines + df->len;
+ nextline_newline = 0;
+ nextline_text = df->new_lines;
+@@ -7271,8 +7275,7 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
+ q->has_newline = nextline_newline;
+ q->refcount = 1;
+ memcpy (q->text, nextline_text, nextline_len);
+- lines.vector[lastmodline++] = q;
+- offset--;
++ lines.vector[lines.nlines++] = q;
+
+ nextline_text = (char *)p + 1;
+ nextline_newline = 0;
+@@ -7286,11 +7289,11 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
+ q->has_newline = nextline_newline;
+ q->refcount = 1;
+ memcpy (q->text, nextline_text, nextline_len);
+- lines.vector[lastmodline++] = q;
++ lines.vector[lines.nlines++] = q;
+
+ /* For each line we add the offset between the #'s
+ decreases. */
+- offset--;
++ offset -= df->nlines;
+ break;
+ }
+
+@@ -7301,7 +7304,9 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
+ if (df->pos + df->nlines > orig_lines->nlines)
+ err = 1;
+ else if (delvers)
++ {
+ for (ln = df->pos; ln < df->pos + df->nlines; ++ln)
++ {
+ if (orig_lines->vector[ln]->refcount > 1)
+ /* Annotate needs this but, since the original
+ * vector is disposed of before returning from
+@@ -7309,6 +7314,8 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
+ * there are multiple references.
+ */
+ orig_lines->vector[ln]->vers = delvers;
++ }
++ }
+ break;
+ }
+ }
+@@ -7328,21 +7335,20 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
+ else
+ {
+ /* add the rest of the remaining lines to the data vector */
+- for (; lastmodline < numlines; lastmodline++)
++ while (lines.nlines < numlines)
+ {
+ /* we need to copy from the orig structure into new one */
+- lines.vector[lastmodline] = orig_lines->vector[lastmodline
++ lines.vector[lines.nlines] = orig_lines->vector[lines.nlines
+ + offset];
+- lines.vector[lastmodline]->refcount++;
++ lines.vector[lines.nlines]->refcount++;
++ lines.nlines++;
+ }
+
+ /* Move the lines vector to the original structure for output,
+ * first deleting the old.
+ */
+ linevector_free (orig_lines);
+- orig_lines->vector = lines.vector;
+- orig_lines->lines_alloced = numlines;
+- orig_lines->nlines = lines.nlines;
++ *orig_lines = lines;
+ }
+
+ return !err;
+--
+1.7.2.3
+
diff --git a/dev-vcs/cvs/files/cvs-1.11.23-getline64.patch b/dev-vcs/cvs/files/cvs-1.11.23-getline64.patch
new file mode 100644
index 000000000000..f93fca465444
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.11.23-getline64.patch
@@ -0,0 +1,36 @@
+http://pkgs.fedoraproject.org/gitweb/?p=cvs.git;a=blob;f=cvs-1.11.23-getline64.patch;h=99942e0589e4ff26e87a927c1a54662954876e64;hb=HEAD
+
+--- cvs-1.11.23/lib/getline.c
++++ cvs-1.11.23/lib/getline.c
+@@ -154,7 +154,7 @@
+ return ret;
+ }
+
+-int
++ssize_t
+ getline (lineptr, n, stream)
+ char **lineptr;
+ size_t *n;
+@@ -163,7 +163,7 @@
+ return getstr (lineptr, n, stream, '\n', 0, GETLINE_NO_LIMIT);
+ }
+
+-int
++ssize_t
+ getline_safe (lineptr, n, stream, limit)
+ char **lineptr;
+ size_t *n;
+--- cvs-1.11.23/lib/getline.h
++++ cvs-1.11.23/lib/getline.h
+@@ -11,9 +11,9 @@
+
+ #define GETLINE_NO_LIMIT -1
+
+-int
++ssize_t
+ getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
+-int
++ssize_t
+ getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
+ int limit));
+ int
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-block-requests.patch b/dev-vcs/cvs/files/cvs-1.12.12-block-requests.patch
new file mode 100644
index 000000000000..9c9b49db8f62
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-block-requests.patch
@@ -0,0 +1,140 @@
+Author: Robin H. Johnson <robbat2@gentoo.org>
+Date: 2006-08-09
+
+This patch allows a CVS server to deny usage of specific commands, based on
+input in the environment.
+
+Just set the CVS_BLOCK_REQUESTS env var with all of the commands you want,
+seperated by spaces. Eg:
+CVS_BLOCK_REQUESTS="Gzip-stream gzip-file-contents"
+would block ALL usage of compression.
+
+Please see the array 'struct request requests[]' in src/server.c for a full
+list of commands.
+
+Please note that if you block any commands marked as RQ_ESSENTIAL, CVS clients
+may fail! (This includes 'ci'!).
+
+See the companion cvs-custom.c for a wrapper that can enforce the environment variable for pserver setups.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar --exclude '*~' -U 10 cvs-1.12.12.orig/src/server.c cvs-1.12.12/src/server.c
+--- cvs-1.12.12.orig/src/server.c 2005-04-14 14:13:29.000000000 +0000
++++ cvs-1.12.12/src/server.c 2006-08-09 01:40:44.000000000 +0000
+@@ -5836,43 +5836,90 @@
+ #undef REQ_LINE
+ };
+ #endif /* SERVER_SUPPORT or CLIENT_SUPPORT */
+
+
+
+ #ifdef SERVER_SUPPORT
+ /*
+ * This server request is not ignored by the secondary.
+ */
++
++/* Hack by Robin H. Johnson <robbat2@gentoo.org>.
++ * Allow the server ENV to specify what request types are to be ignored.
++ */
++
++static char blocked_requests[BUFSIZ] = " ";
++
++static void build_blocked_requests() {
++ char *tmp = getenv("CVS_BLOCK_REQUESTS");
++
++ if (tmp != NULL && strlen(tmp) > 0) {
++ // move to our custom buffer
++ strncat(blocked_requests, tmp, sizeof(blocked_requests)-strlen(blocked_requests));
++ //add a space on the end as well for searching
++ strncat(blocked_requests, " ", sizeof(blocked_requests)-strlen(blocked_requests));
++ }
++
++ // now blocked_requests contains the list of every request that we do not
++ // want to serve
++}
++
++// returns 0 if we should serve this request
++// use as if(checker(FOO)) continue;
++static int serve_valid_requests_checker(char *reqname) {
++ char needle[BUFSIZ] = " ";
++ char *tmp;
++
++ if(!blocked_requests || strlen(blocked_requests) < 2)
++ return 0;
++
++ // we want to look for ' 'reqname' '
++ snprintf(needle, sizeof(needle), " %s ", reqname);
++
++ // now do the search
++ tmp = strstr(blocked_requests, needle);
++
++ if (tmp != NULL)
++ return 1;
++
++ return 0;
++
++}
++
+ static void
+ serve_valid_requests (char *arg)
+ {
+ struct request *rq;
+
+ /* Since this is processed in the first pass, don't reprocess it in the
+ * second.
+ *
+ * We still print errors since new errors could have been generated in the
+ * second pass.
+ */
+ if (print_pending_error ()
+ #ifdef PROXY_SUPPORT
+ || reprocessing
+ #endif /* PROXY_SUPPORT */
+ )
+ return;
++
++ build_blocked_requests();
+
+ buf_output0 (buf_to_net, "Valid-requests");
+ for (rq = requests; rq->name != NULL; rq++)
+ {
+ if (rq->func != NULL)
+ {
++ if(serve_valid_requests_checker(rq->name))
++ continue;
+ buf_append_char (buf_to_net, ' ');
+ buf_output0 (buf_to_net, rq->name);
+ }
+ }
+ buf_output0 (buf_to_net, "\nok\n");
+
+ /* The client is waiting for the list of valid requests, so we
+ must send the output now. */
+ buf_flush (buf_to_net, 1);
+ }
+@@ -6353,20 +6400,24 @@
+ cmd += len;
+ else if (cmd[len] == ' ')
+ cmd += len + 1;
+ else
+ /*
+ * The first len characters match, but it's a different
+ * command. e.g. the command is "cooperate" but we matched
+ * "co".
+ */
+ continue;
++ // Ignore commands that we are supposed to ignore.
++ if(serve_valid_requests_checker(rq->name))
++ continue;
++
+
+ if (!(rq->flags & RQ_ROOTLESS)
+ && current_parsed_root == NULL)
+ {
+ /* For commands which change the way in which data
+ is sent and received, for example Gzip-stream,
+ this does the wrong thing. Since the client
+ assumes that everything is being compressed,
+ unconditionally, there is no way to give this
+ error to the client without turning on
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-cvs-custom.c b/dev-vcs/cvs/files/cvs-1.12.12-cvs-custom.c
new file mode 100644
index 000000000000..597f6de8dbdb
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-cvs-custom.c
@@ -0,0 +1,58 @@
+/*
+Author: Robin H. Johnson <robbat2@gentoo.org>
+Date: 2006-08-09
+
+This patch allows a CVS server to deny usage of specific commands, based on
+input in the environment.
+
+Just set the CVS_BLOCK_REQUESTS env var with all of the commands you want,
+seperated by spaces. Eg:
+CVS_BLOCK_REQUESTS="Gzip-stream gzip-file-contents"
+would block ALL usage of compression.
+
+Please see the array 'struct request requests[]' in src/server.c for a full
+list of commands.
+
+Please note that if you block any commands marked as RQ_ESSENTIAL, CVS clients
+may fail! (This includes 'ci'!).
+
+See the companion cvs-custom.c for a wrapper that can enforce the environment variable for pserver setups.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+*/
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <malloc.h>
+
+
+#define REAL_CVS "/bin/cvs"
+#define CVS_TMPDIR "/tmp"
+#define CMDS_BLOCKED " Gzip-stream gzip-file-contents Kerberos-encrypt Gssapi-encrypt Gssapi-authenticate add remove admin import init history watch-on watch-off watch-add watch-remove watchers editors edit version tag rtag "
+
+int main(int argc, char* argv[]) {
+ char** newargv;
+ int newargc, offset;
+ int i;
+ // 0 for argv[0] we must copy
+ offset = 0+0;
+ // +1 for trailing NULL
+ newargc = argc+offset+1;
+ newargv = (char**) malloc(newargc*sizeof(char*));
+ newargv[0] = "cvs";
+ //newargv[1] = "-T";
+ //newargv[2] = CVS_TMPDIR;
+ //newargv[3] = "-R";
+ for(i=1;i<argc;i++) {
+ newargv[i+offset] = argv[i];
+ }
+ newargv[newargc-1] = NULL;
+ setenv("CVS_BLOCK_REQUESTS",CMDS_BLOCKED ,1);
+ //for(i =0;i<newargc;i++) {
+ // printf("[%d]='%s'\n",i,newargv[i] != NULL ? newargv[i] : "NULL");
+ //}
+ execv(REAL_CVS,newargv);
+ free(newargv);
+ return 0;
+}
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-cvs-gnulib-vasnprintf.patch b/dev-vcs/cvs/files/cvs-1.12.12-cvs-gnulib-vasnprintf.patch
new file mode 100644
index 000000000000..d7d6e6bb8a65
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-cvs-gnulib-vasnprintf.patch
@@ -0,0 +1,34 @@
+http://bugs.gentoo.org/213833
+
+commit 913c09becd9df89dbd9b9f386e7f35c240d5efe8
+Author: Bruno Haible <bruno@clisp.org>
+Date: Fri Oct 19 01:50:42 2007 +0200
+
+ Don't use %n on glibc >= 2.3 systems.
+
+diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
+index f563823..5d818aa 100644
+--- a/lib/vasnprintf.c
++++ b/lib/vasnprintf.c
+@@ -3385,9 +3385,21 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ #endif
+ *p = dp->conversion;
+ #if USE_SNPRINTF
++# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))
+ p[1] = '%';
+ p[2] = 'n';
+ p[3] = '\0';
++# else
++ /* On glibc2 systems from glibc >= 2.3 - probably also older
++ ones - we know that snprintf's returns value conforms to
++ ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes.
++ Therefore we can avoid using %n in this situation.
++ On glibc2 systems from 2004-10-18 or newer, the use of %n
++ in format strings in writable memory may crash the program
++ (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
++ in this situation. */
++ p[1] = '\0';
++# endif
+ #else
+ p[1] = '\0';
+ #endif
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-cvsbug-tmpfix.patch b/dev-vcs/cvs/files/cvs-1.12.12-cvsbug-tmpfix.patch
new file mode 100644
index 000000000000..fcd4431e8775
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-cvsbug-tmpfix.patch
@@ -0,0 +1,22 @@
+Index: cvs-1.12.12/src/cvsbug.in
+===================================================================
+--- cvs-1.12.12.orig/src/cvsbug.in
++++ cvs-1.12.12/src/cvsbug.in
+@@ -109,14 +109,14 @@ elif [ -f /bin/domainname ]; then
+ /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" |
+ cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
+ ORIGINATOR="`cat $TEMP`"
+- rm -f $TEMP
++ > $TEMP
+ fi
+ fi
+
+ if [ "$ORIGINATOR" = "" ]; then
+ grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
+ ORIGINATOR="`cat $TEMP`"
+- rm -f $TEMP
++ > $TEMP
+ fi
+
+ if [ -n "$ORGANIZATION" ]; then
+
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-fix-massive-leak.patch b/dev-vcs/cvs/files/cvs-1.12.12-fix-massive-leak.patch
new file mode 100644
index 000000000000..5366f50855f1
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-fix-massive-leak.patch
@@ -0,0 +1,52 @@
+buf_free_data must free data independently
+of send or reseived bytes over network.
+
+Moreover, when buffer is usually freed
+buffer _is_ empty, but has one clean mapped page.
+
+I've observed massive 'cvs server' leaks
+when importing large gentoo-x86 repo with 'cvsps'.
+Leak ate all my 32GBs of RAM and killed process.
+(Leaked around 3 pages per client request).
+
+valgrind found the leak easily:
+
+$ valgrind \
+ cvsps \
+ --root :local:$HOME/portage/gentoo-x86.rsync \
+ --fast-export \
+ gentoo-x86/dev-vcs/git-annex 2>l |
+ git fast-import
+
+ ==13504== 1,248 bytes in 52 blocks are still reachable in loss record 41 of 47
+ ==13504== at 0x4C2C19B: malloc (vg_replace_malloc.c:270)
+ ==13504== by 0x48A556: xnmalloc_inline (xmalloc.c:40)
+ ==13504== by 0x48A5B5: xmalloc (xmalloc.c:56)
+ ==13504== by 0x4855F5: new_memnode (pagealign_alloc.c:91)
+ ==13504== by 0x48571B: pagealign_alloc (pagealign_alloc.c:151)
+ ==13504== by 0x485739: pagealign_xalloc (pagealign_alloc.c:182)
+ ==13504== by 0x408DD7: get_buffer_data (buffer.c:98)
+ ==13504== by 0x409C0C: buf_input_data (buffer.c:738)
+ ==13504== by 0x45BB63: do_cvs_command (server.c:3847)
+ ==13504== by 0x45D39E: serve_co (server.c:4809)
+ ==13504== by 0x45F845: server (server.c:6438)
+ ==13504== by 0x438784: main (main.c:1066)
+
+And now it takes constant space (less, than 18MB)
+for 'cvs server' process to convert all gentoo-x86
+by serving more, than 5 000 000 client requests.
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+diff --git a/src/buffer.c b/src/buffer.c
+index 3f12513..9a7a559 100644
+--- a/src/buffer.c
++++ b/src/buffer.c
+@@ -526,7 +526,7 @@ buf_copy_data (struct buffer *buf, struct buffer_data *data,
+ void
+ buf_free_data (struct buffer *buffer)
+ {
+- if (buf_empty_p (buffer)) return;
++ if (! buffer->data) return;
+ buf_free_datas (buffer->data, buffer->last);
+ buffer->data = buffer->last = NULL;
+ }
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-getdelim.patch b/dev-vcs/cvs/files/cvs-1.12.12-getdelim.patch
new file mode 100644
index 000000000000..d27bcc04a681
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-getdelim.patch
@@ -0,0 +1,21 @@
+The function getdelim() behaves slightly different on FreeBSD,
+only appending to the *line buffer if line_size is 0.
+
+See:
+http://savannah.nongnu.org/bugs/?29466
+http://bugs.gentoo.org/314791
+
+Already comitted upstream:
+http://cvs.savannah.gnu.org/viewvc/ccvs/src/myndbm.c?root=cvs&r1=1.38&r2=1.39
+
+--- src/myndbm.c.orig
++++ src/myndbm.c
+@@ -213,7 +213,7 @@
+ mydbm_load_file (FILE *fp, List *list, char *filename)
+ {
+ char *line = NULL;
+- size_t line_size;
++ size_t line_size = 0;
+ char *value;
+ size_t value_allocated;
+ char *cp, *vp;
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-hash-nameclash.patch b/dev-vcs/cvs/files/cvs-1.12.12-hash-nameclash.patch
new file mode 100644
index 000000000000..0a33eea873ff
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-hash-nameclash.patch
@@ -0,0 +1,42 @@
+http://cvs.savannah.gnu.org/viewvc/cvs/ccvs/src/hash.h?r1=1.14.6.2&r2=1.14.6.3&pathrev=cvs1-11-x-branch
+fixed in cvs-1.11.23, cvs-HEAD after cvs-1.12.13a
+
+--- src/hash.h.orig 2005-02-01 22:56:48 +0100
++++ src/hash.h 2010-03-10 19:00:11 +0100
+@@ -27,26 +27,26 @@
+ };
+ typedef enum ntype Ntype;
+
+-struct node
++struct hashnode
+ {
+ Ntype type;
+- struct node *next;
+- struct node *prev;
+- struct node *hashnext;
+- struct node *hashprev;
++ struct hashnode *next;
++ struct hashnode *prev;
++ struct hashnode *hashnext;
++ struct hashnode *hashprev;
+ char *key;
+ void *data;
+- void (*delproc) (struct node *);
++ void (*delproc) (struct hashnode *);
+ };
+-typedef struct node Node;
++typedef struct hashnode Node;
+
+-struct list
++struct hashlist
+ {
+ Node *list;
+ Node *hasharray[HASHSIZE];
+- struct list *next;
++ struct hashlist *next;
+ };
+-typedef struct list List;
++typedef struct hashlist List;
+
+ List *getlist (void);
+ Node *findnode (List * list, const char *key);
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-install-sh.patch b/dev-vcs/cvs/files/cvs-1.12.12-install-sh.patch
new file mode 100644
index 000000000000..825c0ee6f1c3
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-install-sh.patch
@@ -0,0 +1,12 @@
+diff -ur a/build-aux/install-sh b/build-aux/install-sh
+--- a/build-aux/install-sh 2006-03-25 20:04:46 +0000
++++ b/build-aux/install-sh 2007-09-14 10:53:29 +0100
+@@ -246,7 +246,7 @@
+ fi
+
+ if test -n "$dir_arg"; then
+- $doit $mkdircmd "$dst" \
++ { test -d "$dst" || $doit $mkdircmd -p "$dst"; } \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch b/dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch
new file mode 100644
index 000000000000..948fa4d7144e
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch
@@ -0,0 +1,29 @@
+back port changes from upstream gnulib to make this work on x32
+
+https://bugs.gentoo.org/395641
+
+--- cvs-1.12.12/lib/mktime.c
++++ cvs-1.12.12/lib/mktime.c
+@@ -115,6 +115,13 @@
+ #define TM_YEAR_BASE 1900
+ verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0);
+
++#if INT_MAX <= LONG_MAX / 2
++typedef long int long_int;
++#else
++typedef long long int long_int;
++#endif
++verify (long_int_is_wide_enough, INT_MAX == INT_MAX * (long_int) 2 / 2);
++
+ /* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */
+ static inline int
+ leapyear (long int year)
+@@ -167,8 +174,6 @@
+ int year0, int yday0, int hour0, int min0, int sec0)
+ {
+ verify (C99_integer_division, -1 / 2 == 0);
+- verify (long_int_year_and_yday_are_wide_enough,
+- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
+
+ /* Compute intervening leap days correctly even if year is negative.
+ Take care to avoid integer overflow here. */
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-openat.patch b/dev-vcs/cvs/files/cvs-1.12.12-openat.patch
new file mode 100644
index 000000000000..fdb406a45e4f
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-openat.patch
@@ -0,0 +1,21 @@
+Index: cvs-1.12.12/lib/openat.c
+===================================================================
+--- cvs-1.12.12.orig/lib/openat.c
++++ cvs-1.12.12/lib/openat.c
+@@ -55,9 +55,13 @@ rpl_openat (int fd, char const *filename
+ va_list arg;
+ va_start (arg, flags);
+
+- /* Assume that mode_t is passed compatibly with mode_t's type
+- after argument promotion. */
+- mode = va_arg (arg, mode_t);
++ /* If mode_t is narrower than int, use the promoted type (int),
++ not mode_t. Use sizeof to guess whether mode_t is nerrower;
++ we don't know of any practical counterexamples. */
++ if (sizeof (mode_t) < sizeof (int))
++ mode = va_arg (arg, int);
++ else
++ mode = va_arg (arg, mode_t);
+
+ va_end (arg);
+ }
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-rcs2log-coreutils.patch b/dev-vcs/cvs/files/cvs-1.12.12-rcs2log-coreutils.patch
new file mode 100644
index 000000000000..0fb4c6c6d73d
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-rcs2log-coreutils.patch
@@ -0,0 +1,14 @@
+X-Gentoo-bug: 144114
+
+diff -Nuar cvs-1.12.12.orig//contrib/rcs2log.sh cvs-1.12.12//contrib/rcs2log.sh
+--- cvs-1.12.12.orig//contrib/rcs2log.sh 2003-02-25 21:32:51.000000000 +0000
++++ cvs-1.12.12//contrib/rcs2log.sh 2010-12-06 21:14:33.831532212 +0000
+@@ -620,7 +620,7 @@
+ # Sort the log entries, first by date+time (in reverse order),
+ # then by author, then by log entry, and finally by file name and revision
+ # (just in case).
+-sort -t"$SOH" +2 -4r +4 +0 |
++sort -t"$SOH" -k 3,4r -k 5 -k 1,2 |
+
+ # Finally, reformat the sorted log entries.
+ $AWK -F"$SOH" '
diff --git a/dev-vcs/cvs/files/cvs-1.12.13-openat.patch b/dev-vcs/cvs/files/cvs-1.12.13-openat.patch
new file mode 100644
index 000000000000..762924a8c1d5
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.13-openat.patch
@@ -0,0 +1,21 @@
+Index: cvs-1.12.13/lib/openat.c
+===================================================================
+--- cvs-1.12.13.orig/lib/openat.c
++++ cvs-1.12.13/lib/openat.c
+@@ -55,9 +55,13 @@ rpl_openat (int fd, char const *filename
+ va_list arg;
+ va_start (arg, flags);
+
+- /* Assume that mode_t is passed compatibly with mode_t's type
+- after argument promotion. */
+- mode = va_arg (arg, mode_t);
++ /* If mode_t is narrower than int, use the promoted type (int),
++ not mode_t. Use sizeof to guess whether mode_t is nerrower;
++ we don't know of any practical counterexamples. */
++ if (sizeof (mode_t) < sizeof (int))
++ mode = va_arg (arg, int);
++ else
++ mode = va_arg (arg, mode_t);
+
+ va_end (arg);
+ }
diff --git a/dev-vcs/cvs/files/cvs-1.12.13-zlib.patch b/dev-vcs/cvs/files/cvs-1.12.13-zlib.patch
new file mode 100644
index 000000000000..a4b4b1e2afeb
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.13-zlib.patch
@@ -0,0 +1,31 @@
+Index: src/zlib.c
+===================================================================
+RCS file: /sources/cvs/ccvs/src/zlib.c,v
+retrieving revision 1.31
+retrieving revision 1.32
+diff -u -r1.31 -r1.32
+--- src/zlib.c 3 Jun 2005 18:26:09 -0000 1.31
++++ src/zlib.c 28 Oct 2005 14:10:59 -0000 1.32
+@@ -221,15 +221,14 @@
+ point. */
+ assert (bd->size == 0);
+
+- /* This will work well in the server, because this call will
+- do an unblocked read and fetch all the available data. In
+- the client, this will read a single byte from the stdio
+- stream, which will cause us to call inflate once per byte.
+- It would be more efficient if we could make a call which
+- would fetch all the available bytes, and at least one byte. */
+-
++ /* On the server, this will do an unblocking read of as much data as is
++ * available. On the client, with a blocking input descriptor and the
++ * current fd_buffer implementation, this should read as much data as
++ * is currently available, and at least 1 byte (or EOF), from the
++ * underlying buffer.
++ */
+ status = (*cb->buf->input) (cb->buf->closure, bd->text,
+- need, BUFFER_DATA_SIZE, &nread);
++ need ? 1 : 0, BUFFER_DATA_SIZE, &nread);
+
+ if (status == -2)
+ /* Don't try to recover from memory allcoation errors. */
diff --git a/dev-vcs/cvs/files/cvs-1.12.13.1-block-requests.patch b/dev-vcs/cvs/files/cvs-1.12.13.1-block-requests.patch
new file mode 100644
index 000000000000..216336f34941
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.13.1-block-requests.patch
@@ -0,0 +1,101 @@
+Author: Robin H. Johnson <robbat2@gentoo.org>
+Original-Date: 2006-08-09
+Forward-Port-Date: 2007-12-06
+
+This patch allows a CVS server to deny usage of specific commands, based on
+input in the environment.
+
+Just set the CVS_BLOCK_REQUESTS env var with all of the commands you want,
+seperated by spaces. Eg:
+CVS_BLOCK_REQUESTS="Gzip-stream gzip-file-contents"
+would block ALL usage of compression.
+
+Please see the array 'struct request requests[]' in src/server.c for a full
+list of commands.
+
+Please note that if you block any commands marked as RQ_ESSENTIAL, CVS clients
+may fail! (This includes 'ci'!).
+
+See the companion cvs-custom.c for a wrapper that can enforce the environment variable for pserver setups.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar cvs-1.12.13.1.orig/src/server.c cvs-1.12.13.1/src/server.c
+--- cvs-1.12.13.1.orig/src/server.c 2006-06-21 11:55:21.000000000 -0700
++++ cvs-1.12.13.1/src/server.c 2007-12-06 16:25:38.109309990 -0800
+@@ -6244,6 +6244,49 @@
+ /*
+ * This server request is not ignored by the secondary.
+ */
++
++/* Hack by Robin H. Johnson <robbat2@gentoo.org>.
++ * Allow the server ENV to specify what request types are to be ignored.
++ */
++
++static char blocked_requests[BUFSIZ] = " ";
++
++static void build_blocked_requests() {
++ char *tmp = getenv("CVS_BLOCK_REQUESTS");
++
++ if (tmp != NULL && strlen(tmp) > 0) {
++ // move to our custom buffer
++ strncat(blocked_requests, tmp, sizeof(blocked_requests)-strlen(blocked_requests));
++ //add a space on the end as well for searching
++ strncat(blocked_requests, " ", sizeof(blocked_requests)-strlen(blocked_requests));
++ }
++
++ // now blocked_requests contains the list of every request that we do not
++ // want to serve
++}
++
++// returns 0 if we should serve this request
++// use as if(checker(FOO)) continue;
++static int serve_valid_requests_checker(char *reqname) {
++ char needle[BUFSIZ] = " ";
++ char *tmp;
++
++ if(!blocked_requests || strlen(blocked_requests) < 2)
++ return 0;
++
++ // we want to look for ' 'reqname' '
++ snprintf(needle, sizeof(needle), " %s ", reqname);
++
++ // now do the search
++ tmp = strstr(blocked_requests, needle);
++
++ if (tmp != NULL)
++ return 1;
++
++ return 0;
++
++}
++
+ static void
+ serve_valid_requests (char *arg)
+ {
+@@ -6262,11 +6305,15 @@
+ )
+ return;
+
++ build_blocked_requests();
++
+ buf_output0 (buf_to_net, "Valid-requests");
+ for (rq = requests; rq->name != NULL; rq++)
+ {
+ if (rq->func != NULL)
+ {
++ if(serve_valid_requests_checker(rq->name))
++ continue;
+ buf_append_char (buf_to_net, ' ');
+ buf_output0 (buf_to_net, rq->name);
+ }
+@@ -6706,6 +6753,9 @@
+ * "co".
+ */
+ continue;
++ // Ignore commands that we are supposed to ignore.
++ if(serve_valid_requests_checker(rq->name))
++ continue;
+
+ if (!(rq->flags & RQ_ROOTLESS)
+ && current_parsed_root == NULL)
diff --git a/dev-vcs/cvs/files/cvs-1.12.13.1-fix-gnulib-SEGV-vasnprintf.patch b/dev-vcs/cvs/files/cvs-1.12.13.1-fix-gnulib-SEGV-vasnprintf.patch
new file mode 100644
index 000000000000..4554b9ac912a
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.13.1-fix-gnulib-SEGV-vasnprintf.patch
@@ -0,0 +1,42 @@
+Attemt to use CVS leads to glibc crash:
+$ cvs up
+ *** %n in writable segment detected ***
+
+Fixes: http://savannah.nongnu.org/bugs/?35432
+Upstream gnulib commit:
+
+From 913c09becd9df89dbd9b9f386e7f35c240d5efe8 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Thu, 18 Oct 2007 23:50:42 +0000
+Subject: Don't use %n on glibc >= 2.3 systems.
+
+---
+(limited to 'lib/vasnprintf.c')
+
+diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
+index f563823..5d818aa 100644
+--- a/lib/vasnprintf.c
++++ b/lib/vasnprintf.c
+@@ -3386,8 +3386,20 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ *fbp = dp->conversion;
+ #if USE_SNPRINTF
++# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))
+ p[1] = '%';
+ p[2] = 'n';
+ p[3] = '\0';
++# else
++ /* On glibc2 systems from glibc >= 2.3 - probably also older
++ ones - we know that snprintf's returns value conforms to
++ ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes.
++ Therefore we can avoid using %n in this situation.
++ On glibc2 systems from 2004-10-18 or newer, the use of %n
++ in format strings in writable memory may crash the program
++ (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
++ in this situation. */
++ p[1] = '\0';
++# endif
+ #else
+ p[1] = '\0';
+ #endif
+--
+cgit v0.9.0.2
diff --git a/dev-vcs/cvs/files/cvs-1.12.13.1-gl-mempcpy.patch b/dev-vcs/cvs/files/cvs-1.12.13.1-gl-mempcpy.patch
new file mode 100644
index 000000000000..7ad7533b0a57
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.13.1-gl-mempcpy.patch
@@ -0,0 +1,24 @@
+http://cvs.savannah.gnu.org/viewvc/cvs/ccvs/lib/mempcpy.c?r1=1.2&r2=1.3&pathrev=MAIN
+fixed in cvs-HEAD after cvs-1.12.13a
+
+--- lib/mempcpy.c 2005/05/23 17:44:31 1.2
++++ lib/mempcpy.c 2007/08/22 12:48:42 1.3
+@@ -1,5 +1,5 @@
+ /* Copy memory area and return pointer after last written byte.
+- Copyright (C) 2003 Free Software Foundation, Inc.
++ Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -15,9 +15,9 @@
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+-/* Specification. */
+-#include "mempcpy.h"
++#include <config.h>
+
++/* Specification. */
+ #include <string.h>
+
+ /* Copy N bytes of SRC to DEST, return pointer to bytes after the
diff --git a/dev-vcs/cvs/files/cvs-1.12.13.1-hash-nameclash.patch b/dev-vcs/cvs/files/cvs-1.12.13.1-hash-nameclash.patch
new file mode 100644
index 000000000000..d9c3358faf46
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.13.1-hash-nameclash.patch
@@ -0,0 +1,43 @@
+http://cvs.savannah.gnu.org/viewvc/cvs/ccvs/src/hash.h?r1=1.14.6.2&r2=1.14.6.3&pathrev=cvs1-11-x-branch
+fixed in cvs-1.11.23, cvs-HEAD after cvs-1.12.13a
+
+--- src/hash.h.orig 2010-03-11 10:12:19 +0100
++++ src/hash.h 2010-03-11 10:12:40 +0100
+@@ -32,27 +32,27 @@
+ };
+ typedef enum ntype Ntype;
+
+-struct node
++struct hashnode
+ {
+ Ntype type;
+- struct node *next;
+- struct node *prev;
+- struct node *hashnext;
+- struct node *hashprev;
++ struct hashnode *next;
++ struct hashnode *prev;
++ struct hashnode *hashnext;
++ struct hashnode *hashprev;
+ char *key;
+ void *data;
+ size_t len; /* Length of DATA. */
+- void (*delproc) (struct node *);
++ void (*delproc) (struct hashnode *);
+ };
+-typedef struct node Node;
++typedef struct hashnode Node;
+
+-struct list
++struct hashlist
+ {
+ Node *list;
+ Node *hasharray[HASHSIZE];
+- struct list *next;
++ struct hashlist *next;
+ };
+-typedef struct list List;
++typedef struct hashlist List;
+
+ List *getlist (void);
+ Node *findnode (List *list, const char *key);
diff --git a/dev-vcs/cvs/files/cvs-1.12.13.1-use-include_next.patch b/dev-vcs/cvs/files/cvs-1.12.13.1-use-include_next.patch
new file mode 100644
index 000000000000..adaff55ebb16
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.13.1-use-include_next.patch
@@ -0,0 +1,30 @@
+Fix build failure on gentoo's gcc:
+
+In file included from ./inttypes.h:34:0,
+ from ./stdint.h:65,
+ from /usr/include/netinet/in.h:23,
+ from /usr/include/netdb.h:27,
+ from getaddrinfo.h:30,
+ from canon-host.c:27:
+ /usr/include/inttypes.h:297:1: error: unknown type name 'intmax_t'
+ /usr/include/inttypes.h:297:26: error: unknown type name 'intmax_t'
+ /usr/include/inttypes.h:300:27: error: unknown type name 'intmax_t'
+ /usr/include/inttypes.h:300:45: error: unknown type name 'intmax_t'
+diff --git a/lib/stdint_.h b/lib/stdint_.h
+index adab4d7..3a8db19 100644
+--- a/lib/stdint_.h
++++ b/lib/stdint_.h
+@@ -43,7 +43,12 @@
+ Include it before <inttypes.h>, since any "#include <stdint.h>"
+ in <inttypes.h> would reinclude us, skipping our contents because
+ _GL_STDINT_H is defined. */
+-# include @ABSOLUTE_STDINT_H@
++# include "config.h"
++# if HAVE_INCLUDE_NEXT
++# include_next <stdint.h>
++# else
++# include @ABSOLUTE_STDINT_H@
++# endif
+ #endif
+
+ /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
diff --git a/dev-vcs/cvs/files/cvs.pam-include-1.12.12 b/dev-vcs/cvs/files/cvs.pam-include-1.12.12
new file mode 100644
index 000000000000..f401ec082a11
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs.pam-include-1.12.12
@@ -0,0 +1,4 @@
+#%PAM-1.0
+auth include system-auth
+account include system-auth
+session include system-auth
diff --git a/dev-vcs/cvs/files/cvspserver.xinetd.d b/dev-vcs/cvs/files/cvspserver.xinetd.d
new file mode 100644
index 000000000000..0f2edb09cba0
--- /dev/null
+++ b/dev-vcs/cvs/files/cvspserver.xinetd.d
@@ -0,0 +1,14 @@
+service cvspserver
+{
+ disable = yes
+ socket_type = stream
+ wait = no
+ user = root
+ log_type = FILE /var/log/cvspserver
+ protocol = tcp
+ env = HOME=/var/cvsroot
+ log_on_failure += USERID
+ port = 2401
+ server = /usr/bin/cvs
+ server_args = -f --allow-root=/var/cvsroot pserver
+}
diff --git a/dev-vcs/cvs/metadata.xml b/dev-vcs/cvs/metadata.xml
new file mode 100644
index 000000000000..443275017827
--- /dev/null
+++ b/dev-vcs/cvs/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cvs-utils</herd>
+ <use>
+ <flag name="server">Enable server support</flag>
+ </use>
+</pkgmetadata>