Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/releng:master commit in: dev-vcs/cvs/, dev-vcs/cvs/files/
Date: Sat, 22 Feb 2014 14:19:49
Message-Id: 1393078456.c72a4be754fad33f7fd9c3ccf8dd8d024c2d3364.blueness@gentoo
1 commit: c72a4be754fad33f7fd9c3ccf8dd8d024c2d3364
2 Author: Felix Janda <felix.janda <AT> posteo <DOT> de>
3 AuthorDate: Sun Feb 16 21:23:41 2014 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 22 14:14:16 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=c72a4be7
7
8 dev-vcs/cvs: move to tree
9
10 ---
11 dev-vcs/cvs/Manifest | 15 +++
12 dev-vcs/cvs/cvs-1.12.12-r99.ebuild | 86 +++++++++++++
13 dev-vcs/cvs/files/cvs-1.12.12-block-requests.patch | 140 +++++++++++++++++++++
14 .../files/cvs-1.12.12-cvs-gnulib-vasnprintf.patch | 34 +++++
15 dev-vcs/cvs/files/cvs-1.12.12-cvsbug-tmpfix.patch | 22 ++++
16 dev-vcs/cvs/files/cvs-1.12.12-install-sh.patch | 12 ++
17 dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch | 29 +++++
18 dev-vcs/cvs/files/cvs-1.12.12-openat.patch | 21 ++++
19 dev-vcs/cvs/files/cvs-1.12.12-regex.patch | 11 ++
20 dev-vcs/cvs/files/cvs.pam-include-1.12.12 | 4 +
21 dev-vcs/cvs/files/cvspserver.xinetd.d | 14 +++
22 dev-vcs/cvs/metadata.xml | 8 ++
23 12 files changed, 396 insertions(+)
24
25 diff --git a/dev-vcs/cvs/Manifest b/dev-vcs/cvs/Manifest
26 new file mode 100644
27 index 0000000..54dcc8c
28 --- /dev/null
29 +++ b/dev-vcs/cvs/Manifest
30 @@ -0,0 +1,15 @@
31 +AUX cvs-1.12.12-block-requests.patch 4006 SHA256 70bbf745815d1e01582329160a10f5cdd9c11051e4e62d331686dd5124e01294 SHA512 541545ffc64c4f2303b7e8f6cae2cdff0437452e4bcf94b2149d51e43710096e17f024c1a8ed32433560ea51ecef2aba2f3e6bfaef8fa9e4ad2f2436649884d1 WHIRLPOOL 4c56980ea0d307789ace423e7fcafb86c82429f82cfbe6d873706f95e6e2554e06268540d23b9718113e5182b83b01bb22d02ae649e27feaac1dfd09b38fa892
32 +AUX cvs-1.12.12-cvs-gnulib-vasnprintf.patch 1092 SHA256 f38e6bbb0fd8b783b654ac775183a1cb24e3987698fdbd706a8d5fa59a45f945 SHA512 6c0be276f6e86dbe3646ada02ea57194b8c7d1e4d76c5faeb06750435599aa4125253bdf7af6232f53807977acb34aba093bc8bfa2ce98389c5ee80b2fd6e05d WHIRLPOOL 0b5dd5ee3c11fae83688d900db2ce678870c79b753c1ffde9aa11a6fe18286af7e24d57f2ce28ffcdbfb42172a0e87baed58047497248ffb1a37acca93ad716f
33 +AUX cvs-1.12.12-cvsbug-tmpfix.patch 624 SHA256 061c26d140e1195200f1cc76217b2e7c2ff7f0c4dcbbb31124b386e8e756938e SHA512 29014631f5595dbf51a47032a19a23e545190dd8d40d77a71d363cee07a9ae38263b67db52a512436a9a7b37a7f5ff4daafa4a0a9f3c29bcfeb71ecff74408b7 WHIRLPOOL 09d53fa26159defe56cdbd414b699bd7c5be07f36b0b5addd367b393985bd7c98f14189db5b2793af0fc37d052f21af1f97c3775d46d71cebdfff15c447a9d5a
34 +AUX cvs-1.12.12-install-sh.patch 495 SHA256 9c2fc03b42804f8edb3a5a6f9c9e80bd68924f265ce52d196c3b5c759ba42f8a SHA512 7e468d41c1eb23c0a62b605e6e48cffc004e8f386a87a9696dd73b36702c74aad529f5cba7280dee1100027b6e1e907adad257cc446ca3ad734fa40d47e4ff72 WHIRLPOOL 1eaf9e7ccab89cd0d2c95440da0454779b13d6efc4b2a773d41f58998353a2670134344d6a97379103f3ba6e8b6c96c93db0b6229821bb8c12ce037a3b7ddb64
35 +AUX cvs-1.12.12-mktime-x32.patch 916 SHA256 107b0adceda7c8b7b8e89604f38ea0e7a903420dc58dbf22c5eeac947d63d0e1 SHA512 4a58c0f94de8e19c2de1930b7e5e04816e79a86885c89b792616a4c43f6e12aef271005ae59ae0d5788a910ba97735ccdf35f0ef5faafc2e3c50a9858b8f6216 WHIRLPOOL 5ca4316ee5a272efabe6da249476f6f916851fa92338368616aff03f380b2cd290391faa455e914e423ce74a00122336e6bfa93236a8412c1f32103040e3038a
36 +AUX cvs-1.12.12-openat.patch 761 SHA256 5b9fc46c2ee46d9136ddfc8d0baaac6087d8cae40fa5521815c3c2e372f25b9f SHA512 b0a7abc785169705d2f0668a8af706f93ee3eba3d050d555689577962283e54f6bd186e662b64c65f926cf72dff76a37259181338707d641ee0f20591ba62805 WHIRLPOOL 31c9eb71d9d8cf5dff05e48c054e29b720702c6c12cafd7a2dd9687578bb1c441cf5e90c355b9164dee6b14f6c5cb7a2f4ad7d9ff4831f3ce2f02f82ffd082f7
37 +AUX cvs-1.12.12-regex.patch 396 SHA256 0f8a66e61d92a0a9c23854a2b0f16f75f056cc804003a89428ae59d6ac48109a SHA512 0ea01d1df9e5f91c36d475639db10a22eb52fa7d23cc687482c09489d7ae19a4e5917476c61b7de15fe037775bef92aa206e01e58c26f7dd4ce7b02675eac40c WHIRLPOOL c6f3a33520dff71b4d91b5d4ed281db0bc4f671bf7c0f507052f9e7a202b2a65ac97c9b70c840cdc634dc07fb7600534744d5ff948f383ece2661c0fe4a4cbed
38 +AUX cvs.pam-include-1.12.12 106 SHA256 8291f84c2d76269e7be6487ae1db7212e67ee7313d35e6b0cebcd01e30d155af SHA512 1e72da3f959433e59d0153ff09e53a79bb68793506456e38d7070ffe4fcf6d596fdc3740dd2325d626a8dbd356dd11d93fbd5f220515f2435a94b90bb5833fb9 WHIRLPOOL 4580958cbd6955c5fc3e84d4b5c5877c2e94c5a3de326f6936c641cda43a588196871b43280cdbe16c8274049a08eb73ac7067a5166b1f613770f4ea24afc5eb
39 +AUX cvspserver.xinetd.d 282 SHA256 71b62c4f278ed17bf3cac8eacb2bfb17b6125bfe77f83b46fa5742395b74ef5f SHA512 6845a5fc38ed9d8f9194f14137066c3f2640f09ebc1dce7e9fa7c49761534003e5b1c59593496ba9f88a6c9b1196980bc145a2e2fdcbf662360d1b1ca8821411 WHIRLPOOL 949abc87f0d7c8f104ce8a896fdfd94e3db8f60d5aaa948d3358e348b17de942f19ba68fe545ec2af0026643d7b5efd5bc3bc26ccc7da47c70c544d01879646a
40 +DIST cederqvist-1.12.12.html.tar.bz2 137581 SHA256 6bdd66581ec363e05313a14db27cd3c201b547cdfc9ea2f8edde74e78301f0f6 SHA512 c4f6bdc294b719c1c9f6e8b7d1d4faa9e2aafccd37924e9d4772f8d802da3e7f5ae1778b295989db256b23bb1d0914023db7237adaf07833caaee499ae6b6fa3 WHIRLPOOL 41dd1e0d944a02eeca10539b87b5cfcadbf4fd5923c872aa86e5673bb6a98f774d5378e8b4f1c2e6c6a62e6dc6a4d02c69b5e51ad03da899903070effd62adc9
41 +DIST cederqvist-1.12.12.pdf 1252423 SHA256 211c5792d24bfd5694f23bc217a161d880bfb2447c41016fab6f657168b041ce SHA512 aa90b76664ca103cf41831a5595d5e99df9fd87633aa5a500569f43854ca6e409a26b655f02ed59cde1c37ce88c40e06f3b3376ad71fdc9487032c3f0898706a WHIRLPOOL 88d015117c05716df6d0cdc763f16dc488f0641624475e9bd33478485dd32e36a7ee5c49a1789ebdd173e665ae5963e75975342d7308e8e453adb65dd31ec6c5
42 +DIST cederqvist-1.12.12.ps 1262208 SHA256 0e14189614e2c5ead49bfe0ecd187239f8adc3e66371b49d52163be821e44cab SHA512 9a061ef90c664fbb4f882644f72c4f80ffbe0233b6b364511b1c7f18f0a53383980a6ddda326b6df1f2fe1899aed3225de89b55a65a1d9101ba81d1c10c067e2 WHIRLPOOL fb1616ca734e51a626713e7e78786ecbff18378966c2c131f6992df248096d38e850123449d3a5a6aa111ee209f90ef48848da7366b21cb6befeccf07ce54ab6
43 +DIST cvs-1.12.12.tar.bz2 3197171 SHA256 9fb9176d268b9019768fc57dedc2920c28fbeda5ba224c2348550d4f25043edc SHA512 31c679b77b887e02d9c8c381b0dfb42f1207ef4ca806cd92843638eb2126ed032e99bda70a3e20ea2a029670ff39c40088a43435632e381739e6c2f978e6f4bb WHIRLPOOL 74257976cdb957e86fb9fb7e54fc8c0b7210f72136ce05327203d935195e7a3bdda0c1d616dc04cb1d6495cb038ca7275e88488eddb5d936c1cfceb94583278c
44 +EBUILD cvs-1.12.12-r99.ebuild 2754 SHA256 2db7d8aeb0348554d4416b49bfb222fb4bedabc374bee590c0cb9198c446978c SHA512 80d370b6d53aa530d35cf5d5146162b5e8d47a8de70b135273844d963981447a65c9988579df36094847b3c568664617a57db7b1217ab9cda3677b6849de1689 WHIRLPOOL c5bcc2ec5dbfcdced03a07869eb5e09724deb7d874090348b7c8a8e1da68b35742e9cb9fe5e16d289ba3675a4deabb5a6af3ec87b28b076962820f24ce11c093
45 +MISC metadata.xml 234 SHA256 ce7beba20d6099be006550fb74bb9e74628a9d6967c7ceb096ab99959df47a02 SHA512 a3496fff78817806f0d26ead02e33ecffa0461ae98d6d5cc1f4e2720668acbba89393516a25135bf779d46d8fd0b13c4ee83d31c825e5a199647533da746f613 WHIRLPOOL 6bbde883caeeae98119e6d7dc741843c5087f4e2629d65afbe02a778579b9fc58b24c8485ffadf432bc768e3f91998cdf5dfd819157ab5ca33fe3b157441ffbf
46
47 diff --git a/dev-vcs/cvs/cvs-1.12.12-r99.ebuild b/dev-vcs/cvs/cvs-1.12.12-r99.ebuild
48 new file mode 100644
49 index 0000000..27ed6e5
50 --- /dev/null
51 +++ b/dev-vcs/cvs/cvs-1.12.12-r99.ebuild
52 @@ -0,0 +1,86 @@
53 +# Copyright 1999-2014 Gentoo Foundation
54 +# Distributed under the terms of the GNU General Public License v2
55 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/cvs/cvs-1.12.12-r6.ebuild,v 1.4 2014/01/19 10:30:16 vapier Exp $
56 +
57 +inherit eutils pam toolchain-funcs
58 +
59 +DESCRIPTION="Concurrent Versions System - source code revision control tools"
60 +HOMEPAGE="http://www.nongnu.org/cvs/"
61 +
62 +SRC_URI="mirror://gnu/non-gnu/cvs/source/feature/${PV}/${P}.tar.bz2
63 + doc? ( mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.html.tar.bz2
64 + mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.pdf
65 + mirror://gnu/non-gnu/cvs/source/feature/${PV}/cederqvist-${PV}.ps )"
66 +
67 +LICENSE="GPL-2 LGPL-2"
68 +SLOT="0"
69 +KEYWORDS="amd64 arm x86"
70 +
71 +IUSE="crypt doc kerberos nls pam server"
72 +
73 +DEPEND=">=sys-libs/zlib-1.1.4
74 + kerberos? ( virtual/krb5 )
75 + pam? ( virtual/pam )"
76 +
77 +src_unpack() {
78 + unpack ${P}.tar.bz2
79 + use doc && unpack cederqvist-${PV}.html.tar.bz2
80 + EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${P}-cvsbug-tmpfix.patch
81 + epatch "${FILESDIR}"/${P}-openat.patch
82 + EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${P}-block-requests.patch
83 + cd "${S}"
84 + epatch "${FILESDIR}"/${P}-cvs-gnulib-vasnprintf.patch
85 + epatch "${FILESDIR}"/${P}-install-sh.patch
86 + epatch "${FILESDIR}"/${P}-regex.patch
87 + epatch "${FILESDIR}"/${P}-mktime-x32.patch # 395641
88 + use server || elog "If you want any CVS server functionality, you MUST emerge with USE=server!"
89 +}
90 +
91 +src_compile() {
92 + if tc-is-cross-compiler ; then
93 + # Sane defaults when cross-compiling (as these tests want to
94 + # try and execute code).
95 + export cvs_cv_func_printf_ptr="yes"
96 + fi
97 + econf \
98 + --with-external-zlib \
99 + --with-tmpdir=/tmp \
100 + $(use_enable crypt encryption) \
101 + $(use_with kerberos gssapi) \
102 + $(use_enable nls) \
103 + $(use_enable pam) \
104 + $(use_enable server) \
105 + || die
106 + emake || die "emake failed"
107 +}
108 +
109 +src_install() {
110 + emake install DESTDIR="${D}" || die
111 +
112 + insinto /etc/xinetd.d
113 + newins "${FILESDIR}"/cvspserver.xinetd.d cvspserver || die "newins failed"
114 +
115 + dodoc BUGS ChangeLog* DEVEL* FAQ HACKING \
116 + MINOR* NEWS PROJECTS README* TESTS TODO
117 +
118 + # Not installed into emacs site-lisp because it clobbers the normal C
119 + # indentations.
120 + dodoc cvs-format.el || die "dodoc failed"
121 +
122 + use server && newdoc "${FILESDIR}"/cvs-1.12.12-cvs-custom.c cvs-custom.c
123 +
124 + if use doc; then
125 + dodoc "${DISTDIR}"/cederqvist-${PV}.pdf
126 + dodoc "${DISTDIR}"/cederqvist-${PV}.ps
127 + tar xjf "${DISTDIR}"/cederqvist-${PV}.html.tar.bz2
128 + dohtml -r cederqvist-${PV}.html/*
129 + cd "${D}"/usr/share/doc/${PF}/html/
130 + ln -s cvs.html index.html
131 + fi
132 +
133 + newpamd "${FILESDIR}"/cvs.pam-include-1.12.12 cvs
134 +}
135 +
136 +src_test() {
137 + einfo "FEATURES=\"maketest\" has been disabled for dev-vcs/cvs"
138 +}
139
140 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
141 new file mode 100644
142 index 0000000..9c9b49d
143 --- /dev/null
144 +++ b/dev-vcs/cvs/files/cvs-1.12.12-block-requests.patch
145 @@ -0,0 +1,140 @@
146 +Author: Robin H. Johnson <robbat2@g.o>
147 +Date: 2006-08-09
148 +
149 +This patch allows a CVS server to deny usage of specific commands, based on
150 +input in the environment.
151 +
152 +Just set the CVS_BLOCK_REQUESTS env var with all of the commands you want,
153 +seperated by spaces. Eg:
154 +CVS_BLOCK_REQUESTS="Gzip-stream gzip-file-contents"
155 +would block ALL usage of compression.
156 +
157 +Please see the array 'struct request requests[]' in src/server.c for a full
158 +list of commands.
159 +
160 +Please note that if you block any commands marked as RQ_ESSENTIAL, CVS clients
161 +may fail! (This includes 'ci'!).
162 +
163 +See the companion cvs-custom.c for a wrapper that can enforce the environment variable for pserver setups.
164 +
165 +Signed-off-by: Robin H. Johnson <robbat2@g.o>
166 +
167 +diff -Nuar --exclude '*~' -U 10 cvs-1.12.12.orig/src/server.c cvs-1.12.12/src/server.c
168 +--- cvs-1.12.12.orig/src/server.c 2005-04-14 14:13:29.000000000 +0000
169 ++++ cvs-1.12.12/src/server.c 2006-08-09 01:40:44.000000000 +0000
170 +@@ -5836,43 +5836,90 @@
171 + #undef REQ_LINE
172 + };
173 + #endif /* SERVER_SUPPORT or CLIENT_SUPPORT */
174 +
175 +
176 +
177 + #ifdef SERVER_SUPPORT
178 + /*
179 + * This server request is not ignored by the secondary.
180 + */
181 ++
182 ++/* Hack by Robin H. Johnson <robbat2@g.o>.
183 ++ * Allow the server ENV to specify what request types are to be ignored.
184 ++ */
185 ++
186 ++static char blocked_requests[BUFSIZ] = " ";
187 ++
188 ++static void build_blocked_requests() {
189 ++ char *tmp = getenv("CVS_BLOCK_REQUESTS");
190 ++
191 ++ if (tmp != NULL && strlen(tmp) > 0) {
192 ++ // move to our custom buffer
193 ++ strncat(blocked_requests, tmp, sizeof(blocked_requests)-strlen(blocked_requests));
194 ++ //add a space on the end as well for searching
195 ++ strncat(blocked_requests, " ", sizeof(blocked_requests)-strlen(blocked_requests));
196 ++ }
197 ++
198 ++ // now blocked_requests contains the list of every request that we do not
199 ++ // want to serve
200 ++}
201 ++
202 ++// returns 0 if we should serve this request
203 ++// use as if(checker(FOO)) continue;
204 ++static int serve_valid_requests_checker(char *reqname) {
205 ++ char needle[BUFSIZ] = " ";
206 ++ char *tmp;
207 ++
208 ++ if(!blocked_requests || strlen(blocked_requests) < 2)
209 ++ return 0;
210 ++
211 ++ // we want to look for ' 'reqname' '
212 ++ snprintf(needle, sizeof(needle), " %s ", reqname);
213 ++
214 ++ // now do the search
215 ++ tmp = strstr(blocked_requests, needle);
216 ++
217 ++ if (tmp != NULL)
218 ++ return 1;
219 ++
220 ++ return 0;
221 ++
222 ++}
223 ++
224 + static void
225 + serve_valid_requests (char *arg)
226 + {
227 + struct request *rq;
228 +
229 + /* Since this is processed in the first pass, don't reprocess it in the
230 + * second.
231 + *
232 + * We still print errors since new errors could have been generated in the
233 + * second pass.
234 + */
235 + if (print_pending_error ()
236 + #ifdef PROXY_SUPPORT
237 + || reprocessing
238 + #endif /* PROXY_SUPPORT */
239 + )
240 + return;
241 ++
242 ++ build_blocked_requests();
243 +
244 + buf_output0 (buf_to_net, "Valid-requests");
245 + for (rq = requests; rq->name != NULL; rq++)
246 + {
247 + if (rq->func != NULL)
248 + {
249 ++ if(serve_valid_requests_checker(rq->name))
250 ++ continue;
251 + buf_append_char (buf_to_net, ' ');
252 + buf_output0 (buf_to_net, rq->name);
253 + }
254 + }
255 + buf_output0 (buf_to_net, "\nok\n");
256 +
257 + /* The client is waiting for the list of valid requests, so we
258 + must send the output now. */
259 + buf_flush (buf_to_net, 1);
260 + }
261 +@@ -6353,20 +6400,24 @@
262 + cmd += len;
263 + else if (cmd[len] == ' ')
264 + cmd += len + 1;
265 + else
266 + /*
267 + * The first len characters match, but it's a different
268 + * command. e.g. the command is "cooperate" but we matched
269 + * "co".
270 + */
271 + continue;
272 ++ // Ignore commands that we are supposed to ignore.
273 ++ if(serve_valid_requests_checker(rq->name))
274 ++ continue;
275 ++
276 +
277 + if (!(rq->flags & RQ_ROOTLESS)
278 + && current_parsed_root == NULL)
279 + {
280 + /* For commands which change the way in which data
281 + is sent and received, for example Gzip-stream,
282 + this does the wrong thing. Since the client
283 + assumes that everything is being compressed,
284 + unconditionally, there is no way to give this
285 + error to the client without turning on
286
287 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
288 new file mode 100644
289 index 0000000..d7d6e6b
290 --- /dev/null
291 +++ b/dev-vcs/cvs/files/cvs-1.12.12-cvs-gnulib-vasnprintf.patch
292 @@ -0,0 +1,34 @@
293 +http://bugs.gentoo.org/213833
294 +
295 +commit 913c09becd9df89dbd9b9f386e7f35c240d5efe8
296 +Author: Bruno Haible <bruno@×××××.org>
297 +Date: Fri Oct 19 01:50:42 2007 +0200
298 +
299 + Don't use %n on glibc >= 2.3 systems.
300 +
301 +diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
302 +index f563823..5d818aa 100644
303 +--- a/lib/vasnprintf.c
304 ++++ b/lib/vasnprintf.c
305 +@@ -3385,9 +3385,21 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
306 + #endif
307 + *p = dp->conversion;
308 + #if USE_SNPRINTF
309 ++# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))
310 + p[1] = '%';
311 + p[2] = 'n';
312 + p[3] = '\0';
313 ++# else
314 ++ /* On glibc2 systems from glibc >= 2.3 - probably also older
315 ++ ones - we know that snprintf's returns value conforms to
316 ++ ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes.
317 ++ Therefore we can avoid using %n in this situation.
318 ++ On glibc2 systems from 2004-10-18 or newer, the use of %n
319 ++ in format strings in writable memory may crash the program
320 ++ (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
321 ++ in this situation. */
322 ++ p[1] = '\0';
323 ++# endif
324 + #else
325 + p[1] = '\0';
326 + #endif
327
328 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
329 new file mode 100644
330 index 0000000..fcd4431
331 --- /dev/null
332 +++ b/dev-vcs/cvs/files/cvs-1.12.12-cvsbug-tmpfix.patch
333 @@ -0,0 +1,22 @@
334 +Index: cvs-1.12.12/src/cvsbug.in
335 +===================================================================
336 +--- cvs-1.12.12.orig/src/cvsbug.in
337 ++++ cvs-1.12.12/src/cvsbug.in
338 +@@ -109,14 +109,14 @@ elif [ -f /bin/domainname ]; then
339 + /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" |
340 + cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
341 + ORIGINATOR="`cat $TEMP`"
342 +- rm -f $TEMP
343 ++ > $TEMP
344 + fi
345 + fi
346 +
347 + if [ "$ORIGINATOR" = "" ]; then
348 + grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
349 + ORIGINATOR="`cat $TEMP`"
350 +- rm -f $TEMP
351 ++ > $TEMP
352 + fi
353 +
354 + if [ -n "$ORGANIZATION" ]; then
355 +
356
357 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
358 new file mode 100644
359 index 0000000..825c0ee
360 --- /dev/null
361 +++ b/dev-vcs/cvs/files/cvs-1.12.12-install-sh.patch
362 @@ -0,0 +1,12 @@
363 +diff -ur a/build-aux/install-sh b/build-aux/install-sh
364 +--- a/build-aux/install-sh 2006-03-25 20:04:46 +0000
365 ++++ b/build-aux/install-sh 2007-09-14 10:53:29 +0100
366 +@@ -246,7 +246,7 @@
367 + fi
368 +
369 + if test -n "$dir_arg"; then
370 +- $doit $mkdircmd "$dst" \
371 ++ { test -d "$dst" || $doit $mkdircmd -p "$dst"; } \
372 + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
373 + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
374 + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
375
376 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
377 new file mode 100644
378 index 0000000..948fa4d
379 --- /dev/null
380 +++ b/dev-vcs/cvs/files/cvs-1.12.12-mktime-x32.patch
381 @@ -0,0 +1,29 @@
382 +back port changes from upstream gnulib to make this work on x32
383 +
384 +https://bugs.gentoo.org/395641
385 +
386 +--- cvs-1.12.12/lib/mktime.c
387 ++++ cvs-1.12.12/lib/mktime.c
388 +@@ -115,6 +115,13 @@
389 + #define TM_YEAR_BASE 1900
390 + verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0);
391 +
392 ++#if INT_MAX <= LONG_MAX / 2
393 ++typedef long int long_int;
394 ++#else
395 ++typedef long long int long_int;
396 ++#endif
397 ++verify (long_int_is_wide_enough, INT_MAX == INT_MAX * (long_int) 2 / 2);
398 ++
399 + /* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */
400 + static inline int
401 + leapyear (long int year)
402 +@@ -167,8 +174,6 @@
403 + int year0, int yday0, int hour0, int min0, int sec0)
404 + {
405 + verify (C99_integer_division, -1 / 2 == 0);
406 +- verify (long_int_year_and_yday_are_wide_enough,
407 +- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
408 +
409 + /* Compute intervening leap days correctly even if year is negative.
410 + Take care to avoid integer overflow here. */
411
412 diff --git a/dev-vcs/cvs/files/cvs-1.12.12-openat.patch b/dev-vcs/cvs/files/cvs-1.12.12-openat.patch
413 new file mode 100644
414 index 0000000..fdb406a
415 --- /dev/null
416 +++ b/dev-vcs/cvs/files/cvs-1.12.12-openat.patch
417 @@ -0,0 +1,21 @@
418 +Index: cvs-1.12.12/lib/openat.c
419 +===================================================================
420 +--- cvs-1.12.12.orig/lib/openat.c
421 ++++ cvs-1.12.12/lib/openat.c
422 +@@ -55,9 +55,13 @@ rpl_openat (int fd, char const *filename
423 + va_list arg;
424 + va_start (arg, flags);
425 +
426 +- /* Assume that mode_t is passed compatibly with mode_t's type
427 +- after argument promotion. */
428 +- mode = va_arg (arg, mode_t);
429 ++ /* If mode_t is narrower than int, use the promoted type (int),
430 ++ not mode_t. Use sizeof to guess whether mode_t is nerrower;
431 ++ we don't know of any practical counterexamples. */
432 ++ if (sizeof (mode_t) < sizeof (int))
433 ++ mode = va_arg (arg, int);
434 ++ else
435 ++ mode = va_arg (arg, mode_t);
436 +
437 + va_end (arg);
438 + }
439
440 diff --git a/dev-vcs/cvs/files/cvs-1.12.12-regex.patch b/dev-vcs/cvs/files/cvs-1.12.12-regex.patch
441 new file mode 100644
442 index 0000000..4e69953
443 --- /dev/null
444 +++ b/dev-vcs/cvs/files/cvs-1.12.12-regex.patch
445 @@ -0,0 +1,11 @@
446 +--- a/cvs-1.12.12/lib/regex.c
447 ++++ b/cvs-1.12.12/lib/regex.c
448 +@@ -8184,7 +8184,7 @@
449 + if (msg_size > errbuf_size)
450 + {
451 + #if defined HAVE_MEMPCPY || defined _LIBC
452 +- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
453 ++ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
454 + #else
455 + memcpy (errbuf, msg, errbuf_size - 1);
456 + errbuf[errbuf_size - 1] = 0;
457
458 diff --git a/dev-vcs/cvs/files/cvs.pam-include-1.12.12 b/dev-vcs/cvs/files/cvs.pam-include-1.12.12
459 new file mode 100644
460 index 0000000..f401ec0
461 --- /dev/null
462 +++ b/dev-vcs/cvs/files/cvs.pam-include-1.12.12
463 @@ -0,0 +1,4 @@
464 +#%PAM-1.0
465 +auth include system-auth
466 +account include system-auth
467 +session include system-auth
468
469 diff --git a/dev-vcs/cvs/files/cvspserver.xinetd.d b/dev-vcs/cvs/files/cvspserver.xinetd.d
470 new file mode 100644
471 index 0000000..0f2edb0
472 --- /dev/null
473 +++ b/dev-vcs/cvs/files/cvspserver.xinetd.d
474 @@ -0,0 +1,14 @@
475 +service cvspserver
476 +{
477 + disable = yes
478 + socket_type = stream
479 + wait = no
480 + user = root
481 + log_type = FILE /var/log/cvspserver
482 + protocol = tcp
483 + env = HOME=/var/cvsroot
484 + log_on_failure += USERID
485 + port = 2401
486 + server = /usr/bin/cvs
487 + server_args = -f --allow-root=/var/cvsroot pserver
488 +}
489
490 diff --git a/dev-vcs/cvs/metadata.xml b/dev-vcs/cvs/metadata.xml
491 new file mode 100644
492 index 0000000..4432750
493 --- /dev/null
494 +++ b/dev-vcs/cvs/metadata.xml
495 @@ -0,0 +1,8 @@
496 +<?xml version="1.0" encoding="UTF-8"?>
497 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
498 +<pkgmetadata>
499 + <herd>cvs-utils</herd>
500 + <use>
501 + <flag name="server">Enable server support</flag>
502 + </use>
503 +</pkgmetadata>