summaryrefslogtreecommitdiff
path: root/dev-vcs/cvs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-21 00:05:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-21 00:05:36 +0100
commitbfd63d5b0e96ad32e0d0a8fe15512b6a9ac6fc9e (patch)
tree4d1f8172a8137960573865b4a5ac8b7846d281df /dev-vcs/cvs
parent77b275a53383b07b154caa09feb6f4961b206638 (diff)
gentoo auto-resync : 21:05:2024 - 00:05:35
Diffstat (limited to 'dev-vcs/cvs')
-rw-r--r--dev-vcs/cvs/Manifest7
-rw-r--r--dev-vcs/cvs/cvs-1.12.12-r14.ebuild4
-rw-r--r--dev-vcs/cvs/cvs-1.12.12-r15.ebuild109
-rw-r--r--dev-vcs/cvs/files/0001-fix-quoting-around-potentially-empty-shell-var.patch30
-rw-r--r--dev-vcs/cvs/files/0001-gettext-autoreconf.patch25
-rw-r--r--dev-vcs/cvs/files/c99-roundup.patch122
-rw-r--r--dev-vcs/cvs/files/cvs-1.12.12-mktime-configure-m4.patch412
7 files changed, 706 insertions, 3 deletions
diff --git a/dev-vcs/cvs/Manifest b/dev-vcs/cvs/Manifest
index fcc019ba5b98..0111658c460d 100644
--- a/dev-vcs/cvs/Manifest
+++ b/dev-vcs/cvs/Manifest
@@ -1,4 +1,7 @@
+AUX 0001-fix-quoting-around-potentially-empty-shell-var.patch 820 BLAKE2B 899c49b2cfea1c52c126bbe56a131edaf12e729ef51b9560e8f47bc440e245c5ecea1222117a81df51ad2da1c93f286d075cf48e7e83da277919a9c7d94b8cd0 SHA512 89d1c05bf9ec0dfa7ea57fc91d9b6c499cbe9f7066a79a3d9db8ea6f9028c988b7b8b0c86831d6f489eb0ff25e6e745677fc9ac5cae0870c145dcfb2b49e873c
+AUX 0001-gettext-autoreconf.patch 806 BLAKE2B 6ea5a7dbaf09b0659e9c06a0f511066f83c6f66acc68ca3d7b10437f9a89214d7c4c4064514b5e660406e3278a511646ca6ddc7c198305a7623fcdba685d7a05 SHA512 eb7469e10d0d57399ee600498030bc5977315b0c0449dec4da2d416980e31f29d767d3398bae89eb40ed02fef78472864bcd1b858e3e36c2abdd19b065ae5489
AUX 01-cvs-env.d 14 BLAKE2B 3112bb2e454c1c591b70f4c49e907c1b766a259e3132d5e206f8670b47b2c4daaa75035ba1534400f2ced73225cd074aa79f6b284a9292fbdb2b7989b42e72d5 SHA512 cbb7545ae34fcbfb6e64ad6bf91105a1950a483bb68637d164026e7df06da2dccbcfe0af568c3249ac0a8e7ff466a5e77614fe6fd76a3829136a854bfa7ceb5a
+AUX c99-roundup.patch 3197 BLAKE2B a6ab9c5f2895883524b983c6ae9eadb835deaecc580600d09651a22420e1f751e6581f1c6881df83a1c6188c95f95f6cdb4487a52d513f40d264a867488fe0ed SHA512 1f2c2352e9a3e4f1bb82a48dbd5f33655cdaef8dc0c74281755f342016d3f9183b18ecbef771c06ad275a2e18b27a8fdbc50c820451118399edb1ded8075a1d0
AUX cvs-1.12.12-CVE-2012-0804.patch 1059 BLAKE2B 6ed9bec3d830340469bb5453a0e521586207a364d2b191a496f50c0f99d69c38a7f86e56064e2ccac9fb08a034b1c30680559bda40de38909489fa962fabea19 SHA512 4f86f75f59caf4ef7e83964ec2d9c93575ccdcb031b1a6a1774a2a80ab7d6f278b3d27c4ab9270b91edf457a0195d702e3bd20da17c167b3f204fd9d8980b720
AUX cvs-1.12.12-CVE-2017-12836-commandinjection.patch 636 BLAKE2B caf5842e2cf0e09c5307cfe73ac25b53dd9980f7c681daa3a100fdc9a43b3539ac5b99da08c022de6219f471fdde643c0a85294bc55a6a19ad4df9714416da93 SHA512 af6fe60d9c87229d0e29c1243430bf8d6aeaad5f12f906e68cbdf14d4b301117967c8e3c8eb241952ab66b33642fcc2c6ef8e73916305121a1286e8a53ae87da
AUX cvs-1.12.12-block-requests.patch 4006 BLAKE2B a2d3fa6d3533f20c3eb75687427efb110a7c503cb4ac157766a790698fd68c9317ce2849e003a237cb6e633cd7b8243a921bd74fe907f9d8aef7495966929462 SHA512 541545ffc64c4f2303b7e8f6cae2cdff0437452e4bcf94b2149d51e43710096e17f024c1a8ed32433560ea51ecef2aba2f3e6bfaef8fa9e4ad2f2436649884d1
@@ -10,6 +13,7 @@ AUX cvs-1.12.12-format-security.patch 541 BLAKE2B 6fea8eed90db275659a4a87cbd0a9b
AUX cvs-1.12.12-getdelim.patch 564 BLAKE2B 10d8e2b991f812cfbabb4b9b11d43c6d2d317cb3d8cd0a2ad58db378754cce6b176683f0ef5e0f65529dad72a9ac4f8a94d37f828e82ed50dd6d78d1d1b32513 SHA512 181b5daa6e103218e3fc1629a0b5f74daad613cdbe530655eff32479e4b9f32d067e60a82107efdbb129f917ee0626d274fb65555c66d907c997bf01fa262bdb
AUX cvs-1.12.12-hash-nameclash.patch 1019 BLAKE2B a48dbec6e85c66c4369239785d70c595ec6241bc66bb62f2c3b5ad01a35b0599b7b1a03e1e3fc8b012a1d16d202e1439d9349ef914e1e5663b61463863e53c04 SHA512 dcd612dcc4b008c0fbabd74bcc179e69ebaed31a9f6622127061194a8ed99549502fbc0bffc75cc87aed26f7fe46215da81438c3a797e2179ed3da8e0b5ebdbb
AUX cvs-1.12.12-install-sh.patch 495 BLAKE2B f18331b296c55aba72da32e5ee7e52c467f37b5e218555144d78f2dd63d2cd1fbb8d76030fd9c2a1f0d8992e3764fef0909a6afdf7c1947092dc5787863dea71 SHA512 7e468d41c1eb23c0a62b605e6e48cffc004e8f386a87a9696dd73b36702c74aad529f5cba7280dee1100027b6e1e907adad257cc446ca3ad734fa40d47e4ff72
+AUX cvs-1.12.12-mktime-configure-m4.patch 10106 BLAKE2B ff50889cd569a890b5e81d0302c498ea61a2ef379328294baa906030c0bd5cf63953c1d0bf7bc5615d212ee97789ce791430f86b4eb0edd7844a06d0044b754b SHA512 860c6395ad9dada1de24b0845b4d64ebc1777a50f92ac20cc0bfbb3211898db3a31ed9206ebcdd47cf01efcf07420749366700d6e5110bd177d57e7229a1d781
AUX cvs-1.12.12-mktime-configure.patch 4791 BLAKE2B 68587d6604f32064aeca0b5043fdf6fbd3e06cb8eeccdd806463b7035d3598e7354e07e28ae233ab0a4889956d7ebb52bcdf968aaf4bb7aea738ee408bb7e2d2 SHA512 10b29450d5d0a6a02d92812b919edbba2b86f2217aa54896b44358edb2eb8d8d6111b5c5db39faa50ef1f9a86ed1ee190332629f33402ad8cd8082b77547f486
AUX cvs-1.12.12-mktime-x32.patch 916 BLAKE2B cab0794b1feeb0a8a841732a25d5ba7a9b12721b286860229c8351714c34f01c2dceedc03fc0f16cde9a573027a7ecc56860eb53621c0bf7cbc7b4bec0fa0a99 SHA512 4a58c0f94de8e19c2de1930b7e5e04816e79a86885c89b792616a4c43f6e12aef271005ae59ae0d5788a910ba97735ccdf35f0ef5faafc2e3c50a9858b8f6216
AUX cvs-1.12.12-musl.patch 421 BLAKE2B c8949755aa511dc21deb7dc3bab1d3641915d794b8d935961b7b7b8d38ee40cdcc2c154f45e057635e9c9af41c4906a046acb2affaf093e4d35d4234a34c845f SHA512 1c14b89dccee3130cc4ff881b7204f01dd8e14d1767e21d30b879df17a368a0f6bc7d3945872f8a6adcf47e34c3e48b9f2c0c0c90cccbf10fa935690a57f5e20
@@ -21,5 +25,6 @@ DIST cederqvist-1.12.12.html.tar.bz2 137581 BLAKE2B c3e7a7a3783fc122bffbf100abb8
DIST cederqvist-1.12.12.pdf 1252423 BLAKE2B b7649c1165695776e914a3b287fd8883c512e9ab2efb1db995f2128d29b48674460bce0902067fabb5b81beaafae70c36e6c0a717d71f7c5b625b408327c4a54 SHA512 aa90b76664ca103cf41831a5595d5e99df9fd87633aa5a500569f43854ca6e409a26b655f02ed59cde1c37ce88c40e06f3b3376ad71fdc9487032c3f0898706a
DIST cederqvist-1.12.12.ps 1262208 BLAKE2B 4e26173e7deac7fbcd6ec8d50f6be8432df00ad15ecaadc3a64de15d53c4f1220f0496f270688baa4f6b29cfb1f5a1b548c7330408cc0afd94c3de2070a1eca9 SHA512 9a061ef90c664fbb4f882644f72c4f80ffbe0233b6b364511b1c7f18f0a53383980a6ddda326b6df1f2fe1899aed3225de89b55a65a1d9101ba81d1c10c067e2
DIST cvs-1.12.12.tar.bz2 3197171 BLAKE2B bb0aeacd4d89d32c7aeb30b2f96ec9c89277f01c54561ce082031433bc9914c40c1c7041df3859868e879ccaacc7a47aa915fb18aef3777463ba11a7077e99b8 SHA512 31c679b77b887e02d9c8c381b0dfb42f1207ef4ca806cd92843638eb2126ed032e99bda70a3e20ea2a029670ff39c40088a43435632e381739e6c2f978e6f4bb
-EBUILD cvs-1.12.12-r14.ebuild 2998 BLAKE2B da9a053d83d304ad946edbe2da1a3596c812cd8f25b5c9d66f74d0ccdfe54171b58a40d61927ef3a7d23896c8449fb366e92bf385b22652f470901c39d2f5633 SHA512 abcd30f091bce284664307688c21fa67aa6086ebf7fc7f8da12a64176422fe06fd14eb92f02bbb1af9e826d6cc899c2e7107d174402075e6b80a4176a453b47e
+EBUILD cvs-1.12.12-r14.ebuild 2999 BLAKE2B b74a0017bc18d2930fa9cc26cae19aa23db50cf363783b97b981d54c8505c106ef2a343ba87146cc56968bbdecce75a70f1fe4f2b34a75974cc86025e18ba842 SHA512 023633d5b6168a78f7c9494c3e0929ff325b45a0c4d0b40417e93f2b518e164e314955f97ef27e5aa3121f5167b0c9ec5213378bcdf46c16fcfb6632e678b02d
+EBUILD cvs-1.12.12-r15.ebuild 3183 BLAKE2B 01f6666edc436da5758fd8de1c39bbecafa5ec7f3ddd9135fbce46df9ee7330e249b30567414332e9024e9021d518072a686a9c9c616ab640cea6f4f21e64663 SHA512 dc5437b01a820be57915fccce3de9dc3cad4fc52111e303e55dae2ec92053eb6adbbffe94c0d592eb0940f3d5beb7899328784c29a7058e469f14b502f217466
MISC metadata.xml 313 BLAKE2B 146e5250368e0afe0a23c68dff542e20941a1b66cc0379d504cbceb707a3caaf2404181546ec8fa114ac815fc5cdca8cbe20b8e5e4ebbc79f4398112ff3f7389 SHA512 84c13776b7edc8c0a0ec81f093d272b6f28c09682f3a076d23e40c61bf9e1512401fff51a7e12b7103dd6128d0b6e158dbb71fd0fe68f624bc86f5ec86638675
diff --git a/dev-vcs/cvs/cvs-1.12.12-r14.ebuild b/dev-vcs/cvs/cvs-1.12.12-r14.ebuild
index 582b59739112..9a9191490c58 100644
--- a/dev-vcs/cvs/cvs-1.12.12-r14.ebuild
+++ b/dev-vcs/cvs/cvs-1.12.12-r14.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
inherit pam toolchain-funcs
DESCRIPTION="Concurrent Versions System - source code revision control tools"
-HOMEPAGE="http://cvs.nongnu.org/"
+HOMEPAGE="https://cvs.nongnu.org/"
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
diff --git a/dev-vcs/cvs/cvs-1.12.12-r15.ebuild b/dev-vcs/cvs/cvs-1.12.12-r15.ebuild
new file mode 100644
index 000000000000..5b42f71426ad
--- /dev/null
+++ b/dev-vcs/cvs/cvs-1.12.12-r15.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools pam toolchain-funcs
+
+DESCRIPTION="Concurrent Versions System - source code revision control tools"
+HOMEPAGE="https://cvs.nongnu.org/"
+
+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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
+
+IUSE="crypt doc kerberos nls pam selinux server"
+RESTRICT="test"
+
+DEPEND="
+ >=sys-libs/zlib-1.1.4
+ kerberos? ( virtual/krb5 )
+ pam? ( sys-libs/pam )
+ server? ( virtual/libcrypt:= )
+"
+RDEPEND="
+ ${DEPEND}
+ selinux? ( sec-policy/selinux-cvs )
+"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ use doc && unpack cederqvist-${PV}.html.tar.bz2
+}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cvsbug-tmpfix.patch
+ "${FILESDIR}"/${P}-openat.patch
+ "${FILESDIR}"/${P}-block-requests.patch
+ "${FILESDIR}"/${P}-cvs-gnulib-vasnprintf.patch
+ "${FILESDIR}"/${P}-install-sh.patch
+ "${FILESDIR}"/${P}-hash-nameclash.patch # for AIX
+ "${FILESDIR}"/${P}-getdelim.patch # 314791
+ "${FILESDIR}"/${PN}-1.12.12-rcs2log-coreutils.patch # 144114
+ "${FILESDIR}"/${P}-mktime-x32.patch # 395641
+ "${FILESDIR}"/${P}-fix-massive-leak.patch
+ "${FILESDIR}"/${P}-mktime-configure-m4.patch #220040 #570208
+ "${FILESDIR}"/${P}-CVE-2012-0804.patch
+ "${FILESDIR}"/${P}-format-security.patch
+ "${FILESDIR}"/${P}-musl.patch
+ "${FILESDIR}"/${P}-CVE-2017-12836-commandinjection.patch
+ "${FILESDIR}"/0001-gettext-autoreconf.patch
+ "${FILESDIR}"/0001-fix-quoting-around-potentially-empty-shell-var.patch
+ "${FILESDIR}"/c99-roundup.patch
+ )
+DOCS=( BUGS ChangeLog{,.zoo} DEVEL-CVS FAQ HACKING MINOR-BUGS NEWS \
+ PROJECTS README TESTS TODO )
+
+src_prepare() {
+ export CONFIG_SHELL=${BASH} # configure fails without
+ default
+ eautoreconf
+ sed -i "/^AR/s:ar:$(tc-getAR):" diff/Makefile.in lib/Makefile.in || die
+}
+
+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="${EPREFIX}"/tmp \
+ $(use_enable crypt encryption) \
+ $(use_with kerberos gssapi) \
+ $(use_enable nls) \
+ $(use_enable pam) \
+ $(use_enable server)
+}
+
+src_install() {
+ # Not installed into emacs site-lisp because it clobbers the normal C
+ # indentations.
+ DOCS+=( cvs-format.el )
+
+ if use doc; then
+ DOCS+=( "${DISTDIR}"/cederqvist-${PV}.{pdf,ps} )
+ HTML_DOCS=( ../cederqvist-${PV}.html/. )
+ fi
+
+ default
+
+ use doc && dosym cvs.html /usr/share/doc/${PF}/html/index.html
+
+ if use server; then
+ newdoc "${FILESDIR}"/cvs-1.12.12-cvs-custom.c cvs-custom.c
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver
+ newenvd "${FILESDIR}"/01-cvs-env.d 01cvs
+ fi
+
+ if use pam; then
+ newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
+ fi
+}
diff --git a/dev-vcs/cvs/files/0001-fix-quoting-around-potentially-empty-shell-var.patch b/dev-vcs/cvs/files/0001-fix-quoting-around-potentially-empty-shell-var.patch
new file mode 100644
index 000000000000..74041583e835
--- /dev/null
+++ b/dev-vcs/cvs/files/0001-fix-quoting-around-potentially-empty-shell-var.patch
@@ -0,0 +1,30 @@
+From 6054eb157a25b4b46427baa6eb53b5e18135019a Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 19 May 2024 21:15:34 -0400
+Subject: [PATCH 1/2] fix quoting around potentially empty shell var
+
+required to handle POSIX `test` command
+
+ * QA Notice: Broken syntax in configure script
+ *
+ * ./configure: line 8046: test: =: unary operator expected
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index d4f3a44..2a9b0ff 100644
+--- a/configure.in
++++ b/configure.in
+@@ -179,7 +179,7 @@ AC_CHECK_MEMBERS([struct stat.st_blksize])
+ AC_CHECK_MEMBERS([struct stat.st_rdev])
+
+ AC_FUNC_FSEEKO
+-if test $ac_cv_func_fseeko = no; then
++if test "$ac_cv_func_fseeko" = no; then
+ AC_LIBOBJ(fseeko)
+ AC_LIBOBJ(ftello)
+ fi
+--
+2.44.1
+
diff --git a/dev-vcs/cvs/files/0001-gettext-autoreconf.patch b/dev-vcs/cvs/files/0001-gettext-autoreconf.patch
new file mode 100644
index 000000000000..b091fb6b4175
--- /dev/null
+++ b/dev-vcs/cvs/files/0001-gettext-autoreconf.patch
@@ -0,0 +1,25 @@
+From dafaeefa2d81034333ec73594b8209caebb69b23 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 19 May 2024 19:48:33 -0400
+Subject: [PATCH] gettext autoreconf
+
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index ada8454..d4f3a44 100644
+--- a/configure.in
++++ b/configure.in
+@@ -206,7 +206,7 @@ gl_INIT
+ dnl For one reason or another, the autogenerated m4/gnulib.m4 wants
+ dnl AM_GNU_GETTEXT([external]) called directly from here.
+ AM_GNU_GETTEXT([external])
+-AM_GNU_GETTEXT_VERSION dnl work around for autoconf-2.57 bug.
++AM_GNU_GETTEXT_VERSION(0.22.4)
+ # The error module still poses merge problems.
+ AC_FUNC_STRERROR_R
+ dnl The following macros can be called by other GNULIB macros but are also
+--
+2.44.1
+
diff --git a/dev-vcs/cvs/files/c99-roundup.patch b/dev-vcs/cvs/files/c99-roundup.patch
new file mode 100644
index 000000000000..7c8ad479117d
--- /dev/null
+++ b/dev-vcs/cvs/files/c99-roundup.patch
@@ -0,0 +1,122 @@
+From 4df675986524d0e8e76530a3e1bd7860aef9973d Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 19 May 2024 21:27:38 -0400
+Subject: [PATCH 1/2] m4: fix various missing includes of headers for feature
+ test funcs
+
+---
+ m4/cvs_func_printf_ptr.m4 | 1 +
+ m4/mkdir-slash.m4 | 6 +++++-
+ m4/nanosleep.m4 | 1 +
+ m4/regex.m4 | 1 +
+ m4/rename.m4 | 1 +
+ 5 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/m4/cvs_func_printf_ptr.m4 b/m4/cvs_func_printf_ptr.m4
+index 4348e29..f04c135 100644
+--- a/m4/cvs_func_printf_ptr.m4
++++ b/m4/cvs_func_printf_ptr.m4
+@@ -24,6 +24,7 @@ AC_DEFUN([CVS_FUNC_PRINTF_PTR],
+ [AC_CACHE_CHECK(whether printf supports %p,
+ cvs_cv_func_printf_ptr,
+ [AC_TRY_RUN([#include <stdio.h>
++#include <stdlib.h>
+ /* If printf supports %p, exit 0. */
+ int
+ main ()
+diff --git a/m4/mkdir-slash.m4 b/m4/mkdir-slash.m4
+index c1e595b..0ca9a91 100644
+--- a/m4/mkdir-slash.m4
++++ b/m4/mkdir-slash.m4
+@@ -1,4 +1,4 @@
+-#serial 4
++#serial 5
+
+ # Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+ # This file is free software; the Free Software Foundation
+@@ -10,6 +10,7 @@
+ # trailing slashes.
+ AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
+ [dnl
++ AC_CHECK_HEADERS_ONCE(unistd.h)
+ AC_CACHE_CHECK([whether mkdir fails due to a trailing slash],
+ gl_cv_func_mkdir_trailing_slash_bug,
+ [
+@@ -19,6 +20,9 @@ AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH],
+ # include <sys/types.h>
+ # include <sys/stat.h>
+ # include <stdlib.h>
++# ifdef HAVE_UNISTD_H
++# include <unistd.h>
++# endif
+ int main ()
+ {
+ rmdir ("confdir-slash");
+diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
+index 5590b9b..035e440 100644
+--- a/m4/nanosleep.m4
++++ b/m4/nanosleep.m4
+@@ -39,6 +39,7 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
+ # include <time.h>
+ # endif
+ # endif
++# include <stdlib.h>
+
+ int
+ main ()
+diff --git a/m4/regex.m4 b/m4/regex.m4
+index 34435de..5988f68 100644
+--- a/m4/regex.m4
++++ b/m4/regex.m4
+@@ -36,6 +36,7 @@ AC_DEFUN([gl_INCLUDED_REGEX],
+ [#include <stdio.h>
+ #include <string.h>
+ #include <regex.h>
++#include <stdlib.h>
+ int
+ main ()
+ {
+diff --git a/m4/rename.m4 b/m4/rename.m4
+index 7d59160..362fdd4 100644
+--- a/m4/rename.m4
++++ b/m4/rename.m4
+@@ -23,6 +23,7 @@ AC_DEFUN([vb_FUNC_RENAME],
+ AC_MSG_ERROR([cannot create temporary directory])
+ AC_TRY_RUN([
+ # include <stdio.h>
++# include <stdlib.h>
+ int
+ main ()
+ {
+--
+2.44.1
+
+
+From f6e7556c404e1cb3ddb088fab480aa39a9ad0306 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 19 May 2024 21:47:06 -0400
+Subject: [PATCH 2/2] fix missing config.h includes preventing functions from
+ being found
+
+_GNU_SOURCE needs to be defined by config.h, so that fputs_unlocked is
+provided by stdio.h (as used by gnulib's unlocked-io module).
+---
+ src/add.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/add.c b/src/add.c
+index 7f94e2b..025cfc9 100644
+--- a/src/add.c
++++ b/src/add.c
+@@ -29,6 +29,8 @@
+ * file to be resurrected.
+ */
+
++#include <config.h>
++
+ #include <assert.h>
+ #include "cvs.h"
+ #include "save-cwd.h"
+--
+2.44.1
+
diff --git a/dev-vcs/cvs/files/cvs-1.12.12-mktime-configure-m4.patch b/dev-vcs/cvs/files/cvs-1.12.12-mktime-configure-m4.patch
new file mode 100644
index 000000000000..f5b445682b11
--- /dev/null
+++ b/dev-vcs/cvs/files/cvs-1.12.12-mktime-configure-m4.patch
@@ -0,0 +1,412 @@
+https://bugs.gentoo.org/220040
+https://bugs.gentoo.org/570208
+
+update mktime check to latest autoconf version which is less buggy
+
+--- a/configure
++++ b/configure
+@@ -5299,26 +6059,25 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ /* Test program from Paul Eggert and Tony Leneis. */
+-#if TIME_WITH_SYS_TIME
++#ifdef TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+ # include <time.h>
+ #else
+-# if HAVE_SYS_TIME_H
++# ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ # else
+ # include <time.h>
+ # endif
+ #endif
+
+-#if HAVE_STDLIB_H
+-# include <stdlib.h>
+-#endif
++#include <limits.h>
++#include <stdlib.h>
+
+-#if HAVE_UNISTD_H
++#ifdef HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+
+-#if !HAVE_ALARM
++#ifndef HAVE_ALARM
+ # define alarm(X) /* empty */
+ #endif
+
+@@ -5335,9 +6094,9 @@
+ };
+ #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
+
+-/* Fail if mktime fails to convert a date in the spring-forward gap.
++/* Return 0 if mktime fails to convert a date in the spring-forward gap.
+ Based on a problem report from Andreas Jaeger. */
+-static void
++static int
+ spring_forward_gap ()
+ {
+ /* glibc (up to about 1998-10-07) failed this test. */
+@@ -5356,29 +6115,27 @@
+ tm.tm_min = 0;
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+- if (mktime (&tm) == (time_t)-1)
+- exit (1);
++ return mktime (&tm) != (time_t) -1;
+ }
+
+-static void
++static int
+ mktime_test1 (now)
+ time_t now;
+ {
+ struct tm *lt;
+- if ((lt = localtime (&now)) && mktime (lt) != now)
+- exit (1);
++ return ! (lt = localtime (&now)) || mktime (lt) == now;
+ }
+
+-static void
++static int
+ mktime_test (now)
+ time_t now;
+ {
+- mktime_test1 (now);
+- mktime_test1 ((time_t) (time_t_max - now));
+- mktime_test1 ((time_t) (time_t_min + now));
++ return (mktime_test1 (now)
++ && mktime_test1 ((time_t) (time_t_max - now))
++ && mktime_test1 ((time_t) (time_t_min + now)));
+ }
+
+-static void
++static int
+ irix_6_4_bug ()
+ {
+ /* Based on code from Ariel Faigon. */
+@@ -5391,11 +6148,10 @@
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+ mktime (&tm);
+- if (tm.tm_mon != 2 || tm.tm_mday != 31)
+- exit (1);
++ return tm.tm_mon == 2 && tm.tm_mday == 31;
+ }
+
+-static void
++static int
+ bigtime_test (j)
+ int j;
+ {
+@@ -5417,8 +6173,39 @@
+ && lt->tm_wday == tm.tm_wday
+ && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+ == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+- exit (1);
++ return 0;
+ }
++ return 1;
++}
++
++static int
++year_2050_test ()
++{
++ /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
++ ignoring leap seconds. */
++ unsigned long int answer = 2527315200UL;
++
++ struct tm tm;
++ time_t t;
++ tm.tm_year = 2050 - 1900;
++ tm.tm_mon = 2 - 1;
++ tm.tm_mday = 1;
++ tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
++ tm.tm_isdst = -1;
++
++ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
++ instead of "TZ=America/Vancouver" in order to detect the bug even
++ on systems that don't support the Olson extension, or don't have the
++ full zoneinfo tables installed. */
++ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
++
++ t = mktime (&tm);
++
++ /* Check that the result is either a failure, or close enough
++ to the correct answer that we can assume the discrepancy is
++ due to leap seconds. */
++ return (t == (time_t) -1
++ || (0 < t && answer - 120 <= t && t <= answer + 120));
+ }
+
+ int
+@@ -5432,12 +6219,15 @@
+ isn't worth using anyway. */
+ alarm (60);
+
+- for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
+- continue;
+- time_t_max--;
+- if ((time_t) -1 < 0)
+- for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
+- continue;
++ for (;;)
++ {
++ t = (time_t_max << 1) + 1;
++ if (t <= time_t_max)
++ break;
++ time_t_max = t;
++ }
++ time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
++
+ delta = time_t_max / 997; /* a suitable prime number */
+ for (i = 0; i < N_STRINGS; i++)
+ {
+@@ -5445,18 +6235,22 @@
+ putenv (tz_strings[i]);
+
+ for (t = 0; t <= time_t_max - delta; t += delta)
+- mktime_test (t);
+- mktime_test ((time_t) 1);
+- mktime_test ((time_t) (60 * 60));
+- mktime_test ((time_t) (60 * 60 * 24));
+-
+- for (j = 1; 0 < j; j *= 2)
+- bigtime_test (j);
+- bigtime_test (j - 1);
++ if (! mktime_test (t))
++ return 1;
++ if (! (mktime_test ((time_t) 1)
++ && mktime_test ((time_t) (60 * 60))
++ && mktime_test ((time_t) (60 * 60 * 24))))
++ return 1;
++
++ for (j = 1; ; j <<= 1)
++ if (! bigtime_test (j))
++ return 1;
++ else if (INT_MAX / 2 < j)
++ break;
++ if (! bigtime_test (INT_MAX))
++ return 1;
+ }
+- irix_6_4_bug ();
+- spring_forward_gap ();
+- exit (0);
++ return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+From 243eb722f2c53d07bc7cbb2304e35582bddd4e45 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sun, 19 May 2024 20:11:58 -0400
+Subject: [PATCH] update mktime check to latest autoconf version which is less
+ buggy
+
+---
+ m4/mktime.m4 | 114 +++++++++++++++++++++++++++++++++------------------
+ 1 file changed, 74 insertions(+), 40 deletions(-)
+
+diff --git a/m4/mktime.m4 b/m4/mktime.m4
+index 25ca6dc..da00ee5 100644
+--- a/m4/mktime.m4
++++ b/m4/mktime.m4
+@@ -19,26 +19,25 @@ AC_CHECK_FUNCS(alarm)
+ AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime,
+ [AC_RUN_IFELSE([AC_LANG_SOURCE(
+ [[/* Test program from Paul Eggert and Tony Leneis. */
+-#if TIME_WITH_SYS_TIME
++#ifdef TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+ # include <time.h>
+ #else
+-# if HAVE_SYS_TIME_H
++# ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ # else
+ # include <time.h>
+ # endif
+ #endif
+
+-#if HAVE_STDLIB_H
+-# include <stdlib.h>
+-#endif
++#include <limits.h>
++#include <stdlib.h>
+
+-#if HAVE_UNISTD_H
++#ifdef HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+
+-#if !HAVE_ALARM
++#ifndef HAVE_ALARM
+ # define alarm(X) /* empty */
+ #endif
+
+@@ -55,9 +54,9 @@ static char *tz_strings[] = {
+ };
+ #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
+
+-/* Fail if mktime fails to convert a date in the spring-forward gap.
++/* Return 0 if mktime fails to convert a date in the spring-forward gap.
+ Based on a problem report from Andreas Jaeger. */
+-static void
++static int
+ spring_forward_gap ()
+ {
+ /* glibc (up to about 1998-10-07) failed this test. */
+@@ -76,29 +75,27 @@ spring_forward_gap ()
+ tm.tm_min = 0;
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+- if (mktime (&tm) == (time_t)-1)
+- exit (1);
++ return mktime (&tm) != (time_t) -1;
+ }
+
+-static void
++static int
+ mktime_test1 (now)
+ time_t now;
+ {
+ struct tm *lt;
+- if ((lt = localtime (&now)) && mktime (lt) != now)
+- exit (1);
++ return ! (lt = localtime (&now)) || mktime (lt) == now;
+ }
+
+-static void
++static int
+ mktime_test (now)
+ time_t now;
+ {
+- mktime_test1 (now);
+- mktime_test1 ((time_t) (time_t_max - now));
+- mktime_test1 ((time_t) (time_t_min + now));
++ return (mktime_test1 (now)
++ && mktime_test1 ((time_t) (time_t_max - now))
++ && mktime_test1 ((time_t) (time_t_min + now)));
+ }
+
+-static void
++static int
+ irix_6_4_bug ()
+ {
+ /* Based on code from Ariel Faigon. */
+@@ -111,11 +108,10 @@ irix_6_4_bug ()
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+ mktime (&tm);
+- if (tm.tm_mon != 2 || tm.tm_mday != 31)
+- exit (1);
++ return tm.tm_mon == 2 && tm.tm_mday == 31;
+ }
+
+-static void
++static int
+ bigtime_test (j)
+ int j;
+ {
+@@ -137,8 +133,39 @@ bigtime_test (j)
+ && lt->tm_wday == tm.tm_wday
+ && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+ == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+- exit (1);
++ return 0;
+ }
++ return 1;
++}
++
++static int
++year_2050_test ()
++{
++ /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
++ ignoring leap seconds. */
++ unsigned long int answer = 2527315200UL;
++
++ struct tm tm;
++ time_t t;
++ tm.tm_year = 2050 - 1900;
++ tm.tm_mon = 2 - 1;
++ tm.tm_mday = 1;
++ tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
++ tm.tm_isdst = -1;
++
++ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
++ instead of "TZ=America/Vancouver" in order to detect the bug even
++ on systems that don't support the Olson extension, or don't have the
++ full zoneinfo tables installed. */
++ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
++
++ t = mktime (&tm);
++
++ /* Check that the result is either a failure, or close enough
++ to the correct answer that we can assume the discrepancy is
++ due to leap seconds. */
++ return (t == (time_t) -1
++ || (0 < t && answer - 120 <= t && t <= answer + 120));
+ }
+
+ int
+@@ -152,12 +179,15 @@ main ()
+ isn't worth using anyway. */
+ alarm (60);
+
+- for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
+- continue;
+- time_t_max--;
+- if ((time_t) -1 < 0)
+- for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
+- continue;
++ for (;;)
++ {
++ t = (time_t_max << 1) + 1;
++ if (t <= time_t_max)
++ break;
++ time_t_max = t;
++ }
++ time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
++
+ delta = time_t_max / 997; /* a suitable prime number */
+ for (i = 0; i < N_STRINGS; i++)
+ {
+@@ -165,18 +195,22 @@ main ()
+ putenv (tz_strings[i]);
+
+ for (t = 0; t <= time_t_max - delta; t += delta)
+- mktime_test (t);
+- mktime_test ((time_t) 1);
+- mktime_test ((time_t) (60 * 60));
+- mktime_test ((time_t) (60 * 60 * 24));
+-
+- for (j = 1; 0 < j; j *= 2)
+- bigtime_test (j);
+- bigtime_test (j - 1);
++ if (! mktime_test (t))
++ return 1;
++ if (! (mktime_test ((time_t) 1)
++ && mktime_test ((time_t) (60 * 60))
++ && mktime_test ((time_t) (60 * 60 * 24))))
++ return 1;
++
++ for (j = 1; ; j <<= 1)
++ if (! bigtime_test (j))
++ return 1;
++ else if (INT_MAX / 2 < j)
++ break;
++ if (! bigtime_test (INT_MAX))
++ return 1;
+ }
+- irix_6_4_bug ();
+- spring_forward_gap ();
+- exit (0);
++ return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
+ }]])],
+ [ac_cv_func_working_mktime=yes],
+ [ac_cv_func_working_mktime=no],
+--
+2.44.1
+