Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dialup/capifwd/, net-dialup/capifwd/files/
Date: Wed, 24 Aug 2016 22:58:05
Message-Id: 1472079359.dff98f77a0e4cca13fb400a169bf7bd48527c1b2.mjo@gentoo
1 commit: dff98f77a0e4cca13fb400a169bf7bd48527c1b2
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 24 22:55:37 2016 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 24 22:55:59 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dff98f77
7
8 net-dialup/capifwd: new revision sans eutils.eclass.
9
10 Now that the latest revision uses EAPI=6, the eutils eclass (no longer
11 needed) has been dropped. The autotools eclass looked like it could go
12 too, but the eautoreconf is actually present to fix a QA warning (not
13 because we patch e.g. configure.ac) so I added a comment to that
14 effect.
15
16 To make PATCHES work, I revisioned the two patches to be -p1
17 compatible. The src_prepare and src_install phases now take advantage
18 of "default" and are a tiny bit simpler.
19
20 Package-Manager: portage-2.2.28
21
22 ...fwd-0.6.3-r2.ebuild => capifwd-0.6.3-r3.ebuild} | 25 ++--
23 .../capifwd/files/capifwd-0.6.3-amd64-r1.patch | 136 +++++++++++++++++++++
24 net-dialup/capifwd/files/capifwd-0.6.3-r1.patch | 42 +++++++
25 3 files changed, 192 insertions(+), 11 deletions(-)
26
27 diff --git a/net-dialup/capifwd/capifwd-0.6.3-r2.ebuild b/net-dialup/capifwd/capifwd-0.6.3-r3.ebuild
28 similarity index 59%
29 rename from net-dialup/capifwd/capifwd-0.6.3-r2.ebuild
30 rename to net-dialup/capifwd/capifwd-0.6.3-r3.ebuild
31 index 621c061..26cdeea 100644
32 --- a/net-dialup/capifwd/capifwd-0.6.3-r2.ebuild
33 +++ b/net-dialup/capifwd/capifwd-0.6.3-r3.ebuild
34 @@ -4,7 +4,7 @@
35
36 EAPI=6
37
38 -inherit eutils autotools
39 +inherit autotools
40
41 DESCRIPTION="A daemon forwarding CAPI messages to capi20proxy clients"
42 HOMEPAGE="http://capi20proxy.sourceforge.net/"
43 @@ -19,24 +19,27 @@ DEPEND="net-dialup/capi4k-utils"
44
45 S="${WORKDIR}/linux-server"
46
47 +PATCHES=(
48 + "${FILESDIR}/${P}-r1.patch"
49 + "${FILESDIR}/${P}-amd64-r1.patch"
50 +)
51 +
52 src_prepare() {
53 - eapply -p0 "${FILESDIR}/${P}.patch"
54 - eapply -p0 "${FILESDIR}/${P}-amd64.patch"
55 + default
56
57 # Replace obsolete sys_errlist with strerror
58 sed -i -e 's:sys_errlist *\[ *errno *\]:strerror(errno):' \
59 - src/capifwd.c src/capi/waitforsignal.c src/auth/auth.c || \
60 - die "failed to replace sys_errlist"
61 + src/capifwd.c src/capi/waitforsignal.c src/auth/auth.c \
62 + || die 'failed to replace sys_errlist'
63
64 - eapply_user
65 + # We don't patch autotools, but it's already screwed up, so this
66 + # fixes a big QA warning.
67 eautoreconf
68 }
69
70 src_install() {
71 - emake DESTDIR="$D" install
72 - dodoc AUTHORS ChangeLog README
73 + default
74
75 - # install init-script
76 - newinitd "${FILESDIR}/capifwd.init" capifwd
77 - newconfd "${FILESDIR}/capifwd.conf" capifwd
78 + newinitd "${FILESDIR}/${PN}.init" "${PN}"
79 + newconfd "${FILESDIR}/${PN}.conf" "${PN}"
80 }
81
82 diff --git a/net-dialup/capifwd/files/capifwd-0.6.3-amd64-r1.patch b/net-dialup/capifwd/files/capifwd-0.6.3-amd64-r1.patch
83 new file mode 100644
84 index 00000000..eb2aefb
85 --- /dev/null
86 +++ b/net-dialup/capifwd/files/capifwd-0.6.3-amd64-r1.patch
87 @@ -0,0 +1,136 @@
88 +--- a/src/protocol.h 2002-10-30 16:16:06.000000000 +0100
89 ++++ b/src/protocol.h 2007-02-03 01:27:40.000000000 +0100
90 +@@ -53,6 +53,7 @@
91 + #ifndef __PROTOCOL_H__
92 + #define __PROTOCOL_H__
93 + #include <time.h>
94 ++#include <sys/types.h>
95 +
96 + // Operating System types
97 +
98 +@@ -109,20 +110,20 @@
99 + #define revision "$Revision: 1.1 $"
100 +
101 + struct __version_t {
102 +- unsigned long major; // major version for incompatible versions
103 +- unsigned long minor; // minor version for compatible versions
104 ++ uint32_t major; // major version for incompatible versions
105 ++ uint32_t minor; // minor version for compatible versions
106 + };
107 +
108 + // CLIENT REQUESTS //
109 + // protocol specific
110 + struct REQUEST_PROXY_HELO { // type number: 99
111 +- char name[64]; // name of the client (for logging)
112 +- int os; // operating system of the client
113 ++ uint8_t name[64]; // name of the client (for logging)
114 ++ uint32_t os; // operating system of the client
115 + struct __version_t version; // version of the client
116 + };
117 +
118 + struct REQUEST_PROXY_AUTH { // type number: 98
119 +- unsigned long auth_type; // authentication type desired
120 ++ uint32_t auth_type; // authentication type desired
121 + };
122 +
123 + struct REQUEST_PROXY_KEEPALIVE { // type number: 97
124 +@@ -171,11 +172,11 @@
125 +
126 + // protocol specific
127 + struct ANSWER_PROXY_HELO { // type number: 99
128 +- char name[64]; // some kind of name for the server (zero-terminated)
129 +- int os; // the operating system of the server
130 ++ int8_t name[64]; // some kind of name for the server (zero-terminated)
131 ++ int32_t os; // the operating system of the server
132 + struct __version_t version; // the version of the server
133 +- unsigned long auth_type; // the server tells the client which auth-methods it supports (each bit represents one method) !changed!
134 +- int timeout; // in seconds, -1 means no timeout
135 ++ int32_t auth_type; // the server tells the client which auth-methods it supports (each bit represents one method) !changed!
136 ++ int32_t timeout; // in seconds, -1 means no timeout
137 + };
138 +
139 + struct ANSWER_PROXY_AUTH { // type number: 98
140 +@@ -185,7 +186,7 @@
141 + };
142 +
143 + struct ANSWER_PROXY_SHUTDOWN { // type number: 96
144 +- char reason[128];
145 ++ int8_t reason[128];
146 + // z.B. "Ich muss dringend aufs Klo!"; :-)
147 + // no answer from the client expected
148 + };
149 +@@ -208,7 +209,7 @@
150 + };
151 +
152 + struct ANSWER_CAPI_MANUFACTURER { // type number: 6
153 +- char manufacturer[64];
154 ++ int8_t manufacturer[64];
155 + };
156 +
157 + struct ANSWER_CAPI_VERSION { // type number: 7
158 +@@ -217,11 +218,11 @@
159 + };
160 +
161 + struct ANSWER_CAPI_SERIAL { // type number: 8
162 +- char serial[8];
163 ++ int8_t serial[8];
164 + };
165 +
166 + struct ANSWER_CAPI_PROFILE { // type number: 9
167 +- char profile[64];
168 ++ int8_t profile[64];
169 + };
170 +
171 + struct ANSWER_CAPI_INSTALLED { // type number: 10
172 +@@ -229,30 +230,30 @@
173 +
174 +
175 + struct REQUEST_HEADER {
176 +- unsigned message_len;
177 +- unsigned header_len;
178 +- unsigned body_len;
179 +- unsigned data_len;
180 +-
181 +- unsigned message_id;
182 +- unsigned message_type;
183 +- unsigned long app_id; // must be long!
184 +- unsigned controller_id;
185 +- unsigned session_id;
186 ++ int32_t message_len;
187 ++ int32_t header_len;
188 ++ int32_t body_len;
189 ++ int32_t data_len;
190 ++
191 ++ int32_t message_id;
192 ++ int32_t message_type;
193 ++ int32_t app_id;
194 ++ int32_t controller_id;
195 ++ int32_t session_id;
196 + };
197 +
198 +
199 + struct ANSWER_HEADER {
200 +- unsigned message_len;
201 +- unsigned header_len;
202 +- unsigned body_len;
203 +- unsigned data_len;
204 +-
205 +- unsigned message_id;
206 +- unsigned message_type;
207 +- unsigned long app_id; // must be long!
208 +- unsigned session_id;
209 +- unsigned proxy_error;
210 +- unsigned long capi_error;
211 ++ int32_t message_len;
212 ++ int32_t header_len;
213 ++ int32_t body_len;
214 ++ int32_t data_len;
215 ++
216 ++ int32_t message_id;
217 ++ int32_t message_type;
218 ++ int32_t app_id;
219 ++ int32_t session_id;
220 ++ int32_t proxy_error;
221 ++ int32_t capi_error;
222 + };
223 + #endif
224
225 diff --git a/net-dialup/capifwd/files/capifwd-0.6.3-r1.patch b/net-dialup/capifwd/files/capifwd-0.6.3-r1.patch
226 new file mode 100644
227 index 00000000..9c875d5
228 --- /dev/null
229 +++ b/net-dialup/capifwd/files/capifwd-0.6.3-r1.patch
230 @@ -0,0 +1,42 @@
231 +--- a/src/config/cmdline.c.orig 2002-12-29 16:41:02.000000000 +0100
232 ++++ b/src/config/cmdline.c 2004-11-20 02:01:38.821706921 +0100
233 +@@ -57,17 +57,17 @@
234 + else if ( !strcmp("-v",argv[i]) || !strcmp("-h",argv[1]) ||
235 + !strcmp("--version", argv[1]) || !strcmp("--help", argv[i]) )
236 + {
237 +- printf("
238 +-%s version %s
239 +-Copyright (C) 2002: F. Lindenberg, A. Szalkowski
240 +-Usage:
241 +-\t%s [options]\n\n Where options is one of:
242 +--h --help or
243 +--v --version\tprint this info and quit.
244 +--f --file\tdefine the configuration file (makes no
245 +-\t\tsense without config file support).
246 +--p --port\tdefine the port number.
247 +-", _progname_long, _version, argv[0]);
248 ++ printf(
249 ++"%s version %s\n"
250 ++"Copyright (C) 2002: F. Lindenberg, A. Szalkowski\n"
251 ++"Usage:\n"
252 ++"\t%s [options]\n\n Where options is one of:\n"
253 ++"-h --help or\n"
254 ++"-v --version\tprint this info and quit.\n"
255 ++"-f --file\tdefine the configuration file (makes no\n"
256 ++"\t\tsense without config file support).\n"
257 ++"-p --port\tdefine the port number.\n\n",
258 ++_progname_long, _version, argv[0]);
259 + exit ( 0 );
260 + }
261 +
262 +--- a/src/capifwd.c.orig 2006-09-23 10:39:30.000000000 +0300
263 ++++ b/src/capifwd.c 2006-09-23 10:41:32.836443500 +0300
264 +@@ -13,7 +13,7 @@
265 + ssize_t n = recv(fd, buf, left, 0);
266 + if (n <= 0)
267 + return n;
268 +- (char*)buf += n;
269 ++ buf = (char*)buf + n;
270 + left -= n;
271 + }
272 + return size;