diff options
Diffstat (limited to 'meta/recipes-extended')
490 files changed, 30831 insertions, 0 deletions
diff --git a/meta/recipes-extended/at/at/atd.init b/meta/recipes-extended/at/at/atd.init new file mode 100644 index 0000000000..eca379b3cd --- /dev/null +++ b/meta/recipes-extended/at/at/atd.init | |||
@@ -0,0 +1,45 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Starts at daemon | ||
4 | # | ||
5 | |||
6 | umask 077 | ||
7 | |||
8 | # Source function library. | ||
9 | . /etc/init.d/functions | ||
10 | |||
11 | start() { | ||
12 | echo -n "Starting atd: " | ||
13 | start-stop-daemon --start --quiet --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f | ||
14 | echo "OK" | ||
15 | } | ||
16 | stop() { | ||
17 | echo -n "Stopping atd: " | ||
18 | start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid | ||
19 | echo "OK" | ||
20 | } | ||
21 | restart() { | ||
22 | stop | ||
23 | start | ||
24 | } | ||
25 | |||
26 | case "$1" in | ||
27 | start) | ||
28 | start | ||
29 | ;; | ||
30 | stop) | ||
31 | stop | ||
32 | ;; | ||
33 | restart|reload) | ||
34 | restart | ||
35 | ;; | ||
36 | status) | ||
37 | status /usr/sbin/atd | ||
38 | ;; | ||
39 | *) | ||
40 | echo $"Usage: $0 {start|stop|restart|status}" | ||
41 | exit 1 | ||
42 | esac | ||
43 | |||
44 | exit $? | ||
45 | |||
diff --git a/meta/recipes-extended/at/at/atd.service b/meta/recipes-extended/at/at/atd.service new file mode 100644 index 0000000000..6dc844504a --- /dev/null +++ b/meta/recipes-extended/at/at/atd.service | |||
@@ -0,0 +1,9 @@ | |||
1 | [Unit] | ||
2 | Description=Job spooling tools | ||
3 | After=syslog.target | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=@SBINDIR@/atd -f | ||
7 | |||
8 | [Install] | ||
9 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-extended/at/at/configure-add-enable-pam.patch b/meta/recipes-extended/at/at/configure-add-enable-pam.patch new file mode 100644 index 0000000000..1e5efef128 --- /dev/null +++ b/meta/recipes-extended/at/at/configure-add-enable-pam.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | --- at-3.1.12/configure.ac 2011-06-23 14:51:03.653572945 +0800 | ||
4 | +++ at-3.1.12/configure.ac.new 2011-06-27 16:12:14.903572945 +0800 | ||
5 | @@ -81,10 +81,18 @@ | ||
6 | AC_FUNC_VPRINTF | ||
7 | AC_FUNC_GETLOADAVG | ||
8 | AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid) | ||
9 | + | ||
10 | +AC_ARG_WITH([pam], | ||
11 | + [AS_HELP_STRING([--without-pam], [without PAM support])]) | ||
12 | + | ||
13 | +if test "x$with_pam" != xno; then | ||
14 | AC_CHECK_HEADERS(security/pam_appl.h, [ | ||
15 | PAMLIB="-lpam" | ||
16 | - AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support]) | ||
17 | -]) | ||
18 | + AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])], | ||
19 | + [if test "x$with_pam" = xyes; then | ||
20 | + AC_MSG_ERROR([PAM selected but security/pam_misc.h not found]) | ||
21 | + fi]) | ||
22 | +fi | ||
23 | |||
24 | dnl Checking for programs | ||
25 | |||
diff --git a/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch b/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch new file mode 100644 index 0000000000..d5ef0032be --- /dev/null +++ b/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Upstream-Status: Inappropriate [licensing] | ||
2 | |||
3 | posixtm.[ch] files are replaced with gplv2 version from these locations: | ||
4 | |||
5 | http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.c;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba | ||
6 | http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.h;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba | ||
7 | |||
8 | update the Copyright file information to reflect the replaced files. | ||
9 | |||
10 | Date: 2010/08/31 | ||
11 | Nitin A Kamble nitin.a.kamble@intel.com | ||
12 | |||
13 | Index: at-3.1.12/Copyright | ||
14 | =================================================================== | ||
15 | --- at-3.1.12.orig/Copyright | ||
16 | +++ at-3.1.12/Copyright | ||
17 | @@ -31,10 +31,10 @@ The files posixtm.c and posixtm.h have t | ||
18 | Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004, | ||
19 | 2005, 2006, 2007 Free Software Foundation Inc. | ||
20 | |||
21 | - This program is free software: you can redistribute it and/or modify | ||
22 | + This program is free software; you can redistribute it and/or modify | ||
23 | it under the terms of the GNU General Public License as published by | ||
24 | - the Free Software Foundation; either version 3 of the License, or | ||
25 | - (at your option) any later version. | ||
26 | + the Free Software Foundation; either version 2, or (at your option) | ||
27 | + any later version. | ||
28 | |||
29 | This program is distributed in the hope that it will be useful, | ||
30 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
diff --git a/meta/recipes-extended/at/at/fix_parallel_build_error.patch b/meta/recipes-extended/at/at/fix_parallel_build_error.patch new file mode 100644 index 0000000000..66ff3e1c11 --- /dev/null +++ b/meta/recipes-extended/at/at/fix_parallel_build_error.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | make -j was failing sometimesa like this | ||
2 | | ccache i586-poky-linux-gcc -march=i586 --sysroot=/home/nitin/build/build0/tmp/sysroots/i586-poky-linux -I. -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types -o atd atd.o daemon.o -lfl -lpam -Wl,-O1 -Wl,--as-needed | ||
3 | | parsetime.l:5:19: fatal error: y.tab.h: No such file or directory | ||
4 | | compilation terminated. | ||
5 | | make: *** [lex.yy.o] Error 1 | ||
6 | | make: *** Waiting for unfinished jobs.... | ||
7 | |||
8 | Fixed the issue by adding a dependency in the makefile. | ||
9 | Nitin <nitin.a.kamble@intel.com> | ||
10 | 2010/09/02 | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
15 | |||
16 | Index: at-3.1.12/Makefile.in | ||
17 | =================================================================== | ||
18 | --- at-3.1.12.orig/Makefile.in | ||
19 | +++ at-3.1.12/Makefile.in | ||
20 | @@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y | ||
21 | lex.yy.c: parsetime.l | ||
22 | $(LEX) -i parsetime.l | ||
23 | |||
24 | +parsetime.l: y.tab.h | ||
25 | + | ||
26 | atrun: atrun.in | ||
27 | configure | ||
28 | |||
diff --git a/meta/recipes-extended/at/at/pam.conf.patch b/meta/recipes-extended/at/at/pam.conf.patch new file mode 100644 index 0000000000..b5ceb9ae82 --- /dev/null +++ b/meta/recipes-extended/at/at/pam.conf.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | oe doesn't support "@include", use the concrete directive instead. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
6 | Index: at-3.1.15/pam.conf | ||
7 | =================================================================== | ||
8 | --- at-3.1.15.orig/pam.conf | ||
9 | +++ at-3.1.15/pam.conf | ||
10 | @@ -1,10 +1,11 @@ | ||
11 | # | ||
12 | # The PAM configuration file for the at daemon | ||
13 | # | ||
14 | + | ||
15 | +auth required pam_env.so | ||
16 | +auth include common-auth | ||
17 | +account include common-account | ||
18 | +session include common-session-noninteractive | ||
19 | +session required pam_limits.so | ||
20 | +session required pam_loginuid.so | ||
21 | |||
22 | -auth required pam_env.so | ||
23 | -@include common-auth | ||
24 | -@include common-account | ||
25 | -session required pam_loginuid.so | ||
26 | -@include common-session-noninteractive | ||
27 | -session required pam_limits.so | ||
diff --git a/meta/recipes-extended/at/at/posixtm.c b/meta/recipes-extended/at/at/posixtm.c new file mode 100644 index 0000000000..5514ba4fe2 --- /dev/null +++ b/meta/recipes-extended/at/at/posixtm.c | |||
@@ -0,0 +1,328 @@ | |||
1 | /* Parse dates for touch and date. | ||
2 | |||
3 | Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004, | ||
4 | 2005, 2006, 2007 Free Software Foundation Inc. | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2, or (at your option) | ||
9 | any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software Foundation, | ||
18 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | ||
19 | |||
20 | /* Yacc-based version written by Jim Kingdon and David MacKenzie. | ||
21 | Rewritten by Jim Meyering. */ | ||
22 | |||
23 | #include <config.h> | ||
24 | |||
25 | #include "posixtm.h" | ||
26 | |||
27 | #include <stdio.h> | ||
28 | #include <stdlib.h> | ||
29 | #include <sys/types.h> | ||
30 | #include <string.h> | ||
31 | |||
32 | #if USE_UNLOCKED_IO | ||
33 | # include "unlocked-io.h" | ||
34 | #endif | ||
35 | |||
36 | /* ISDIGIT differs from isdigit, as follows: | ||
37 | - Its arg may be any int or unsigned int; it need not be an unsigned char | ||
38 | or EOF. | ||
39 | - It's typically faster. | ||
40 | POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to | ||
41 | isdigit unless it's important to use the locale's definition | ||
42 | of `digit' even when the host does not conform to POSIX. */ | ||
43 | #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) | ||
44 | |||
45 | time_t mktime (); | ||
46 | |||
47 | /* | ||
48 | POSIX requires: | ||
49 | |||
50 | touch -t [[CC]YY]mmddhhmm[.ss] FILE... | ||
51 | 8, 10, or 12 digits, followed by optional .ss | ||
52 | (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS) | ||
53 | |||
54 | touch mmddhhmm[YY] FILE... (obsoleted by POSIX 1003.1-2001) | ||
55 | 8 or 10 digits, YY (if present) must be in the range 69-99 | ||
56 | (PDS_TRAILING_YEAR | PDS_PRE_2000) | ||
57 | |||
58 | date mmddhhmm[[CC]YY] | ||
59 | 8, 10, or 12 digits | ||
60 | (PDS_TRAILING_YEAR | PDS_CENTURY) | ||
61 | |||
62 | */ | ||
63 | |||
64 | static int | ||
65 | year (struct tm *tm, const int *digit_pair, size_t n, unsigned int syntax_bits) | ||
66 | { | ||
67 | switch (n) | ||
68 | { | ||
69 | case 1: | ||
70 | tm->tm_year = *digit_pair; | ||
71 | /* Deduce the century based on the year. | ||
72 | POSIX requires that 00-68 be interpreted as 2000-2068, | ||
73 | and that 69-99 be interpreted as 1969-1999. */ | ||
74 | if (digit_pair[0] <= 68) | ||
75 | { | ||
76 | if (syntax_bits & PDS_PRE_2000) | ||
77 | return 1; | ||
78 | tm->tm_year += 100; | ||
79 | } | ||
80 | break; | ||
81 | |||
82 | case 2: | ||
83 | if (! (syntax_bits & PDS_CENTURY)) | ||
84 | return 1; | ||
85 | tm->tm_year = digit_pair[0] * 100 + digit_pair[1] - 1900; | ||
86 | break; | ||
87 | |||
88 | case 0: | ||
89 | { | ||
90 | time_t now; | ||
91 | struct tm *tmp; | ||
92 | |||
93 | /* Use current year. */ | ||
94 | time (&now); | ||
95 | tmp = localtime (&now); | ||
96 | if (! tmp) | ||
97 | return 1; | ||
98 | tm->tm_year = tmp->tm_year; | ||
99 | } | ||
100 | break; | ||
101 | |||
102 | default: | ||
103 | abort (); | ||
104 | } | ||
105 | |||
106 | return 0; | ||
107 | } | ||
108 | |||
109 | static int | ||
110 | posix_time_parse (struct tm *tm, const char *s, unsigned int syntax_bits) | ||
111 | { | ||
112 | const char *dot = NULL; | ||
113 | int pair[6]; | ||
114 | int *p; | ||
115 | size_t i; | ||
116 | |||
117 | size_t s_len = strlen (s); | ||
118 | size_t len = (((syntax_bits & PDS_SECONDS) && (dot = strchr (s, '.'))) | ||
119 | ? (size_t) (dot - s) | ||
120 | : s_len); | ||
121 | |||
122 | if (len != 8 && len != 10 && len != 12) | ||
123 | return 1; | ||
124 | |||
125 | if (dot) | ||
126 | { | ||
127 | if (!(syntax_bits & PDS_SECONDS)) | ||
128 | return 1; | ||
129 | |||
130 | if (s_len - len != 3) | ||
131 | return 1; | ||
132 | } | ||
133 | |||
134 | for (i = 0; i < len; i++) | ||
135 | if (!ISDIGIT (s[i])) | ||
136 | return 1; | ||
137 | |||
138 | len /= 2; | ||
139 | for (i = 0; i < len; i++) | ||
140 | pair[i] = 10 * (s[2*i] - '0') + s[2*i + 1] - '0'; | ||
141 | |||
142 | p = pair; | ||
143 | if (syntax_bits & PDS_LEADING_YEAR) | ||
144 | { | ||
145 | if (year (tm, p, len - 4, syntax_bits)) | ||
146 | return 1; | ||
147 | p += len - 4; | ||
148 | len = 4; | ||
149 | } | ||
150 | |||
151 | /* Handle 8 digits worth of `MMDDhhmm'. */ | ||
152 | tm->tm_mon = *p++ - 1; | ||
153 | tm->tm_mday = *p++; | ||
154 | tm->tm_hour = *p++; | ||
155 | tm->tm_min = *p++; | ||
156 | len -= 4; | ||
157 | |||
158 | /* Handle any trailing year. */ | ||
159 | if (syntax_bits & PDS_TRAILING_YEAR) | ||
160 | { | ||
161 | if (year (tm, p, len, syntax_bits)) | ||
162 | return 1; | ||
163 | } | ||
164 | |||
165 | /* Handle seconds. */ | ||
166 | if (!dot) | ||
167 | { | ||
168 | tm->tm_sec = 0; | ||
169 | } | ||
170 | else | ||
171 | { | ||
172 | int seconds; | ||
173 | |||
174 | ++dot; | ||
175 | if (!ISDIGIT (dot[0]) || !ISDIGIT (dot[1])) | ||
176 | return 1; | ||
177 | seconds = 10 * (dot[0] - '0') + dot[1] - '0'; | ||
178 | |||
179 | tm->tm_sec = seconds; | ||
180 | } | ||
181 | |||
182 | return 0; | ||
183 | } | ||
184 | |||
185 | /* Parse a POSIX-style date, returning true if successful. */ | ||
186 | |||
187 | bool | ||
188 | posixtime (time_t *p, const char *s, unsigned int syntax_bits) | ||
189 | { | ||
190 | struct tm tm0 | ||
191 | #ifdef lint | ||
192 | /* Placate gcc-4's -Wuninitialized. | ||
193 | posix_time_parse fails to set all of tm0 only when it returns | ||
194 | nonzero (due to year() returning nonzero), and in that case, | ||
195 | this code doesn't use the tm0 at all. */ | ||
196 | = { 0, } | ||
197 | #endif | ||
198 | ; | ||
199 | struct tm tm1; | ||
200 | struct tm const *tm; | ||
201 | time_t t; | ||
202 | |||
203 | if (posix_time_parse (&tm0, s, syntax_bits)) | ||
204 | return false; | ||
205 | |||
206 | tm1 = tm0; | ||
207 | tm1.tm_isdst = -1; | ||
208 | t = mktime (&tm1); | ||
209 | |||
210 | if (t != (time_t) -1) | ||
211 | tm = &tm1; | ||
212 | else | ||
213 | { | ||
214 | /* mktime returns -1 for errors, but -1 is also a valid time_t | ||
215 | value. Check whether an error really occurred. */ | ||
216 | tm = localtime (&t); | ||
217 | if (! tm) | ||
218 | return false; | ||
219 | } | ||
220 | |||
221 | /* Reject dates like "September 31" and times like "25:61". */ | ||
222 | if ((tm0.tm_year ^ tm->tm_year) | ||
223 | | (tm0.tm_mon ^ tm->tm_mon) | ||
224 | | (tm0.tm_mday ^ tm->tm_mday) | ||
225 | | (tm0.tm_hour ^ tm->tm_hour) | ||
226 | | (tm0.tm_min ^ tm->tm_min) | ||
227 | | (tm0.tm_sec ^ tm->tm_sec)) | ||
228 | return false; | ||
229 | |||
230 | *p = t; | ||
231 | return true; | ||
232 | } | ||
233 | |||
234 | #ifdef TEST_POSIXTIME | ||
235 | /* | ||
236 | Test mainly with syntax_bits == 13 | ||
237 | (aka: (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS)) | ||
238 | |||
239 | This test data assumes Universal Time, e.g., TZ="UTC0". | ||
240 | |||
241 | This test data also assumes that time_t is signed and is at least | ||
242 | 39 bits wide, so that it can represent all years from 0000 through | ||
243 | 9999. A host with 32-bit signed time_t can represent only time | ||
244 | stamps in the range 1901-12-13 20:45:52 through 2038-01-18 | ||
245 | 03:14:07 UTC, assuming POSIX time_t with no leap seconds, so test | ||
246 | cases outside this range will not work on such a host. | ||
247 | |||
248 | Also, the first two lines of test data assume that the current | ||
249 | year is 2002. | ||
250 | |||
251 | BEGIN-DATA | ||
252 | 12131415.16 13 1039788916 Fri Dec 13 14:15:16 2002 | ||
253 | 12131415.16 13 1039788916 Fri Dec 13 14:15:16 2002 | ||
254 | 000001010000.00 13 -62167132800 Sun Jan 1 00:00:00 0000 | ||
255 | 190112132045.52 13 -2147483648 Fri Dec 13 20:45:52 1901 | ||
256 | 190112132045.53 13 -2147483647 Fri Dec 13 20:45:53 1901 | ||
257 | 190112132046.52 13 -2147483588 Fri Dec 13 20:46:52 1901 | ||
258 | 190112132145.52 13 -2147480048 Fri Dec 13 21:45:52 1901 | ||
259 | 190112142045.52 13 -2147397248 Sat Dec 14 20:45:52 1901 | ||
260 | 190201132045.52 13 -2144805248 Mon Jan 13 20:45:52 1902 | ||
261 | 196912312359.59 13 -1 Wed Dec 31 23:59:59 1969 | ||
262 | 197001010000.00 13 0 Thu Jan 1 00:00:00 1970 | ||
263 | 197001010000.01 13 1 Thu Jan 1 00:00:01 1970 | ||
264 | 197001010001.00 13 60 Thu Jan 1 00:01:00 1970 | ||
265 | 197001010100.00 13 3600 Thu Jan 1 01:00:00 1970 | ||
266 | 197001020000.00 13 86400 Fri Jan 2 00:00:00 1970 | ||
267 | 197002010000.00 13 2678400 Sun Feb 1 00:00:00 1970 | ||
268 | 197101010000.00 13 31536000 Fri Jan 1 00:00:00 1971 | ||
269 | 197001000000.00 13 * * | ||
270 | 197000010000.00 13 * * | ||
271 | 197001010000.60 13 * * | ||
272 | 197001010060.00 13 * * | ||
273 | 197001012400.00 13 * * | ||
274 | 197001320000.00 13 * * | ||
275 | 197013010000.00 13 * * | ||
276 | 203801190314.06 13 2147483646 Tue Jan 19 03:14:06 2038 | ||
277 | 203801190314.07 13 2147483647 Tue Jan 19 03:14:07 2038 | ||
278 | 203801190314.08 13 2147483648 Tue Jan 19 03:14:08 2038 | ||
279 | 999912312359.59 13 253402300799 Fri Dec 31 23:59:59 9999 | ||
280 | 1112131415 13 1323785700 Tue Dec 13 14:15:00 2011 | ||
281 | 1112131415.16 13 1323785716 Tue Dec 13 14:15:16 2011 | ||
282 | 201112131415.16 13 1323785716 Tue Dec 13 14:15:16 2011 | ||
283 | 191112131415.16 13 -1831974284 Wed Dec 13 14:15:16 1911 | ||
284 | 203712131415.16 13 2144326516 Sun Dec 13 14:15:16 2037 | ||
285 | 3712131415.16 13 2144326516 Sun Dec 13 14:15:16 2037 | ||
286 | 6812131415.16 13 3122633716 Thu Dec 13 14:15:16 2068 | ||
287 | 6912131415.16 13 -1590284 Sat Dec 13 14:15:16 1969 | ||
288 | 7012131415.16 13 29945716 Sun Dec 13 14:15:16 1970 | ||
289 | 1213141599 2 945094500 Mon Dec 13 14:15:00 1999 | ||
290 | 1213141500 2 976716900 Wed Dec 13 14:15:00 2000 | ||
291 | END-DATA | ||
292 | |||
293 | */ | ||
294 | |||
295 | # define MAX_BUFF_LEN 1024 | ||
296 | |||
297 | int | ||
298 | main (void) | ||
299 | { | ||
300 | char buff[MAX_BUFF_LEN + 1]; | ||
301 | |||
302 | buff[MAX_BUFF_LEN] = 0; | ||
303 | while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0]) | ||
304 | { | ||
305 | char time_str[MAX_BUFF_LEN]; | ||
306 | unsigned int syntax_bits; | ||
307 | time_t t; | ||
308 | if (sscanf (buff, "%s %u", time_str, &syntax_bits) != 2) | ||
309 | printf ("*\n"); | ||
310 | else | ||
311 | { | ||
312 | printf ("%-15s %2u ", time_str, syntax_bits); | ||
313 | if (posixtime (&t, time_str, syntax_bits)) | ||
314 | printf ("%12ld %s", (long int) t, ctime (&t)); | ||
315 | else | ||
316 | printf ("%12s %s", "*", "*\n"); | ||
317 | } | ||
318 | } | ||
319 | exit (0); | ||
320 | |||
321 | } | ||
322 | #endif | ||
323 | |||
324 | /* | ||
325 | Local Variables: | ||
326 | compile-command: "gcc -DTEST_POSIXTIME -g -O -Wall -W posixtm.c" | ||
327 | End: | ||
328 | */ | ||
diff --git a/meta/recipes-extended/at/at/posixtm.h b/meta/recipes-extended/at/at/posixtm.h new file mode 100644 index 0000000000..e91749d736 --- /dev/null +++ b/meta/recipes-extended/at/at/posixtm.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* Parse dates for touch and date. | ||
2 | |||
3 | Copyright (C) 1998, 2003, 2005, 2007 Free Software Foundation Inc. | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2, or (at your option) | ||
8 | any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software Foundation, | ||
17 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | ||
18 | |||
19 | /* Yacc-based version written by Jim Kingdon and David MacKenzie. | ||
20 | Rewritten by Jim Meyering. */ | ||
21 | |||
22 | #ifndef POSIXTM_H_ | ||
23 | # define POSIXTM_H_ | ||
24 | |||
25 | # include <stdbool.h> | ||
26 | # include <time.h> | ||
27 | |||
28 | /* POSIX Date Syntax flags. */ | ||
29 | # define PDS_LEADING_YEAR 1 | ||
30 | # define PDS_TRAILING_YEAR 2 | ||
31 | # define PDS_CENTURY 4 | ||
32 | # define PDS_SECONDS 8 | ||
33 | # define PDS_PRE_2000 16 | ||
34 | |||
35 | bool posixtime (time_t *p, const char *s, unsigned int syntax_bits); | ||
36 | |||
37 | #endif | ||
diff --git a/meta/recipes-extended/at/at_3.1.15.bb b/meta/recipes-extended/at/at_3.1.15.bb new file mode 100644 index 0000000000..0c37d6d912 --- /dev/null +++ b/meta/recipes-extended/at/at_3.1.15.bb | |||
@@ -0,0 +1,67 @@ | |||
1 | SUMMARY = "Delayed job execution and batch processing" | ||
2 | DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \ | ||
3 | the system load levels drop to a particular level." | ||
4 | SECTION = "base" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4" | ||
7 | DEPENDS = "flex flex-native \ | ||
8 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
9 | |||
10 | RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \ | ||
11 | " | ||
12 | |||
13 | PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits" | ||
14 | |||
15 | RCONFLICTS_${PN} = "atd" | ||
16 | RREPLACES_${PN} = "atd" | ||
17 | |||
18 | SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \ | ||
19 | file://fix_parallel_build_error.patch \ | ||
20 | file://posixtm.c \ | ||
21 | file://posixtm.h \ | ||
22 | file://file_replacement_with_gplv2.patch \ | ||
23 | file://atd.init \ | ||
24 | file://atd.service \ | ||
25 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" | ||
26 | |||
27 | PAM_SRC_URI = "file://pam.conf.patch \ | ||
28 | file://configure-add-enable-pam.patch" | ||
29 | |||
30 | SRC_URI[md5sum] = "f0f96db22e3a174b53ce4beeeb848839" | ||
31 | SRC_URI[sha256sum] = "03a84f5293d5a95ef4231b7faf5578f141f0c76a2b304dd655bc7e90e97bf7fc" | ||
32 | |||
33 | EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \ | ||
34 | --with-daemon_username=root \ | ||
35 | --with-daemon_groupname=root \ | ||
36 | --with-jobdir=/var/spool/at/jobs \ | ||
37 | --with-atspool=/var/spool/at/spool \ | ||
38 | ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} " | ||
39 | |||
40 | inherit autotools-brokensep systemd update-rc.d | ||
41 | |||
42 | INITSCRIPT_NAME = "atd" | ||
43 | INITSCRIPT_PARAMS = "defaults" | ||
44 | |||
45 | SYSTEMD_SERVICE_${PN} = "atd.service" | ||
46 | |||
47 | PARALLEL_MAKE = "" | ||
48 | |||
49 | do_compile_prepend () { | ||
50 | cp -f ${WORKDIR}/posixtm.[ch] ${S} | ||
51 | } | ||
52 | |||
53 | do_install () { | ||
54 | oe_runmake -e "IROOT=${D}" install | ||
55 | |||
56 | install -d ${D}${sysconfdir}/init.d | ||
57 | install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd | ||
58 | |||
59 | # install systemd unit files | ||
60 | install -d ${D}${systemd_unitdir}/system | ||
61 | install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system | ||
62 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service | ||
63 | |||
64 | if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then | ||
65 | install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd | ||
66 | fi | ||
67 | } | ||
diff --git a/meta/recipes-extended/augeas/augeas.inc b/meta/recipes-extended/augeas/augeas.inc new file mode 100644 index 0000000000..ac25326813 --- /dev/null +++ b/meta/recipes-extended/augeas/augeas.inc | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "Augeas configuration API" | ||
2 | HOMEPAGE = "http://augeas.net/" | ||
3 | BUGTRACKER = "https://fedorahosted.org/augeas/report/1" | ||
4 | |||
5 | LICENSE = "LGPLv2.1+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff" | ||
7 | |||
8 | SRC_URI = "http://download.augeas.net/${BP}.tar.gz \ | ||
9 | file://add-missing-argz-conditional.patch \ | ||
10 | file://sepbuildfix.patch \ | ||
11 | " | ||
12 | |||
13 | DEPENDS = "readline libxml2" | ||
14 | |||
15 | inherit autotools pkgconfig | ||
16 | |||
17 | PACKAGES =+ "${PN}-lenses lib${BPN} lib${BPN}-dev lib${BPN}-staticdev lib${BPN}-dbg" | ||
18 | |||
19 | FILES_${PN}-lenses = "${datadir}/augeas/lenses" | ||
20 | FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}" | ||
21 | FILES_lib${BPN}-dev = "${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${includedir} ${libdir}/pkgconfig" | ||
22 | FILES_lib${BPN}-staticdev = "${libdir}/*.a" | ||
23 | FILES_lib${BPN}-dbg = "${libdir}/.debug" | ||
24 | |||
25 | RDEPENDS_lib${BPN} += "${PN}-lenses" | ||
26 | RRECOMMENDS_lib${BPN} += "${PN}" | ||
27 | |||
28 | LEAD_SONAME = "libaugeas.so" | ||
29 | |||
30 | do_install_append() { | ||
31 | rm -fr ${D}${datadir}/vim | ||
32 | } | ||
diff --git a/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch b/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch new file mode 100644 index 0000000000..abbdbaa63b --- /dev/null +++ b/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Add missing GL_GENERATE_ARGZ_H conditional | ||
2 | |||
3 | - GL_GENERATE_ARGZ_H is used in gnulib/lib/Makefile.am | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | Signed-off-by: Constantin Musca <constantinx.musca@intel.com> | ||
7 | |||
8 | Index: augeas-1.0.0/configure.ac | ||
9 | =================================================================== | ||
10 | --- augeas-1.0.0.orig/configure.ac | ||
11 | +++ augeas-1.0.0/configure.ac | ||
12 | @@ -55,6 +55,8 @@ AC_ARG_WITH([failmalloc], | ||
13 | |||
14 | AM_CONDITIONAL([WITH_FAILMALLOC], [test x$with_failmalloc != xno]) | ||
15 | |||
16 | +AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"]) | ||
17 | + | ||
18 | dnl --enable-debug=(yes|no) | ||
19 | AC_ARG_ENABLE([debug], | ||
20 | [AC_HELP_STRING([--enable-debug=no/yes], | ||
diff --git a/meta/recipes-extended/augeas/augeas/sepbuildfix.patch b/meta/recipes-extended/augeas/augeas/sepbuildfix.patch new file mode 100644 index 0000000000..b82a3ee2cb --- /dev/null +++ b/meta/recipes-extended/augeas/augeas/sepbuildfix.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Ensure that builds in separate builddirs (${B} != ${S}) correctly install the | ||
2 | lenses files. | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | |||
6 | RP 2013/4/17 | ||
7 | |||
8 | Index: augeas-1.0.0/Makefile.am | ||
9 | =================================================================== | ||
10 | --- augeas-1.0.0.orig/Makefile.am 2012-11-02 15:20:11.000000000 +0000 | ||
11 | +++ augeas-1.0.0/Makefile.am 2013-04-17 10:36:24.033400125 +0000 | ||
12 | @@ -5,8 +5,8 @@ | ||
13 | lensdir=$(datadir)/augeas/lenses/dist | ||
14 | lenstestdir=$(datadir)/augeas/lenses/dist/tests | ||
15 | |||
16 | -dist_lens_DATA=$(wildcard lenses/*.aug) | ||
17 | -dist_lenstest_DATA=$(wildcard lenses/tests/*.aug) | ||
18 | +dist_lens_DATA=$(wildcard $(top_srcdir)/lenses/*.aug) | ||
19 | +dist_lenstest_DATA=$(wildcard $(top_srcdir)lenses/tests/*.aug) | ||
20 | |||
21 | EXTRA_DIST=augeas.spec build/aux/move-if-change Makefile.am HACKING | ||
22 | |||
diff --git a/meta/recipes-extended/augeas/augeas_1.2.0.bb b/meta/recipes-extended/augeas/augeas_1.2.0.bb new file mode 100644 index 0000000000..67b3941395 --- /dev/null +++ b/meta/recipes-extended/augeas/augeas_1.2.0.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require augeas.inc | ||
2 | |||
3 | |||
4 | SRC_URI[md5sum] = "dce2f52cbd20f72c7da48e014ad48076" | ||
5 | SRC_URI[sha256sum] = "f4aeb28ebe0b0921920fe1c9b4c016739c25261a15de04cb97db02d669f481e0" | ||
diff --git a/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch b/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch new file mode 100644 index 0000000000..91341ee696 --- /dev/null +++ b/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | Add 'ptest' target to Makefile, to run tests without checking dependencies. | ||
2 | |||
3 | Signed-off-by: Anders Roxell <anders.roxell@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | --- | ||
6 | diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in | ||
7 | --- bash-3.2.48/Makefile.in.orig 2006-08-17 23:03:35.000000000 +0500 | ||
8 | +++ bash-3.2.48/Makefile.in 2013-07-02 20:20:07.512709327 +0500 | ||
9 | @@ -803,17 +803,31 @@ | ||
10 | fi | ||
11 | |||
12 | recho$(EXEEXT): $(SUPPORT_SRC)recho.c | ||
13 | - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} | ||
14 | + @$(CC) $(CCFLAGS) -o $@ $< | ||
15 | |||
16 | zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c | ||
17 | - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} | ||
18 | + @$(CC) $(CCFLAGS) -o $@ $< | ||
19 | |||
20 | printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c | ||
21 | - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} | ||
22 | + @$(CC) $(CCFLAGS) -o $@ $< | ||
23 | |||
24 | -test tests check: force $(Program) $(TESTS_SUPPORT) | ||
25 | +test tests check: | ||
26 | + @$(MAKE) install-test | ||
27 | + @$(MAKE) runtest | ||
28 | + | ||
29 | +install-test: buildtest | ||
30 | +ifeq ($(origin INSTALL_TEST_DIR), undefined) | ||
31 | @-test -d tests || mkdir tests | ||
32 | @cp $(TESTS_SUPPORT) tests | ||
33 | +else | ||
34 | + @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR) | ||
35 | + @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/ | ||
36 | + @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR) | ||
37 | +endif | ||
38 | + | ||
39 | +buildtest: force $(Program) $(TESTS_SUPPORT) | ||
40 | + | ||
41 | +runtest: | ||
42 | @( cd $(srcdir)/tests && \ | ||
43 | PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) | ||
44 | |||
diff --git a/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch new file mode 100644 index 0000000000..c4229a7ed9 --- /dev/null +++ b/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by | ||
2 | the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers | ||
3 | use the STRING() macro from unistd.h. A header in the bash sources overrides | ||
4 | the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the | ||
5 | wrappers to generate calls to 'xread' and 'xopen', which do not exist, | ||
6 | resulting in a failure to link. | ||
7 | |||
8 | Assume we have stringize support when cross-compiling, which works around the | ||
9 | issue. | ||
10 | |||
11 | It may be best for upstream to either give up on supporting compilers without | ||
12 | stringize support, or to not define STRING() at all when FORTIFY_SOURCES is | ||
13 | defined, letting the unistd.h one be used, instead. | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | |||
17 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> | ||
18 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
19 | |||
20 | --- bash-4.2.orig/builtins/mkbuiltins.c | ||
21 | +++ bash-4.2/builtins/mkbuiltins.c | ||
22 | @@ -28,6 +28,7 @@ | ||
23 | # define HAVE_STDLIB_H | ||
24 | |||
25 | # define HAVE_RENAME | ||
26 | +# define HAVE_STRINGIZE | ||
27 | #endif /* CROSS_COMPILING */ | ||
28 | |||
29 | #if defined (HAVE_UNISTD_H) | ||
diff --git a/meta/recipes-extended/bash/bash-3.2.48/run-ptest b/meta/recipes-extended/bash/bash-3.2.48/run-ptest new file mode 100644 index 0000000000..8dd3b9981d --- /dev/null +++ b/meta/recipes-extended/bash/bash-3.2.48/run-ptest | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | make -k THIS_SH=/bin/bash BUILD_DIR=. runtest | ||
diff --git a/meta/recipes-extended/bash/bash-3.2.48/test-output.patch b/meta/recipes-extended/bash/bash-3.2.48/test-output.patch new file mode 100644 index 0000000000..2b09b7d977 --- /dev/null +++ b/meta/recipes-extended/bash/bash-3.2.48/test-output.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Add FAIL/PASS output to test output. | ||
2 | |||
3 | Signed-off-by: Björn Stenberg <bjst@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | --- | ||
6 | diff -uNr a/tests/run-all b/tests/run-all | ||
7 | --- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200 | ||
8 | +++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200 | ||
9 | @@ -22,7 +22,15 @@ | ||
10 | case $x in | ||
11 | $0|run-minimal|run-gprof) ;; | ||
12 | *.orig|*~) ;; | ||
13 | - *) echo $x ; sh $x ;; | ||
14 | + *) echo $x | ||
15 | + output=`sh $x` | ||
16 | + if [ -n "$output" ]; then | ||
17 | + echo "$output" | ||
18 | + echo "FAIL: $x" | ||
19 | + else | ||
20 | + echo "PASS: $x" | ||
21 | + fi | ||
22 | + ;; | ||
23 | esac | ||
24 | done | ||
25 | |||
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc new file mode 100644 index 0000000000..d35d25cc92 --- /dev/null +++ b/meta/recipes-extended/bash/bash.inc | |||
@@ -0,0 +1,58 @@ | |||
1 | SUMMARY = "An sh-compatible command language interpreter" | ||
2 | HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html" | ||
3 | SECTION = "base/shell" | ||
4 | |||
5 | DEPENDS = "ncurses bison-native" | ||
6 | |||
7 | inherit autotools-brokensep gettext texinfo update-alternatives ptest | ||
8 | |||
9 | PARALLEL_MAKE = "" | ||
10 | |||
11 | EXTRA_OECONF = "--enable-job-control" | ||
12 | |||
13 | ALTERNATIVE_${PN} = "sh" | ||
14 | ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" | ||
15 | ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash" | ||
16 | ALTERNATIVE_PRIORITY = "100" | ||
17 | |||
18 | export AUTOHEADER = "true" | ||
19 | |||
20 | RDEPENDS_${PN} += "base-files" | ||
21 | RDEPENDS_${PN}_class-nativesdk = "" | ||
22 | RDEPENDS_${PN}-ptest += "make" | ||
23 | |||
24 | do_configure_prepend () { | ||
25 | if [ ! -e ${S}/acinclude.m4 ]; then | ||
26 | cat ${S}/aclocal.m4 > ${S}/acinclude.m4 | ||
27 | fi | ||
28 | } | ||
29 | |||
30 | do_compile_ptest () { | ||
31 | oe_runmake buildtest | ||
32 | } | ||
33 | |||
34 | do_install_append () { | ||
35 | # Move /usr/bin/bash to /bin/bash, if need | ||
36 | if [ "${base_bindir}" != "${bindir}" ]; then | ||
37 | mkdir -p ${D}${base_bindir} | ||
38 | mv ${D}${bindir}/bash ${D}${base_bindir} | ||
39 | fi | ||
40 | } | ||
41 | do_install_append_class-target () { | ||
42 | # Clean host path in bashbug | ||
43 | sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug | ||
44 | } | ||
45 | |||
46 | do_install_ptest () { | ||
47 | make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test | ||
48 | cp ${B}/Makefile ${D}${PTEST_PATH} | ||
49 | sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile | ||
50 | } | ||
51 | |||
52 | pkg_postinst_${PN} () { | ||
53 | grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells | ||
54 | } | ||
55 | |||
56 | pkg_postrm_${PN} () { | ||
57 | printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells | ||
58 | } | ||
diff --git a/meta/recipes-extended/bash/bash/build-tests.patch b/meta/recipes-extended/bash/bash/build-tests.patch new file mode 100644 index 0000000000..73a81b60da --- /dev/null +++ b/meta/recipes-extended/bash/bash/build-tests.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | Add 'ptest' target to Makefile, to run tests without checking dependencies. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Anders Roxell <anders.roxell@enea.com> | ||
5 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
6 | --- | ||
7 | Makefile.in | 24 +++++++++++++++++++----- | ||
8 | 1 file changed, 19 insertions(+), 5 deletions(-) | ||
9 | |||
10 | diff --git a/Makefile.in b/Makefile.in | ||
11 | --- a/Makefile.in | ||
12 | +++ b/Makefile.in | ||
13 | @@ -848,20 +848,34 @@ maybe-clean: | ||
14 | fi | ||
15 | |||
16 | recho$(EXEEXT): $(SUPPORT_SRC)recho.c | ||
17 | - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} | ||
18 | + @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< | ||
19 | |||
20 | zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c | ||
21 | - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} | ||
22 | + @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< | ||
23 | |||
24 | printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c | ||
25 | - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} | ||
26 | + @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< | ||
27 | |||
28 | xcase$(EXEEXT): $(SUPPORT_SRC)xcase.c | ||
29 | - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)xcase.c ${LIBS_FOR_BUILD} | ||
30 | + @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< | ||
31 | |||
32 | -test tests check: force $(Program) $(TESTS_SUPPORT) | ||
33 | +test tests check: | ||
34 | + @$(MAKE) install-test | ||
35 | + @$(MAKE) runtest | ||
36 | + | ||
37 | +install-test: buildtest | ||
38 | +ifeq ($(origin INSTALL_TEST_DIR), undefined) | ||
39 | @-test -d tests || mkdir tests | ||
40 | @cp $(TESTS_SUPPORT) tests | ||
41 | +else | ||
42 | + @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR) | ||
43 | + @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/ | ||
44 | + @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR) | ||
45 | +endif | ||
46 | + | ||
47 | +buildtest: force $(Program) $(TESTS_SUPPORT) | ||
48 | + | ||
49 | +runtest: | ||
50 | @( cd $(srcdir)/tests && \ | ||
51 | PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) | ||
52 | |||
53 | -- | ||
54 | 1.8.1.2 | ||
55 | |||
diff --git a/meta/recipes-extended/bash/bash/execute_cmd.patch b/meta/recipes-extended/bash/bash/execute_cmd.patch new file mode 100644 index 0000000000..81f8f0a9cd --- /dev/null +++ b/meta/recipes-extended/bash/bash/execute_cmd.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | --- execute_cmd.c.orig Fri Jun 3 13:34:42 2011 | ||
4 | +++ execute_cmd.c Fri Jun 3 13:36:41 2011 | ||
5 | @@ -2202,7 +2202,11 @@ | ||
6 | /* If the `lastpipe' option is set with shopt, and job control is not | ||
7 | enabled, execute the last element of non-async pipelines in the | ||
8 | current shell environment. */ | ||
9 | - if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) | ||
10 | + if (lastpipe_opt && | ||
11 | +#if defined(JOB_CONTROL) | ||
12 | + job_control == 0 && | ||
13 | +#endif | ||
14 | + asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) | ||
15 | { | ||
16 | lstdin = move_to_high_fd (0, 0, 255); | ||
17 | if (lstdin > 0) | ||
diff --git a/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch new file mode 100644 index 0000000000..a9391d6cac --- /dev/null +++ b/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by | ||
2 | the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers | ||
3 | use the STRING() macro from unistd.h. A header in the bash sources overrides | ||
4 | the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the | ||
5 | wrappers to generate calls to 'xread' and 'xopen', which do not exist, | ||
6 | resulting in a failure to link. | ||
7 | |||
8 | Assume we have stringize support when cross-compiling, which works around the | ||
9 | issue. | ||
10 | |||
11 | It may be best for upstream to either give up on supporting compilers without | ||
12 | stringize support, or to not define STRING() at all when FORTIFY_SOURCES is | ||
13 | defined, letting the unistd.h one be used, instead. | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | |||
17 | --- bash-4.2.orig/builtins/mkbuiltins.c | ||
18 | +++ bash-4.2/builtins/mkbuiltins.c | ||
19 | @@ -28,6 +28,7 @@ | ||
20 | # define HAVE_STDLIB_H | ||
21 | |||
22 | # define HAVE_RENAME | ||
23 | +# define HAVE_STRINGIZE | ||
24 | #endif /* CROSS_COMPILING */ | ||
25 | |||
26 | #if defined (HAVE_UNISTD_H) | ||
diff --git a/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest new file mode 100644 index 0000000000..8dd3b9981d --- /dev/null +++ b/meta/recipes-extended/bash/bash/run-ptest | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | make -k THIS_SH=/bin/bash BUILD_DIR=. runtest | ||
diff --git a/meta/recipes-extended/bash/bash/test-output.patch b/meta/recipes-extended/bash/bash/test-output.patch new file mode 100644 index 0000000000..2b09b7d977 --- /dev/null +++ b/meta/recipes-extended/bash/bash/test-output.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Add FAIL/PASS output to test output. | ||
2 | |||
3 | Signed-off-by: Björn Stenberg <bjst@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | --- | ||
6 | diff -uNr a/tests/run-all b/tests/run-all | ||
7 | --- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200 | ||
8 | +++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200 | ||
9 | @@ -22,7 +22,15 @@ | ||
10 | case $x in | ||
11 | $0|run-minimal|run-gprof) ;; | ||
12 | *.orig|*~) ;; | ||
13 | - *) echo $x ; sh $x ;; | ||
14 | + *) echo $x | ||
15 | + output=`sh $x` | ||
16 | + if [ -n "$output" ]; then | ||
17 | + echo "$output" | ||
18 | + echo "FAIL: $x" | ||
19 | + else | ||
20 | + echo "PASS: $x" | ||
21 | + fi | ||
22 | + ;; | ||
23 | esac | ||
24 | done | ||
25 | |||
diff --git a/meta/recipes-extended/bash/bash_3.2.48.bb b/meta/recipes-extended/bash/bash_3.2.48.bb new file mode 100644 index 0000000000..35e624bb8b --- /dev/null +++ b/meta/recipes-extended/bash/bash_3.2.48.bb | |||
@@ -0,0 +1,43 @@ | |||
1 | require bash.inc | ||
2 | |||
3 | LICENSE = "GPLv2+" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a" | ||
5 | |||
6 | PR = "r11" | ||
7 | |||
8 | SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \ | ||
9 | ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch049 \ | ||
10 | ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch050 \ | ||
11 | ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch051 \ | ||
12 | ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-052;apply=yes;striplevel=0;name=patch052 \ | ||
13 | ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-053;apply=yes;striplevel=0;name=patch053 \ | ||
14 | ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-054;apply=yes;striplevel=0;name=patch054 \ | ||
15 | ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-055;apply=yes;striplevel=0;name=patch055 \ | ||
16 | ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-056;apply=yes;striplevel=0;name=patch056 \ | ||
17 | ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-057;apply=yes;striplevel=0;name=patch057 \ | ||
18 | file://mkbuiltins_have_stringize.patch \ | ||
19 | file://build-tests.patch \ | ||
20 | file://test-output.patch \ | ||
21 | file://run-ptest \ | ||
22 | " | ||
23 | |||
24 | SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8" | ||
25 | SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348" | ||
26 | SRC_URI[patch049.md5sum] = "af571a2d164d5abdcae4499e94e8892c" | ||
27 | SRC_URI[patch049.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f" | ||
28 | SRC_URI[patch050.md5sum] = "8443d4385d73ec835abe401d90591377" | ||
29 | SRC_URI[patch050.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642" | ||
30 | SRC_URI[patch051.md5sum] = "15c6653042e9814aa87120098fc7a849" | ||
31 | SRC_URI[patch051.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef" | ||
32 | SRC_URI[patch052.md5sum] = "691023a944bbb9003cc92ad462d91fa1" | ||
33 | SRC_URI[patch052.sha256sum] = "a0eccf9ceda50871db10d21efdd74b99e35efbd55c970c400eeade012816bb61" | ||
34 | SRC_URI[patch053.md5sum] = "eb97d1c9230a55283d9dac69d3de2e46" | ||
35 | SRC_URI[patch053.sha256sum] = "fe6f0e96e0b966eaed9fb5e930ca12891f4380f30f9e0a773d200ff2063a864e" | ||
36 | SRC_URI[patch054.md5sum] = "1107744058c43b247f597584b88ba0a6" | ||
37 | SRC_URI[patch054.sha256sum] = "c6dab911e85688c542ce75afc175dbb4e5011de5102758e19a4a80dac1e79359" | ||
38 | SRC_URI[patch055.md5sum] = "05d201176d3499e2dfa4a73d09d42f05" | ||
39 | SRC_URI[patch055.sha256sum] = "c0e816700837942ed548da74e5917f74b70cbbbb10c9f2caf73e8e06a0713d0a" | ||
40 | SRC_URI[patch056.md5sum] = "222eaa3a2c26f54a15aa5e08817a534a" | ||
41 | SRC_URI[patch056.sha256sum] = "063a8d8d74e4407bf07a32b965b8ef6d213a66abdb6af26cc3584a437a56bbb4" | ||
42 | SRC_URI[patch057.md5sum] = "47d98e3e042892495c5efe54ec6e5913" | ||
43 | SRC_URI[patch057.sha256sum] = "5fc689394d515990f5ea74e2df765fc6e5e42ca44b4591b2c6f9be4b0cadf0f0" | ||
diff --git a/meta/recipes-extended/bash/bash_4.3.bb b/meta/recipes-extended/bash/bash_4.3.bb new file mode 100644 index 0000000000..54f21017db --- /dev/null +++ b/meta/recipes-extended/bash/bash_4.3.bb | |||
@@ -0,0 +1,109 @@ | |||
1 | require bash.inc | ||
2 | |||
3 | # GPLv2+ (< 4.0), GPLv3+ (>= 4.0) | ||
4 | LICENSE = "GPLv3+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
6 | |||
7 | SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \ | ||
8 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-001;apply=yes;striplevel=0;name=patch001 \ | ||
9 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-002;apply=yes;striplevel=0;name=patch002 \ | ||
10 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-003;apply=yes;striplevel=0;name=patch003 \ | ||
11 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-004;apply=yes;striplevel=0;name=patch004 \ | ||
12 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-005;apply=yes;striplevel=0;name=patch005 \ | ||
13 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-006;apply=yes;striplevel=0;name=patch006 \ | ||
14 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-007;apply=yes;striplevel=0;name=patch007 \ | ||
15 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-008;apply=yes;striplevel=0;name=patch008 \ | ||
16 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-009;apply=yes;striplevel=0;name=patch009 \ | ||
17 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-010;apply=yes;striplevel=0;name=patch010 \ | ||
18 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-011;apply=yes;striplevel=0;name=patch011 \ | ||
19 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-012;apply=yes;striplevel=0;name=patch012 \ | ||
20 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-013;apply=yes;striplevel=0;name=patch013 \ | ||
21 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-014;apply=yes;striplevel=0;name=patch014 \ | ||
22 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-015;apply=yes;striplevel=0;name=patch015 \ | ||
23 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-016;apply=yes;striplevel=0;name=patch016 \ | ||
24 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-017;apply=yes;striplevel=0;name=patch017 \ | ||
25 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-018;apply=yes;striplevel=0;name=patch018 \ | ||
26 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-019;apply=yes;striplevel=0;name=patch019 \ | ||
27 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-020;apply=yes;striplevel=0;name=patch020 \ | ||
28 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-021;apply=yes;striplevel=0;name=patch021 \ | ||
29 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-022;apply=yes;striplevel=0;name=patch022 \ | ||
30 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-023;apply=yes;striplevel=0;name=patch023 \ | ||
31 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-024;apply=yes;striplevel=0;name=patch024 \ | ||
32 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-025;apply=yes;striplevel=0;name=patch025 \ | ||
33 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-026;apply=yes;striplevel=0;name=patch026 \ | ||
34 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-027;apply=yes;striplevel=0;name=patch027 \ | ||
35 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-028;apply=yes;striplevel=0;name=patch028 \ | ||
36 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-029;apply=yes;striplevel=0;name=patch029 \ | ||
37 | ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-030;apply=yes;striplevel=0;name=patch030 \ | ||
38 | file://execute_cmd.patch;striplevel=0 \ | ||
39 | file://mkbuiltins_have_stringize.patch \ | ||
40 | file://build-tests.patch \ | ||
41 | file://test-output.patch \ | ||
42 | file://run-ptest \ | ||
43 | " | ||
44 | |||
45 | SRC_URI[tarball.md5sum] = "81348932d5da294953e15d4814c74dd1" | ||
46 | SRC_URI[tarball.sha256sum] = "afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4" | ||
47 | |||
48 | SRC_URI[patch001.md5sum] = "1ab682b4e36afa4cf1b426aa7ac81c0d" | ||
49 | SRC_URI[patch001.sha256sum] = "ecb3dff2648667513e31554b3ad054ccd89fce38e33367c9459ac3a285153742" | ||
50 | SRC_URI[patch002.md5sum] = "8fc22cf50ec85da00f6af3d66f7ddc1b" | ||
51 | SRC_URI[patch002.sha256sum] = "eee7cd7062ab29a9e4f02924d9c367264dcb8b162703f74ff6eb8f175a91502b" | ||
52 | SRC_URI[patch003.md5sum] = "a41728eca78858758e26b5dea64ae506" | ||
53 | SRC_URI[patch003.sha256sum] = "000e6eac50cd9053ce0630db01239dcdead04a2c2c351c47e2b51dac1ac1087d" | ||
54 | SRC_URI[patch004.md5sum] = "bf8d53d227829d67235927689a03cc7a" | ||
55 | SRC_URI[patch004.sha256sum] = "5ea0a42c6506720d26e6d3c5c358e9a0d49f6f189d69a8ed34d5935964821338" | ||
56 | SRC_URI[patch005.md5sum] = "c0c00935c8b8ffff76e8ab77e7be7d15" | ||
57 | SRC_URI[patch005.sha256sum] = "1ac83044032b9f5f11aeca8a344ae3c524ec2156185d3adbb8ad3e7a165aa3fa" | ||
58 | SRC_URI[patch006.md5sum] = "6f01e364cd092faa28dd7119f47ddb5f" | ||
59 | SRC_URI[patch006.sha256sum] = "a0648ee72d15e4a90c8b77a5c6b19f8d89e28c1bc881657d22fe26825f040213" | ||
60 | SRC_URI[patch007.md5sum] = "dcf471d222bcd83283d3094e6ceeb6f8" | ||
61 | SRC_URI[patch007.sha256sum] = "1113e321c59cf6a8648a36245bbe4217cf8acf948d71e67886dad7d486f8f3a3" | ||
62 | SRC_URI[patch008.md5sum] = "f7553416646dc26c266454c78a916d36" | ||
63 | SRC_URI[patch008.sha256sum] = "9941a98a4987192cc5ce3d45afe879983cad2f0bec96d441a4edd9033767f95e" | ||
64 | SRC_URI[patch009.md5sum] = "7e73d2151f4064b484a4ba2c4b09960e" | ||
65 | SRC_URI[patch009.sha256sum] = "c0226d6728946b2f53cdebf090bcd1c01627f01fee03295768605caa80bb40a5" | ||
66 | SRC_URI[patch010.md5sum] = "a275463d21735bb6d7161f9fbd320d8f" | ||
67 | SRC_URI[patch010.sha256sum] = "ce05799c0137314c70c7b6ea0477c90e1ac1d52e113344be8e32fa5a55c9f0b7" | ||
68 | SRC_URI[patch011.md5sum] = "c17103ee20420d77e46b224c8d3fceda" | ||
69 | SRC_URI[patch011.sha256sum] = "7c63402cdbc004a210f6c1c527b63b13d8bb9ec9c5a43d5c464a9010ff6f7f3b" | ||
70 | SRC_URI[patch012.md5sum] = "3e2a057a19d02b3f92a3a09eacbc03ae" | ||
71 | SRC_URI[patch012.sha256sum] = "3e1379030b35fbcf314e9e7954538cf4b43be1507142b29efae39eef997b8c12" | ||
72 | SRC_URI[patch013.md5sum] = "fb377143a996d4ff087a2771bc8332f9" | ||
73 | SRC_URI[patch013.sha256sum] = "bfa8ca5336ab1f5ef988434a4bdedf71604aa8a3659636afa2ce7c7446c42c79" | ||
74 | SRC_URI[patch014.md5sum] = "1a1aaecc99a9d0cbc310e8e247dcc8b6" | ||
75 | SRC_URI[patch014.sha256sum] = "5a4d6fa2365b6eb725a9d4966248b5edf7630a4aeb3fa8d526b877972658ac13" | ||
76 | SRC_URI[patch015.md5sum] = "4f04387458a3c1b4d460d199f49991a8" | ||
77 | SRC_URI[patch015.sha256sum] = "13293e8a24e003a44d7fe928c6b1e07b444511bed2d9406407e006df28355e8d" | ||
78 | SRC_URI[patch016.md5sum] = "90e759709720c4f877525bebc9d5dc06" | ||
79 | SRC_URI[patch016.sha256sum] = "92d60bcf49f61bd7f1ccb9602bead6f2c9946d79dea0e5ec0589bb3bfa5e0773" | ||
80 | SRC_URI[patch017.md5sum] = "11e4046e1b86070f6adbb7ffc89641be" | ||
81 | SRC_URI[patch017.sha256sum] = "1267c25c6b5ba57042a7bb6c569a6de02ffd0d29530489a16666c3b8a23e7780" | ||
82 | SRC_URI[patch018.md5sum] = "cd5a9b46f5bea0dc0248c93c7dfac011" | ||
83 | SRC_URI[patch018.sha256sum] = "7aa8b40a9e973931719d8cc72284a8fb3292b71b522db57a5a79052f021a3d58" | ||
84 | SRC_URI[patch019.md5sum] = "cff4dc024d9d3456888aaaf8a36ca774" | ||
85 | SRC_URI[patch019.sha256sum] = "a7a91475228015d676cafa86d2d7aa9c5d2139aa51485b6bbdebfdfbcf0d2d23" | ||
86 | SRC_URI[patch020.md5sum] = "167839c5f147347f4a03d88ab97ff787" | ||
87 | SRC_URI[patch020.sha256sum] = "ca5e86d87f178128641fe91f2f094875b8c1eb2de9e0d2e9154f5d5cc0336c98" | ||
88 | SRC_URI[patch021.md5sum] = "1d350671c48dec30b34d8b81f09cd79d" | ||
89 | SRC_URI[patch021.sha256sum] = "41439f06883e6bd11c591d9d5e9ae08afbc2abd4b935e1d244b08100076520a9" | ||
90 | SRC_URI[patch022.md5sum] = "11c349af66a55481a3215ef2520bec36" | ||
91 | SRC_URI[patch022.sha256sum] = "fd4d47bb95c65863f634c4706c65e1e3bae4ee8460c72045c0a0618689061a88" | ||
92 | SRC_URI[patch023.md5sum] = "b3cb0d80fd0c47728264405cbb3b23c7" | ||
93 | SRC_URI[patch023.sha256sum] = "9ac250c7397a8f53dbc84dfe790d2a418fbf1fe090bcece39b4a5c84a2d300d4" | ||
94 | SRC_URI[patch024.md5sum] = "b5ea5600942acceb4b6f07313d2de74e" | ||
95 | SRC_URI[patch024.sha256sum] = "3b505882a0a6090667d75824fc919524cd44cc3bd89dd08b7c4e622d3f960f6c" | ||
96 | SRC_URI[patch025.md5sum] = "193c06f578d38ffdbaebae9c51a7551f" | ||
97 | SRC_URI[patch025.sha256sum] = "1e5186f5c4a619bb134a1177d9e9de879f3bb85d9c5726832b03a762a2499251" | ||
98 | SRC_URI[patch026.md5sum] = "922578e2be7ed03729454e92ee8d3f3a" | ||
99 | SRC_URI[patch026.sha256sum] = "2ecc12201b3ba4273b63af4e9aad2305168cf9babf6d11152796db08724c214d" | ||
100 | SRC_URI[patch027.md5sum] = "8ff6948b16f2db5c29b1b9ae1085bbe7" | ||
101 | SRC_URI[patch027.sha256sum] = "1eb76ad28561d27f7403ff3c76a36e932928a4b58a01b868d663c165f076dabe" | ||
102 | SRC_URI[patch028.md5sum] = "dd51fa67913b5dca45a702b672b3323f" | ||
103 | SRC_URI[patch028.sha256sum] = "e8b0dbed4724fa7b9bd8ff77d12c7f03da0fbfc5f8251ef5cb8511eb082b469d" | ||
104 | SRC_URI[patch029.md5sum] = "0729364c977ef4271e9f8dfafadacf67" | ||
105 | SRC_URI[patch029.sha256sum] = "4cc4a397fe6bc63ecb97d030a4e44258ef2d4e076d0e90c77782968cc43d6292" | ||
106 | SRC_URI[patch030.md5sum] = "efb709fdb1368945513de23ccbfae053" | ||
107 | SRC_URI[patch030.sha256sum] = "85434f8a2f379d0c49a3ff6d9ffa12c8b157188dd739e556d638217d2a58385b" | ||
108 | |||
109 | BBCLASSEXTEND = "nativesdk" | ||
diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb new file mode 100644 index 0000000000..b116052c7d --- /dev/null +++ b/meta/recipes-extended/bc/bc_1.06.bb | |||
@@ -0,0 +1,26 @@ | |||
1 | SUMMARY = "Arbitrary precision calculator language" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/bc/bc.html" | ||
3 | |||
4 | LICENSE = "GPLv2+ & LGPLv2.1" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
6 | file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \ | ||
7 | file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \ | ||
8 | file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \ | ||
9 | file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199" | ||
10 | |||
11 | SECTION = "base" | ||
12 | DEPENDS = "flex" | ||
13 | PR = "r2" | ||
14 | |||
15 | SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \ | ||
16 | file://fix-segment-fault.patch " | ||
17 | |||
18 | SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117" | ||
19 | SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33" | ||
20 | |||
21 | inherit autotools-brokensep texinfo update-alternatives | ||
22 | |||
23 | ALTERNATIVE_${PN} = "dc" | ||
24 | ALTERNATIVE_PRIORITY = "100" | ||
25 | |||
26 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/bc/files/fix-segment-fault.patch b/meta/recipes-extended/bc/files/fix-segment-fault.patch new file mode 100644 index 0000000000..20c0da2ebe --- /dev/null +++ b/meta/recipes-extended/bc/files/fix-segment-fault.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | when run command such as 'echo "a = 13" | bc -l', it segmentation faults. | ||
4 | This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html. | ||
5 | |||
6 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
7 | |||
8 | --- bc-1.06/lib/number.c.orig 2003-09-26 21:14:02.000000000 +0000 | ||
9 | +++ bc-1.06/lib/number.c 2003-09-26 21:14:26.000000000 +0000 | ||
10 | @@ -34,6 +34,7 @@ | ||
11 | #include <number.h> | ||
12 | #include <assert.h> | ||
13 | #include <stdlib.h> | ||
14 | +#include <string.h> | ||
15 | #include <ctype.h>/* Prototypes needed for external utility routines. */ | ||
16 | |||
17 | #define bc_rt_warn rt_warn | ||
18 | --- bc-1.06/bc/load.c.orig 2003-09-26 21:14:14.000000000 +0000 | ||
19 | +++ bc-1.06/bc/load.c 2003-09-26 21:14:26.000000000 +0000 | ||
20 | @@ -156,7 +156,7 @@ | ||
21 | long label_no; | ||
22 | long vaf_name; /* variable, array or function number. */ | ||
23 | long func; | ||
24 | - program_counter save_adr; | ||
25 | + static program_counter save_adr; | ||
26 | |||
27 | /* Initialize. */ | ||
28 | str = code; | ||
diff --git a/meta/recipes-extended/blktool/blktool_4-6.1.bb b/meta/recipes-extended/blktool/blktool_4-6.1.bb new file mode 100644 index 0000000000..69f2261b37 --- /dev/null +++ b/meta/recipes-extended/blktool/blktool_4-6.1.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = "Tune low-level block device parameters" | ||
2 | DESCRIPTION = "blktool is used for querying and/or changing settings \ | ||
3 | of a block device. It is like hdparm but a more general tool, as it \ | ||
4 | works on SCSI, IDE and SATA devices." | ||
5 | HOMEPAGE = "http://packages.debian.org/unstable/admin/blktool" | ||
6 | LICENSE = "GPLv2+" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
8 | file://blktool.c;beginline=7;endline=8;md5=a5e798ea98fd50972088968a15e5f373" | ||
9 | |||
10 | DEPENDS = "glib-2.0" | ||
11 | PR = "r1" | ||
12 | |||
13 | SRC_URI = "${DEBIAN_MIRROR}/main/b/blktool/blktool_4.orig.tar.gz;name=tarball \ | ||
14 | ${DEBIAN_MIRROR}/main/b/blktool/blktool_4-6.1.diff.gz;apply=yes;name=patch" | ||
15 | |||
16 | SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40" | ||
17 | SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764" | ||
18 | |||
19 | SRC_URI[patch.md5sum] = "cf605a683d54d1fbcb35b940076ddb0c" | ||
20 | SRC_URI[patch.sha256sum] = "d7923527e1a00984620ab307c9047a653d7ae2856cd20a82de8a33328f381ae3" | ||
21 | |||
22 | S = "${WORKDIR}/${BPN}-4.orig" | ||
23 | |||
24 | inherit autotools pkgconfig | ||
diff --git a/meta/recipes-extended/byacc/byacc.inc b/meta/recipes-extended/byacc/byacc.inc new file mode 100644 index 0000000000..fae9e2504a --- /dev/null +++ b/meta/recipes-extended/byacc/byacc.inc | |||
@@ -0,0 +1,19 @@ | |||
1 | SUMMARY = "Berkeley LALR Yacc parser generator" | ||
2 | DESCRIPTION = "A parser generator utility that reads a grammar specification from a file and generates an LR(1) \ | ||
3 | parser for it. The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C \ | ||
4 | programming language." | ||
5 | SECTION = "devel" | ||
6 | LICENSE = "PD" | ||
7 | |||
8 | SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz" | ||
9 | EXTRA_OECONF += "--program-transform-name='s,^,b,'" | ||
10 | |||
11 | BBCLASSEXTEND = "native" | ||
12 | |||
13 | inherit autotools | ||
14 | |||
15 | do_configure() { | ||
16 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} | ||
17 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} | ||
18 | oe_runconf | ||
19 | } | ||
diff --git a/meta/recipes-extended/byacc/byacc_20140422.bb b/meta/recipes-extended/byacc/byacc_20140422.bb new file mode 100644 index 0000000000..cf57738bea --- /dev/null +++ b/meta/recipes-extended/byacc/byacc_20140422.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | # Sigh. This is one of those places where everyone licenses it differently. Someone | ||
2 | # even apply UCB to it (Free/Net/OpenBSD). The maintainer states that: | ||
3 | # "I've found no reliable source which states that byacc must bear a UCB copyright." | ||
4 | # Setting to PD as this is what the upstream has it as. | ||
5 | |||
6 | LICENSE = "PD" | ||
7 | LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=f186cf0d59bac042b75830396ec389a3" | ||
8 | require byacc.inc | ||
9 | |||
10 | SRC_URI[md5sum] = "e7c13c5e207dc05eab9145cc9972397b" | ||
11 | SRC_URI[sha256sum] = "2f104c7e200dd86844d5f3521e12cb55fc48a9c3da3480a65fde2ca8c053bdcc" | ||
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am new file mode 100644 index 0000000000..1d163b6c98 --- /dev/null +++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am | |||
@@ -0,0 +1,71 @@ | |||
1 | |||
2 | lib_LTLIBRARIES = libbz2.la | ||
3 | |||
4 | libbz2_la_SOURCES = blocksort.c \ | ||
5 | huffman.c \ | ||
6 | crctable.c \ | ||
7 | randtable.c \ | ||
8 | compress.c \ | ||
9 | decompress.c \ | ||
10 | bzlib.c | ||
11 | |||
12 | bin_PROGRAMS = bzip2 bzip2recover | ||
13 | |||
14 | bzip2_SOURCES = bzip2.c | ||
15 | bzip2_LDADD = libbz2.la | ||
16 | bzip2_DEPENDENCIES = libbz2.la | ||
17 | |||
18 | include_HEADERS = bzlib.h | ||
19 | |||
20 | bzip2recover_SOURCES = bzip2recover.c | ||
21 | bzip2recover_LDADD = libbz2.la | ||
22 | bzip2recover_DEPENDENCIES = libbz2.la | ||
23 | |||
24 | bin_SCRIPTS = bzgrep bzmore bzdiff | ||
25 | |||
26 | man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1 | ||
27 | EXTRA_DIST = $(man_MANS) | ||
28 | |||
29 | runtest: | ||
30 | ./bzip2 -1 < sample1.ref > sample1.rb2 | ||
31 | ./bzip2 -2 < sample2.ref > sample2.rb2 | ||
32 | ./bzip2 -3 < sample3.ref > sample3.rb2 | ||
33 | ./bzip2 -d < sample1.bz2 > sample1.tst | ||
34 | ./bzip2 -d < sample2.bz2 > sample2.tst | ||
35 | ./bzip2 -ds < sample3.bz2 > sample3.tst | ||
36 | @if cmp sample1.bz2 sample1.rb2; then echo "PASS: sample1 compress";\ | ||
37 | else echo "FAIL: sample1 compress"; fi | ||
38 | @if cmp sample2.bz2 sample2.rb2; then echo "PASS: sample2 compress";\ | ||
39 | else echo "FAIL: sample2 compress"; fi | ||
40 | @if cmp sample3.bz2 sample3.rb2; then echo "PASS: sample3 compress";\ | ||
41 | else echo "FAIL: sample3 compress"; fi | ||
42 | @if cmp sample1.tst sample1.ref; then echo "PASS: sample1 decompress";\ | ||
43 | else echo "FAIL: sample1 decompress"; fi | ||
44 | @if cmp sample2.tst sample2.ref; then echo "PASS: sample2 decompress";\ | ||
45 | else echo "FAIL: sample2 decompress"; fi | ||
46 | @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\ | ||
47 | else echo "FAIL: sample3 decompress"; fi | ||
48 | |||
49 | install-ptest: | ||
50 | cp $(srcdir)/Makefile $(DESTDIR)/ | ||
51 | cp $(srcdir)/sample1.ref $(DESTDIR)/ | ||
52 | cp $(srcdir)/sample2.ref $(DESTDIR)/ | ||
53 | cp $(srcdir)/sample3.ref $(DESTDIR)/ | ||
54 | cp $(srcdir)/sample1.bz2 $(DESTDIR)/ | ||
55 | cp $(srcdir)/sample2.bz2 $(DESTDIR)/ | ||
56 | cp $(srcdir)/sample3.bz2 $(DESTDIR)/ | ||
57 | ln -s $(bindir)/bzip2 $(DESTDIR)/bzip2 | ||
58 | |||
59 | install-exec-hook: | ||
60 | ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT) | ||
61 | ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT) | ||
62 | ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT) | ||
63 | ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT) | ||
64 | ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT) | ||
65 | ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT) | ||
66 | |||
67 | install-data-hook: | ||
68 | echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1 | ||
69 | echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1 | ||
70 | echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1 | ||
71 | echo ".so man1/bzdiff.1" > $(DESTDIR)$(mandir)/man1/bzcmp.1 | ||
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac new file mode 100644 index 0000000000..47ee576a8e --- /dev/null +++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac | |||
@@ -0,0 +1,14 @@ | |||
1 | AC_PREREQ([2.57]) | ||
2 | |||
3 | AC_INIT(bzip2, 2.0.5, , libXrender) | ||
4 | AM_INIT_AUTOMAKE(foreign) | ||
5 | AM_MAINTAINER_MODE | ||
6 | |||
7 | #AM_CONFIG_HEADER(config.h) | ||
8 | |||
9 | # Check for progs | ||
10 | AC_PROG_CC | ||
11 | AC_PROG_LIBTOOL | ||
12 | |||
13 | AC_OUTPUT([Makefile]) | ||
14 | |||
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest new file mode 100644 index 0000000000..3b20fce1ee --- /dev/null +++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | make -k runtest | ||
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb new file mode 100644 index 0000000000..9dd9e6a1f9 --- /dev/null +++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb | |||
@@ -0,0 +1,54 @@ | |||
1 | SUMMARY = "Very high-quality data compression program" | ||
2 | DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \ | ||
3 | Huffman coding. Compression is generally considerably better than that achieved by more conventional \ | ||
4 | LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors." | ||
5 | HOMEPAGE = "http://www.bzip.org/" | ||
6 | SECTION = "console/utils" | ||
7 | LICENSE = "bzip2" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2" | ||
9 | PR = "r5" | ||
10 | |||
11 | SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \ | ||
12 | file://configure.ac \ | ||
13 | file://run-ptest \ | ||
14 | file://Makefile.am" | ||
15 | |||
16 | SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b" | ||
17 | SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd" | ||
18 | |||
19 | PACKAGES =+ "libbz2 libbz2-dev libbz2-staticdev" | ||
20 | |||
21 | CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64" | ||
22 | |||
23 | inherit autotools update-alternatives ptest | ||
24 | |||
25 | ALTERNATIVE_PRIORITY = "100" | ||
26 | ALTERNATIVE_${PN} = "bunzip2 bzcat" | ||
27 | |||
28 | #install binaries to bzip2-native under sysroot for replacement-native | ||
29 | EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}" | ||
30 | do_extraunpack () { | ||
31 | cp ${WORKDIR}/configure.ac ${S}/ | ||
32 | cp ${WORKDIR}/Makefile.am ${S}/ | ||
33 | } | ||
34 | |||
35 | addtask extraunpack after do_unpack before do_patch | ||
36 | |||
37 | do_install_ptest () { | ||
38 | cp -f ${B}/Makefile ${D}${PTEST_PATH}/Makefile | ||
39 | sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile | ||
40 | } | ||
41 | |||
42 | FILES_libbz2 = "${libdir}/lib*${SOLIBS}" | ||
43 | |||
44 | FILES_libbz2-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV}" | ||
45 | SECTION_libbz2-dev = "devel" | ||
46 | RDEPENDS_libbz2-dev = "libbz2 (= ${EXTENDPKGV})" | ||
47 | |||
48 | FILES_libbz2-staticdev = "${libdir}/*.a" | ||
49 | SECTION_libbz2-staticdev = "devel" | ||
50 | RDEPENDS_libbz2-staticdev = "libbz2-dev (= ${EXTENDPKGV})" | ||
51 | |||
52 | PROVIDES_append_class-native = " bzip2-replacement-native" | ||
53 | BBCLASSEXTEND = "native nativesdk" | ||
54 | |||
diff --git a/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb new file mode 100644 index 0000000000..7fd34aa05f --- /dev/null +++ b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb | |||
@@ -0,0 +1,43 @@ | |||
1 | require recipes-extended/chkconfig/chkconfig_1.3.58.bb | ||
2 | |||
3 | SUMMARY = "${SUMMARY_chkconfig-alternatives}" | ||
4 | DESCRIPTION = "${DESCRIPTION_chkconfig-alternatives}" | ||
5 | DEPENDS = "" | ||
6 | PROVIDES += "virtual/update-alternatives-native" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
8 | |||
9 | # The sysroot branch is 1.3.59 + some git commits from master + --sysroot | ||
10 | # support for alternatives. | ||
11 | SRC_URI = "git://github.com/kergoth/chkconfig;branch=sysroot" | ||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | SRCREV = "cd437ecbd8986c894442f8fce1e0061e20f04dee" | ||
15 | PV = "1.3.59+${SRCPV}" | ||
16 | |||
17 | inherit native | ||
18 | |||
19 | # We want our native recipes to build using the target paths rather than paths | ||
20 | # into the sysroot, as we may use them to construct the rootfs. As such, we | ||
21 | # only adjust the paths to match the metadata for the target, not native. | ||
22 | obey_variables () { | ||
23 | sed -i 's,ALTERNATIVES_ROOT,OPKG_OFFLINE_ROOT,' alternatives.c | ||
24 | } | ||
25 | |||
26 | do_compile () { | ||
27 | oe_runmake alternatives | ||
28 | } | ||
29 | |||
30 | do_install () { | ||
31 | install -d ${D}${sysconfdir}/alternatives \ | ||
32 | ${D}${localstatedir}/lib/alternatives | ||
33 | |||
34 | install -D -m 0755 alternatives ${D}${bindir}/alternatives | ||
35 | install -D -m 0644 alternatives.8 ${D}${mandir}/man8/alternatives.8 | ||
36 | |||
37 | ln -s alternatives ${D}${bindir}/update-alternatives | ||
38 | ln -s alternatives.8 ${D}${mandir}/man8/update-alternatives.8 | ||
39 | } | ||
40 | |||
41 | do_install_append_linuxstdbase() { | ||
42 | rm -rf ${D}${libdir}/lsb | ||
43 | } | ||
diff --git a/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb new file mode 100644 index 0000000000..d285c5047c --- /dev/null +++ b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb | |||
@@ -0,0 +1,63 @@ | |||
1 | SUMMARY = "A system tool for maintaining the /etc/rc*.d hierarchy" | ||
2 | DESCRIPTION = "Chkconfig is a basic system utility. It updates and queries runlevel \ | ||
3 | information for system services. Chkconfig manipulates the numerous \ | ||
4 | symbolic links in /etc/rc.d, to relieve system administrators of some \ | ||
5 | of the drudgery of manually editing the symbolic links." | ||
6 | |||
7 | HOMEPAGE = "http://fedorahosted.org/releases/c/h/chkconfig" | ||
8 | |||
9 | LICENSE = "GPLv2" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018" | ||
11 | |||
12 | DEPENDS = "libnewt popt" | ||
13 | PROVIDES += "virtual/update-alternatives" | ||
14 | |||
15 | PR = "r7" | ||
16 | |||
17 | SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2" | ||
18 | |||
19 | SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246" | ||
20 | SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68" | ||
21 | |||
22 | inherit gettext | ||
23 | |||
24 | # Makefile uses RPM_OPT_FLAGS to construct CFLAGS | ||
25 | # | ||
26 | EXTRA_OEMAKE = "\ | ||
27 | 'RPM_OPT_FLAGS=${CFLAGS}' \ | ||
28 | 'LDFLAGS=${LDFLAGS}' \ | ||
29 | 'BINDIR=${base_sbindir}' \ | ||
30 | 'SBINDIR=${sbindir}' \ | ||
31 | 'MANDIR=${mandir}' \ | ||
32 | 'ALTDIR=${localstatedir}/lib/alternatives' \ | ||
33 | 'ALTDATADIR=${sysconfdir}/alternatives' \ | ||
34 | " | ||
35 | |||
36 | do_unpack[postfuncs] += "obey_variables" | ||
37 | do_unpack[vardeps] += "obey_variables" | ||
38 | obey_variables () { | ||
39 | sed -i -e 's,/etc,${sysconfdir},; s,/lib/systemd,${base_libdir}/systemd,' leveldb.h | ||
40 | sed -i -e 's,/etc/alternatives,${sysconfdir}/alternatives,' \ | ||
41 | -e 's,/var/lib/alternatives,${localstatedir}/lib/alternatives,' \ | ||
42 | -e 's,/usr/share/locale,${datadir}/locale,' alternatives.c | ||
43 | } | ||
44 | |||
45 | do_install() { | ||
46 | oe_runmake 'DESTDIR=${D}' 'INSTALLNLSDIR=${D}${datadir}/locale' \ | ||
47 | 'BINDIR=${sbindir}' install | ||
48 | install -d ${D}${sysconfdir}/chkconfig.d | ||
49 | } | ||
50 | |||
51 | PACKAGES =+ "${PN}-alternatives ${PN}-alternatives-doc" | ||
52 | SUMMARY_${PN}-alternatives = "Maintain symbolic links determining default commands" | ||
53 | DESCRIPTION_${PN}-alternatives = "alternatives creates, removes, maintains and displays \ | ||
54 | information about the symbolic links comprising the alternatives system." | ||
55 | SUMMARY_${PN}-alternatives-doc = "${SUMMARY_${PN}-alternatives} - Documentation files" | ||
56 | DESCRIPTION_${PN}-alternatives-doc = "${DESCRIPTION_${PN}-alternatives} \ | ||
57 | This package contains documentation." | ||
58 | RPROVIDES_${PN}-alternatives += "update-alternatives" | ||
59 | RCONFLICTS_${PN}-alternatives = "update-alternatives-opkg update-alternatives-dpkg" | ||
60 | FILES_${PN}-alternatives = "${sbindir}/alternatives ${sbindir}/update-alternatives \ | ||
61 | ${sysconfdir}/alternatives ${localstatedir}/lib/alternatives" | ||
62 | FILES_${PN}-alternatives-doc = "${mandir}/man8/alternatives.8 \ | ||
63 | ${mandir}/man8/update-alternatives.8" | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch b/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch new file mode 100644 index 0000000000..b54afb867f --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch | |||
@@ -0,0 +1,154 @@ | |||
1 | Description: CVE-2015-1197 | ||
2 | Apply patch by Vitezslav Cizek of SuSE to fix CVE-2015-1197. | ||
3 | Upstream is dormant or no longer existing. To restore the old | ||
4 | behaviour use --extract-over-symlinks (Closes: #774669) | ||
5 | This issue has been discovered by Alexander Cherepanov. | ||
6 | Author: Vitezslav Cizek <vcizek@suse.cz> | ||
7 | Bug-Debian: https://bugs.debian.org/774669 | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | |||
11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
12 | |||
13 | --- cpio-2.11+dfsg.orig/doc/cpio.1 | ||
14 | +++ cpio-2.11+dfsg/doc/cpio.1 | ||
15 | @@ -22,6 +22,7 @@ cpio \- copy files to and from archives | ||
16 | [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message] | ||
17 | [\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse] | ||
18 | [\-\-only\-verify\-crc] [\-\-to\-stdout] [\-\-quiet] [\-\-rsh-command=command] | ||
19 | +[\-\-extract\-over\-symlinks] | ||
20 | [\-\-help] [\-\-version] [pattern...] [< archive] | ||
21 | |||
22 | .B cpio | ||
23 | --- cpio-2.11+dfsg.orig/src/copyin.c | ||
24 | +++ cpio-2.11+dfsg/src/copyin.c | ||
25 | @@ -700,6 +700,51 @@ copyin_link (struct cpio_file_stat *file | ||
26 | free (link_name); | ||
27 | } | ||
28 | |||
29 | + | ||
30 | +static int | ||
31 | +path_contains_symlink(char *path) | ||
32 | +{ | ||
33 | + struct stat st; | ||
34 | + char *slash; | ||
35 | + char *nextslash; | ||
36 | + | ||
37 | + /* we got NULL pointer or empty string */ | ||
38 | + if (!path || !*path) { | ||
39 | + return false; | ||
40 | + } | ||
41 | + | ||
42 | + slash = path; | ||
43 | + | ||
44 | + while ((nextslash = strchr(slash + 1, '/')) != NULL) { | ||
45 | + slash = nextslash; | ||
46 | + *slash = '\0'; | ||
47 | + | ||
48 | + if (lstat(path, &st) != 0) { | ||
49 | + if (errno == ELOOP) { | ||
50 | + /* ELOOP - too many symlinks */ | ||
51 | + *slash = '/'; | ||
52 | + return true; | ||
53 | + } else if (errno == ENOMEM) { | ||
54 | + /* No memory for lstat - terminate */ | ||
55 | + xalloc_die(); | ||
56 | + } else { | ||
57 | + /* cannot lstat path - give up */ | ||
58 | + *slash = '/'; | ||
59 | + return false; | ||
60 | + } | ||
61 | + } | ||
62 | + | ||
63 | + if (S_ISLNK(st.st_mode)) { | ||
64 | + *slash = '/'; | ||
65 | + return true; | ||
66 | + } | ||
67 | + | ||
68 | + *slash = '/'; | ||
69 | + } | ||
70 | + | ||
71 | + return false; | ||
72 | +} | ||
73 | + | ||
74 | static void | ||
75 | copyin_file (struct cpio_file_stat *file_hdr, int in_file_des) | ||
76 | { | ||
77 | @@ -1471,6 +1516,23 @@ process_copy_in () | ||
78 | { | ||
79 | /* Copy the input file into the directory structure. */ | ||
80 | |||
81 | + /* Can we write files over symlinks? */ | ||
82 | + if (!extract_over_symlinks) | ||
83 | + { | ||
84 | + if (path_contains_symlink(file_hdr.c_name)) | ||
85 | + { | ||
86 | + /* skip the file */ | ||
87 | + /* | ||
88 | + fprintf(stderr, "Can't write over symlinks. Skipping %s\n", file_hdr.c_name); | ||
89 | + tape_toss_input (in_file_des, file_hdr.c_filesize); | ||
90 | + tape_skip_padding (in_file_des, file_hdr.c_filesize); | ||
91 | + continue; | ||
92 | + */ | ||
93 | + /* terminate */ | ||
94 | + error (1, 0, _("Can't write over symlinks: %s\n"), file_hdr.c_name); | ||
95 | + } | ||
96 | + } | ||
97 | + | ||
98 | /* Do we need to rename the file? */ | ||
99 | if (rename_flag || rename_batch_file) | ||
100 | { | ||
101 | --- cpio-2.11+dfsg.orig/src/extern.h | ||
102 | +++ cpio-2.11+dfsg/src/extern.h | ||
103 | @@ -95,6 +95,7 @@ extern char input_is_special; | ||
104 | extern char output_is_special; | ||
105 | extern char input_is_seekable; | ||
106 | extern char output_is_seekable; | ||
107 | +extern bool extract_over_symlinks; | ||
108 | extern int (*xstat) (); | ||
109 | extern void (*copy_function) (); | ||
110 | |||
111 | --- cpio-2.11+dfsg.orig/src/global.c | ||
112 | +++ cpio-2.11+dfsg/src/global.c | ||
113 | @@ -187,6 +187,9 @@ bool to_stdout_option = false; | ||
114 | /* The name this program was run with. */ | ||
115 | char *program_name; | ||
116 | |||
117 | +/* Extract files over symbolic links */ | ||
118 | +bool extract_over_symlinks; | ||
119 | + | ||
120 | /* A pointer to either lstat or stat, depending on whether | ||
121 | dereferencing of symlinks is done for input files. */ | ||
122 | int (*xstat) (); | ||
123 | --- cpio-2.11+dfsg.orig/src/main.c | ||
124 | +++ cpio-2.11+dfsg/src/main.c | ||
125 | @@ -57,7 +57,8 @@ enum cpio_options { | ||
126 | FORCE_LOCAL_OPTION, | ||
127 | DEBUG_OPTION, | ||
128 | BLOCK_SIZE_OPTION, | ||
129 | - TO_STDOUT_OPTION | ||
130 | + TO_STDOUT_OPTION, | ||
131 | + EXTRACT_OVER_SYMLINKS | ||
132 | }; | ||
133 | |||
134 | const char *program_authors[] = | ||
135 | @@ -222,6 +223,8 @@ static struct argp_option options[] = { | ||
136 | N_("Create leading directories where needed"), GRID+1 }, | ||
137 | {"no-preserve-owner", NO_PRESERVE_OWNER_OPTION, 0, 0, | ||
138 | N_("Do not change the ownership of the files"), GRID+1 }, | ||
139 | + {"extract-over-symlinks", EXTRACT_OVER_SYMLINKS, 0, 0, | ||
140 | + N_("Force writing over symbolic links"), GRID+1 }, | ||
141 | {"unconditional", 'u', NULL, 0, | ||
142 | N_("Replace all files unconditionally"), GRID+1 }, | ||
143 | {"sparse", SPARSE_OPTION, NULL, 0, | ||
144 | @@ -412,6 +415,10 @@ crc newc odc bin ustar tar (all-caps als | ||
145 | no_chown_flag = true; | ||
146 | break; | ||
147 | |||
148 | + case EXTRACT_OVER_SYMLINKS: /* --extract-over-symlinks */ | ||
149 | + extract_over_symlinks = true; | ||
150 | + break; | ||
151 | + | ||
152 | case 'o': /* Copy-out mode. */ | ||
153 | if (copy_function != 0) | ||
154 | error (PAXEXIT_FAILURE, 0, _("Mode already defined")); | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch new file mode 100644 index 0000000000..89cd3cfa50 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch | |||
@@ -0,0 +1,220 @@ | |||
1 | cpio: Fix memory overrun on reading improperly created link records | ||
2 | |||
3 | Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> | ||
4 | |||
5 | http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d | ||
6 | |||
7 | * src/copyin.c (get_link_name): New function. | ||
8 | (list_file, copyin_link): use get_link_name | ||
9 | |||
10 | * tests/symlink-bad-length.at: New file. | ||
11 | * tests/symlink-long.at: New file. | ||
12 | * tests/Makefile.am: Add new files. | ||
13 | * tests/testsuite.at: Likewise. | ||
14 | |||
15 | See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html | ||
16 | |||
17 | Upstream-Status: Backport | ||
18 | |||
19 | Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua> | ||
20 | |||
21 | diff -Nurp cpio-2.11.orig/src/copyin.c cpio-2.11/src/copyin.c | ||
22 | --- cpio-2.11.orig/src/copyin.c 2010-02-15 18:02:23.000000000 +0800 | ||
23 | +++ cpio-2.11/src/copyin.c 2014-12-08 13:14:04.355547508 +0800 | ||
24 | @@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, off_ | ||
25 | } | ||
26 | |||
27 | |||
28 | +static char * | ||
29 | +get_link_name (struct cpio_file_stat *file_hdr, int in_file_des) | ||
30 | +{ | ||
31 | + off_t n = file_hdr->c_filesize + 1; | ||
32 | + char *link_name; | ||
33 | + | ||
34 | + if (n == 0 || n > SIZE_MAX) | ||
35 | + { | ||
36 | + error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name); | ||
37 | + link_name = NULL; | ||
38 | + } | ||
39 | + else | ||
40 | + { | ||
41 | + link_name = xmalloc (n); | ||
42 | + tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); | ||
43 | + link_name[file_hdr->c_filesize] = '\0'; | ||
44 | + tape_skip_padding (in_file_des, file_hdr->c_filesize); | ||
45 | + } | ||
46 | + return link_name; | ||
47 | +} | ||
48 | + | ||
49 | + | ||
50 | static void | ||
51 | list_file(struct cpio_file_stat* file_hdr, int in_file_des) | ||
52 | { | ||
53 | @@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd | ||
54 | { | ||
55 | if (archive_format != arf_tar && archive_format != arf_ustar) | ||
56 | { | ||
57 | - char *link_name = NULL; /* Name of hard and symbolic links. */ | ||
58 | - | ||
59 | - link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); | ||
60 | - link_name[file_hdr->c_filesize] = '\0'; | ||
61 | - tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); | ||
62 | - long_format (file_hdr, link_name); | ||
63 | - free (link_name); | ||
64 | - tape_skip_padding (in_file_des, file_hdr->c_filesize); | ||
65 | - return; | ||
66 | + char *link_name = get_link_name (file_hdr, in_file_des); | ||
67 | + if (link_name) | ||
68 | + { | ||
69 | + long_format (file_hdr, link_name); | ||
70 | + free (link_name); | ||
71 | + } | ||
72 | } | ||
73 | else | ||
74 | - { | ||
75 | long_format (file_hdr, file_hdr->c_tar_linkname); | ||
76 | - return; | ||
77 | - } | ||
78 | + return; | ||
79 | } | ||
80 | else | ||
81 | #endif | ||
82 | @@ -650,10 +667,7 @@ copyin_link(struct cpio_file_stat *file_ | ||
83 | |||
84 | if (archive_format != arf_tar && archive_format != arf_ustar) | ||
85 | { | ||
86 | - link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); | ||
87 | - link_name[file_hdr->c_filesize] = '\0'; | ||
88 | - tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); | ||
89 | - tape_skip_padding (in_file_des, file_hdr->c_filesize); | ||
90 | + link_name = get_link_name (file_hdr, in_file_des); | ||
91 | } | ||
92 | else | ||
93 | { | ||
94 | diff -Nurp cpio-2.11.orig/tests/Makefile.am cpio-2.11/tests/Makefile.am | ||
95 | --- cpio-2.11.orig/tests/Makefile.am 2010-02-15 18:02:23.000000000 +0800 | ||
96 | +++ cpio-2.11/tests/Makefile.am 2014-12-08 13:14:49.931545727 +0800 | ||
97 | @@ -52,6 +52,8 @@ TESTSUITE_AT = \ | ||
98 | setstat04.at\ | ||
99 | setstat05.at\ | ||
100 | symlink.at\ | ||
101 | + symlink-bad-length.at\ | ||
102 | + symlink-long.at\ | ||
103 | version.at | ||
104 | |||
105 | TESTSUITE = $(srcdir)/testsuite | ||
106 | diff -Nurp cpio-2.11.orig/tests/symlink-bad-length.at cpio-2.11/tests/symlink-bad-length.at | ||
107 | --- cpio-2.11.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800 | ||
108 | +++ cpio-2.11/tests/symlink-bad-length.at 2014-12-08 13:17:45.979538847 +0800 | ||
109 | @@ -0,0 +1,49 @@ | ||
110 | +# Process this file with autom4te to create testsuite. -*- Autotest -*- | ||
111 | +# Copyright (C) 2014 Free Software Foundation, Inc. | ||
112 | + | ||
113 | +# This program is free software; you can redistribute it and/or modify | ||
114 | +# it under the terms of the GNU General Public License as published by | ||
115 | +# the Free Software Foundation; either version 3, or (at your option) | ||
116 | +# any later version. | ||
117 | + | ||
118 | +# This program is distributed in the hope that it will be useful, | ||
119 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
120 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
121 | +# GNU General Public License for more details. | ||
122 | + | ||
123 | +# You should have received a copy of the GNU General Public License | ||
124 | +# along with this program; if not, write to the Free Software | ||
125 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
126 | +# 02110-1301 USA. | ||
127 | + | ||
128 | +# Cpio v2.11 did segfault with badly set symlink length. | ||
129 | +# References: | ||
130 | +# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html | ||
131 | + | ||
132 | +AT_SETUP([symlink-bad-length]) | ||
133 | +AT_KEYWORDS([symlink-long copyout]) | ||
134 | + | ||
135 | +AT_DATA([ARCHIVE.base64], | ||
136 | +[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv | ||
137 | +JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF | ||
138 | +UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
139 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
140 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
141 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
142 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
143 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
144 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= | ||
145 | +]) | ||
146 | + | ||
147 | +AT_CHECK([ | ||
148 | +base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST | ||
149 | +cpio -ntv < ARCHIVE | ||
150 | +test $? -eq 2 | ||
151 | +], | ||
152 | +[0], | ||
153 | +[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE | ||
154 | +],[cpio: LINK: stored filename length too big | ||
155 | +cpio: premature end of file | ||
156 | +]) | ||
157 | + | ||
158 | +AT_CLEANUP | ||
159 | diff -Nurp cpio-2.11.orig/tests/symlink-long.at cpio-2.11/tests/symlink-long.at | ||
160 | --- cpio-2.11.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800 | ||
161 | +++ cpio-2.11/tests/symlink-long.at 2014-12-08 13:17:57.219538408 +0800 | ||
162 | @@ -0,0 +1,46 @@ | ||
163 | +# Process this file with autom4te to create testsuite. -*- Autotest -*- | ||
164 | +# Copyright (C) 2014 Free Software Foundation, Inc. | ||
165 | + | ||
166 | +# This program is free software; you can redistribute it and/or modify | ||
167 | +# it under the terms of the GNU General Public License as published by | ||
168 | +# the Free Software Foundation; either version 3, or (at your option) | ||
169 | +# any later version. | ||
170 | + | ||
171 | +# This program is distributed in the hope that it will be useful, | ||
172 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
173 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
174 | +# GNU General Public License for more details. | ||
175 | + | ||
176 | +# You should have received a copy of the GNU General Public License | ||
177 | +# along with this program; if not, write to the Free Software | ||
178 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
179 | +# 02110-1301 USA. | ||
180 | + | ||
181 | +# Cpio v2.11.90 changed the way symlink name is read from archive. | ||
182 | +# References: | ||
183 | +# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html | ||
184 | + | ||
185 | +AT_SETUP([symlink-long]) | ||
186 | +AT_KEYWORDS([symlink-long copyout]) | ||
187 | + | ||
188 | +AT_CHECK([ | ||
189 | + | ||
190 | +# len(dirname) > READBUFSIZE | ||
191 | +dirname= | ||
192 | +for i in {1..52}; do | ||
193 | + dirname="xxxxxxxxx/$dirname" | ||
194 | + mkdir "$dirname" | ||
195 | +done | ||
196 | +ln -s "$dirname" x || AT_SKIP_TEST | ||
197 | + | ||
198 | +echo x | cpio -o > ar | ||
199 | +list=`cpio -tv < ar | sed 's|.*-> ||'` | ||
200 | +test "$list" = "$dirname" && echo success || echo fail | ||
201 | +], | ||
202 | +[0], | ||
203 | +[success | ||
204 | +],[2 blocks | ||
205 | +2 blocks | ||
206 | +]) | ||
207 | + | ||
208 | +AT_CLEANUP | ||
209 | diff -Nurp cpio-2.11.orig/tests/testsuite.at cpio-2.11/tests/testsuite.at | ||
210 | --- cpio-2.11.orig/tests/testsuite.at 2010-02-15 18:02:23.000000000 +0800 | ||
211 | +++ cpio-2.11/tests/testsuite.at 2014-12-08 13:15:13.515544805 +0800 | ||
212 | @@ -31,6 +31,8 @@ m4_include([version.at]) | ||
213 | |||
214 | m4_include([inout.at]) | ||
215 | m4_include([symlink.at]) | ||
216 | +m4_include([symlink-bad-length.at]) | ||
217 | +m4_include([symlink-long.at]) | ||
218 | m4_include([interdir.at]) | ||
219 | |||
220 | m4_include([setstat01.at]) | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch b/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch new file mode 100644 index 0000000000..b4d113d3a5 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | Index: cpio-2.11/gnu/stdio.in.h | ||
7 | =================================================================== | ||
8 | --- cpio-2.11.orig/gnu/stdio.in.h 2012-07-04 12:13:43.133066247 -0700 | ||
9 | +++ cpio-2.11/gnu/stdio.in.h 2012-07-04 12:14:10.189067564 -0700 | ||
10 | @@ -138,8 +138,10 @@ | ||
11 | /* It is very rare that the developer ever has full control of stdin, | ||
12 | so any use of gets warrants an unconditional warning. Assume it is | ||
13 | always declared, since it is required by C89. */ | ||
14 | +#if defined gets | ||
15 | #undef gets | ||
16 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | ||
17 | +#endif | ||
18 | |||
19 | #if @GNULIB_FOPEN@ | ||
20 | # if @REPLACE_FOPEN@ | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.11/statdef.patch b/meta/recipes-extended/cpio/cpio-2.11/statdef.patch new file mode 100644 index 0000000000..a6b8e82a0b --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.11/statdef.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Avoid multiple stat definitions | ||
2 | Patch taken from cpio mailing list posting 2010-03-19 | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
7 | |||
8 | diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h | ||
9 | --- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800 | ||
10 | +++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700 | ||
11 | @@ -82,4 +82,6 @@ | ||
12 | #define lstat stat | ||
13 | #endif | ||
14 | int lstat (); | ||
15 | +#ifndef stat | ||
16 | int stat (); | ||
17 | +#endif | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch new file mode 100644 index 0000000000..49a7cf52a6 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624] | ||
2 | |||
3 | This patch avoids heap overflow reported by : | ||
4 | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624 | ||
5 | |||
6 | This is a clean patch for the GPLv2 tar recipe. | ||
7 | |||
8 | the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio | ||
9 | recipe, as they share code. | ||
10 | |||
11 | Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25 | ||
12 | |||
13 | Index: tar-1.17/lib/rtapelib.c | ||
14 | =================================================================== | ||
15 | --- tar-1.17.orig/lib/rtapelib.c | ||
16 | +++ tar-1.17/lib/rtapelib.c | ||
17 | @@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si | ||
18 | |||
19 | sprintf (command_buffer, "R%lu\n", (unsigned long) length); | ||
20 | if (do_command (handle, command_buffer) == -1 | ||
21 | - || (status = get_status (handle)) == SAFE_READ_ERROR) | ||
22 | + || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length)) | ||
23 | return SAFE_READ_ERROR; | ||
24 | |||
25 | for (counter = 0; counter < status; counter += rlen, buffer += rlen) | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch new file mode 100644 index 0000000000..0148e70797 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch | |||
@@ -0,0 +1,217 @@ | |||
1 | cpio: Fix memory overrun on reading improperly created link records | ||
2 | |||
3 | Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> | ||
4 | |||
5 | http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d | ||
6 | |||
7 | * src/copyin.c (get_link_name): New function. | ||
8 | (list_file, copyin_link): use get_link_name | ||
9 | |||
10 | * tests/symlink-bad-length.at: New file. | ||
11 | * tests/symlink-long.at: New file. | ||
12 | * tests/Makefile.am: Add new files. | ||
13 | * tests/testsuite.at: Likewise. | ||
14 | |||
15 | See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html | ||
16 | |||
17 | Upstream-Status: Backport | ||
18 | |||
19 | Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua> | ||
20 | |||
21 | diff -Nurp cpio-2.8.orig/src/copyin.c cpio-2.8/src/copyin.c | ||
22 | --- cpio-2.8.orig/src/copyin.c 2007-06-07 19:58:03.000000000 +0800 | ||
23 | +++ cpio-2.8/src/copyin.c 2014-12-08 11:30:01.159791484 +0800 | ||
24 | @@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, int | ||
25 | } | ||
26 | |||
27 | |||
28 | +static char * | ||
29 | +get_link_name (struct cpio_file_stat *file_hdr, int in_file_des) | ||
30 | +{ | ||
31 | + off_t n = file_hdr->c_filesize + 1; | ||
32 | + char *link_name; | ||
33 | + | ||
34 | + if (n == 0 || n > SIZE_MAX) | ||
35 | + { | ||
36 | + error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name); | ||
37 | + link_name = NULL; | ||
38 | + } | ||
39 | + else | ||
40 | + { | ||
41 | + link_name = xmalloc (n); | ||
42 | + tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); | ||
43 | + link_name[file_hdr->c_filesize] = '\0'; | ||
44 | + tape_skip_padding (in_file_des, file_hdr->c_filesize); | ||
45 | + } | ||
46 | + return link_name; | ||
47 | +} | ||
48 | + | ||
49 | + | ||
50 | static void | ||
51 | list_file(struct cpio_file_stat* file_hdr, int in_file_des) | ||
52 | { | ||
53 | @@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd | ||
54 | { | ||
55 | if (archive_format != arf_tar && archive_format != arf_ustar) | ||
56 | { | ||
57 | - char *link_name = NULL; /* Name of hard and symbolic links. */ | ||
58 | - | ||
59 | - link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); | ||
60 | - link_name[file_hdr->c_filesize] = '\0'; | ||
61 | - tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); | ||
62 | - long_format (file_hdr, link_name); | ||
63 | - free (link_name); | ||
64 | - tape_skip_padding (in_file_des, file_hdr->c_filesize); | ||
65 | - return; | ||
66 | + char *link_name = get_link_name (file_hdr, in_file_des); | ||
67 | + if (link_name) | ||
68 | + { | ||
69 | + long_format (file_hdr, link_name); | ||
70 | + free (link_name); | ||
71 | + } | ||
72 | } | ||
73 | else | ||
74 | - { | ||
75 | long_format (file_hdr, file_hdr->c_tar_linkname); | ||
76 | - return; | ||
77 | - } | ||
78 | + return; | ||
79 | } | ||
80 | else | ||
81 | #endif | ||
82 | @@ -732,10 +749,7 @@ copyin_link(struct cpio_file_stat *file_ | ||
83 | |||
84 | if (archive_format != arf_tar && archive_format != arf_ustar) | ||
85 | { | ||
86 | - link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); | ||
87 | - link_name[file_hdr->c_filesize] = '\0'; | ||
88 | - tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); | ||
89 | - tape_skip_padding (in_file_des, file_hdr->c_filesize); | ||
90 | + link_name = get_link_name (file_hdr, in_file_des); | ||
91 | } | ||
92 | else | ||
93 | { | ||
94 | diff -Nurp cpio-2.8.orig/tests/Makefile.am cpio-2.8/tests/Makefile.am | ||
95 | --- cpio-2.8.orig/tests/Makefile.am 2006-10-24 18:32:13.000000000 +0800 | ||
96 | +++ cpio-2.8/tests/Makefile.am 2014-12-08 11:30:52.387789482 +0800 | ||
97 | @@ -45,6 +45,8 @@ TESTSUITE_AT = \ | ||
98 | testsuite.at\ | ||
99 | inout.at\ | ||
100 | symlink.at\ | ||
101 | + symlink-bad-length.at\ | ||
102 | + symlink-long.at\ | ||
103 | version.at | ||
104 | |||
105 | TESTSUITE = $(srcdir)/testsuite | ||
106 | diff -Nurp cpio-2.8.orig/tests/symlink-bad-length.at cpio-2.8/tests/symlink-bad-length.at | ||
107 | --- cpio-2.8.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800 | ||
108 | +++ cpio-2.8/tests/symlink-bad-length.at 2014-12-08 11:33:25.283783507 +0800 | ||
109 | @@ -0,0 +1,49 @@ | ||
110 | +# Process this file with autom4te to create testsuite. -*- Autotest -*- | ||
111 | +# Copyright (C) 2014 Free Software Foundation, Inc. | ||
112 | + | ||
113 | +# This program is free software; you can redistribute it and/or modify | ||
114 | +# it under the terms of the GNU General Public License as published by | ||
115 | +# the Free Software Foundation; either version 3, or (at your option) | ||
116 | +# any later version. | ||
117 | + | ||
118 | +# This program is distributed in the hope that it will be useful, | ||
119 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
120 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
121 | +# GNU General Public License for more details. | ||
122 | + | ||
123 | +# You should have received a copy of the GNU General Public License | ||
124 | +# along with this program; if not, write to the Free Software | ||
125 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
126 | +# 02110-1301 USA. | ||
127 | + | ||
128 | +# Cpio v2.11 did segfault with badly set symlink length. | ||
129 | +# References: | ||
130 | +# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html | ||
131 | + | ||
132 | +AT_SETUP([symlink-bad-length]) | ||
133 | +AT_KEYWORDS([symlink-long copyout]) | ||
134 | + | ||
135 | +AT_DATA([ARCHIVE.base64], | ||
136 | +[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv | ||
137 | +JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF | ||
138 | +UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
139 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
140 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
141 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
142 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
143 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
144 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= | ||
145 | +]) | ||
146 | + | ||
147 | +AT_CHECK([ | ||
148 | +base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST | ||
149 | +cpio -ntv < ARCHIVE | ||
150 | +test $? -eq 2 | ||
151 | +], | ||
152 | +[0], | ||
153 | +[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE | ||
154 | +],[cpio: LINK: stored filename length too big | ||
155 | +cpio: premature end of file | ||
156 | +]) | ||
157 | + | ||
158 | +AT_CLEANUP | ||
159 | diff -Nurp cpio-2.8.orig/tests/symlink-long.at cpio-2.8/tests/symlink-long.at | ||
160 | --- cpio-2.8.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800 | ||
161 | +++ cpio-2.8/tests/symlink-long.at 2014-12-08 11:34:28.807781024 +0800 | ||
162 | @@ -0,0 +1,46 @@ | ||
163 | +# Process this file with autom4te to create testsuite. -*- Autotest -*- | ||
164 | +# Copyright (C) 2014 Free Software Foundation, Inc. | ||
165 | + | ||
166 | +# This program is free software; you can redistribute it and/or modify | ||
167 | +# it under the terms of the GNU General Public License as published by | ||
168 | +# the Free Software Foundation; either version 3, or (at your option) | ||
169 | +# any later version. | ||
170 | + | ||
171 | +# This program is distributed in the hope that it will be useful, | ||
172 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
173 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
174 | +# GNU General Public License for more details. | ||
175 | + | ||
176 | +# You should have received a copy of the GNU General Public License | ||
177 | +# along with this program; if not, write to the Free Software | ||
178 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
179 | +# 02110-1301 USA. | ||
180 | + | ||
181 | +# Cpio v2.11.90 changed the way symlink name is read from archive. | ||
182 | +# References: | ||
183 | +# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html | ||
184 | + | ||
185 | +AT_SETUP([symlink-long]) | ||
186 | +AT_KEYWORDS([symlink-long copyout]) | ||
187 | + | ||
188 | +AT_CHECK([ | ||
189 | + | ||
190 | +# len(dirname) > READBUFSIZE | ||
191 | +dirname= | ||
192 | +for i in {1..52}; do | ||
193 | + dirname="xxxxxxxxx/$dirname" | ||
194 | + mkdir "$dirname" | ||
195 | +done | ||
196 | +ln -s "$dirname" x || AT_SKIP_TEST | ||
197 | + | ||
198 | +echo x | cpio -o > ar | ||
199 | +list=`cpio -tv < ar | sed 's|.*-> ||'` | ||
200 | +test "$list" = "$dirname" && echo success || echo fail | ||
201 | +], | ||
202 | +[0], | ||
203 | +[success | ||
204 | +],[2 blocks | ||
205 | +2 blocks | ||
206 | +]) | ||
207 | + | ||
208 | +AT_CLEANUP | ||
209 | diff -Nurp cpio-2.8.orig/tests/testsuite.at cpio-2.8/tests/testsuite.at | ||
210 | --- cpio-2.8.orig/tests/testsuite.at 2006-10-24 18:32:13.000000000 +0800 | ||
211 | +++ cpio-2.8/tests/testsuite.at 2014-12-08 11:34:56.515779942 +0800 | ||
212 | @@ -31,3 +31,5 @@ m4_include([version.at]) | ||
213 | |||
214 | m4_include([inout.at]) | ||
215 | m4_include([symlink.at]) | ||
216 | +m4_include([symlink-bad-length.at]) | ||
217 | +m4_include([symlink-long.at]) | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch new file mode 100644 index 0000000000..e16585dd3f --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-Status: Inappropriate [licensing] | ||
2 | |||
3 | # Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. | ||
4 | # This is needed to configure correctly with newer versions of autoconf. | ||
5 | |||
6 | diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4 | ||
7 | --- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700 | ||
8 | +++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700 | ||
9 | @@ -1,4 +1,4 @@ | ||
10 | -# serial 4 -*- Autoconf -*- | ||
11 | +# serial 5 -*- Autoconf -*- | ||
12 | # Enable extensions on systems that normally disable them. | ||
13 | |||
14 | # Copyright (C) 2003, 2006 Free Software Foundation, Inc. | ||
15 | @@ -16,6 +16,7 @@ | ||
16 | # ------------------------ | ||
17 | # Enable extensions on systems that normally disable them, | ||
18 | # typically due to standards-conformance issues. | ||
19 | +m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ | ||
20 | AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
21 | [ | ||
22 | AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
23 | @@ -48,7 +49,7 @@ | ||
24 | AC_DEFINE([__EXTENSIONS__]) | ||
25 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
26 | AC_DEFINE([_TANDEM_SOURCE]) | ||
27 | -]) | ||
28 | +])]) | ||
29 | |||
30 | # gl_USE_SYSTEM_EXTENSIONS | ||
31 | # ------------------------ | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch new file mode 100644 index 0000000000..a00799fea9 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Inappropriate [licensing] | ||
2 | |||
3 | # Avoid multiple stat definitions | ||
4 | # Patch taken from cpio mailing list posting 2010-03-19 | ||
5 | |||
6 | diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h | ||
7 | --- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800 | ||
8 | +++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700 | ||
9 | @@ -82,4 +82,6 @@ | ||
10 | #define lstat stat | ||
11 | #endif | ||
12 | int lstat (); | ||
13 | +#ifndef stat | ||
14 | int stat (); | ||
15 | +#endif | ||
diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb new file mode 100644 index 0000000000..053888f1c0 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio_2.11.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | include cpio_v2.inc | ||
2 | |||
3 | LICENSE = "GPLv3" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" | ||
5 | |||
6 | PR = "r5" | ||
7 | |||
8 | SRC_URI += "file://remove-gets.patch \ | ||
9 | file://fix-memory-overrun.patch \ | ||
10 | file://cpio-CVE-2015-1197.patch \ | ||
11 | " | ||
12 | |||
13 | SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c" | ||
14 | SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978" | ||
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb new file mode 100644 index 0000000000..3f97dbe2ce --- /dev/null +++ b/meta/recipes-extended/cpio/cpio_2.8.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | require cpio_v2.inc | ||
2 | |||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b" | ||
5 | |||
6 | PR = "r4" | ||
7 | |||
8 | SRC_URI += "file://m4extensions.patch \ | ||
9 | file://avoid_heap_overflow.patch \ | ||
10 | file://fix-memory-overrun.patch \ | ||
11 | " | ||
12 | |||
13 | SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1" | ||
14 | SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad" | ||
15 | |||
16 | # Required to build with gcc 4.3 and later: | ||
17 | CFLAGS += "-fgnu89-inline" | ||
diff --git a/meta/recipes-extended/cpio/cpio_v2.inc b/meta/recipes-extended/cpio/cpio_v2.inc new file mode 100644 index 0000000000..93de4bb92b --- /dev/null +++ b/meta/recipes-extended/cpio/cpio_v2.inc | |||
@@ -0,0 +1,40 @@ | |||
1 | SUMMARY = "GNU cpio is a program to manage archives of files" | ||
2 | DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \ | ||
3 | another. It handles a number of cpio formats as well as reading and writing tar files." | ||
4 | HOMEPAGE = "http://www.gnu.org/software/cpio/" | ||
5 | SECTION = "base" | ||
6 | |||
7 | DEPENDS = "texinfo-native" | ||
8 | |||
9 | SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ | ||
10 | file://statdef.patch \ | ||
11 | " | ||
12 | |||
13 | inherit autotools gettext texinfo | ||
14 | |||
15 | S = "${WORKDIR}/cpio-${PV}" | ||
16 | |||
17 | EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" | ||
18 | |||
19 | do_install () { | ||
20 | autotools_do_install | ||
21 | install -d ${D}${base_bindir}/ | ||
22 | mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio" | ||
23 | rmdir ${D}${bindir}/ | ||
24 | } | ||
25 | |||
26 | PACKAGES =+ "${PN}-rmt" | ||
27 | |||
28 | FILES_${PN}-rmt = "${base_sbindir}/rmt*" | ||
29 | |||
30 | inherit update-alternatives | ||
31 | |||
32 | ALTERNATIVE_PRIORITY = "100" | ||
33 | |||
34 | ALTERNATIVE_${PN} = "cpio" | ||
35 | ALTERNATIVE_${PN}-rmt = "rmt" | ||
36 | |||
37 | ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio" | ||
38 | |||
39 | ALTERNATIVE_PRIORITY[rmt] = "50" | ||
40 | ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt" | ||
diff --git a/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch new file mode 100644 index 0000000000..8e0f40642a --- /dev/null +++ b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch | |||
@@ -0,0 +1,332 @@ | |||
1 | From dae29a98c066bc67bb5ba12219d5fd68a8675514 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 26 Apr 2013 20:44:10 +0800 | ||
4 | Subject: [PATCH] packlib.c: support dictionary byte-order dependent | ||
5 | |||
6 | The previous dict files are NOT byte-order independent, in fact they are | ||
7 | probably ARCHITECTURE SPECIFIC. | ||
8 | Create the dict files in big endian, and convert to host endian while | ||
9 | load them. This could fix the endian issue on multiple platform. | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
12 | Upstream-Status: Pending | ||
13 | |||
14 | We can't use the endian.h, htobe* and be*toh functions because they are | ||
15 | not available on older versions of glibc, such as that found in RHEL | ||
16 | 5.9. | ||
17 | |||
18 | Change to checking endian and directly calling bswap_* as defined in | ||
19 | byteswap.h. | ||
20 | |||
21 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
22 | |||
23 | --- | ||
24 | lib/packlib.c | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- | ||
25 | 1 file changed, 204 insertions(+), 4 deletions(-) | ||
26 | |||
27 | Index: cracklib-2.8.22/lib/packlib.c | ||
28 | =================================================================== | ||
29 | --- cracklib-2.8.22.orig/lib/packlib.c | ||
30 | +++ cracklib-2.8.22/lib/packlib.c | ||
31 | @@ -16,6 +16,12 @@ | ||
32 | #ifdef HAVE_STDINT_H | ||
33 | #include <stdint.h> | ||
34 | #endif | ||
35 | + | ||
36 | +#ifndef _BSD_SOURCE | ||
37 | +#define _BSD_SOURCE /* See feature_test_macros(7) */ | ||
38 | +#endif | ||
39 | +#include <endian.h> | ||
40 | +#include <byteswap.h> | ||
41 | #include "packer.h" | ||
42 | |||
43 | static const char vers_id[] = "packlib.c : v2.3p2 Alec Muffett 18 May 1993"; | ||
44 | @@ -45,6 +51,182 @@ typedef struct | ||
45 | char data_get[NUMWORDS][MAXWORDLEN]; | ||
46 | } PWDICT64; | ||
47 | |||
48 | +enum{ | ||
49 | + en_is32, | ||
50 | + en_is64 | ||
51 | +}; | ||
52 | + | ||
53 | +static int | ||
54 | +IheaderHostToBigEndian(char *pHeader, int nBitType) | ||
55 | +{ | ||
56 | + if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN) | ||
57 | + { | ||
58 | + struct pi_header64 *pHeader64 = (struct pi_header64*)pHeader; | ||
59 | + | ||
60 | + pHeader64->pih_magic = bswap_64(pHeader64->pih_magic); | ||
61 | + pHeader64->pih_numwords = bswap_64(pHeader64->pih_numwords); | ||
62 | + pHeader64->pih_blocklen = bswap_16(pHeader64->pih_blocklen); | ||
63 | + pHeader64->pih_pad = bswap_16(pHeader64->pih_pad); | ||
64 | + | ||
65 | +#if DEBUG | ||
66 | + printf("Header64: magic %x, numwords %x, blocklen %x, pad %x\n", | ||
67 | + pHeader64->pih_magic, pHeader64->pih_numwords, | ||
68 | + pHeader64->pih_blocklen, pHeader64->pih_pad); | ||
69 | +#endif | ||
70 | + } | ||
71 | + else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN) | ||
72 | + { | ||
73 | + struct pi_header *pHeader32 = (struct pi_header*)pHeader; | ||
74 | + | ||
75 | + pHeader32->pih_magic = bswap_32(pHeader32->pih_magic); | ||
76 | + pHeader32->pih_numwords = bswap_32(pHeader32->pih_numwords); | ||
77 | + pHeader32->pih_blocklen = bswap_16(pHeader32->pih_blocklen); | ||
78 | + pHeader32->pih_pad = bswap_16(pHeader32->pih_pad); | ||
79 | + | ||
80 | +#if DEBUG | ||
81 | + printf("Header32: magic %x, numwords %x, blocklen %x, pad %x\n", | ||
82 | + pHeader32->pih_magic, pHeader32->pih_numwords, | ||
83 | + pHeader32->pih_blocklen, pHeader32->pih_pad); | ||
84 | +#endif | ||
85 | + } | ||
86 | + else if (__BYTE_ORDER == __LITTLE_ENDIAN) | ||
87 | + { | ||
88 | + fprintf(stderr, "Neither 32 or 64: %d\n", nBitType); | ||
89 | + return (-1); | ||
90 | + } | ||
91 | + | ||
92 | + return 0; | ||
93 | +} | ||
94 | + | ||
95 | +static int | ||
96 | +IheaderBigEndianToHost(char *pHeader, int nBitType) | ||
97 | +{ | ||
98 | + if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN) | ||
99 | + { | ||
100 | + struct pi_header64 *pHeader64 = (struct pi_header64*)pHeader; | ||
101 | + | ||
102 | + pHeader64->pih_magic = bswap_64(pHeader64->pih_magic); | ||
103 | + pHeader64->pih_numwords = bswap_64(pHeader64->pih_numwords); | ||
104 | + pHeader64->pih_blocklen = bswap_16(pHeader64->pih_blocklen); | ||
105 | + pHeader64->pih_pad = bswap_16(pHeader64->pih_pad); | ||
106 | + | ||
107 | +#if DEBUG | ||
108 | + printf("Header64: magic %x, numwords %x, blocklen %x, pad %x\n", | ||
109 | + pHeader64->pih_magic, pHeader64->pih_numwords, | ||
110 | + pHeader64->pih_blocklen, pHeader64->pih_pad); | ||
111 | +#endif | ||
112 | + } | ||
113 | + else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN) | ||
114 | + { | ||
115 | + struct pi_header *pHeader32 = (struct pi_header*)pHeader; | ||
116 | + | ||
117 | + pHeader32->pih_magic = bswap_32(pHeader32->pih_magic); | ||
118 | + pHeader32->pih_numwords = bswap_32(pHeader32->pih_numwords); | ||
119 | + pHeader32->pih_blocklen = bswap_16(pHeader32->pih_blocklen); | ||
120 | + pHeader32->pih_pad = bswap_16(pHeader32->pih_pad); | ||
121 | + | ||
122 | +#if DEBUG | ||
123 | + printf("Header32: magic %x, numwords %x, blocklen %x, pad %x\n", | ||
124 | + pHeader32->pih_magic, pHeader32->pih_numwords, | ||
125 | + pHeader32->pih_blocklen, pHeader32->pih_pad); | ||
126 | +#endif | ||
127 | + } | ||
128 | + else if (__BYTE_ORDER == __LITTLE_ENDIAN) | ||
129 | + { | ||
130 | + fprintf(stderr, "Neither 32 or 64: %d\n", nBitType); | ||
131 | + return (-1); | ||
132 | + } | ||
133 | + | ||
134 | + return 0; | ||
135 | +} | ||
136 | + | ||
137 | +static int | ||
138 | +HwmsHostToBigEndian(char *pHwms, int nLen,int nBitType) | ||
139 | +{ | ||
140 | + int i = 0; | ||
141 | + | ||
142 | + if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN) | ||
143 | + { | ||
144 | + uint64_t *pHwms64 = (uint64_t*)pHwms; | ||
145 | + | ||
146 | + for (i = 0; i < nLen / sizeof(uint64_t); i++) | ||
147 | + { | ||
148 | + *pHwms64++ = bswap_64(*pHwms64); | ||
149 | + } | ||
150 | + | ||
151 | + } | ||
152 | + else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN) | ||
153 | + { | ||
154 | + uint32_t *pHwms32 = (uint32_t*)pHwms; | ||
155 | + | ||
156 | + for (i = 0; i < nLen / sizeof(uint32_t); i++) | ||
157 | + { | ||
158 | + *pHwms32++ = bswap_32(*pHwms32); | ||
159 | + } | ||
160 | + | ||
161 | + } | ||
162 | + else if (__BYTE_ORDER == __LITTLE_ENDIAN) | ||
163 | + { | ||
164 | + fprintf(stderr, "Neither 32 or 64: %d\n", nBitType); | ||
165 | + return (-1); | ||
166 | + } | ||
167 | + | ||
168 | +#if DEBUG | ||
169 | + for (i = 0; i < nLen; i+=8) | ||
170 | + { | ||
171 | + printf("hwms%s: %02X %02X %02X %02X %02X %02X %02X %02X\n", | ||
172 | + nBitType==en_is64?"64":"32", pHwms[i+0]&0xFF, pHwms[i+1]&0xFF, | ||
173 | + pHwms[i+2]&0xFF, pHwms[i+3]&0xFF, pHwms[i+4]&0xFF, | ||
174 | + pHwms[i+5]&0xFF, pHwms[i+6]&0xFF, pHwms[i+7]&0xFF); | ||
175 | + } | ||
176 | +#endif | ||
177 | + | ||
178 | + return 0; | ||
179 | +} | ||
180 | + | ||
181 | +static int | ||
182 | +HwmsBigEndianToHost(char *pHwms, int nLen, int nBitType) | ||
183 | +{ | ||
184 | + int i = 0; | ||
185 | + | ||
186 | + if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN) | ||
187 | + { | ||
188 | + uint64_t *pHwms64 = (uint64_t*)pHwms; | ||
189 | + | ||
190 | + for (i = 0; i < nLen / sizeof(uint64_t); i++) | ||
191 | + { | ||
192 | + *pHwms64++ = bswap_64(*pHwms64); | ||
193 | + } | ||
194 | + | ||
195 | + } | ||
196 | + else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN) | ||
197 | + { | ||
198 | + uint32_t *pHwms32 = (uint32_t*)pHwms; | ||
199 | + | ||
200 | + for (i = 0; i < nLen / sizeof(uint32_t); i++) | ||
201 | + { | ||
202 | + *pHwms32++ = bswap_32(*pHwms32); | ||
203 | + } | ||
204 | + | ||
205 | + } | ||
206 | + else if (__BYTE_ORDER == __LITTLE_ENDIAN) | ||
207 | + { | ||
208 | + fprintf(stderr, "Neither 32 or 64: %d\n", nBitType); | ||
209 | + return (-1); | ||
210 | + } | ||
211 | + | ||
212 | +#if DEBUG | ||
213 | + for (i = 0; i < nLen; i+=8) | ||
214 | + { | ||
215 | + printf("hwms%s: %02X %02X %02X %02X %02X %02X %02X %02X\n", | ||
216 | + nBitType==en_is64?"64":"32", pHwms[i+0]&0xFF, pHwms[i+1]&0xFF, | ||
217 | + pHwms[i+2]&0xFF, pHwms[i+3]&0xFF, pHwms[i+4]&0xFF, | ||
218 | + pHwms[i+5]&0xFF, pHwms[i+6]&0xFF, pHwms[i+7]&0xFF); | ||
219 | + } | ||
220 | +#endif | ||
221 | + | ||
222 | + return 0; | ||
223 | +} | ||
224 | |||
225 | static int | ||
226 | _PWIsBroken64(FILE *ifp) | ||
227 | @@ -57,6 +239,7 @@ _PWIsBroken64(FILE *ifp) | ||
228 | return 0; | ||
229 | } | ||
230 | |||
231 | + IheaderBigEndianToHost((char *) &pdesc64.header, en_is64); | ||
232 | return (pdesc64.header.pih_magic == PIH_MAGIC); | ||
233 | } | ||
234 | |||
235 | @@ -149,7 +332,11 @@ PWOpen(prefix, mode) | ||
236 | pdesc.header.pih_blocklen = NUMWORDS; | ||
237 | pdesc.header.pih_numwords = 0; | ||
238 | |||
239 | - fwrite((char *) &pdesc.header, sizeof(pdesc.header), 1, ifp); | ||
240 | + struct pi_header tmpheader32; | ||
241 | + | ||
242 | + memcpy(&tmpheader32, &pdesc.header, sizeof(pdesc.header)); | ||
243 | + IheaderHostToBigEndian((char *) &tmpheader32, en_is32); | ||
244 | + fwrite((char *) &tmpheader32, sizeof(tmpheader32), 1, ifp); | ||
245 | } else | ||
246 | { | ||
247 | pdesc.flags &= ~PFOR_WRITE; | ||
248 | @@ -173,6 +360,7 @@ PWOpen(prefix, mode) | ||
249 | return ((PWDICT *) 0); | ||
250 | } | ||
251 | |||
252 | + IheaderBigEndianToHost((char *) &pdesc.header, en_is32); | ||
253 | if ((pdesc.header.pih_magic == 0) || (pdesc.header.pih_numwords == 0)) | ||
254 | { | ||
255 | /* uh-oh. either a broken "64-bit" file or a garbage file. */ | ||
256 | @@ -195,6 +383,7 @@ PWOpen(prefix, mode) | ||
257 | } | ||
258 | return ((PWDICT *) 0); | ||
259 | } | ||
260 | + IheaderBigEndianToHost((char *) &pdesc64.header, en_is64); | ||
261 | if (pdesc64.header.pih_magic != PIH_MAGIC) | ||
262 | { | ||
263 | /* nope, not "64-bit" after all */ | ||
264 | @@ -290,6 +479,7 @@ PWOpen(prefix, mode) | ||
265 | { | ||
266 | pdesc.flags &= ~PFOR_USEHWMS; | ||
267 | } | ||
268 | + HwmsBigEndianToHost((char*)pdesc64.hwms, sizeof(pdesc64.hwms), en_is64); | ||
269 | for (i = 0; i < sizeof(pdesc.hwms) / sizeof(pdesc.hwms[0]); i++) | ||
270 | { | ||
271 | pdesc.hwms[i] = pdesc64.hwms[i]; | ||
272 | @@ -299,6 +489,7 @@ PWOpen(prefix, mode) | ||
273 | { | ||
274 | pdesc.flags &= ~PFOR_USEHWMS; | ||
275 | } | ||
276 | + HwmsBigEndianToHost((char*)pdesc.hwms, sizeof(pdesc.hwms), en_is32); | ||
277 | #if DEBUG | ||
278 | for (i=1; i<=0xff; i++) | ||
279 | { | ||
280 | @@ -332,7 +523,11 @@ PWClose(pwp) | ||
281 | return (-1); | ||
282 | } | ||
283 | |||
284 | - if (!fwrite((char *) &pwp->header, sizeof(pwp->header), 1, pwp->ifp)) | ||
285 | + struct pi_header tmpheader32; | ||
286 | + | ||
287 | + memcpy(&tmpheader32, &pwp->header, sizeof(pwp->header)); | ||
288 | + IheaderHostToBigEndian((char *) &tmpheader32, en_is32); | ||
289 | + if (!fwrite((char *) &tmpheader32, sizeof(tmpheader32), 1, pwp->ifp)) | ||
290 | { | ||
291 | fprintf(stderr, "index magic fwrite failed\n"); | ||
292 | return (-1); | ||
293 | @@ -351,7 +546,12 @@ PWClose(pwp) | ||
294 | printf("hwm[%02x] = %d\n", i, pwp->hwms[i]); | ||
295 | #endif | ||
296 | } | ||
297 | - fwrite(pwp->hwms, 1, sizeof(pwp->hwms), pwp->wfp); | ||
298 | + | ||
299 | + PWDICT tmp_pwp; | ||
300 | + | ||
301 | + memcpy(&tmp_pwp, pwp, sizeof(PWDICT)); | ||
302 | + HwmsHostToBigEndian(tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32); | ||
303 | + fwrite(tmp_pwp.hwms, 1, sizeof(tmp_pwp.hwms), pwp->wfp); | ||
304 | } | ||
305 | } | ||
306 | |||
307 | @@ -405,7 +605,8 @@ PutPW(pwp, string) | ||
308 | |||
309 | datum = (uint32_t) ftell(pwp->dfp); | ||
310 | |||
311 | - fwrite((char *) &datum, sizeof(datum), 1, pwp->ifp); | ||
312 | + uint32_t tmpdatum = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_32(datum) : datum; | ||
313 | + fwrite((char *) &tmpdatum, sizeof(tmpdatum), 1, pwp->ifp); | ||
314 | |||
315 | fputs(pwp->data_put[0], pwp->dfp); | ||
316 | putc(0, pwp->dfp); | ||
317 | @@ -473,6 +674,7 @@ GetPW(pwp, number) | ||
318 | perror("(index fread failed)"); | ||
319 | return ((char *) 0); | ||
320 | } | ||
321 | + datum64 = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_64(datum64) : datum64; | ||
322 | datum = datum64; | ||
323 | } else { | ||
324 | if (fseek(pwp->ifp, sizeof(struct pi_header) + (thisblock * sizeof(uint32_t)), 0)) | ||
325 | @@ -486,6 +688,7 @@ GetPW(pwp, number) | ||
326 | perror("(index fread failed)"); | ||
327 | return ((char *) 0); | ||
328 | } | ||
329 | + datum = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_32(datum) : datum; | ||
330 | } | ||
331 | |||
332 | int r = 1; | ||
diff --git a/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch new file mode 100644 index 0000000000..6210e82121 --- /dev/null +++ b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 06f9a88b5dd5597f9198ea0cb34f5e96f180e6e3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Sat, 27 Apr 2013 16:02:30 +0800 | ||
4 | Subject: [PATCH] craklib:fix testnum and teststr failed | ||
5 | |||
6 | Error log: | ||
7 | ... | ||
8 | $ ./testnum | ||
9 | (null).pwd.gz: No such file or directory | ||
10 | PWOpen: No such file or directory | ||
11 | |||
12 | $ ./util/teststr | ||
13 | (null).pwd.gz: No such file or directory | ||
14 | PWOpen: No such file or directory | ||
15 | ... | ||
16 | Set DEFAULT_CRACKLIB_DICT as the path of PWOpen | ||
17 | |||
18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
19 | Upstream-Status: Pending | ||
20 | --- | ||
21 | util/testnum.c | 2 +- | ||
22 | util/teststr.c | 2 +- | ||
23 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/util/testnum.c b/util/testnum.c | ||
26 | index ae2246d..ca210ff 100644 | ||
27 | --- a/util/testnum.c | ||
28 | +++ b/util/testnum.c | ||
29 | @@ -20,7 +20,7 @@ main () | ||
30 | PWDICT *pwp; | ||
31 | char buffer[STRINGSIZE]; | ||
32 | |||
33 | - if (!(pwp = PWOpen (NULL, "r"))) | ||
34 | + if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r"))) | ||
35 | { | ||
36 | perror ("PWOpen"); | ||
37 | return (-1); | ||
38 | diff --git a/util/teststr.c b/util/teststr.c | ||
39 | index 2a31fa4..9fb9cda 100644 | ||
40 | --- a/util/teststr.c | ||
41 | +++ b/util/teststr.c | ||
42 | @@ -15,7 +15,7 @@ main () | ||
43 | PWDICT *pwp; | ||
44 | char buffer[STRINGSIZE]; | ||
45 | |||
46 | - if (!(pwp = PWOpen (NULL, "r"))) | ||
47 | + if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r"))) | ||
48 | { | ||
49 | perror ("PWOpen"); | ||
50 | return (-1); | ||
51 | -- | ||
52 | 1.7.10.4 | ||
53 | |||
diff --git a/meta/recipes-extended/cracklib/cracklib_2.9.1.bb b/meta/recipes-extended/cracklib/cracklib_2.9.1.bb new file mode 100644 index 0000000000..99ccde3ba3 --- /dev/null +++ b/meta/recipes-extended/cracklib/cracklib_2.9.1.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "Password strength checker library" | ||
2 | HOMEPAGE = "http://sourceforge.net/projects/cracklib" | ||
3 | |||
4 | LICENSE = "LGPLv2.1+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06" | ||
6 | |||
7 | DEPENDS = "cracklib-native zlib" | ||
8 | DEPENDS_class-native = "zlib-native" | ||
9 | |||
10 | EXTRA_OECONF = "--without-python --libdir=${base_libdir}" | ||
11 | |||
12 | SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \ | ||
13 | file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \ | ||
14 | file://0002-craklib-fix-testnum-and-teststr-failed.patch" | ||
15 | |||
16 | SRC_URI[md5sum] = "90536219c520add2ceb3c26f0d7da404" | ||
17 | SRC_URI[sha256sum] = "408905c2539a97dc8cbbb6d7cd2046cb5647a345b4bda399220d9471be16d156" | ||
18 | |||
19 | inherit autotools-brokensep gettext | ||
20 | |||
21 | do_install_append_class-target() { | ||
22 | create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small | ||
23 | } | ||
24 | |||
25 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-extended/cronie/cronie/crond.init b/meta/recipes-extended/cronie/cronie/crond.init new file mode 100755 index 0000000000..53b8514caa --- /dev/null +++ b/meta/recipes-extended/cronie/cronie/crond.init | |||
@@ -0,0 +1,58 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: crond crontab | ||
4 | # Default-Start: 2345 | ||
5 | # Default-Stop: 016 | ||
6 | # Short-Description: run cron daemon | ||
7 | # Description: cron is a standard UNIX program that runs user-specified | ||
8 | # programs at periodic scheduled times. vixie cron adds a | ||
9 | # number of features to the basic UNIX cron, including better | ||
10 | # security and more powerful configuration options. | ||
11 | ### END INIT INFO | ||
12 | |||
13 | CROND=/usr/sbin/crond | ||
14 | CONFIG=/etc/sysconfig/crond | ||
15 | |||
16 | [ -f $CONFIG ] || exit 1 | ||
17 | [ -x $CROND ] || exit 1 | ||
18 | |||
19 | . $CONFIG | ||
20 | |||
21 | # Source function library. | ||
22 | . /etc/init.d/functions | ||
23 | |||
24 | case "$1" in | ||
25 | start) | ||
26 | echo -n "Starting crond: " | ||
27 | start-stop-daemon --start --quiet --exec $CROND -- $CRONDARGS | ||
28 | RETVAL=$? | ||
29 | if [ $RETVAL -eq 0 ] ; then | ||
30 | echo "OK" | ||
31 | else | ||
32 | echo "FAIL" | ||
33 | fi | ||
34 | ;; | ||
35 | stop) | ||
36 | echo -n "Stopping crond: " | ||
37 | start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid | ||
38 | RETVAL=$? | ||
39 | if [ $RETVAL -eq 0 ] ; then | ||
40 | echo "OK" | ||
41 | else | ||
42 | echo "FAIL" | ||
43 | fi | ||
44 | ;; | ||
45 | status) | ||
46 | status crond | ||
47 | exit $? | ||
48 | ;; | ||
49 | restart) | ||
50 | $0 stop && sleep 1 && $0 start | ||
51 | ;; | ||
52 | *) | ||
53 | echo "Usage: /etc/init.d/crond {start|stop|status|restart}" | ||
54 | exit 1 | ||
55 | esac | ||
56 | |||
57 | exit 0 | ||
58 | |||
diff --git a/meta/recipes-extended/cronie/cronie/crond.service b/meta/recipes-extended/cronie/cronie/crond.service new file mode 100644 index 0000000000..d435a6eb34 --- /dev/null +++ b/meta/recipes-extended/cronie/cronie/crond.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Periodic Command Scheduler | ||
3 | |||
4 | [Service] | ||
5 | EnvironmentFile=/etc/sysconfig/crond | ||
6 | ExecStart=@SBINDIR@/crond -n $CRONDARGS | ||
7 | ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID | ||
8 | Restart=always | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-extended/cronie/cronie/crond_pam_config.patch b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch new file mode 100644 index 0000000000..675872c3cf --- /dev/null +++ b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | password-auth is the Fedora's common pam configure file, use oe common pam | ||
2 | configure files instead. | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
7 | --- cronie-1.4.7/pam/crond.orig 2010-12-16 16:59:02.000000000 +0800 | ||
8 | +++ cronie-1.4.7/pam/crond 2011-07-20 09:47:16.080819203 +0800 | ||
9 | @@ -4,7 +4,7 @@ | ||
10 | # | ||
11 | # No PAM authentication called, auth modules not needed | ||
12 | account required pam_access.so | ||
13 | -account include password-auth | ||
14 | +account include common-account | ||
15 | session required pam_loginuid.so | ||
16 | -session include password-auth | ||
17 | -auth include password-auth | ||
18 | +session include common-session-noninteractive | ||
19 | +auth include common-auth | ||
diff --git a/meta/recipes-extended/cronie/cronie/crontab b/meta/recipes-extended/cronie/cronie/crontab new file mode 100644 index 0000000000..cc9169eda9 --- /dev/null +++ b/meta/recipes-extended/cronie/cronie/crontab | |||
@@ -0,0 +1,10 @@ | |||
1 | # /etc/crontab: system-wide crontab | ||
2 | # Unlike any other crontab you don't have to run the `crontab' | ||
3 | # command to install the new version when you edit this file | ||
4 | # and files in /etc/cron.d. These files also have username fields, | ||
5 | # that none of the other crontabs do. | ||
6 | |||
7 | SHELL=/bin/sh | ||
8 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | ||
9 | |||
10 | # m h dom mon dow user command | ||
diff --git a/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch b/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch new file mode 100644 index 0000000000..7384a0bad4 --- /dev/null +++ b/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | For an out of tree build, the cronie-common.h file was not being | ||
2 | found correctly, so point it to the top_srcdir | ||
3 | |||
4 | Upstream-Status: Submitted | ||
5 | |||
6 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
7 | |||
8 | Index: cronie-1.4.11/anacron/Makefile.am | ||
9 | =================================================================== | ||
10 | --- cronie-1.4.11.orig/anacron/Makefile.am | ||
11 | +++ cronie-1.4.11/anacron/Makefile.am | ||
12 | @@ -9,6 +9,7 @@ common_nodist = anacron-paths.h | ||
13 | nodist_anacron_SOURCES = $(common_nodist) | ||
14 | BUILT_SOURCES = $(common_nodist) | ||
15 | |||
16 | +AM_CFLAGS = -I$(top_srcdir) | ||
17 | |||
18 | LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT) | ||
19 | |||
20 | Index: cronie-1.4.11/src/Makefile.am | ||
21 | =================================================================== | ||
22 | --- cronie-1.4.11.orig/src/Makefile.am | ||
23 | +++ cronie-1.4.11/src/Makefile.am | ||
24 | @@ -15,6 +15,7 @@ nodist_crond_SOURCES = $(common_nodist) | ||
25 | nodist_crontab_SOURCES = $(common_nodist) | ||
26 | BUILT_SOURCES = $(common_nodist) | ||
27 | |||
28 | +AM_CFLAGS = -I$(top_srcdir) | ||
29 | |||
30 | LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT) | ||
31 | |||
diff --git a/meta/recipes-extended/cronie/cronie_1.4.11.bb b/meta/recipes-extended/cronie/cronie_1.4.11.bb new file mode 100644 index 0000000000..02234f6a36 --- /dev/null +++ b/meta/recipes-extended/cronie/cronie_1.4.11.bb | |||
@@ -0,0 +1,85 @@ | |||
1 | SUMMARY = "Cron daemon for executing programs at set times" | ||
2 | DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \ | ||
3 | specified programs at scheduled times and related tools. It is based on the \ | ||
4 | original cron and has security and configuration enhancements like the \ | ||
5 | ability to use pam and SELinux." | ||
6 | HOMEPAGE = "https://fedorahosted.org/cronie/" | ||
7 | BUGTRACKER = "mmaslano@redhat.com" | ||
8 | |||
9 | # Internet Systems Consortium License | ||
10 | LICENSE = "ISC & BSD" | ||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \ | ||
12 | file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \ | ||
13 | file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9" | ||
14 | |||
15 | SECTION = "utils" | ||
16 | |||
17 | |||
18 | SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \ | ||
19 | file://fix-out-of-tree-build.patch \ | ||
20 | file://crond.init \ | ||
21 | file://crontab \ | ||
22 | file://crond.service \ | ||
23 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" | ||
24 | |||
25 | PAM_SRC_URI = "file://crond_pam_config.patch" | ||
26 | PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid" | ||
27 | |||
28 | SRC_URI[md5sum] = "2ba645cf54de17f138ef70312843862f" | ||
29 | SRC_URI[sha256sum] = "fd08084cedddbb42499f80ddb7f2158195c3555c2ff40ee11d4ece2f9864d7be" | ||
30 | |||
31 | inherit autotools update-rc.d useradd systemd | ||
32 | |||
33 | |||
34 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
35 | |||
36 | PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit," | ||
37 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}" | ||
38 | |||
39 | |||
40 | INITSCRIPT_NAME = "crond" | ||
41 | INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ." | ||
42 | |||
43 | USERADD_PACKAGES = "${PN}" | ||
44 | GROUPADD_PARAM_${PN} = "--system crontab" | ||
45 | |||
46 | SYSTEMD_SERVICE_${PN} = "crond.service" | ||
47 | |||
48 | do_install_append () { | ||
49 | install -d ${D}${sysconfdir}/sysconfig/ | ||
50 | install -d ${D}${sysconfdir}/init.d/ | ||
51 | install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond | ||
52 | install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond | ||
53 | |||
54 | # install systemd unit files | ||
55 | install -d ${D}${systemd_unitdir}/system | ||
56 | install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system | ||
57 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ | ||
58 | -e 's,@SBINDIR@,${sbindir},g' \ | ||
59 | ${D}${systemd_unitdir}/system/crond.service | ||
60 | |||
61 | # below are necessary for a complete cron environment | ||
62 | install -d ${D}${localstatedir}/spool/cron | ||
63 | install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/ | ||
64 | mkdir -p ${D}${sysconfdir}/cron.d | ||
65 | mkdir -p ${D}${sysconfdir}/cron.hourly | ||
66 | mkdir -p ${D}${sysconfdir}/cron.daily | ||
67 | mkdir -p ${D}${sysconfdir}/cron.weekly | ||
68 | mkdir -p ${D}${sysconfdir}/cron.monthly | ||
69 | touch ${D}${sysconfdir}/cron.deny | ||
70 | |||
71 | # below setting is necessary to allow normal user using crontab | ||
72 | |||
73 | # setgid for crontab binary | ||
74 | chown root:crontab ${D}${bindir}/crontab | ||
75 | chmod 2755 ${D}${bindir}/crontab | ||
76 | |||
77 | # allow 'crontab' group write to /var/spool/cron | ||
78 | chown root:crontab ${D}${localstatedir}/spool/cron | ||
79 | chmod 770 ${D}${localstatedir}/spool/cron | ||
80 | |||
81 | chmod 600 ${D}${sysconfdir}/crontab | ||
82 | } | ||
83 | |||
84 | FILES_${PN} += "${sysconfdir}/cron*" | ||
85 | |||
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc new file mode 100644 index 0000000000..fbdc48eab1 --- /dev/null +++ b/meta/recipes-extended/cups/cups.inc | |||
@@ -0,0 +1,136 @@ | |||
1 | SUMMARY = "An Internet printing system for Unix" | ||
2 | SECTION = "console/utils" | ||
3 | LICENSE = "GPLv2 & LGPLv2" | ||
4 | DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb" | ||
5 | |||
6 | SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \ | ||
7 | file://use_echo_only_in_init.patch \ | ||
8 | file://0001-don-t-try-to-run-generated-binaries.patch \ | ||
9 | file://cups_serverbin.patch \ | ||
10 | file://cups-no-gcrypt.patch \ | ||
11 | file://cups.socket \ | ||
12 | file://cups.path \ | ||
13 | file://cups.service \ | ||
14 | " | ||
15 | |||
16 | LEAD_SONAME = "libcupsdriver.so" | ||
17 | |||
18 | inherit autotools-brokensep binconfig useradd systemd | ||
19 | |||
20 | USERADD_PACKAGES = "${PN}" | ||
21 | GROUPADD_PARAM_${PN} = "--system lpadmin" | ||
22 | |||
23 | SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service" | ||
24 | |||
25 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ | ||
26 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
27 | PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" | ||
28 | PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" | ||
29 | PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" | ||
30 | |||
31 | EXTRA_OECONF = " \ | ||
32 | --enable-gnutls \ | ||
33 | --enable-dbus \ | ||
34 | --enable-browsing \ | ||
35 | --disable-openssl \ | ||
36 | --disable-gssapi \ | ||
37 | --enable-debug \ | ||
38 | --disable-relro \ | ||
39 | --enable-libusb \ | ||
40 | --without-php \ | ||
41 | --without-perl \ | ||
42 | --without-python \ | ||
43 | --without-java \ | ||
44 | " | ||
45 | |||
46 | |||
47 | do_configure() { | ||
48 | gnu-configize | ||
49 | libtoolize --force | ||
50 | autoconf --force | ||
51 | DSOFLAGS="${LDFLAGS}" SERVERBIN="${libdir}/cups" oe_runconf | ||
52 | } | ||
53 | |||
54 | do_compile () { | ||
55 | sed -i s:STRIP:NOSTRIP: Makedefs | ||
56 | sed -i s:serial:: backend/Makefile | ||
57 | |||
58 | echo "all:" > man/Makefile | ||
59 | echo "libs:" >> man/Makefile | ||
60 | echo "install:" >> man/Makefile | ||
61 | echo "install-data:" >> man/Makefile | ||
62 | echo "install-exec:" >> man/Makefile | ||
63 | echo "install-headers:" >> man/Makefile | ||
64 | echo "install-libs:" >> man/Makefile | ||
65 | |||
66 | oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \ | ||
67 | "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \ | ||
68 | "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \ | ||
69 | "LIBZ=-lz -L${STAGING_LIBDIR}" \ | ||
70 | "-I." | ||
71 | } | ||
72 | |||
73 | fakeroot do_install () { | ||
74 | oe_runmake "DSTROOT=${D}" install | ||
75 | |||
76 | # Remove /var/run from package as cupsd will populate it on startup | ||
77 | rm -fr ${D}/${localstatedir}/run | ||
78 | rmdir ${D}/${libdir}/${BPN}/driver | ||
79 | |||
80 | # Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES | ||
81 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then | ||
82 | rm -rf ${D}${sysconfdir}/init.d/ | ||
83 | rm -rf ${D}${sysconfdir}/rc* | ||
84 | fi | ||
85 | |||
86 | # Install systemd unit files | ||
87 | install -d ${D}${systemd_unitdir}/system | ||
88 | install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system | ||
89 | install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system | ||
90 | install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system | ||
91 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service | ||
92 | } | ||
93 | |||
94 | python do_package_append() { | ||
95 | import subprocess | ||
96 | # Change permissions back the way they were, they probably had a reason... | ||
97 | workdir = d.getVar('WORKDIR', True) | ||
98 | subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True) | ||
99 | } | ||
100 | |||
101 | PACKAGES =+ "${PN}-lib ${PN}-libimage" | ||
102 | |||
103 | RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" | ||
104 | FILES_${PN} += "${libdir}/cups/backend \ | ||
105 | ${libdir}/cups/cgi-bin \ | ||
106 | ${libdir}/cups/filter \ | ||
107 | ${libdir}/cups/monitor \ | ||
108 | ${libdir}/cups/notifier \ | ||
109 | ${libdir}/cups/daemon \ | ||
110 | " | ||
111 | |||
112 | FILES_${PN}-lib = "${libdir}/libcups.so.*" | ||
113 | |||
114 | FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*" | ||
115 | |||
116 | FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \ | ||
117 | ${libdir}/cups/cgi-bin/.debug \ | ||
118 | ${libdir}/cups/filter/.debug \ | ||
119 | ${libdir}/cups/monitor/.debug \ | ||
120 | ${libdir}/cups/notifier/.debug \ | ||
121 | ${libdir}/cups/daemon/.debug \ | ||
122 | " | ||
123 | |||
124 | #package the html for the webgui inside the main packages (~1MB uncompressed) | ||
125 | |||
126 | FILES_${PN} += "${datadir}/doc/cups/images \ | ||
127 | ${datadir}/doc/cups/*html \ | ||
128 | ${datadir}/doc/cups/*.css \ | ||
129 | ${datadir}/icons/ \ | ||
130 | " | ||
131 | CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf" | ||
132 | |||
133 | SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess" | ||
134 | cups_sysroot_preprocess () { | ||
135 | sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:' | ||
136 | } | ||
diff --git a/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch new file mode 100644 index 0000000000..e6544b5607 --- /dev/null +++ b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001 | ||
4 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
5 | Date: Sun, 30 Jan 2011 16:37:27 +0100 | ||
6 | Subject: [PATCH] don't try to run generated binaries | ||
7 | |||
8 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
9 | --- | ||
10 | ppdc/Makefile | 30 +++++++++++++++--------------- | ||
11 | 1 files changed, 15 insertions(+), 15 deletions(-) | ||
12 | |||
13 | diff --git a/ppdc/Makefile b/ppdc/Makefile | ||
14 | index 0288d47..fc87f1b 100644 | ||
15 | --- a/ppdc/Makefile | ||
16 | +++ b/ppdc/Makefile | ||
17 | @@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \ | ||
18 | $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \ | ||
19 | libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \ | ||
20 | $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | ||
21 | - echo Generating localization strings... | ||
22 | - ./genstrings >sample.c | ||
23 | +# echo Generating localization strings... | ||
24 | +# ./genstrings >sample.c | ||
25 | |||
26 | |||
27 | # | ||
28 | @@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po | ||
29 | $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \ | ||
30 | ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ | ||
31 | $(COMMONLIBS) $(LIBZ) | ||
32 | - echo Testing PPD compiler... | ||
33 | - ./ppdc-static -l en,fr -I ../data foo.drv | ||
34 | - ./ppdc-static -l en,fr -z -I ../data foo.drv | ||
35 | +# echo Testing PPD compiler... | ||
36 | +# ./ppdc-static -l en,fr -I ../data foo.drv | ||
37 | +# ./ppdc-static -l en,fr -z -I ../data foo.drv | ||
38 | |||
39 | |||
40 | # | ||
41 | @@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a | ||
42 | ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ | ||
43 | $(COMMONLIBS) $(LIBZ) | ||
44 | echo Testing PPD importer... | ||
45 | - $(RM) -r ppd ppd2 sample-import.drv | ||
46 | - ./ppdc-static -I ../data sample.drv | ||
47 | - ./ppdi-static -I ../data -o sample-import.drv ppd/* | ||
48 | - ./ppdc-static -I ../data -d ppd2 sample-import.drv | ||
49 | - if diff -r ppd ppd2 >/dev/null; then \ | ||
50 | - echo PPD import OK; \ | ||
51 | - else \ | ||
52 | - echo PPD import FAILED; \ | ||
53 | - exit 1; \ | ||
54 | - fi | ||
55 | +# $(RM) -r ppd ppd2 sample-import.drv | ||
56 | +# ./ppdc-static -I ../data sample.drv | ||
57 | +# ./ppdi-static -I ../data -o sample-import.drv ppd/* | ||
58 | +# ./ppdc-static -I ../data -d ppd2 sample-import.drv | ||
59 | +# if diff -r ppd ppd2 >/dev/null; then \ | ||
60 | +# echo PPD import OK; \ | ||
61 | +# else \ | ||
62 | +# echo PPD import FAILED; \ | ||
63 | +# exit 1; \ | ||
64 | +# fi | ||
65 | |||
66 | |||
67 | # | ||
68 | -- | ||
69 | 1.6.6.1 | ||
70 | |||
diff --git a/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch b/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch new file mode 100644 index 0000000000..8bbcf39497 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | Description: Don't build-depend on libgcrypt, as nothing is used from it | ||
2 | Author: Didier Raboud <odyx@debian.org> | ||
3 | Bug-Debian: https://bugs.debian.org/638416 | ||
4 | Bug: http://www.cups.org/str.php?L???? | ||
5 | |||
6 | [CUPS Ticket #4399] -- http://www.cups.org/str.php?L4399 | ||
7 | |||
8 | Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | |||
12 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
13 | |||
14 | Last-Update: 2014-04-07 | ||
15 | --- a/config-scripts/cups-ssl.m4 | ||
16 | +++ b/config-scripts/cups-ssl.m4 | ||
17 | @@ -66,7 +66,6 @@ | ||
18 | dnl Then look for GNU TLS... | ||
19 | if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then | ||
20 | AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config) | ||
21 | - AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config) | ||
22 | if $PKGCONFIG --exists gnutls; then | ||
23 | have_ssl=1 | ||
24 | SSLLIBS=`$PKGCONFIG --libs gnutls` | ||
25 | @@ -84,14 +83,6 @@ | ||
26 | if test $have_ssl = 1; then | ||
27 | CUPS_SERVERCERT="ssl/server.crt" | ||
28 | CUPS_SERVERKEY="ssl/server.key" | ||
29 | - | ||
30 | - if $PKGCONFIG --exists gcrypt; then | ||
31 | - SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`" | ||
32 | - SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`" | ||
33 | - elif test "x$LIBGCRYPTCONFIG" != x; then | ||
34 | - SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`" | ||
35 | - SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`" | ||
36 | - fi | ||
37 | fi | ||
38 | fi | ||
39 | |||
40 | --- a/cups/http-private.h | ||
41 | +++ b/cups/http-private.h | ||
42 | @@ -80,7 +80,6 @@ | ||
43 | # elif defined HAVE_GNUTLS | ||
44 | # include <gnutls/gnutls.h> | ||
45 | # include <gnutls/x509.h> | ||
46 | -# include <gcrypt.h> | ||
47 | # elif defined(HAVE_CDSASSL) | ||
48 | # include <CoreFoundation/CoreFoundation.h> | ||
49 | # include <Security/Security.h> | ||
diff --git a/meta/recipes-extended/cups/cups/cups.path b/meta/recipes-extended/cups/cups/cups.path new file mode 100644 index 0000000000..de8cc57c27 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups.path | |||
@@ -0,0 +1,8 @@ | |||
1 | [Unit] | ||
2 | Description=CUPS Printer Service Spool | ||
3 | |||
4 | [Path] | ||
5 | PathExistsGlob=/var/spool/cups/d* | ||
6 | |||
7 | [Install] | ||
8 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-extended/cups/cups/cups.service b/meta/recipes-extended/cups/cups/cups.service new file mode 100644 index 0000000000..7d3e839867 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=CUPS Printing Service | ||
3 | |||
4 | [Service] | ||
5 | ExecStart=@SBINDIR@/cupsd -f | ||
6 | PrivateTmp=true | ||
7 | |||
8 | [Install] | ||
9 | Also=cups.socket cups.path | ||
10 | WantedBy=printer.target | ||
diff --git a/meta/recipes-extended/cups/cups/cups.socket b/meta/recipes-extended/cups/cups/cups.socket new file mode 100644 index 0000000000..33148705d6 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups.socket | |||
@@ -0,0 +1,8 @@ | |||
1 | [Unit] | ||
2 | Description=CUPS Printing Service Sockets | ||
3 | |||
4 | [Socket] | ||
5 | ListenStream=/var/run/cups/cups.sock | ||
6 | |||
7 | [Install] | ||
8 | WantedBy=sockets.target | ||
diff --git a/meta/recipes-extended/cups/cups/cups_serverbin.patch b/meta/recipes-extended/cups/cups/cups_serverbin.patch new file mode 100644 index 0000000000..f7b44a7bc1 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups_serverbin.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches | ||
2 | e.g. ppc64 where base libdir is lib64 this does not go well | ||
3 | |||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | Upstream-Status: Inappropriate [OE config specific] | ||
6 | |||
7 | Index: cups-1.4.6/config-scripts/cups-directories.m4 | ||
8 | =================================================================== | ||
9 | --- cups-1.4.6.orig/config-scripts/cups-directories.m4 2009-04-12 16:04:51.000000000 -0700 | ||
10 | +++ cups-1.4.6/config-scripts/cups-directories.m4 2012-07-21 12:12:05.896405923 -0700 | ||
11 | @@ -397,7 +397,7 @@ | ||
12 | *) | ||
13 | # All others | ||
14 | INSTALL_SYSV="install-sysv" | ||
15 | - CUPS_SERVERBIN="$exec_prefix/lib/cups" | ||
16 | + CUPS_SERVERBIN="$libdir/cups" | ||
17 | ;; | ||
18 | esac | ||
19 | |||
20 | Index: cups-1.4.6/configure | ||
21 | =================================================================== | ||
22 | --- cups-1.4.6.orig/configure 2012-07-21 12:13:34.512405950 -0700 | ||
23 | +++ cups-1.4.6/configure 2012-07-21 12:14:05.724406017 -0700 | ||
24 | @@ -11181,7 +11181,7 @@ | ||
25 | *) | ||
26 | # All others | ||
27 | INSTALL_SYSV="install-sysv" | ||
28 | - CUPS_SERVERBIN="$exec_prefix/lib/cups" | ||
29 | + CUPS_SERVERBIN="$libdir/cups" | ||
30 | ;; | ||
31 | esac | ||
32 | |||
diff --git a/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch b/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch new file mode 100644 index 0000000000..696f1374d9 --- /dev/null +++ b/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | Index: cups-1.6.1/scheduler/cups.sh.in | ||
4 | =================================================================== | ||
5 | --- cups-1.6.1.orig/scheduler/cups.sh.in | ||
6 | +++ cups-1.6.1/scheduler/cups.sh.in | ||
7 | @@ -67,7 +67,7 @@ case "`uname`" in | ||
8 | ECHO_ERROR=: | ||
9 | ;; | ||
10 | |||
11 | - Linux*) | ||
12 | + DisableLinux*) | ||
13 | IS_ON=/bin/true | ||
14 | if test -f /etc/init.d/functions; then | ||
15 | . /etc/init.d/functions | ||
diff --git a/meta/recipes-extended/cups/cups_1.7.5.bb b/meta/recipes-extended/cups/cups_1.7.5.bb new file mode 100644 index 0000000000..5538cecfd5 --- /dev/null +++ b/meta/recipes-extended/cups/cups_1.7.5.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require cups.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5e50cb4b8f24b04636b719683a9102d" | ||
4 | |||
5 | SRC_URI[md5sum] = "5d893edc2957005f78e2b2423fdace2e" | ||
6 | SRC_URI[sha256sum] = "18cb4c6847dbaaaa05c8b35af787f19dd5c7686970b46548e72c711c6f26bd02" | ||
diff --git a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb new file mode 100644 index 0000000000..4e12169302 --- /dev/null +++ b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | SUMMARY = "Collection of autoconf m4 macros" | ||
2 | SECTION = "base" | ||
3 | HOMEPAGE = "http://cwautomacros.berlios.de/" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | SRC_URI = "http://download.berlios.de/cwautomacros/cwautomacros-${PV}.tar.bz2" | ||
8 | SRC_URI[md5sum] = "074afcb50d0a8bff10786a2954b2b02d" | ||
9 | SRC_URI[sha256sum] = "3115603b891f3a163c0bbb5fea2f3742113a183fa6745ee5e89e5f6d0e9f6121" | ||
10 | |||
11 | do_configure() { | ||
12 | : | ||
13 | } | ||
14 | |||
15 | do_install() { | ||
16 | oe_runmake CWAUTOMACROSPREFIX=${D}${prefix} install | ||
17 | } | ||
18 | |||
19 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch b/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch new file mode 100644 index 0000000000..cc05d1dc06 --- /dev/null +++ b/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | automake 1.12 has depricated automatic de-ANSI-fication support | ||
4 | |||
5 | this patch avoids these kinds of errors: | ||
6 | |||
7 | | configure.ac:90: error: automatic de-ANSI-fication support has been removed | ||
8 | | /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from... | ||
9 | | /srv/home/nitin/builds/build-gcc47/tmp/work/i586-poky-linux/diffutils-2.8.1-r4/diffutils-2.8.1/m4/prereq.m4:110: jm_PREREQ_QUOTEARG is expanded from... | ||
10 | | configure.ac:90: the top level | ||
11 | | autom4te: m4 failed with exit status: 1 | ||
12 | |||
13 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
14 | 2012/05/04 | ||
15 | |||
16 | Index: diffutils-2.8.1/m4/prereq.m4 | ||
17 | =================================================================== | ||
18 | --- diffutils-2.8.1.orig/m4/prereq.m4 | ||
19 | +++ diffutils-2.8.1/m4/prereq.m4 | ||
20 | @@ -115,7 +115,6 @@ AC_DEFUN([jm_PREREQ_QUOTEARG], | ||
21 | AC_HEADER_STDC | ||
22 | AC_C_BACKSLASH_A | ||
23 | AC_MBSTATE_T | ||
24 | - AM_C_PROTOTYPES | ||
25 | ]) | ||
26 | |||
27 | AC_DEFUN([jm_PREREQ_REGEX], | ||
diff --git a/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest b/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest new file mode 100644 index 0000000000..695c5e8a7b --- /dev/null +++ b/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | make -C tests check-TESTS | ||
diff --git a/meta/recipes-extended/diffutils/diffutils.inc b/meta/recipes-extended/diffutils/diffutils.inc new file mode 100644 index 0000000000..243341aa9c --- /dev/null +++ b/meta/recipes-extended/diffutils/diffutils.inc | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "Diffutils contains tools used for finding differences between files" | ||
2 | DESCRIPTION = "Diffutils contains the GNU diff, diff3, \ | ||
3 | sdiff, and cmp utilities. These programs are usually \ | ||
4 | used for creating patch files." | ||
5 | SECTION = "base" | ||
6 | |||
7 | inherit autotools texinfo update-alternatives gettext | ||
8 | |||
9 | # diffutils assumes non-glibc compilation with uclibc and | ||
10 | # this causes it to generate its own implementations of | ||
11 | # standard functionality. regex.c actually breaks compilation | ||
12 | # because it uses __mempcpy, there are other things (TBD: | ||
13 | # see diffutils.mk in buildroot) | ||
14 | EXTRA_OECONF_libc-uclibc = "--without-included-regex" | ||
15 | |||
16 | ALTERNATIVE_${PN} = "diff cmp" | ||
17 | ALTERNATIVE_PRIORITY = "100" | ||
18 | |||
diff --git a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb new file mode 100644 index 0000000000..bf425bbb35 --- /dev/null +++ b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | LICENSE = "GPLv2+" | ||
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
3 | |||
4 | require diffutils.inc | ||
5 | |||
6 | PR = "r7.0" | ||
7 | |||
8 | SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz \ | ||
9 | file://diffutils_fix_for_automake-1.12.patch" | ||
10 | |||
11 | SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428" | ||
12 | SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a" | ||
13 | |||
14 | do_configure_prepend () { | ||
15 | chmod u+w ${S}/po/Makefile.in.in | ||
16 | } | ||
diff --git a/meta/recipes-extended/diffutils/diffutils_3.3.bb b/meta/recipes-extended/diffutils/diffutils_3.3.bb new file mode 100644 index 0000000000..a467f20aa4 --- /dev/null +++ b/meta/recipes-extended/diffutils/diffutils_3.3.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | LICENSE = "GPLv3+" | ||
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
3 | |||
4 | require diffutils.inc | ||
5 | |||
6 | SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \ | ||
7 | file://run-ptest \ | ||
8 | " | ||
9 | |||
10 | do_configure_prepend () { | ||
11 | # Need to remove gettext macros with weird mix of versions | ||
12 | for i in codeset.m4 gettext_gl.m4 intlmacosx.m4 inttypes-pri.m4 lib-ld_gl.m4 lib-prefix_gl.m4 po_gl.m4 ssize_t.m4 wchar_t.m4 wint_t.m4; do | ||
13 | rm -f ${S}/m4/$i | ||
14 | done | ||
15 | } | ||
16 | |||
17 | SRC_URI[md5sum] = "99180208ec2a82ce71f55b0d7389f1b3" | ||
18 | SRC_URI[sha256sum] = "a25e89a8ab65fded1731e4186be1bb25cda967834b6df973599cdcd5abdfc19c" | ||
19 | |||
20 | inherit ptest | ||
21 | |||
22 | do_install_ptest() { | ||
23 | t=${D}${PTEST_PATH} | ||
24 | install -D ${S}/build-aux/test-driver $t/build-aux/test-driver | ||
25 | cp -r ${S}/tests $t/ | ||
26 | install ${B}/tests/Makefile $t/tests/ | ||
27 | sed -e 's|^Makefile:|_Makefile:|' \ | ||
28 | -e 's|bash|sh|' \ | ||
29 | -e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \ | ||
30 | -e 's|^srcdir = \(.*\)|srcdir = .|' \ | ||
31 | -e 's|"`$(built_programs)`"|diff|' \ | ||
32 | -e 's|gawk|awk|g' \ | ||
33 | -i $t/tests/Makefile | ||
34 | } | ||
diff --git a/meta/recipes-extended/ed/ed_0.5.bb b/meta/recipes-extended/ed/ed_0.5.bb new file mode 100644 index 0000000000..143e636546 --- /dev/null +++ b/meta/recipes-extended/ed/ed_0.5.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | SUMMARY = "Line-oriented text editor" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/ed/" | ||
3 | SECTION = "base" | ||
4 | LICENSE = "GPLv2+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \ | ||
6 | file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e" | ||
7 | |||
8 | PR = "r2" | ||
9 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2" | ||
10 | |||
11 | SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" | ||
12 | SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e" | ||
13 | |||
14 | inherit autotools texinfo | ||
15 | |||
16 | EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'" | ||
17 | |||
18 | CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-dependency-tracking', ' ')}" | ||
19 | CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-silent-rules', ' ')}" | ||
20 | |||
21 | |||
diff --git a/meta/recipes-extended/ed/ed_1.9.bb b/meta/recipes-extended/ed/ed_1.9.bb new file mode 100644 index 0000000000..8e94eedea6 --- /dev/null +++ b/meta/recipes-extended/ed/ed_1.9.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "Line-oriented text editor" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/ed/" | ||
3 | |||
4 | LICENSE = "GPLv3+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \ | ||
6 | file://ed.h;endline=20;md5=375a20cc2545ac1115eeb7b323c60ae3 \ | ||
7 | file://main.c;endline=17;md5=14dbb325c1f2d4daf50e0aa5c5038e96" | ||
8 | |||
9 | SECTION = "base" | ||
10 | |||
11 | # LSB states that ed should be in /bin/ | ||
12 | bindir = "${base_bindir}" | ||
13 | |||
14 | SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.gz" | ||
15 | |||
16 | SRC_URI[md5sum] = "565b6d1d5a9a8816b9b304fc4ed9405d" | ||
17 | SRC_URI[sha256sum] = "d5b372cfadf073001823772272fceac2cfa87552c5cd5a8efc1c8aae61f45a88" | ||
18 | |||
19 | inherit texinfo | ||
20 | |||
21 | do_configure() { | ||
22 | ${S}/configure | ||
23 | } | ||
24 | |||
25 | do_install() { | ||
26 | oe_runmake 'DESTDIR=${D}' install | ||
27 | # Info dir listing isn't interesting at this point so remove it if it exists. | ||
28 | if [ -e "${D}${infodir}/dir" ]; then | ||
29 | rm -f ${D}${infodir}/dir | ||
30 | fi | ||
31 | } | ||
diff --git a/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch new file mode 100644 index 0000000000..bf66267e81 --- /dev/null +++ b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | ptest needs buildtest-TESTS and runtest-TESTS targets. | ||
2 | serial-tests is required to generate those targets. | ||
3 | |||
4 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
5 | Upstream-Status: Inappropriate | ||
6 | (default automake behavior incompatible with ptest) | ||
7 | |||
8 | diff -ruN a/configure.ac b/configure.ac | ||
9 | --- a/configure.ac 2014-05-28 18:19:13.513980977 +0200 | ||
10 | +++ b/configure.ac 2014-05-28 18:19:21.129660215 +0200 | ||
11 | @@ -2,7 +2,7 @@ | ||
12 | AC_INIT(ethtool, 3.14, netdev@vger.kernel.org) | ||
13 | AC_PREREQ(2.52) | ||
14 | AC_CONFIG_SRCDIR([ethtool.c]) | ||
15 | -AM_INIT_AUTOMAKE([gnu]) | ||
16 | +AM_INIT_AUTOMAKE([gnu serial-tests]) | ||
17 | AC_CONFIG_HEADERS([ethtool-config.h]) | ||
18 | |||
19 | AM_MAINTAINER_MODE | ||
diff --git a/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch b/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch new file mode 100644 index 0000000000..bb96a18d82 --- /dev/null +++ b/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | Fix build with musl by using correct uint type names. | ||
2 | |||
3 | This patch is taken from Sabotage Linux, the license statement for patches and | ||
4 | build scripts in Sabotage Linux says: | ||
5 | |||
6 | To the extent possible under law, Christian Neukirchen has waived | ||
7 | all copyright and related or neighboring rights to this work. | ||
8 | |||
9 | http://creativecommons.org/publicdomain/zero/1.0/ | ||
10 | |||
11 | Therefore this should be good to include in OpenEmbedded. | ||
12 | |||
13 | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> | ||
14 | |||
15 | Upstream-status: Pending | ||
16 | |||
17 | diff -u ethtool-3.14.org/internal.h ethtool-3.14/internal.h | ||
18 | --- ethtool-3.14.org/internal.h | ||
19 | +++ ethtool-3.14/internal.h | ||
20 | @@ -7,6 +7,7 @@ | ||
21 | #include "ethtool-config.h" | ||
22 | #endif | ||
23 | #include <stdio.h> | ||
24 | +#include <stdint.h> | ||
25 | #include <stdlib.h> | ||
26 | #include <string.h> | ||
27 | #include <sys/types.h> | ||
28 | @@ -17,16 +18,16 @@ | ||
29 | |||
30 | /* ethtool.h expects these to be defined by <linux/types.h> */ | ||
31 | #ifndef HAVE_BE_TYPES | ||
32 | -typedef __uint16_t __be16; | ||
33 | -typedef __uint32_t __be32; | ||
34 | +typedef uint16_t __be16; | ||
35 | +typedef uint32_t __be32; | ||
36 | typedef unsigned long long __be64; | ||
37 | #endif | ||
38 | |||
39 | typedef unsigned long long u64; | ||
40 | -typedef __uint32_t u32; | ||
41 | -typedef __uint16_t u16; | ||
42 | -typedef __uint8_t u8; | ||
43 | -typedef __int32_t s32; | ||
44 | +typedef uint32_t u32; | ||
45 | +typedef uint16_t u16; | ||
46 | +typedef uint8_t u8; | ||
47 | +typedef int32_t s32; | ||
48 | |||
49 | #include "ethtool-copy.h" | ||
50 | #include "net_tstamp-copy.h" | ||
diff --git a/meta/recipes-extended/ethtool/ethtool/run-ptest b/meta/recipes-extended/ethtool/ethtool/run-ptest new file mode 100644 index 0000000000..1e245da112 --- /dev/null +++ b/meta/recipes-extended/ethtool/ethtool/run-ptest | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | make -k runtest-TESTS | ||
diff --git a/meta/recipes-extended/ethtool/ethtool_3.15.bb b/meta/recipes-extended/ethtool/ethtool_3.15.bb new file mode 100644 index 0000000000..8cd10dfb43 --- /dev/null +++ b/meta/recipes-extended/ethtool/ethtool_3.15.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "Display or change ethernet card settings" | ||
2 | DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces." | ||
3 | HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/" | ||
4 | SECTION = "console/network" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
7 | file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216" | ||
8 | |||
9 | SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \ | ||
10 | file://run-ptest \ | ||
11 | file://avoid_parallel_tests.patch \ | ||
12 | file://ethtool-uint.patch \ | ||
13 | " | ||
14 | |||
15 | SRC_URI[md5sum] = "7e94dd958bcd639aad2e5a752e108b24" | ||
16 | SRC_URI[sha256sum] = "562e3cc675cf5b1ac655cd060f032943a2502d4d59e5f278f02aae92562ba261" | ||
17 | |||
18 | inherit autotools ptest | ||
19 | RDEPENDS_${PN}-ptest += "make" | ||
20 | |||
21 | do_compile_ptest() { | ||
22 | oe_runmake buildtest-TESTS | ||
23 | } | ||
24 | |||
25 | do_install_ptest () { | ||
26 | cp ${B}/Makefile ${D}${PTEST_PATH} | ||
27 | install ${B}/test-cmdline ${D}${PTEST_PATH} | ||
28 | install ${B}/test-features ${D}${PTEST_PATH} | ||
29 | install ${B}/ethtool ${D}${PTEST_PATH}/ethtool | ||
30 | sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile | ||
31 | } | ||
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch new file mode 100644 index 0000000000..2076e44097 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 33cba24cba7b0973a702e9627bd5b93962948ae4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Tue, 17 Sep 2013 16:11:16 +0800 | ||
4 | Subject: [PATCH] findutils: fix doc build error | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
9 | --- | ||
10 | doc/find.texi | 6 +++--- | ||
11 | 1 files changed, 3 insertions(+), 3 deletions(-) | ||
12 | |||
13 | diff --git a/doc/find.texi b/doc/find.texi | ||
14 | index 5b5f0cf..b3d9c6b 100644 | ||
15 | --- a/doc/find.texi | ||
16 | +++ b/doc/find.texi | ||
17 | @@ -63,7 +63,7 @@ translation approved by the Foundation. | ||
18 | |||
19 | @page | ||
20 | @vskip 0pt plus 1filll | ||
21 | -@insertcopying{} | ||
22 | +@insertcopying | ||
23 | @end titlepage | ||
24 | |||
25 | @contents | ||
26 | @@ -1466,6 +1466,7 @@ no output is ever sent to it. | ||
27 | * Escapes:: | ||
28 | * Format Directives:: | ||
29 | * Time Formats:: | ||
30 | +* Formatting Flags:: | ||
31 | @end menu | ||
32 | |||
33 | @node Escapes | ||
34 | @@ -1534,7 +1535,6 @@ from the novel you are reading. | ||
35 | * Size Directives:: | ||
36 | * Location Directives:: | ||
37 | * Time Directives:: | ||
38 | -* Formatting Flags:: | ||
39 | @end menu | ||
40 | |||
41 | @node Name Directives | ||
42 | @@ -1780,7 +1780,7 @@ setting the TZ environment variable). This is a GNU extension. | ||
43 | @end table | ||
44 | |||
45 | @node Formatting Flags | ||
46 | -@subsubsection Formatting Flags | ||
47 | +@subsection Formatting Flags | ||
48 | |||
49 | The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0} | ||
50 | and @samp{+} flags, but the other directives do not, even if they | ||
51 | -- | ||
52 | 1.7.4.1 | ||
53 | |||
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch new file mode 100644 index 0000000000..2d0ddb43f5 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | automake 1.12 has depricated automatic de-ANSI-fication support | ||
4 | |||
5 | this patch avoids these kinds of errors: | ||
6 | |||
7 | | configure.in:75: error: automatic de-ANSI-fication support has been removed | ||
8 | |||
9 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
10 | 2012/05/04 | ||
11 | |||
12 | Index: findutils-4.2.31/configure.in | ||
13 | =================================================================== | ||
14 | --- findutils-4.2.31.orig/configure.in | ||
15 | +++ findutils-4.2.31/configure.in | ||
16 | @@ -72,7 +72,6 @@ dnl gl_EARLY calls AC_GNU_SOURCE anyway. | ||
17 | |||
18 | |||
19 | AC_ISC_POSIX | ||
20 | -AM_C_PROTOTYPES | ||
21 | |||
22 | AC_PROG_INSTALL | ||
23 | AC_PROG_RANLIB | ||
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch b/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch new file mode 100644 index 0000000000..65bd64277c --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | Upstream-Status: Inappropriate [legacy version] | ||
2 | |||
3 | the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE | ||
4 | |||
5 | against 4.2.31 | ||
6 | 07/08/2010 - qhe | ||
7 | |||
8 | diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4 | ||
9 | index 143a9e5..0f27ceb 100644 | ||
10 | --- a/gnulib/m4/extensions.m4 | ||
11 | +++ b/gnulib/m4/extensions.m4 | ||
12 | @@ -12,44 +12,6 @@ | ||
13 | # enough in this area it's likely we'll need to redefine | ||
14 | # AC_USE_SYSTEM_EXTENSIONS for quite some time. | ||
15 | |||
16 | -# AC_USE_SYSTEM_EXTENSIONS | ||
17 | -# ------------------------ | ||
18 | -# Enable extensions on systems that normally disable them, | ||
19 | -# typically due to standards-conformance issues. | ||
20 | -AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
21 | -[ | ||
22 | - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
23 | - AC_BEFORE([$0], [AC_RUN_IFELSE]) | ||
24 | - | ||
25 | - AC_REQUIRE([AC_GNU_SOURCE]) | ||
26 | - AC_REQUIRE([AC_AIX]) | ||
27 | - AC_REQUIRE([AC_MINIX]) | ||
28 | - | ||
29 | - AH_VERBATIM([__EXTENSIONS__], | ||
30 | -[/* Enable extensions on Solaris. */ | ||
31 | -#ifndef __EXTENSIONS__ | ||
32 | -# undef __EXTENSIONS__ | ||
33 | -#endif | ||
34 | -#ifndef _POSIX_PTHREAD_SEMANTICS | ||
35 | -# undef _POSIX_PTHREAD_SEMANTICS | ||
36 | -#endif | ||
37 | -#ifndef _TANDEM_SOURCE | ||
38 | -# undef _TANDEM_SOURCE | ||
39 | -#endif]) | ||
40 | - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], | ||
41 | - [ac_cv_safe_to_define___extensions__], | ||
42 | - [AC_COMPILE_IFELSE( | ||
43 | - [AC_LANG_PROGRAM([ | ||
44 | -# define __EXTENSIONS__ 1 | ||
45 | - AC_INCLUDES_DEFAULT])], | ||
46 | - [ac_cv_safe_to_define___extensions__=yes], | ||
47 | - [ac_cv_safe_to_define___extensions__=no])]) | ||
48 | - test $ac_cv_safe_to_define___extensions__ = yes && | ||
49 | - AC_DEFINE([__EXTENSIONS__]) | ||
50 | - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
51 | - AC_DEFINE([_TANDEM_SOURCE]) | ||
52 | -]) | ||
53 | - | ||
54 | # gl_USE_SYSTEM_EXTENSIONS | ||
55 | # ------------------------ | ||
56 | # Enable extensions on systems that normally disable them, | ||
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch b/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch new file mode 100644 index 0000000000..69c1486cf7 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch | |||
@@ -0,0 +1,781 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | commit af974034b68bf59337c7a384e488a518a77dfecd | ||
4 | Author: James Youngman <jay@gnu.org> | ||
5 | Date: Sat Jul 11 19:55:27 2009 +0100 | ||
6 | |||
7 | Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit coredump. | ||
8 | |||
9 | Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit | ||
10 | coredumps. | ||
11 | * find/tree.c (set_new_parent): Initialise struct | ||
12 | predicate->arg_text to NULL (instead of leaving it uninitialised). | ||
13 | (get_new_pred_noarg): Likewise. | ||
14 | (get_new_pred): Initialise predicate->arg_text to | ||
15 | "ThisShouldBeSetToSomethingElse" to make it easier to notice | ||
16 | bugs. | ||
17 | (get_new_pred_chk_op): Use get_new_pred_noarg. | ||
18 | (print_predicate): Use an if statement instead of | ||
19 | two ternary operators. | ||
20 | * find/util.c (insert_primary_withpred): Accept new argument, arg, | ||
21 | being the argument (if any) of this predicate. Pass it to | ||
22 | get_new_pred_chk_op. | ||
23 | (insert_primary): Likewise (pass arg to insert_primary_withpred). | ||
24 | (insert_primary_noarg): New function; calls insert_primary with | ||
25 | arg=NULL. | ||
26 | * find/parser.c (collect_arg_stat_info): Add an output parameter; | ||
27 | the filename from which we collected the stat information. | ||
28 | (parse_closeparen, parse_delete, parse_and, parse_or, | ||
29 | parse_comma): Use get_new_pred_noarg. | ||
30 | (parse_cnewer, parse_newer, parse_anewer): Use new | ||
31 | collect_arg_stat_info and insert_primary interface. | ||
32 | (parse_print, parse_prune, parse_nouser, parse_empty): Use | ||
33 | insert_primary_noarg. | ||
34 | (parse_accesscheck, parse_false): Use insert_primary_noarg. | ||
35 | (parse_used, parse_iname, parse_fprint, insert_fprint, | ||
36 | parse_fstype, parse_ilname): Use new collect_arg and | ||
37 | insert_primary interfaces. | ||
38 | (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path, | ||
39 | parse_perm, parse_size, parse_user, parse_time): Use new | ||
40 | collect_arg and insert_primary_withpred interface. | ||
41 | (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface. | ||
42 | (parse_newerXY, parse_nogroup): Use new insert_primary interface. | ||
43 | (insert_regex, parse_samefile): Use new insert_primary_withpred | ||
44 | interface. | ||
45 | (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use | ||
46 | new insert_primary_withpred interface. | ||
47 | * find/defs.h (struct predicate.arg_text): make const. | ||
48 | Add declarations for new function get_new_pred_noarg and | ||
49 | insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op | ||
50 | and insert_primary_withpred. | ||
51 | |||
52 | diff --git a/ChangeLog b/ChangeLog | ||
53 | index 6e346b8..e8ba0f8 100644 | ||
54 | --- a/ChangeLog | ||
55 | +++ b/ChangeLog | ||
56 | @@ -1,0 +1,45 @@ | ||
57 | +2009-07-11 James Youngman <jay@gnu.org> | ||
58 | + | ||
59 | + Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit | ||
60 | + coredumps. | ||
61 | + * find/tree.c (set_new_parent): Initialise struct | ||
62 | + predicate->arg_text to NULL (instead of leaving it uninitialised). | ||
63 | + (get_new_pred_noarg): Likewise. | ||
64 | + (get_new_pred): Initialise predicate->arg_text to | ||
65 | + "ThisShouldBeSetToSomethingElse" to make it easier to notice | ||
66 | + bugs. | ||
67 | + (get_new_pred_chk_op): Use get_new_pred_noarg. | ||
68 | + (print_predicate): Use an if statement instead of | ||
69 | + two ternary operators. | ||
70 | + * find/util.c (insert_primary_withpred): Accept new argument, arg, | ||
71 | + being the argument (if any) of this predicate. Pass it to | ||
72 | + get_new_pred_chk_op. | ||
73 | + (insert_primary): Likewise (pass arg to insert_primary_withpred). | ||
74 | + (insert_primary_noarg): New function; calls insert_primary with | ||
75 | + arg=NULL. | ||
76 | + * find/parser.c (collect_arg_stat_info): Add an output parameter; | ||
77 | + the filename from which we collected the stat information. | ||
78 | + (parse_closeparen, parse_delete, parse_and, parse_or, | ||
79 | + parse_comma): Use get_new_pred_noarg. | ||
80 | + (parse_cnewer, parse_newer, parse_anewer): Use new | ||
81 | + collect_arg_stat_info and insert_primary interface. | ||
82 | + (parse_print, parse_prune, parse_nouser, parse_empty): Use | ||
83 | + insert_primary_noarg. | ||
84 | + (parse_accesscheck, parse_false): Use insert_primary_noarg. | ||
85 | + (parse_used, parse_iname, parse_fprint, insert_fprint, | ||
86 | + parse_fstype, parse_ilname): Use new collect_arg and | ||
87 | + insert_primary interfaces. | ||
88 | + (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path, | ||
89 | + parse_perm, parse_size, parse_user, parse_time): Use new | ||
90 | + collect_arg and insert_primary_withpred interface. | ||
91 | + (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface. | ||
92 | + (parse_newerXY, parse_nogroup): Use new insert_primary interface. | ||
93 | + (insert_regex, parse_samefile): Use new insert_primary_withpred | ||
94 | + interface. | ||
95 | + (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use | ||
96 | + new insert_primary_withpred interface. | ||
97 | + * find/defs.h (struct predicate.arg_text): make const. | ||
98 | + Add declarations for new function get_new_pred_noarg and | ||
99 | + insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op | ||
100 | + and insert_primary_withpred. | ||
101 | + | ||
102 | diff --git a/find/defs.h b/find/defs.h | ||
103 | index 1708d83..4539fd9 100644 | ||
104 | --- a/find/defs.h | ||
105 | +++ b/find/defs.h | ||
106 | @@ -297,7 +297,7 @@ struct predicate | ||
107 | boolean artificial; | ||
108 | |||
109 | /* The raw text of the argument of this predicate. */ | ||
110 | - char *arg_text; | ||
111 | + const char *arg_text; | ||
112 | |||
113 | /* Information needed by the predicate processor. | ||
114 | Next to each member are listed the predicates that use it. */ | ||
115 | @@ -480,13 +480,16 @@ void show_success_rates(const struct predicate *node); | ||
116 | /* tree.c */ | ||
117 | struct predicate * build_expression_tree PARAMS((int argc, char *argv[], int end_of_leading_options)); | ||
118 | struct predicate * get_eval_tree PARAMS((void)); | ||
119 | +struct predicate *get_new_pred_noarg (const struct parser_table *entry); | ||
120 | struct predicate *get_new_pred PARAMS((const struct parser_table *entry)); | ||
121 | -struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry)); | ||
122 | +struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry, | ||
123 | + const char *arg)); | ||
124 | float calculate_derived_rates PARAMS((struct predicate *p)); | ||
125 | |||
126 | /* util.c */ | ||
127 | -struct predicate *insert_primary PARAMS((const struct parser_table *entry)); | ||
128 | -struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr)); | ||
129 | +struct predicate *insert_primary PARAMS((const struct parser_table *entry, const char *arg)); | ||
130 | +struct predicate *insert_primary_noarg PARAMS((const struct parser_table *entry)); | ||
131 | +struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr, const char *arg)); | ||
132 | void usage PARAMS((FILE *fp, int status, char *msg)); | ||
133 | extern boolean check_nofollow(void); | ||
134 | void complete_pending_execs(struct predicate *p); | ||
135 | diff --git a/find/parser.c b/find/parser.c | ||
136 | index 534b670..2e6b989 100644 | ||
137 | --- a/find/parser.c | ||
138 | +++ b/find/parser.c | ||
139 | @@ -640,11 +640,13 @@ collect_arg(char **argv, int *arg_ptr, const char **collected_arg) | ||
140 | } | ||
141 | |||
142 | static boolean | ||
143 | -collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p) | ||
144 | +collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p, | ||
145 | + const char **argument) | ||
146 | { | ||
147 | const char *filename; | ||
148 | if (collect_arg(argv, arg_ptr, &filename)) | ||
149 | { | ||
150 | + *argument = filename; | ||
151 | if (0 == (options.xstat)(filename, p)) | ||
152 | { | ||
153 | return true; | ||
154 | @@ -656,6 +658,7 @@ collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p) | ||
155 | } | ||
156 | else | ||
157 | { | ||
158 | + *argument = NULL; | ||
159 | return false; | ||
160 | } | ||
161 | } | ||
162 | @@ -679,7 +682,7 @@ parse_and (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
163 | (void) argv; | ||
164 | (void) arg_ptr; | ||
165 | |||
166 | - our_pred = get_new_pred (entry); | ||
167 | + our_pred = get_new_pred_noarg (entry); | ||
168 | our_pred->pred_func = pred_and; | ||
169 | our_pred->p_type = BI_OP; | ||
170 | our_pred->p_prec = AND_PREC; | ||
171 | @@ -691,11 +694,12 @@ static boolean | ||
172 | parse_anewer (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
173 | { | ||
174 | struct stat stat_newer; | ||
175 | + const char *arg; | ||
176 | |||
177 | set_stat_placeholders(&stat_newer); | ||
178 | - if (collect_arg_stat_info(argv, arg_ptr, &stat_newer)) | ||
179 | + if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg)) | ||
180 | { | ||
181 | - struct predicate *our_pred = insert_primary (entry); | ||
182 | + struct predicate *our_pred = insert_primary (entry, arg); | ||
183 | our_pred->args.reftime.xval = XVAL_ATIME; | ||
184 | our_pred->args.reftime.ts = get_stat_mtime(&stat_newer); | ||
185 | our_pred->args.reftime.kind = COMP_GT; | ||
186 | @@ -713,7 +717,7 @@ parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
187 | (void) argv; | ||
188 | (void) arg_ptr; | ||
189 | |||
190 | - our_pred = get_new_pred (entry); | ||
191 | + our_pred = get_new_pred_noarg (entry); | ||
192 | our_pred->pred_func = pred_closeparen; | ||
193 | our_pred->p_type = CLOSE_PAREN; | ||
194 | our_pred->p_prec = NO_PREC; | ||
195 | @@ -725,11 +729,12 @@ static boolean | ||
196 | parse_cnewer (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
197 | { | ||
198 | struct stat stat_newer; | ||
199 | + const char *arg; | ||
200 | |||
201 | set_stat_placeholders(&stat_newer); | ||
202 | - if (collect_arg_stat_info(argv, arg_ptr, &stat_newer)) | ||
203 | + if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg)) | ||
204 | { | ||
205 | - struct predicate *our_pred = insert_primary (entry); | ||
206 | + struct predicate *our_pred = insert_primary (entry, arg); | ||
207 | our_pred->args.reftime.xval = XVAL_CTIME; /* like -newercm */ | ||
208 | our_pred->args.reftime.ts = get_stat_mtime(&stat_newer); | ||
209 | our_pred->args.reftime.kind = COMP_GT; | ||
210 | @@ -747,7 +752,7 @@ parse_comma (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
211 | (void) argv; | ||
212 | (void) arg_ptr; | ||
213 | |||
214 | - our_pred = get_new_pred (entry); | ||
215 | + our_pred = get_new_pred_noarg (entry); | ||
216 | our_pred->pred_func = pred_comma; | ||
217 | our_pred->p_type = BI_OP; | ||
218 | our_pred->p_prec = COMMA_PREC; | ||
219 | @@ -786,7 +791,7 @@ parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr) | ||
220 | (void) argv; | ||
221 | (void) arg_ptr; | ||
222 | |||
223 | - our_pred = insert_primary (entry); | ||
224 | + our_pred = insert_primary_noarg (entry); | ||
225 | our_pred->side_effects = our_pred->no_default_print = true; | ||
226 | /* -delete implies -depth */ | ||
227 | options.do_dir_first = false; | ||
228 | @@ -831,7 +836,7 @@ parse_empty (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
229 | (void) argv; | ||
230 | (void) arg_ptr; | ||
231 | |||
232 | - our_pred = insert_primary (entry); | ||
233 | + our_pred = insert_primary_noarg (entry); | ||
234 | our_pred->est_success_rate = 0.01f; /* assume 1% of files are empty. */ | ||
235 | return true; | ||
236 | } | ||
237 | @@ -856,7 +861,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
238 | (void) argv; | ||
239 | (void) arg_ptr; | ||
240 | |||
241 | - our_pred = insert_primary (entry); | ||
242 | + our_pred = insert_primary_noarg (entry); | ||
243 | our_pred->need_stat = our_pred->need_type = false; | ||
244 | our_pred->side_effects = our_pred->no_default_print = false; | ||
245 | our_pred->est_success_rate = 0.0f; | ||
246 | @@ -866,7 +871,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
247 | static boolean | ||
248 | insert_fls (const struct parser_table* entry, const char *filename) | ||
249 | { | ||
250 | - struct predicate *our_pred = insert_primary (entry); | ||
251 | + struct predicate *our_pred = insert_primary_noarg (entry); | ||
252 | if (filename) | ||
253 | open_output_file (filename, &our_pred->args.printf_vec); | ||
254 | else | ||
255 | @@ -899,7 +904,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
256 | const char *filename; | ||
257 | if (collect_arg(argv, arg_ptr, &filename)) | ||
258 | { | ||
259 | - our_pred = insert_primary (entry); | ||
260 | + our_pred = insert_primary (entry, filename); | ||
261 | open_output_file (filename, &our_pred->args.printf_vec); | ||
262 | our_pred->side_effects = our_pred->no_default_print = true; | ||
263 | our_pred->need_stat = our_pred->need_type = false; | ||
264 | @@ -915,7 +920,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
265 | static boolean | ||
266 | insert_fprint(const struct parser_table* entry, const char *filename) | ||
267 | { | ||
268 | - struct predicate *our_pred = insert_primary (entry); | ||
269 | + struct predicate *our_pred = insert_primary (entry, filename); | ||
270 | if (filename) | ||
271 | open_output_file (filename, &our_pred->args.printf_vec); | ||
272 | else | ||
273 | @@ -960,7 +965,7 @@ parse_fstype (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
274 | const char *typename; | ||
275 | if (collect_arg(argv, arg_ptr, &typename)) | ||
276 | { | ||
277 | - struct predicate *our_pred = insert_primary (entry); | ||
278 | + struct predicate *our_pred = insert_primary (entry, typename); | ||
279 | our_pred->args.str = typename; | ||
280 | |||
281 | /* This is an expensive operation, so although there are | ||
282 | @@ -1090,7 +1095,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
283 | return false; | ||
284 | } | ||
285 | } | ||
286 | - our_pred = insert_primary (entry); | ||
287 | + our_pred = insert_primary (entry, groupname); | ||
288 | our_pred->args.gid = gid; | ||
289 | our_pred->est_success_rate = (our_pred->args.numinfo.l_val < 100) ? 0.99 : 0.2; | ||
290 | return true; | ||
291 | @@ -1160,7 +1165,7 @@ parse_ilname (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
292 | const char *name; | ||
293 | if (collect_arg(argv, arg_ptr, &name)) | ||
294 | { | ||
295 | - struct predicate *our_pred = insert_primary (entry); | ||
296 | + struct predicate *our_pred = insert_primary (entry, name); | ||
297 | our_pred->args.str = name; | ||
298 | /* Use the generic glob pattern estimator to figure out how many | ||
299 | * links will match, but bear in mind that most files won't be links. | ||
300 | @@ -1227,7 +1232,7 @@ parse_iname (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
301 | { | ||
302 | if (check_name_arg("-iname", name)) | ||
303 | { | ||
304 | - struct predicate *our_pred = insert_primary (entry); | ||
305 | + struct predicate *our_pred = insert_primary (entry, name); | ||
306 | our_pred->need_stat = our_pred->need_type = false; | ||
307 | our_pred->args.str = name; | ||
308 | our_pred->est_success_rate = estimate_pattern_match_rate(name, 0); | ||
309 | @@ -1268,7 +1273,7 @@ parse_ipath (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
310 | fnmatch_sanitycheck (); | ||
311 | if (collect_arg (argv, arg_ptr, &name)) | ||
312 | { | ||
313 | - struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath); | ||
314 | + struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath, name); | ||
315 | our_pred->need_stat = our_pred->need_type = false; | ||
316 | our_pred->args.str = name; | ||
317 | our_pred->est_success_rate = estimate_pattern_match_rate (name, 0); | ||
318 | @@ -1316,7 +1321,7 @@ parse_lname (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
319 | fnmatch_sanitycheck(); | ||
320 | if (collect_arg(argv, arg_ptr, &name)) | ||
321 | { | ||
322 | - struct predicate *our_pred = insert_primary (entry); | ||
323 | + struct predicate *our_pred = insert_primary (entry, name); | ||
324 | our_pred->args.str = name; | ||
325 | our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate(name, 0); | ||
326 | return true; | ||
327 | @@ -1391,7 +1396,7 @@ do_parse_xmin (const struct parser_table* entry, | ||
328 | "arithmetic overflow while converting %s " | ||
329 | "minutes to a number of seconds")) | ||
330 | { | ||
331 | - struct predicate *our_pred = insert_primary (entry); | ||
332 | + struct predicate *our_pred = insert_primary (entry, minutes); | ||
333 | our_pred->args.reftime = tval; | ||
334 | our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec); | ||
335 | return true; | ||
336 | @@ -1427,7 +1432,7 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
337 | fnmatch_sanitycheck(); | ||
338 | if (check_name_arg("-name", name)) | ||
339 | { | ||
340 | - struct predicate *our_pred = insert_primary (entry); | ||
341 | + struct predicate *our_pred = insert_primary (entry, name); | ||
342 | our_pred->need_stat = our_pred->need_type = false; | ||
343 | our_pred->args.str = name; | ||
344 | our_pred->est_success_rate = estimate_pattern_match_rate(name, 0); | ||
345 | @@ -1445,7 +1450,7 @@ parse_negate (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
346 | (void) &argv; | ||
347 | (void) &arg_ptr; | ||
348 | |||
349 | - our_pred = get_new_pred_chk_op (entry); | ||
350 | + our_pred = get_new_pred_chk_op (entry, NULL); | ||
351 | our_pred->pred_func = pred_negate; | ||
352 | our_pred->p_type = UNI_OP; | ||
353 | our_pred->p_prec = NEGATE_PREC; | ||
354 | @@ -1458,11 +1463,12 @@ parse_newer (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
355 | { | ||
356 | struct predicate *our_pred; | ||
357 | struct stat stat_newer; | ||
358 | + const char *arg; | ||
359 | |||
360 | set_stat_placeholders(&stat_newer); | ||
361 | - if (collect_arg_stat_info(argv, arg_ptr, &stat_newer)) | ||
362 | + if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg)) | ||
363 | { | ||
364 | - our_pred = insert_primary (entry); | ||
365 | + our_pred = insert_primary (entry, arg); | ||
366 | our_pred->args.reftime.ts = get_stat_mtime(&stat_newer); | ||
367 | our_pred->args.reftime.xval = XVAL_MTIME; | ||
368 | our_pred->args.reftime.kind = COMP_GT; | ||
369 | @@ -1530,7 +1536,7 @@ parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
370 | (*arg_ptr)++; | ||
371 | } | ||
372 | |||
373 | - our_pred = insert_primary (entry); | ||
374 | + our_pred = insert_primary (entry, argv[*arg_ptr]); | ||
375 | |||
376 | |||
377 | switch (x) | ||
378 | @@ -1623,7 +1629,7 @@ parse_nogroup (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
379 | (void) &argv; | ||
380 | (void) &arg_ptr; | ||
381 | |||
382 | - our_pred = insert_primary (entry); | ||
383 | + our_pred = insert_primary (entry, NULL); | ||
384 | our_pred->est_success_rate = 1e-4; | ||
385 | #ifdef CACHE_IDS | ||
386 | if (gid_unused == NULL) | ||
387 | @@ -1660,7 +1666,7 @@ parse_nouser (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
388 | (void) arg_ptr; | ||
389 | |||
390 | |||
391 | - our_pred = insert_primary (entry); | ||
392 | + our_pred = insert_primary_noarg (entry); | ||
393 | our_pred->est_success_rate = 1e-3; | ||
394 | #ifdef CACHE_IDS | ||
395 | if (uid_unused == NULL) | ||
396 | @@ -1716,7 +1722,7 @@ parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
397 | (void) argv; | ||
398 | (void) arg_ptr; | ||
399 | |||
400 | - our_pred = get_new_pred_chk_op (entry); | ||
401 | + our_pred = get_new_pred_chk_op (entry, NULL); | ||
402 | our_pred->pred_func = pred_openparen; | ||
403 | our_pred->p_type = OPEN_PAREN; | ||
404 | our_pred->p_prec = NO_PREC; | ||
405 | @@ -1732,7 +1738,7 @@ parse_or (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
406 | (void) argv; | ||
407 | (void) arg_ptr; | ||
408 | |||
409 | - our_pred = get_new_pred (entry); | ||
410 | + our_pred = get_new_pred_noarg (entry); | ||
411 | our_pred->pred_func = pred_or; | ||
412 | our_pred->p_type = BI_OP; | ||
413 | our_pred->p_prec = OR_PREC; | ||
414 | @@ -1756,7 +1762,7 @@ parse_path (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
415 | const char *name; | ||
416 | if (collect_arg(argv, arg_ptr, &name)) | ||
417 | { | ||
418 | - struct predicate *our_pred = insert_primary_withpred (entry, pred_path); | ||
419 | + struct predicate *our_pred = insert_primary_withpred (entry, pred_path, name); | ||
420 | our_pred->need_stat = our_pred->need_type = false; | ||
421 | our_pred->args.str = name; | ||
422 | our_pred->est_success_rate = estimate_pattern_match_rate (name, 0); | ||
423 | @@ -1894,7 +1900,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
424 | rate = 0.9986; /* probably matches anything but a broken symlink */ | ||
425 | } | ||
426 | |||
427 | - our_pred = insert_primary (entry); | ||
428 | + our_pred = insert_primary (entry, perm_expr); | ||
429 | our_pred->est_success_rate = rate; | ||
430 | if (havekind) | ||
431 | { | ||
432 | @@ -1928,7 +1934,7 @@ parse_print (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
433 | (void) argv; | ||
434 | (void) arg_ptr; | ||
435 | |||
436 | - our_pred = insert_primary (entry); | ||
437 | + our_pred = insert_primary_noarg (entry); | ||
438 | /* -print has the side effect of printing. This prevents us | ||
439 | from doing undesired multiple printing when the user has | ||
440 | already specified -print. */ | ||
441 | @@ -1981,7 +1987,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
442 | (void) argv; | ||
443 | (void) arg_ptr; | ||
444 | |||
445 | - our_pred = insert_primary (entry); | ||
446 | + our_pred = insert_primary_noarg (entry); | ||
447 | if (options.do_dir_first == false) | ||
448 | our_pred->need_stat = our_pred->need_type = false; | ||
449 | /* -prune has a side effect that it does not descend into | ||
450 | @@ -1994,7 +2000,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
451 | static boolean | ||
452 | parse_quit (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
453 | { | ||
454 | - struct predicate *our_pred = insert_primary (entry); | ||
455 | + struct predicate *our_pred = insert_primary_noarg (entry); | ||
456 | (void) argv; | ||
457 | (void) arg_ptr; | ||
458 | our_pred->need_stat = our_pred->need_type = false; | ||
459 | @@ -2036,7 +2042,7 @@ insert_regex (char **argv, | ||
460 | { | ||
461 | struct re_pattern_buffer *re; | ||
462 | const char *error_message; | ||
463 | - struct predicate *our_pred = insert_primary_withpred (entry, pred_regex); | ||
464 | + struct predicate *our_pred = insert_primary_withpred (entry, pred_regex, rx); | ||
465 | our_pred->need_stat = our_pred->need_type = false; | ||
466 | re = xmalloc (sizeof (struct re_pattern_buffer)); | ||
467 | our_pred->args.regex = re; | ||
468 | @@ -2061,6 +2067,7 @@ static boolean | ||
469 | parse_size (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
470 | { | ||
471 | struct predicate *our_pred; | ||
472 | + char *arg; | ||
473 | uintmax_t num; | ||
474 | char suffix; | ||
475 | enum comparison_type c_type; | ||
476 | @@ -2073,42 +2080,43 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
477 | */ | ||
478 | if ((argv == NULL) || (argv[*arg_ptr] == NULL)) | ||
479 | return false; | ||
480 | + arg = argv[*arg_ptr]; | ||
481 | |||
482 | - len = strlen (argv[*arg_ptr]); | ||
483 | + len = strlen (arg); | ||
484 | if (len == 0) | ||
485 | error (1, 0, _("invalid null argument to -size")); | ||
486 | |||
487 | - suffix = argv[*arg_ptr][len - 1]; | ||
488 | + suffix = arg[len - 1]; | ||
489 | switch (suffix) | ||
490 | { | ||
491 | case 'b': | ||
492 | blksize = 512; | ||
493 | - argv[*arg_ptr][len - 1] = '\0'; | ||
494 | + arg[len - 1] = '\0'; | ||
495 | break; | ||
496 | |||
497 | case 'c': | ||
498 | blksize = 1; | ||
499 | - argv[*arg_ptr][len - 1] = '\0'; | ||
500 | + arg[len - 1] = '\0'; | ||
501 | break; | ||
502 | |||
503 | case 'k': | ||
504 | blksize = 1024; | ||
505 | - argv[*arg_ptr][len - 1] = '\0'; | ||
506 | + arg[len - 1] = '\0'; | ||
507 | break; | ||
508 | |||
509 | case 'M': /* Megabytes */ | ||
510 | blksize = 1024*1024; | ||
511 | - argv[*arg_ptr][len - 1] = '\0'; | ||
512 | + arg[len - 1] = '\0'; | ||
513 | break; | ||
514 | |||
515 | case 'G': /* Gigabytes */ | ||
516 | blksize = 1024*1024*1024; | ||
517 | - argv[*arg_ptr][len - 1] = '\0'; | ||
518 | + arg[len - 1] = '\0'; | ||
519 | break; | ||
520 | |||
521 | case 'w': | ||
522 | blksize = 2; | ||
523 | - argv[*arg_ptr][len - 1] = '\0'; | ||
524 | + arg[len - 1] = '\0'; | ||
525 | break; | ||
526 | |||
527 | case '0': | ||
528 | @@ -2127,14 +2135,14 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
529 | error (1, 0, _("invalid -size type `%c'"), argv[*arg_ptr][len - 1]); | ||
530 | } | ||
531 | /* TODO: accept fractional megabytes etc. ? */ | ||
532 | - if (!get_num (argv[*arg_ptr], &num, &c_type)) | ||
533 | + if (!get_num (arg, &num, &c_type)) | ||
534 | { | ||
535 | error(1, 0, | ||
536 | _("Invalid argument `%s%c' to -size"), | ||
537 | - argv[*arg_ptr], (int)suffix); | ||
538 | + arg, (int)suffix); | ||
539 | return false; | ||
540 | } | ||
541 | - our_pred = insert_primary (entry); | ||
542 | +our_pred = insert_primary (entry, arg); | ||
543 | our_pred->args.size.kind = c_type; | ||
544 | our_pred->args.size.blocksize = blksize; | ||
545 | our_pred->args.size.size = num; | ||
546 | @@ -2162,9 +2170,10 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
547 | struct predicate *our_pred; | ||
548 | struct stat st, fst; | ||
549 | int fd, openflags; | ||
550 | + const char *filename; | ||
551 | |||
552 | set_stat_placeholders(&st); | ||
553 | - if (!collect_arg_stat_info(argv, arg_ptr, &st)) | ||
554 | + if (!collect_arg_stat_info(argv, arg_ptr, &st, &filename)) | ||
555 | return false; | ||
556 | |||
557 | set_stat_placeholders(&fst); | ||
558 | @@ -2289,7 +2298,7 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
559 | } | ||
560 | } | ||
561 | |||
562 | - our_pred = insert_primary (entry); | ||
563 | + our_pred = insert_primary (entry, filename); | ||
564 | our_pred->args.samefileid.ino = st.st_ino; | ||
565 | our_pred->args.samefileid.dev = st.st_dev; | ||
566 | our_pred->args.samefileid.fd = fd; | ||
567 | @@ -2350,7 +2359,7 @@ parse_true (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
568 | (void) argv; | ||
569 | (void) arg_ptr; | ||
570 | |||
571 | - our_pred = insert_primary (entry); | ||
572 | + our_pred = insert_primary_noarg (entry); | ||
573 | our_pred->need_stat = our_pred->need_type = false; | ||
574 | our_pred->est_success_rate = 1.0f; | ||
575 | return true; | ||
576 | @@ -2369,7 +2378,7 @@ parse_accesscheck (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
577 | struct predicate *our_pred; | ||
578 | (void) argv; | ||
579 | (void) arg_ptr; | ||
580 | - our_pred = insert_primary (entry); | ||
581 | + our_pred = insert_primary_noarg (entry); | ||
582 | our_pred->need_stat = our_pred->need_type = false; | ||
583 | our_pred->side_effects = our_pred->no_default_print = false; | ||
584 | if (pred_is(our_pred, pred_executable)) | ||
585 | @@ -2414,7 +2423,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
586 | struct timespec zero = {0,0}; | ||
587 | if (get_relative_timestamp(offset_str, &tval, zero, DAYSECS, errmsg)) | ||
588 | { | ||
589 | - our_pred = insert_primary (entry); | ||
590 | + our_pred = insert_primary (entry, offset_str); | ||
591 | our_pred->args.reftime = tval; | ||
592 | our_pred->est_success_rate = estimate_file_age_success_rate(tval.ts.tv_sec / DAYSECS); | ||
593 | return true; | ||
594 | @@ -2472,7 +2481,7 @@ parse_user (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
595 | return false; | ||
596 | } | ||
597 | } | ||
598 | - our_pred = insert_primary (entry); | ||
599 | + our_pred = insert_primary (entry, username); | ||
600 | our_pred->args.uid = uid; | ||
601 | our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2; | ||
602 | return true; | ||
603 | @@ -2650,7 +2659,7 @@ insert_type (char **argv, int *arg_ptr, | ||
604 | error(1, 0, _("Unknown argument to -type: %c"), (*typeletter)); | ||
605 | return false; | ||
606 | } | ||
607 | - our_pred = insert_primary_withpred (entry, which_pred); | ||
608 | + our_pred = insert_primary_withpred (entry, which_pred, typeletter); | ||
609 | our_pred->est_success_rate = rate; | ||
610 | |||
611 | /* Figure out if we will need to stat the file, because if we don't | ||
612 | @@ -2706,7 +2715,7 @@ insert_fprintf (struct format_val *vec, | ||
613 | struct segment **segmentp; /* Address of current segment. */ | ||
614 | struct predicate *our_pred; | ||
615 | |||
616 | - our_pred = insert_primary_withpred (entry, func); | ||
617 | + our_pred = insert_primary_withpred (entry, func, format_const); | ||
618 | our_pred->side_effects = our_pred->no_default_print = true; | ||
619 | our_pred->args.printf_vec = *vec; | ||
620 | our_pred->need_type = false; | ||
621 | @@ -3045,7 +3054,7 @@ new_insert_exec_ok (const char *action, | ||
622 | if ((argv == NULL) || (argv[*arg_ptr] == NULL)) | ||
623 | return false; | ||
624 | |||
625 | - our_pred = insert_primary_withpred (entry, func); | ||
626 | + our_pred = insert_primary_withpred (entry, func, "(some -exec* arguments)"); | ||
627 | our_pred->side_effects = our_pred->no_default_print = true; | ||
628 | our_pred->need_type = our_pred->need_stat = false; | ||
629 | |||
630 | @@ -3374,7 +3383,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr) | ||
631 | if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg)) | ||
632 | return false; | ||
633 | |||
634 | - our_pred = insert_primary (entry); | ||
635 | + our_pred = insert_primary (entry, orig_timearg); | ||
636 | our_pred->args.reftime = tval; | ||
637 | our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec); | ||
638 | |||
639 | @@ -3487,7 +3496,7 @@ insert_num (char **argv, int *arg_ptr, const struct parser_table *entry) | ||
640 | |||
641 | if (get_num (numstr, &num, &c_type)) | ||
642 | { | ||
643 | - struct predicate *our_pred = insert_primary (entry); | ||
644 | + struct predicate *our_pred = insert_primary (entry, numstr); | ||
645 | our_pred->args.numinfo.kind = c_type; | ||
646 | our_pred->args.numinfo.l_val = num; | ||
647 | |||
648 | diff --git a/find/tree.c b/find/tree.c | ||
649 | index 7420c60..60a0601 100644 | ||
650 | --- a/find/tree.c | ||
651 | +++ b/find/tree.c | ||
652 | @@ -269,10 +269,14 @@ predicate_is_cost_free(const struct predicate *p) | ||
653 | /* Prints a predicate */ | ||
654 | void print_predicate(FILE *fp, const struct predicate *p) | ||
655 | { | ||
656 | - fprintf (fp, "%s%s%s", | ||
657 | - p->p_name, | ||
658 | - p->arg_text ? " " : "", | ||
659 | - p->arg_text ? p->arg_text : ""); | ||
660 | + if (p->arg_text) | ||
661 | + { | ||
662 | + fprintf (fp, "%s %s", p->p_name, p->arg_text); | ||
663 | + } | ||
664 | + else | ||
665 | + { | ||
666 | + fprintf (fp, "%s", p->p_name); | ||
667 | + } | ||
668 | } | ||
669 | |||
670 | |||
671 | @@ -832,7 +836,8 @@ set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, str | ||
672 | new_parent->need_stat = false; | ||
673 | new_parent->need_type = false; | ||
674 | new_parent->p_cost = NeedsNothing; | ||
675 | - | ||
676 | + new_parent->arg_text = NULL; | ||
677 | + | ||
678 | switch (high_prec) | ||
679 | { | ||
680 | case COMMA_PREC: | ||
681 | @@ -1393,6 +1398,18 @@ init_pred_perf(struct predicate *pred) | ||
682 | p->visits = p->successes = 0; | ||
683 | } | ||
684 | |||
685 | + | ||
686 | +struct predicate * | ||
687 | +get_new_pred_noarg (const struct parser_table *entry) | ||
688 | +{ | ||
689 | + struct predicate *p = get_new_pred(entry); | ||
690 | + if (p) | ||
691 | + { | ||
692 | + p->arg_text = NULL; | ||
693 | + } | ||
694 | + return p; | ||
695 | +} | ||
696 | + | ||
697 | |||
698 | /* Return a pointer to a new predicate structure, which has been | ||
699 | linked in as the last one in the predicates list. | ||
700 | @@ -1433,6 +1450,8 @@ get_new_pred (const struct parser_table *entry) | ||
701 | last_pred->no_default_print = false; | ||
702 | last_pred->need_stat = true; | ||
703 | last_pred->need_type = true; | ||
704 | + last_pred->p_cost = NeedsUnknown; | ||
705 | + last_pred->arg_text = "ThisShouldBeSetToSomethingElse"; | ||
706 | last_pred->args.str = NULL; | ||
707 | last_pred->pred_next = NULL; | ||
708 | last_pred->pred_left = NULL; | ||
709 | @@ -1449,7 +1468,8 @@ get_new_pred (const struct parser_table *entry) | ||
710 | predicate is an operator. If it isn't, the AND operator is inserted. */ | ||
711 | |||
712 | struct predicate * | ||
713 | -get_new_pred_chk_op (const struct parser_table *entry) | ||
714 | +get_new_pred_chk_op (const struct parser_table *entry, | ||
715 | + const char *arg) | ||
716 | { | ||
717 | struct predicate *new_pred; | ||
718 | static const struct parser_table *entry_and = NULL; | ||
719 | @@ -1471,13 +1491,14 @@ get_new_pred_chk_op (const struct parser_table *entry) | ||
720 | case PRIMARY_TYPE: | ||
721 | case CLOSE_PAREN: | ||
722 | /* We need to interpose the and operator. */ | ||
723 | - new_pred = get_new_pred (entry_and); | ||
724 | + new_pred = get_new_pred_noarg (entry_and); | ||
725 | new_pred->pred_func = pred_and; | ||
726 | new_pred->p_name = "-a"; | ||
727 | new_pred->p_type = BI_OP; | ||
728 | new_pred->p_prec = AND_PREC; | ||
729 | new_pred->need_stat = false; | ||
730 | new_pred->need_type = false; | ||
731 | + new_pred->arg_text = NULL; | ||
732 | new_pred->args.str = NULL; | ||
733 | new_pred->side_effects = false; | ||
734 | new_pred->no_default_print = false; | ||
735 | @@ -1488,6 +1509,7 @@ get_new_pred_chk_op (const struct parser_table *entry) | ||
736 | } | ||
737 | |||
738 | new_pred = get_new_pred (entry); | ||
739 | + new_pred->arg_text = arg; | ||
740 | new_pred->parser_entry = entry; | ||
741 | return new_pred; | ||
742 | } | ||
743 | diff --git a/find/util.c b/find/util.c | ||
744 | index a06eada..cc9a3eb 100644 | ||
745 | --- a/find/util.c | ||
746 | +++ b/find/util.c | ||
747 | @@ -89,11 +89,13 @@ static struct debug_option_assoc debugassoc[] = | ||
748 | operator. */ | ||
749 | |||
750 | struct predicate * | ||
751 | -insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func) | ||
752 | +insert_primary_withpred (const struct parser_table *entry, | ||
753 | + PRED_FUNC pred_func, | ||
754 | + const char *arg) | ||
755 | { | ||
756 | struct predicate *new_pred; | ||
757 | |||
758 | - new_pred = get_new_pred_chk_op (entry); | ||
759 | + new_pred = get_new_pred_chk_op (entry, arg); | ||
760 | new_pred->pred_func = pred_func; | ||
761 | new_pred->p_name = entry->parser_name; | ||
762 | new_pred->args.str = NULL; | ||
763 | @@ -118,10 +120,16 @@ insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func) | ||
764 | either not there at all (we are the very first node) or is an | ||
765 | operator. */ | ||
766 | struct predicate * | ||
767 | -insert_primary (const struct parser_table *entry) | ||
768 | +insert_primary (const struct parser_table *entry, const char *arg) | ||
769 | { | ||
770 | assert (entry->pred_func != NULL); | ||
771 | - return insert_primary_withpred(entry, entry->pred_func); | ||
772 | + return insert_primary_withpred(entry, entry->pred_func, arg); | ||
773 | +} | ||
774 | + | ||
775 | +struct predicate * | ||
776 | +insert_primary_noarg (const struct parser_table *entry) | ||
777 | +{ | ||
778 | + return insert_primary(entry, NULL); | ||
779 | } | ||
780 | |||
781 | |||
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch b/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch new file mode 100644 index 0000000000..c0ff3ff1c0 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch | |||
@@ -0,0 +1,294 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | commit 76ed377d6d3e4a83a00cabd401f751b37ecd1e7b | ||
4 | Author: James Youngman <jay@gnu.org> | ||
5 | Date: Sat Feb 20 13:11:45 2010 +0000 | ||
6 | |||
7 | Fix Savannah bug# 28824: "-ctime x" yields "missing argument to `-ctime'". | ||
8 | |||
9 | * find/parser.c (parse_fls): If the argument is invalid, reverse | ||
10 | the change that collect_arg() made to *arg_ptr (that is, don't | ||
11 | consume the argument). | ||
12 | (parse_fprint0): Likewise. | ||
13 | (parse_gid): Likewise. | ||
14 | (parse_group): Likewise. | ||
15 | (parse_inum): Likewise. | ||
16 | (parse_links): Likewise. | ||
17 | (do_parse_xmin): Likewise. | ||
18 | (parse_name): Likewise. | ||
19 | (parse_printf): Likewise. | ||
20 | (parse_uid): Likewise. | ||
21 | (parse_used): Likewise. | ||
22 | (parse_time): Likewise. | ||
23 | |||
24 | Signed-off-by: James Youngman <jay@gnu.org> | ||
25 | |||
26 | diff --git a/ChangeLog b/ChangeLog | ||
27 | index d0ce1fe..13539a4 100644 | ||
28 | --- a/ChangeLog | ||
29 | +++ b/ChangeLog | ||
30 | @@ -1,0 +1,19 @@ | ||
31 | +2010-02-20 James Youngman <jay@gnu.org> | ||
32 | + | ||
33 | + Fix Savannah bug# 28824: "-ctime x" yields "missing argument to | ||
34 | + `-ctime'". | ||
35 | + * find/parser.c (parse_fls): If the argument is invalid, reverse | ||
36 | + the change that collect_arg() made to *arg_ptr (that is, don't | ||
37 | + consume the argument). | ||
38 | + (parse_fprint0): Likewise. | ||
39 | + (parse_gid): Likewise. | ||
40 | + (parse_group): Likewise. | ||
41 | + (parse_inum): Likewise. | ||
42 | + (parse_links): Likewise. | ||
43 | + (do_parse_xmin): Likewise. | ||
44 | + (parse_name): Likewise. | ||
45 | + (parse_printf): Likewise. | ||
46 | + (parse_uid): Likewise. | ||
47 | + (parse_used): Likewise. | ||
48 | + (parse_time): Likewise. | ||
49 | + | ||
50 | diff --git a/NEWS b/NEWS | ||
51 | index 5394311..4e910df 100644 | ||
52 | --- a/NEWS | ||
53 | +++ b/NEWS | ||
54 | @@ -4,5 +4,8 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout) | ||
55 | |||
56 | ** Bug Fixes | ||
57 | |||
58 | +#28824: Corrected error message for "-ctime x". | ||
59 | + Likewise for -gid, -inum, -links, -mmin, -cmin, -amin, | ||
60 | + -uid, -used, -atime, -mtime, -ctime. | ||
61 | #26537: find -prune now makes sure it has valid stat() information. | ||
62 | |||
63 | diff --git a/find/parser.c b/find/parser.c | ||
64 | index 2e6b989..08758ee 100644 | ||
65 | --- a/find/parser.c | ||
66 | +++ b/find/parser.c | ||
67 | @@ -886,8 +886,14 @@ static boolean | ||
68 | parse_fls (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
69 | { | ||
70 | const char *filename; | ||
71 | - return collect_arg(argv, arg_ptr, &filename) | ||
72 | - && insert_fls(entry, filename); | ||
73 | + if (collect_arg(argv, arg_ptr, &filename)) | ||
74 | + { | ||
75 | + if (insert_fls(entry, filename)) | ||
76 | + return true; | ||
77 | + else | ||
78 | + --*arg_ptr; /* don't consume the invalid arg. */ | ||
79 | + } | ||
80 | + return false; | ||
81 | } | ||
82 | |||
83 | static boolean | ||
84 | @@ -937,9 +943,13 @@ parse_fprint0 (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
85 | { | ||
86 | const char *filename; | ||
87 | if (collect_arg(argv, arg_ptr, &filename)) | ||
88 | - return insert_fprint(entry, filename); | ||
89 | - else | ||
90 | - return false; | ||
91 | + { | ||
92 | + if (insert_fprint(entry, filename)) | ||
93 | + return true; | ||
94 | + else | ||
95 | + --*arg_ptr; /* don't consume the bad arg. */ | ||
96 | + } | ||
97 | + return false; | ||
98 | } | ||
99 | |||
100 | static float estimate_fstype_success_rate(const char *fsname) | ||
101 | @@ -993,6 +1003,7 @@ parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
102 | } | ||
103 | else | ||
104 | { | ||
105 | + --*arg_ptr; /* don't consume the invalid argument. */ | ||
106 | return false; | ||
107 | } | ||
108 | } | ||
109 | @@ -1049,6 +1060,7 @@ static boolean | ||
110 | parse_group (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
111 | { | ||
112 | const char *groupname; | ||
113 | + const int saved_argc = *arg_ptr; | ||
114 | |||
115 | if (collect_arg(argv, arg_ptr, &groupname)) | ||
116 | { | ||
117 | @@ -1077,6 +1089,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
118 | "because it has the unexpected suffix %s"), | ||
119 | quotearg_n_style(0, options.err_quoting_style, groupname), | ||
120 | quotearg_n_style(1, options.err_quoting_style, groupname+gid_len)); | ||
121 | + *arg_ptr = saved_argc; /* don't consume the invalid argument. */ | ||
122 | return false; | ||
123 | } | ||
124 | } | ||
125 | @@ -1092,6 +1105,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
126 | { | ||
127 | error(1, 0, _("argument to -group is empty, but should be a group name")); | ||
128 | } | ||
129 | + *arg_ptr = saved_argc; /* don't consume the invalid argument. */ | ||
130 | return false; | ||
131 | } | ||
132 | } | ||
133 | @@ -1256,6 +1270,7 @@ parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
134 | } | ||
135 | else | ||
136 | { | ||
137 | + --*arg_ptr; /* don't consume the invalid argument. */ | ||
138 | return false; | ||
139 | } | ||
140 | } | ||
141 | @@ -1310,6 +1325,7 @@ parse_links (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
142 | } | ||
143 | else | ||
144 | { | ||
145 | + --*arg_ptr; /* don't consume the invalid argument. */ | ||
146 | return false; | ||
147 | } | ||
148 | } | ||
149 | @@ -1358,6 +1374,7 @@ insert_depthspec(const struct parser_table* entry, char **argv, int *arg_ptr, | ||
150 | error(1, 0, _("Expected a positive decimal integer argument to %s, but got %s"), | ||
151 | predicate, | ||
152 | quotearg_n_style(0, options.err_quoting_style, depthstr)); | ||
153 | + /* NOTREACHED */ | ||
154 | return false; | ||
155 | } | ||
156 | /* missing argument */ | ||
157 | @@ -1385,6 +1402,7 @@ do_parse_xmin (const struct parser_table* entry, | ||
158 | enum xval xv) | ||
159 | { | ||
160 | const char *minutes; | ||
161 | + const int saved_argc = *arg_ptr; | ||
162 | |||
163 | if (collect_arg(argv, arg_ptr, &minutes)) | ||
164 | { | ||
165 | @@ -1401,6 +1419,11 @@ do_parse_xmin (const struct parser_table* entry, | ||
166 | our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec); | ||
167 | return true; | ||
168 | } | ||
169 | + else | ||
170 | + { | ||
171 | + /* Don't consume the invalid argument. */ | ||
172 | + *arg_ptr = saved_argc; | ||
173 | + } | ||
174 | } | ||
175 | return false; | ||
176 | } | ||
177 | @@ -1427,6 +1450,8 @@ static boolean | ||
178 | parse_name (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
179 | { | ||
180 | const char *name; | ||
181 | + const int saved_argc = *arg_ptr; | ||
182 | + | ||
183 | if (collect_arg(argv, arg_ptr, &name)) | ||
184 | { | ||
185 | fnmatch_sanitycheck(); | ||
186 | @@ -1438,6 +1463,10 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
187 | our_pred->est_success_rate = estimate_pattern_match_rate(name, 0); | ||
188 | return true; | ||
189 | } | ||
190 | + else | ||
191 | + { | ||
192 | + *arg_ptr = saved_argc; /* don't consume the invalid argument. */ | ||
193 | + } | ||
194 | } | ||
195 | return false; | ||
196 | } | ||
197 | @@ -1954,11 +1983,21 @@ static boolean | ||
198 | parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
199 | { | ||
200 | const char *format; | ||
201 | + const int saved_argc = *arg_ptr; | ||
202 | + | ||
203 | if (collect_arg(argv, arg_ptr, &format)) | ||
204 | { | ||
205 | struct format_val fmt; | ||
206 | open_stdout(&fmt); | ||
207 | - return insert_fprintf (&fmt, entry, pred_fprintf, format); | ||
208 | + if (insert_fprintf (&fmt, entry, pred_fprintf, format)) | ||
209 | + { | ||
210 | + return true; | ||
211 | + } | ||
212 | + else | ||
213 | + { | ||
214 | + *arg_ptr = saved_argc; /* don't consume the invalid argument. */ | ||
215 | + return false; | ||
216 | + } | ||
217 | } | ||
218 | return false; | ||
219 | } | ||
220 | @@ -1967,15 +2006,21 @@ static boolean | ||
221 | parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
222 | { | ||
223 | const char *format, *filename; | ||
224 | + int saved_argc = *arg_ptr; | ||
225 | + | ||
226 | if (collect_arg(argv, arg_ptr, &filename)) | ||
227 | { | ||
228 | if (collect_arg(argv, arg_ptr, &format)) | ||
229 | { | ||
230 | struct format_val fmt; | ||
231 | open_output_file (filename, &fmt); | ||
232 | - return insert_fprintf (&fmt, entry, pred_fprintf, format); | ||
233 | + saved_argc = *arg_ptr; | ||
234 | + | ||
235 | + if (insert_fprintf (&fmt, entry, pred_fprintf, format)) | ||
236 | + return true; | ||
237 | } | ||
238 | } | ||
239 | + *arg_ptr = saved_argc; /* don't consume the invalid argument. */ | ||
240 | return false; | ||
241 | } | ||
242 | |||
243 | @@ -2405,6 +2450,7 @@ parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
244 | } | ||
245 | else | ||
246 | { | ||
247 | + --*arg_ptr; /* don't consume the invalid argument. */ | ||
248 | return false; | ||
249 | } | ||
250 | } | ||
251 | @@ -2431,6 +2477,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr) | ||
252 | else | ||
253 | { | ||
254 | error(1, 0, _("Invalid argument %s to -used"), offset_str); | ||
255 | + /*NOTREACHED*/ | ||
256 | return false; | ||
257 | } | ||
258 | } | ||
259 | @@ -2610,6 +2657,7 @@ insert_type (char **argv, int *arg_ptr, | ||
260 | if (strlen(typeletter) != 1u) | ||
261 | { | ||
262 | error(1, 0, _("Arguments to -type should contain only one letter")); | ||
263 | + /*NOTREACHED*/ | ||
264 | return false; | ||
265 | } | ||
266 | |||
267 | @@ -2657,6 +2705,7 @@ insert_type (char **argv, int *arg_ptr, | ||
268 | #endif | ||
269 | default: /* None of the above ... nuke 'em. */ | ||
270 | error(1, 0, _("Unknown argument to -type: %c"), (*typeletter)); | ||
271 | + /*NOTREACHED*/ | ||
272 | return false; | ||
273 | } | ||
274 | our_pred = insert_primary_withpred (entry, which_pred, typeletter); | ||
275 | @@ -3349,6 +3398,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr) | ||
276 | const char *errmsg = "arithmetic overflow while converting %s " | ||
277 | "days to a number of seconds"; | ||
278 | struct timespec origin; | ||
279 | + const int saved_argc = *arg_ptr; | ||
280 | |||
281 | if (!collect_arg(argv, arg_ptr, &timearg)) | ||
282 | return false; | ||
283 | @@ -3381,7 +3431,10 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr) | ||
284 | timearg = orig_timearg; | ||
285 | |||
286 | if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg)) | ||
287 | - return false; | ||
288 | + { | ||
289 | + *arg_ptr = saved_argc; /* don't consume the invalid argument */ | ||
290 | + return false; | ||
291 | + } | ||
292 | |||
293 | our_pred = insert_primary (entry, orig_timearg); | ||
294 | our_pred->args.reftime = tval; | ||
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch b/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch new file mode 100644 index 0000000000..940aaf6ff5 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | commit 5f5eb921765794e8fc58c4bdffa2daa2ae34800f | ||
4 | Author: James Youngman <jay@gnu.org> | ||
5 | Date: Sat Feb 20 19:53:13 2010 +0000 | ||
6 | |||
7 | Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames" | ||
8 | |||
9 | * doc/find.texi (Problems with -exec and filenames): Add missing | ||
10 | $0 argument in example for sh -c 'something "$@" sh ... | ||
11 | * NEWS: Mention this change. | ||
12 | |||
13 | Signed-off-by: James Youngman <jay@gnu.org> | ||
14 | |||
15 | diff --git a/ChangeLog b/ChangeLog | ||
16 | index 13539a4..e94ba96 100644 | ||
17 | --- a/ChangeLog | ||
18 | +++ b/ChangeLog | ||
19 | @@ -1,5 +1,10 @@ | ||
20 | 2010-02-20 James Youngman <jay@gnu.org> | ||
21 | |||
22 | + Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames" | ||
23 | + * doc/find.texi (Problems with -exec and filenames): Add missing | ||
24 | + $0 argument in example for sh -c 'something "$@" sh ... | ||
25 | + * NEWS: Mention this change. | ||
26 | + | ||
27 | Fix Savannah bug# 28824: "-ctime x" yields "missing argument to | ||
28 | `-ctime'". | ||
29 | * find/parser.c (parse_fls): If the argument is invalid, reverse | ||
30 | diff --git a/NEWS b/NEWS | ||
31 | index 4e910df..4c97be9 100644 | ||
32 | --- a/NEWS | ||
33 | +++ b/NEWS | ||
34 | @@ -4,6 +4,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout) | ||
35 | |||
36 | ** Bug Fixes | ||
37 | |||
38 | +#28872: Mistake in "#safer" example in "Problems with -exec and | ||
39 | + filenames" section of the Texinfo manual. | ||
40 | + | ||
41 | #28824: Corrected error message for "-ctime x". | ||
42 | Likewise for -gid, -inum, -links, -mmin, -cmin, -amin, | ||
43 | -uid, -used, -atime, -mtime, -ctime. | ||
44 | diff --git a/doc/find.texi b/doc/find.texi | ||
45 | index 2e5958d..391ffa0 100644 | ||
46 | --- a/doc/find.texi | ||
47 | +++ b/doc/find.texi | ||
48 | @@ -4830,8 +4830,8 @@ problem: | ||
49 | |||
50 | @example | ||
51 | # safer | ||
52 | -find -exec sh -c 'something "$@@"' @{@} \; | ||
53 | -find -execdir sh -c 'something "$@@"' @{@}\; | ||
54 | +find -exec sh -c 'something "$@@"' sh @{@} \; | ||
55 | +find -execdir sh -c 'something "$@@"' sh @{@}\; | ||
56 | @end example | ||
57 | |||
58 | This approach is not guaranteed to avoid every problem, but it is much | ||
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch new file mode 100644 index 0000000000..a48cdc221c --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch | |||
@@ -0,0 +1,84 @@ | |||
1 | Fix documentation build errors | ||
2 | |||
3 | This fixes the following errors building the findutils documentation: | ||
4 | find-maint.texi:45: misplaced { | ||
5 | find-maint.texi:45: misplaced } | ||
6 | find-maint.texi:236: warning: node next `Make the Compiler Find the Bugs' in menu `The File System Is Being Modified' and in sectioning `Factor Out Repeated Code' differ | ||
7 | find-maint.texi:335: warning: node `Debugging is For Users Too' is next for `Factor Out Repeated Code' in sectioning but not in menu | ||
8 | find-maint.texi:335: warning: node prev `Factor Out Repeated Code' in menu `Debugging is For Users Too' and in sectioning `Make the Compiler Find the Bugs' differ | ||
9 | find-maint.texi:378: warning: node next `Debugging is For Users Too' in menu `Factor Out Repeated Code' and in sectioning `Don't Trust the File System Contents' differ | ||
10 | find-maint.texi:378: warning: node prev `Debugging is For Users Too' in menu `Don't Trust the File System Contents' and in sectioning `Factor Out Repeated Code' differ | ||
11 | find-maint.texi:392: warning: node next `Don't Trust the File System Contents' in menu `Debugging is For Users Too' and in sectioning `The File System Is Being Modified' differ | ||
12 | find-maint.texi:392: warning: node prev `Don't Trust the File System Contents' in menu `The File System Is Being Modified' and in sectioning `Debugging is For Users Too' differ | ||
13 | find-maint.texi:417: warning: node `Don't Trust the File System Contents' is next for `The File System Is Being Modified' in menu but not in sectioning | ||
14 | find-maint.texi:417: warning: node prev `The File System Is Being Modified' in menu `Make the Compiler Find the Bugs' and in sectioning `Don't Trust the File System Contents' differ | ||
15 | find.texi:53: misplaced { | ||
16 | find.texi:53: misplaced } | ||
17 | find.texi:1862: warning: node `Formatting Flags' is next for `Time Directives' in menu but not in sectioning | ||
18 | find.texi:1975: warning: node `Formatting Flags' is next for `Combined Time Formats' in sectioning but not in menu | ||
19 | find.texi:2004: warning: node prev `Formatting Flags' in menu `Time Directives' and in sectioning `Combined Time Formats' differ | ||
20 | find.texi:2004: warning: node up `Formatting Flags' in menu `Format Directives' and in sectioning `Time Formats' differ | ||
21 | find.texi:1893: node `Time Formats' lacks menu item for `Formatting Flags' despite being its Up target | ||
22 | |||
23 | Upstream-Status: Backport | ||
24 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
25 | |||
26 | --- a/doc/find-maint.texi | ||
27 | +++ b/doc/find-maint.texi | ||
28 | @@ -42,7 +42,7 @@ Free Documentation License''. | ||
29 | |||
30 | @page | ||
31 | @vskip 0pt plus 1filll | ||
32 | -@insertcopying{} | ||
33 | +@insertcopying | ||
34 | @end titlepage | ||
35 | |||
36 | @contents | ||
37 | @@ -227,10 +227,10 @@ circumstances. | ||
38 | |||
39 | @menu | ||
40 | * Make the Compiler Find the Bugs:: | ||
41 | +* Factor Out Repeated Code:: | ||
42 | * The File System Is Being Modified:: | ||
43 | * Don't Trust the File System Contents:: | ||
44 | * Debugging is For Users Too:: | ||
45 | -* Factor Out Repeated Code:: | ||
46 | @end menu | ||
47 | |||
48 | @node Make the Compiler Find the Bugs | ||
49 | --- a/doc/find.texi | ||
50 | +++ b/doc/find.texi | ||
51 | @@ -50,7 +50,7 @@ Texts. A copy of the license is included in the section entitled | ||
52 | |||
53 | @page | ||
54 | @vskip 0pt plus 1filll | ||
55 | -@insertcopying{} | ||
56 | +@insertcopying | ||
57 | @end titlepage | ||
58 | |||
59 | @contents | ||
60 | @@ -1665,6 +1665,7 @@ no output is ever sent to it. | ||
61 | * Escapes:: | ||
62 | * Format Directives:: | ||
63 | * Time Formats:: | ||
64 | +* Formatting Flags:: | ||
65 | @end menu | ||
66 | |||
67 | @node Escapes | ||
68 | @@ -1733,7 +1734,6 @@ from the novel you are reading. | ||
69 | * Size Directives:: | ||
70 | * Location Directives:: | ||
71 | * Time Directives:: | ||
72 | -* Formatting Flags:: | ||
73 | @end menu | ||
74 | |||
75 | @node Name Directives | ||
76 | @@ -2002,7 +2002,7 @@ seconds field includes a fractional part. | ||
77 | @end table | ||
78 | |||
79 | @node Formatting Flags | ||
80 | -@subsubsection Formatting Flags | ||
81 | +@subsection Formatting Flags | ||
82 | |||
83 | The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0} | ||
84 | and @samp{+} flags, but the other directives do not, even if they | ||
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch new file mode 100644 index 0000000000..d4a7e95728 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | This patch fixes following issue with automake 1.12 | ||
4 | |||
5 | | configure.ac:80: error: automatic de-ANSI-fication support has been removed | ||
6 | |||
7 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
8 | 2012/05/03 | ||
9 | |||
10 | Index: findutils-4.4.2/configure.ac | ||
11 | =================================================================== | ||
12 | --- findutils-4.4.2.orig/configure.ac | ||
13 | +++ findutils-4.4.2/configure.ac | ||
14 | @@ -77,8 +77,6 @@ AC_PROG_CPP | ||
15 | dnl for gnulib | ||
16 | gl_EARLY | ||
17 | |||
18 | -AM_C_PROTOTYPES | ||
19 | - | ||
20 | AC_PROG_INSTALL | ||
21 | AC_PROG_RANLIB | ||
22 | dnl AC_PROG_LIBTOOL | ||
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch new file mode 100644 index 0000000000..b78cc7539c --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Author: H.J. Lu <hjl.tools@gmail.com> | ||
4 | |||
5 | Work around gnulib time_t assumption in findutils for x32 | ||
6 | |||
7 | time_t is 64bit and long int is 32bit on x32. But gnulib used in | ||
8 | findutils assumes time_t values fit into long int. Such assumption is | ||
9 | invalid for x32 and should be removed. | ||
10 | |||
11 | This patch is a workaround to compile gnulib for x32. | ||
12 | |||
13 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05 | ||
14 | |||
15 | |||
16 | Index: findutils-4.4.2/gnulib/lib/getdate.y | ||
17 | =================================================================== | ||
18 | --- findutils-4.4.2.orig/gnulib/lib/getdate.y | ||
19 | +++ findutils-4.4.2/gnulib/lib/getdate.y | ||
20 | @@ -114,7 +114,6 @@ | ||
21 | wraps around, but there's no portable way to check for that at | ||
22 | compile-time. */ | ||
23 | verify (TYPE_IS_INTEGER (time_t)); | ||
24 | -verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX); | ||
25 | |||
26 | /* An integer value, and the number of digits in its textual | ||
27 | representation. */ | ||
28 | Index: findutils-4.4.2/gnulib/lib/mktime.c | ||
29 | =================================================================== | ||
30 | --- findutils-4.4.2.orig/gnulib/lib/mktime.c | ||
31 | +++ findutils-4.4.2/gnulib/lib/mktime.c | ||
32 | @@ -166,7 +166,7 @@ ydhms_diff (long int year1, long int yda | ||
33 | { | ||
34 | verify (C99_integer_division, -1 / 2 == 0); | ||
35 | verify (long_int_year_and_yday_are_wide_enough, | ||
36 | - INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX); | ||
37 | + INT_MAX <= TIME_T_MAX / 2 || TIME_T_MAX <= UINT_MAX); | ||
38 | |||
39 | /* Compute intervening leap days correctly even if year is negative. | ||
40 | Take care to avoid integer overflow here. */ | ||
diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc new file mode 100644 index 0000000000..4f4068a091 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils.inc | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = "find, locate, and xargs binaries" | ||
2 | DESCRIPTION = "The GNU Find Utilities are the basic directory searching utilities of the GNU operating system. \ | ||
3 | These programs are typically used in conjunction with other programs to provide modular and powerful directory \ | ||
4 | search and file locating capabilities to other commands." | ||
5 | HOMEPAGE = "http://www.gnu.org/software/findutils/" | ||
6 | BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils" | ||
7 | SECTION = "console/utils" | ||
8 | |||
9 | |||
10 | SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz" | ||
11 | |||
12 | inherit autotools gettext texinfo update-alternatives | ||
13 | |||
14 | ALTERNATIVE_${PN} = "find xargs" | ||
15 | ALTERNATIVE_PRIORITY = "100" | ||
16 | |||
17 | # diffutils assumes non-glibc compilation with uclibc and | ||
18 | # this causes it to generate its own implementations of | ||
19 | # standard functionality. regex.c actually breaks compilation | ||
20 | # because it uses __mempcpy, there are other things (TBD: | ||
21 | # see diffutils.mk in buildroot) | ||
22 | EXTRA_OECONF_libc-uclibc = "--without-included-regex" | ||
23 | |||
24 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-extended/findutils/findutils_4.2.31.bb b/meta/recipes-extended/findutils/findutils_4.2.31.bb new file mode 100644 index 0000000000..72b657a100 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils_4.2.31.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | LICENSE = "GPLv2+" | ||
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
3 | PR = "r4" | ||
4 | |||
5 | require findutils.inc | ||
6 | |||
7 | SRC_URI += "file://gnulib-extension.patch \ | ||
8 | file://findutils_fix_for_automake-1.12.patch \ | ||
9 | file://findutils-fix-doc-build-error.patch \ | ||
10 | " | ||
11 | |||
12 | SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a" | ||
13 | SRC_URI[sha256sum] = "e0d34b8faca0b3cca0703f6c6b498afbe72f0ba16c35980c10ec9ef7724d6204" | ||
diff --git a/meta/recipes-extended/findutils/findutils_4.4.2.bb b/meta/recipes-extended/findutils/findutils_4.4.2.bb new file mode 100644 index 0000000000..faf2ebe462 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils_4.4.2.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | require findutils.inc | ||
2 | |||
3 | # GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32) | ||
4 | LICENSE = "GPLv3+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" | ||
6 | |||
7 | PR = "r6" | ||
8 | |||
9 | SRC_URI += "file://01-27017.patch \ | ||
10 | file://02-28824.patch \ | ||
11 | file://03-28872.patch \ | ||
12 | file://findutils_fix_for_x32.patch \ | ||
13 | file://findutils_fix_for_automake-1.12.patch \ | ||
14 | file://findutils_fix_doc.patch \ | ||
15 | " | ||
16 | |||
17 | SRC_URI[md5sum] = "351cc4adb07d54877fa15f75fb77d39f" | ||
18 | SRC_URI[sha256sum] = "434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a" | ||
19 | |||
20 | DEPENDS = "bison-native" | ||
21 | |||
22 | # http://savannah.gnu.org/bugs/?27299 | ||
23 | CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}" | ||
24 | |||
25 | EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort" | ||
diff --git a/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb b/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb new file mode 100644 index 0000000000..790c98138b --- /dev/null +++ b/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "OpenPrinting printer support - filters" | ||
2 | DESCRIPTION = "Foomatic is a printer database designed to make it easier to set up \ | ||
3 | common printers for use with UNIX-like operating systems.\ | ||
4 | It provides the "glue" between a print spooler (like CUPS or lpr) and \ | ||
5 | the printer, by processing files sent to the printer. \ | ||
6 | \ | ||
7 | This package consists of filters used by the printer spoolers \ | ||
8 | to convert the incoming PostScript data into the printer's native \ | ||
9 | format using a printer-specific, but spooler-independent PPD file. \ | ||
10 | " | ||
11 | |||
12 | DEPENDS += "cups perl libxml2" | ||
13 | PR = "r1" | ||
14 | |||
15 | LICENSE = "GPLv2+" | ||
16 | LIC_FILES_CHKSUM = "file://${WORKDIR}/foomatic-filters-${PV}/COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
17 | |||
18 | SRC_URI = "http://www.openprinting.org/download/foomatic/foomatic-filters-${PV}.tar.gz" | ||
19 | |||
20 | SRC_URI[md5sum] = "b05f5dcbfe359f198eef3df5b283d896" | ||
21 | SRC_URI[sha256sum] = "a2e2e53e502571e88eeb9010c45a0d54671f15707ee104f5c9c22b59ea7a33e3" | ||
22 | |||
23 | inherit autotools pkgconfig | ||
24 | |||
25 | EXTRA_OECONF += "--disable-file-converter-check --with-file-converter=texttops" | ||
26 | |||
27 | do_configure_prepend() { | ||
28 | export PERL="${bindir}/env perl" | ||
29 | export CUPS_SERVERBIN=${exec_prefix}/lib/cups # /usr/lib NOT libdir | ||
30 | } | ||
31 | |||
32 | do_install_append_linuxstdbase() { | ||
33 | install -d ${D}${exec_prefix}/lib/cups/filter | ||
34 | ln -sf ${bindir}/foomatic-rip ${D}${exec_prefix}/lib/cups/filter | ||
35 | } | ||
36 | |||
37 | FILES_${PN} += "${exec_prefix}/lib/cups/ ${exec_prefix}/lib/ppr/" | ||
diff --git a/meta/recipes-extended/gamin/gamin-0.1.10/obsolete_automake_macros.patch b/meta/recipes-extended/gamin/gamin-0.1.10/obsolete_automake_macros.patch new file mode 100644 index 0000000000..c4300ca6a0 --- /dev/null +++ b/meta/recipes-extended/gamin/gamin-0.1.10/obsolete_automake_macros.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=693449] | ||
2 | |||
3 | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> | ||
4 | diff -Nurd gamin-0.1.10/configure.in gamin-0.1.10/configure.in | ||
5 | --- gamin-0.1.10/configure.in 2008-11-24 17:23:06.000000000 +0200 | ||
6 | +++ gamin-0.1.10/configure.in 2013-02-08 23:11:59.656279992 +0200 | ||
7 | @@ -1,7 +1,7 @@ | ||
8 | dnl Process this file with autoconf to produce a configure script. | ||
9 | AC_PREREQ(2.52) | ||
10 | AC_INIT(libgamin) | ||
11 | -AM_CONFIG_HEADER(config.h) | ||
12 | +AC_CONFIG_HEADERS(config.h) | ||
13 | AC_CANONICAL_SYSTEM | ||
14 | |||
15 | # get any external flags setting before we start playing with the CFLAGS variable | ||
16 | @@ -31,7 +31,6 @@ | ||
17 | |||
18 | AC_USE_SYSTEM_EXTENSIONS | ||
19 | AC_PROG_CC | ||
20 | -AM_PROG_CC_STDC | ||
21 | AC_HEADER_STDC | ||
22 | AC_PROG_INSTALL | ||
23 | AC_PROG_MAKE_SET | ||
diff --git a/meta/recipes-extended/gamin/gamin/no-abstract-sockets.patch b/meta/recipes-extended/gamin/gamin/no-abstract-sockets.patch new file mode 100644 index 0000000000..cddf2dc93d --- /dev/null +++ b/meta/recipes-extended/gamin/gamin/no-abstract-sockets.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | --- /tmp/configure.in 2007-04-30 13:08:49.000000000 +0200 | ||
4 | +++ gamin-0.1.8/configure.in 2007-04-30 13:10:53.285251000 +0200 | ||
5 | @@ -354,51 +354,6 @@ | ||
6 | AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure]) | ||
7 | fi | ||
8 | |||
9 | -#### Abstract sockets | ||
10 | - | ||
11 | -AC_MSG_CHECKING(abstract socket namespace) | ||
12 | -AC_LANG_PUSH(C) | ||
13 | -AC_RUN_IFELSE([AC_LANG_PROGRAM( | ||
14 | -[[ | ||
15 | -#include <sys/types.h> | ||
16 | -#include <stdlib.h> | ||
17 | -#include <string.h> | ||
18 | -#include <stdio.h> | ||
19 | -#include <sys/socket.h> | ||
20 | -#include <sys/un.h> | ||
21 | -#include <errno.h> | ||
22 | -]], | ||
23 | -[[ | ||
24 | - int listen_fd; | ||
25 | - struct sockaddr_un addr; | ||
26 | - | ||
27 | - listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); | ||
28 | - | ||
29 | - if (listen_fd < 0) | ||
30 | - { | ||
31 | - fprintf (stderr, "socket() failed: %s\n", strerror (errno)); | ||
32 | - exit (1); | ||
33 | - } | ||
34 | - | ||
35 | - memset (&addr, '\0', sizeof (addr)); | ||
36 | - addr.sun_family = AF_UNIX; | ||
37 | - strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); | ||
38 | - addr.sun_path[0] = '\0'; /* this is what makes it abstract */ | ||
39 | - | ||
40 | - if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) | ||
41 | - { | ||
42 | - fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", | ||
43 | - strerror (errno)); | ||
44 | - exit (1); | ||
45 | - } | ||
46 | - else | ||
47 | - exit (0); | ||
48 | -]])], | ||
49 | - [have_abstract_sockets=yes], | ||
50 | - [have_abstract_sockets=no]) | ||
51 | -AC_LANG_POP(C) | ||
52 | -AC_MSG_RESULT($have_abstract_sockets) | ||
53 | - | ||
54 | if test x$enable_abstract_sockets = xyes; then | ||
55 | if test x$have_abstract_sockets = xno; then | ||
56 | AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.]) | ||
diff --git a/meta/recipes-extended/gamin/gamin/noconst.patch b/meta/recipes-extended/gamin/gamin/noconst.patch new file mode 100644 index 0000000000..7b2998c279 --- /dev/null +++ b/meta/recipes-extended/gamin/gamin/noconst.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | G_CONST_RETURN is deprecated in glib 2.30 so remove to to avoid | ||
2 | build failures. | ||
3 | |||
4 | RP 2011/10/12 | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Index: gamin-0.1.10/server/gam_node.c | ||
9 | =================================================================== | ||
10 | --- gamin-0.1.10.orig/server/gam_node.c 2011-10-12 15:25:45.217178314 +0100 | ||
11 | +++ gamin-0.1.10/server/gam_node.c 2011-10-12 15:26:17.807178293 +0100 | ||
12 | @@ -122,7 +122,7 @@ | ||
13 | * it has finished with the string. If it must keep it longer, it | ||
14 | * should makes its own copy. The returned string must not be freed. | ||
15 | */ | ||
16 | -G_CONST_RETURN char * | ||
17 | +const char * | ||
18 | gam_node_get_path(GamNode * node) | ||
19 | { | ||
20 | g_assert(node); | ||
21 | Index: gamin-0.1.10/server/gam_node.h | ||
22 | =================================================================== | ||
23 | --- gamin-0.1.10.orig/server/gam_node.h 2011-10-12 15:25:46.857178269 +0100 | ||
24 | +++ gamin-0.1.10/server/gam_node.h 2011-10-12 15:26:28.637178297 +0100 | ||
25 | @@ -58,7 +58,7 @@ | ||
26 | void gam_node_set_is_dir (GamNode *node, | ||
27 | gboolean is_dir); | ||
28 | |||
29 | -G_CONST_RETURN char *gam_node_get_path (GamNode *node); | ||
30 | +const char *gam_node_get_path (GamNode *node); | ||
31 | |||
32 | GList *gam_node_get_subscriptions (GamNode *node); | ||
33 | |||
34 | Index: gamin-0.1.10/server/gam_subscription.c | ||
35 | =================================================================== | ||
36 | --- gamin-0.1.10.orig/server/gam_subscription.c 2011-10-12 15:25:40.497177525 +0100 | ||
37 | +++ gamin-0.1.10/server/gam_subscription.c 2011-10-12 15:26:39.867178304 +0100 | ||
38 | @@ -141,7 +141,7 @@ | ||
39 | * @param sub the GamSubscription | ||
40 | * @returns The path being monitored. It should not be freed. | ||
41 | */ | ||
42 | -G_CONST_RETURN char * | ||
43 | +const char * | ||
44 | gam_subscription_get_path(GamSubscription * sub) | ||
45 | { | ||
46 | if (sub == NULL) | ||
47 | Index: gamin-0.1.10/server/gam_subscription.h | ||
48 | =================================================================== | ||
49 | --- gamin-0.1.10.orig/server/gam_subscription.h 2011-10-12 15:25:28.507178266 +0100 | ||
50 | +++ gamin-0.1.10/server/gam_subscription.h 2011-10-12 15:25:58.817178285 +0100 | ||
51 | @@ -21,7 +21,7 @@ | ||
52 | |||
53 | int gam_subscription_get_reqno (GamSubscription *sub); | ||
54 | |||
55 | -G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub); | ||
56 | +const char *gam_subscription_get_path (GamSubscription *sub); | ||
57 | |||
58 | GamListener *gam_subscription_get_listener (GamSubscription *sub); | ||
59 | |||
diff --git a/meta/recipes-extended/gamin/gamin_0.1.10.bb b/meta/recipes-extended/gamin/gamin_0.1.10.bb new file mode 100644 index 0000000000..375d265f57 --- /dev/null +++ b/meta/recipes-extended/gamin/gamin_0.1.10.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | SUMMARY = "Gamin the File Alteration Monitor" | ||
2 | DESCRIPTION = "Gamin is a file and directory monitoring system defined to \ | ||
3 | be a subset of the FAM (File Alteration Monitor) system." | ||
4 | HOMEPAGE = "http://people.gnome.org/~veillard/gamin/" | ||
5 | |||
6 | LICENSE = "LGPLv2+" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=412a9be54757a155d0b997b52b519f62" | ||
8 | |||
9 | DEPENDS = "glib-2.0" | ||
10 | PROVIDES = "fam" | ||
11 | PR = "r5" | ||
12 | |||
13 | SRC_URI = "http://www.gnome.org/~veillard/gamin/sources/gamin-${PV}.tar.gz \ | ||
14 | file://no-abstract-sockets.patch \ | ||
15 | file://noconst.patch \ | ||
16 | file://obsolete_automake_macros.patch \ | ||
17 | " | ||
18 | |||
19 | SRC_URI[md5sum] = "b4ec549e57da470c04edd5ec2876a028" | ||
20 | SRC_URI[sha256sum] = "28085f0ae8be10eab582ff186af4fb0be92cc6c62b5cc19cd09b295c7c2899a1" | ||
21 | |||
22 | inherit autotools pkgconfig | ||
23 | |||
24 | EXTRA_OECONF = "--without-python" | ||
25 | |||
26 | PACKAGES += "lib${BPN} lib${BPN}-dev" | ||
27 | FILES_${PN} = "${libexecdir}" | ||
28 | FILES_${PN}-dbg += "${libexecdir}/.debug" | ||
29 | FILES_lib${BPN} = "${libdir}/lib*.so.*" | ||
30 | FILES_lib${BPN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/lib*.la \ | ||
31 | ${libdir}/lib*.a ${libdir}/lib*.so" | ||
32 | |||
33 | RDEPENDS_lib${BPN} = "${PN}" | ||
34 | |||
35 | LEAD_SONAME = "libgamin-1.so" | ||
36 | |||
diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch new file mode 100644 index 0000000000..b3e7987cef --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | automake 1.12 has depricated automatic de-ANSI-fication support | ||
4 | |||
5 | this patch avoids these kinds of errors: | ||
6 | |||
7 | | configure.ac:127: error: automatic de-ANSI-fication support has been removed | ||
8 | | /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from... | ||
9 | | configure.ac:127: the top level | ||
10 | | autom4te: m4 failed with exit status: 1 | ||
11 | ... | ||
12 | | Makefile.am:27: error: automatic de-ANSI-fication support has been removed | ||
13 | |||
14 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
15 | 2012/05/04 | ||
16 | |||
17 | Index: gawk-3.1.5/configure.ac | ||
18 | =================================================================== | ||
19 | --- gawk-3.1.5.orig/configure.ac | ||
20 | +++ gawk-3.1.5/configure.ac | ||
21 | @@ -124,7 +124,6 @@ fi | ||
22 | |||
23 | dnl check for C compiler for automake | ||
24 | AM_PROG_CC_STDC | ||
25 | -AM_C_PROTOTYPES | ||
26 | |||
27 | dnl Cygwin doesn't like to get libs with full paths | ||
28 | dnl since that overrides linking against DLLs. | ||
29 | Index: gawk-3.1.5/Makefile.am | ||
30 | =================================================================== | ||
31 | --- gawk-3.1.5.orig/Makefile.am | ||
32 | +++ gawk-3.1.5/Makefile.am | ||
33 | @@ -24,7 +24,7 @@ | ||
34 | ## process this file with automake to produce Makefile.in | ||
35 | |||
36 | # Automatic de-ANSI-fication if needed, make .bz2 files also. | ||
37 | -AUTOMAKE_OPTIONS = ansi2knr dist-bzip2 | ||
38 | +AUTOMAKE_OPTIONS = dist-bzip2 | ||
39 | |||
40 | # This undocumented variable insures that aclocal runs | ||
41 | # correctly after changing configure.ac | ||
diff --git a/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch b/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch new file mode 100644 index 0000000000..b241097571 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | test/fflush.sh: Remove hardcoded gawk path. | ||
2 | |||
3 | Signed-off-by: Anders Roxell <anders.roxell@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | --- | ||
6 | --- a/test/fflush.sh 2012-05-03 20:13:57.000000000 +0200 | ||
7 | +++ b/test/fflush.sh 2013-04-08 16:28:00.170796200 +0200 | ||
8 | @@ -1,16 +1,17 @@ | ||
9 | #! /bin/sh | ||
10 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}' | ||
11 | +AWK=${AWK-../gawk} | ||
12 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}' | ||
13 | |||
14 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat | ||
15 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat | ||
16 | |||
17 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat | ||
18 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat | ||
19 | |||
20 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
21 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
22 | |||
23 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
24 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
25 | |||
26 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
27 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat | ||
28 | |||
29 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat | ||
30 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat | ||
31 | |||
32 | -../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort";close("sort")}'|cat | ||
33 | +$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort";close("sort")}'|cat | ||
diff --git a/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk new file mode 100644 index 0000000000..6f651d8105 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk | |||
@@ -0,0 +1,32 @@ | |||
1 | # The awk test suite prints test names prior to running the test and shows | ||
2 | # results in the form of "make" errors. | ||
3 | # This script post-processes the output to detect failure and print PASS | ||
4 | # only if there was no subsequent error message for the test. | ||
5 | |||
6 | function print_prev() | ||
7 | { | ||
8 | if (length(testname)) | ||
9 | if (fail == 1) | ||
10 | printf "FAIL: %s\n", testname | ||
11 | else | ||
12 | printf "PASS: %s\n", testname | ||
13 | } | ||
14 | |||
15 | { | ||
16 | print $0 | ||
17 | |||
18 | if (match($0, /^(\w+)$/, result)) { | ||
19 | print_prev() | ||
20 | testname = result[1]; | ||
21 | fail = 0 | ||
22 | } | ||
23 | |||
24 | if (match($0, /^make: \[(.+?)\]/)) { | ||
25 | fail = 1 | ||
26 | } | ||
27 | |||
28 | } | ||
29 | |||
30 | END { | ||
31 | print_prev() | ||
32 | } | ||
diff --git a/meta/recipes-extended/gawk/gawk-4.1.1/Use-DESTDIR-in-extension-Makefile.am-when-removing-..patch b/meta/recipes-extended/gawk/gawk-4.1.1/Use-DESTDIR-in-extension-Makefile.am-when-removing-..patch new file mode 100644 index 0000000000..b8b1fcaea7 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-4.1.1/Use-DESTDIR-in-extension-Makefile.am-when-removing-..patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 976f73ab03569bb836aa5c949be1c1cc973b2d2e Mon Sep 17 00:00:00 2001 | ||
2 | From: "Arnold D. Robbins" <arnold@skeeve.com> | ||
3 | Date: Fri, 11 Apr 2014 07:42:16 +0300 | ||
4 | Subject: [PATCH] Use $(DESTDIR) in extension/Makefile.am when removing .la | ||
5 | files. | ||
6 | |||
7 | commit 976f73ab03569bb836aa5c949be1c1cc973b2d2e upstream. | ||
8 | |||
9 | [PG: note there was no Author SOB or long log in original.] | ||
10 | Upstream-Status: Backport [ gawk-4.1.1-3-g976f73ab0356 ] | ||
11 | Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ||
12 | --- | ||
13 | |||
14 | diff --git a/extension/ChangeLog b/extension/ChangeLog | ||
15 | index afd64ff764b6..f3a1c7a81e7d 100644 | ||
16 | --- a/extension/ChangeLog | ||
17 | +++ b/extension/ChangeLog | ||
18 | @@ -1,3 +1,9 @@ | ||
19 | +2014-04-11 Arnold D. Robbins <arnold@skeeve.com> | ||
20 | + | ||
21 | + * Makefile.am (install-data-hook): Use $(DESTDIR) when removing | ||
22 | + the .la files. Thanks to Lars Wendler <polynomial-c@gentoo.org> | ||
23 | + for the report and fix. | ||
24 | + | ||
25 | 2014-04-08 Arnold D. Robbins <arnold@skeeve.com> | ||
26 | |||
27 | * 4.1.1: Release tar ball made. | ||
28 | diff --git a/extension/Makefile.am b/extension/Makefile.am | ||
29 | index 9c49bb81abb2..11826e2b315e 100644 | ||
30 | --- a/extension/Makefile.am | ||
31 | +++ b/extension/Makefile.am | ||
32 | @@ -100,7 +100,7 @@ testext_la_LIBADD = $(MY_LIBS) | ||
33 | |||
34 | install-data-hook: | ||
35 | for i in $(pkgextension_LTLIBRARIES) ; do \ | ||
36 | - $(RM) $(pkgextensiondir)/$$i ; \ | ||
37 | + $(RM) $(DESTDIR)$(pkgextensiondir)/$$i ; \ | ||
38 | done | ||
39 | |||
40 | # Keep the uninstall check working: | ||
41 | diff --git a/extension/Makefile.in b/extension/Makefile.in | ||
42 | index 040cdb8f4e23..d81b16960935 100644 | ||
43 | --- a/extension/Makefile.in | ||
44 | +++ b/extension/Makefile.in | ||
45 | @@ -1231,7 +1231,7 @@ uninstall-man: uninstall-man3 | ||
46 | |||
47 | install-data-hook: | ||
48 | for i in $(pkgextension_LTLIBRARIES) ; do \ | ||
49 | - $(RM) $(pkgextensiondir)/$$i ; \ | ||
50 | + $(RM) $(DESTDIR)$(pkgextensiondir)/$$i ; \ | ||
51 | done | ||
52 | |||
53 | # Keep the uninstall check working: | ||
54 | -- | ||
55 | 1.9.1 | ||
56 | |||
diff --git a/meta/recipes-extended/gawk/gawk-4.1.1/extension-Add-DESTDIR-prefix-to-remaining-pkgextensi.patch b/meta/recipes-extended/gawk/gawk-4.1.1/extension-Add-DESTDIR-prefix-to-remaining-pkgextensi.patch new file mode 100644 index 0000000000..b402587615 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-4.1.1/extension-Add-DESTDIR-prefix-to-remaining-pkgextensi.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | From a9f3bd754e9e269099cf7a2c931c632fcc12bd8a Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Gortmaker <paul.gortmaker@windriver.com> | ||
3 | Date: Fri, 13 Jun 2014 13:42:12 -0400 | ||
4 | Subject: [PATCH] extension: Add $(DESTDIR) prefix to remaining pkgextensiondir | ||
5 | instances | ||
6 | |||
7 | Commit 976f73ab03569bb836aa5c949be1c1cc973b2d2e ["Use $(DESTDIR) in | ||
8 | extension/Makefile.am when removing .la files."] fixed an issue | ||
9 | that manifested itself as follows when cross compiling: | ||
10 | |||
11 | make[4]: Entering directory 'gawk/4.1.1-r0/build/extension' | ||
12 | for i in filefuncs.la fnmatch.la fork.la inplace.la ordchr.la readdir.la readfi | ||
13 | le.la revoutput.la revtwoway.la rwarray.la testext.la time.la ; do \ | ||
14 | rm -f /usr/lib/gawk/$i ; \ | ||
15 | done | ||
16 | rm: cannot remove '/usr/lib/gawk/filefuncs.la': Permission denied | ||
17 | rm: cannot remove '/usr/lib/gawk/fnmatch.la': Permission denied | ||
18 | rm: cannot remove '/usr/lib/gawk/fork.la': Permission denied | ||
19 | rm: cannot remove '/usr/lib/gawk/inplace.la': Permission denied | ||
20 | rm: cannot remove '/usr/lib/gawk/ordchr.la': Permission denied | ||
21 | rm: cannot remove '/usr/lib/gawk/readdir.la': Permission denied | ||
22 | rm: cannot remove '/usr/lib/gawk/readfile.la': Permission denied | ||
23 | rm: cannot remove '/usr/lib/gawk/revoutput.la': Permission denied | ||
24 | rm: cannot remove '/usr/lib/gawk/revtwoway.la': Permission denied | ||
25 | rm: cannot remove '/usr/lib/gawk/rwarray.la': Permission denied | ||
26 | rm: cannot remove '/usr/lib/gawk/testext.la': Permission denied | ||
27 | rm: cannot remove '/usr/lib/gawk/time.la': Permission denied | ||
28 | Makefile:1235: recipe for target 'install-data-hook' failed | ||
29 | |||
30 | The problem only manifests itself on hosts where the above files | ||
31 | are already present; for if they are absent then the rm -f does | ||
32 | not fail with -EPERM. The fix in 976f73ab0356 ensured that DESTDIR | ||
33 | was used for the prefix so that it didn't try to delete host files. | ||
34 | |||
35 | However there still remains less used instances of where it is used | ||
36 | w/o $(DESTDIR) that may still cause similar breakage in the future. | ||
37 | Here we apply the same change to them. | ||
38 | |||
39 | Upstream-Status: Submitted [http://lists.gnu.org/archive/html/bug-gawk/2014-06/index.html] | ||
40 | Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ||
41 | --- | ||
42 | |||
43 | diff --git a/extension/ChangeLog b/extension/ChangeLog | ||
44 | index f3a1c7a81e7d..b87ac372edc6 100644 | ||
45 | --- a/extension/ChangeLog | ||
46 | +++ b/extension/ChangeLog | ||
47 | @@ -1,3 +1,10 @@ | ||
48 | +2014-06-13 Paul Gortmaker <paul.gortmaker@windriver.com> | ||
49 | + * Makefile.am (uninstall-so): Came across below bug while cross | ||
50 | + compiling, and changed both install-data-hook and uninstall-so | ||
51 | + to use $(DESTDIR) on v4.1.1 before seeing most of the fix in | ||
52 | + gawk-4.1.1-3-g976f73ab0356; here we ensure uninstall-so also | ||
53 | + uses the $(DESTDIR) prefix on its use of pkgextensiondir. | ||
54 | + | ||
55 | 2014-04-11 Arnold D. Robbins <arnold@skeeve.com> | ||
56 | |||
57 | * Makefile.am (install-data-hook): Use $(DESTDIR) when removing | ||
58 | diff --git a/extension/Makefile.am b/extension/Makefile.am | ||
59 | index 11826e2b315e..b6beaee3fb47 100644 | ||
60 | --- a/extension/Makefile.am | ||
61 | +++ b/extension/Makefile.am | ||
62 | @@ -105,7 +105,7 @@ install-data-hook: | ||
63 | |||
64 | # Keep the uninstall check working: | ||
65 | uninstall-so: | ||
66 | - $(RM) $(pkgextensiondir)/*.so | ||
67 | + $(RM) $(DESTDIR)$(pkgextensiondir)/*.so | ||
68 | |||
69 | uninstall-recursive: uninstall-so | ||
70 | |||
71 | diff --git a/extension/Makefile.in b/extension/Makefile.in | ||
72 | index d81b16960935..294e4f887812 100644 | ||
73 | --- a/extension/Makefile.in | ||
74 | +++ b/extension/Makefile.in | ||
75 | @@ -1236,7 +1236,7 @@ install-data-hook: | ||
76 | |||
77 | # Keep the uninstall check working: | ||
78 | uninstall-so: | ||
79 | - $(RM) $(pkgextensiondir)/*.so | ||
80 | + $(RM) $(DESTDIR)$(pkgextensiondir)/*.so | ||
81 | |||
82 | uninstall-recursive: uninstall-so | ||
83 | |||
84 | -- | ||
85 | 1.9.1 | ||
86 | |||
diff --git a/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest b/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest new file mode 100644 index 0000000000..d23f0bf6d7 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd test | ||
4 | for i in `grep -vE "@|^$|#|Gt-dummy" Maketests |awk -F: '{print $1}'`; \ | ||
5 | do LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} srcdir=`pwd` AWK=gawk CMP=cmp \ | ||
6 | make -f Maketests $i >$i.tmp 2>&1; \ | ||
7 | grep -q "Error" $i.tmp; \ | ||
8 | if [ $? -eq 0 ]; then echo "FAIL: $i"; \ | ||
9 | else echo "PASS: $i"; rm -f $i.tmp; fi; \ | ||
10 | done | ||
diff --git a/meta/recipes-extended/gawk/gawk_3.1.5.bb b/meta/recipes-extended/gawk/gawk_3.1.5.bb new file mode 100644 index 0000000000..c7af4a9b72 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk_3.1.5.bb | |||
@@ -0,0 +1,42 @@ | |||
1 | SUMMARY = "GNU awk text processing utility" | ||
2 | DESCRIPTION = "The GNU version of awk, a text processing utility. \ | ||
3 | Awk interprets a special-purpose programming language to do \ | ||
4 | quick and easy text pattern matching and reformatting jobs." | ||
5 | HOMEPAGE = "www.gnu.org/software/gawk" | ||
6 | BUGTRACKER = "bug-gawk@gnu.org" | ||
7 | SECTION = "console/utils" | ||
8 | |||
9 | # gawk <= 3.1.5: GPLv2 | ||
10 | # gawk >= 3.1.6: GPLv3 | ||
11 | LICENSE = "GPLv2" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
13 | |||
14 | RDEPENDS_gawk += "gawk-common" | ||
15 | RDEPENDS_pgawk += "gawk-common" | ||
16 | PR = "r2" | ||
17 | |||
18 | SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ | ||
19 | file://gawk-3.1.5_fix_for_automake-1.12.patch" | ||
20 | |||
21 | SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30" | ||
22 | SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8" | ||
23 | |||
24 | inherit autotools gettext texinfo update-alternatives | ||
25 | |||
26 | PACKAGES += "gawk-common pgawk" | ||
27 | |||
28 | FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk" | ||
29 | FILES_gawk-common += "${datadir}/awk/* ${libdir}/gawk/awk/*" | ||
30 | FILES_pgawk = "${bindir}/pgawk*" | ||
31 | FILES_${PN}-dbg += "${libdir}/gawk/awk/.debug" | ||
32 | |||
33 | ALTERNATIVE_${PN} = "awk" | ||
34 | ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" | ||
35 | ALTERNATIVE_PRIORITY = "100" | ||
36 | |||
37 | CFLAGS += "-D PROTOTYPES" | ||
38 | |||
39 | do_install_append() { | ||
40 | # remove the link since we don't package it | ||
41 | rm ${D}${bindir}/awk | ||
42 | } | ||
diff --git a/meta/recipes-extended/gawk/gawk_4.1.1.bb b/meta/recipes-extended/gawk/gawk_4.1.1.bb new file mode 100644 index 0000000000..3266f58cbd --- /dev/null +++ b/meta/recipes-extended/gawk/gawk_4.1.1.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | SUMMARY = "GNU awk text processing utility" | ||
2 | DESCRIPTION = "The GNU version of awk, a text processing utility. \ | ||
3 | Awk interprets a special-purpose programming language to do \ | ||
4 | quick and easy text pattern matching and reformatting jobs." | ||
5 | HOMEPAGE = "www.gnu.org/software/gawk" | ||
6 | BUGTRACKER = "bug-gawk@gnu.org" | ||
7 | SECTION = "console/utils" | ||
8 | |||
9 | # gawk <= 3.1.5: GPLv2 | ||
10 | # gawk >= 3.1.6: GPLv3 | ||
11 | LICENSE = "GPLv3" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
13 | |||
14 | DEPENDS += "readline" | ||
15 | |||
16 | PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" | ||
17 | |||
18 | SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ | ||
19 | file://run-ptest \ | ||
20 | file://Use-DESTDIR-in-extension-Makefile.am-when-removing-..patch \ | ||
21 | file://extension-Add-DESTDIR-prefix-to-remaining-pkgextensi.patch \ | ||
22 | " | ||
23 | |||
24 | SRC_URI[md5sum] = "45f5b09aa87b4744c4c53bf274e96ed0" | ||
25 | SRC_URI[sha256sum] = "556464bd2e4bc5a0fad4526b59623e4be40b4c2f4c663dfaaf246af6e2ec1d62" | ||
26 | |||
27 | inherit autotools gettext texinfo update-alternatives | ||
28 | |||
29 | FILES_${PN} += "${datadir}/awk" | ||
30 | FILES_${PN}-dev += "${libdir}/${BPN}/*.la" | ||
31 | FILES_${PN}-dbg += "${libexecdir}/awk/.debug" | ||
32 | |||
33 | ALTERNATIVE_${PN} = "awk" | ||
34 | ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" | ||
35 | ALTERNATIVE_PRIORITY = "100" | ||
36 | |||
37 | do_install_append() { | ||
38 | # remove the link since we don't package it | ||
39 | rm ${D}${bindir}/awk | ||
40 | } | ||
41 | |||
42 | inherit ptest | ||
43 | |||
44 | do_install_ptest() { | ||
45 | mkdir ${D}${PTEST_PATH}/test | ||
46 | for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests; \ | ||
47 | do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \ | ||
48 | done | ||
49 | } | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h new file mode 100644 index 0000000000..a05de29def --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 8 | ||
9 | #define ARCH_ALIGN_PTR_MOD 8 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 3 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 8 | ||
21 | #define ARCH_SIZEOF_PTR 8 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 0 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h new file mode 100644 index 0000000000..e8772cd958 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 4 | ||
9 | #define ARCH_ALIGN_PTR_MOD 4 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 2 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 8 | ||
21 | #define ARCH_SIZEOF_PTR 4 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 0 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch new file mode 100644 index 0000000000..d97d4ecd7d --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | base/genht.c: add a preprocessor define to allow fopen calling | ||
2 | |||
3 | The commit in upstream: | ||
4 | http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=773c69e46e70bdd5482676437dafd2ca83397643 | ||
5 | |||
6 | Replace all fopen calls with gp_fopen and add a preprocessor define so | ||
7 | that any unintential calls directly to fopen will cause an error. | ||
8 | |||
9 | Only exceptions are those in the platform specific code, and mkromfs.c. | ||
10 | This patch add a preprocessor define to allow fopen calling in base/genht.c. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
15 | --- | ||
16 | base/genht.c | 4 ++++ | ||
17 | 1 file changed, 4 insertions(+) | ||
18 | |||
19 | diff --git a/base/genht.c b/base/genht.c | ||
20 | index 4b04085..cc82fff 100644 | ||
21 | --- a/base/genht.c | ||
22 | +++ b/base/genht.c | ||
23 | @@ -16,6 +16,10 @@ | ||
24 | |||
25 | /* Generate C code for compiling halftones into ROM. */ | ||
26 | #include "malloc_.h" | ||
27 | + | ||
28 | +/* prevent gp.h from defining fopen */ | ||
29 | +#define fopen fopen | ||
30 | + | ||
31 | #include "stdio_.h" | ||
32 | #include "string_.h" | ||
33 | #include "gscdefs.h" | ||
34 | -- | ||
35 | 1.8.1.2 | ||
36 | |||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch new file mode 100644 index 0000000000..1c0a6d5da5 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Subject: [PATCH] Don't build-depend on libgcrypt, as nothing is used from it | ||
2 | |||
3 | Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch | ||
4 | |||
5 | This addresses the cryto dependency seen during build. | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
10 | --- | ||
11 | cups/libs/cups/http-private.h | 1 - | ||
12 | 1 file changed, 1 deletion(-) | ||
13 | |||
14 | diff --git a/cups/libs/cups/http-private.h b/cups/libs/cups/http-private.h | ||
15 | index 9c88281..94a9817 100644 | ||
16 | --- a/cups/libs/cups/http-private.h | ||
17 | +++ b/cups/libs/cups/http-private.h | ||
18 | @@ -98,7 +98,6 @@ extern BIO_METHOD *_httpBIOMethods(void); | ||
19 | * The GNU TLS library is more of a "bare metal" SSL/TLS library... | ||
20 | */ | ||
21 | # include <gnutls/gnutls.h> | ||
22 | -# include <gcrypt.h> | ||
23 | |||
24 | typedef struct | ||
25 | { | ||
26 | -- | ||
27 | 2.0.0 | ||
28 | |||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch new file mode 100644 index 0000000000..e28a949bf7 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Import patch from windriver linux for cross compilation, and split patches | ||
2 | into oe way under different directories such as i586, powerpc etc according | ||
3 | to Richard's opinion. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Kang Kai <kai.kang@windriver.com> | ||
8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
9 | |||
10 | # Author: Chi Xu <chi.xu@windriver.com> | ||
11 | # Date: Feb 26 2010 | ||
12 | # Summary: Generate arch.h for ppc32 | ||
13 | # | ||
14 | |||
15 | diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak | ||
16 | --- ghostscript-8.64.orig/base/lib.mak 2010-02-10 10:30:02.000000000 +0800 | ||
17 | +++ ghostscript-8.64/base/lib.mak 2010-02-10 10:56:21.000000000 +0800 | ||
18 | @@ -67,8 +67,8 @@ | ||
19 | stdpre_h=$(GLSRC)stdpre.h $(stdpn_h) | ||
20 | stdint__h=$(GLSRC)stdint_.h $(std_h) | ||
21 | |||
22 | -$(GLGEN)arch.h : $(GENARCH_XE) | ||
23 | - $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE) | ||
24 | +##$(GLGEN)arch.h : $(GENARCH_XE) | ||
25 | +## $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE) | ||
26 | |||
27 | # Platform interfaces | ||
28 | |||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch new file mode 100644 index 0000000000..601f5f127e --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch | |||
@@ -0,0 +1,929 @@ | |||
1 | When parallel make it will fail with multi copy, see | ||
2 | http://bugzilla.pokylinux.org/show_bug.cgi?id=1202 | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Signed-off-by: Kang Kai <kai.kang@windriver.com> | ||
7 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
8 | |||
9 | RP: Extended || true to all CP_ operations, they all can race e.g.: | ||
10 | | cp -f ./obj/gconfxx.h ./obj/gconfig.h | ||
11 | | cp: cannot create regular file `./obj/gconfig.h': File exists | ||
12 | |||
13 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
14 | |||
15 | diff --git a/base/expat.mak b/base/expat.mak | ||
16 | index 4ee9c8c..2e16a9d 100644 | ||
17 | --- a/base/expat.mak | ||
18 | +++ b/base/expat.mak | ||
19 | @@ -82,7 +82,7 @@ $(EXPATOBJ)xmltok.$(OBJ) : $(EXPATSRC)xmltok.c $(expat_xmltok_hdrs) | ||
20 | # Copy the target definition we want | ||
21 | $(EXPATGEN)expat.dev : $(TOP_MAKEFILES) $(EXPAT_MAK) \ | ||
22 | $(EXPATGEN)expat_$(SHARE_EXPAT).dev | ||
23 | - $(CP_) $(EXPATGEN)expat_$(SHARE_EXPAT).dev $(EXPATGEN)expat.dev | ||
24 | + $(CP_) $(EXPATGEN)expat_$(SHARE_EXPAT).dev $(EXPATGEN)expat.dev || true | ||
25 | |||
26 | # Define the compiled in target | ||
27 | $(EXPATGEN)expat_0.dev : $(EXPAT_MAK) $(ECHOGS_XE) $(expat_) | ||
28 | diff --git a/base/freetype.mak b/base/freetype.mak | ||
29 | index 16f2b95..409f75b 100644 | ||
30 | --- a/base/freetype.mak | ||
31 | +++ b/base/freetype.mak | ||
32 | @@ -195,7 +195,7 @@ ft_winfonts=$(FTOBJ)winfnt.$(OBJ) | ||
33 | |||
34 | # instantiate the requested build option (shared or compiled in) | ||
35 | $(FTGEN)freetype.dev : $(TOP_MAKEFILES) $(FTGEN)freetype_$(SHARE_FT).dev | ||
36 | - $(CP_) $(FTGEN)freetype_$(SHARE_FT).dev $(FTGEN)freetype.dev | ||
37 | + $(CP_) $(FTGEN)freetype_$(SHARE_FT).dev $(FTGEN)freetype.dev || true | ||
38 | |||
39 | # Define the shared version. | ||
40 | $(FTGEN)freetype_1.dev : $(TOP_MAKEFILES) $(FT_MAK) $(ECHOGS_XE) | ||
41 | diff --git a/base/gs.mak b/base/gs.mak | ||
42 | index 7d75fb0..2a9596c 100644 | ||
43 | --- a/base/gs.mak | ||
44 | +++ b/base/gs.mak | ||
45 | @@ -433,7 +433,7 @@ $(gconfxx_h) : $(ld_tr) | ||
46 | |||
47 | $(gconfig_h) : $(gconfxx_h) | ||
48 | $(RM_) $(gconfig_h) | ||
49 | - $(CP_) $(gconfxx_h) $(gconfig_h) | ||
50 | + $(CP_) $(gconfxx_h) $(gconfig_h) || true | ||
51 | |||
52 | # The line above is an empty command; don't delete. | ||
53 | |||
54 | diff --git a/base/ijs.mak b/base/ijs.mak | ||
55 | index bc6d549..0139e1c 100644 | ||
56 | --- a/base/ijs.mak | ||
57 | +++ b/base/ijs.mak | ||
58 | @@ -66,7 +66,7 @@ $(IJSGEN)ijslib_1.dev : $(TOP_MAKEFILES) $(IJS_MAK) $(ECHOGS_XE) | ||
59 | |||
60 | |||
61 | $(IJSGEN)ijslib.dev : $(TOP_MAKEFILES) $(IJS_MAK) $(IJSGEN)ijslib_$(SHARE_IJS).dev | ||
62 | - $(CP_) $(IJSGEN)ijslib_$(SHARE_IJS).dev $(IJSGEN)ijslib.dev | ||
63 | + $(CP_) $(IJSGEN)ijslib_$(SHARE_IJS).dev $(IJSGEN)ijslib.dev || true | ||
64 | |||
65 | |||
66 | ijs_h=$(IJSSRC)ijs.h | ||
67 | diff --git a/base/jbig2.mak b/base/jbig2.mak | ||
68 | index bb74630..44617a0 100644 | ||
69 | --- a/base/jbig2.mak | ||
70 | +++ b/base/jbig2.mak | ||
71 | @@ -98,7 +98,7 @@ JBIG2O_=$(O_)$(JBIG2OBJ) | ||
72 | |||
73 | # switch in the version of libjbig2.dev we're actually using | ||
74 | $(JBIG2GEN)jbig2dec.dev : $(TOP_MAKEFILES) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev | ||
75 | - $(CP_) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev $(JBIG2GEN)jbig2dec.dev | ||
76 | + $(CP_) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev $(JBIG2GEN)jbig2dec.dev || true | ||
77 | |||
78 | # dev file for shared (separately built) jbig2dec library | ||
79 | $(JBIG2GEN)jbig2dec_1.dev : $(TOP_MAKEFILES) $(JBIG2_MAK) $(ECHOGS_XE) | ||
80 | diff --git a/base/jpeg.mak b/base/jpeg.mak | ||
81 | index 5310a20..43cee63 100644 | ||
82 | --- a/base/jpeg.mak | ||
83 | +++ b/base/jpeg.mak | ||
84 | @@ -96,7 +96,7 @@ jconfig_h=$(GLGEN)jconfig.h | ||
85 | jmorecfg_h=$(GLGEN)jmorecfg.h | ||
86 | |||
87 | $(GLGEN)jconfig_.h : $(GLGEN)jconfig$(SHARE_JPEG).h $(MAKEFILE) $(MAKEDIRS) | ||
88 | - $(CP_) $(GLGEN)jconfig$(SHARE_JPEG).h $(GLGEN)jconfig_.h | ||
89 | + $(CP_) $(GLGEN)jconfig$(SHARE_JPEG).h $(GLGEN)jconfig_.h || true | ||
90 | |||
91 | $(GLGEN)jconfig0.h : $(ECHOGS_XE) $(GLSRC)gsjconf.h $(stdpre_h) $(MAKEFILE)\ | ||
92 | $(MAKEDIRS) | ||
93 | @@ -108,13 +108,13 @@ $(GLGEN)jconfig1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS) | ||
94 | $(RMN_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h | ||
95 | |||
96 | $(GLGEN)jconfig.h : $(GLGEN)jconfig0.h $(MAKEDIRS) | ||
97 | - $(CP_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h | ||
98 | + $(CP_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h || true | ||
99 | |||
100 | $(GLGEN)jmorecf_.h : $(GLGEN)jmorecf$(SHARE_JPEG).h $(MAKEFILE) $(MAKEDIRS) | ||
101 | - $(CP_) $(GLGEN)jmorecf$(SHARE_JPEG).h $(GLGEN)jmorecf_.h | ||
102 | + $(CP_) $(GLGEN)jmorecf$(SHARE_JPEG).h $(GLGEN)jmorecf_.h || true | ||
103 | |||
104 | $(GLGEN)jmorecf0.h : $(GLSRC)gsjmorec.h $(GLGEN)jmcorig.h $(MAKEDIRS) | ||
105 | - $(CP_) $(GLSRC)gsjmorec.h $(GLGEN)jmorecf0.h | ||
106 | + $(CP_) $(GLSRC)gsjmorec.h $(GLGEN)jmorecf0.h || true | ||
107 | $(RM_) $(GLGEN)jmorecf1.h | ||
108 | |||
109 | $(GLGEN)jmorecf1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS) | ||
110 | @@ -122,10 +122,10 @@ $(GLGEN)jmorecf1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS) | ||
111 | $(RMN_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h | ||
112 | |||
113 | $(GLGEN)jmorecfg.h : $(GLGEN)jmorecf0.h $(MAKEDIRS) | ||
114 | - $(CP_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h | ||
115 | + $(CP_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h || true | ||
116 | |||
117 | $(GLGEN)jmcorig.h : $(JSRC)jmorecfg.h $(MAKEDIRS) | ||
118 | - $(CP_) $(JSRC)jmorecfg.h $(GLGEN)jmcorig.h | ||
119 | + $(CP_) $(JSRC)jmorecfg.h $(GLGEN)jmcorig.h || true | ||
120 | |||
121 | # Contrary to what some portability bigots assert as fact, C compilers are | ||
122 | # not consistent about where they start searching for #included files: | ||
123 | @@ -141,23 +141,23 @@ $(GLGEN)jmcorig.h : $(JSRC)jmorecfg.h $(MAKEDIRS) | ||
124 | JHCOPY=$(GLGEN)jinclude.h $(GLGEN)jpeglib.h | ||
125 | |||
126 | $(GLGEN)jinclude.h : $(JSRC)jinclude.h $(MAKEDIRS) | ||
127 | - $(CP_) $(JSRC)jinclude.h $(GLGEN)jinclude.h | ||
128 | + $(CP_) $(JSRC)jinclude.h $(GLGEN)jinclude.h || true | ||
129 | |||
130 | # jpeglib_.h doesn't really depend on jconfig.h or jmcorig.h, | ||
131 | # but we choose to put the dependencies here rather than in the | ||
132 | # definition of jpeglib__h. | ||
133 | $(GLGEN)jpeglib_.h : $(GLGEN)jpeglib$(SHARE_JPEG).h $(MAKEDIRS) | ||
134 | - $(CP_) $(GLGEN)jpeglib$(SHARE_JPEG).h $(GLGEN)jpeglib_.h | ||
135 | + $(CP_) $(GLGEN)jpeglib$(SHARE_JPEG).h $(GLGEN)jpeglib_.h || true | ||
136 | |||
137 | $(GLGEN)jpeglib0.h : $(JSRC)jpeglib.h $(jconfig_h) $(jmorecfg_h) $(MAKEDIRS) | ||
138 | - $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib0.h | ||
139 | + $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib0.h || true | ||
140 | |||
141 | $(GLGEN)jpeglib1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS) | ||
142 | $(EXP)$(ECHOGS_XE) -w $(GLGEN)jpeglib1.h -x 23 include -x 203c jpeglib.h -x 3e | ||
143 | |||
144 | # We also need jpeglib.h for #includes in the library itself. | ||
145 | $(GLGEN)jpeglib.h : $(JSRC)jpeglib.h $(MAKEDIRS) | ||
146 | - $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib.h | ||
147 | + $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib.h || true | ||
148 | |||
149 | # In order to avoid having to keep the dependency lists for the IJG code | ||
150 | # accurate, we simply make all of them depend on the only files that | ||
151 | @@ -174,40 +174,40 @@ $(JGEN)jpegc0.dev : $(JPEG_MAK) $(ECHOGS_XE) $(jpegc0_) | ||
152 | $(SETMOD) $(JGEN)jpegc0 $(jpegc0_) | ||
153 | |||
154 | $(JOBJ)jcomapi.$(OBJ) : $(JSRC)jcomapi.c $(JDEP) | ||
155 | - $(CP_) $(JSRC)jcomapi.c $(GLGEN)jcomapi.c | ||
156 | + $(CP_) $(JSRC)jcomapi.c $(GLGEN)jcomapi.c || true | ||
157 | $(JCC) $(JO_)jcomapi.$(OBJ) $(C_) $(GLGEN)jcomapi.c | ||
158 | $(RM_) $(GLGEN)jcomapi.c | ||
159 | |||
160 | $(JOBJ)jutils.$(OBJ) : $(JSRC)jutils.c $(JDEP) | ||
161 | - $(CP_) $(JSRC)jutils.c $(GLGEN)jutils.c | ||
162 | + $(CP_) $(JSRC)jutils.c $(GLGEN)jutils.c || true | ||
163 | $(JCC) $(JO_)jutils.$(OBJ) $(C_) $(GLGEN)jutils.c | ||
164 | $(RM_) $(GLGEN)jutils.c | ||
165 | |||
166 | $(JOBJ)jmemmgr.$(OBJ) : $(JSRC)jmemmgr.c $(JDEP) | ||
167 | - $(CP_) $(JSRC)jmemmgr.c $(GLGEN)jmemmgr.c | ||
168 | + $(CP_) $(JSRC)jmemmgr.c $(GLGEN)jmemmgr.c || true | ||
169 | $(JCC) $(JO_)jmemmgr.$(OBJ) $(C_) $(GLGEN)jmemmgr.c | ||
170 | $(RM_) $(GLGEN)jmemmgr.c | ||
171 | |||
172 | $(JOBJ)jerror.$(OBJ) : $(JSRC)jerror.c $(JDEP) | ||
173 | - $(CP_) $(JSRC)jerror.c $(GLGEN)jerror.c | ||
174 | + $(CP_) $(JSRC)jerror.c $(GLGEN)jerror.c || true | ||
175 | $(JCC) $(JO_)jerror.$(OBJ) $(C_) $(GLGEN)jerror.c | ||
176 | $(RM_) $(GLGEN)jerror.c | ||
177 | |||
178 | $(JOBJ)jaricom.$(OBJ) : $(JSRC)jaricom.c $(JDEP) | ||
179 | - $(CP_) $(JSRC)jaricom.c $(GLGEN)jaricom.c | ||
180 | + $(CP_) $(JSRC)jaricom.c $(GLGEN)jaricom.c || true | ||
181 | $(JCC) $(JO_)jaricom.$(OBJ) $(C_) $(GLGEN)jaricom.c | ||
182 | $(RM_) $(GLGEN)jaricom.c | ||
183 | |||
184 | # Encoding (compression) code. | ||
185 | |||
186 | $(JGEN)jpege.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpege_$(SHARE_JPEG).dev | ||
187 | - $(CP_) $(JGEN)jpege_$(SHARE_JPEG).dev $(JGEN)jpege.dev | ||
188 | + $(CP_) $(JGEN)jpege_$(SHARE_JPEG).dev $(JGEN)jpege.dev || true | ||
189 | |||
190 | $(JGEN)jpege_1.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(ECHOGS_XE) | ||
191 | $(SETMOD) $(JGEN)jpege_1 -lib $(JPEG_NAME) | ||
192 | |||
193 | $(JGEN)jpege_0.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpege6.dev | ||
194 | - $(CP_) $(JGEN)jpege6.dev $(JGEN)jpege_0.dev | ||
195 | + $(CP_) $(JGEN)jpege6.dev $(JGEN)jpege_0.dev || true | ||
196 | |||
197 | jpege6=$(JOBJ)jcapimin.$(OBJ) $(JOBJ)jcapistd.$(OBJ) $(JOBJ)jcinit.$(OBJ) | ||
198 | |||
199 | @@ -223,90 +223,90 @@ $(JGEN)jpege6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpege6) $(jpege | ||
200 | $(ADDMOD) $(JGEN)jpege6 -obj $(jpege_3) | ||
201 | |||
202 | $(JOBJ)jcapimin.$(OBJ) : $(JSRC)jcapimin.c $(JDEP) | ||
203 | - $(CP_) $(JSRC)jcapimin.c $(GLGEN)jcapimin.c | ||
204 | + $(CP_) $(JSRC)jcapimin.c $(GLGEN)jcapimin.c || true | ||
205 | $(JCC) $(JO_)jcapimin.$(OBJ) $(C_) $(GLGEN)jcapimin.c | ||
206 | $(RM_) $(GLGEN)jcapimin.c | ||
207 | |||
208 | $(JOBJ)jcapistd.$(OBJ) : $(JSRC)jcapistd.c $(JDEP) | ||
209 | - $(CP_) $(JSRC)jcapistd.c $(GLGEN)jcapistd.c | ||
210 | + $(CP_) $(JSRC)jcapistd.c $(GLGEN)jcapistd.c || true | ||
211 | $(JCC) $(JO_)jcapistd.$(OBJ) $(C_) $(GLGEN)jcapistd.c | ||
212 | $(RM_) $(GLGEN)jcapistd.c | ||
213 | |||
214 | $(JOBJ)jcinit.$(OBJ) : $(JSRC)jcinit.c $(JDEP) | ||
215 | - $(CP_) $(JSRC)jcinit.c $(GLGEN)jcinit.c | ||
216 | + $(CP_) $(JSRC)jcinit.c $(GLGEN)jcinit.c || true | ||
217 | $(JCC) $(JO_)jcinit.$(OBJ) $(C_) $(GLGEN)jcinit.c | ||
218 | $(RM_) $(GLGEN)jcinit.c | ||
219 | |||
220 | $(JOBJ)jccoefct.$(OBJ) : $(JSRC)jccoefct.c $(JDEP) | ||
221 | - $(CP_) $(JSRC)jccoefct.c $(GLGEN)jccoefct.c | ||
222 | + $(CP_) $(JSRC)jccoefct.c $(GLGEN)jccoefct.c || true | ||
223 | $(JCC) $(JO_)jccoefct.$(OBJ) $(C_) $(GLGEN)jccoefct.c | ||
224 | $(RM_) $(GLGEN)jccoefct.c | ||
225 | |||
226 | $(JOBJ)jccolor.$(OBJ) : $(JSRC)jccolor.c $(JDEP) | ||
227 | - $(CP_) $(JSRC)jccolor.c $(GLGEN)jccolor.c | ||
228 | + $(CP_) $(JSRC)jccolor.c $(GLGEN)jccolor.c || true | ||
229 | $(JCC) $(JO_)jccolor.$(OBJ) $(C_) $(GLGEN)jccolor.c | ||
230 | $(RM_) $(GLGEN)jccolor.c | ||
231 | |||
232 | $(JOBJ)jcdctmgr.$(OBJ) : $(JSRC)jcdctmgr.c $(JDEP) | ||
233 | - $(CP_) $(JSRC)jcdctmgr.c $(GLGEN)jcdctmgr.c | ||
234 | + $(CP_) $(JSRC)jcdctmgr.c $(GLGEN)jcdctmgr.c || true | ||
235 | $(JCC) $(JO_)jcdctmgr.$(OBJ) $(C_) $(GLGEN)jcdctmgr.c | ||
236 | $(RM_) $(GLGEN)jcdctmgr.c | ||
237 | |||
238 | $(JOBJ)jchuff.$(OBJ) : $(JSRC)jchuff.c $(JDEP) | ||
239 | - $(CP_) $(JSRC)jchuff.c $(GLGEN)jchuff.c | ||
240 | + $(CP_) $(JSRC)jchuff.c $(GLGEN)jchuff.c || true | ||
241 | $(JCC) $(JO_)jchuff.$(OBJ) $(C_) $(GLGEN)jchuff.c | ||
242 | $(RM_) $(GLGEN)jchuff.c | ||
243 | |||
244 | $(JOBJ)jcmainct.$(OBJ) : $(JSRC)jcmainct.c $(JDEP) | ||
245 | - $(CP_) $(JSRC)jcmainct.c $(GLGEN)jcmainct.c | ||
246 | + $(CP_) $(JSRC)jcmainct.c $(GLGEN)jcmainct.c || true | ||
247 | $(JCC) $(JO_)jcmainct.$(OBJ) $(C_) $(GLGEN)jcmainct.c | ||
248 | $(RM_) $(GLGEN)jcmainct.c | ||
249 | |||
250 | $(JOBJ)jcmarker.$(OBJ) : $(JSRC)jcmarker.c $(JDEP) | ||
251 | - $(CP_) $(JSRC)jcmarker.c $(GLGEN)jcmarker.c | ||
252 | + $(CP_) $(JSRC)jcmarker.c $(GLGEN)jcmarker.c || true | ||
253 | $(JCC) $(JO_)jcmarker.$(OBJ) $(C_) $(GLGEN)jcmarker.c | ||
254 | $(RM_) $(GLGEN)jcmarker.c | ||
255 | |||
256 | $(JOBJ)jcmaster.$(OBJ) : $(JSRC)jcmaster.c $(JDEP) | ||
257 | - $(CP_) $(JSRC)jcmaster.c $(GLGEN)jcmaster.c | ||
258 | + $(CP_) $(JSRC)jcmaster.c $(GLGEN)jcmaster.c || true | ||
259 | $(JCC) $(JO_)jcmaster.$(OBJ) $(C_) $(GLGEN)jcmaster.c | ||
260 | $(RM_) $(GLGEN)jcmaster.c | ||
261 | |||
262 | $(JOBJ)jcparam.$(OBJ) : $(JSRC)jcparam.c $(JDEP) | ||
263 | - $(CP_) $(JSRC)jcparam.c $(GLGEN)jcparam.c | ||
264 | + $(CP_) $(JSRC)jcparam.c $(GLGEN)jcparam.c || true | ||
265 | $(JCC) $(JO_)jcparam.$(OBJ) $(C_) $(GLGEN)jcparam.c | ||
266 | $(RM_) $(GLGEN)jcparam.c | ||
267 | |||
268 | $(JOBJ)jcprepct.$(OBJ) : $(JSRC)jcprepct.c $(JDEP) | ||
269 | - $(CP_) $(JSRC)jcprepct.c $(GLGEN)jcprepct.c | ||
270 | + $(CP_) $(JSRC)jcprepct.c $(GLGEN)jcprepct.c || true | ||
271 | $(JCC) $(JO_)jcprepct.$(OBJ) $(C_) $(GLGEN)jcprepct.c | ||
272 | $(RM_) $(GLGEN)jcprepct.c | ||
273 | |||
274 | $(JOBJ)jcsample.$(OBJ) : $(JSRC)jcsample.c $(JDEP) | ||
275 | - $(CP_) $(JSRC)jcsample.c $(GLGEN)jcsample.c | ||
276 | + $(CP_) $(JSRC)jcsample.c $(GLGEN)jcsample.c || true | ||
277 | $(JCC) $(JO_)jcsample.$(OBJ) $(C_) $(GLGEN)jcsample.c | ||
278 | $(RM_) $(GLGEN)jcsample.c | ||
279 | |||
280 | $(JOBJ)jfdctint.$(OBJ) : $(JSRC)jfdctint.c $(JDEP) | ||
281 | - $(CP_) $(JSRC)jfdctint.c $(GLGEN)jfdctint.c | ||
282 | + $(CP_) $(JSRC)jfdctint.c $(GLGEN)jfdctint.c || true | ||
283 | $(JCC) $(JO_)jfdctint.$(OBJ) $(C_) $(GLGEN)jfdctint.c | ||
284 | $(RM_) $(GLGEN)jfdctint.c | ||
285 | |||
286 | $(JOBJ)jcarith.$(OBJ) : $(JSRC)jcarith.c $(JDEP) | ||
287 | - $(CP_) $(JSRC)jcarith.c $(GLGEN)jcarith.c | ||
288 | + $(CP_) $(JSRC)jcarith.c $(GLGEN)jcarith.c || true | ||
289 | $(JCC) $(JO_)jcarith.$(OBJ) $(C_) $(GLGEN)jcarith.c | ||
290 | $(RM_) $(GLGEN)jcarith.c | ||
291 | |||
292 | # Decompression code | ||
293 | |||
294 | $(JGEN)jpegd.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpegd_$(SHARE_JPEG).dev | ||
295 | - $(CP_) $(JGEN)jpegd_$(SHARE_JPEG).dev $(JGEN)jpegd.dev | ||
296 | + $(CP_) $(JGEN)jpegd_$(SHARE_JPEG).dev $(JGEN)jpegd.dev || true | ||
297 | |||
298 | $(JGEN)jpegd_1.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(ECHOGS_XE) | ||
299 | $(SETMOD) $(JGEN)jpegd_1 -lib $(JPEG_NAME) | ||
300 | |||
301 | $(JGEN)jpegd_0.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpegd6.dev | ||
302 | - $(CP_) $(JGEN)jpegd6.dev $(JGEN)jpegd_0.dev | ||
303 | + $(CP_) $(JGEN)jpegd6.dev $(JGEN)jpegd_0.dev || true | ||
304 | |||
305 | jpegd6=$(JOBJ)jdapimin.$(OBJ) $(JOBJ)jdapistd.$(OBJ) $(JOBJ)jdinput.$(OBJ) $(JOBJ)jdhuff.$(OBJ) | ||
306 | |||
307 | @@ -322,76 +322,76 @@ $(JGEN)jpegd6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpegd6) $(jpegd | ||
308 | $(ADDMOD) $(JGEN)jpegd6 -obj $(jpegd_3) | ||
309 | |||
310 | $(JOBJ)jdapimin.$(OBJ) : $(JSRC)jdapimin.c $(JDEP) | ||
311 | - $(CP_) $(JSRC)jdapimin.c $(GLGEN)jdapimin.c | ||
312 | + $(CP_) $(JSRC)jdapimin.c $(GLGEN)jdapimin.c || true | ||
313 | $(JCC) $(JO_)jdapimin.$(OBJ) $(C_) $(GLGEN)jdapimin.c | ||
314 | $(RM_) $(GLGEN)jdapimin.c | ||
315 | |||
316 | $(JOBJ)jdapistd.$(OBJ) : $(JSRC)jdapistd.c $(JDEP) | ||
317 | - $(CP_) $(JSRC)jdapistd.c $(GLGEN)jdapistd.c | ||
318 | + $(CP_) $(JSRC)jdapistd.c $(GLGEN)jdapistd.c || true | ||
319 | $(JCC) $(JO_)jdapistd.$(OBJ) $(C_) $(GLGEN)jdapistd.c | ||
320 | $(RM_) $(GLGEN)jdapistd.c | ||
321 | |||
322 | $(JOBJ)jdcoefct.$(OBJ) : $(JSRC)jdcoefct.c $(JDEP) | ||
323 | - $(CP_) $(JSRC)jdcoefct.c $(GLGEN)jdcoefct.c | ||
324 | + $(CP_) $(JSRC)jdcoefct.c $(GLGEN)jdcoefct.c || true | ||
325 | $(JCC) $(JO_)jdcoefct.$(OBJ) $(C_) $(GLGEN)jdcoefct.c | ||
326 | $(RM_) $(GLGEN)jdcoefct.c | ||
327 | |||
328 | $(JOBJ)jdcolor.$(OBJ) : $(JSRC)jdcolor.c $(JDEP) | ||
329 | - $(CP_) $(JSRC)jdcolor.c $(GLGEN)jdcolor.c | ||
330 | + $(CP_) $(JSRC)jdcolor.c $(GLGEN)jdcolor.c || true | ||
331 | $(JCC) $(JO_)jdcolor.$(OBJ) $(C_) $(GLGEN)jdcolor.c | ||
332 | $(RM_) $(GLGEN)jdcolor.c | ||
333 | |||
334 | $(JOBJ)jddctmgr.$(OBJ) : $(JSRC)jddctmgr.c $(JDEP) | ||
335 | - $(CP_) $(JSRC)jddctmgr.c $(GLGEN)jddctmgr.c | ||
336 | + $(CP_) $(JSRC)jddctmgr.c $(GLGEN)jddctmgr.c || true | ||
337 | $(JCC) $(JO_)jddctmgr.$(OBJ) $(C_) $(GLGEN)jddctmgr.c | ||
338 | $(RM_) $(GLGEN)jddctmgr.c | ||
339 | |||
340 | $(JOBJ)jdhuff.$(OBJ) : $(JSRC)jdhuff.c $(JDEP) | ||
341 | - $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c | ||
342 | + $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c || true | ||
343 | $(JCC) $(JO_)jdhuff.$(OBJ) $(C_) $(GLGEN)jdhuff.c | ||
344 | $(RM_) $(GLGEN)jdhuff.c | ||
345 | |||
346 | $(JOBJ)jdinput.$(OBJ) : $(JSRC)jdinput.c $(JDEP) | ||
347 | - $(CP_) $(JSRC)jdinput.c $(GLGEN)jdinput.c | ||
348 | + $(CP_) $(JSRC)jdinput.c $(GLGEN)jdinput.c || true | ||
349 | $(JCC) $(JO_)jdinput.$(OBJ) $(C_) $(GLGEN)jdinput.c | ||
350 | $(RM_) $(GLGEN)jdinput.c | ||
351 | |||
352 | $(JOBJ)jdmainct.$(OBJ) : $(JSRC)jdmainct.c $(JDEP) | ||
353 | - $(CP_) $(JSRC)jdmainct.c $(GLGEN)jdmainct.c | ||
354 | + $(CP_) $(JSRC)jdmainct.c $(GLGEN)jdmainct.c || true | ||
355 | $(JCC) $(JO_)jdmainct.$(OBJ) $(C_) $(GLGEN)jdmainct.c | ||
356 | $(RM_) $(GLGEN)jdmainct.c | ||
357 | |||
358 | $(JOBJ)jdmarker.$(OBJ) : $(JSRC)jdmarker.c $(JDEP) | ||
359 | - $(CP_) $(JSRC)jdmarker.c $(GLGEN)jdmarker.c | ||
360 | + $(CP_) $(JSRC)jdmarker.c $(GLGEN)jdmarker.c || true | ||
361 | $(JCC) $(JO_)jdmarker.$(OBJ) $(C_) $(GLGEN)jdmarker.c | ||
362 | $(RM_) $(GLGEN)jdmarker.c | ||
363 | |||
364 | $(JOBJ)jdmaster.$(OBJ) : $(JSRC)jdmaster.c $(JDEP) | ||
365 | - $(CP_) $(JSRC)jdmaster.c $(GLGEN)jdmaster.c | ||
366 | + $(CP_) $(JSRC)jdmaster.c $(GLGEN)jdmaster.c || true | ||
367 | $(JCC) $(JO_)jdmaster.$(OBJ) $(C_) $(GLGEN)jdmaster.c | ||
368 | $(RM_) $(GLGEN)jdmaster.c | ||
369 | |||
370 | #$(JOBJ)jdhuff.$(OBJ) : $(JSRC)jdhuff.c $(JDEP) | ||
371 | -# $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c | ||
372 | +# $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c || true | ||
373 | # $(JCC) $(JO_)jdhuff.$(OBJ) $(C_) $(GLGEN)jdhuff.c | ||
374 | # $(RM_) $(GLGEN)jdhuff.c | ||
375 | |||
376 | $(JOBJ)jdpostct.$(OBJ) : $(JSRC)jdpostct.c $(JDEP) | ||
377 | - $(CP_) $(JSRC)jdpostct.c $(GLGEN)jdpostct.c | ||
378 | + $(CP_) $(JSRC)jdpostct.c $(GLGEN)jdpostct.c || true | ||
379 | $(JCC) $(JO_)jdpostct.$(OBJ) $(C_) $(GLGEN)jdpostct.c | ||
380 | $(RM_) $(GLGEN)jdpostct.c | ||
381 | |||
382 | $(JOBJ)jdsample.$(OBJ) : $(JSRC)jdsample.c $(JDEP) | ||
383 | - $(CP_) $(JSRC)jdsample.c $(GLGEN)jdsample.c | ||
384 | + $(CP_) $(JSRC)jdsample.c $(GLGEN)jdsample.c || true | ||
385 | $(JCC) $(JO_)jdsample.$(OBJ) $(C_) $(GLGEN)jdsample.c | ||
386 | $(RM_) $(GLGEN)jdsample.c | ||
387 | |||
388 | $(JOBJ)jidctint.$(OBJ) : $(JSRC)jidctint.c $(JDEP) | ||
389 | - $(CP_) $(JSRC)jidctint.c $(GLGEN)jidctint.c | ||
390 | + $(CP_) $(JSRC)jidctint.c $(GLGEN)jidctint.c || true | ||
391 | $(JCC) $(JO_)jidctint.$(OBJ) $(C_) $(GLGEN)jidctint.c | ||
392 | $(RM_) $(GLGEN)jidctint.c | ||
393 | |||
394 | $(JOBJ)jdarith.$(OBJ) : $(JSRC)jdarith.c $(JDEP) | ||
395 | - $(CP_) $(JSRC)jdarith.c $(GLGEN)jdarith.c | ||
396 | + $(CP_) $(JSRC)jdarith.c $(GLGEN)jdarith.c || true | ||
397 | $(JCC) $(JO_)jdarith.$(OBJ) $(C_) $(GLGEN)jdarith.c | ||
398 | $(RM_) $(GLGEN)jdarith.c | ||
399 | diff --git a/base/jpegxr.mak b/base/jpegxr.mak | ||
400 | index 0f09a3a..36495dd 100644 | ||
401 | --- a/base/jpegxr.mak | ||
402 | +++ b/base/jpegxr.mak | ||
403 | @@ -103,7 +103,7 @@ $(JPEGXR_OBJ)x_strip.$(OBJ) : $(JPEGXR_SRC)x_strip.c $(jpegxr_hdrs) | ||
404 | # Copy the target definition we want | ||
405 | $(JPEGXR_GEN)jpegxr.dev : $(TOP_MAKEFILES) $(JPEGXR_MAK) \ | ||
406 | $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev | ||
407 | - $(CP_) $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev $(JPEGXR_GEN)jpegxr.dev | ||
408 | + $(CP_) $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev $(JPEGXR_GEN)jpegxr.dev || true | ||
409 | |||
410 | # Define the compiled in target | ||
411 | $(JPEGXR_GEN)jpegxr_0.dev : $(JPEGXR_MAK) $(ECHOGS_XE) $(jpegxr_objs) | ||
412 | diff --git a/base/lcms.mak b/base/lcms.mak | ||
413 | index 18cfa09..269e7ff 100644 | ||
414 | --- a/base/lcms.mak | ||
415 | +++ b/base/lcms.mak | ||
416 | @@ -84,7 +84,7 @@ LCMSO_=$(O_)$(LCMSOBJ) | ||
417 | |||
418 | # switch in the version of lcms.dev we're actually using | ||
419 | $(LCMSGEN)lcms.dev : $(TOP_MAKEFILES) $(LCMSGEN)lcms_$(SHARE_LCMS).dev | ||
420 | - $(CP_) $(LCMSGEN)lcms_$(SHARE_LCMS).dev $(LCMSGEN)lcms.dev | ||
421 | + $(CP_) $(LCMSGEN)lcms_$(SHARE_LCMS).dev $(LCMSGEN)lcms.dev || true | ||
422 | |||
423 | # dev file for shared (separately built) lcms library | ||
424 | $(LCMSGEN)lcms_1.dev : $(TOP_MAKEFILES) $(LCMS_MAK) $(ECHOGS_XE) | ||
425 | diff --git a/base/lcms2.mak b/base/lcms2.mak | ||
426 | index 52f750c..33a9c16 100644 | ||
427 | --- a/base/lcms2.mak | ||
428 | +++ b/base/lcms2.mak | ||
429 | @@ -85,7 +85,7 @@ LCMS2O_=$(O_)$(LCMS2OBJ) | ||
430 | |||
431 | # switch in the version of lcms2.dev we're actually using | ||
432 | $(LCMS2GEN)lcms2.dev : $(TOP_MAKEFILES) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev | ||
433 | - $(CP_) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(LCMS2GEN)lcms2.dev | ||
434 | + $(CP_) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(LCMS2GEN)lcms2.dev || true | ||
435 | |||
436 | # dev file for shared (separately built) lcms library | ||
437 | $(LCMS2GEN)lcms2_1.dev : $(TOP_MAKEFILES) $(LCMS2_MAK) $(ECHOGS_XE) | ||
438 | diff --git a/base/lcups.mak b/base/lcups.mak | ||
439 | index 0bfb3ac..fcdb170 100644 | ||
440 | --- a/base/lcups.mak | ||
441 | +++ b/base/lcups.mak | ||
442 | @@ -114,7 +114,7 @@ libcups.config-clean : | ||
443 | |||
444 | # instantiate the requested build option (shared or compiled in) | ||
445 | $(LIBCUPSGEN)lcups.dev : $(TOP_MAKEFILES) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev | ||
446 | - $(CP_) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev $(LIBCUPSGEN)lcups.dev | ||
447 | + $(CP_) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev $(LIBCUPSGEN)lcups.dev || true | ||
448 | |||
449 | # Define the shared version. | ||
450 | $(LIBCUPSGEN)lcups_1.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE) | ||
451 | @@ -131,7 +131,7 @@ $(LIBCUPSGEN)lcups_0.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE) \ | ||
452 | # for simplicity we have every source file depend on all headers | ||
453 | |||
454 | $(LIBCUPSGEN)$(D)cups$(D)config.h : $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h | ||
455 | - $(CP_) $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPSGEN)$(D)cups$(D)config.h | ||
456 | + $(CP_) $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPSGEN)$(D)cups$(D)config.h || true | ||
457 | |||
458 | $(LIBCUPSOBJ)adminutil.$(OBJ) : $(LIBCUPSSRC)adminutil.c $(LIBSCUPSHEADERS) $(LIBCUPSGEN)$(D)cups$(D)config.h | ||
459 | $(LCUPS_CC) $(LCUPSO_)adminutil.$(OBJ) $(C_) $(LIBCUPSSRC)adminutil.c | ||
460 | @@ -218,7 +218,7 @@ $(LIBCUPSOBJ)mark.$(OBJ) : $(LIBCUPSSRC)mark.c $(LIBSCUPSHEADERS) | ||
461 | $(LCUPS_CC) $(LCUPSO_)mark.$(OBJ) $(C_) $(LIBCUPSSRC)mark.c | ||
462 | |||
463 | $(LIBCUPSOBJ)cups_md5.$(OBJ) : $(LIBCUPSSRC)md5.c $(LIBSCUPSHEADERS) | ||
464 | - $(CP_) $(LIBCUPSSRC)md5.c $(LIBCUPSGEN)cups_md5.c | ||
465 | + $(CP_) $(LIBCUPSSRC)md5.c $(LIBCUPSGEN)cups_md5.c || true | ||
466 | $(LCUPS_CC) $(LCUPSO_)cups_md5.$(OBJ) $(C_) $(LIBCUPSGEN)cups_md5.c | ||
467 | |||
468 | $(LIBCUPSOBJ)md5passwd.$(OBJ) : $(LIBCUPSSRC)md5passwd.c $(LIBSCUPSHEADERS) | ||
469 | @@ -255,7 +255,7 @@ $(LIBCUPSOBJ)snmp.$(OBJ) : $(LIBCUPSSRC)snmp.c $(LIBSCUPSHEADERS) | ||
470 | $(LCUPS_CC) $(LCUPSO_)snmp.$(OBJ) $(C_) $(LIBCUPSSRC)snmp.c | ||
471 | |||
472 | $(LIBCUPSOBJ)cups_snpf.$(OBJ) : $(LIBCUPSSRC)snprintf.c $(LIBSCUPSHEADERS) | ||
473 | - $(CP_) $(LIBCUPSSRC)snprintf.c $(LIBCUPSGEN)cups_snpf.c | ||
474 | + $(CP_) $(LIBCUPSSRC)snprintf.c $(LIBCUPSGEN)cups_snpf.c || true | ||
475 | $(LCUPS_CC) $(LCUPSO_)cups_snpf.$(OBJ) $(C_) $(LIBCUPSGEN)cups_snpf.c | ||
476 | |||
477 | $(LIBCUPSOBJ)string.$(OBJ) : $(LIBCUPSSRC)string.c $(LIBSCUPSHEADERS) | ||
478 | @@ -271,5 +271,5 @@ $(LIBCUPSOBJ)usersys.$(OBJ) : $(LIBCUPSSRC)usersys.c $(LIBSCUPSHEADERS) | ||
479 | $(LCUPS_CC) $(LCUPSO_)usersys.$(OBJ) $(C_) $(LIBCUPSSRC)usersys.c | ||
480 | |||
481 | $(LIBCUPSOBJ)cups_util.$(OBJ) : $(LIBCUPSSRC)util.c $(LIBSCUPSHEADERS) | ||
482 | - $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c | ||
483 | + $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c || true | ||
484 | $(LCUPS_CC) $(LCUPSO_)cups_util.$(OBJ) $(C_) $(LIBCUPSGEN)cups_util.c | ||
485 | diff --git a/base/lcupsi.mak b/base/lcupsi.mak | ||
486 | index ea4047f..0102d93 100644 | ||
487 | --- a/base/lcupsi.mak | ||
488 | +++ b/base/lcupsi.mak | ||
489 | @@ -73,7 +73,7 @@ libcupsi.config-clean : | ||
490 | |||
491 | # instantiate the requested build option (shared or compiled in) | ||
492 | $(LIBCUPSIGEN)lcupsi.dev : $(TOP_MAKEFILES) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev | ||
493 | - $(CP_) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev $(LIBCUPSIGEN)lcupsi.dev | ||
494 | + $(CP_) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev $(LIBCUPSIGEN)lcupsi.dev || true | ||
495 | |||
496 | # Define the shared version. | ||
497 | $(LIBCUPSIGEN)lcupsi_1.dev : $(TOP_MAKEFILES) $(LCUPSI_MAK) $(ECHOGS_XE) | ||
498 | diff --git a/base/ldf_jb2.mak b/base/ldf_jb2.mak | ||
499 | index 3f50892..97c76a0 100644 | ||
500 | --- a/base/ldf_jb2.mak | ||
501 | +++ b/base/ldf_jb2.mak | ||
502 | @@ -223,7 +223,7 @@ ldf_jb2_HDRS=$(ldf_jb2_common_HDRS) $(ldf_jb2_compress_HDRS) | ||
503 | |||
504 | # switch in the selected library .dev | ||
505 | $(LDF_JB2_GEN)ldf_jb2.dev : $(TOP_MAKEFILES) $(LDF_JB2_MAK) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev | ||
506 | - $(CP_) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev $(LDF_JB2_GEN)ldf_jb2.dev | ||
507 | + $(CP_) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev $(LDF_JB2_GEN)ldf_jb2.dev || true | ||
508 | |||
509 | # external link .dev | ||
510 | $(LDF_JB2_GEN)ldf_jb2_1.dev : $(TOP_MAKEFILES) $(LDF_JB2_MAK) $(ECHOGS_XE) | ||
511 | diff --git a/base/lib.mak b/base/lib.mak | ||
512 | index 3ad7db3..87b4f01 100644 | ||
513 | --- a/base/lib.mak | ||
514 | +++ b/base/lib.mak | ||
515 | @@ -343,7 +343,7 @@ md5_=$(GLOBJ)md5.$(OBJ) | ||
516 | $(GLOBJ)md5.$(OBJ) : $(GLSRC)md5.c $(AK) $(md5_h) $(std_h) $(MAKEDIRS) $(EXP)$(ECHOGS_XE) | ||
517 | $(EXP)$(ECHOGS_XE) -w $(GLGEN)md5.h -x 23 include -x 2022 memory_.h -x 22 | ||
518 | $(EXP)$(ECHOGS_XE) -a $(GLGEN)md5.h -+R $(GLSRC)md5.h | ||
519 | - $(CP_) $(GLSRC)md5.c $(GLGEN)md5.c | ||
520 | + $(CP_) $(GLSRC)md5.c $(GLGEN)md5.c || true | ||
521 | $(GLCC) $(GLO_)md5.$(OBJ) $(C_) $(GLGEN)md5.c | ||
522 | $(RM_) $(GLGEN)md5.c $(GLGEN)md5.h | ||
523 | |||
524 | @@ -624,19 +624,19 @@ $(GLOBJ)gconfig.$(OBJ) : $(gconfig_h) $(GLSRC)gconf.c $(AK) $(gx_h)\ | ||
525 | $(gxdevice_h) $(gxiclass_h) $(gxiodev_h) $(gxiparam_h) $(TOP_MAKEFILES)\ | ||
526 | $(MAKEDDIRS) | ||
527 | $(RM_) $(GLGEN)gconfig.c | ||
528 | - $(CP_) $(GLSRC)gconf.c $(GLGEN)gconfig.c | ||
529 | + $(CP_) $(GLSRC)gconf.c $(GLGEN)gconfig.c || true | ||
530 | $(GLCC) $(GLO_)gconfig.$(OBJ) $(C_) $(GLGEN)gconfig.c | ||
531 | |||
532 | $(GLOBJ)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\ | ||
533 | $(std_h) $(gscdefs_h) $(gconfigd_h) $(TOP_MAKEFILES) $(MAKEDIRS) | ||
534 | $(RM_) $(GLGEN)gscdefs.c | ||
535 | - $(CP_) $(GLSRC)gscdef.c $(GLGEN)gscdefs.c | ||
536 | + $(CP_) $(GLSRC)gscdef.c $(GLGEN)gscdefs.c || true | ||
537 | $(GLCC) $(GLO_)gscdefs.$(OBJ) $(C_) $(GLGEN)gscdefs.c | ||
538 | |||
539 | $(AUX)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\ | ||
540 | $(std_h) $(gscdefs_h) $(gconfigd_h) $(TOP_MAKEFILES) $(MAKEDIRS) | ||
541 | $(RM_) $(AUX)gscdefs.c | ||
542 | - $(CP_) $(GLSRC)gscdef.c $(AUX)gscdefs.c | ||
543 | + $(CP_) $(GLSRC)gscdef.c $(AUX)gscdefs.c || true | ||
544 | $(GLCCAUX) $(C_) $(AUXO_)gscdefs.$(OBJ) $(AUX)gscdefs.c | ||
545 | |||
546 | $(GLOBJ)gxacpath.$(OBJ) : $(GLSRC)gxacpath.c $(AK) $(gx_h)\ | ||
547 | @@ -1527,7 +1527,7 @@ $(GLOBJ)sjpegc_0.$(OBJ) : $(GLSRC)sjpegc.c $(AK) $(stdio__h) $(string__h)\ | ||
548 | $(GLJCC) $(GLO_)sjpegc_0.$(OBJ) $(C_) $(GLSRC)sjpegc.c | ||
549 | |||
550 | $(GLOBJ)sjpegc.$(OBJ) : $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ) | ||
551 | - $(CP_) $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegc.$(OBJ) | ||
552 | + $(CP_) $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegc.$(OBJ) || true | ||
553 | |||
554 | # sdcparam is used by the filter operator and the PS/PDF writer. | ||
555 | # It is not included automatically in sdcte/d. | ||
556 | @@ -1555,7 +1555,7 @@ $(GLOBJ)sdcte_0.$(OBJ) : $(GLSRC)sdcte.c $(AK)\ | ||
557 | $(GLJCC) $(GLO_)sdcte_0.$(OBJ) $(C_) $(GLSRC)sdcte.c | ||
558 | |||
559 | $(GLOBJ)sdcte.$(OBJ) : $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS) | ||
560 | - $(CP_) $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdcte.$(OBJ) | ||
561 | + $(CP_) $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdcte.$(OBJ) || true | ||
562 | |||
563 | |||
564 | $(GLOBJ)sjpege_1.$(OBJ) : $(GLSRC)sjpege.c $(AK)\ | ||
565 | @@ -1571,7 +1571,7 @@ $(GLOBJ)sjpege_0.$(OBJ) : $(GLSRC)sjpege.c $(AK)\ | ||
566 | $(GLJCC) $(GLO_)sjpege_0.$(OBJ) $(C_) $(GLSRC)sjpege.c | ||
567 | |||
568 | $(GLOBJ)sjpege.$(OBJ) : $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS) | ||
569 | - $(CP_) $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpege.$(OBJ) | ||
570 | + $(CP_) $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpege.$(OBJ) || true | ||
571 | |||
572 | # sdeparam is used by the filter operator and the PS/PDF writer. | ||
573 | # It is not included automatically in sdcte. | ||
574 | @@ -1603,7 +1603,7 @@ $(GLOBJ)sdctd_0.$(OBJ) : $(GLSRC)sdctd.c $(AK)\ | ||
575 | $(GLJCC) $(GLO_)sdctd_0.$(OBJ) $(C_) $(GLSRC)sdctd.c | ||
576 | |||
577 | $(GLOBJ)sdctd.$(OBJ) : $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS) | ||
578 | - $(CP_) $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdctd.$(OBJ) | ||
579 | + $(CP_) $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdctd.$(OBJ) || true | ||
580 | |||
581 | |||
582 | $(GLOBJ)sjpegd_1.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\ | ||
583 | @@ -1620,7 +1620,7 @@ $(GLOBJ)sjpegd_0.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\ | ||
584 | |||
585 | |||
586 | $(GLOBJ)sjpegd.$(OBJ) : $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS) | ||
587 | - $(CP_) $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegd.$(OBJ) | ||
588 | + $(CP_) $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegd.$(OBJ) || true | ||
589 | |||
590 | # sddparam is used by the filter operator. | ||
591 | # It is not included automatically in sdctd. | ||
592 | @@ -1643,7 +1643,7 @@ $(GLD)lzwe.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwe_) | ||
593 | |||
594 | # We need slzwe.dev as a synonym for lzwe.dev for BAND_LIST_STORAGE = memory. | ||
595 | $(GLD)slzwe.dev : $(GLD)lzwe.dev | ||
596 | - $(CP_) $(GLD)lzwe.dev $(GLD)slzwe.dev | ||
597 | + $(CP_) $(GLD)lzwe.dev $(GLD)slzwe.dev || true | ||
598 | |||
599 | $(GLOBJ)slzwe.$(OBJ) : $(GLSRC)slzwe.c $(AK) $(stdio__h) $(gdebug_h)\ | ||
600 | $(slzwx_h) $(strimpl_h) $(MAKEDIRS) | ||
601 | @@ -1659,7 +1659,7 @@ $(GLD)lzwd.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwd_) | ||
602 | |||
603 | # We need slzwd.dev as a synonym for lzwd.dev for BAND_LIST_STORAGE = memory. | ||
604 | $(GLD)slzwd.dev : $(GLD)lzwd.dev | ||
605 | - $(CP_) $(GLD)lzwd.dev $(GLD)slzwd.dev | ||
606 | + $(CP_) $(GLD)lzwd.dev $(GLD)slzwd.dev || true | ||
607 | |||
608 | $(GLOBJ)slzwd.$(OBJ) : $(GLSRC)slzwd.c $(AK) $(stdio__h) $(gdebug_h)\ | ||
609 | $(slzwx_h) $(strimpl_h) $(MAKEDIRS) | ||
610 | @@ -1709,7 +1709,7 @@ $(GLOBJ)saes.$(OBJ) : $(GLSRC)saes.c $(AK) $(memory__h)\ | ||
611 | # ---------------- JBIG2 compression filter ---------------- # | ||
612 | |||
613 | $(GLD)sjbig2.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjbig2_$(JBIG2_LIB).dev | ||
614 | - $(CP_) $(GLD)sjbig2_$(JBIG2_LIB).dev $(GLD)sjbig2.dev | ||
615 | + $(CP_) $(GLD)sjbig2_$(JBIG2_LIB).dev $(GLD)sjbig2.dev || true | ||
616 | |||
617 | # jbig2dec version | ||
618 | sjbig2_jbig2dec=$(GLOBJ)sjbig2.$(OBJ) | ||
619 | @@ -1745,7 +1745,7 @@ $(GLOBJ)sjbig2_luratech.$(OBJ) : $(GLSRC)sjbig2_luratech.c $(AK) \ | ||
620 | # ---------------- JPEG 2000 compression filter ---------------- # | ||
621 | |||
622 | $(GLD)sjpx.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjpx_$(JPX_LIB).dev | ||
623 | - $(CP_) $(GLD)sjpx_$(JPX_LIB).dev $(GLD)sjpx.dev | ||
624 | + $(CP_) $(GLD)sjpx_$(JPX_LIB).dev $(GLD)sjpx.dev || true | ||
625 | |||
626 | $(GLOBJ)sjpx.$(OBJ) : $(GLSRC)sjpx.c $(AK) \ | ||
627 | $(memory__h) $(gsmalloc_h) \ | ||
628 | @@ -1874,7 +1874,7 @@ $(GLOBJ)szlibc_0.$(OBJ) : $(GLSRC)szlibc.c $(AK) $(std_h)\ | ||
629 | $(GLZCC) $(GLO_)szlibc_0.$(OBJ) $(C_) $(GLSRC)szlibc.c | ||
630 | |||
631 | $(GLOBJ)szlibc.$(OBJ) : $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS) | ||
632 | - $(CP_) $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibc.$(OBJ) | ||
633 | + $(CP_) $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibc.$(OBJ) || true | ||
634 | |||
635 | szlibe_=$(szlibc_) $(GLOBJ)szlibe.$(OBJ) | ||
636 | $(GLD)szlibe.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibe.dev $(szlibe_) | ||
637 | @@ -1890,7 +1890,7 @@ $(GLOBJ)szlibe_0.$(OBJ) : $(GLSRC)szlibe.c $(AK) $(std_h)\ | ||
638 | $(GLZCC) $(GLO_)szlibe_0.$(OBJ) $(C_) $(GLSRC)szlibe.c | ||
639 | |||
640 | $(GLOBJ)szlibe.$(OBJ) : $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS) | ||
641 | - $(CP_) $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibe.$(OBJ) | ||
642 | + $(CP_) $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibe.$(OBJ) || true | ||
643 | |||
644 | szlibd_=$(szlibc_) $(GLOBJ)szlibd.$(OBJ) | ||
645 | $(GLD)szlibd.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibd.dev $(szlibd_) | ||
646 | @@ -1906,7 +1906,7 @@ $(GLOBJ)szlibd_0.$(OBJ) : $(GLSRC)szlibd.c $(AK) $(std_h) $(memory__h)\ | ||
647 | $(GLZCC) $(GLO_)szlibd_0.$(OBJ) $(C_) $(GLSRC)szlibd.c | ||
648 | |||
649 | $(GLOBJ)szlibd.$(OBJ) : $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS) | ||
650 | - $(CP_) $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibd.$(OBJ) | ||
651 | + $(CP_) $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibd.$(OBJ) || true | ||
652 | |||
653 | # ---------------- Page devices ---------------- # | ||
654 | # We include this here, rather than in devs.mak, because it is more like | ||
655 | @@ -2796,7 +2796,7 @@ $(GLOBJ)gsicc_lcms_0.$(OBJ) : $(GLSRC)gsicc_lcms.c\ | ||
656 | $(GLLCMSCC) $(GLO_)gsicc_lcms_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms.c | ||
657 | |||
658 | $(GLOBJ)gsicc_lcms.$(OBJ) : $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(gp_h) | ||
659 | - $(CP_) $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms.$(OBJ) | ||
660 | + $(CP_) $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms.$(OBJ) || true | ||
661 | |||
662 | |||
663 | $(GLOBJ)gsicc_lcms2_1.$(OBJ) : $(GLSRC)gsicc_lcms2.c\ | ||
664 | @@ -2808,7 +2808,7 @@ $(GLOBJ)gsicc_lcms2_0.$(OBJ) : $(GLSRC)gsicc_lcms2.c\ | ||
665 | $(GLLCMS2CC) $(GLO_)gsicc_lcms2_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms2.c | ||
666 | |||
667 | $(GLOBJ)gsicc_lcms2.$(OBJ) : $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(gp_h) | ||
668 | - $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ) | ||
669 | + $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ) || true | ||
670 | |||
671 | # Note that gsicc_create requires compile with lcms to obtain icc34.h | ||
672 | # header file that is used for creating ICC structures from PS objects. | ||
673 | @@ -2828,7 +2828,7 @@ $(GLOBJ)gsicc_create_0.$(OBJ) : $(GLSRC)gsicc_create.c $(AK) $(string__h)\ | ||
674 | $(GLLCMSCC) $(GLO_)gsicc_create_0.$(OBJ) $(C_) $(GLSRC)gsicc_create.c | ||
675 | |||
676 | $(GLOBJ)gsicc_create.$(OBJ) : $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(MAKEDIRS) | ||
677 | - $(CP_) $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_create.$(OBJ) | ||
678 | + $(CP_) $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_create.$(OBJ) || true | ||
679 | |||
680 | |||
681 | #include "icc34.h" /* Note this header is needed even if lcms is not compiled as default CMS */ | ||
682 | @@ -3132,7 +3132,7 @@ $(GLGEN)gsromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS) | ||
683 | $(PS_ROMFS_ARGS) $(GL_ROMFS_ARGS) | ||
684 | |||
685 | $(GLGEN)gsromfs1.c : $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(MAKEDIRS) | ||
686 | - $(CP_) $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(GLGEN)gsromfs1.c | ||
687 | + $(CP_) $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(GLGEN)gsromfs1.c || true | ||
688 | |||
689 | # the following module is only included if the romfs.dev FEATURE is enabled | ||
690 | $(GLOBJ)gsiorom_1.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \ | ||
691 | @@ -3148,7 +3148,7 @@ $(GLOBJ)gsiorom_0.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \ | ||
692 | $(GLCC) $(GLO_)gsiorom_0.$(OBJ) $(I_)$(ZI_)$(_I) $(C_) $(GLSRC)gsiorom.c | ||
693 | |||
694 | $(GLOBJ)gsiorom.$(OBJ) : $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS) | ||
695 | - $(CP_) $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)gsiorom.$(OBJ) | ||
696 | + $(CP_) $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)gsiorom.$(OBJ) || true | ||
697 | |||
698 | $(GLOBJ)gsromfs1.$(OBJ) : $(GLOBJ)gsromfs1.c $(time__h) $(MAKEDIRS) | ||
699 | $(GLCC) $(GLO_)gsromfs1.$(OBJ) $(C_) $(GLOBJ)gsromfs1.c | ||
700 | diff --git a/base/lwf_jp2.mak b/base/lwf_jp2.mak | ||
701 | index ca1b7cc..ad6446d 100644 | ||
702 | --- a/base/lwf_jp2.mak | ||
703 | +++ b/base/lwf_jp2.mak | ||
704 | @@ -176,7 +176,7 @@ lwf_jp2_HDRS = \ | ||
705 | |||
706 | # switch in the selected library .dev | ||
707 | $(LWF_JP2_GEN)lwf_jp2.dev : $(TOP_MAKEFILES) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev | ||
708 | - $(CP_) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev $(LWF_JP2_GEN)lwf_jp2.dev | ||
709 | + $(CP_) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev $(LWF_JP2_GEN)lwf_jp2.dev || true | ||
710 | |||
711 | # external link .dev | ||
712 | $(LWF_JP2_GEN)lwf_jp2_1.dev : $(TOP_MAKEFILES) $(LWF_JP2_MAK) $(ECHOGS_XE) | ||
713 | diff --git a/base/macos-mcp.mak b/base/macos-mcp.mak | ||
714 | index 4ded7f3..3599ed9 100644 | ||
715 | --- a/base/macos-mcp.mak | ||
716 | +++ b/base/macos-mcp.mak | ||
717 | @@ -383,11 +383,11 @@ CWPROJ_XML=./ghostscript.mcp.xml | ||
718 | |||
719 | $(CWPROJ_XML): $(gconfigd_h) | ||
720 | -mkdir -p obj/sys | ||
721 | - $(CP_) $(macsystypes_h) $(systypes_h) | ||
722 | + $(CP_) $(macsystypes_h) $(systypes_h) || true | ||
723 | $(SH) $(GLSRC)macgenmcpxml.sh `$(CAT) $(ld_tr)` > $(CWPROJ_XML) | ||
724 | - $(CP_) $(GLSRC)gconf.c $(GLOBJ)gconfig.c | ||
725 | - $(CP_) $(GLSRC)iconf.c $(GLOBJ)iconfig.c | ||
726 | - $(CP_) $(GLSRC)gscdef.c $(GLOBJ)gscdefs.c | ||
727 | + $(CP_) $(GLSRC)gconf.c $(GLOBJ)gconfig.c || true | ||
728 | + $(CP_) $(GLSRC)iconf.c $(GLOBJ)iconfig.c || true | ||
729 | + $(CP_) $(GLSRC)gscdef.c $(GLOBJ)gscdefs.c || true | ||
730 | /Developer/Tools/SetFile -c CWIE -t TEXT $(CWPROJ_XML) | ||
731 | |||
732 | $(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) $(CWPROJ_XML) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) | ||
733 | diff --git a/base/openjpeg.mak b/base/openjpeg.mak | ||
734 | index 32be240..4a6b429 100644 | ||
735 | --- a/base/openjpeg.mak | ||
736 | +++ b/base/openjpeg.mak | ||
737 | @@ -99,7 +99,7 @@ open_jpeg_HDRS = \ | ||
738 | |||
739 | # switch in the selected library .dev | ||
740 | $(OPEN_JPEG_GEN)openjpeg.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev | ||
741 | - $(CP_) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev $(OPEN_JPEG_GEN)openjpeg.dev | ||
742 | + $(CP_) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev $(OPEN_JPEG_GEN)openjpeg.dev || true | ||
743 | |||
744 | # external link .dev | ||
745 | $(OPEN_JPEG_GEN)openjpeg_1.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_MAK) $(ECHOGS_XE) | ||
746 | diff --git a/base/openvms.mak b/base/openvms.mak | ||
747 | index e5ae40b..286ee84 100644 | ||
748 | --- a/base/openvms.mak | ||
749 | +++ b/base/openvms.mak | ||
750 | @@ -365,7 +365,7 @@ SH= | ||
751 | |||
752 | # Define generic commands. | ||
753 | |||
754 | -CP_=$$ @$(GLSRCDIR)COPY_ONE | ||
755 | +CP_=$$ @$(GLSRCDIR)COPY_ONE || true | ||
756 | |||
757 | # Define the command for deleting (a) file(s) (including wild cards) | ||
758 | |||
759 | diff --git a/base/png.mak b/base/png.mak | ||
760 | index f01c426..8a89884 100644 | ||
761 | --- a/base/png.mak | ||
762 | +++ b/base/png.mak | ||
763 | @@ -79,7 +79,7 @@ png.config-clean : | ||
764 | $(RM_) $(PNGGEN)lpg*.dev | ||
765 | |||
766 | $(pnglibconf_h) : $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt | ||
767 | - $(CP_) $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt $(pnglibconf_h) | ||
768 | + $(CP_) $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt $(pnglibconf_h) || true | ||
769 | |||
770 | PDEP=$(AK) $(pnglibconf_h) | ||
771 | |||
772 | @@ -134,7 +134,7 @@ $(PNGOBJ)pngget.$(OBJ) : $(PNGSRC)pngget.c $(PDEP) | ||
773 | |||
774 | # Define the version of libpng.dev that we are actually using. | ||
775 | $(PNGGEN)libpng.dev : $(TOP_MAKEFILES) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev | ||
776 | - $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev | ||
777 | + $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev || true | ||
778 | |||
779 | # Define the shared version of libpng. | ||
780 | # Note that it requires libz, which must be searched *after* libpng. | ||
781 | diff --git a/base/tiff.mak b/base/tiff.mak | ||
782 | index 0ea9f9e..80d8926 100644 | ||
783 | --- a/base/tiff.mak | ||
784 | +++ b/base/tiff.mak | ||
785 | @@ -53,11 +53,11 @@ tiff_11=$(TIFFOBJ)gstiffio.$(OBJ) | ||
786 | |||
787 | $(TIFFSRC)libtiff$(D)tif_config.unix.h : $(TIFFSRC)libtiff$(D)tif_config.h.in | ||
788 | cd $(TIFFSRC) && ./configure | ||
789 | - $(CP_) $(TIFFCONF)libtiff$(D)tif_config.h $(TIFFCONF)libtiff$(D)tif_config.unix.h | ||
790 | + $(CP_) $(TIFFCONF)libtiff$(D)tif_config.h $(TIFFCONF)libtiff$(D)tif_config.unix.h || true | ||
791 | |||
792 | $(TIFFSRC)libtiff$(D)tiffconf.unix.h : $(TIFFSRC)libtiff$(D)tiffconf.h.in | ||
793 | cd $(TIFFSRC) && ./configure | ||
794 | - $(CP_) $(TIFFCONF)libtiff$(D)tiffconf.h $(TIFFCONF)libtiff$(D)tiffconf.unix.h | ||
795 | + $(CP_) $(TIFFCONF)libtiff$(D)tiffconf.h $(TIFFCONF)libtiff$(D)tiffconf.unix.h || true | ||
796 | |||
797 | $(TIFFOBJ)tif_aux.$(OBJ) : $(TIFFSRC)/libtiff/tif_aux.c $(TIFFDEP) | ||
798 | $(TIFFCC) $(TIFFO_)tif_aux.$(OBJ) $(C_) $(TIFFSRC)/libtiff/tif_aux.c | ||
799 | @@ -189,14 +189,14 @@ $(TIFFOBJ)gstiffio.$(OBJ) : $(GLSRC)gstiffio.c $(gstiffio_h) $(PDEVH) $(stdint__ | ||
800 | $(TIFFCC) $(TIFFO_)gstiffio.$(OBJ) $(D_)SHARE_LIBTIFF=$(SHARE_LIBTIFF) $(C_) $(GLSRC)gstiffio.c | ||
801 | |||
802 | $(TIFFGEN)tif_config.h: $(TIFFCONFIG_H) | ||
803 | - $(CP_) $(TIFFCONFIG_H) $(TIFFGEN)tif_config.h | ||
804 | + $(CP_) $(TIFFCONFIG_H) $(TIFFGEN)tif_config.h || true | ||
805 | |||
806 | $(TIFFGEN)tiffconf.h: $(TIFFCONF_H) | ||
807 | - $(CP_) $(TIFFCONF_H) $(TIFFGEN)tiffconf.h | ||
808 | + $(CP_) $(TIFFCONF_H) $(TIFFGEN)tiffconf.h || true | ||
809 | |||
810 | # Define the version of libtiff.dev that we are actually using. | ||
811 | $(TIFFGEN)libtiff.dev : $(TOP_MAKEFILES) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev | ||
812 | - $(CP_) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev $(TIFFGEN)libtiff.dev | ||
813 | + $(CP_) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev $(TIFFGEN)libtiff.dev || true | ||
814 | |||
815 | |||
816 | # Define the shared version. | ||
817 | diff --git a/base/unix-aux.mak b/base/unix-aux.mak | ||
818 | index 1ddad78..6b24422 100644 | ||
819 | --- a/base/unix-aux.mak | ||
820 | +++ b/base/unix-aux.mak | ||
821 | @@ -105,7 +105,7 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\ | ||
822 | # $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) | ||
823 | # | ||
824 | #$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS) | ||
825 | -# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) | ||
826 | +# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) || true | ||
827 | |||
828 | # Query the environment to construct gconfig_.h. | ||
829 | # These are all defined conditionally (except the JasPER one), so that | ||
830 | diff --git a/base/unixhead.mak b/base/unixhead.mak | ||
831 | index 6aa3599..70a61f8 100644 | ||
832 | --- a/base/unixhead.mak | ||
833 | +++ b/base/unixhead.mak | ||
834 | @@ -53,7 +53,7 @@ SH=$(SHELL) | ||
835 | |||
836 | # Define generic commands. | ||
837 | |||
838 | -CP_=cp | ||
839 | +CP_=cp -f | ||
840 | RM_=rm -f | ||
841 | RMN_=rm -f | ||
842 | |||
843 | diff --git a/base/zlib.mak b/base/zlib.mak | ||
844 | index 6c50605..7fb8c9b 100644 | ||
845 | --- a/base/zlib.mak | ||
846 | +++ b/base/zlib.mak | ||
847 | @@ -83,7 +83,7 @@ $(ZOBJ)zutil.$(OBJ) : $(ZSRC)zutil.c $(ZDEP) | ||
848 | # Encoding (compression) code. | ||
849 | |||
850 | $(ZGEN)zlibe.dev : $(TOP_MAKEFILES) $(ZGEN)zlibe_$(SHARE_ZLIB).dev | ||
851 | - $(CP_) $(ZGEN)zlibe_$(SHARE_ZLIB).dev $(ZGEN)zlibe.dev | ||
852 | + $(CP_) $(ZGEN)zlibe_$(SHARE_ZLIB).dev $(ZGEN)zlibe.dev || true | ||
853 | |||
854 | $(ZGEN)zlibe_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE) | ||
855 | $(SETMOD) $(ZGEN)zlibe_1 -lib $(ZLIB_NAME) | ||
856 | @@ -111,7 +111,7 @@ $(ZOBJ)trees.$(OBJ) : $(ZSRC)trees.c $(ZDEP) | ||
857 | # with 0.90 do. | ||
858 | |||
859 | $(ZGEN)crc32.dev : $(TOP_MAKEFILES) $(ZGEN)crc32_$(SHARE_ZLIB).dev | ||
860 | - $(CP_) $(ZGEN)crc32_$(SHARE_ZLIB).dev $(ZGEN)crc32.dev | ||
861 | + $(CP_) $(ZGEN)crc32_$(SHARE_ZLIB).dev $(ZGEN)crc32.dev || true | ||
862 | |||
863 | $(ZGEN)crc32_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE) | ||
864 | $(SETMOD) $(ZGEN)crc32_1 -lib $(ZLIB_NAME) | ||
865 | @@ -127,7 +127,7 @@ $(ZOBJ)crc32.$(OBJ) : $(ZSRC)crc32.c $(ZDEP) | ||
866 | # Decoding (decompression) code. | ||
867 | |||
868 | $(ZGEN)zlibd.dev : $(TOP_MAKEFILES) $(ZGEN)zlibd_$(SHARE_ZLIB).dev | ||
869 | - $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev | ||
870 | + $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev || true | ||
871 | |||
872 | $(ZGEN)zlibd_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE) | ||
873 | $(SETMOD) $(ZGEN)zlibd_1 -lib $(ZLIB_NAME) | ||
874 | diff --git a/devices/devs.mak b/devices/devs.mak | ||
875 | index bc22594..4bd0a11 100644 | ||
876 | --- a/devices/devs.mak | ||
877 | +++ b/devices/devs.mak | ||
878 | @@ -1555,7 +1555,7 @@ libpng_dev=$(PNGGENDIR)$(D)libpng.dev | ||
879 | png_i_=-include $(PNGGENDIR)$(D)libpng | ||
880 | |||
881 | $(DEVOBJ)gdevpng.$(OBJ) : $(DEVSRC)gdevpng.c\ | ||
882 | - $(gdevprn_h) $(gdevpccm_h) $(gscdefs_h) $(png__h) | ||
883 | + $(gdevprn_h) $(gdevpccm_h) $(gscdefs_h) $(png__h) $(PDEP) | ||
884 | $(CC_) $(I_)$(DEVI_) $(II)$(PI_)$(_I) $(PCF_) $(GLF_) $(DEVO_)gdevpng.$(OBJ) $(C_) $(DEVSRC)gdevpng.c | ||
885 | |||
886 | $(DD)pngmono.dev : $(DEVS_MAK) $(libpng_dev) $(png_) $(GLD)page.dev $(GDEV) | ||
887 | diff --git a/psi/int.mak b/psi/int.mak | ||
888 | index 62cba0e..a1e963a 100644 | ||
889 | --- a/psi/int.mak | ||
890 | +++ b/psi/int.mak | ||
891 | @@ -274,7 +274,7 @@ $(PSOBJ)iconfig.$(OBJ) : $(gconfig_h) $(PSSRC)iconf.c $(stdio__h)\ | ||
892 | $(gconf_h) $(gconfigd_h) $(gsmemory_h) $(gstypes_h)\ | ||
893 | $(iminst_h) $(iref_h) $(ivmspace_h) $(opdef_h) $(iplugin_h) | ||
894 | $(RM_) $(PSGEN)iconfig.c | ||
895 | - $(CP_) $(PSSRC)iconf.c $(PSGEN)iconfig.c | ||
896 | + $(CP_) $(PSSRC)iconf.c $(PSGEN)iconfig.c || true | ||
897 | $(PSCC) $(PSO_)iconfig.$(OBJ) $(C_) $(PSGEN)iconfig.c | ||
898 | |||
899 | $(PSOBJ)iinit.$(OBJ) : $(PSSRC)iinit.c $(GH) $(string__h)\ | ||
900 | @@ -607,7 +607,7 @@ $(PSD)psbase.dev : $(INT_MAK) $(ECHOGS_XE) $(INT_OBJS)\ | ||
901 | |||
902 | # We keep the old name for backward compatibility. | ||
903 | $(PSD)level1.dev : $(PSD)psl1.dev | ||
904 | - $(CP_) $(PSD)psl1.dev $(PSD)level1.dev | ||
905 | + $(CP_) $(PSD)psl1.dev $(PSD)level1.dev || true | ||
906 | |||
907 | $(PSD)psl1.dev : $(INT_MAK) $(ECHOGS_XE)\ | ||
908 | $(PSD)psbase.dev $(PSD)bcp.dev $(PSD)path1.dev $(PSD)type1.dev | ||
909 | @@ -934,7 +934,7 @@ $(PSOBJ)zfrsd.$(OBJ) : $(PSSRC)zfrsd.c $(OP) $(memory__h)\ | ||
910 | |||
911 | # We keep the old name for backward compatibility. | ||
912 | $(PSD)level2.dev : $(PSD)psl2.dev | ||
913 | - $(CP_) $(PSD)psl2.dev $(PSD)level2.dev | ||
914 | + $(CP_) $(PSD)psl2.dev $(PSD)level2.dev || true | ||
915 | |||
916 | # We -include dpsand2 first so that geninit will have access to the | ||
917 | # system name table as soon as possible. | ||
918 | @@ -1193,7 +1193,7 @@ $(PSOBJ)zfjbig2_luratech.$(OBJ) : $(PSSRC)zfjbig2.c $(OP) $(memory__h)\ | ||
919 | # this can be turned on and off with a FEATURE_DEV | ||
920 | |||
921 | $(PSD)jpx.dev : $(INT_MAK) $(ECHOGS_XE) $(PSD)jpx_$(JPX_LIB).dev | ||
922 | - $(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev | ||
923 | + $(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev || true | ||
924 | |||
925 | fjpx_luratech=$(PSOBJ)zfjpx_luratech.$(OBJ) | ||
926 | |||
927 | -- | ||
928 | 1.8.1.2 | ||
929 | |||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch new file mode 100644 index 0000000000..db8740affa --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch | |||
@@ -0,0 +1,96 @@ | |||
1 | ust use commands provided by ghostscript-native, preventing recompile them when | ||
2 | compile ghostscript. | ||
3 | Way to enable cross compile. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Kang Kai <kai.kang@windriver.com> | ||
8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
9 | |||
10 | diff --git a/base/unix-aux.mak b/base/unix-aux.mak | ||
11 | index c032b3f..1ddad78 100644 | ||
12 | --- a/base/unix-aux.mak | ||
13 | +++ b/base/unix-aux.mak | ||
14 | @@ -68,44 +68,44 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\ | ||
15 | |||
16 | # -------------------------- Auxiliary programs --------------------------- # | ||
17 | |||
18 | -$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS) | ||
19 | - $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) | ||
20 | - | ||
21 | -# On the RS/6000 (at least), compiling genarch.c with gcc with -O | ||
22 | -# produces a buggy executable. | ||
23 | -$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS) | ||
24 | - $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) | ||
25 | - | ||
26 | -$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS) | ||
27 | - $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) | ||
28 | - | ||
29 | -$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS) | ||
30 | - $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) | ||
31 | - | ||
32 | -$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS) | ||
33 | - $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) | ||
34 | - | ||
35 | -# To get GS to use the system zlib, you remove/hide the gs/zlib directory | ||
36 | -# which means that the mkromfs build can't find the zlib source it needs. | ||
37 | -# So it's split into two targets, one using the zlib source directly..... | ||
38 | -MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ | ||
39 | - $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ | ||
40 | - $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) | ||
41 | - | ||
42 | -$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) | ||
43 | - $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) | ||
44 | - | ||
45 | -# .... and one using the zlib library linked via the command line | ||
46 | -MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ | ||
47 | - $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ | ||
48 | - $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ | ||
49 | - $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) | ||
50 | - | ||
51 | -$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) | ||
52 | - $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) | ||
53 | - | ||
54 | -$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS) | ||
55 | - $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) | ||
56 | +#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS) | ||
57 | +# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) | ||
58 | +# | ||
59 | +## On the RS/6000 (at least), compiling genarch.c with gcc with -O | ||
60 | +## produces a buggy executable. | ||
61 | +#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS) | ||
62 | +# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) | ||
63 | +# | ||
64 | +#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS) | ||
65 | +# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) | ||
66 | +# | ||
67 | +#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS) | ||
68 | +# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) | ||
69 | +# | ||
70 | +#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS) | ||
71 | +# $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) | ||
72 | +# | ||
73 | +## To get GS to use the system zlib, you remove/hide the gs/zlib directory | ||
74 | +## which means that the mkromfs build can't find the zlib source it needs. | ||
75 | +## So it's split into two targets, one using the zlib source directly..... | ||
76 | +#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ | ||
77 | +# $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ | ||
78 | +# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) | ||
79 | +# | ||
80 | +#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) | ||
81 | +# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) | ||
82 | +# | ||
83 | +## .... and one using the zlib library linked via the command line | ||
84 | +#MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ | ||
85 | +# $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ | ||
86 | +# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ | ||
87 | +# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) | ||
88 | +# | ||
89 | +#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) | ||
90 | +# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) | ||
91 | +# | ||
92 | +#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS) | ||
93 | +# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) | ||
94 | |||
95 | # Query the environment to construct gconfig_.h. | ||
96 | # These are all defined conditionally (except the JasPER one), so that | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch new file mode 100644 index 0000000000..9158117d01 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | ghostscript-native:fix disable-system-libtiff | ||
2 | |||
3 | Modify configure to add the check to make sure | ||
4 | ghostscrip could work while system-libtiff is | ||
5 | disabled. | ||
6 | |||
7 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
8 | Upstream-Status: Pending | ||
9 | --- | ||
10 | configure.ac | 5 +++++ | ||
11 | 1 file changed, 5 insertions(+) | ||
12 | |||
13 | diff --git a/configure.ac b/configure.ac | ||
14 | --- a/configure.ac | ||
15 | +++ b/configure.ac | ||
16 | @@ -1055,6 +1055,7 @@ Disabling tiff output devices.]) | ||
17 | esac | ||
18 | |||
19 | if test $SHARE_LIBTIFF -eq 0; then | ||
20 | + if test -e $LIBTIFFDIR/configure; then | ||
21 | echo | ||
22 | echo "Running libtiff configure script..." | ||
23 | olddir=`pwd` | ||
24 | @@ -1069,6 +1070,10 @@ if test $SHARE_LIBTIFF -eq 0; then | ||
25 | cd "$olddir" | ||
26 | echo | ||
27 | echo "Continuing with Ghostscript configuration..." | ||
28 | + else | ||
29 | + AC_MSG_NOTICE([Could not find local copy of libtiff. | ||
30 | +Disabling tiff output devices.]) | ||
31 | + fi | ||
32 | fi | ||
33 | |||
34 | AC_SUBST(SHARE_LIBTIFF) | ||
35 | -- | ||
36 | 1.8.1.2 | ||
37 | |||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h new file mode 100644 index 0000000000..5817b7a6d7 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 4 | ||
9 | #define ARCH_ALIGN_PTR_MOD 4 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 4 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 2 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 8 | ||
21 | #define ARCH_SIZEOF_PTR 4 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 0 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
41 | |||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/i686 b/meta/recipes-extended/ghostscript/ghostscript/i686 new file mode 120000 index 0000000000..87aaca5903 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/i686 | |||
@@ -0,0 +1 @@ | |||
i586 \ No newline at end of file | |||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h new file mode 100644 index 0000000000..b8b637cca2 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 4 | ||
9 | #define ARCH_ALIGN_PTR_MOD 4 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 2 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 4 | ||
21 | #define ARCH_SIZEOF_PTR 4 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 1 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h new file mode 100644 index 0000000000..0d0a16bfa3 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 8 | ||
9 | #define ARCH_ALIGN_PTR_MOD 8 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 3 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 8 | ||
21 | #define ARCH_SIZEOF_PTR 8 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 1 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h new file mode 100644 index 0000000000..a05de29def --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 8 | ||
9 | #define ARCH_ALIGN_PTR_MOD 8 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 3 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 8 | ||
21 | #define ARCH_SIZEOF_PTR 8 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 0 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h new file mode 100644 index 0000000000..a05de29def --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 8 | ||
9 | #define ARCH_ALIGN_PTR_MOD 8 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 3 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 8 | ||
21 | #define ARCH_SIZEOF_PTR 8 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 0 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h new file mode 100644 index 0000000000..0d0a16bfa3 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 8 | ||
9 | #define ARCH_ALIGN_PTR_MOD 8 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 3 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 8 | ||
21 | #define ARCH_SIZEOF_PTR 8 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 1 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h new file mode 100644 index 0000000000..29f90ddf85 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 4 | ||
9 | #define ARCH_ALIGN_PTR_MOD 4 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 2 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 4 | ||
21 | #define ARCH_SIZEOF_PTR 4 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 0 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h new file mode 100644 index 0000000000..359097f356 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 4 | ||
9 | #define ARCH_ALIGN_PTR_MOD 4 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 2 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 8 | ||
21 | #define ARCH_SIZEOF_PTR 4 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 1 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h new file mode 100644 index 0000000000..0d0a16bfa3 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 8 | ||
9 | #define ARCH_ALIGN_PTR_MOD 8 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 3 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 8 | ||
21 | #define ARCH_SIZEOF_PTR 8 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 1 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h new file mode 100644 index 0000000000..a05de29def --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* Parameters derived from machine and compiler architecture. */ | ||
2 | /* This file is generated mechanically by genarch.c. */ | ||
3 | |||
4 | /* ---------------- Scalar alignments ---------------- */ | ||
5 | |||
6 | #define ARCH_ALIGN_SHORT_MOD 2 | ||
7 | #define ARCH_ALIGN_INT_MOD 4 | ||
8 | #define ARCH_ALIGN_LONG_MOD 8 | ||
9 | #define ARCH_ALIGN_PTR_MOD 8 | ||
10 | #define ARCH_ALIGN_FLOAT_MOD 4 | ||
11 | #define ARCH_ALIGN_DOUBLE_MOD 8 | ||
12 | |||
13 | /* ---------------- Scalar sizes ---------------- */ | ||
14 | |||
15 | #define ARCH_LOG2_SIZEOF_CHAR 0 | ||
16 | #define ARCH_LOG2_SIZEOF_SHORT 1 | ||
17 | #define ARCH_LOG2_SIZEOF_INT 2 | ||
18 | #define ARCH_LOG2_SIZEOF_LONG 3 | ||
19 | #define ARCH_LOG2_SIZEOF_LONG_LONG 3 | ||
20 | #define ARCH_SIZEOF_GX_COLOR_INDEX 8 | ||
21 | #define ARCH_SIZEOF_PTR 8 | ||
22 | #define ARCH_SIZEOF_FLOAT 4 | ||
23 | #define ARCH_SIZEOF_DOUBLE 8 | ||
24 | #define ARCH_FLOAT_MANTISSA_BITS 24 | ||
25 | #define ARCH_DOUBLE_MANTISSA_BITS 53 | ||
26 | |||
27 | /* ---------------- Unsigned max values ---------------- */ | ||
28 | |||
29 | #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) | ||
30 | #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) | ||
31 | #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) | ||
32 | #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) | ||
33 | |||
34 | /* ---------------- Miscellaneous ---------------- */ | ||
35 | |||
36 | #define ARCH_IS_BIG_ENDIAN 0 | ||
37 | #define ARCH_PTRS_ARE_SIGNED 0 | ||
38 | #define ARCH_FLOATS_ARE_IEEE 1 | ||
39 | #define ARCH_ARITH_RSHIFT 2 | ||
40 | #define ARCH_DIV_NEG_POS_TRUNCATES 1 | ||
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.14.bb b/meta/recipes-extended/ghostscript/ghostscript_9.14.bb new file mode 100644 index 0000000000..130dc1c378 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript_9.14.bb | |||
@@ -0,0 +1,106 @@ | |||
1 | SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter" | ||
2 | DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \ | ||
3 | a back-end to a program such as ghostview, it can display PostScript and PDF \ | ||
4 | documents in an X11 environment. \ | ||
5 | \ | ||
6 | Furthermore, it can render PostScript and PDF files as graphics to be printed \ | ||
7 | on non-PostScript printers. Supported printers include common \ | ||
8 | dot-matrix, inkjet and laser models. \ | ||
9 | " | ||
10 | HOMEPAGE = "http://www.ghostscript.com" | ||
11 | SECTION = "console/utils" | ||
12 | |||
13 | LICENSE = "GPLv3" | ||
14 | LIC_FILES_CHKSUM = "file://LICENSE;md5=aad21ea85123608e6a0a58d54ee23567" | ||
15 | |||
16 | DEPENDS = "ghostscript-native tiff jpeg fontconfig cups" | ||
17 | DEPENDS_class-native = "" | ||
18 | |||
19 | SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz" | ||
20 | |||
21 | SRC_URI = "${SRC_URI_BASE} \ | ||
22 | file://ghostscript-9.02-prevent_recompiling.patch \ | ||
23 | file://ghostscript-9.02-genarch.patch \ | ||
24 | file://objarch.h \ | ||
25 | file://ghostscript-9.02-parallel-make.patch \ | ||
26 | file://cups-no-gcrypt.patch \ | ||
27 | " | ||
28 | |||
29 | SRC_URI_class-native = "${SRC_URI_BASE} \ | ||
30 | file://ghostscript-native-fix-disable-system-libtiff.patch \ | ||
31 | file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \ | ||
32 | " | ||
33 | |||
34 | SRC_URI[md5sum] = "586494befb443363338c1b6379f13973" | ||
35 | SRC_URI[sha256sum] = "ab2ba5ce11c8db396c9acf774a497182d7686d04670976cc3e690ada7db9f0d4" | ||
36 | |||
37 | EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \ | ||
38 | --with-fontpath=${datadir}/fonts \ | ||
39 | --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \ | ||
40 | --with-cups-datadir=${datadir}/cups \ | ||
41 | ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--enable-little-endian', '--enable-big-endian', d)} \ | ||
42 | " | ||
43 | |||
44 | EXTRA_OECONF_append_mips = " --with-large_color_index=0" | ||
45 | EXTRA_OECONF_append_mipsel = " --with-large_color_index=0" | ||
46 | |||
47 | # Explicity disable libtiff, fontconfig, | ||
48 | # freetype, cups for ghostscript-native | ||
49 | EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \ | ||
50 | --without-jbig2dec \ | ||
51 | --with-fontpath=${datadir}/fonts \ | ||
52 | --without-libidn --disable-fontconfig \ | ||
53 | --disable-freetype --disable-cups" | ||
54 | |||
55 | # This has been fixed upstream but for now we need to subvert the check for time.h | ||
56 | # http://bugs.ghostscript.com/show_bug.cgi?id=692443 | ||
57 | # http://bugs.ghostscript.com/show_bug.cgi?id=692426 | ||
58 | CFLAGS += "-DHAVE_SYS_TIME_H=1" | ||
59 | BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1" | ||
60 | |||
61 | inherit autotools-brokensep | ||
62 | |||
63 | do_configure_prepend () { | ||
64 | mkdir -p obj | ||
65 | mkdir -p soobj | ||
66 | if [ -e ${WORKDIR}/objarch.h ]; then | ||
67 | cp ${WORKDIR}/objarch.h obj/arch.h | ||
68 | fi | ||
69 | } | ||
70 | |||
71 | do_configure_append () { | ||
72 | # copy tools from the native ghostscript build | ||
73 | if [ "${PN}" != "ghostscript-native" ]; then | ||
74 | mkdir -p obj/aux soobj | ||
75 | for i in genarch genconf mkromfs echogs gendev genht; do | ||
76 | cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i | ||
77 | done | ||
78 | fi | ||
79 | } | ||
80 | |||
81 | do_install_append () { | ||
82 | mkdir -p ${D}${datadir}/ghostscript/${PV}/ | ||
83 | cp -r Resource ${D}${datadir}/ghostscript/${PV}/ | ||
84 | cp -r iccprofiles ${D}${datadir}/ghostscript/${PV}/ | ||
85 | } | ||
86 | |||
87 | do_compile_class-native () { | ||
88 | mkdir -p obj | ||
89 | for i in genarch genconf mkromfs echogs gendev genht; do | ||
90 | oe_runmake obj/aux/$i | ||
91 | done | ||
92 | } | ||
93 | |||
94 | do_install_class-native () { | ||
95 | install -d ${D}${bindir}/ghostscript-${PV} | ||
96 | for i in genarch genconf mkromfs echogs gendev genht; do | ||
97 | install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i | ||
98 | done | ||
99 | } | ||
100 | |||
101 | BBCLASSEXTEND = "native" | ||
102 | |||
103 | # Ghostscript install tool 'instcopy' tries to remove already created | ||
104 | # directories during install and parallel make causes problems. | ||
105 | PARALLEL_MAKEINST="" | ||
106 | |||
diff --git a/meta/recipes-extended/gperf/gperf.inc b/meta/recipes-extended/gperf/gperf.inc new file mode 100644 index 0000000000..a8ce230f65 --- /dev/null +++ b/meta/recipes-extended/gperf/gperf.inc | |||
@@ -0,0 +1,22 @@ | |||
1 | DESCRIPTION = "GNU gperf is a perfect hash function generator" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/gperf" | ||
3 | SUMMARY = "Generate a perfect hash function from a set of keywords" | ||
4 | LICENSE = "GPLv3+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | ||
6 | file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b" | ||
7 | |||
8 | SRC_URI = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz" | ||
9 | |||
10 | inherit autotools | ||
11 | |||
12 | # autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of | ||
13 | # duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal | ||
14 | EXTRA_AUTORECONF += " -I ${S}" | ||
15 | |||
16 | do_configure_prepend() { | ||
17 | if [ ! -e ${S}/acinclude.m4 ]; then | ||
18 | cat ${S}/aclocal.m4 > ${S}/acinclude.m4 | ||
19 | fi | ||
20 | } | ||
21 | |||
22 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/gperf/gperf_3.0.3.bb b/meta/recipes-extended/gperf/gperf_3.0.3.bb new file mode 100644 index 0000000000..772886121b --- /dev/null +++ b/meta/recipes-extended/gperf/gperf_3.0.3.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require gperf.inc | ||
2 | |||
3 | LICENSE = "GPLv2+" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=a5f84abb0070adf8a0925d7d534b6e0a \ | ||
5 | file://src/main.cc;beginline=8;endline=19;md5=72a3034a19e72f08ee48ef8244a121fd" | ||
6 | |||
7 | PR = "r1" | ||
8 | |||
9 | SRC_URI[md5sum] = "cc20e58975a38075440423c8fb85fd00" | ||
10 | SRC_URI[sha256sum] = "63287527c8d9e27e801cf0804436f3494bd569db05d49dcdd2a942ae72fa9055" | ||
diff --git a/meta/recipes-extended/gperf/gperf_3.0.4.bb b/meta/recipes-extended/gperf/gperf_3.0.4.bb new file mode 100644 index 0000000000..64003fc0bb --- /dev/null +++ b/meta/recipes-extended/gperf/gperf_3.0.4.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require gperf.inc | ||
2 | |||
3 | |||
4 | SRC_URI[md5sum] = "c1f1db32fb6598d6a93e6e88796a8632" | ||
5 | SRC_URI[sha256sum] = "767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e" | ||
diff --git a/meta/recipes-extended/grep/grep-2.19/grep2.19-CVE-2015-1345.patch b/meta/recipes-extended/grep/grep-2.19/grep2.19-CVE-2015-1345.patch new file mode 100644 index 0000000000..32846f50be --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.19/grep2.19-CVE-2015-1345.patch | |||
@@ -0,0 +1,129 @@ | |||
1 | From 83a95bd8c8561875b948cadd417c653dbe7ef2e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yuliy Pisetsky <ypisetsky@fb.com> | ||
3 | Date: Thu, 01 Jan 2015 23:36:55 +0000 | ||
4 | Subject: grep -F: fix a heap buffer (read) overrun | ||
5 | |||
6 | grep's read buffer is often filled to its full size, except when | ||
7 | reading the final buffer of a file. In that case, the number of | ||
8 | bytes read may be far less than the size of the buffer. However, for | ||
9 | certain unusual pattern/text combinations, grep -F would mistakenly | ||
10 | examine bytes in that uninitialized region of memory when searching | ||
11 | for a match. With carefully chosen inputs, one can cause grep -F to | ||
12 | read beyond the end of that buffer altogether. This problem arose via | ||
13 | commit v2.18-90-g73893ff with the introduction of a more efficient | ||
14 | heuristic using what is now the memchr_kwset function. The use of | ||
15 | that function in bmexec_trans could leave TP much larger than EP, | ||
16 | and the subsequent call to bm_delta2_search would mistakenly access | ||
17 | beyond end of the main input read buffer. | ||
18 | |||
19 | * src/kwset.c (bmexec_trans): When TP reaches or exceeds EP, | ||
20 | do not call bm_delta2_search. | ||
21 | * tests/kwset-abuse: New file. | ||
22 | * tests/Makefile.am (TESTS): Add it. | ||
23 | * NEWS (Bug fixes): Mention it. | ||
24 | |||
25 | Prior to this patch, this command would trigger a UMR: | ||
26 | |||
27 | printf %0360db 0 | valgrind src/grep -F $(printf %019dXb 0) | ||
28 | |||
29 | Use of uninitialised value of size 8 | ||
30 | at 0x4142BE: bmexec_trans (kwset.c:657) | ||
31 | by 0x4143CA: bmexec (kwset.c:678) | ||
32 | by 0x414973: kwsexec (kwset.c:848) | ||
33 | by 0x414DC4: Fexecute (kwsearch.c:128) | ||
34 | by 0x404E2E: grepbuf (grep.c:1238) | ||
35 | by 0x4054BF: grep (grep.c:1417) | ||
36 | by 0x405CEB: grepdesc (grep.c:1645) | ||
37 | by 0x405EC1: grep_command_line_arg (grep.c:1692) | ||
38 | by 0x4077D4: main (grep.c:2570) | ||
39 | |||
40 | See the accompanying test for how to trigger the heap buffer overrun. | ||
41 | |||
42 | Thanks to Nima Aghdaii for testing and finding numerous | ||
43 | ways to break early iterations of this patch. | ||
44 | |||
45 | Fixes CVE-2015-1345. | ||
46 | Upstream-Status: Backport | ||
47 | |||
48 | --- | ||
49 | diff --git a/NEWS b/NEWS | ||
50 | index 975440d..3835d8d 100644 | ||
51 | --- a/NEWS | ||
52 | +++ b/NEWS | ||
53 | @@ -2,6 +2,11 @@ GNU grep NEWS -*- outline -*- | ||
54 | |||
55 | * Noteworthy changes in release ?.? (????-??-??) [?] | ||
56 | |||
57 | +** Bug fixes | ||
58 | + | ||
59 | + grep no longer reads from uninitialized memory or from beyond the end | ||
60 | + of the heap-allocated input buffer. | ||
61 | + | ||
62 | |||
63 | * Noteworthy changes in release 2.21 (2014-11-23) [stable] | ||
64 | |||
65 | diff --git a/src/kwset.c b/src/kwset.c | ||
66 | index 4003c8d..376f7c3 100644 | ||
67 | --- a/src/kwset.c | ||
68 | +++ b/src/kwset.c | ||
69 | @@ -643,6 +643,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size) | ||
70 | if (! tp) | ||
71 | return -1; | ||
72 | tp++; | ||
73 | + if (ep <= tp) | ||
74 | + break; | ||
75 | } | ||
76 | } | ||
77 | } | ||
78 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
79 | index 2cba2cd..0508cd2 100644 | ||
80 | --- a/tests/Makefile.am | ||
81 | +++ b/tests/Makefile.am | ||
82 | @@ -75,6 +75,7 @@ TESTS = \ | ||
83 | inconsistent-range \ | ||
84 | invalid-multibyte-infloop \ | ||
85 | khadafy \ | ||
86 | + kwset-abuse \ | ||
87 | long-line-vs-2GiB-read \ | ||
88 | match-lines \ | ||
89 | max-count-overread \ | ||
90 | diff --git a/tests/kwset-abuse b/tests/kwset-abuse | ||
91 | new file mode 100755 | ||
92 | index 0000000..6d8ec0c | ||
93 | --- a/dev/null | ||
94 | +++ b/tests/kwset-abuse | ||
95 | @@ -0,0 +1,32 @@ | ||
96 | +#! /bin/sh | ||
97 | +# Evoke a segfault in a hard-to-reach code path of kwset.c. | ||
98 | +# This bug affected grep versions 2.19 through 2.21. | ||
99 | +# | ||
100 | +# Copyright (C) 2015 Free Software Foundation, Inc. | ||
101 | +# | ||
102 | +# This program is free software: you can redistribute it and/or modify | ||
103 | +# it under the terms of the GNU General Public License as published by | ||
104 | +# the Free Software Foundation, either version 3 of the License, or | ||
105 | +# (at your option) any later version. | ||
106 | + | ||
107 | +# This program is distributed in the hope that it will be useful, | ||
108 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
109 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
110 | +# GNU General Public License for more details. | ||
111 | + | ||
112 | +# You should have received a copy of the GNU General Public License | ||
113 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
114 | + | ||
115 | +. "${srcdir=.}/init.sh"; path_prepend_ ../src | ||
116 | + | ||
117 | +fail=0 | ||
118 | + | ||
119 | +# This test case chooses a haystack of size 260,000, since prodding | ||
120 | +# with gdb showed a reallocation slightly larger than that in fillbuf. | ||
121 | +# To reach the buggy code, the needle must have length < 1/11 that of | ||
122 | +# the haystack, and 10,000 is a nice round number that fits the bill. | ||
123 | +printf '%0260000dXy\n' 0 | grep -F $(printf %010000dy 0) | ||
124 | + | ||
125 | +test $? = 1 || fail=1 | ||
126 | + | ||
127 | +Exit $fail | ||
128 | -- | ||
129 | cgit v0.9.0.2 | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/Makevars b/meta/recipes-extended/grep/grep-2.5.1a/Makevars new file mode 100644 index 0000000000..8b09f53b0f --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.5.1a/Makevars | |||
@@ -0,0 +1,25 @@ | |||
1 | # Makefile variables for PO directory in any package using GNU gettext. | ||
2 | |||
3 | # Usually the message domain is the same as the package name. | ||
4 | DOMAIN = $(PACKAGE) | ||
5 | |||
6 | # These two variables depend on the location of this directory. | ||
7 | subdir = po | ||
8 | top_builddir = .. | ||
9 | |||
10 | # These options get passed to xgettext. | ||
11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ | ||
12 | |||
13 | # This is the copyright holder that gets inserted into the header of the | ||
14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding | ||
15 | # package. (Note that the msgstr strings, extracted from the package's | ||
16 | # sources, belong to the copyright holder of the package.) Translators are | ||
17 | # expected to transfer the copyright for their translations to this person | ||
18 | # or entity, or to disclaim their copyright. The empty string stands for | ||
19 | # the public domain; in this case the translators are expected to disclaim | ||
20 | # their copyright. | ||
21 | COPYRIGHT_HOLDER = Free Software Foundation, Inc. | ||
22 | |||
23 | # This is the list of locale categories, beyond LC_MESSAGES, for which the | ||
24 | # message catalogs shall be used. It is usually empty. | ||
25 | EXTRA_LOCALE_CATEGORIES = | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch new file mode 100644 index 0000000000..5a4149cfc0 --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Upstream-Status: Inappropriate [Poky Specific this is gplv2 version] | ||
2 | |||
3 | Signed-off-by Saul Wold <sgw@linux.intel.com> | ||
4 | |||
5 | Index: grep-2.5.1a/doc/grep.texi | ||
6 | =================================================================== | ||
7 | --- grep-2.5.1a.orig/doc/grep.texi | ||
8 | +++ grep-2.5.1a/doc/grep.texi | ||
9 | @@ -288,7 +288,7 @@ This version number should be included i | ||
10 | Print a usage message briefly summarizing these command-line options | ||
11 | and the bug-reporting address, then exit. | ||
12 | |||
13 | -@itemx --binary-files=@var{type} | ||
14 | +@item --binary-files=@var{type} | ||
15 | @opindex --binary-files | ||
16 | @cindex binary files | ||
17 | If the first few bytes of a file indicate that the file contains binary | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch new file mode 100644 index 0000000000..3b91520fb2 --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure | ||
2 | Upstream-Status: Inappropriate [ old version that will not be maintained ] | ||
3 | Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com> | ||
4 | |||
5 | diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c | ||
6 | --- grep-2.5.1a-orig/lib/hard-locale.c 2001-03-04 07:33:12.000000000 +0200 | ||
7 | +++ grep-2.5.1a/lib/hard-locale.c 2013-03-11 17:05:52.086444891 +0200 | ||
8 | @@ -38,9 +38,7 @@ | ||
9 | # endif | ||
10 | #endif | ||
11 | |||
12 | -#if HAVE_LOCALE_H | ||
13 | # include <locale.h> | ||
14 | -#endif | ||
15 | |||
16 | #if HAVE_STRING_H | ||
17 | # include <string.h> | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch b/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch new file mode 100644 index 0000000000..57463355a7 --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Enable operation with later versions of gettext. | ||
2 | |||
3 | Upstream-Status: Inappropriate | ||
4 | RP 2012/10/19 | ||
5 | |||
6 | Index: grep-2.5.1a/configure.in | ||
7 | =================================================================== | ||
8 | --- grep-2.5.1a.orig/configure.in 2012-10-19 12:57:51.646970204 +0000 | ||
9 | +++ grep-2.5.1a/configure.in 2012-10-19 12:59:49.946968803 +0000 | ||
10 | @@ -140,4 +140,4 @@ | ||
11 | AC_CHECK_LIB(pcre, pcre_exec) | ||
12 | fi | ||
13 | |||
14 | -AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; echo timestamp > stamp-h]) | ||
15 | +AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [echo timestamp > stamp-h]) | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch new file mode 100644 index 0000000000..059d0687b3 --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | The patch to fix CVE-2012-5667 | ||
2 | Reference: https://bugzilla.redhat.com/attachment.cgi?id=686605&action=diff | ||
3 | |||
4 | Multiple integer overflows in GNU Grep before 2.11 might allow | ||
5 | context-dependent attackers to execute arbitrary code via vectors | ||
6 | involving a long input line that triggers a heap-based buffer overflow. | ||
7 | |||
8 | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5667 | ||
9 | |||
10 | Upstream-Status: Inappropriate [other] | ||
11 | This version of GNU Grep has been abandoned upstream and they are no longer | ||
12 | accepting patches. This is not a backport. | ||
13 | |||
14 | Signed-off-by Ming Liu <ming.liu@windriver.com> | ||
15 | --- | ||
16 | grep.c | 7 +++---- | ||
17 | 1 file changed, 3 insertions(+), 4 deletions(-) | ||
18 | |||
19 | --- a/src/grep.c 2013-05-15 13:39:33.359191769 +0800 | ||
20 | +++ a/src/grep.c 2013-05-15 13:50:22.609191882 +0800 | ||
21 | @@ -306,6 +306,11 @@ fillbuf (size_t save, struct stats const | ||
22 | int cc = 1; | ||
23 | char *readbuf; | ||
24 | size_t readsize; | ||
25 | + const size_t max_save = INT_MAX / 2; | ||
26 | + | ||
27 | + /* Limit the amount of saved data to INT_MAX to fix CVE-2012-5667 */ | ||
28 | + if (save > max_save) | ||
29 | + error (2, 0, _("line too long")); | ||
30 | |||
31 | /* Offset from start of buffer to start of old stuff | ||
32 | that we want to save. */ | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch new file mode 100644 index 0000000000..3ccce5fc36 --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | automake 1.12 has depricated automatic de-ANSI-fication support | ||
4 | |||
5 | this patch avoids these kinds of errors: | ||
6 | |||
7 | | configure.in:33: error: automatic de-ANSI-fication support has been removed | ||
8 | | /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from... | ||
9 | | configure.in:33: the top level | ||
10 | | autom4te: m4 failed with exit status: 1 | ||
11 | ... | ||
12 | | lib/Makefile.am:2: error: automatic de-ANSI-fication support has been removed | ||
13 | | src/Makefile.am:2: error: automatic de-ANSI-fication support has been removed | ||
14 | | autoreconf: automake failed with exit status: 1 | ||
15 | |||
16 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
17 | 2012/05/04 | ||
18 | |||
19 | Index: grep-2.5.1a/configure.in | ||
20 | =================================================================== | ||
21 | --- grep-2.5.1a.orig/configure.in | ||
22 | +++ grep-2.5.1a/configure.in | ||
23 | @@ -30,7 +30,6 @@ AC_PROG_RANLIB | ||
24 | |||
25 | dnl Checks for typedefs, structures, and compiler characteristics. | ||
26 | AC_SYS_LARGEFILE | ||
27 | -AM_C_PROTOTYPES | ||
28 | AC_TYPE_SIZE_T | ||
29 | AC_CHECK_TYPE(ssize_t, int) | ||
30 | AC_C_CONST | ||
31 | Index: grep-2.5.1a/lib/Makefile.am | ||
32 | =================================================================== | ||
33 | --- grep-2.5.1a.orig/lib/Makefile.am | ||
34 | +++ grep-2.5.1a/lib/Makefile.am | ||
35 | @@ -1,5 +1,5 @@ | ||
36 | # | ||
37 | -AUTOMAKE_OPTIONS = ../src/ansi2knr | ||
38 | +AUTOMAKE_OPTIONS = | ||
39 | |||
40 | SUBDIRS = posix | ||
41 | |||
42 | Index: grep-2.5.1a/src/Makefile.am | ||
43 | =================================================================== | ||
44 | --- grep-2.5.1a.orig/src/Makefile.am | ||
45 | +++ grep-2.5.1a/src/Makefile.am | ||
46 | @@ -1,5 +1,5 @@ | ||
47 | ## Process this file with automake to create Makefile.in | ||
48 | -AUTOMAKE_OPTIONS = ansi2knr no-dependencies | ||
49 | +AUTOMAKE_OPTIONS = no-dependencies | ||
50 | |||
51 | LN = ln | ||
52 | |||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch new file mode 100644 index 0000000000..de054fc755 --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | Upstream-Status: Inappropriate [licensing] | ||
2 | |||
3 | # Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which | ||
4 | # doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have | ||
5 | # mempcpy, we'll just use that instead. | ||
6 | # Patch source: OpenEmbedded | ||
7 | |||
8 | Index: grep-2.5.1/intl/localealias.c | ||
9 | =================================================================== | ||
10 | --- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100 | ||
11 | +++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000 | ||
12 | @@ -65,7 +65,7 @@ | ||
13 | # define strcasecmp __strcasecmp | ||
14 | |||
15 | # ifndef mempcpy | ||
16 | -# define mempcpy __mempcpy | ||
17 | +# error "mempcpy not detected" | ||
18 | # endif | ||
19 | # define HAVE_MEMPCPY 1 | ||
20 | # define HAVE___FSETLOCKING 1 | ||
21 | Index: grep-2.5.1/lib/getopt.c | ||
22 | =================================================================== | ||
23 | --- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100 | ||
24 | +++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000 | ||
25 | @@ -326,7 +326,7 @@ | ||
26 | nonoption_flags_len = nonoption_flags_max_len = 0; | ||
27 | else | ||
28 | { | ||
29 | - memset (__mempcpy (new_str, __getopt_nonoption_flags, | ||
30 | + memset (mempcpy (new_str, __getopt_nonoption_flags, | ||
31 | nonoption_flags_max_len), | ||
32 | '\0', top + 1 - nonoption_flags_max_len); | ||
33 | nonoption_flags_max_len = top + 1; | ||
34 | @@ -437,7 +437,7 @@ | ||
35 | if (__getopt_nonoption_flags == NULL) | ||
36 | nonoption_flags_max_len = -1; | ||
37 | else | ||
38 | - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), | ||
39 | + memset (mempcpy (__getopt_nonoption_flags, orig_str, len), | ||
40 | '\0', nonoption_flags_max_len - len); | ||
41 | } | ||
42 | } | ||
43 | Index: grep-2.5.1/lib/regex.c | ||
44 | =================================================================== | ||
45 | --- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000 | ||
46 | +++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000 | ||
47 | @@ -7842,7 +7842,7 @@ | ||
48 | if (msg_size > errbuf_size) | ||
49 | { | ||
50 | #if defined HAVE_MEMPCPY || defined _LIBC | ||
51 | - *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; | ||
52 | + *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; | ||
53 | #else | ||
54 | memcpy (errbuf, msg, errbuf_size - 1); | ||
55 | errbuf[errbuf_size - 1] = 0; | ||
diff --git a/meta/recipes-extended/grep/grep_2.19.bb b/meta/recipes-extended/grep/grep_2.19.bb new file mode 100644 index 0000000000..d60ce5e389 --- /dev/null +++ b/meta/recipes-extended/grep/grep_2.19.bb | |||
@@ -0,0 +1,41 @@ | |||
1 | SUMMARY = "GNU grep utility" | ||
2 | HOMEPAGE = "http://savannah.gnu.org/projects/grep/" | ||
3 | BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep" | ||
4 | SECTION = "console/utils" | ||
5 | LICENSE = "GPLv3" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee" | ||
7 | |||
8 | SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \ | ||
9 | file://grep2.19-CVE-2015-1345.patch \ | ||
10 | " | ||
11 | |||
12 | SRC_URI[md5sum] = "ac732142227d9fe9567d71301e127979" | ||
13 | SRC_URI[sha256sum] = "6388295be48cfcaf7665d9cd3914e6625ea000e9414132bfefd45cf1d8eec34d" | ||
14 | |||
15 | inherit autotools gettext texinfo | ||
16 | |||
17 | EXTRA_OECONF = "--disable-perl-regexp" | ||
18 | |||
19 | do_configure_prepend () { | ||
20 | rm -f ${S}/m4/init.m4 | ||
21 | } | ||
22 | |||
23 | do_install () { | ||
24 | autotools_do_install | ||
25 | install -d ${D}${base_bindir} | ||
26 | mv ${D}${bindir}/grep ${D}${base_bindir}/grep | ||
27 | mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep | ||
28 | mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep | ||
29 | rmdir ${D}${bindir}/ | ||
30 | } | ||
31 | |||
32 | inherit update-alternatives | ||
33 | |||
34 | ALTERNATIVE_PRIORITY = "100" | ||
35 | |||
36 | ALTERNATIVE_${PN} = "grep egrep fgrep" | ||
37 | ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep" | ||
38 | ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep" | ||
39 | ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep" | ||
40 | |||
41 | export CONFIG_SHELL="/bin/sh" | ||
diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb new file mode 100644 index 0000000000..1ce112e43d --- /dev/null +++ b/meta/recipes-extended/grep/grep_2.5.1a.bb | |||
@@ -0,0 +1,51 @@ | |||
1 | SUMMARY = "Pattern matching utilities" | ||
2 | DESCRIPTION = "The GNU versions of commonly used grep utilities. The grep command searches one or more input \ | ||
3 | files for lines containing a match to a specified pattern." | ||
4 | SECTION = "console/utils" | ||
5 | LICENSE = "GPLv2" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
7 | |||
8 | PR = "r2" | ||
9 | |||
10 | SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \ | ||
11 | file://uclibc-fix.patch \ | ||
12 | file://grep_fix_for_automake-1.12.patch \ | ||
13 | file://gettext.patch \ | ||
14 | file://fix64-int-to-pointer.patch \ | ||
15 | file://Makevars \ | ||
16 | file://grep-CVE-2012-5667.patch \ | ||
17 | file://fix-for-texinfo-5.1.patch \ | ||
18 | " | ||
19 | |||
20 | SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c" | ||
21 | SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132" | ||
22 | |||
23 | inherit autotools gettext texinfo | ||
24 | |||
25 | EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses" | ||
26 | |||
27 | CFLAGS += "-D PROTOTYPES" | ||
28 | do_configure_prepend () { | ||
29 | rm -f ${S}/m4/init.m4 | ||
30 | cp -f ${WORKDIR}/Makevars ${S}/po/ | ||
31 | } | ||
32 | |||
33 | do_install () { | ||
34 | autotools_do_install | ||
35 | install -d ${D}${base_bindir} | ||
36 | mv ${D}${bindir}/grep ${D}${base_bindir}/grep | ||
37 | mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep | ||
38 | mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep | ||
39 | rmdir ${D}${bindir}/ | ||
40 | } | ||
41 | |||
42 | inherit update-alternatives | ||
43 | |||
44 | ALTERNATIVE_PRIORITY = "100" | ||
45 | |||
46 | ALTERNATIVE_${PN} = "grep egrep fgrep" | ||
47 | ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep" | ||
48 | ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep" | ||
49 | ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep" | ||
50 | |||
51 | export CONFIG_SHELL="/bin/sh" | ||
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch new file mode 100644 index 0000000000..559ae72898 --- /dev/null +++ b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Upstream-Status: Inappropriate [embedded] | ||
2 | |||
3 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
4 | --- | ||
5 | Makefile.sub | 10 +++++----- | ||
6 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
7 | |||
8 | --- a/contrib/groffer/Makefile.sub | ||
9 | +++ b/contrib/groffer/Makefile.sub | ||
10 | @@ -38,16 +38,16 @@ groffer: groffer.sh groffer2.sh version. | ||
11 | $(RM) $@; | ||
12 | sed \ | ||
13 | -e "s|@g@|$(g)|g" \ | ||
14 | - -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ | ||
15 | + -e "s|@BINDIR@|$(bindir)|g" \ | ||
16 | -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \ | ||
17 | -e "s|@VERSION@|$(version)$(revision)|g" \ | ||
18 | $(srcdir)/groffer.sh >$@; | ||
19 | chmod +x $@ | ||
20 | |||
21 | install_data: groffer | ||
22 | - -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) | ||
23 | - -$(RM) $(DESTDIR)$(bindir)/groffer | ||
24 | - $(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer | ||
25 | + -test -d $(bindir) || $(mkinstalldirs) $(bindir) | ||
26 | + -$(RM) $(bindir)/groffer | ||
27 | + $(INSTALL_SCRIPT) groffer $(bindir)/groffer | ||
28 | -test -d $(DESTDIR)$(libdir)/groff/groffer || \ | ||
29 | $(mkinstalldirs) $(DESTDIR)$(libdir)/groff/groffer | ||
30 | -$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh | ||
31 | @@ -58,7 +58,7 @@ install_data: groffer | ||
32 | $(DESTDIR)$(libdir)/groff/groffer/version.sh | ||
33 | |||
34 | uninstall_sub: | ||
35 | - -$(RM) $(DESTDIR)$(bindir)/groffer | ||
36 | + -$(RM) $(bindir)/groffer | ||
37 | -$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh | ||
38 | -$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh | ||
39 | -rmdir $(DESTDIR)$(libdir)/groff/groffer | ||
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch new file mode 100644 index 0000000000..c24eff9af5 --- /dev/null +++ b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | |||
2 | Upstream-Status: Inappropriate [embedded] | ||
3 | |||
4 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
5 | --- | ||
6 | groff-1.18.1.4/Makefile.in | 7 +------ | ||
7 | 1 file changed, 1 insertion(+), 6 deletions(-) | ||
8 | |||
9 | --- a/Makefile.in | ||
10 | +++ b/Makefile.in | ||
11 | @@ -460,27 +460,22 @@ OTHERDIRS=\ | ||
12 | src/roff/grog \ | ||
13 | src/roff/nroff \ | ||
14 | contrib/mm \ | ||
15 | contrib/pic2graph \ | ||
16 | contrib/eqn2graph \ | ||
17 | - contrib/groffer \ | ||
18 | - contrib/mom \ | ||
19 | - doc | ||
20 | + contrib/groffer | ||
21 | ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \ | ||
22 | $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS) | ||
23 | EXTRADIRS=\ | ||
24 | font/devps/generate \ | ||
25 | font/devdvi/generate \ | ||
26 | font/devlj4/generate \ | ||
27 | - src/xditview \ | ||
28 | doc | ||
29 | NOMAKEDIRS=\ | ||
30 | arch/djgpp \ | ||
31 | contrib/mm/examples \ | ||
32 | contrib/mm/mm \ | ||
33 | - contrib/mom/examples \ | ||
34 | - contrib/mom/momdoc \ | ||
35 | src/libs/snprintf | ||
36 | DISTDIRS=\ | ||
37 | $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDEVDIRS) \ | ||
38 | $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS) | ||
39 | TARGETS=all install install_bin install_data clean distclean mostlyclean \ | ||
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch new file mode 100644 index 0000000000..e3f1aa6a48 --- /dev/null +++ b/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Upstream-Status: Inappropriate [embedded] | ||
2 | |||
3 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
4 | |||
5 | Index: groff-1.18.1.4/tmac/man.local | ||
6 | =================================================================== | ||
7 | --- groff-1.18.1.4.orig/tmac/man.local 2000-10-26 22:15:17.000000000 +0800 | ||
8 | +++ groff-1.18.1.4/tmac/man.local 2010-08-24 14:17:52.070006664 +0800 | ||
9 | @@ -1,2 +1,27 @@ | ||
10 | .\" This file is loaded after an-old.tmac. | ||
11 | .\" Put any local modifications to an-old.tmac here. | ||
12 | +. | ||
13 | +.if n \{\ | ||
14 | +. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other | ||
15 | +. \" than utf8. | ||
16 | +. if !'\*[.T]'utf8' \ | ||
17 | +. tr \[oq]' | ||
18 | +. | ||
19 | +. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by | ||
20 | +. \" grotty. | ||
21 | +. if '\V[GROFF_SGR]'' \ | ||
22 | +. output x X tty: sgr 0 | ||
23 | +. | ||
24 | +. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make | ||
25 | +. \" searching in man pages easier. | ||
26 | +. if '\*[.T]'utf8' \ | ||
27 | +. char \- \N'45' | ||
28 | +. | ||
29 | +. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such | ||
30 | +. \" as those in command-line options. This is a bug in those pages, but | ||
31 | +. \" too many fonts are missing the Unicode HYPHEN character, so we render | ||
32 | +. \" this as the ASCII-compatible HYPHEN-MINUS instead. | ||
33 | +. if '\*[.T]'utf8' \ | ||
34 | +. char - \N'45' | ||
35 | +.\} | ||
36 | + | ||
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch new file mode 100644 index 0000000000..409c1a5a18 --- /dev/null +++ b/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | |||
2 | Upstream-Status: Inappropriate [embedded] | ||
3 | |||
4 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
5 | |||
6 | Index: groff-1.18.1.4/tmac/mdoc.local | ||
7 | =================================================================== | ||
8 | --- groff-1.18.1.4.orig/tmac/mdoc.local 2001-03-23 08:17:51.000000000 +0800 | ||
9 | +++ groff-1.18.1.4/tmac/mdoc.local 2010-08-24 14:20:22.014006846 +0800 | ||
10 | @@ -1,2 +1,26 @@ | ||
11 | .\" This file is loaded after doc.tmac. | ||
12 | .\" Put any local modifications to doc.tmac here. | ||
13 | +. | ||
14 | +.if n \{\ | ||
15 | +. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other | ||
16 | +. \" than utf8. | ||
17 | +. if !'\*[.T]'utf8' \ | ||
18 | +. tr \[oq]' | ||
19 | +. | ||
20 | +. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by | ||
21 | +. \" grotty. | ||
22 | +. if '\V[GROFF_SGR]'' \ | ||
23 | +. output x X tty: sgr 0 | ||
24 | +. | ||
25 | +. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make | ||
26 | +. \" searching in man pages easier. | ||
27 | +. if '\*[.T]'utf8' \ | ||
28 | +. char \- \N'45' | ||
29 | +. | ||
30 | +. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such | ||
31 | +. \" as those in command-line options. This is a bug in those pages, but | ||
32 | +. \" too many fonts are missing the Unicode HYPHEN character, so we render | ||
33 | +. \" this as the ASCII-compatible HYPHEN-MINUS instead. | ||
34 | +. if '\*[.T]'utf8' \ | ||
35 | +. char - \N'45' | ||
36 | +.\} | ||
diff --git a/meta/recipes-extended/groff/groff-1.22.2/groff-1.22.2-correct-man.local-install-path.patch b/meta/recipes-extended/groff/groff-1.22.2/groff-1.22.2-correct-man.local-install-path.patch new file mode 100644 index 0000000000..f7e9a742f5 --- /dev/null +++ b/meta/recipes-extended/groff/groff-1.22.2/groff-1.22.2-correct-man.local-install-path.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Correct the install path of man.local to fix following error: | ||
2 | /yocto/build/tmp/sysroots/x86_64-linux/usr/share/groff/1.22.2/tmac/an-old.tmac:690: warning: can't find macro file `man.local' | ||
3 | |||
4 | Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> | ||
5 | Upstream-Status: Pending | ||
6 | |||
7 | --- groff-1.22.2/tmac/Makefile.sub.orig 2013-02-07 20:06:08.000000000 +0800 | ||
8 | +++ groff-1.22.2/tmac/Makefile.sub 2013-06-26 19:11:23.572259001 +0800 | ||
9 | @@ -114,9 +114,9 @@ | ||
10 | rm -f $(DESTDIR)$(mdocdir)/$$f; \ | ||
11 | $(INSTALL_DATA) $$f-s $(DESTDIR)$(mdocdir)/$$f; \ | ||
12 | done | ||
13 | - -test -f $(DESTDIR)$(localtmacdir)/man.local || \ | ||
14 | + -test -f $(DESTDIR)$(tmacdir)/man.local || \ | ||
15 | $(INSTALL_DATA) $(srcdir)/man.local \ | ||
16 | - $(DESTDIR)$(localtmacdir)/man.local | ||
17 | + $(DESTDIR)$(tmacdir)/man.local | ||
18 | -test -f $(DESTDIR)$(localtmacdir)/mdoc.local || \ | ||
19 | $(INSTALL_DATA) mdoc.local-s $(DESTDIR)$(localtmacdir)/mdoc.local | ||
20 | |||
21 | @@ -158,9 +158,9 @@ | ||
22 | -rm -f $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac | ||
23 | -rm -f $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac | ||
24 | -rm -f $(DESTDIR)$(tmacdir)/www.tmac | ||
25 | - -if cmp -s $(DESTDIR)$(localtmacdir)/man.local \ | ||
26 | + -if cmp -s $(DESTDIR)$(tmacdir)/man.local \ | ||
27 | $(srcdir)/man.local; then \ | ||
28 | - rm -f $(DESTDIR)$(localtmacdir)/man.local; \ | ||
29 | + rm -f $(DESTDIR)$(tmacdir)/man.local; \ | ||
30 | fi | ||
31 | -if cmp -s $(DESTDIR)$(localtmacdir)/mdoc.local \ | ||
32 | $(srcdir)/mdoc.local; then \ | ||
diff --git a/meta/recipes-extended/groff/groff_1.18.1.4.bb b/meta/recipes-extended/groff/groff_1.18.1.4.bb new file mode 100644 index 0000000000..7fbce9bc4a --- /dev/null +++ b/meta/recipes-extended/groff/groff_1.18.1.4.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | SUMMARY = "GNU Troff software" | ||
2 | DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \ | ||
3 | formatting commands and produces formatted output." | ||
4 | SECTION = "console/utils" | ||
5 | HOMEPAGE = "ftp://ftp.gnu.org/gnu/groff/" | ||
6 | LICENSE = "GPLv2" | ||
7 | PR = "r1" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=e43fc16fccd8519fba405f0a0ff6e8a3" | ||
10 | |||
11 | SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \ | ||
12 | file://groff-1.18.1.4-remove-mom.patch;striplevel=1 \ | ||
13 | file://man-local.patch \ | ||
14 | file://mdoc-local.patch \ | ||
15 | file://groff-1.18.1.4-fix-bindir.patch \ | ||
16 | " | ||
17 | |||
18 | inherit autotools texinfo | ||
19 | |||
20 | EXTRA_OECONF="--without-x --prefix=${D} --exec-prefix=${D} --bindir=${D}${bindir} --datadir=${D}${datadir} --mandir=${D}${datadir}/man --infodir=${D}${datadir}info --with-appresdir=${D}${datadir}" | ||
21 | |||
22 | SRC_URI[md5sum] = "ceecb81533936d251ed015f40e5f7287" | ||
23 | SRC_URI[sha256sum] = "ff3c7c3b6cae5e8cc5062a144de5eff0022e8e970e1774529cc2d5dde46ce50d" | ||
24 | PARALLEL_MAKE = "" | ||
25 | |||
26 | do_configure (){ | ||
27 | oe_runconf | ||
28 | } | ||
29 | |||
30 | do_install_append() { | ||
31 | # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location | ||
32 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. | ||
33 | for i in afmtodit mmroff; do | ||
34 | if [ -f ${D}${bindir}/$i ]; then | ||
35 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i | ||
36 | fi | ||
37 | done | ||
38 | |||
39 | mkdir -p ${D}${sysconfdir}/groff | ||
40 | cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${sysconfdir}/groff/ | ||
41 | cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${datadir}/groff/${PV}/tmac/ | ||
42 | } | ||
43 | |||
44 | pkg_postinst_${PN}() { | ||
45 | ln -s tbl $D${bindir}/gtbl | ||
46 | echo "export GROFF_FONT_PATH=/usr/share/groff/${PV}/font" >> $D${sysconfdir}/profile | ||
47 | echo "export GROFF_TMAC_PATH=/usr/share/groff/${PV}/tmac" >> $D${sysconfdir}/profile | ||
48 | } | ||
49 | |||
diff --git a/meta/recipes-extended/groff/groff_1.22.2.bb b/meta/recipes-extended/groff/groff_1.22.2.bb new file mode 100644 index 0000000000..6c6926ff62 --- /dev/null +++ b/meta/recipes-extended/groff/groff_1.22.2.bb | |||
@@ -0,0 +1,68 @@ | |||
1 | SUMMARY = "GNU Troff software" | ||
2 | DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \ | ||
3 | formatting commands and produces formatted output." | ||
4 | SECTION = "base" | ||
5 | HOMEPAGE = "ftp://ftp.gnu.org/gnu/groff/" | ||
6 | LICENSE = "GPLv3" | ||
7 | PR = "r1" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
10 | |||
11 | SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \ | ||
12 | file://groff-1.22.2-correct-man.local-install-path.patch \ | ||
13 | " | ||
14 | |||
15 | SRC_URI[md5sum] = "9f4cd592a5efc7e36481d8d8d8af6d16" | ||
16 | SRC_URI[sha256sum] = "380864dac4772e0c0d7b1282d25d0c5fd7f63baf45c87c4657afed22a13d2076" | ||
17 | |||
18 | DEPENDS = "groff-native" | ||
19 | DEPENDS_class-native = "" | ||
20 | |||
21 | inherit autotools texinfo | ||
22 | |||
23 | EXTRA_OECONF = "--without-x" | ||
24 | PARALLEL_MAKE = "" | ||
25 | |||
26 | do_configure_prepend() { | ||
27 | if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then | ||
28 | sed -i \ | ||
29 | -e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \ | ||
30 | -e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \ | ||
31 | -e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \ | ||
32 | -e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \ | ||
33 | ${S}/contrib/*/Makefile.sub \ | ||
34 | ${S}/doc/Makefile.in \ | ||
35 | ${S}/doc/Makefile.sub | ||
36 | fi | ||
37 | } | ||
38 | |||
39 | do_configure_append() { | ||
40 | # generate gnulib configure script | ||
41 | olddir=`pwd` | ||
42 | cd ${S}/src/libs/gnulib/ | ||
43 | ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || bbfatal "autoreconf execution failed." | ||
44 | cd ${olddir} | ||
45 | } | ||
46 | |||
47 | do_install_append() { | ||
48 | # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location | ||
49 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. | ||
50 | for i in afmtodit mmroff gropdf pdfmom; do | ||
51 | if [ -f ${D}${bindir}/$i ]; then | ||
52 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i | ||
53 | fi | ||
54 | done | ||
55 | } | ||
56 | |||
57 | do_install_append_class-native() { | ||
58 | create_cmdline_wrapper ${D}/${bindir}/groff \ | ||
59 | -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \ | ||
60 | -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac | ||
61 | } | ||
62 | |||
63 | FILES_${PN} += "${libdir}/${BPN}/site-tmac \ | ||
64 | ${libdir}/${BPN}/groffer/" | ||
65 | |||
66 | RDEPENDS_${PN} = " sed" | ||
67 | |||
68 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch new file mode 100644 index 0000000000..d9e8d212bf --- /dev/null +++ b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | gzip uses gnulib, whose header conflict with glibc. This patch rename some function to avoid conflict. | ||
2 | |||
3 | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> | ||
4 | |||
5 | Upstream-Status: Inappropriate [licensing] | ||
6 | |||
7 | Index: gzip-1.3.12/gzip.c | ||
8 | =================================================================== | ||
9 | --- gzip-1.3.12.orig/gzip.c 2010-08-13 10:29:38.000000000 +0800 | ||
10 | +++ gzip-1.3.12/gzip.c 2010-08-13 10:29:44.000000000 +0800 | ||
11 | @@ -1637,7 +1637,7 @@ | ||
12 | } | ||
13 | } | ||
14 | |||
15 | - if (futimens (ofd, ofname, timespec) != 0) | ||
16 | + if (futimens_gnulib (ofd, ofname, timespec) != 0) | ||
17 | { | ||
18 | int e = errno; | ||
19 | WARN ((stderr, "%s: ", program_name)); | ||
20 | Index: gzip-1.3.12/lib/utimens.c | ||
21 | =================================================================== | ||
22 | --- gzip-1.3.12.orig/lib/utimens.c 2010-08-13 10:33:47.000000000 +0800 | ||
23 | +++ gzip-1.3.12/lib/utimens.c 2010-08-13 10:34:02.000000000 +0800 | ||
24 | @@ -75,7 +75,7 @@ | ||
25 | Return 0 on success, -1 (setting errno) on failure. */ | ||
26 | |||
27 | int | ||
28 | -futimens (int fd ATTRIBUTE_UNUSED, | ||
29 | +futimens_gnulib (int fd ATTRIBUTE_UNUSED, | ||
30 | char const *file, struct timespec const timespec[2]) | ||
31 | { | ||
32 | /* Some Linux-based NFS clients are buggy, and mishandle time stamps | ||
33 | @@ -185,5 +185,5 @@ | ||
34 | int | ||
35 | utimens (char const *file, struct timespec const timespec[2]) | ||
36 | { | ||
37 | - return futimens (-1, file, timespec); | ||
38 | + return futimens_gnulib (-1, file, timespec); | ||
39 | } | ||
40 | Index: gzip-1.3.12/lib/utimens.h | ||
41 | =================================================================== | ||
42 | --- gzip-1.3.12.orig/lib/utimens.h 2010-08-13 10:14:57.000000000 +0800 | ||
43 | +++ gzip-1.3.12/lib/utimens.h 2010-08-13 10:21:45.000000000 +0800 | ||
44 | @@ -1,3 +1,3 @@ | ||
45 | #include <time.h> | ||
46 | -int futimens (int, char const *, struct timespec const [2]); | ||
47 | +int futimens_gnulib (int, char const *, struct timespec const [2]); | ||
48 | int utimens (char const *, struct timespec const [2]); | ||
diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch new file mode 100644 index 0000000000..6b2f69870e --- /dev/null +++ b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | remove AC_USE_SYSTEM_EXTENSIONS to fix the autoconf error "AC_REQUIRE: circular | ||
2 | dependency of AC_GNU_SOURCE" | ||
3 | |||
4 | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> | ||
5 | |||
6 | Upstream-Status: Inappropriate [licensing] | ||
7 | |||
8 | Index: gzip-1.3.12/m4/extensions.m4 | ||
9 | =================================================================== | ||
10 | --- gzip-1.3.12.orig/m4/extensions.m4 2010-08-16 14:18:16.000000000 +0800 | ||
11 | +++ gzip-1.3.12/m4/extensions.m4 2010-08-16 14:21:54.000000000 +0800 | ||
12 | @@ -12,44 +12,6 @@ | ||
13 | # enough in this area it's likely we'll need to redefine | ||
14 | # AC_USE_SYSTEM_EXTENSIONS for quite some time. | ||
15 | |||
16 | -# AC_USE_SYSTEM_EXTENSIONS | ||
17 | -# ------------------------ | ||
18 | -# Enable extensions on systems that normally disable them, | ||
19 | -# typically due to standards-conformance issues. | ||
20 | -AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
21 | -[ | ||
22 | - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
23 | - AC_BEFORE([$0], [AC_RUN_IFELSE]) | ||
24 | - | ||
25 | - AC_REQUIRE([AC_GNU_SOURCE]) | ||
26 | - AC_REQUIRE([AC_AIX]) | ||
27 | - AC_REQUIRE([AC_MINIX]) | ||
28 | - | ||
29 | - AH_VERBATIM([__EXTENSIONS__], | ||
30 | -[/* Enable extensions on Solaris. */ | ||
31 | -#ifndef __EXTENSIONS__ | ||
32 | -# undef __EXTENSIONS__ | ||
33 | -#endif | ||
34 | -#ifndef _POSIX_PTHREAD_SEMANTICS | ||
35 | -# undef _POSIX_PTHREAD_SEMANTICS | ||
36 | -#endif | ||
37 | -#ifndef _TANDEM_SOURCE | ||
38 | -# undef _TANDEM_SOURCE | ||
39 | -#endif]) | ||
40 | - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], | ||
41 | - [ac_cv_safe_to_define___extensions__], | ||
42 | - [AC_COMPILE_IFELSE( | ||
43 | - [AC_LANG_PROGRAM([ | ||
44 | -# define __EXTENSIONS__ 1 | ||
45 | - AC_INCLUDES_DEFAULT])], | ||
46 | - [ac_cv_safe_to_define___extensions__=yes], | ||
47 | - [ac_cv_safe_to_define___extensions__=no])]) | ||
48 | - test $ac_cv_safe_to_define___extensions__ = yes && | ||
49 | - AC_DEFINE([__EXTENSIONS__]) | ||
50 | - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
51 | - AC_DEFINE([_TANDEM_SOURCE]) | ||
52 | -]) | ||
53 | - | ||
54 | # gl_USE_SYSTEM_EXTENSIONS | ||
55 | # ------------------------ | ||
56 | # Enable extensions on systems that normally disable them, | ||
diff --git a/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch new file mode 100644 index 0000000000..d4325779ce --- /dev/null +++ b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | fix MakeMaker issues with using wrong SHELL/GREP | ||
2 | |||
3 | A set of substitution is being processed to all target scripts with sed by | ||
4 | replacing some key words with the detected values at configure time, this | ||
5 | is exactly not compliant with cross compling, and will cause missing path | ||
6 | errors at run time like: | ||
7 | "/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory" | ||
8 | |||
9 | Fixed by removing unneeded substitution and using real runtime paths | ||
10 | instead. | ||
11 | |||
12 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Index: gzip-1.3.12/Makefile.am | ||
17 | =================================================================== | ||
18 | diff -urpN a/Makefile.am b/Makefile.am | ||
19 | --- a/Makefile.am 2013-11-30 10:06:09.402234871 +0800 | ||
20 | +++ b/Makefile.am 2013-11-30 10:13:42.952236025 +0800 | ||
21 | @@ -81,9 +81,8 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS) | ||
22 | SUFFIXES = .in | ||
23 | .in: | ||
24 | $(AM_V_GEN)sed \ | ||
25 | - -e 's|/bin/sh|$(SHELL)|g' \ | ||
26 | -e 's|[@]bindir@|'\''$(bindir)'\''|g' \ | ||
27 | - -e 's|[@]GREP@|$(GREP)|g' \ | ||
28 | + -e 's|[@]GREP@|$(base_bindir)/grep|g' \ | ||
29 | -e 's|[@]VERSION@|$(VERSION)|g' \ | ||
30 | $(srcdir)/$@.in >$@-t \ | ||
31 | && chmod a+x $@-t \ | ||
diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc new file mode 100644 index 0000000000..b90856e796 --- /dev/null +++ b/meta/recipes-extended/gzip/gzip.inc | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "Standard GNU compressor" | ||
2 | DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \ | ||
3 | project. Mark Adler wrote the decompression part" | ||
4 | HOMEPAGE = "http://www.gnu.org/software/gzip/" | ||
5 | SECTION = "console/utils" | ||
6 | # change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12 | ||
7 | LICENSE = "GPLv3+" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | ||
9 | file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e" | ||
10 | |||
11 | SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz" | ||
12 | SRC_URI_append_class-target = " file://wrong-path-fix.patch" | ||
13 | |||
14 | inherit autotools texinfo | ||
15 | |||
16 | EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep" | ||
17 | |||
18 | do_install_append () { | ||
19 | # Rename and move files into /bin (FHS), which is typical place for gzip | ||
20 | install -d ${D}${base_bindir} | ||
21 | mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip | ||
22 | mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip | ||
23 | mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat | ||
24 | mv ${D}${bindir}/uncompress ${D}${base_bindir}/uncompress | ||
25 | } | ||
26 | |||
27 | inherit update-alternatives | ||
28 | |||
29 | ALTERNATIVE_PRIORITY = "100" | ||
30 | ALTERNATIVE_${PN} = "gunzip gzip zcat" | ||
31 | ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" | ||
32 | ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" | ||
33 | ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat" | ||
34 | |||
35 | export CONFIG_SHELL="/bin/sh" | ||
diff --git a/meta/recipes-extended/gzip/gzip_1.3.12.bb b/meta/recipes-extended/gzip/gzip_1.3.12.bb new file mode 100644 index 0000000000..45a33ffdd1 --- /dev/null +++ b/meta/recipes-extended/gzip/gzip_1.3.12.bb | |||
@@ -0,0 +1,40 @@ | |||
1 | SUMMARY = "Standard GNU compressor" | ||
2 | DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \ | ||
3 | project. Mark Adler wrote the decompression part" | ||
4 | HOMEPAGE = "http://www.gnu.org/software/gzip" | ||
5 | SECTION = "base" | ||
6 | |||
7 | LICENSE = "GPLv2+" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
9 | file://gzip.h;endline=22;md5=c0934ad1900d927f86556153d4c76d23 \ | ||
10 | file://lzw.h;endline=19;md5=c273e09a02edd9801cc74d39683049e9 " | ||
11 | |||
12 | SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz \ | ||
13 | file://m4-extensions-fix.patch \ | ||
14 | file://dup-def-fix.patch" | ||
15 | |||
16 | SRC_URI[md5sum] = "b5bac2d21840ae077e0217bc5e4845b1" | ||
17 | SRC_URI[sha256sum] = "3f565be05f7f3d1aff117c030eb7c738300510b7d098cedea796ca8e4cd587af" | ||
18 | |||
19 | PR = "r2" | ||
20 | |||
21 | inherit autotools | ||
22 | |||
23 | do_install_append () { | ||
24 | # move files into /bin (FHS) | ||
25 | install -d ${D}${base_bindir} | ||
26 | mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip | ||
27 | mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip | ||
28 | mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat | ||
29 | mv ${D}${bindir}/uncompress ${D}${base_bindir}/uncompress | ||
30 | } | ||
31 | |||
32 | inherit update-alternatives | ||
33 | |||
34 | ALTERNATIVE_${PN} = "gzip gunzip zcat" | ||
35 | ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" | ||
36 | ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" | ||
37 | ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat" | ||
38 | ALTERNATIVE_PRIORITY = "100" | ||
39 | |||
40 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/gzip/gzip_1.6.bb b/meta/recipes-extended/gzip/gzip_1.6.bb new file mode 100644 index 0000000000..9c728dff5a --- /dev/null +++ b/meta/recipes-extended/gzip/gzip_1.6.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | require gzip.inc | ||
2 | |||
3 | PROVIDES_append_class-native = " gzip-replacement-native" | ||
4 | NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" | ||
5 | |||
6 | BBCLASSEXTEND = "native" | ||
7 | |||
8 | SRC_URI[md5sum] = "38603cb2843bf5681ff41aab3bcd6a20" | ||
9 | SRC_URI[sha256sum] = "97eb83b763d9e5ad35f351fe5517e6b71521d7aac7acf3e3cacdb6b1496d8f7e" | ||
diff --git a/meta/recipes-extended/hdparm/hdparm_9.43.bb b/meta/recipes-extended/hdparm/hdparm_9.43.bb new file mode 100644 index 0000000000..805f76a6b3 --- /dev/null +++ b/meta/recipes-extended/hdparm/hdparm_9.43.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters" | ||
2 | DESCRIPTION = "hdparm is a Linux shell utility for viewing \ | ||
3 | and manipulating various IDE drive and driver parameters." | ||
4 | SECTION = "console/utils" | ||
5 | LICENSE = "BSD" | ||
6 | LICENSE_wiper = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \ | ||
8 | file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \ | ||
9 | file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \ | ||
10 | file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09" | ||
11 | |||
12 | |||
13 | PACKAGES =+ "wiper" | ||
14 | |||
15 | FILES_wiper = "${bindir}/wiper.sh" | ||
16 | |||
17 | RDEPENDS_wiper = "bash gawk stat" | ||
18 | |||
19 | SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz " | ||
20 | |||
21 | SRC_URI[md5sum] = "f73233be118d86c779a8463d8b6a3cdb" | ||
22 | SRC_URI[sha256sum] = "2bbe92274971182192901ab220e94bd2e4896f924fa6b225d0cffd7d8c16b52a" | ||
23 | |||
24 | EXTRA_OEMAKE += 'STRIP="echo"' | ||
25 | |||
26 | inherit update-alternatives | ||
27 | |||
28 | ALTERNATIVE_${PN} = "hdparm" | ||
29 | ALTERNATIVE_LINK_NAME[hdparm] = "${base_sbindir}/hdparm" | ||
30 | ALTERNATIVE_PRIORITY = "100" | ||
31 | |||
32 | do_install () { | ||
33 | install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir} | ||
34 | oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install | ||
35 | cp ${S}/wiper/wiper.sh ${D}/${bindir} | ||
36 | } | ||
diff --git a/meta/recipes-extended/images/core-image-full-cmdline.bb b/meta/recipes-extended/images/core-image-full-cmdline.bb new file mode 100644 index 0000000000..4d69073d9d --- /dev/null +++ b/meta/recipes-extended/images/core-image-full-cmdline.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | DESCRIPTION = "A console-only image with more full-featured Linux system \ | ||
2 | functionality installed." | ||
3 | |||
4 | IMAGE_FEATURES += "splash ssh-server-openssh" | ||
5 | |||
6 | IMAGE_INSTALL = "\ | ||
7 | packagegroup-core-boot \ | ||
8 | packagegroup-core-full-cmdline \ | ||
9 | ${CORE_IMAGE_EXTRA_INSTALL} \ | ||
10 | " | ||
11 | |||
12 | inherit core-image | ||
diff --git a/meta/recipes-extended/images/core-image-lsb-dev.bb b/meta/recipes-extended/images/core-image-lsb-dev.bb new file mode 100644 index 0000000000..d2dc9e2b53 --- /dev/null +++ b/meta/recipes-extended/images/core-image-lsb-dev.bb | |||
@@ -0,0 +1,7 @@ | |||
1 | require core-image-lsb.bb | ||
2 | |||
3 | DESCRIPTION = "Basic image without X support suitable for development work. It \ | ||
4 | can be used for customization and implementations that conform to Linux \ | ||
5 | Standard Base (LSB)." | ||
6 | |||
7 | IMAGE_FEATURES += "dev-pkgs" | ||
diff --git a/meta/recipes-extended/images/core-image-lsb-sdk.bb b/meta/recipes-extended/images/core-image-lsb-sdk.bb new file mode 100644 index 0000000000..c77425fc39 --- /dev/null +++ b/meta/recipes-extended/images/core-image-lsb-sdk.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require core-image-lsb.bb | ||
2 | |||
3 | DESCRIPTION = "Basic image without X support suitable for Linux Standard Base \ | ||
4 | (LSB) implementations. It includes the full meta-toolchain, plus development \ | ||
5 | headers and libraries to form a standalone SDK." | ||
6 | |||
7 | IMAGE_FEATURES += "tools-sdk dev-pkgs tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks" | ||
8 | |||
9 | IMAGE_INSTALL += "kernel-dev" | ||
10 | |||
diff --git a/meta/recipes-extended/images/core-image-lsb.bb b/meta/recipes-extended/images/core-image-lsb.bb new file mode 100644 index 0000000000..ab61c6e6df --- /dev/null +++ b/meta/recipes-extended/images/core-image-lsb.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | DESCRIPTION = "An image containing packages that are required to conform \ | ||
2 | to the Linux Standard Base (LSB) specification." | ||
3 | |||
4 | IMAGE_FEATURES += "splash ssh-server-openssh hwcodecs package-management" | ||
5 | |||
6 | IMAGE_INSTALL = "\ | ||
7 | ${CORE_IMAGE_BASE_INSTALL} \ | ||
8 | packagegroup-core-full-cmdline \ | ||
9 | packagegroup-core-lsb \ | ||
10 | " | ||
11 | |||
12 | inherit core-image distro_features_check | ||
13 | |||
14 | REQUIRED_DISTRO_FEATURES = "pam" | ||
diff --git a/meta/recipes-extended/images/core-image-testmaster-initramfs.bb b/meta/recipes-extended/images/core-image-testmaster-initramfs.bb new file mode 100644 index 0000000000..563260d3b8 --- /dev/null +++ b/meta/recipes-extended/images/core-image-testmaster-initramfs.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | DESCRIPTION = "Small image capable of booting a device with custom install scripts, \ | ||
2 | adding a second rootfs, used for testing." | ||
3 | |||
4 | # use -testfs live-install scripts | ||
5 | PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install-testfs initramfs-live-install-efi-testfs busybox udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}" | ||
6 | |||
7 | # Do not pollute the initrd image with rootfs features | ||
8 | IMAGE_FEATURES = "" | ||
9 | |||
10 | export IMAGE_BASENAME = "core-image-testmaster-initramfs" | ||
11 | IMAGE_LINGUAS = "" | ||
12 | |||
13 | LICENSE = "MIT" | ||
14 | |||
15 | IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" | ||
16 | inherit core-image | ||
17 | |||
18 | IMAGE_ROOTFS_SIZE = "8192" | ||
19 | BAD_RECOMMENDATIONS += "busybox-syslog" | ||
diff --git a/meta/recipes-extended/images/core-image-testmaster.bb b/meta/recipes-extended/images/core-image-testmaster.bb new file mode 100644 index 0000000000..78295c5f0a --- /dev/null +++ b/meta/recipes-extended/images/core-image-testmaster.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | DESCRIPTION = "A master image to be deployed on a target useful for testing other images" | ||
2 | |||
3 | IMAGE_FEATURES += "ssh-server-openssh package-management" | ||
4 | |||
5 | inherit core-image | ||
6 | |||
7 | # the deploy code requires bash and | ||
8 | # normal linux utilities not busybox ones | ||
9 | IMAGE_INSTALL += "\ | ||
10 | bash coreutils util-linux tar gzip bzip2 kmod \ | ||
11 | python-modules python-misc \ | ||
12 | e2fsprogs e2fsprogs-mke2fs parted \ | ||
13 | " | ||
14 | # we need a particular initramfs for live images | ||
15 | # that pulls custom install scripts which take | ||
16 | # care of partitioning for us | ||
17 | INITRD_IMAGE = "core-image-testmaster-initramfs" | ||
18 | |||
diff --git a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch new file mode 100644 index 0000000000..ab609e27e3 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 5c47cf5061b852c02178f01e23690bfe38a99d93 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 17 Mar 2013 11:21:35 -0700 | ||
4 | Subject: [PATCH] configure: Add option to enable/disable libnfnetlink | ||
5 | |||
6 | This changes the configure behaviour from autodetecting | ||
7 | for libnfnetlink to having an option to disable it explicitly | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | --- | ||
13 | configure.ac | 11 ++++++++--- | ||
14 | 1 file changed, 8 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/configure.ac b/configure.ac | ||
17 | index ba616ab..ce2d315 100644 | ||
18 | --- a/configure.ac | ||
19 | +++ b/configure.ac | ||
20 | @@ -53,6 +53,9 @@ AC_ARG_ENABLE([libipq], | ||
21 | AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], | ||
22 | [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]), | ||
23 | [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig']) | ||
24 | +AC_ARG_ENABLE([libnfnetlink], | ||
25 | + AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]), | ||
26 | + [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"]) | ||
27 | |||
28 | libiptc_LDFLAGS2=""; | ||
29 | AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed], | ||
30 | @@ -89,9 +92,11 @@ AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"]) | ||
31 | AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"]) | ||
32 | AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"]) | ||
33 | |||
34 | -PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0], | ||
35 | - [nfnetlink=1], [nfnetlink=0]) | ||
36 | -AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1]) | ||
37 | +AS_IF([test "x$enable_libnfnetlink" = "xyes"], [ | ||
38 | + PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0]) | ||
39 | + ]) | ||
40 | + | ||
41 | +AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "x$enable_libnfnetlink" = "xyes"]) | ||
42 | |||
43 | regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ | ||
44 | -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ | ||
45 | -- | ||
46 | 1.7.9.5 | ||
47 | |||
diff --git a/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch b/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch new file mode 100644 index 0000000000..24ee29e2d1 --- /dev/null +++ b/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 19593491f43b70c1a71c3b9b8f4ff4fd14500014 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | Date: Fri, 23 Mar 2012 14:27:20 -0400 | ||
4 | Subject: [PATCH] types.h: add defines that are required for if_packet.h | ||
5 | |||
6 | The iptables local linux/types.h overrides the kernel/sysroot | ||
7 | types.h. As such, we need to provide some defines that are required | ||
8 | to build against 3.2+ kernel headers. | ||
9 | |||
10 | ifndef protection is provided for the defines to ensure that | ||
11 | configuration that already have these defines are still buildable. | ||
12 | |||
13 | This commit is temporary until a new version of iptables can be | ||
14 | used that contains the defines. | ||
15 | |||
16 | This is similar to the commit in the iptables git repository: | ||
17 | |||
18 | https://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=dbe77cc974cee656eae37e75039dd1a410a4535b | ||
19 | |||
20 | Upstream-Status: Backport | ||
21 | |||
22 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
23 | --- | ||
24 | include/linux/types.h | 10 ++++++++++ | ||
25 | 1 files changed, 10 insertions(+), 0 deletions(-) | ||
26 | |||
27 | diff --git a/include/linux/types.h b/include/linux/types.h | ||
28 | index 8b483c8..ebf6432 100644 | ||
29 | --- a/include/linux/types.h | ||
30 | +++ b/include/linux/types.h | ||
31 | @@ -34,5 +34,15 @@ typedef __u64 __bitwise __be64; | ||
32 | typedef __u16 __bitwise __sum16; | ||
33 | typedef __u32 __bitwise __wsum; | ||
34 | |||
35 | +#ifndef __aligned_u64 | ||
36 | +#define __aligned_u64 __u64 __attribute__((aligned(8))) | ||
37 | +#endif | ||
38 | +#ifndef __aligned_be64 | ||
39 | +#define __aligned_be64 __be64 __attribute__((aligned(8))) | ||
40 | +#endif | ||
41 | +#ifndef __aligned_le64 | ||
42 | +#define __aligned_le64 __le64 __attribute__((aligned(8))) | ||
43 | +#endif | ||
44 | + | ||
45 | #endif /* __ASSEMBLY__ */ | ||
46 | #endif /* _LINUX_TYPES_H */ | ||
47 | -- | ||
48 | 1.7.0.4 | ||
49 | |||
diff --git a/meta/recipes-extended/iptables/iptables_1.4.21.bb b/meta/recipes-extended/iptables/iptables_1.4.21.bb new file mode 100644 index 0000000000..dc17d575dd --- /dev/null +++ b/meta/recipes-extended/iptables/iptables_1.4.21.bb | |||
@@ -0,0 +1,46 @@ | |||
1 | SUMMARY = "Tools for managing kernel packet filtering capabilities" | ||
2 | DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \ | ||
3 | filtering code in Linux." | ||
4 | HOMEPAGE = "http://www.netfilter.org/" | ||
5 | BUGTRACKER = "http://bugzilla.netfilter.org/" | ||
6 | LICENSE = "GPLv2+" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\ | ||
8 | file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc" | ||
9 | |||
10 | RRECOMMENDS_${PN} = "kernel-module-x-tables \ | ||
11 | kernel-module-ip-tables \ | ||
12 | kernel-module-iptable-filter \ | ||
13 | kernel-module-iptable-nat \ | ||
14 | kernel-module-nf-defrag-ipv4 \ | ||
15 | kernel-module-nf-conntrack \ | ||
16 | kernel-module-nf-conntrack-ipv4 \ | ||
17 | kernel-module-nf-nat \ | ||
18 | kernel-module-ipt-masquerade" | ||
19 | FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables" | ||
20 | FILES_${PN}-dbg =+ "${libdir}/xtables/.debug" | ||
21 | |||
22 | SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ | ||
23 | file://types.h-add-defines-that-are-required-for-if_packet.patch \ | ||
24 | file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ | ||
25 | " | ||
26 | |||
27 | SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0" | ||
28 | SRC_URI[sha256sum] = "52004c68021da9a599feed27f65defcfb22128f7da2c0531c0f75de0f479d3e0" | ||
29 | |||
30 | inherit autotools pkgconfig | ||
31 | |||
32 | EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \ | ||
33 | " | ||
34 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \ | ||
35 | " | ||
36 | |||
37 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
38 | |||
39 | # libnfnetlink recipe is in meta-networking layer | ||
40 | PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink" | ||
41 | |||
42 | do_configure_prepend() { | ||
43 | # Remove some libtool m4 files | ||
44 | # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive. | ||
45 | rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 | ||
46 | } | ||
diff --git a/meta/recipes-extended/iputils/files/debian/targets.diff b/meta/recipes-extended/iputils/files/debian/targets.diff new file mode 100644 index 0000000000..2cb5576c62 --- /dev/null +++ b/meta/recipes-extended/iputils/files/debian/targets.diff | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Inappropriate [disable feature] | ||
2 | |||
3 | Index: iputils-s20121221/Makefile | ||
4 | =================================================================== | ||
5 | --- iputils-s20121221.orig/Makefile | ||
6 | +++ iputils-s20121221/Makefile | ||
7 | @@ -106,7 +106,7 @@ endif | ||
8 | endif | ||
9 | |||
10 | # ------------------------------------- | ||
11 | -IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd | ||
12 | +IPV4_TARGETS=tracepath ping clockdiff arping | ||
13 | IPV6_TARGETS=tracepath6 traceroute6 ping6 | ||
14 | TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS) | ||
15 | |||
diff --git a/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff new file mode 100644 index 0000000000..d3b18868c0 --- /dev/null +++ b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-Status: Pending [from other distro Debian] | ||
2 | |||
3 | Index: iputils-s20121221/tracepath.c | ||
4 | =================================================================== | ||
5 | --- iputils-s20121221.orig/tracepath.c | ||
6 | +++ iputils-s20121221/tracepath.c | ||
7 | @@ -370,9 +370,9 @@ main(int argc, char **argv) | ||
8 | } | ||
9 | #endif | ||
10 | |||
11 | - he = gethostbyname(p); | ||
12 | + he = gethostbyname2(argv[0], AF_INET); | ||
13 | if (he == NULL) { | ||
14 | - herror("gethostbyname"); | ||
15 | + herror("gethostbyname2"); | ||
16 | exit(1); | ||
17 | } | ||
18 | |||
19 | Index: iputils-s20121221/ping.c | ||
20 | =================================================================== | ||
21 | --- iputils-s20121221.orig/ping.c | ||
22 | +++ iputils-s20121221/ping.c | ||
23 | @@ -279,7 +279,7 @@ main(int argc, char **argv) | ||
24 | #else | ||
25 | idn = target; | ||
26 | #endif | ||
27 | - hp = gethostbyname(idn); | ||
28 | + hp = gethostbyname2(idn, AF_INET); | ||
29 | if (!hp) { | ||
30 | fprintf(stderr, "ping: unknown host %s\n", target); | ||
31 | exit(2); | ||
diff --git a/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch b/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch new file mode 100644 index 0000000000..b9cd82ee88 --- /dev/null +++ b/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001 | ||
4 | From: Arjan van de Ven <arjanvandeven@gmail.com> | ||
5 | Date: Wed, 16 Jan 2013 03:12:15 +0900 | ||
6 | Subject: [PATCH] ping6: Fix build command line argument with gnutls. | ||
7 | |||
8 | The ping6 command can use either openssl or gnutls... | ||
9 | and the Makefile has a bunch of setup for defining which of the two to use. | ||
10 | |||
11 | Unfortunately, the final -D define on the commandline to enable gnutls | ||
12 | inside the ping6.c file didn't actually make it onto the gcc | ||
13 | commandline. | ||
14 | This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap. | ||
15 | |||
16 | Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com> | ||
17 | Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | ||
18 | --- | ||
19 | Makefile | 2 +- | ||
20 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
21 | |||
22 | diff --git a/Makefile b/Makefile | ||
23 | index c62d9df..89249f5 100644 | ||
24 | --- a/Makefile | ||
25 | +++ b/Makefile | ||
26 | @@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP) | ||
27 | DEF_ping_common = $(DEF_CAP) $(DEF_IDN) | ||
28 | DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) | ||
29 | LIB_ping = $(LIB_CAP) $(LIB_IDN) | ||
30 | -DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) | ||
31 | +DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO) | ||
32 | LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO) | ||
33 | |||
34 | ping: ping_common.o | ||
35 | -- | ||
36 | 1.7.2.5 | ||
37 | |||
diff --git a/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch new file mode 100644 index 0000000000..92bf946f2a --- /dev/null +++ b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Fix nsgmls path issue | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> | ||
6 | |||
7 | Index: iputils-s20101006/doc/Makefile | ||
8 | =================================================================== | ||
9 | --- iputils-s20101006.orig/doc/Makefile 2011-09-13 20:42:27.000000000 +0800 | ||
10 | +++ iputils-s20101006/doc/Makefile 2011-09-13 21:01:52.000000000 +0800 | ||
11 | @@ -27,10 +27,15 @@ | ||
12 | # docbook2man produces utterly ugly output and I did not find | ||
13 | # any way to customize this but hacking backend perl script a little. | ||
14 | # Well, hence... | ||
15 | +# nsgmls seems append path to search directory according to the sysid path. | ||
16 | +# e.g. if input ../index.db, it would search $search_directory/../ rather than | ||
17 | +# $search_directory, which leads searching failure. Fixing nsgmls probably | ||
18 | +# introduce some side effects, so use this ugly hack: running nsgmls in current | ||
19 | +# directory, and running docbook2man in tmp directory. | ||
20 | |||
21 | $(MANFILES): index.db | ||
22 | @-mkdir tmp.db2man | ||
23 | - @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ .. | ||
24 | + @set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ; mv $@ .. | ||
25 | @-rm -rf tmp.db2man | ||
26 | |||
27 | clean: | ||
diff --git a/meta/recipes-extended/iputils/iputils_s20121221.bb b/meta/recipes-extended/iputils/iputils_s20121221.bb new file mode 100644 index 0000000000..46f8903222 --- /dev/null +++ b/meta/recipes-extended/iputils/iputils_s20121221.bb | |||
@@ -0,0 +1,69 @@ | |||
1 | SUMMARY = "Network monitoring tools" | ||
2 | DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ | ||
3 | tracepath, tracepath6, ping, ping6 and arping." | ||
4 | HOMEPAGE = "http://www.skbuff.net/iputils" | ||
5 | SECTION = "console/network" | ||
6 | |||
7 | LICENSE = "BSD & GPLv2+" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \ | ||
10 | file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \ | ||
11 | file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \ | ||
12 | file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 " | ||
13 | |||
14 | DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap" | ||
15 | |||
16 | |||
17 | SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \ | ||
18 | file://debian/use_gethostbyname2.diff \ | ||
19 | file://debian/targets.diff \ | ||
20 | file://nsgmls-path-fix.patch \ | ||
21 | file://fix-build-command-line-argument-with-gnutls.patch \ | ||
22 | " | ||
23 | |||
24 | SRC_URI[md5sum] = "6072aef64205720dd1893b375e184171" | ||
25 | SRC_URI[sha256sum] = "450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f" | ||
26 | |||
27 | do_compile () { | ||
28 | oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man | ||
29 | } | ||
30 | |||
31 | do_install () { | ||
32 | install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8 | ||
33 | # SUID root programs | ||
34 | install -m 4555 ping ${D}${base_bindir}/ping | ||
35 | install -m 4555 ping6 ${D}${base_bindir}/ping6 | ||
36 | install -m 4555 traceroute6 ${D}${base_bindir}/ | ||
37 | # Other programgs | ||
38 | for i in arping tracepath tracepath6; do | ||
39 | install -m 0755 $i ${D}${base_bindir}/ | ||
40 | done | ||
41 | # Manual pages for things we build packages for | ||
42 | for i in tracepath.8 traceroute6.8 ping.8 arping.8; do | ||
43 | install -m 0644 doc/$i ${D}${mandir}/man8/ || true | ||
44 | done | ||
45 | } | ||
46 | |||
47 | inherit update-alternatives | ||
48 | |||
49 | ALTERNATIVE_PRIORITY = "100" | ||
50 | |||
51 | ALTERNATIVE_${PN}-ping = "ping" | ||
52 | ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" | ||
53 | |||
54 | ALTERNATIVE_${PN}-ping6 = "ping6" | ||
55 | ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" | ||
56 | |||
57 | PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6" | ||
58 | |||
59 | ALLOW_EMPTY_${PN} = "1" | ||
60 | RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6" | ||
61 | |||
62 | FILES_${PN} = "" | ||
63 | FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" | ||
64 | FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}" | ||
65 | FILES_${PN}-arping = "${base_bindir}/arping" | ||
66 | FILES_${PN}-tracepath = "${base_bindir}/tracepath" | ||
67 | FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6" | ||
68 | FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" | ||
69 | FILES_${PN}-doc = "${mandir}/man8" | ||
diff --git a/meta/recipes-extended/less/less_466.bb b/meta/recipes-extended/less/less_466.bb new file mode 100644 index 0000000000..c5b8a3f7b6 --- /dev/null +++ b/meta/recipes-extended/less/less_466.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | SUMMARY = "Text file viewer similar to more" | ||
2 | DESCRIPTION = "Less is a program similar to more, i.e. a terminal \ | ||
3 | based program for viewing text files and the output from other \ | ||
4 | programs. Less offers many features beyond those that more does." | ||
5 | HOMEPAGE = "http://www.greenwoodsoftware.com/" | ||
6 | SECTION = "console/utils" | ||
7 | |||
8 | # (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less | ||
9 | # Including email author giving permissing to use BSD | ||
10 | # | ||
11 | # From: Mark Nudelman <markn@greenwoodsoftware.com> | ||
12 | # To: Elizabeth Flanagan <elizabeth.flanagan@intel.com | ||
13 | # Date: 12/19/11 | ||
14 | # | ||
15 | # Hi Elizabeth, | ||
16 | # Using a generic BSD license for less is fine with me. | ||
17 | # Thanks, | ||
18 | # | ||
19 | # --Mark | ||
20 | # | ||
21 | |||
22 | LICENSE = "GPLv3+ | BSD-2-Clause" | ||
23 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | ||
24 | file://LICENSE;md5=866cc220f330b04ae4661fc3cdfedea7" | ||
25 | DEPENDS = "ncurses" | ||
26 | |||
27 | SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz" | ||
28 | |||
29 | SRC_URI[md5sum] = "7bc444bdb751bcf80ed0c39c17b4fcf4" | ||
30 | SRC_URI[sha256sum] = "8305f5a06764ff094ed3428f94f29059541e2483eae201991f90823da6557212" | ||
31 | |||
32 | inherit autotools update-alternatives | ||
33 | |||
34 | do_install () { | ||
35 | oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install | ||
36 | } | ||
37 | |||
38 | ALTERNATIVE_${PN} = "less" | ||
39 | ALTERNATIVE_PRIORITY = "100" | ||
diff --git a/meta/recipes-extended/libaio/libaio/00_arches.patch b/meta/recipes-extended/libaio/libaio/00_arches.patch new file mode 100644 index 0000000000..91f4588cc5 --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/00_arches.patch | |||
@@ -0,0 +1,779 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | from openembedded, added by Qing He <qing.he@intel.com> | ||
4 | |||
5 | Index: libaio-0.3.109/src/syscall-m68k.h | ||
6 | =================================================================== | ||
7 | --- /dev/null | ||
8 | +++ libaio-0.3.109/src/syscall-m68k.h | ||
9 | @@ -0,0 +1,78 @@ | ||
10 | +#define __NR_io_setup 241 | ||
11 | +#define __NR_io_destroy 242 | ||
12 | +#define __NR_io_getevents 243 | ||
13 | +#define __NR_io_submit 244 | ||
14 | +#define __NR_io_cancel 245 | ||
15 | + | ||
16 | +#define io_syscall1(type,fname,sname,atype,a) \ | ||
17 | +type fname(atype a) \ | ||
18 | +{ \ | ||
19 | +register long __res __asm__ ("%d0") = __NR_##sname; \ | ||
20 | +register long __a __asm__ ("%d1") = (long)(a); \ | ||
21 | +__asm__ __volatile__ ("trap #0" \ | ||
22 | + : "+d" (__res) \ | ||
23 | + : "d" (__a) ); \ | ||
24 | +return (type) __res; \ | ||
25 | +} | ||
26 | + | ||
27 | +#define io_syscall2(type,fname,sname,atype,a,btype,b) \ | ||
28 | +type fname(atype a,btype b) \ | ||
29 | +{ \ | ||
30 | +register long __res __asm__ ("%d0") = __NR_##sname; \ | ||
31 | +register long __a __asm__ ("%d1") = (long)(a); \ | ||
32 | +register long __b __asm__ ("%d2") = (long)(b); \ | ||
33 | +__asm__ __volatile__ ("trap #0" \ | ||
34 | + : "+d" (__res) \ | ||
35 | + : "d" (__a), "d" (__b) \ | ||
36 | + ); \ | ||
37 | +return (type) __res; \ | ||
38 | +} | ||
39 | + | ||
40 | +#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ | ||
41 | +type fname(atype a,btype b,ctype c) \ | ||
42 | +{ \ | ||
43 | +register long __res __asm__ ("%d0") = __NR_##sname; \ | ||
44 | +register long __a __asm__ ("%d1") = (long)(a); \ | ||
45 | +register long __b __asm__ ("%d2") = (long)(b); \ | ||
46 | +register long __c __asm__ ("%d3") = (long)(c); \ | ||
47 | +__asm__ __volatile__ ("trap #0" \ | ||
48 | + : "+d" (__res) \ | ||
49 | + : "d" (__a), "d" (__b), \ | ||
50 | + "d" (__c) \ | ||
51 | + ); \ | ||
52 | +return (type) __res; \ | ||
53 | +} | ||
54 | + | ||
55 | +#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ | ||
56 | +type fname (atype a, btype b, ctype c, dtype d) \ | ||
57 | +{ \ | ||
58 | +register long __res __asm__ ("%d0") = __NR_##sname; \ | ||
59 | +register long __a __asm__ ("%d1") = (long)(a); \ | ||
60 | +register long __b __asm__ ("%d2") = (long)(b); \ | ||
61 | +register long __c __asm__ ("%d3") = (long)(c); \ | ||
62 | +register long __d __asm__ ("%d4") = (long)(d); \ | ||
63 | +__asm__ __volatile__ ("trap #0" \ | ||
64 | + : "+d" (__res) \ | ||
65 | + : "d" (__a), "d" (__b), \ | ||
66 | + "d" (__c), "d" (__d) \ | ||
67 | + ); \ | ||
68 | +return (type) __res; \ | ||
69 | +} | ||
70 | + | ||
71 | +#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ | ||
72 | +type fname (atype a,btype b,ctype c,dtype d,etype e) \ | ||
73 | +{ \ | ||
74 | +register long __res __asm__ ("%d0") = __NR_##sname; \ | ||
75 | +register long __a __asm__ ("%d1") = (long)(a); \ | ||
76 | +register long __b __asm__ ("%d2") = (long)(b); \ | ||
77 | +register long __c __asm__ ("%d3") = (long)(c); \ | ||
78 | +register long __d __asm__ ("%d4") = (long)(d); \ | ||
79 | +register long __e __asm__ ("%d5") = (long)(e); \ | ||
80 | +__asm__ __volatile__ ("trap #0" \ | ||
81 | + : "+d" (__res) \ | ||
82 | + : "d" (__a), "d" (__b), \ | ||
83 | + "d" (__c), "d" (__d), "d" (__e) \ | ||
84 | + ); \ | ||
85 | +return (type) __res; \ | ||
86 | +} | ||
87 | + | ||
88 | Index: libaio-0.3.109/src/syscall-sparc.h | ||
89 | =================================================================== | ||
90 | --- /dev/null | ||
91 | +++ libaio-0.3.109/src/syscall-sparc.h | ||
92 | @@ -0,0 +1,130 @@ | ||
93 | +/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */ | ||
94 | + | ||
95 | +/* | ||
96 | + * System calls under the Sparc. | ||
97 | + * | ||
98 | + * Don't be scared by the ugly clobbers, it is the only way I can | ||
99 | + * think of right now to force the arguments into fixed registers | ||
100 | + * before the trap into the system call with gcc 'asm' statements. | ||
101 | + * | ||
102 | + * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | ||
103 | + * | ||
104 | + * SunOS compatibility based upon preliminary work which is: | ||
105 | + * | ||
106 | + * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) | ||
107 | + */ | ||
108 | + | ||
109 | + | ||
110 | +#define __NR_io_setup 268 | ||
111 | +#define __NR_io_destroy 269 | ||
112 | +#define __NR_io_submit 270 | ||
113 | +#define __NR_io_cancel 271 | ||
114 | +#define __NR_io_getevents 272 | ||
115 | + | ||
116 | + | ||
117 | +#define io_syscall1(type,fname,sname,type1,arg1) \ | ||
118 | +type fname(type1 arg1) \ | ||
119 | +{ \ | ||
120 | +long __res; \ | ||
121 | +register long __g1 __asm__ ("g1") = __NR_##sname; \ | ||
122 | +register long __o0 __asm__ ("o0") = (long)(arg1); \ | ||
123 | +__asm__ __volatile__ ("t 0x10\n\t" \ | ||
124 | + "bcc 1f\n\t" \ | ||
125 | + "mov %%o0, %0\n\t" \ | ||
126 | + "sub %%g0, %%o0, %0\n\t" \ | ||
127 | + "1:\n\t" \ | ||
128 | + : "=r" (__res), "=&r" (__o0) \ | ||
129 | + : "1" (__o0), "r" (__g1) \ | ||
130 | + : "cc"); \ | ||
131 | +if (__res < -255 || __res >= 0) \ | ||
132 | + return (type) __res; \ | ||
133 | +return -1; \ | ||
134 | +} | ||
135 | + | ||
136 | +#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ | ||
137 | +type fname(type1 arg1,type2 arg2) \ | ||
138 | +{ \ | ||
139 | +long __res; \ | ||
140 | +register long __g1 __asm__ ("g1") = __NR_##sname; \ | ||
141 | +register long __o0 __asm__ ("o0") = (long)(arg1); \ | ||
142 | +register long __o1 __asm__ ("o1") = (long)(arg2); \ | ||
143 | +__asm__ __volatile__ ("t 0x10\n\t" \ | ||
144 | + "bcc 1f\n\t" \ | ||
145 | + "mov %%o0, %0\n\t" \ | ||
146 | + "sub %%g0, %%o0, %0\n\t" \ | ||
147 | + "1:\n\t" \ | ||
148 | + : "=r" (__res), "=&r" (__o0) \ | ||
149 | + : "1" (__o0), "r" (__o1), "r" (__g1) \ | ||
150 | + : "cc"); \ | ||
151 | +if (__res < -255 || __res >= 0) \ | ||
152 | + return (type) __res; \ | ||
153 | +return -1; \ | ||
154 | +} | ||
155 | + | ||
156 | +#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ | ||
157 | +type fname(type1 arg1,type2 arg2,type3 arg3) \ | ||
158 | +{ \ | ||
159 | +long __res; \ | ||
160 | +register long __g1 __asm__ ("g1") = __NR_##sname; \ | ||
161 | +register long __o0 __asm__ ("o0") = (long)(arg1); \ | ||
162 | +register long __o1 __asm__ ("o1") = (long)(arg2); \ | ||
163 | +register long __o2 __asm__ ("o2") = (long)(arg3); \ | ||
164 | +__asm__ __volatile__ ("t 0x10\n\t" \ | ||
165 | + "bcc 1f\n\t" \ | ||
166 | + "mov %%o0, %0\n\t" \ | ||
167 | + "sub %%g0, %%o0, %0\n\t" \ | ||
168 | + "1:\n\t" \ | ||
169 | + : "=r" (__res), "=&r" (__o0) \ | ||
170 | + : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \ | ||
171 | + : "cc"); \ | ||
172 | +if (__res < -255 || __res>=0) \ | ||
173 | + return (type) __res; \ | ||
174 | +return -1; \ | ||
175 | +} | ||
176 | + | ||
177 | +#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ | ||
178 | +type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ | ||
179 | +{ \ | ||
180 | +long __res; \ | ||
181 | +register long __g1 __asm__ ("g1") = __NR_##sname; \ | ||
182 | +register long __o0 __asm__ ("o0") = (long)(arg1); \ | ||
183 | +register long __o1 __asm__ ("o1") = (long)(arg2); \ | ||
184 | +register long __o2 __asm__ ("o2") = (long)(arg3); \ | ||
185 | +register long __o3 __asm__ ("o3") = (long)(arg4); \ | ||
186 | +__asm__ __volatile__ ("t 0x10\n\t" \ | ||
187 | + "bcc 1f\n\t" \ | ||
188 | + "mov %%o0, %0\n\t" \ | ||
189 | + "sub %%g0, %%o0, %0\n\t" \ | ||
190 | + "1:\n\t" \ | ||
191 | + : "=r" (__res), "=&r" (__o0) \ | ||
192 | + : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \ | ||
193 | + : "cc"); \ | ||
194 | +if (__res < -255 || __res>=0) \ | ||
195 | + return (type) __res; \ | ||
196 | +return -1; \ | ||
197 | +} | ||
198 | + | ||
199 | +#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ | ||
200 | + type5,arg5) \ | ||
201 | +type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ | ||
202 | +{ \ | ||
203 | +long __res; \ | ||
204 | +register long __g1 __asm__ ("g1") = __NR_##sname; \ | ||
205 | +register long __o0 __asm__ ("o0") = (long)(arg1); \ | ||
206 | +register long __o1 __asm__ ("o1") = (long)(arg2); \ | ||
207 | +register long __o2 __asm__ ("o2") = (long)(arg3); \ | ||
208 | +register long __o3 __asm__ ("o3") = (long)(arg4); \ | ||
209 | +register long __o4 __asm__ ("o4") = (long)(arg5); \ | ||
210 | +__asm__ __volatile__ ("t 0x10\n\t" \ | ||
211 | + "bcc 1f\n\t" \ | ||
212 | + "mov %%o0, %0\n\t" \ | ||
213 | + "sub %%g0, %%o0, %0\n\t" \ | ||
214 | + "1:\n\t" \ | ||
215 | + : "=r" (__res), "=&r" (__o0) \ | ||
216 | + : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \ | ||
217 | + : "cc"); \ | ||
218 | +if (__res < -255 || __res>=0) \ | ||
219 | + return (type) __res; \ | ||
220 | +return -1; \ | ||
221 | +} | ||
222 | + | ||
223 | Index: libaio-0.3.109/src/syscall.h | ||
224 | =================================================================== | ||
225 | --- libaio-0.3.109.orig/src/syscall.h | ||
226 | +++ libaio-0.3.109/src/syscall.h | ||
227 | @@ -24,6 +24,14 @@ | ||
228 | #include "syscall-alpha.h" | ||
229 | #elif defined(__arm__) | ||
230 | #include "syscall-arm.h" | ||
231 | +#elif defined(__m68k__) | ||
232 | +#include "syscall-m68k.h" | ||
233 | +#elif defined(__sparc__) | ||
234 | +#include "syscall-sparc.h" | ||
235 | +#elif defined(__hppa__) | ||
236 | +#include "syscall-parisc.h" | ||
237 | +#elif defined(__mips__) | ||
238 | +#include "syscall-mips.h" | ||
239 | #else | ||
240 | #error "add syscall-arch.h" | ||
241 | #endif | ||
242 | Index: libaio-0.3.109/src/syscall-mips.h | ||
243 | =================================================================== | ||
244 | --- /dev/null | ||
245 | +++ libaio-0.3.109/src/syscall-mips.h | ||
246 | @@ -0,0 +1,223 @@ | ||
247 | +/* | ||
248 | + * This file is subject to the terms and conditions of the GNU General Public | ||
249 | + * License. See the file "COPYING" in the main directory of this archive | ||
250 | + * for more details. | ||
251 | + * | ||
252 | + * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle | ||
253 | + * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | ||
254 | + * | ||
255 | + * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto | ||
256 | + * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A | ||
257 | + */ | ||
258 | + | ||
259 | +#ifndef _MIPS_SIM_ABI32 | ||
260 | +#define _MIPS_SIM_ABI32 1 | ||
261 | +#define _MIPS_SIM_NABI32 2 | ||
262 | +#define _MIPS_SIM_ABI64 3 | ||
263 | +#endif | ||
264 | + | ||
265 | +#if _MIPS_SIM == _MIPS_SIM_ABI32 | ||
266 | + | ||
267 | +/* | ||
268 | + * Linux o32 style syscalls are in the range from 4000 to 4999. | ||
269 | + */ | ||
270 | +#define __NR_Linux 4000 | ||
271 | +#define __NR_io_setup (__NR_Linux + 241) | ||
272 | +#define __NR_io_destroy (__NR_Linux + 242) | ||
273 | +#define __NR_io_getevents (__NR_Linux + 243) | ||
274 | +#define __NR_io_submit (__NR_Linux + 244) | ||
275 | +#define __NR_io_cancel (__NR_Linux + 245) | ||
276 | + | ||
277 | +#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | ||
278 | + | ||
279 | +#if _MIPS_SIM == _MIPS_SIM_ABI64 | ||
280 | + | ||
281 | +/* | ||
282 | + * Linux 64-bit syscalls are in the range from 5000 to 5999. | ||
283 | + */ | ||
284 | +#define __NR_Linux 5000 | ||
285 | +#define __NR_io_setup (__NR_Linux + 200) | ||
286 | +#define __NR_io_destroy (__NR_Linux + 201) | ||
287 | +#define __NR_io_getevents (__NR_Linux + 202) | ||
288 | +#define __NR_io_submit (__NR_Linux + 203) | ||
289 | +#define __NR_io_cancel (__NR_Linux + 204) | ||
290 | +#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | ||
291 | + | ||
292 | +#if _MIPS_SIM == _MIPS_SIM_NABI32 | ||
293 | + | ||
294 | +/* | ||
295 | + * Linux N32 syscalls are in the range from 6000 to 6999. | ||
296 | + */ | ||
297 | +#define __NR_Linux 6000 | ||
298 | +#define __NR_io_setup (__NR_Linux + 200) | ||
299 | +#define __NR_io_destroy (__NR_Linux + 201) | ||
300 | +#define __NR_io_getevents (__NR_Linux + 202) | ||
301 | +#define __NR_io_submit (__NR_Linux + 203) | ||
302 | +#define __NR_io_cancel (__NR_Linux + 204) | ||
303 | +#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | ||
304 | + | ||
305 | +#define io_syscall1(type,fname,sname,atype,a) \ | ||
306 | +type fname(atype a) \ | ||
307 | +{ \ | ||
308 | + register unsigned long __a0 asm("$4") = (unsigned long) a; \ | ||
309 | + register unsigned long __a3 asm("$7"); \ | ||
310 | + unsigned long __v0; \ | ||
311 | + \ | ||
312 | + __asm__ volatile ( \ | ||
313 | + ".set\tnoreorder\n\t" \ | ||
314 | + "li\t$2, %3\t\t\t# " #fname "\n\t" \ | ||
315 | + "syscall\n\t" \ | ||
316 | + "move\t%0, $2\n\t" \ | ||
317 | + ".set\treorder" \ | ||
318 | + : "=&r" (__v0), "=r" (__a3) \ | ||
319 | + : "r" (__a0), "i" (__NR_##sname) \ | ||
320 | + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ | ||
321 | + "memory"); \ | ||
322 | + \ | ||
323 | + if (__a3 == 0) \ | ||
324 | + return (type) __v0; \ | ||
325 | + return (type) -1; \ | ||
326 | +} | ||
327 | + | ||
328 | +#define io_syscall2(type,fname,sname,atype,a,btype,b) \ | ||
329 | +type fname(atype a, btype b) \ | ||
330 | +{ \ | ||
331 | + register unsigned long __a0 asm("$4") = (unsigned long) a; \ | ||
332 | + register unsigned long __a1 asm("$5") = (unsigned long) b; \ | ||
333 | + register unsigned long __a3 asm("$7"); \ | ||
334 | + unsigned long __v0; \ | ||
335 | + \ | ||
336 | + __asm__ volatile ( \ | ||
337 | + ".set\tnoreorder\n\t" \ | ||
338 | + "li\t$2, %4\t\t\t# " #fname "\n\t" \ | ||
339 | + "syscall\n\t" \ | ||
340 | + "move\t%0, $2\n\t" \ | ||
341 | + ".set\treorder" \ | ||
342 | + : "=&r" (__v0), "=r" (__a3) \ | ||
343 | + : "r" (__a0), "r" (__a1), "i" (__NR_##sname) \ | ||
344 | + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ | ||
345 | + "memory"); \ | ||
346 | + \ | ||
347 | + if (__a3 == 0) \ | ||
348 | + return (type) __v0; \ | ||
349 | + return (type) -1; \ | ||
350 | +} | ||
351 | + | ||
352 | +#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ | ||
353 | +type fname(atype a, btype b, ctype c) \ | ||
354 | +{ \ | ||
355 | + register unsigned long __a0 asm("$4") = (unsigned long) a; \ | ||
356 | + register unsigned long __a1 asm("$5") = (unsigned long) b; \ | ||
357 | + register unsigned long __a2 asm("$6") = (unsigned long) c; \ | ||
358 | + register unsigned long __a3 asm("$7"); \ | ||
359 | + unsigned long __v0; \ | ||
360 | + \ | ||
361 | + __asm__ volatile ( \ | ||
362 | + ".set\tnoreorder\n\t" \ | ||
363 | + "li\t$2, %5\t\t\t# " #fname "\n\t" \ | ||
364 | + "syscall\n\t" \ | ||
365 | + "move\t%0, $2\n\t" \ | ||
366 | + ".set\treorder" \ | ||
367 | + : "=&r" (__v0), "=r" (__a3) \ | ||
368 | + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ | ||
369 | + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ | ||
370 | + "memory"); \ | ||
371 | + \ | ||
372 | + if (__a3 == 0) \ | ||
373 | + return (type) __v0; \ | ||
374 | + return (type) -1; \ | ||
375 | +} | ||
376 | + | ||
377 | +#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ | ||
378 | +type fname(atype a, btype b, ctype c, dtype d) \ | ||
379 | +{ \ | ||
380 | + register unsigned long __a0 asm("$4") = (unsigned long) a; \ | ||
381 | + register unsigned long __a1 asm("$5") = (unsigned long) b; \ | ||
382 | + register unsigned long __a2 asm("$6") = (unsigned long) c; \ | ||
383 | + register unsigned long __a3 asm("$7") = (unsigned long) d; \ | ||
384 | + unsigned long __v0; \ | ||
385 | + \ | ||
386 | + __asm__ volatile ( \ | ||
387 | + ".set\tnoreorder\n\t" \ | ||
388 | + "li\t$2, %5\t\t\t# " #fname "\n\t" \ | ||
389 | + "syscall\n\t" \ | ||
390 | + "move\t%0, $2\n\t" \ | ||
391 | + ".set\treorder" \ | ||
392 | + : "=&r" (__v0), "+r" (__a3) \ | ||
393 | + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ | ||
394 | + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ | ||
395 | + "memory"); \ | ||
396 | + \ | ||
397 | + if (__a3 == 0) \ | ||
398 | + return (type) __v0; \ | ||
399 | + return (type) -1; \ | ||
400 | +} | ||
401 | + | ||
402 | +#if (_MIPS_SIM == _MIPS_SIM_ABI32) | ||
403 | + | ||
404 | +/* | ||
405 | + * Using those means your brain needs more than an oil change ;-) | ||
406 | + */ | ||
407 | + | ||
408 | +#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ | ||
409 | +type fname(atype a, btype b, ctype c, dtype d, etype e) \ | ||
410 | +{ \ | ||
411 | + register unsigned long __a0 asm("$4") = (unsigned long) a; \ | ||
412 | + register unsigned long __a1 asm("$5") = (unsigned long) b; \ | ||
413 | + register unsigned long __a2 asm("$6") = (unsigned long) c; \ | ||
414 | + register unsigned long __a3 asm("$7") = (unsigned long) d; \ | ||
415 | + unsigned long __v0; \ | ||
416 | + \ | ||
417 | + __asm__ volatile ( \ | ||
418 | + ".set\tnoreorder\n\t" \ | ||
419 | + "lw\t$2, %6\n\t" \ | ||
420 | + "subu\t$29, 32\n\t" \ | ||
421 | + "sw\t$2, 16($29)\n\t" \ | ||
422 | + "li\t$2, %5\t\t\t# " #fname "\n\t" \ | ||
423 | + "syscall\n\t" \ | ||
424 | + "move\t%0, $2\n\t" \ | ||
425 | + "addiu\t$29, 32\n\t" \ | ||
426 | + ".set\treorder" \ | ||
427 | + : "=&r" (__v0), "+r" (__a3) \ | ||
428 | + : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname), \ | ||
429 | + "m" ((unsigned long)e) \ | ||
430 | + : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ | ||
431 | + "memory"); \ | ||
432 | + \ | ||
433 | + if (__a3 == 0) \ | ||
434 | + return (type) __v0; \ | ||
435 | + return (type) -1; \ | ||
436 | +} | ||
437 | + | ||
438 | +#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ | ||
439 | + | ||
440 | +#if (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) | ||
441 | + | ||
442 | +#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ | ||
443 | +type fname (atype a,btype b,ctype c,dtype d,etype e) \ | ||
444 | +{ \ | ||
445 | + register unsigned long __a0 asm("$4") = (unsigned long) a; \ | ||
446 | + register unsigned long __a1 asm("$5") = (unsigned long) b; \ | ||
447 | + register unsigned long __a2 asm("$6") = (unsigned long) c; \ | ||
448 | + register unsigned long __a3 asm("$7") = (unsigned long) d; \ | ||
449 | + register unsigned long __a4 asm("$8") = (unsigned long) e; \ | ||
450 | + unsigned long __v0; \ | ||
451 | + \ | ||
452 | + __asm__ volatile ( \ | ||
453 | + ".set\tnoreorder\n\t" \ | ||
454 | + "li\t$2, %6\t\t\t# " #fname "\n\t" \ | ||
455 | + "syscall\n\t" \ | ||
456 | + "move\t%0, $2\n\t" \ | ||
457 | + ".set\treorder" \ | ||
458 | + : "=&r" (__v0), "+r" (__a3) \ | ||
459 | + : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \ | ||
460 | + : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ | ||
461 | + "memory"); \ | ||
462 | + \ | ||
463 | + if (__a3 == 0) \ | ||
464 | + return (type) __v0; \ | ||
465 | + return (type) -1; \ | ||
466 | +} | ||
467 | + | ||
468 | +#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ | ||
469 | + | ||
470 | Index: libaio-0.3.109/src/libaio.h | ||
471 | =================================================================== | ||
472 | --- libaio-0.3.109.orig/src/libaio.h | ||
473 | +++ libaio-0.3.109/src/libaio.h | ||
474 | @@ -83,6 +83,30 @@ typedef enum io_iocb_cmd { | ||
475 | #define PADDEDptr(x, y) x; unsigned y | ||
476 | #define PADDEDul(x, y) unsigned long x; unsigned y | ||
477 | # endif | ||
478 | +#elif defined(__m68k__) /* big endian, 32 bits */ | ||
479 | +#define PADDED(x, y) unsigned y; x | ||
480 | +#define PADDEDptr(x, y) unsigned y; x | ||
481 | +#define PADDEDul(x, y) unsigned y; unsigned long x | ||
482 | +#elif defined(__sparc__) /* big endian, 32 bits */ | ||
483 | +#define PADDED(x, y) unsigned y; x | ||
484 | +#define PADDEDptr(x, y) unsigned y; x | ||
485 | +#define PADDEDul(x, y) unsigned y; unsigned long x | ||
486 | +#elif defined(__hppa__) /* big endian, 32 bits */ | ||
487 | +#define PADDED(x, y) unsigned y; x | ||
488 | +#define PADDEDptr(x, y) unsigned y; x | ||
489 | +#define PADDEDul(x, y) unsigned y; unsigned long x | ||
490 | +#elif defined(__mips__) | ||
491 | +# if defined (__MIPSEB__) /* big endian, 32 bits */ | ||
492 | +#define PADDED(x, y) unsigned y; x | ||
493 | +#define PADDEDptr(x, y) unsigned y; x | ||
494 | +#define PADDEDul(x, y) unsigned y; unsigned long x | ||
495 | +# elif defined(__MIPSEL__) /* little endian, 32 bits */ | ||
496 | +#define PADDED(x, y) x; unsigned y | ||
497 | +#define PADDEDptr(x, y) x; unsigned y | ||
498 | +#define PADDEDul(x, y) unsigned long x; unsigned y | ||
499 | +# else | ||
500 | +# error "neither mipseb nor mipsel?" | ||
501 | +# endif | ||
502 | #else | ||
503 | #error endian? | ||
504 | #endif | ||
505 | Index: libaio-0.3.109/src/syscall-parisc.h | ||
506 | =================================================================== | ||
507 | --- /dev/null | ||
508 | +++ libaio-0.3.109/src/syscall-parisc.h | ||
509 | @@ -0,0 +1,146 @@ | ||
510 | +/* | ||
511 | + * Linux system call numbers. | ||
512 | + * | ||
513 | + * Cary Coutant says that we should just use another syscall gateway | ||
514 | + * page to avoid clashing with the HPUX space, and I think he's right: | ||
515 | + * it will would keep a branch out of our syscall entry path, at the | ||
516 | + * very least. If we decide to change it later, we can ``just'' tweak | ||
517 | + * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be | ||
518 | + * 1024 or something. Oh, and recompile libc. =) | ||
519 | + * | ||
520 | + * 64-bit HPUX binaries get the syscall gateway address passed in a register | ||
521 | + * from the kernel at startup, which seems a sane strategy. | ||
522 | + */ | ||
523 | + | ||
524 | +#define __NR_Linux 0 | ||
525 | +#define __NR_io_setup (__NR_Linux + 215) | ||
526 | +#define __NR_io_destroy (__NR_Linux + 216) | ||
527 | +#define __NR_io_getevents (__NR_Linux + 217) | ||
528 | +#define __NR_io_submit (__NR_Linux + 218) | ||
529 | +#define __NR_io_cancel (__NR_Linux + 219) | ||
530 | + | ||
531 | +#define SYS_ify(syscall_name) __NR_##syscall_name | ||
532 | + | ||
533 | +/* Assume all syscalls are done from PIC code just to be | ||
534 | + * safe. The worst case scenario is that you lose a register | ||
535 | + * and save/restore r19 across the syscall. */ | ||
536 | +#define PIC | ||
537 | + | ||
538 | +/* Definition taken from glibc 2.3.3 | ||
539 | + * sysdeps/unix/sysv/linux/hppa/sysdep.h | ||
540 | + */ | ||
541 | + | ||
542 | +#ifdef PIC | ||
543 | +/* WARNING: CANNOT BE USED IN A NOP! */ | ||
544 | +# define K_STW_ASM_PIC " copy %%r19, %%r4\n" | ||
545 | +# define K_LDW_ASM_PIC " copy %%r4, %%r19\n" | ||
546 | +# define K_USING_GR4 "%r4", | ||
547 | +#else | ||
548 | +# define K_STW_ASM_PIC " \n" | ||
549 | +# define K_LDW_ASM_PIC " \n" | ||
550 | +# define K_USING_GR4 | ||
551 | +#endif | ||
552 | + | ||
553 | +/* GCC has to be warned that a syscall may clobber all the ABI | ||
554 | + registers listed as "caller-saves", see page 8, Table 2 | ||
555 | + in section 2.2.6 of the PA-RISC RUN-TIME architecture | ||
556 | + document. However! r28 is the result and will conflict with | ||
557 | + the clobber list so it is left out. Also the input arguments | ||
558 | + registers r20 -> r26 will conflict with the list so they | ||
559 | + are treated specially. Although r19 is clobbered by the syscall | ||
560 | + we cannot say this because it would violate ABI, thus we say | ||
561 | + r4 is clobbered and use that register to save/restore r19 | ||
562 | + across the syscall. */ | ||
563 | + | ||
564 | +#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \ | ||
565 | + "%r20", "%r29", "%r31" | ||
566 | + | ||
567 | +#undef K_INLINE_SYSCALL | ||
568 | +#define K_INLINE_SYSCALL(name, nr, args...) ({ \ | ||
569 | + long __sys_res; \ | ||
570 | + { \ | ||
571 | + register unsigned long __res __asm__("r28"); \ | ||
572 | + K_LOAD_ARGS_##nr(args) \ | ||
573 | + /* FIXME: HACK stw/ldw r19 around syscall */ \ | ||
574 | + __asm__ volatile( \ | ||
575 | + K_STW_ASM_PIC \ | ||
576 | + " ble 0x100(%%sr2, %%r0)\n" \ | ||
577 | + " ldi %1, %%r20\n" \ | ||
578 | + K_LDW_ASM_PIC \ | ||
579 | + : "=r" (__res) \ | ||
580 | + : "i" (SYS_ify(name)) K_ASM_ARGS_##nr \ | ||
581 | + : "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr \ | ||
582 | + ); \ | ||
583 | + __sys_res = (long)__res; \ | ||
584 | + } \ | ||
585 | + __sys_res; \ | ||
586 | +}) | ||
587 | + | ||
588 | +#define K_LOAD_ARGS_0() | ||
589 | +#define K_LOAD_ARGS_1(r26) \ | ||
590 | + register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \ | ||
591 | + K_LOAD_ARGS_0() | ||
592 | +#define K_LOAD_ARGS_2(r26,r25) \ | ||
593 | + register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \ | ||
594 | + K_LOAD_ARGS_1(r26) | ||
595 | +#define K_LOAD_ARGS_3(r26,r25,r24) \ | ||
596 | + register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \ | ||
597 | + K_LOAD_ARGS_2(r26,r25) | ||
598 | +#define K_LOAD_ARGS_4(r26,r25,r24,r23) \ | ||
599 | + register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \ | ||
600 | + K_LOAD_ARGS_3(r26,r25,r24) | ||
601 | +#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22) \ | ||
602 | + register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \ | ||
603 | + K_LOAD_ARGS_4(r26,r25,r24,r23) | ||
604 | +#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ | ||
605 | + register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \ | ||
606 | + K_LOAD_ARGS_5(r26,r25,r24,r23,r22) | ||
607 | + | ||
608 | +/* Even with zero args we use r20 for the syscall number */ | ||
609 | +#define K_ASM_ARGS_0 | ||
610 | +#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26) | ||
611 | +#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25) | ||
612 | +#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24) | ||
613 | +#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23) | ||
614 | +#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22) | ||
615 | +#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21) | ||
616 | + | ||
617 | +/* The registers not listed as inputs but clobbered */ | ||
618 | +#define K_CLOB_ARGS_6 | ||
619 | +#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21" | ||
620 | +#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22" | ||
621 | +#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23" | ||
622 | +#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24" | ||
623 | +#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25" | ||
624 | +#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26" | ||
625 | + | ||
626 | +#define io_syscall1(type,fname,sname,type1,arg1) \ | ||
627 | +type fname(type1 arg1) \ | ||
628 | +{ \ | ||
629 | + return K_INLINE_SYSCALL(sname, 1, arg1); \ | ||
630 | +} | ||
631 | + | ||
632 | +#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ | ||
633 | +type fname(type1 arg1, type2 arg2) \ | ||
634 | +{ \ | ||
635 | + return K_INLINE_SYSCALL(sname, 2, arg1, arg2); \ | ||
636 | +} | ||
637 | + | ||
638 | +#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ | ||
639 | +type fname(type1 arg1, type2 arg2, type3 arg3) \ | ||
640 | +{ \ | ||
641 | + return K_INLINE_SYSCALL(sname, 3, arg1, arg2, arg3); \ | ||
642 | +} | ||
643 | + | ||
644 | +#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ | ||
645 | +type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ | ||
646 | +{ \ | ||
647 | + return K_INLINE_SYSCALL(sname, 4, arg1, arg2, arg3, arg4); \ | ||
648 | +} | ||
649 | + | ||
650 | +#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ | ||
651 | +type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ | ||
652 | +{ \ | ||
653 | + return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \ | ||
654 | +} | ||
655 | + | ||
656 | Index: libaio-0.3.109/src/syscall-arm.h | ||
657 | =================================================================== | ||
658 | --- libaio-0.3.109.orig/src/syscall-arm.h | ||
659 | +++ libaio-0.3.109/src/syscall-arm.h | ||
660 | @@ -114,3 +114,119 @@ type fname(type1 arg1, type2 arg2, type3 | ||
661 | return (type) __res_r0; \ | ||
662 | } | ||
663 | |||
664 | +/* | ||
665 | + * linux/include/asm-arm/unistd.h | ||
666 | + * | ||
667 | + * Copyright (C) 2001-2005 Russell King | ||
668 | + * | ||
669 | + * This program is free software; you can redistribute it and/or modify | ||
670 | + * it under the terms of the GNU General Public License version 2 as | ||
671 | + * published by the Free Software Foundation. | ||
672 | + * | ||
673 | + * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, | ||
674 | + * no matter what the change is. Thanks! | ||
675 | + */ | ||
676 | + | ||
677 | +#define __NR_OABI_SYSCALL_BASE 0x900000 | ||
678 | + | ||
679 | +#if defined(__thumb__) || defined(__ARM_EABI__) | ||
680 | +#define __NR_SYSCALL_BASE 0 | ||
681 | +#else | ||
682 | +#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE | ||
683 | +#endif | ||
684 | + | ||
685 | +#define __NR_io_setup (__NR_SYSCALL_BASE+243) | ||
686 | +#define __NR_io_destroy (__NR_SYSCALL_BASE+244) | ||
687 | +#define __NR_io_getevents (__NR_SYSCALL_BASE+245) | ||
688 | +#define __NR_io_submit (__NR_SYSCALL_BASE+246) | ||
689 | +#define __NR_io_cancel (__NR_SYSCALL_BASE+247) | ||
690 | + | ||
691 | +#define __sys2(x) #x | ||
692 | +#define __sys1(x) __sys2(x) | ||
693 | + | ||
694 | +#if defined(__thumb__) || defined(__ARM_EABI__) | ||
695 | +#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; | ||
696 | +#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs | ||
697 | +#define __syscall(name) "swi\t0" | ||
698 | +#else | ||
699 | +#define __SYS_REG(name) | ||
700 | +#define __SYS_REG_LIST(regs...) regs | ||
701 | +#define __syscall(name) "swi\t" __sys1(__NR_##name) "" | ||
702 | +#endif | ||
703 | + | ||
704 | +#define io_syscall1(type,fname,sname,type1,arg1) \ | ||
705 | +type fname(type1 arg1) { \ | ||
706 | + __SYS_REG(sname) \ | ||
707 | + register long __r0 __asm__("r0") = (long)arg1; \ | ||
708 | + register long __res_r0 __asm__("r0"); \ | ||
709 | + __asm__ __volatile__ ( \ | ||
710 | + __syscall(sname) \ | ||
711 | + : "=r" (__res_r0) \ | ||
712 | + : __SYS_REG_LIST( "0" (__r0) ) \ | ||
713 | + : "memory" ); \ | ||
714 | + return (type) __res_r0; \ | ||
715 | +} | ||
716 | + | ||
717 | +#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ | ||
718 | +type fname(type1 arg1,type2 arg2) { \ | ||
719 | + __SYS_REG(sname) \ | ||
720 | + register long __r0 __asm__("r0") = (long)arg1; \ | ||
721 | + register long __r1 __asm__("r1") = (long)arg2; \ | ||
722 | + register long __res_r0 __asm__("r0"); \ | ||
723 | + __asm__ __volatile__ ( \ | ||
724 | + __syscall(sname) \ | ||
725 | + : "=r" (__res_r0) \ | ||
726 | + : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \ | ||
727 | + : "memory" ); \ | ||
728 | + return (type) __res_r0; \ | ||
729 | +} | ||
730 | + | ||
731 | +#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ | ||
732 | +type fname(type1 arg1,type2 arg2,type3 arg3) { \ | ||
733 | + __SYS_REG(sname) \ | ||
734 | + register long __r0 __asm__("r0") = (long)arg1; \ | ||
735 | + register long __r1 __asm__("r1") = (long)arg2; \ | ||
736 | + register long __r2 __asm__("r2") = (long)arg3; \ | ||
737 | + register long __res_r0 __asm__("r0"); \ | ||
738 | + __asm__ __volatile__ ( \ | ||
739 | + __syscall(sname) \ | ||
740 | + : "=r" (__res_r0) \ | ||
741 | + : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \ | ||
742 | + : "memory" ); \ | ||
743 | + return (type) __res_r0; \ | ||
744 | +} | ||
745 | + | ||
746 | +#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ | ||
747 | +type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ | ||
748 | + __SYS_REG(sname) \ | ||
749 | + register long __r0 __asm__("r0") = (long)arg1; \ | ||
750 | + register long __r1 __asm__("r1") = (long)arg2; \ | ||
751 | + register long __r2 __asm__("r2") = (long)arg3; \ | ||
752 | + register long __r3 __asm__("r3") = (long)arg4; \ | ||
753 | + register long __res_r0 __asm__("r0"); \ | ||
754 | + __asm__ __volatile__ ( \ | ||
755 | + __syscall(sname) \ | ||
756 | + : "=r" (__res_r0) \ | ||
757 | + : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \ | ||
758 | + : "memory" ); \ | ||
759 | + return (type) __res_r0; \ | ||
760 | +} | ||
761 | + | ||
762 | +#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ | ||
763 | +type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\ | ||
764 | + __SYS_REG(sname) \ | ||
765 | + register long __r0 __asm__("r0") = (long)arg1; \ | ||
766 | + register long __r1 __asm__("r1") = (long)arg2; \ | ||
767 | + register long __r2 __asm__("r2") = (long)arg3; \ | ||
768 | + register long __r3 __asm__("r3") = (long)arg4; \ | ||
769 | + register long __r4 __asm__("r4") = (long)arg5; \ | ||
770 | + register long __res_r0 __asm__("r0"); \ | ||
771 | + __asm__ __volatile__ ( \ | ||
772 | + __syscall(sname) \ | ||
773 | + : "=r" (__res_r0) \ | ||
774 | + : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ | ||
775 | + "r" (__r3), "r" (__r4) ) \ | ||
776 | + : "memory" ); \ | ||
777 | + return (type) __res_r0; \ | ||
778 | +} | ||
779 | + | ||
diff --git a/meta/recipes-extended/libaio/libaio/destdir.patch b/meta/recipes-extended/libaio/libaio/destdir.patch new file mode 100644 index 0000000000..dad9601c49 --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/destdir.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | from openembedded, added by Qing He <qing.he@intel.com> | ||
4 | |||
5 | Index: libaio-0.3.106/Makefile | ||
6 | =================================================================== | ||
7 | --- libaio-0.3.106.orig/Makefile 2004-02-26 07:25:10.000000000 -0800 | ||
8 | +++ libaio-0.3.106/Makefile 2006-10-14 09:19:07.000000000 -0700 | ||
9 | @@ -15,7 +15,7 @@ | ||
10 | @$(MAKE) -C src | ||
11 | |||
12 | install: | ||
13 | - @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir) | ||
14 | + @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir) | ||
15 | |||
16 | |||
17 | clean: | ||
diff --git a/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch b/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch new file mode 100644 index 0000000000..e3d10585de --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Upstream-Status: Submitted | ||
2 | |||
3 | Signed-off-by: Riku Voipio <riku.voipio@linaro.org> | ||
4 | |||
5 | --- | ||
6 | harness/cases/16.t | 2 ++ | ||
7 | src/libaio.h | 10 ++++++++++ | ||
8 | 2 files changed, 12 insertions(+) | ||
9 | |||
10 | --- a/src/libaio.h | ||
11 | +++ b/src/libaio.h | ||
12 | @@ -107,6 +107,16 @@ | ||
13 | # else | ||
14 | # error "neither mipseb nor mipsel?" | ||
15 | # endif | ||
16 | +#elif defined(__aarch64__) | ||
17 | +# if defined (__AARCH64EB__) /* big endian, 64 bits */ | ||
18 | +#define PADDED(x, y) unsigned y; x | ||
19 | +#define PADDEDptr(x,y) x | ||
20 | +#define PADDEDul(x, y) unsigned long x | ||
21 | +# elif defined(__AARCH64EL__) /* little endian, 64 bits */ | ||
22 | +#define PADDED(x, y) x, y | ||
23 | +#define PADDEDptr(x, y) x | ||
24 | +#define PADDEDul(x, y) unsigned long x | ||
25 | +# endif | ||
26 | #else | ||
27 | #error endian? | ||
28 | #endif | ||
diff --git a/meta/recipes-extended/libaio/libaio/libaio-generic.patch b/meta/recipes-extended/libaio/libaio/libaio-generic.patch new file mode 100644 index 0000000000..3fcf541626 --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/libaio-generic.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From 5e96c73d5dfbdea8d0be82b7f3fc8d6735e5dfa7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Frysinger <vapier@gentoo.org> | ||
3 | Date: Sun, 17 Jan 2010 17:07:48 -0500 | ||
4 | Subject: [PATCH] add a generic syscall() fallback | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mike Frysinger <vapier@gentoo.org> | ||
9 | Signed-off-by: Riku Voipio <riku.voipio@linaro.org> | ||
10 | --- | ||
11 | src/syscall-generic.h | 29 +++++++++++++++++++++++++++++ | ||
12 | src/syscall.h | 3 ++- | ||
13 | 2 files changed, 31 insertions(+), 1 deletions(-) | ||
14 | create mode 100644 src/syscall-generic.h | ||
15 | |||
16 | diff --git a/src/syscall-generic.h b/src/syscall-generic.h | ||
17 | new file mode 100644 | ||
18 | index 0000000..24d7c7c | ||
19 | --- /dev/null | ||
20 | +++ b/src/syscall-generic.h | ||
21 | @@ -0,0 +1,29 @@ | ||
22 | +#include <errno.h> | ||
23 | +#include <unistd.h> | ||
24 | +#include <sys/syscall.h> | ||
25 | + | ||
26 | +#define _body_io_syscall(sname, args...) \ | ||
27 | +{ \ | ||
28 | + int ret = syscall(__NR_##sname, ## args); \ | ||
29 | + return ret < 0 ? -errno : ret; \ | ||
30 | +} | ||
31 | + | ||
32 | +#define io_syscall1(type,fname,sname,type1,arg1) \ | ||
33 | +type fname(type1 arg1) \ | ||
34 | +_body_io_syscall(sname, (long)arg1) | ||
35 | + | ||
36 | +#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ | ||
37 | +type fname(type1 arg1,type2 arg2) \ | ||
38 | +_body_io_syscall(sname, (long)arg1, (long)arg2) | ||
39 | + | ||
40 | +#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ | ||
41 | +type fname(type1 arg1,type2 arg2,type3 arg3) \ | ||
42 | +_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3) | ||
43 | + | ||
44 | +#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ | ||
45 | +type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ | ||
46 | +_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4) | ||
47 | + | ||
48 | +#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, type5,arg5) \ | ||
49 | +type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ | ||
50 | +_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5) | ||
51 | diff --git a/src/syscall.h b/src/syscall.h | ||
52 | index 78becfe..d954af0 100644 | ||
53 | --- a/src/syscall.h | ||
54 | +++ b/src/syscall.h | ||
55 | @@ -25,5 +25,6 @@ | ||
56 | #elif defined(__arm__) | ||
57 | #include "syscall-arm.h" | ||
58 | #else | ||
59 | -#error "add syscall-arch.h" | ||
60 | +#warning "using generic syscall method" | ||
61 | +#include "syscall-generic.h" | ||
62 | #endif | ||
63 | -- | ||
64 | 1.7.3.1 | ||
65 | |||
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch new file mode 100644 index 0000000000..022276af83 --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | Upstream status: Inappropriate [embedded specific] | ||
2 | |||
3 | Signed-off-by: Phil Staub <Phil.Staub@windriver.com> | ||
4 | |||
5 | Index: libaio-0.3.109/src/syscall-mips.h | ||
6 | =================================================================== | ||
7 | --- libaio-0.3.109.orig/src/syscall-mips.h | ||
8 | +++ libaio-0.3.109/src/syscall-mips.h | ||
9 | @@ -76,7 +76,7 @@ type fname(atype a) \ | ||
10 | \ | ||
11 | if (__a3 == 0) \ | ||
12 | return (type) __v0; \ | ||
13 | - return (type) -1; \ | ||
14 | + return (type) (-(__v0)); \ | ||
15 | } | ||
16 | |||
17 | #define io_syscall2(type,fname,sname,atype,a,btype,b) \ | ||
18 | @@ -100,7 +100,7 @@ type fname(atype a, btype b) \ | ||
19 | \ | ||
20 | if (__a3 == 0) \ | ||
21 | return (type) __v0; \ | ||
22 | - return (type) -1; \ | ||
23 | + return (type) (-(__v0)); \ | ||
24 | } | ||
25 | |||
26 | #define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ | ||
27 | @@ -125,7 +125,7 @@ type fname(atype a, btype b, ctype c) \ | ||
28 | \ | ||
29 | if (__a3 == 0) \ | ||
30 | return (type) __v0; \ | ||
31 | - return (type) -1; \ | ||
32 | + return (type) (-(__v0)); \ | ||
33 | } | ||
34 | |||
35 | #define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ | ||
36 | @@ -150,7 +150,7 @@ type fname(atype a, btype b, ctype c, dt | ||
37 | \ | ||
38 | if (__a3 == 0) \ | ||
39 | return (type) __v0; \ | ||
40 | - return (type) -1; \ | ||
41 | + return (type) (-(__v0)); \ | ||
42 | } | ||
43 | |||
44 | #if (_MIPS_SIM == _MIPS_SIM_ABI32) | ||
45 | @@ -186,7 +186,7 @@ type fname(atype a, btype b, ctype c, dt | ||
46 | \ | ||
47 | if (__a3 == 0) \ | ||
48 | return (type) __v0; \ | ||
49 | - return (type) -1; \ | ||
50 | + return (type) (-(__v0)); \ | ||
51 | } | ||
52 | |||
53 | #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ | ||
54 | @@ -216,7 +216,7 @@ type fname (atype a,btype b,ctype c,dtyp | ||
55 | \ | ||
56 | if (__a3 == 0) \ | ||
57 | return (type) __v0; \ | ||
58 | - return (type) -1; \ | ||
59 | + return (type) (-(__v0)); \ | ||
60 | } | ||
61 | |||
62 | #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ | ||
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch new file mode 100644 index 0000000000..508f5a12f1 --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Properly load arguments 5 an 6 for x86-64 syscall | ||
4 | Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64 | ||
5 | syscall so that it works with both x32 and x86-64. | ||
6 | |||
7 | Received this patch from H.J. Lu <hjl.tools@gmail.com> | ||
8 | |||
9 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
10 | 2011/12/02 | ||
11 | |||
12 | --- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700 | ||
13 | +++ libaio-0.3.109/src/syscall-x86_64.h 2011-12-02 09:09:07.537603224 -0800 | ||
14 | @@ -1,8 +1,18 @@ | ||
15 | +#ifndef __NR_io_setup | ||
16 | #define __NR_io_setup 206 | ||
17 | +#endif | ||
18 | +#ifndef __NR_io_destroy | ||
19 | #define __NR_io_destroy 207 | ||
20 | +#endif | ||
21 | +#ifndef __NR_io_getevents | ||
22 | #define __NR_io_getevents 208 | ||
23 | +#endif | ||
24 | +#ifndef __NR_io_submit | ||
25 | #define __NR_io_submit 209 | ||
26 | +#endif | ||
27 | +#ifndef __NR_io_cancel | ||
28 | #define __NR_io_cancel 210 | ||
29 | +#endif | ||
30 | |||
31 | #define __syscall_clobber "r11","rcx","memory" | ||
32 | #define __syscall "syscall" | ||
33 | @@ -42,10 +52,11 @@ return __res; \ | ||
34 | type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ | ||
35 | { \ | ||
36 | long __res; \ | ||
37 | -__asm__ volatile ("movq %5,%%r10 ;" __syscall \ | ||
38 | +register long __a4 asm ("r10") = (long) arg4; \ | ||
39 | +__asm__ volatile (__syscall \ | ||
40 | : "=a" (__res) \ | ||
41 | : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ | ||
42 | - "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \ | ||
43 | + "d" ((long)(arg3)),"r" (__a4)); \ | ||
44 | return __res; \ | ||
45 | } | ||
46 | |||
47 | @@ -54,10 +65,11 @@ return __res; \ | ||
48 | type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ | ||
49 | { \ | ||
50 | long __res; \ | ||
51 | -__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \ | ||
52 | +register long __a4 asm ("r10") = (long) arg4; \ | ||
53 | +register long __a5 asm ("r8") = (long) arg5; \ | ||
54 | +__asm__ volatile ( __syscall \ | ||
55 | : "=a" (__res) \ | ||
56 | : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ | ||
57 | - "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \ | ||
58 | - __syscall_clobber,"r8","r10" ); \ | ||
59 | + "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \ | ||
60 | return __res; \ | ||
61 | } | ||
diff --git a/meta/recipes-extended/libaio/libaio/toolchain.patch b/meta/recipes-extended/libaio/libaio/toolchain.patch new file mode 100644 index 0000000000..4d88ec167b --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/toolchain.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | 8/27/2010 - created by Qing He <qing.he@intel.com> | ||
4 | |||
5 | diff --git a/src/Makefile b/src/Makefile | ||
6 | index 8d134cc..df8e5b6 100644 | ||
7 | --- a/src/Makefile | ||
8 | +++ b/src/Makefile | ||
9 | @@ -2,7 +2,6 @@ prefix=/usr | ||
10 | includedir=$(prefix)/include | ||
11 | libdir=$(prefix)/lib | ||
12 | |||
13 | -ARCH := $(shell uname -m | sed -e s/i.86/i386/) | ||
14 | CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC | ||
15 | SO_CFLAGS=-shared $(CFLAGS) | ||
16 | L_CFLAGS=$(CFLAGS) | ||
17 | @@ -44,8 +43,8 @@ $(libaio_objs) $(libaio_sobjs): libaio.h vsys_def.h | ||
18 | |||
19 | libaio.a: $(libaio_objs) | ||
20 | rm -f libaio.a | ||
21 | - ar r libaio.a $^ | ||
22 | - ranlib libaio.a | ||
23 | + $(AR) r libaio.a $^ | ||
24 | + $(RANLIB) libaio.a | ||
25 | |||
26 | $(libname): $(libaio_sobjs) libaio.map | ||
27 | $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS) | ||
diff --git a/meta/recipes-extended/libaio/libaio_0.3.109.bb b/meta/recipes-extended/libaio/libaio_0.3.109.bb new file mode 100644 index 0000000000..978f5f5fb5 --- /dev/null +++ b/meta/recipes-extended/libaio/libaio_0.3.109.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "Asynchronous I/O library" | ||
2 | DESCRIPTION = "Asynchronous input/output library that uses the kernels native interface" | ||
3 | HOMEPAGE = "http://lse.sourceforge.net/io/aio.html" | ||
4 | |||
5 | LICENSE = "LGPLv2.1+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" | ||
7 | |||
8 | PR = "r2" | ||
9 | |||
10 | SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \ | ||
11 | file://00_arches.patch \ | ||
12 | file://toolchain.patch \ | ||
13 | file://destdir.patch \ | ||
14 | file://libaio_fix_for_x32.patch \ | ||
15 | file://libaio-generic.patch \ | ||
16 | file://libaio-aarch64.patch \ | ||
17 | file://libaio_fix_for_mips_syscalls.patch \ | ||
18 | " | ||
19 | |||
20 | SRC_URI[md5sum] = "435a5b16ca6198eaf01155263d855756" | ||
21 | SRC_URI[sha256sum] = "bf4a457253cbaab215aea75cb6e18dc8d95bbd507e9920661ff9bdd288c8778d" | ||
22 | |||
23 | EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}" | ||
24 | |||
25 | do_configure () { | ||
26 | sed -i 's#LINK_FLAGS=.*#LINK_FLAGS=$(LDFLAGS)#' src/Makefile | ||
27 | } | ||
28 | |||
29 | do_install () { | ||
30 | oe_runmake install DESTDIR=${D} | ||
31 | } | ||
diff --git a/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch b/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch new file mode 100644 index 0000000000..126f80e044 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 2f55d6bd308ea61975558c2469ae349dba297e89 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Sat, 22 Feb 2014 14:35:59 +0800 | ||
4 | Subject: [PATCH] Fix CVE-2013-0211 | ||
5 | |||
6 | This patch comes from:https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4 | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | |||
10 | Signed-off-by: Baogen shang <baogen.shang@windriver.com> | ||
11 | |||
12 | Update the patch because of uprev on 20140222 | ||
13 | |||
14 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
15 | --- | ||
16 | libarchive/archive_write.c | 4 ++++ | ||
17 | 1 file changed, 4 insertions(+) | ||
18 | |||
19 | diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c | ||
20 | index a3d1a33..a323588 100644 | ||
21 | --- a/libarchive/archive_write.c | ||
22 | +++ b/libarchive/archive_write.c | ||
23 | @@ -671,8 +671,12 @@ static ssize_t | ||
24 | _archive_write_data(struct archive *_a, const void *buff, size_t s) | ||
25 | { | ||
26 | struct archive_write *a = (struct archive_write *)_a; | ||
27 | + const size_t max_write = INT_MAX; | ||
28 | archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC, | ||
29 | ARCHIVE_STATE_DATA, "archive_write_data"); | ||
30 | + /* In particular, this catches attempts to pass negative values. */ | ||
31 | + if (s > max_write) | ||
32 | + s = max_write; | ||
33 | archive_clear_error(&a->archive); | ||
34 | return ((a->format_write_data)(a, buff, s)); | ||
35 | } | ||
36 | -- | ||
37 | 1.8.2.1 | ||
38 | |||
diff --git a/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch b/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch new file mode 100644 index 0000000000..346af91351 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Use pkg-config for the libxml2 dependency, not the -config script. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | RP 2014/5/22 | ||
6 | |||
7 | Index: libarchive-3.1.2/configure.ac | ||
8 | =================================================================== | ||
9 | --- libarchive-3.1.2.orig/configure.ac 2013-02-09 17:23:03.000000000 +0000 | ||
10 | +++ libarchive-3.1.2/configure.ac 2014-05-13 15:26:45.446499108 +0000 | ||
11 | @@ -329,10 +329,10 @@ | ||
12 | AS_HELP_STRING([--without-expat], [Don't build support for xar through expat])) | ||
13 | |||
14 | if test "x$with_xml2" != "xno"; then | ||
15 | - AC_PATH_PROG([XML2_CONFIG], [xml2-config],, [${PATH}]) | ||
16 | - if test "x$XML2_CONFIG" != "x"; then | ||
17 | - CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`" | ||
18 | - LIBS="${LIBS} `${XML2_CONFIG} --libs`" | ||
19 | + PKG_CHECK_MODULES(PKG_XML2, [libxml-2.0],,) | ||
20 | + if test "x$PKG_XML2_CFLAGS" != "x"; then | ||
21 | + CPPFLAGS="${CPPFLAGS} ${PKG_XML2_CFLAGS}" | ||
22 | + LIBS="${LIBS} ${PKG_XML2_LIBS}" | ||
23 | AC_CHECK_LIB(xml2,xmlInitParser,[true],AC_MSG_FAILURE(Missing xml2 library)) | ||
24 | else | ||
25 | AC_CHECK_LIB(xml2,xmlInitParser) | ||
diff --git a/meta/recipes-extended/libarchive/libarchive_3.1.2.bb b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb new file mode 100644 index 0000000000..96e2d500ed --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb | |||
@@ -0,0 +1,51 @@ | |||
1 | SUMMARY = "Support for reading various archive formats" | ||
2 | DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats" | ||
3 | HOMEPAGE = "http://www.libarchive.org/" | ||
4 | SECTION = "devel" | ||
5 | LICENSE = "BSD" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b4e3ffd607d6686c6cb2f63394370841" | ||
7 | |||
8 | DEPENDS = "e2fsprogs-native" | ||
9 | |||
10 | PACKAGECONFIG ?= "libxml2 zlib bz2" | ||
11 | |||
12 | PACKAGECONFIG_append_class-target = "\ | ||
13 | ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ | ||
14 | ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \ | ||
15 | ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \ | ||
16 | " | ||
17 | |||
18 | PACKAGECONFIG_append_class-nativesdk = " largefile" | ||
19 | |||
20 | PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," | ||
21 | PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr," | ||
22 | PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,," | ||
23 | PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib," | ||
24 | PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,bzip2," | ||
25 | PACKAGECONFIG[xz] = "--with-lzmadec --with-lzma,--without-lzmadec --without-lzma,xz," | ||
26 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl," | ||
27 | PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2," | ||
28 | PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat," | ||
29 | PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo," | ||
30 | PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle," | ||
31 | |||
32 | SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ | ||
33 | file://libarchive-CVE-2013-0211.patch \ | ||
34 | file://pkgconfig.patch \ | ||
35 | " | ||
36 | |||
37 | SRC_URI[md5sum] = "efad5a503f66329bb9d2f4308b5de98a" | ||
38 | SRC_URI[sha256sum] = "eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e" | ||
39 | |||
40 | inherit autotools-brokensep lib_package pkgconfig | ||
41 | |||
42 | CPPFLAGS += "-I${WORKDIR}/extra-includes" | ||
43 | |||
44 | do_configure[cleandirs] += "${WORKDIR}/extra-includes" | ||
45 | do_configure_prepend() { | ||
46 | # We just need the headers for some type constants, so no need to | ||
47 | # build all of e2fsprogs for the target | ||
48 | cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/ | ||
49 | } | ||
50 | |||
51 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch new file mode 100644 index 0000000000..3476bb9596 --- /dev/null +++ b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Upstream-Status: Inappropriate | ||
2 | |||
3 | automake 1.12.x has deprecated AM_PROG_MKDIR_P , and throws a warning for that, | ||
4 | and the warnings are treated as errors because of the -Werror parameter. | ||
5 | |||
6 | These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not | ||
7 | eliminated these deprecated macros yet. So disable the treatment of warnings | ||
8 | as errors until gettext is updated to remove the deprecated macros. | ||
9 | |||
10 | Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
11 | 2012/07/10 | ||
12 | |||
13 | Index: libidn-1.24/configure.ac | ||
14 | =================================================================== | ||
15 | --- libidn-1.24.orig/configure.ac | ||
16 | +++ libidn-1.24/configure.ac | ||
17 | @@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 2002-2011 Si | ||
18 | AC_CONFIG_AUX_DIR([build-aux]) | ||
19 | AC_CONFIG_MACRO_DIR([m4]) | ||
20 | AC_CONFIG_HEADERS(config.h) | ||
21 | -AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override]) | ||
22 | +AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override]) | ||
23 | AM_SILENT_RULES([yes]) | ||
24 | |||
25 | # Library code modified: REVISION++ | ||
diff --git a/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch b/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch new file mode 100644 index 0000000000..0863530f29 --- /dev/null +++ b/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Upstream-Status: Inappropriate [disable feature] | ||
2 | |||
3 | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> | ||
4 | diff -Nurdd libidn-1.26/doc/Makefile.am libidn-1.26/doc/Makefile.am | ||
5 | --- libidn-1.26/doc/Makefile.am 2012-09-18 11:25:45.000000000 +0300 | ||
6 | +++ libidn-1.26/doc/Makefile.am 2013-02-08 07:41:24.591431462 +0200 | ||
7 | @@ -49,15 +49,9 @@ | ||
8 | |||
9 | # Man pages. | ||
10 | |||
11 | -dist_man_MANS = idn.1 $(gdoc_MANS) | ||
12 | +dist_man_MANS = $(gdoc_MANS) | ||
13 | MAINTAINERCLEANFILES = $(dist_man_MANS) | ||
14 | |||
15 | -idn.1: $(top_srcdir)/src/idn.c $(top_srcdir)/src/idn.ggo \ | ||
16 | - $(top_srcdir)/configure.ac | ||
17 | - $(HELP2MAN) \ | ||
18 | - --name="Internationalized Domain Names command line tool" \ | ||
19 | - --output=$@ $(top_builddir)/src/idn$(EXEEXT) | ||
20 | - | ||
21 | # GDOC | ||
22 | |||
23 | GDOC_BIN = $(srcdir)/gdoc | ||
diff --git a/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch new file mode 100644 index 0000000000..20afd257be --- /dev/null +++ b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | This patch fixes following issue with automake 1.12 | ||
4 | |||
5 | | automake: warnings are treated as errors | ||
6 | | /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libidn.la': linking libtool libraries using a non-POSIX | ||
7 | | /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac' | ||
8 | |||
9 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
10 | 2012/05/03 | ||
11 | |||
12 | Index: libidn-1.24/configure.ac | ||
13 | =================================================================== | ||
14 | --- libidn-1.24.orig/configure.ac | ||
15 | +++ libidn-1.24/configure.ac | ||
16 | @@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17) | ||
17 | AC_SUBST(LT_REVISION, 7) | ||
18 | AC_SUBST(LT_AGE, 6) | ||
19 | |||
20 | +# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it | ||
21 | +m4_pattern_allow([AM_PROG_AR]) | ||
22 | +AM_PROG_AR | ||
23 | + | ||
24 | AC_PROG_CC | ||
25 | gl_EARLY | ||
26 | lgl_EARLY | ||
diff --git a/meta/recipes-extended/libidn/libidn_0.6.14.bb b/meta/recipes-extended/libidn/libidn_0.6.14.bb new file mode 100644 index 0000000000..ff8d345ccb --- /dev/null +++ b/meta/recipes-extended/libidn/libidn_0.6.14.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "Internationalized Domain Name support library" | ||
2 | DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group." | ||
3 | HOMEPAGE = "http://www.gnu.org/software/libidn/" | ||
4 | SECTION = "libs" | ||
5 | LICENSE = "LGPLv2.1+ & GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ | ||
7 | file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \ | ||
8 | file://lib/idna.h;beginline=6;endline=18;md5=1336e848ca7b8e25767c3c7e8fa38a89 \ | ||
9 | file://src/idn.c;beginline=6;endline=18;md5=56c89e359652a71cda128d75f0ffdac4" | ||
10 | PR = "r1" | ||
11 | |||
12 | inherit pkgconfig autotools gettext texinfo | ||
13 | |||
14 | SRC_URI = "http://alpha.gnu.org/gnu/libidn/${BPN}-${PV}.tar.gz" | ||
15 | |||
16 | SRC_URI[md5sum] = "040f012a45feb56168853998bb87ad4d" | ||
17 | SRC_URI[sha256sum] = "98910c2ad664bdf4eed2c2fff88e24f8882636ec9d26669366ff03b469c05ae3" | ||
18 | |||
19 | do_configure_prepend() { | ||
20 | # this version of libidn copies AC_USE_SYSTEM_EXTENSIONS from | ||
21 | # autoconf CVS because atm the autoconf it uses is a bit old | ||
22 | # now with cross autotool, that macro is already there and this | ||
23 | # local definition causes circular dependency. Actually AC_GNU_SOURCE | ||
24 | # is identical to AC_USE_SYSTEM_EXTENSIONS. So remove all local | ||
25 | # references to the latter here. | ||
26 | sed -i -e "/AC_REQUIRE(\[gl_USE_SYSTEM_EXTENSIONS/d" ${S}/lib/gl/m4/gnulib-comp.m4 | ||
27 | rm -f ${S}/lib/gl/m4/extensions.m4 | ||
28 | } | ||
29 | |||
30 | do_install_append() { | ||
31 | rm -rf ${D}${libdir}/Libidn.dll | ||
32 | } | ||
diff --git a/meta/recipes-extended/libidn/libidn_1.29.bb b/meta/recipes-extended/libidn/libidn_1.29.bb new file mode 100644 index 0000000000..04b534474d --- /dev/null +++ b/meta/recipes-extended/libidn/libidn_1.29.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | SUMMARY = "Internationalized Domain Name support library" | ||
2 | DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group." | ||
3 | HOMEPAGE = "http://www.gnu.org/software/libidn/" | ||
4 | SECTION = "libs" | ||
5 | LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b35f8839295dd730a55f1a19ec086217 \ | ||
7 | file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \ | ||
8 | file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ | ||
9 | file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
10 | file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
11 | file://lib/idna.h;endline=21;md5=61a0e126c0c5552290d9bfa57e407dd6 \ | ||
12 | file://src/idn.c;endline=20;md5=3f55c28bede16bd7b1244be73067d195" | ||
13 | |||
14 | inherit pkgconfig autotools gettext texinfo | ||
15 | |||
16 | SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \ | ||
17 | file://libidn_fix_for_automake-1.12.patch \ | ||
18 | file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \ | ||
19 | file://dont-depend-on-help2man.patch \ | ||
20 | " | ||
21 | |||
22 | SRC_URI[md5sum] = "2b67bb507207af379f9461e1307dc84b" | ||
23 | SRC_URI[sha256sum] = "fb82747dbbf9b36f703ed27293317d818d7e851d4f5773dedf3efa4db32a7c7c" | ||
24 | |||
25 | # command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3 | ||
26 | # so package command into a separate package | ||
27 | PACKAGES =+ "idn" | ||
28 | FILES_idn = "${bindir}/*" | ||
29 | |||
30 | EXTRA_OECONF = "--disable-csharp" | ||
31 | |||
32 | do_install_append() { | ||
33 | rm -rf ${D}${datadir}/emacs | ||
34 | } | ||
diff --git a/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch b/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch new file mode 100644 index 0000000000..4a785d344a --- /dev/null +++ b/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | Fix a possible overflow (reported by _FORTIFY_SOURCE=2) | ||
2 | |||
3 | Ported from Gentoo | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | |||
9 | Index: libtirpc-0.2.1/src/getrpcport.c | ||
10 | =================================================================== | ||
11 | --- libtirpc-0.2.1.orig/src/getrpcport.c | ||
12 | +++ libtirpc-0.2.1/src/getrpcport.c | ||
13 | @@ -54,11 +54,11 @@ getrpcport(host, prognum, versnum, proto | ||
14 | |||
15 | if ((hp = gethostbyname(host)) == NULL) | ||
16 | return (0); | ||
17 | + if (hp->h_length != sizeof(addr.sin_addr.s_addr)) | ||
18 | + return (0); | ||
19 | memset(&addr, 0, sizeof(addr)); | ||
20 | addr.sin_family = AF_INET; | ||
21 | addr.sin_port = 0; | ||
22 | - if (hp->h_length > sizeof(addr)) | ||
23 | - hp->h_length = sizeof(addr); | ||
24 | memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length); | ||
25 | /* Inconsistent interfaces need casts! :-( */ | ||
26 | return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum, | ||
diff --git a/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch b/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch new file mode 100644 index 0000000000..d003348af9 --- /dev/null +++ b/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | uclibc does not provide des functionality unlike eglibc so lets disable ssl support | ||
2 | |||
3 | Upstream-Status: Inappropriate [uclibc specific] | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | |||
6 | Index: libtirpc-0.2.3/src/rpc_soc.c | ||
7 | =================================================================== | ||
8 | --- libtirpc-0.2.3.orig/src/rpc_soc.c 2013-03-10 16:00:51.355282153 -0700 | ||
9 | +++ libtirpc-0.2.3/src/rpc_soc.c 2013-03-10 16:00:51.703282148 -0700 | ||
10 | @@ -520,6 +520,7 @@ | ||
11 | (resultproc_t) rpc_wrap_bcast, "udp"); | ||
12 | } | ||
13 | |||
14 | +#if 0 | ||
15 | /* | ||
16 | * Create the client des authentication object. Obsoleted by | ||
17 | * authdes_seccreate(). | ||
18 | @@ -551,6 +552,7 @@ | ||
19 | dummy = authdes_seccreate(servername, window, NULL, ckey); | ||
20 | return (dummy); | ||
21 | } | ||
22 | +#endif | ||
23 | |||
24 | /* | ||
25 | * Create a client handle for a unix connection. Obsoleted by clnt_vc_create() | ||
26 | Index: libtirpc-0.2.3/src/Makefile.am | ||
27 | =================================================================== | ||
28 | --- libtirpc-0.2.3.orig/src/Makefile.am 2013-03-10 16:00:51.355282153 -0700 | ||
29 | +++ libtirpc-0.2.3/src/Makefile.am 2013-03-10 16:00:51.703282148 -0700 | ||
30 | @@ -50,7 +50,7 @@ | ||
31 | rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \ | ||
32 | rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \ | ||
33 | svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ | ||
34 | - auth_time.c auth_des.c authdes_prot.c | ||
35 | + auth_time.c | ||
36 | |||
37 | ## XDR | ||
38 | libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c | ||
diff --git a/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb new file mode 100644 index 0000000000..3edf002497 --- /dev/null +++ b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "Transport-Independent RPC library" | ||
2 | DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux" | ||
3 | SECTION = "libs/network" | ||
4 | HOMEPAGE = "http://sourceforge.net/projects/libtirpc/" | ||
5 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784" | ||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \ | ||
8 | file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" | ||
9 | |||
10 | DEPENDS += "xz-native" | ||
11 | PROVIDES = "virtual/librpc" | ||
12 | |||
13 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \ | ||
14 | ${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \ | ||
15 | file://libtirpc-0.2.1-fortify.patch \ | ||
16 | " | ||
17 | |||
18 | SRC_URI_append_libc-uclibc = " file://remove-des-uclibc.patch" | ||
19 | |||
20 | SRC_URI[libtirpc.md5sum] = "8cd41a5ef5a9b50d0fb6abb98af15368" | ||
21 | SRC_URI[libtirpc.sha256sum] = "62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db" | ||
22 | SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445" | ||
23 | SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83" | ||
24 | |||
25 | inherit autotools pkgconfig | ||
26 | |||
27 | EXTRA_OECONF = "--disable-gssapi" | ||
28 | |||
29 | do_configure_prepend () { | ||
30 | cp -r ${S}/../tirpc ${S} | ||
31 | } | ||
32 | |||
33 | do_install_append() { | ||
34 | chown root:root ${D}${sysconfdir}/netconfig | ||
35 | } | ||
diff --git a/meta/recipes-extended/libuser/libuser/fixsepbuild.patch b/meta/recipes-extended/libuser/libuser/fixsepbuild.patch new file mode 100644 index 0000000000..893ca1490b --- /dev/null +++ b/meta/recipes-extended/libuser/libuser/fixsepbuild.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | Fix out of tree build errors and parallel make issues. The mkdir commands | ||
2 | can race each other. The srcdir variable is a complete path so a ../ prefix makes | ||
3 | no sense. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | RP 2013/03/21 | ||
8 | |||
9 | Index: libuser-0.58/docs/Makefile.am | ||
10 | =================================================================== | ||
11 | --- libuser-0.58.orig/docs/Makefile.am 2012-11-07 18:25:58.000000000 -0800 | ||
12 | +++ libuser-0.58/docs/Makefile.am 2013-03-22 23:32:06.843518069 -0700 | ||
13 | @@ -8,14 +8,14 @@ | ||
14 | |||
15 | all: sgml/libuser.txt sgml/libuser.html | ||
16 | |||
17 | -libuser.conf.5: $(srcdir)/libuser.conf.5.in Makefile | ||
18 | +libuser.conf.5: $(abs_srcdir)/libuser.conf.5.in Makefile | ||
19 | sed 's,@sysconfdir\@,$(sysconfdir),g' \ | ||
20 | - < $(srcdir)/libuser.conf.5.in > $@ | ||
21 | + < $(abs_srcdir)/libuser.conf.5.in > $@ | ||
22 | |||
23 | -sgml/libuser.txt: $(srcdir)/sgml/libuser.sgml | ||
24 | - [ -d sgml ] || mkdir sgml | ||
25 | - cd sgml; sgml2txt ../$(srcdir)/sgml/libuser.sgml | ||
26 | +sgml/libuser.txt: $(abs_srcdir)/sgml/libuser.sgml | ||
27 | + [ -d sgml ] || mkdir sgml || true | ||
28 | + cd sgml; sgml2txt $(abs_srcdir)/sgml/libuser.sgml | ||
29 | |||
30 | -sgml/libuser.html: $(srcdir)/sgml/libuser.sgml | ||
31 | - [ -d sgml ] || mkdir sgml | ||
32 | - cd sgml; sgml2html ../$(srcdir)/sgml/libuser.sgml | ||
33 | +sgml/libuser.html: $(abs_srcdir)/sgml/libuser.sgml | ||
34 | + [ -d sgml ] || mkdir sgml || true | ||
35 | + cd sgml; sgml2html $(abs_srcdir)/sgml/libuser.sgml | ||
diff --git a/meta/recipes-extended/libuser/libuser_0.60.bb b/meta/recipes-extended/libuser/libuser_0.60.bb new file mode 100644 index 0000000000..e6316ef488 --- /dev/null +++ b/meta/recipes-extended/libuser/libuser_0.60.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "user and group account administration library" | ||
2 | DESCRIPTION = "The libuser library implements a standardized interface for manipulating and administering user \ | ||
3 | and group accounts" | ||
4 | HOMEPAGE = "https://fedorahosted.org/libuser/" | ||
5 | BUGTRACKER = "https://fedorahosted.org/libuser/newticket" | ||
6 | |||
7 | LICENSE = "LGPLv2" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ | ||
9 | file://lib/user.h;endline=19;md5=76b301f63c39fa992062395efbdc9558 \ | ||
10 | file://samples/testuser.c;endline=19;md5=3b87fa660fa3f4a6bb31d624afe30ba1" | ||
11 | |||
12 | SECTION = "base" | ||
13 | |||
14 | SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \ | ||
15 | file://fixsepbuild.patch" | ||
16 | |||
17 | SRC_URI[md5sum] = "5c549724999ccca65ceaaecc4eb8cb98" | ||
18 | SRC_URI[sha256sum] = "b1f73408ebfee79eb01a47c5879a2cdef6a00b75ee24870de7df1b816ff483eb" | ||
19 | |||
20 | DEPENDS = "popt libpam glib-2.0 xz-native docbook-utils-native linuxdoc-tools-native python" | ||
21 | |||
22 | inherit autotools gettext pythonnative python-dir pkgconfig | ||
23 | |||
24 | EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}" | ||
25 | |||
26 | PACKAGES += "${PN}-python " | ||
27 | |||
28 | FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug" | ||
29 | FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" | ||
30 | |||
diff --git a/meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd b/meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd new file mode 100644 index 0000000000..f5f1c377b6 --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd | |||
@@ -0,0 +1 @@ | |||
<html><body><h1>It works!</h1></body></html> | |||
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd b/meta/recipes-extended/lighttpd/lighttpd/lighttpd new file mode 100644 index 0000000000..bf89a60b7d --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
4 | DAEMON=/usr/sbin/lighttpd | ||
5 | NAME=lighttpd | ||
6 | DESC="Lighttpd Web Server" | ||
7 | OPTS="-f /etc/lighttpd.conf" | ||
8 | |||
9 | case "$1" in | ||
10 | start) | ||
11 | echo -n "Starting $DESC: " | ||
12 | start-stop-daemon --start -x "$DAEMON" -- $OPTS | ||
13 | echo "$NAME." | ||
14 | ;; | ||
15 | stop) | ||
16 | echo -n "Stopping $DESC: " | ||
17 | start-stop-daemon --stop -x "$DAEMON" | ||
18 | echo "$NAME." | ||
19 | ;; | ||
20 | restart|force-reload) | ||
21 | echo -n "Restarting $DESC: " | ||
22 | start-stop-daemon --stop -x "$DAEMON" | ||
23 | sleep 1 | ||
24 | start-stop-daemon --start -x "$DAEMON" -- $OPTS | ||
25 | echo "$NAME." | ||
26 | ;; | ||
27 | *) | ||
28 | N=/etc/init.d/$NAME | ||
29 | echo "Usage: $N {start|stop|restart|force-reload}" >&2 | ||
30 | exit 1 | ||
31 | ;; | ||
32 | esac | ||
33 | |||
34 | exit 0 | ||
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf new file mode 100644 index 0000000000..6e8402d242 --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf | |||
@@ -0,0 +1,331 @@ | |||
1 | # lighttpd configuration file | ||
2 | # | ||
3 | # use it as a base for lighttpd 1.0.0 and above | ||
4 | # | ||
5 | # $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $ | ||
6 | |||
7 | ############ Options you really have to take care of #################### | ||
8 | |||
9 | ## modules to load | ||
10 | # at least mod_access and mod_accesslog should be loaded | ||
11 | # all other module should only be loaded if really neccesary | ||
12 | # - saves some time | ||
13 | # - saves memory | ||
14 | server.modules = ( | ||
15 | # "mod_rewrite", | ||
16 | # "mod_redirect", | ||
17 | # "mod_alias", | ||
18 | "mod_access", | ||
19 | # "mod_cml", | ||
20 | # "mod_trigger_b4_dl", | ||
21 | # "mod_auth", | ||
22 | # "mod_status", | ||
23 | # "mod_setenv", | ||
24 | # "mod_fastcgi", | ||
25 | # "mod_proxy", | ||
26 | # "mod_simple_vhost", | ||
27 | # "mod_evhost", | ||
28 | # "mod_userdir", | ||
29 | # "mod_cgi", | ||
30 | # "mod_compress", | ||
31 | # "mod_ssi", | ||
32 | # "mod_usertrack", | ||
33 | # "mod_expire", | ||
34 | # "mod_secdownload", | ||
35 | # "mod_rrdtool", | ||
36 | # "mod_webdav", | ||
37 | "mod_accesslog" ) | ||
38 | |||
39 | ## a static document-root, for virtual-hosting take look at the | ||
40 | ## server.virtual-* options | ||
41 | server.document-root = "/www/pages/" | ||
42 | |||
43 | ## where to send error-messages to | ||
44 | server.errorlog = "/www/logs/lighttpd.error.log" | ||
45 | |||
46 | # files to check for if .../ is requested | ||
47 | index-file.names = ( "index.php", "index.html", | ||
48 | "index.htm", "default.htm" ) | ||
49 | |||
50 | ## set the event-handler (read the performance section in the manual) | ||
51 | # server.event-handler = "freebsd-kqueue" # needed on OS X | ||
52 | |||
53 | # mimetype mapping | ||
54 | mimetype.assign = ( | ||
55 | ".pdf" => "application/pdf", | ||
56 | ".sig" => "application/pgp-signature", | ||
57 | ".spl" => "application/futuresplash", | ||
58 | ".class" => "application/octet-stream", | ||
59 | ".ps" => "application/postscript", | ||
60 | ".torrent" => "application/x-bittorrent", | ||
61 | ".dvi" => "application/x-dvi", | ||
62 | ".gz" => "application/x-gzip", | ||
63 | ".pac" => "application/x-ns-proxy-autoconfig", | ||
64 | ".swf" => "application/x-shockwave-flash", | ||
65 | ".tar.gz" => "application/x-tgz", | ||
66 | ".tgz" => "application/x-tgz", | ||
67 | ".tar" => "application/x-tar", | ||
68 | ".zip" => "application/zip", | ||
69 | ".mp3" => "audio/mpeg", | ||
70 | ".m3u" => "audio/x-mpegurl", | ||
71 | ".wma" => "audio/x-ms-wma", | ||
72 | ".wax" => "audio/x-ms-wax", | ||
73 | ".ogg" => "application/ogg", | ||
74 | ".wav" => "audio/x-wav", | ||
75 | ".gif" => "image/gif", | ||
76 | ".jpg" => "image/jpeg", | ||
77 | ".jpeg" => "image/jpeg", | ||
78 | ".png" => "image/png", | ||
79 | ".xbm" => "image/x-xbitmap", | ||
80 | ".xpm" => "image/x-xpixmap", | ||
81 | ".xwd" => "image/x-xwindowdump", | ||
82 | ".css" => "text/css", | ||
83 | ".html" => "text/html", | ||
84 | ".htm" => "text/html", | ||
85 | ".js" => "text/javascript", | ||
86 | ".asc" => "text/plain", | ||
87 | ".c" => "text/plain", | ||
88 | ".cpp" => "text/plain", | ||
89 | ".log" => "text/plain", | ||
90 | ".conf" => "text/plain", | ||
91 | ".text" => "text/plain", | ||
92 | ".txt" => "text/plain", | ||
93 | ".dtd" => "text/xml", | ||
94 | ".xml" => "text/xml", | ||
95 | ".mpeg" => "video/mpeg", | ||
96 | ".mpg" => "video/mpeg", | ||
97 | ".mov" => "video/quicktime", | ||
98 | ".qt" => "video/quicktime", | ||
99 | ".avi" => "video/x-msvideo", | ||
100 | ".asf" => "video/x-ms-asf", | ||
101 | ".asx" => "video/x-ms-asf", | ||
102 | ".wmv" => "video/x-ms-wmv", | ||
103 | ".bz2" => "application/x-bzip", | ||
104 | ".tbz" => "application/x-bzip-compressed-tar", | ||
105 | ".tar.bz2" => "application/x-bzip-compressed-tar" | ||
106 | ) | ||
107 | |||
108 | # Use the "Content-Type" extended attribute to obtain mime type if possible | ||
109 | #mimetype.use-xattr = "enable" | ||
110 | |||
111 | |||
112 | ## send a different Server: header | ||
113 | ## be nice and keep it at lighttpd | ||
114 | # server.tag = "lighttpd" | ||
115 | |||
116 | #### accesslog module | ||
117 | accesslog.filename = "/www/logs/access.log" | ||
118 | debug.log-request-handling = "enable" | ||
119 | |||
120 | |||
121 | |||
122 | |||
123 | ## deny access the file-extensions | ||
124 | # | ||
125 | # ~ is for backupfiles from vi, emacs, joe, ... | ||
126 | # .inc is often used for code includes which should in general not be part | ||
127 | # of the document-root | ||
128 | url.access-deny = ( "~", ".inc" ) | ||
129 | |||
130 | $HTTP["url"] =~ "\.pdf$" { | ||
131 | server.range-requests = "disable" | ||
132 | } | ||
133 | |||
134 | ## | ||
135 | # which extensions should not be handle via static-file transfer | ||
136 | # | ||
137 | # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi | ||
138 | static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) | ||
139 | |||
140 | ######### Options that are good to be but not neccesary to be changed ####### | ||
141 | |||
142 | ## bind to port (default: 80) | ||
143 | #server.port = 81 | ||
144 | |||
145 | ## bind to localhost (default: all interfaces) | ||
146 | #server.bind = "grisu.home.kneschke.de" | ||
147 | |||
148 | ## error-handler for status 404 | ||
149 | #server.error-handler-404 = "/error-handler.html" | ||
150 | #server.error-handler-404 = "/error-handler.php" | ||
151 | |||
152 | ## to help the rc.scripts | ||
153 | #server.pid-file = "/var/run/lighttpd.pid" | ||
154 | |||
155 | |||
156 | ###### virtual hosts | ||
157 | ## | ||
158 | ## If you want name-based virtual hosting add the next three settings and load | ||
159 | ## mod_simple_vhost | ||
160 | ## | ||
161 | ## document-root = | ||
162 | ## virtual-server-root + virtual-server-default-host + virtual-server-docroot | ||
163 | ## or | ||
164 | ## virtual-server-root + http-host + virtual-server-docroot | ||
165 | ## | ||
166 | #simple-vhost.server-root = "/home/weigon/wwwroot/servers/" | ||
167 | #simple-vhost.default-host = "grisu.home.kneschke.de" | ||
168 | #simple-vhost.document-root = "/pages/" | ||
169 | |||
170 | |||
171 | ## | ||
172 | ## Format: <errorfile-prefix><status-code>.html | ||
173 | ## -> ..../status-404.html for 'File not found' | ||
174 | #server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-" | ||
175 | |||
176 | ## virtual directory listings | ||
177 | #dir-listing.activate = "enable" | ||
178 | |||
179 | ## enable debugging | ||
180 | #debug.log-request-header = "enable" | ||
181 | #debug.log-response-header = "enable" | ||
182 | #debug.log-request-handling = "enable" | ||
183 | #debug.log-file-not-found = "enable" | ||
184 | |||
185 | ### only root can use these options | ||
186 | # | ||
187 | # chroot() to directory (default: no chroot() ) | ||
188 | #server.chroot = "/" | ||
189 | |||
190 | ## change uid to <uid> (default: don't care) | ||
191 | #server.username = "wwwrun" | ||
192 | |||
193 | ## change uid to <uid> (default: don't care) | ||
194 | #server.groupname = "wwwrun" | ||
195 | |||
196 | #### compress module | ||
197 | #compress.cache-dir = "/tmp/lighttpd/cache/compress/" | ||
198 | #compress.filetype = ("text/plain", "text/html") | ||
199 | |||
200 | #### proxy module | ||
201 | ## read proxy.txt for more info | ||
202 | #proxy.server = ( ".php" => | ||
203 | # ( "localhost" => | ||
204 | # ( | ||
205 | # "host" => "192.168.0.101", | ||
206 | # "port" => 80 | ||
207 | # ) | ||
208 | # ) | ||
209 | # ) | ||
210 | |||
211 | #### fastcgi module | ||
212 | ## read fastcgi.txt for more info | ||
213 | ## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini | ||
214 | #fastcgi.server = ( ".php" => | ||
215 | # ( "localhost" => | ||
216 | # ( | ||
217 | # "socket" => "/tmp/php-fastcgi.socket", | ||
218 | # "bin-path" => "/usr/local/bin/php" | ||
219 | # ) | ||
220 | # ) | ||
221 | # ) | ||
222 | |||
223 | #### CGI module | ||
224 | #cgi.assign = ( ".pl" => "/usr/bin/perl", | ||
225 | # ".cgi" => "/usr/bin/perl" ) | ||
226 | # | ||
227 | |||
228 | #### SSL engine | ||
229 | #ssl.engine = "enable" | ||
230 | #ssl.pemfile = "server.pem" | ||
231 | |||
232 | #### status module | ||
233 | #status.status-url = "/server-status" | ||
234 | #status.config-url = "/server-config" | ||
235 | |||
236 | #### auth module | ||
237 | ## read authentication.txt for more info | ||
238 | #auth.backend = "plain" | ||
239 | #auth.backend.plain.userfile = "lighttpd.user" | ||
240 | #auth.backend.plain.groupfile = "lighttpd.group" | ||
241 | |||
242 | #auth.backend.ldap.hostname = "localhost" | ||
243 | #auth.backend.ldap.base-dn = "dc=my-domain,dc=com" | ||
244 | #auth.backend.ldap.filter = "(uid=$)" | ||
245 | |||
246 | #auth.require = ( "/server-status" => | ||
247 | # ( | ||
248 | # "method" => "digest", | ||
249 | # "realm" => "download archiv", | ||
250 | # "require" => "user=jan" | ||
251 | # ), | ||
252 | # "/server-config" => | ||
253 | # ( | ||
254 | # "method" => "digest", | ||
255 | # "realm" => "download archiv", | ||
256 | # "require" => "valid-user" | ||
257 | # ) | ||
258 | # ) | ||
259 | |||
260 | #### url handling modules (rewrite, redirect, access) | ||
261 | #url.rewrite = ( "^/$" => "/server-status" ) | ||
262 | #url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" ) | ||
263 | |||
264 | #### both rewrite/redirect support back reference to regex conditional using %n | ||
265 | #$HTTP["host"] =~ "^www\.(.*)" { | ||
266 | # url.redirect = ( "^/(.*)" => "http://%1/$1" ) | ||
267 | #} | ||
268 | |||
269 | # | ||
270 | # define a pattern for the host url finding | ||
271 | # %% => % sign | ||
272 | # %0 => domain name + tld | ||
273 | # %1 => tld | ||
274 | # %2 => domain name without tld | ||
275 | # %3 => subdomain 1 name | ||
276 | # %4 => subdomain 2 name | ||
277 | # | ||
278 | #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/" | ||
279 | |||
280 | #### expire module | ||
281 | #expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes") | ||
282 | |||
283 | #### ssi | ||
284 | #ssi.extension = ( ".shtml" ) | ||
285 | |||
286 | #### rrdtool | ||
287 | #rrdtool.binary = "/usr/bin/rrdtool" | ||
288 | #rrdtool.db-name = "/var/www/lighttpd.rrd" | ||
289 | |||
290 | #### setenv | ||
291 | #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) | ||
292 | #setenv.add-response-header = ( "X-Secret-Message" => "42" ) | ||
293 | |||
294 | ## for mod_trigger_b4_dl | ||
295 | # trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db" | ||
296 | # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" ) | ||
297 | # trigger-before-download.trigger-url = "^/trigger/" | ||
298 | # trigger-before-download.download-url = "^/download/" | ||
299 | # trigger-before-download.deny-url = "http://127.0.0.1/index.html" | ||
300 | # trigger-before-download.trigger-timeout = 10 | ||
301 | |||
302 | ## for mod_cml | ||
303 | ## don't forget to add index.cml to server.indexfiles | ||
304 | # cml.extension = ".cml" | ||
305 | # cml.memcache-hosts = ( "127.0.0.1:11211" ) | ||
306 | |||
307 | #### variable usage: | ||
308 | ## variable name without "." is auto prefixed by "var." and becomes "var.bar" | ||
309 | #bar = 1 | ||
310 | #var.mystring = "foo" | ||
311 | |||
312 | ## integer add | ||
313 | #bar += 1 | ||
314 | ## string concat, with integer cast as string, result: "www.foo1.com" | ||
315 | #server.name = "www." + mystring + var.bar + ".com" | ||
316 | ## array merge | ||
317 | #index-file.names = (foo + ".php") + index-file.names | ||
318 | #index-file.names += (foo + ".php") | ||
319 | |||
320 | #### include | ||
321 | #include /etc/lighttpd/lighttpd-inc.conf | ||
322 | ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf" | ||
323 | #include "lighttpd-inc.conf" | ||
324 | |||
325 | #### include_shell | ||
326 | #include_shell "echo var.a=1" | ||
327 | ## the above is same as: | ||
328 | #var.a=1 | ||
329 | |||
330 | # include other config file fragments from lighttpd.d subdir | ||
331 | include_shell "find /etc/lighttpd.d -maxdepth 1 -name '*.conf' -exec cat {} \;" | ||
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service new file mode 100644 index 0000000000..66a907aa17 --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=Lightning Fast Webserver With Light System Requirements | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | ExecStartPre=@SBINDIR@/lighttpd -t -f @SYSCONFDIR@/lighttpd.conf | ||
7 | ExecStart=@SBINDIR@/lighttpd -D -f @SYSCONFDIR@/lighttpd.conf | ||
8 | ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
12 | |||
diff --git a/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch b/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch new file mode 100644 index 0000000000..e395f928ce --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Use pkg-config for pcre dependency instead of -config script. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | RP 2014/5/22 | ||
6 | |||
7 | |||
8 | Index: lighttpd-1.4.35/configure.ac | ||
9 | =================================================================== | ||
10 | --- lighttpd-1.4.35.orig/configure.ac 2014-03-06 14:08:00.000000000 +0000 | ||
11 | +++ lighttpd-1.4.35/configure.ac 2014-05-13 16:58:30.758471169 +0000 | ||
12 | @@ -309,16 +309,14 @@ | ||
13 | AC_MSG_RESULT([$WITH_PCRE]) | ||
14 | |||
15 | if test "$WITH_PCRE" != "no"; then | ||
16 | - AC_PATH_PROG(PCRECONFIG, pcre-config) | ||
17 | - | ||
18 | - if test x"$PCRECONFIG" != x; then | ||
19 | - PCRE_LIB=`$PCRECONFIG --libs` | ||
20 | - CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`" | ||
21 | + PKG_CHECK_MODULES(PCREPKG, [libpcre], [ | ||
22 | + PCRE_LIB=${PCREPKG_LIBS} | ||
23 | + CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}" | ||
24 | AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre]) | ||
25 | AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h]) | ||
26 | - else | ||
27 | + ], [ | ||
28 | AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre]) | ||
29 | - fi | ||
30 | + ]) | ||
31 | fi | ||
32 | |||
33 | AC_SUBST(PCRE_LIB) | ||
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb new file mode 100644 index 0000000000..20d5c1caa0 --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb | |||
@@ -0,0 +1,77 @@ | |||
1 | SUMMARY = "Lightweight high-performance web server" | ||
2 | HOMEPAGE = "http://www.lighttpd.net/" | ||
3 | BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues" | ||
4 | |||
5 | LICENSE = "BSD" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579" | ||
7 | |||
8 | PR = "r1" | ||
9 | |||
10 | SECTION = "net" | ||
11 | DEPENDS = "zlib libpcre" | ||
12 | RDEPENDS_${PN} += " \ | ||
13 | lighttpd-module-access \ | ||
14 | lighttpd-module-accesslog \ | ||
15 | lighttpd-module-indexfile \ | ||
16 | lighttpd-module-dirlisting \ | ||
17 | lighttpd-module-staticfile \ | ||
18 | " | ||
19 | |||
20 | |||
21 | SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.bz2 \ | ||
22 | file://index.html.lighttpd \ | ||
23 | file://lighttpd.conf \ | ||
24 | file://lighttpd \ | ||
25 | file://lighttpd.service \ | ||
26 | file://pkgconfig.patch \ | ||
27 | " | ||
28 | |||
29 | SRC_URI[md5sum] = "f7a88130ee9984b421ad8aa80629750a" | ||
30 | SRC_URI[sha256sum] = "4a71c1f6d8af41ed894b507720c4c17184dc320590013881d5170ca7f15c5bf7" | ||
31 | |||
32 | EXTRA_OECONF = " \ | ||
33 | --without-bzip2 \ | ||
34 | --without-ldap \ | ||
35 | --without-lua \ | ||
36 | --without-memcache \ | ||
37 | --with-pcre \ | ||
38 | --without-webdav-props \ | ||
39 | --without-webdav-locks \ | ||
40 | --without-openssl \ | ||
41 | --disable-static \ | ||
42 | " | ||
43 | |||
44 | inherit autotools pkgconfig update-rc.d gettext systemd | ||
45 | |||
46 | INITSCRIPT_NAME = "lighttpd" | ||
47 | INITSCRIPT_PARAMS = "defaults 70" | ||
48 | |||
49 | SYSTEMD_SERVICE_${PN} = "lighttpd.service" | ||
50 | |||
51 | do_install_append() { | ||
52 | install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav | ||
53 | install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d | ||
54 | install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir} | ||
55 | install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html | ||
56 | |||
57 | install -d ${D}${systemd_unitdir}/system | ||
58 | install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system | ||
59 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
60 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
61 | -e 's,@BASE_BINDIR@,${base_bindir},g' \ | ||
62 | ${D}${systemd_unitdir}/system/lighttpd.service | ||
63 | #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data | ||
64 | ln -sf ${localstatedir}/log ${D}/www/logs | ||
65 | ln -sf ${localstatedir}/tmp ${D}/www/var | ||
66 | } | ||
67 | |||
68 | FILES_${PN} += "${sysconfdir} /www" | ||
69 | |||
70 | CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf" | ||
71 | |||
72 | PACKAGES_DYNAMIC += "^lighttpd-module-.*" | ||
73 | |||
74 | python populate_packages_prepend () { | ||
75 | lighttpd_libdir = d.expand('${libdir}') | ||
76 | do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') | ||
77 | } | ||
diff --git a/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch new file mode 100644 index 0000000000..ce64040d5f --- /dev/null +++ b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch | |||
@@ -0,0 +1,134 @@ | |||
1 | Act as the "mv" command when rotate log | ||
2 | |||
3 | Act as the "mv" command when rotate log, first rename, if failed, then | ||
4 | read and write. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | |||
8 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
9 | --- | ||
10 | logrotate.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- | ||
11 | 1 file changed, 56 insertions(+), 9 deletions(-) | ||
12 | |||
13 | diff --git a/logrotate.c b/logrotate.c | ||
14 | index 174a26b..b18b629 100644 | ||
15 | --- a/logrotate.c | ||
16 | +++ b/logrotate.c | ||
17 | @@ -906,6 +906,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force) | ||
18 | return 0; | ||
19 | } | ||
20 | |||
21 | +/* Act as the "mv" command, if rename failed, then read the old file and | ||
22 | + * write to new file. The function which invokes the mvFile will use | ||
23 | + * the strerror(errorno) to handle the error message, so we don't have | ||
24 | + * to print the error message here */ | ||
25 | + | ||
26 | +int mvFile (char *oldName, char *newName, struct logInfo *log, acl_type acl) | ||
27 | +{ | ||
28 | + struct stat sbprev; | ||
29 | + int fd_old, fd_new, n; | ||
30 | + char buf[BUFSIZ]; | ||
31 | + | ||
32 | + /* Do the rename first */ | ||
33 | + if (!rename(oldName, newName)) | ||
34 | + return 0; | ||
35 | + | ||
36 | + /* If the errno is EXDEV, then read old file, write newfile and | ||
37 | + * remove the oldfile */ | ||
38 | + if (errno == EXDEV) { | ||
39 | + /* Open the old file to read */ | ||
40 | + if ((fd_old = open(oldName, O_RDONLY)) < 0) | ||
41 | + return 1; | ||
42 | + | ||
43 | + /* Create the file to write, keep the same attribute as the old file */ | ||
44 | + if (stat(oldName, &sbprev)) | ||
45 | + return 1; | ||
46 | + else { | ||
47 | + if ((fd_new = createOutputFile(newName, | ||
48 | + O_WRONLY | O_CREAT | O_TRUNC, &sbprev, acl, 0)) < 0 ) | ||
49 | + return 1; | ||
50 | + } | ||
51 | + | ||
52 | + /* Read and write */ | ||
53 | + while ((n = read(fd_old, buf, BUFSIZ)) > 0) | ||
54 | + if (write(fd_new, buf, n) != n) | ||
55 | + return 1; | ||
56 | + | ||
57 | + if ((close(fd_old) < 0) || | ||
58 | + removeLogFile(oldName, log) || | ||
59 | + (close(fd_new) < 0)) | ||
60 | + return 1; | ||
61 | + | ||
62 | + return 0; | ||
63 | + } | ||
64 | + | ||
65 | + return 1; | ||
66 | +} | ||
67 | + | ||
68 | int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | ||
69 | struct logNames *rotNames) | ||
70 | { | ||
71 | @@ -1268,15 +1315,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | ||
72 | } | ||
73 | |||
74 | message(MESS_DEBUG, | ||
75 | - "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n", | ||
76 | + "moving %s to %s (rotatecount %d, logstart %d, i %d), \n", | ||
77 | oldName, newName, rotateCount, logStart, i); | ||
78 | |||
79 | - if (!debug && rename(oldName, newName)) { | ||
80 | + if (!debug && mvFile(oldName, newName, log, prev_acl)) { | ||
81 | if (errno == ENOENT) { | ||
82 | message(MESS_DEBUG, "old log %s does not exist\n", | ||
83 | oldName); | ||
84 | } else { | ||
85 | - message(MESS_ERROR, "error renaming %s to %s: %s\n", | ||
86 | + message(MESS_ERROR, "error moving %s to %s: %s\n", | ||
87 | oldName, newName, strerror(errno)); | ||
88 | hasErrors = 1; | ||
89 | } | ||
90 | @@ -1408,11 +1455,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | ||
91 | } | ||
92 | } | ||
93 | #endif /* WITH_ACL */ | ||
94 | - message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], | ||
95 | + message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], | ||
96 | rotNames->finalName); | ||
97 | if (!debug && !hasErrors && | ||
98 | - rename(log->files[logNum], rotNames->finalName)) { | ||
99 | - message(MESS_ERROR, "failed to rename %s to %s: %s\n", | ||
100 | + mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { | ||
101 | + message(MESS_ERROR, "failed to move %s to %s: %s\n", | ||
102 | log->files[logNum], rotNames->finalName, | ||
103 | strerror(errno)); | ||
104 | hasErrors = 1; | ||
105 | @@ -1775,7 +1822,7 @@ int rotateLogSet(struct logInfo *log, int force) | ||
106 | return hasErrors; | ||
107 | } | ||
108 | |||
109 | -static int writeState(char *stateFilename) | ||
110 | +static int writeState(struct logInfo *log, char *stateFilename) | ||
111 | { | ||
112 | struct logState *p; | ||
113 | FILE *f; | ||
114 | @@ -1939,7 +1986,7 @@ static int writeState(char *stateFilename) | ||
115 | fclose(f); | ||
116 | |||
117 | if (error == 0) { | ||
118 | - if (rename(tmpFilename, stateFilename)) { | ||
119 | + if (mvFile(tmpFilename, stateFilename, log, prev_acl)) { | ||
120 | unlink(tmpFilename); | ||
121 | error = 1; | ||
122 | message(MESS_ERROR, "error renaming temp state file %s\n", | ||
123 | @@ -2223,7 +2270,7 @@ int main(int argc, const char **argv) | ||
124 | rc |= rotateLogSet(log, force); | ||
125 | |||
126 | if (!debug) | ||
127 | - rc |= writeState(stateFile); | ||
128 | + rc |= writeState(log, stateFile); | ||
129 | |||
130 | return (rc != 0); | ||
131 | } | ||
132 | -- | ||
133 | 1.7.10.4 | ||
134 | |||
diff --git a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch new file mode 100644 index 0000000000..43068bdbd7 --- /dev/null +++ b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | Disable the check for different filesystems | ||
2 | |||
3 | The logrotate supports rotate log across different filesystems now, so | ||
4 | disable the check for different filesystems. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | |||
8 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
9 | --- | ||
10 | config.c | 8 -------- | ||
11 | 1 files changed, 0 insertions(+), 8 deletions(-) | ||
12 | |||
13 | diff --git a/config.c b/config.c | ||
14 | index a85d1df..24575b3 100644 | ||
15 | --- a/config.c | ||
16 | +++ b/config.c | ||
17 | @@ -1453,14 +1453,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig) | ||
18 | dirName, strerror(errno)); | ||
19 | goto error; | ||
20 | } | ||
21 | - | ||
22 | - if (sb.st_dev != sb2.st_dev) { | ||
23 | - message(MESS_ERROR, | ||
24 | - "%s:%d olddir %s and log file %s " | ||
25 | - "are on different devices\n", configFile, | ||
26 | - lineNum, newlog->oldDir, newlog->files[i]); | ||
27 | - goto error; | ||
28 | - } | ||
29 | } | ||
30 | } | ||
31 | |||
32 | -- | ||
33 | 1.7.4.1 | ||
34 | |||
diff --git a/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch b/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch new file mode 100644 index 0000000000..ed2750e9c3 --- /dev/null +++ b/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | logrotate: fix for CVE-2011-1548 | ||
4 | |||
5 | If a logfile is a symlink, it may be read when being compressed, being | ||
6 | copied (copy, copytruncate) or mailed. Secure data (eg. password files) | ||
7 | may be exposed. | ||
8 | |||
9 | Portback nofollow.patch from: | ||
10 | http://logrotate.sourcearchive.com/downloads/3.8.1-5/logrotate_3.8.1-5.debian.tar.gz | ||
11 | |||
12 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
13 | |||
14 | --- | ||
15 | --- a/logrotate.c 2012-09-06 13:25:08.000000000 +0800 | ||
16 | +++ b/logrotate.c 2012-09-06 13:35:57.000000000 +0800 | ||
17 | @@ -390,7 +390,7 @@ | ||
18 | compressedName = alloca(strlen(name) + strlen(log->compress_ext) + 2); | ||
19 | sprintf(compressedName, "%s%s", name, log->compress_ext); | ||
20 | |||
21 | - if ((inFile = open(name, O_RDWR)) < 0) { | ||
22 | + if ((inFile = open(name, O_RDWR | O_NOFOLLOW)) < 0) { | ||
23 | message(MESS_ERROR, "unable to open %s for compression\n", name); | ||
24 | return 1; | ||
25 | } | ||
26 | @@ -470,7 +470,7 @@ | ||
27 | char *mailArgv[] = { mailCommand, "-s", subject, address, NULL }; | ||
28 | int rc = 0; | ||
29 | |||
30 | - if ((mailInput = open(logFile, O_RDONLY)) < 0) { | ||
31 | + if ((mailInput = open(logFile, O_RDONLY | O_NOFOLLOW)) < 0) { | ||
32 | message(MESS_ERROR, "failed to open %s for mailing: %s\n", logFile, | ||
33 | strerror(errno)); | ||
34 | return 1; | ||
35 | @@ -561,7 +561,7 @@ | ||
36 | message(MESS_DEBUG, "copying %s to %s\n", currLog, saveLog); | ||
37 | |||
38 | if (!debug) { | ||
39 | - if ((fdcurr = open(currLog, (flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR)) < 0) { | ||
40 | + if ((fdcurr = open(currLog, ((flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR) | O_NOFOLLOW)) < 0) { | ||
41 | message(MESS_ERROR, "error opening %s: %s\n", currLog, | ||
42 | strerror(errno)); | ||
43 | return 1; | ||
diff --git a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch new file mode 100644 index 0000000000..517acdd27e --- /dev/null +++ b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Update the manual | ||
2 | |||
3 | Update the manual for rotating on different filesystems. | ||
4 | |||
5 | Upstream-Status: Submitted | ||
6 | |||
7 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
8 | --- | ||
9 | logrotate.8 | 7 +++---- | ||
10 | 1 files changed, 3 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/logrotate.8 b/logrotate.8 | ||
13 | index 8b34167..5f15432 100644 | ||
14 | --- a/logrotate.8 | ||
15 | +++ b/logrotate.8 | ||
16 | @@ -374,10 +374,9 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option). | ||
17 | .TP | ||
18 | \fBolddir \fIdirectory\fR | ||
19 | Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR | ||
20 | -must be on the same physical device as the log file being rotated, | ||
21 | -and is assumed to be relative to the directory holding the log file | ||
22 | -unless an absolute path name is specified. When this option is used all | ||
23 | -old versions of the log end up in \fIdirectory\fR. This option may be | ||
24 | +is assumed to be relative to the directory holding the log file unless | ||
25 | +an absolute path name is specified. When this option is used all old | ||
26 | +versions of the log end up in \fIdirectory\fR. This option may be | ||
27 | overridden by the \fBnoolddir\fR option. | ||
28 | |||
29 | .TP | ||
30 | -- | ||
31 | 1.7.4.1 | ||
32 | |||
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb new file mode 100644 index 0000000000..faa8e0264f --- /dev/null +++ b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb | |||
@@ -0,0 +1,56 @@ | |||
1 | SUMMARY = "Rotates, compresses, removes and mails system log files" | ||
2 | SECTION = "console/utils" | ||
3 | HOMEPAGE = "https://fedorahosted.org/logrotate/" | ||
4 | LICENSE = "GPLv2" | ||
5 | |||
6 | DEPENDS="coreutils popt" | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" | ||
9 | |||
10 | SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \ | ||
11 | file://act-as-mv-when-rotate.patch \ | ||
12 | file://disable-check-different-filesystems.patch \ | ||
13 | file://update-the-manual.patch \ | ||
14 | " | ||
15 | |||
16 | SRC_URI[md5sum] = "99e08503ef24c3e2e3ff74cc5f3be213" | ||
17 | SRC_URI[sha256sum] = "f6ba691f40e30e640efa2752c1f9499a3f9738257660994de70a45fe00d12b64" | ||
18 | |||
19 | PACKAGECONFIG ?= "\ | ||
20 | ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ | ||
21 | ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ | ||
22 | " | ||
23 | |||
24 | # If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our | ||
25 | # optimization variables, so use it rather than EXTRA_CFLAGS. | ||
26 | EXTRA_OEMAKE = "\ | ||
27 | LFS= \ | ||
28 | OS_NAME='${OS_NAME}' \ | ||
29 | \ | ||
30 | 'CC=${CC}' \ | ||
31 | 'RPM_OPT_FLAGS=${CFLAGS}' \ | ||
32 | 'EXTRA_LDFLAGS=${LDFLAGS}' \ | ||
33 | \ | ||
34 | ${@base_contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \ | ||
35 | ${@base_contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \ | ||
36 | " | ||
37 | |||
38 | # OS_NAME in the makefile defaults to `uname -s`. The behavior for | ||
39 | # freebsd/netbsd is questionable, so leave it as Linux, which only sets | ||
40 | # INSTALL=install and BASEDIR=/usr. | ||
41 | OS_NAME = "Linux" | ||
42 | |||
43 | do_compile_prepend() { | ||
44 | # Make sure the recompile is OK | ||
45 | rm -f ${B}/.depend | ||
46 | } | ||
47 | |||
48 | do_install(){ | ||
49 | oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} BINDIR=${bindir} | ||
50 | mkdir -p ${D}${sysconfdir}/logrotate.d | ||
51 | mkdir -p ${D}${sysconfdir}/cron.daily | ||
52 | mkdir -p ${D}${localstatedir}/lib | ||
53 | install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf | ||
54 | install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate | ||
55 | touch ${D}${localstatedir}/lib/logrotate.status | ||
56 | } | ||
diff --git a/meta/recipes-extended/lsb/lsb/init-functions b/meta/recipes-extended/lsb/lsb/init-functions new file mode 100755 index 0000000000..7c1dce24cf --- /dev/null +++ b/meta/recipes-extended/lsb/lsb/init-functions | |||
@@ -0,0 +1,44 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # LSB initscript functions, as defined in the LSB Spec 1.1.0 | ||
4 | # | ||
5 | # Lawrence Lim <llim@core.com> - Tue, 26 June 2007 | ||
6 | # Updated to the latest LSB 3.1 spec | ||
7 | # http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt | ||
8 | |||
9 | start_daemon () { | ||
10 | /etc/core-lsb/lsb_start_daemon "$@" | ||
11 | } | ||
12 | |||
13 | killproc () { | ||
14 | /etc/core-lsb/lsb_killproc "$@" | ||
15 | } | ||
16 | |||
17 | pidofproc () { | ||
18 | /etc/core-lsb/lsb_pidofproc "$@" | ||
19 | } | ||
20 | |||
21 | log_success_msg () { | ||
22 | /etc/core-lsb/lsb_log_message success "$@" | ||
23 | } | ||
24 | |||
25 | log_failure_msg () { | ||
26 | /etc/core-lsb/lsb_log_message failure "$@" | ||
27 | } | ||
28 | |||
29 | log_warning_msg () { | ||
30 | /etc/core-lsb/lsb_log_message warning "$@" | ||
31 | } | ||
32 | |||
33 | # int log_begin_message (char *message) | ||
34 | log_begin_msg () { | ||
35 | if [ -z "$1" ]; then | ||
36 | return 1 | ||
37 | fi | ||
38 | echo " * $@" | ||
39 | } | ||
40 | |||
41 | |||
42 | log_end_msg () { | ||
43 | /etc/core-lsb/lsb_log_message end "$@" | ||
44 | } | ||
diff --git a/meta/recipes-extended/lsb/lsb/lsb_killproc b/meta/recipes-extended/lsb/lsb/lsb_killproc new file mode 100755 index 0000000000..866c1a9c63 --- /dev/null +++ b/meta/recipes-extended/lsb/lsb/lsb_killproc | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | . /etc/init.d/functions | ||
4 | |||
5 | LSB=LSB-1.1 killproc $* | ||
6 | exit $? | ||
diff --git a/meta/recipes-extended/lsb/lsb/lsb_log_message b/meta/recipes-extended/lsb/lsb/lsb_log_message new file mode 100755 index 0000000000..10343b0819 --- /dev/null +++ b/meta/recipes-extended/lsb/lsb/lsb_log_message | |||
@@ -0,0 +1,27 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | . /etc/init.d/functions | ||
4 | |||
5 | ACTION=$1 | ||
6 | shift | ||
7 | |||
8 | case "$ACTION" in | ||
9 | success) | ||
10 | echo -n $* | ||
11 | success "$*" | ||
12 | echo | ||
13 | ;; | ||
14 | failure) | ||
15 | echo -n $* | ||
16 | failure "$*" | ||
17 | echo | ||
18 | ;; | ||
19 | warning) | ||
20 | echo -n $* | ||
21 | warning "$*" | ||
22 | echo | ||
23 | ;; | ||
24 | *) | ||
25 | ;; | ||
26 | esac | ||
27 | exit 0 | ||
diff --git a/meta/recipes-extended/lsb/lsb/lsb_pidofproc b/meta/recipes-extended/lsb/lsb/lsb_pidofproc new file mode 100755 index 0000000000..6d1fd0f249 --- /dev/null +++ b/meta/recipes-extended/lsb/lsb/lsb_pidofproc | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | . /etc/init.d/functions | ||
4 | |||
5 | pidofproc $* | ||
6 | exit $? | ||
diff --git a/meta/recipes-extended/lsb/lsb/lsb_start_daemon b/meta/recipes-extended/lsb/lsb/lsb_start_daemon new file mode 100755 index 0000000000..de62c2344d --- /dev/null +++ b/meta/recipes-extended/lsb/lsb/lsb_start_daemon | |||
@@ -0,0 +1,45 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | . /etc/init.d/functions | ||
4 | |||
5 | nice= | ||
6 | force= | ||
7 | pidfile= | ||
8 | user= | ||
9 | check= | ||
10 | RETVAL= | ||
11 | while [ "$1" != "${1##[-+]}" ]; do | ||
12 | case $1 in | ||
13 | -f) | ||
14 | force="--force" | ||
15 | shift | ||
16 | ;; | ||
17 | -n) | ||
18 | nice=$2 | ||
19 | shift 2 | ||
20 | ;; | ||
21 | -p) | ||
22 | pidfile="--pidfile $2" | ||
23 | shift 2 | ||
24 | ;; | ||
25 | -u) | ||
26 | user="--user $2" | ||
27 | shift 2 | ||
28 | ;; | ||
29 | -c) | ||
30 | check="--check $2" | ||
31 | shift 2 | ||
32 | ;; | ||
33 | *) | ||
34 | echo "Unknown Option $1" | ||
35 | echo "Options are:" | ||
36 | echo "-f" | ||
37 | echo "-p {pidfile}" | ||
38 | echo "-n [+/-nicelevel]" | ||
39 | echo "-u {user}" | ||
40 | echo "-c {base}" | ||
41 | exit 1;; | ||
42 | esac | ||
43 | done | ||
44 | LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $* | ||
45 | exit $? | ||
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb new file mode 100644 index 0000000000..d265731e04 --- /dev/null +++ b/meta/recipes-extended/lsb/lsb_4.1.bb | |||
@@ -0,0 +1,121 @@ | |||
1 | SUMMARY = "LSB support for OpenEmbedded" | ||
2 | SECTION = "console/utils" | ||
3 | HOMEPAGE = "http://prdownloads.sourceforge.net/lsb" | ||
4 | LICENSE = "GPLv2+" | ||
5 | PR = "r2" | ||
6 | |||
7 | # lsb_release needs getopt | ||
8 | RDEPENDS_${PN} += "util-linux" | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf" | ||
11 | |||
12 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \ | ||
13 | file://init-functions \ | ||
14 | file://lsb_killproc \ | ||
15 | file://lsb_log_message \ | ||
16 | file://lsb_pidofproc \ | ||
17 | file://lsb_start_daemon \ | ||
18 | " | ||
19 | |||
20 | SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4" | ||
21 | SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172" | ||
22 | S = "${WORKDIR}/lsb-release-1.4" | ||
23 | |||
24 | do_install(){ | ||
25 | oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D} | ||
26 | |||
27 | # this 2 dirs are needed by package lsb-dist-checker | ||
28 | mkdir -p ${D}${sysconfdir}/opt | ||
29 | mkdir -p ${D}${localstatedir}/opt | ||
30 | |||
31 | mkdir -p ${D}${base_bindir} | ||
32 | mkdir -p ${D}/${baselib} | ||
33 | mkdir -p ${D}${sysconfdir}/lsb-release.d | ||
34 | printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release | ||
35 | |||
36 | if [ "${TARGET_ARCH}" = "i586" ];then | ||
37 | printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release | ||
38 | else | ||
39 | printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release | ||
40 | fi | ||
41 | echo "\"" >> ${D}${sysconfdir}/lsb-release | ||
42 | echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release | ||
43 | echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release | ||
44 | if [ -n "${DISTRO_CODENAME}" ]; then | ||
45 | echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release | ||
46 | fi | ||
47 | echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release | ||
48 | |||
49 | if [ "${TARGET_ARCH}" = "i586" ];then | ||
50 | mkdir -p ${D}${sysconfdir}/lsb-release.d | ||
51 | touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch | ||
52 | touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch | ||
53 | touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32 | ||
54 | touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32 | ||
55 | elif [ "${TARGET_ARCH}" = "x86_64" ];then | ||
56 | touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch | ||
57 | touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64 | ||
58 | touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64 | ||
59 | fi | ||
60 | if [ "${TARGET_ARCH}" = "powerpc" ];then | ||
61 | touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch | ||
62 | touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32 | ||
63 | touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32 | ||
64 | elif [ "${TARGET_ARCH}" = "powerpc64" ];then | ||
65 | touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch | ||
66 | touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64 | ||
67 | touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64 | ||
68 | fi | ||
69 | } | ||
70 | |||
71 | do_install_append(){ | ||
72 | install -d ${D}${sysconfdir}/core-lsb | ||
73 | install -d ${D}/${baselib}/lsb | ||
74 | for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon | ||
75 | do | ||
76 | install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb | ||
77 | done | ||
78 | install -m 0755 ${WORKDIR}/init-functions ${D}/${baselib}/lsb | ||
79 | |||
80 | # creat links for LSB test | ||
81 | install -d ${D}/usr/lib/lsb | ||
82 | ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd | ||
83 | ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd | ||
84 | install -d ${D}/${libdir} | ||
85 | ln -sf ${sbindir}/sendmail ${D}/${libdir}/sendmail | ||
86 | |||
87 | if [ "${TARGET_ARCH}" = "x86_64" ];then | ||
88 | cd ${D} | ||
89 | if [ "${baselib}" != "lib64" ]; then | ||
90 | ln -sf ${baselib} lib64 | ||
91 | fi | ||
92 | cd ${D}/${baselib} | ||
93 | ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2 | ||
94 | ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 | ||
95 | fi | ||
96 | if [ "${TARGET_ARCH}" = "i586" ];then | ||
97 | cd ${D}/${baselib} | ||
98 | ln -sf ld-linux.so.2 ld-lsb.so.2 | ||
99 | ln -sf ld-linux.so.2 ld-lsb.so.3 | ||
100 | fi | ||
101 | |||
102 | if [ "${TARGET_ARCH}" = "powerpc64" ];then | ||
103 | cd ${D} | ||
104 | if [ "${baselib}" != "lib64" ]; then | ||
105 | ln -sf ${baselib} lib64 | ||
106 | fi | ||
107 | cd ${D}/${baselib} | ||
108 | ln -sf ld64.so.1 ld-lsb-ppc64.so.2 | ||
109 | ln -sf ld64.so.1 ld-lsb-ppc64.so.3 | ||
110 | fi | ||
111 | if [ "${TARGET_ARCH}" = "powerpc" ];then | ||
112 | cd ${D}/${baselib} | ||
113 | ln -sf ld.so.1 ld-lsb-ppc32.so.2 | ||
114 | ln -sf ld.so.1 ld-lsb-ppc32.so.3 | ||
115 | fi | ||
116 | } | ||
117 | FILES_${PN} += "/lib64 \ | ||
118 | /usr/lib/lsb \ | ||
119 | ${base_libdir}/lsb/* \ | ||
120 | ${libdir}/sendmail \ | ||
121 | " | ||
diff --git a/meta/recipes-extended/lsb/lsbinitscripts/functions.patch b/meta/recipes-extended/lsb/lsbinitscripts/functions.patch new file mode 100644 index 0000000000..a756d047ef --- /dev/null +++ b/meta/recipes-extended/lsb/lsbinitscripts/functions.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> | ||
4 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
5 | |||
6 | Index: initscripts-9.43/rc.d/init.d/functions | ||
7 | =================================================================== | ||
8 | --- initscripts-9.43.orig/rc.d/init.d/functions | ||
9 | +++ initscripts-9.43/rc.d/init.d/functions | ||
10 | @@ -13,6 +13,7 @@ umask 022 | ||
11 | PATH="/sbin:/usr/sbin:/bin:/usr/bin" | ||
12 | export PATH | ||
13 | |||
14 | + | ||
15 | if [ $PPID -ne 1 -a -z "$SYSTEMCTL_SKIP_REDIRECT" ] && \ | ||
16 | ( /bin/mountpoint -q /cgroup/systemd || /bin/mountpoint -q /sys/fs/cgroup/systemd ) ; then | ||
17 | case "$0" in | ||
18 | @@ -54,7 +55,7 @@ systemctl_redirect () { | ||
19 | [ -z "${COLUMNS:-}" ] && COLUMNS=80 | ||
20 | |||
21 | if [ -z "${CONSOLETYPE:-}" ]; then | ||
22 | - if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then | ||
23 | + if [ -c "/dev/stderr" -a -r "/dev/stderr" -a -e /sbin/consoletype ]; then | ||
24 | CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)" | ||
25 | else | ||
26 | CONSOLETYPE="serial" | ||
diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.55.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.55.bb new file mode 100644 index 0000000000..6ab52e3f17 --- /dev/null +++ b/meta/recipes-extended/lsb/lsbinitscripts_9.55.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "SysV init scripts which are only used in an LSB image" | ||
2 | SECTION = "base" | ||
3 | LICENSE = "GPLv2" | ||
4 | DEPENDS = "popt glib-2.0" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6" | ||
7 | |||
8 | S="${WORKDIR}/initscripts-${PV}" | ||
9 | SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-9.55.tar.bz2/0672f648a9ee8607a2df65835c54f5e5/initscripts-9.55.tar.bz2 \ | ||
10 | file://functions.patch \ | ||
11 | " | ||
12 | |||
13 | SRC_URI[md5sum] = "0672f648a9ee8607a2df65835c54f5e5" | ||
14 | SRC_URI[sha256sum] = "546d4403a4efa3c4fa6de06a195013d4e64738799c2c779e56d900e7b232a9fa" | ||
15 | |||
16 | inherit update-alternatives | ||
17 | |||
18 | ALTERNATIVE_PRIORITY = "100" | ||
19 | ALTERNATIVE_${PN} = "functions" | ||
20 | ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions" | ||
21 | |||
22 | # Since we are only taking the patched version of functions, no need to | ||
23 | # configure or compile anything so do not execute these | ||
24 | do_configure[noexec] = "1" | ||
25 | do_compile[noexec] = "1" | ||
26 | |||
27 | do_install(){ | ||
28 | install -d ${D}${sysconfdir}/init.d/ | ||
29 | install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions | ||
30 | } | ||
diff --git a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh new file mode 100644 index 0000000000..6dd1fe88cf --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | |||
@@ -0,0 +1,526 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Copyright (C) 2012 Wind River Systems, Inc. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License version 2 as | ||
7 | # published by the Free Software Foundation. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
12 | # See the GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License | ||
15 | # along with this program; if not, write to the Free Software | ||
16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | |||
18 | |||
19 | WORK_DIR="/opt/lsb-test" | ||
20 | |||
21 | if [ `id -u` -ne 0 ] | ||
22 | then | ||
23 | cat << EOF | ||
24 | In order to install and run LSB testsuite, you need administrator privileges. | ||
25 | You are currently running this script as an unprivileged user. | ||
26 | |||
27 | EOF | ||
28 | exit 1 | ||
29 | fi | ||
30 | |||
31 | ARCH=`uname -m` | ||
32 | if [ ${ARCH} != "i686" ] && [ ${ARCH} != "x86_64" ] && [ ${ARCH} != "ppc" ] && [ ${ARCH} != "ppc64" ] | ||
33 | then | ||
34 | echo "Error: Unsupported architecture" | ||
35 | exit 1 | ||
36 | fi | ||
37 | |||
38 | which rpm | ||
39 | if [ $? -ne 0 ] | ||
40 | then | ||
41 | echo "No rpm command found" | ||
42 | exit 1 | ||
43 | fi | ||
44 | |||
45 | RET=0 | ||
46 | |||
47 | cd ${WORK_DIR} || exit 1 | ||
48 | # Step 1: Download the LSB Packages | ||
49 | echo "" | ||
50 | echo "Download LSB packages..." | ||
51 | echo "" | ||
52 | |||
53 | if [ ! -e ./packages_list ] | ||
54 | then | ||
55 | echo "Error: Could not find packages list" >&2 | ||
56 | exit 1 | ||
57 | fi | ||
58 | |||
59 | . ./packages_list | ||
60 | |||
61 | PACKAGES_DIR="/var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb" | ||
62 | |||
63 | BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/${LSB_RELEASE}/binary" | ||
64 | RUNTIME_BASE_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/released-all/binary/runtime" | ||
65 | RUNTIME_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/${LSB_RELEASE}/binary/runtime" | ||
66 | APP_PACKAGES_DIR="${PACKAGES_DIR}/app-battery/${LSB_RELEASE}/${LSB_ARCH}" | ||
67 | APP_TESTFILES_DIR="${PACKAGES_DIR}/app-battery/tests" | ||
68 | SNAPSHOTS_TESTFILES_DIR="${PACKAGES_DIR}/snapshots/appbat/tests" | ||
69 | |||
70 | if [ ! -d ${PACKAGES_DIR} ] | ||
71 | then | ||
72 | mkdir -p ${PACKAGES_DIR} | ||
73 | fi | ||
74 | |||
75 | if [ ! -d ${BASE_PACKAGES_DIR} ] | ||
76 | then | ||
77 | mkdir -p ${BASE_PACKAGES_DIR} | ||
78 | fi | ||
79 | |||
80 | if [ ! -d ${RUNTIME_BASE_PACKAGES_DIR} ] | ||
81 | then | ||
82 | mkdir -p ${RUNTIME_BASE_PACKAGES_DIR} | ||
83 | fi | ||
84 | |||
85 | if [ ! -d ${RUNTIME_PACKAGES_DIR} ] | ||
86 | then | ||
87 | mkdir -p ${RUNTIME_PACKAGES_DIR} | ||
88 | fi | ||
89 | |||
90 | if [ ! -d ${APP_PACKAGES_DIR} ] | ||
91 | then | ||
92 | mkdir -p ${APP_PACKAGES_DIR} | ||
93 | fi | ||
94 | |||
95 | if [ ! -d ${APP_TESTFILES_DIR} ] | ||
96 | then | ||
97 | mkdir -p ${APP_TESTFILES_DIR} | ||
98 | fi | ||
99 | |||
100 | # Official download server list. You can replace them with your own server. | ||
101 | SERVER_IPADDR="140.211.169.28" | ||
102 | SERVER_NAME="ftp.linuxfoundation.org" | ||
103 | |||
104 | if ! `grep -F -q "${SERVER_NAME}" /etc/hosts`; then | ||
105 | echo "${SERVER_IPADDR} ${SERVER_NAME} ${SERVER_NAME}" >> /etc/hosts | ||
106 | fi | ||
107 | |||
108 | #ping -c 5 ${SERVER_NAME} | ||
109 | #if [ $? -ne 0 ] | ||
110 | #then | ||
111 | # echo "The server: ${SERVER_NAME} is unreachable" | ||
112 | # exit 1 | ||
113 | #fi | ||
114 | |||
115 | SERVER1="\ | ||
116 | http://${SERVER_NAME}/pub/lsb/base/${LSB_RELEASE}/binary" | ||
117 | SERVER2="\ | ||
118 | http://${SERVER_NAME}/pub/lsb/test_suites/archive/${LSB_REL}/" | ||
119 | SERVER3="\ | ||
120 | http://${SERVER_NAME}/pub/lsb/test_suites/${LSB_RELEASE}/binary/runtime" | ||
121 | SERVER4="\ | ||
122 | http://${SERVER_NAME}/pub/lsb/app-battery/${LSB_RELEASE}/${LSB_ARCH}" | ||
123 | SERVER5="\ | ||
124 | http://${SERVER_NAME}/pub/lsb/app-battery/tests" | ||
125 | |||
126 | # We using "curl" as a download tool, "wget" is an alternative. | ||
127 | CURL=`which curl` | ||
128 | WGET=`which wget` | ||
129 | if [ ! -z ${CURL} ] | ||
130 | then | ||
131 | DOWNLOAD_CMD="${CURL} -R -L -f --retry 3 --retry-delay 4 --connect-timeout 180 --compressed -C - -o" | ||
132 | elif [ ! -z ${WGET} ] | ||
133 | then | ||
134 | DOWNLOAD_CMD="${WGET} -c -t 5 -O" | ||
135 | else | ||
136 | echo "Can not find a download tool, please install curl or wget." | ||
137 | exit 1 | ||
138 | fi | ||
139 | |||
140 | cd ${BASE_PACKAGES_DIR} | ||
141 | for pkg in ${BASE_PACKAGES_LIST}; do | ||
142 | if [ ! -f ${pkg} ] | ||
143 | then | ||
144 | #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} > /dev/null 2>&1 | ||
145 | ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} | ||
146 | if [ $? -eq 0 ] | ||
147 | then | ||
148 | mv -f ${pkg}".#part" ${pkg} | ||
149 | echo "Download ${pkg} successfully." | ||
150 | else | ||
151 | echo "Download ${pkg} failed." | ||
152 | RET=1 | ||
153 | fi | ||
154 | fi | ||
155 | done | ||
156 | |||
157 | cd ${RUNTIME_BASE_PACKAGES_DIR} | ||
158 | for pkg in ${RUNTIME_BASE_PACKAGES_LIST}; do | ||
159 | if [ ! -f ${pkg} ] | ||
160 | then | ||
161 | #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} > /dev/null 2>&1 | ||
162 | ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} | ||
163 | if [ $? -eq 0 ] | ||
164 | then | ||
165 | mv -f ${pkg}".#part" ${pkg} | ||
166 | echo "Download ${pkg} successfully." | ||
167 | else | ||
168 | echo "Download ${pkg} failed." | ||
169 | RET=1 | ||
170 | fi | ||
171 | fi | ||
172 | done | ||
173 | |||
174 | cd ${RUNTIME_PACKAGES_DIR} | ||
175 | for pkg in ${RUNTIME_PACKAGES_LIST}; do | ||
176 | if [ ! -f ${pkg} ] | ||
177 | then | ||
178 | #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} > /dev/null 2>&1 | ||
179 | ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} | ||
180 | if [ $? -eq 0 ] | ||
181 | then | ||
182 | mv -f ${pkg}".#part" ${pkg} | ||
183 | echo "Download ${pkg} successfully." | ||
184 | else | ||
185 | echo "Download ${pkg} failed." | ||
186 | RET=1 | ||
187 | fi | ||
188 | fi | ||
189 | done | ||
190 | |||
191 | cd ${APP_PACKAGES_DIR} | ||
192 | for pkg in ${APP_PACKAGES_LIST}; do | ||
193 | if [ ! -f ${pkg} ] | ||
194 | then | ||
195 | #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} > /dev/null 2>&1 | ||
196 | ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} | ||
197 | if [ $? -eq 0 ] | ||
198 | then | ||
199 | mv -f ${pkg}".#part" ${pkg} | ||
200 | echo "Download ${pkg} successfully." | ||
201 | else | ||
202 | echo "Download ${pkg} failed." | ||
203 | RET=1 | ||
204 | fi | ||
205 | fi | ||
206 | done | ||
207 | |||
208 | cd ${APP_TESTFILES_DIR} | ||
209 | for pkg in ${APP_TESTFILES_LIST}; do | ||
210 | if [ ! -f ${pkg} ] | ||
211 | then | ||
212 | #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} > /dev/null 2>&1 | ||
213 | ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} | ||
214 | if [ $? -eq 0 ] | ||
215 | then | ||
216 | mv -f ${pkg}".#part" ${pkg} | ||
217 | echo "Download ${pkg} successfully." | ||
218 | else | ||
219 | echo "Download ${pkg} failed." | ||
220 | RET=1 | ||
221 | fi | ||
222 | fi | ||
223 | done | ||
224 | |||
225 | if [ ${RET} -ne 0 ] | ||
226 | then | ||
227 | echo "Download some packages failed. Please download them again." | ||
228 | exit 1 | ||
229 | fi | ||
230 | |||
231 | # Step 2: Install the LSB Packages | ||
232 | echo "" | ||
233 | echo "Install LSB packages..." | ||
234 | echo "" | ||
235 | |||
236 | # Kill lighttpd | ||
237 | ps aux | grep "lighttpd" | grep -v -q "grep" | ||
238 | if [ $? -eq 0 ] | ||
239 | then | ||
240 | killall lighttpd >/dev/null 2>&1 | ||
241 | fi | ||
242 | |||
243 | # Start avahi-daemon | ||
244 | ps aux | grep "avahi-daemon" | grep -v -q "grep" | ||
245 | if [ $? -ne 0 ] | ||
246 | then | ||
247 | /etc/init.d/avahi-daemon start >/dev/null 2>&1 | ||
248 | fi | ||
249 | |||
250 | LSB_START_CMD="/opt/lsb/test/manager/bin/dist-checker-start.pl" | ||
251 | LSB_STOP_CMD="/opt/lsb/test/manager/bin/dist-checker-stop.pl" | ||
252 | |||
253 | PLATFORM_FILE="/etc/rpm/platform" | ||
254 | |||
255 | RPM_INSTALL_CMD="rpm --quiet --nodeps --replacepkgs --nosignature -i" | ||
256 | RPM_INSTALL_CMD_NOSCRIPTS="rpm --quiet --nodeps --replacepkgs --noscripts --nosignature -i" | ||
257 | |||
258 | # If the lsb has been started, stop it first. | ||
259 | if [ -x ${LSB_STOP_CMD} ] | ||
260 | then | ||
261 | ${LSB_STOP_CMD} | ||
262 | fi | ||
263 | |||
264 | if [ ! -d /etc/rpm ] | ||
265 | then | ||
266 | mkdir -p /etc/rpm | ||
267 | fi | ||
268 | |||
269 | if [ ! -f ${PLATFORM_FILE} ] | ||
270 | then | ||
271 | touch ${PLATFORM_FILE} | ||
272 | fi | ||
273 | |||
274 | if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then | ||
275 | if [ ${ARCH} = i686 ];then | ||
276 | echo "i486-suse" >> ${PLATFORM_FILE} | ||
277 | echo "i486-noarch" >> ${PLATFORM_FILE} | ||
278 | echo "i486-pc" >> ${PLATFORM_FILE} | ||
279 | echo "noarch-suse" >> ${PLATFORM_FILE} | ||
280 | elif [ ${ARCH} = x86_64 ]; then | ||
281 | echo "i486-suse" >> ${PLATFORM_FILE} | ||
282 | echo "i486-noarch" >> ${PLATFORM_FILE} | ||
283 | echo "i486-pc" >> ${PLATFORM_FILE} | ||
284 | echo "i486-.*-linux.*" >> ${PLATFORM_FILE} | ||
285 | echo "noarch-suse" >> ${PLATFORM_FILE} | ||
286 | echo "${ARCH}-suse" >> ${PLATFORM_FILE} | ||
287 | echo "${ARCH}-noarch" >> ${PLATFORM_FILE} | ||
288 | echo "${ARCH}-pc" >> ${PLATFORM_FILE} | ||
289 | else | ||
290 | echo "${ARCH}-suse" >> ${PLATFORM_FILE} | ||
291 | echo "${ARCH}-noarch" >> ${PLATFORM_FILE} | ||
292 | echo "${ARCH}-pc" >> ${PLATFORM_FILE} | ||
293 | echo "noarch-suse" >> ${PLATFORM_FILE} | ||
294 | fi | ||
295 | fi | ||
296 | |||
297 | if [ -d ${BASE_PACKAGES_DIR} ] | ||
298 | then | ||
299 | cd ${BASE_PACKAGES_DIR} | ||
300 | for pkg in ${BASE_PACKAGES_LIST} | ||
301 | do | ||
302 | rpm --quiet -q ${pkg%\.*} | ||
303 | if [ $? -ne 0 ]; then | ||
304 | $RPM_INSTALL_CMD ${pkg} | ||
305 | fi | ||
306 | done | ||
307 | fi | ||
308 | |||
309 | if [ -d ${RUNTIME_BASE_PACKAGES_DIR} ] | ||
310 | then | ||
311 | cd ${RUNTIME_BASE_PACKAGES_DIR} | ||
312 | for pkg in ${RUNTIME_BASE_PACKAGES_LIST} | ||
313 | do | ||
314 | rpm --quiet -q ${pkg%\.*} | ||
315 | if [ $? -ne 0 ]; then | ||
316 | $RPM_INSTALL_CMD ${pkg} | ||
317 | fi | ||
318 | done | ||
319 | fi | ||
320 | |||
321 | if [ -d ${RUNTIME_PACKAGES_DIR} ] | ||
322 | then | ||
323 | cd ${RUNTIME_PACKAGES_DIR} | ||
324 | for pkg in ${RUNTIME_PACKAGES_LIST} | ||
325 | do | ||
326 | rpm --quiet -q ${pkg%\.*} | ||
327 | if [ $? -ne 0 ]; then | ||
328 | $RPM_INSTALL_CMD ${pkg} | ||
329 | fi | ||
330 | done | ||
331 | fi | ||
332 | |||
333 | if [ -d ${APP_PACKAGES_DIR} ] | ||
334 | then | ||
335 | cd ${APP_PACKAGES_DIR} | ||
336 | for pkg in ${APP_PACKAGES_LIST} | ||
337 | do | ||
338 | echo "${pkg}" | grep -q "apache\|xpdf" | ||
339 | if [ $? -eq 0 ] | ||
340 | then | ||
341 | rpm --quiet -q ${pkg%\.*} | ||
342 | if [ $? -ne 0 ]; then | ||
343 | $RPM_INSTALL_CMD_NOSCRIPTS ${pkg} | ||
344 | fi | ||
345 | else | ||
346 | rpm --quiet -q ${pkg%\.*} | ||
347 | if [ $? -ne 0 ]; then | ||
348 | $RPM_INSTALL_CMD ${pkg} | ||
349 | fi | ||
350 | fi | ||
351 | done | ||
352 | fi | ||
353 | |||
354 | if [ ! -d ${SNAPSHOTS_TESTFILES_DIR} ] | ||
355 | then | ||
356 | mkdir -p ${SNAPSHOTS_TESTFILES_DIR} | ||
357 | fi | ||
358 | |||
359 | if [ -d ${APP_TESTFILES_DIR} ] | ||
360 | then | ||
361 | cd ${APP_TESTFILES_DIR} | ||
362 | for pkg in ${APP_TESTFILES_LIST} | ||
363 | do | ||
364 | cp -f ${pkg} ${SNAPSHOTS_TESTFILES_DIR} | ||
365 | done | ||
366 | fi | ||
367 | |||
368 | cd ${WORK_DIR} | ||
369 | |||
370 | # Step 3: Set environment | ||
371 | echo "" | ||
372 | echo "Set environment..." | ||
373 | echo "" | ||
374 | |||
375 | check () | ||
376 | { | ||
377 | if [ $? -eq 0 ] | ||
378 | then | ||
379 | echo "PASS" | ||
380 | else | ||
381 | echo "FAIL" | ||
382 | exit 1 | ||
383 | fi | ||
384 | } | ||
385 | |||
386 | echo "" | ||
387 | echo "---------------------------------" | ||
388 | echo "Create the Dirnames on target" | ||
389 | |||
390 | if [ ! -d /etc/rpm/sysinfo ] | ||
391 | then | ||
392 | mkdir -p /etc/rpm/sysinfo | ||
393 | fi | ||
394 | |||
395 | cat > /etc/rpm/sysinfo/Dirnames << EOF | ||
396 | /etc/opt/lsb | ||
397 | /home/tet/LSB.tools | ||
398 | /opt/lsb-tet3-lite/lib/ksh | ||
399 | /opt/lsb-tet3-lite/lib/perl | ||
400 | /opt/lsb-tet3-lite/lib/posix_sh | ||
401 | /opt/lsb-tet3-lite/lib/tet3 | ||
402 | /opt/lsb-tet3-lite/lib/xpg3sh | ||
403 | /opt/lsb/appbat/lib/python2.4/site-packages/qm | ||
404 | /opt/lsb/appbat/lib/python2.4/site-packages/qm/external | ||
405 | /opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate | ||
406 | /opt/lsb/appbat/lib/python2.4/site-packages/qm/test | ||
407 | /opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes | ||
408 | /opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web | ||
409 | /opt/lsb/test/doc | ||
410 | /opt/lsb/test/lib | ||
411 | /opt/lsb/test/qm/diagnostics | ||
412 | /opt/lsb/test/qm/doc | ||
413 | /opt/lsb/test/qm/doc/test/html | ||
414 | /opt/lsb/test/qm/doc/test/print | ||
415 | /opt/lsb/test/qm/dtml | ||
416 | /opt/lsb/test/qm/dtml/test | ||
417 | /opt/lsb/test/qm/messages/test | ||
418 | /opt/lsb/test/qm/tutorial/test/tdb | ||
419 | /opt/lsb/test/qm/tutorial/test/tdb/QMTest | ||
420 | /opt/lsb/test/qm/web | ||
421 | /opt/lsb/test/qm/web/images | ||
422 | /opt/lsb/test/qm/web/stylesheets | ||
423 | /opt/lsb/test/qm/xml | ||
424 | /opt/lsb/test/share | ||
425 | /usr/share/doc/lsb-runtime-test | ||
426 | /var/opt/lsb | ||
427 | /opt/lsb/test/desktop | ||
428 | /opt/lsb/test/desktop/fontconfig | ||
429 | /opt/lsb/test/desktop/freetype | ||
430 | /opt/lsb/test/desktop/gtkvts | ||
431 | /opt/lsb/test/desktop/libpng | ||
432 | /opt/lsb/test/desktop/qt3 | ||
433 | /opt/lsb/test/desktop/xft | ||
434 | /opt/lsb/test/desktop/xml | ||
435 | /opt/lsb/test/desktop/xrender | ||
436 | |||
437 | |||
438 | EOF | ||
439 | |||
440 | if [ -f /etc/rpm/sysinfo/Dirnames ] | ||
441 | then | ||
442 | echo "Success to creat Dirnames file" | ||
443 | else | ||
444 | echo "Fail to creat Dirnames file" | ||
445 | fi | ||
446 | |||
447 | [ -x /sbin/ldconfig ] && { | ||
448 | echo "" | ||
449 | echo "---------------------------------" | ||
450 | echo "Update cache" | ||
451 | /sbin/ldconfig | ||
452 | check; | ||
453 | } | ||
454 | |||
455 | # Check loop device | ||
456 | if [ ! -b /dev/loop0 ] | ||
457 | then | ||
458 | insmod /lib/modules/`uname -r`/kernel/drivers/block/loop.ko | ||
459 | if [ $? != 0 ];then | ||
460 | echo "Insmod loop.ko failed." | ||
461 | fi | ||
462 | fi | ||
463 | |||
464 | # Resolve localhost | ||
465 | LOCALHOST=`hostname` | ||
466 | if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then | ||
467 | echo "127.0.0.1 $LOCALHOST" >> /etc/hosts | ||
468 | fi | ||
469 | |||
470 | # Workaround to add part of locales for LSB test | ||
471 | localedef -i de_DE -f ISO-8859-1 de_DE | ||
472 | localedef -i de_DE -f ISO-8859-15 de_DE.ISO-8859-15 | ||
473 | localedef -i de_DE -f UTF-8 de_DE.UTF-8 | ||
474 | localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro | ||
475 | localedef -i en_HK -f ISO-8859-1 en_HK | ||
476 | localedef -i en_PH -f ISO-8859-1 en_PH | ||
477 | localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15 | ||
478 | localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1 | ||
479 | localedef -i en_US -f ISO-8859-1 en_US | ||
480 | localedef -i en_US -f UTF-8 en_US.UTF-8 | ||
481 | localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1 | ||
482 | localedef -i es_MX -f ISO-8859-1 es_MX | ||
483 | localedef -i fr_FR -f ISO-8859-1 fr_FR | ||
484 | localedef -i it_IT -f ISO-8859-1 it_IT | ||
485 | localedef -i ja_JP -f EUC-JP ja_JP.eucjp | ||
486 | localedef -i se_NO -f UTF-8 se_NO.UTF-8 | ||
487 | localedef -i ta_IN -f UTF-8 ta_IN | ||
488 | localedef -i es_ES -f ISO-8859-1 es_ES | ||
489 | localedef -i fr_FR@euro -f ISO-8859-1 fr_FR@euro | ||
490 | localedef -i is_IS -f UTF-8 is_IS.UTF-8 | ||
491 | localedef -i zh_TW -f BIG5 zh_TW.BIG5 | ||
492 | localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15 | ||
493 | |||
494 | echo "" | ||
495 | echo "Installation done!" | ||
496 | echo "" | ||
497 | |||
498 | # Step 4: Start LSB test | ||
499 | if [ -x ${LSB_START_CMD} ] | ||
500 | then | ||
501 | ${LSB_START_CMD} | ||
502 | fi | ||
503 | |||
504 | echo "---------------------------------" | ||
505 | echo "Run all the certification version of LSB Tests" | ||
506 | echo "---------------------------------" | ||
507 | |||
508 | LSB_DIST_CHECKER="/opt/lsb/test/manager/utils/dist-checker.pl" | ||
509 | SESSION="${WORK_DIR}/session" | ||
510 | if [ ! -e ${SESSION} ] | ||
511 | then | ||
512 | echo "Error: Could not find session file." | ||
513 | echo "You must run LSB test from webbrower." | ||
514 | exit 1 | ||
515 | fi | ||
516 | |||
517 | if [ -x ${LSB_DIST_CHECKER} ] | ||
518 | then | ||
519 | ${LSB_DIST_CHECKER} -v2 -f ${SESSION} | ||
520 | check | ||
521 | fi | ||
522 | |||
523 | echo "" | ||
524 | echo "LSB test complete. Please check the log file in /var/opt/lsb/test/manager/results/" | ||
525 | echo "" | ||
526 | |||
diff --git a/meta/recipes-extended/lsb/lsbtest/packages_list b/meta/recipes-extended/lsb/lsbtest/packages_list new file mode 100644 index 0000000000..fa61c87516 --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest/packages_list | |||
@@ -0,0 +1,51 @@ | |||
1 | LSB_RELEASE="released-4.1.0" | ||
2 | LSB_REL="4.1.0" | ||
3 | LSB_ARCH="lsbarch" | ||
4 | |||
5 | BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm" | ||
6 | |||
7 | RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-4.1.0.12-1.targetarch.rpm \ | ||
8 | lsb-tet3-lite-3.7-23.lsb4.targetarch.rpm \ | ||
9 | lsb-tet3-lite-devel-3.7-23.lsb4.targetarch.rpm \ | ||
10 | lsb-xvfb-1.2.0-21.targetarch.rpm \ | ||
11 | " | ||
12 | |||
13 | RUNTIME_PACKAGES_LIST="lsb-cmdchk-4.1.4-5.targetarch.rpm \ | ||
14 | lsb-libchk-4.1.4-5.targetarch.rpm \ | ||
15 | lsb-qm-2.2-12.lsb4.targetarch.rpm \ | ||
16 | lsb-task-dist-testkit-4.1.9-1.noarch.rpm \ | ||
17 | lsb-test-core-4.1.15-1.targetarch.rpm \ | ||
18 | lsb-test-cpp-t2c-4.1.0-1.targetarch.rpm \ | ||
19 | lsb-test-desktop-4.1.9-1.targetarch.rpm \ | ||
20 | lsb-test-desktop-t2c-4.1.3-3.targetarch.rpm \ | ||
21 | lsb-test-libstdcpp-4.1.0-18.lsb4.targetarch.rpm \ | ||
22 | lsb-test-olver-core-4.1.4-1.targetarch.rpm \ | ||
23 | lsb-test-perl-4.1.8-1.noarch.rpm \ | ||
24 | lsb-test-printing-4.1.2-1.targetarch.rpm \ | ||
25 | lsb-test-python-4.1.5-1.targetarch.rpm \ | ||
26 | lsb-test-qt3-azov-4.1.1-3.targetarch.rpm \ | ||
27 | lsb-test-qt4-azov-4.1.3-1.targetarch.rpm \ | ||
28 | lsb-test-xts5-5.1.5-45.lsb4.targetarch.rpm \ | ||
29 | lsb-test-alsa-t2c-4.1.0-1.targetarch.rpm \ | ||
30 | lsb-test-core-t2c-4.1.2-3.targetarch.rpm \ | ||
31 | lsb-test-xml2-azov-4.1.0-1.targetarch.rpm \ | ||
32 | " | ||
33 | |||
34 | APP_PACKAGES_LIST="lsb-python-2.4.6-7.lsb4.targetarch.rpm \ | ||
35 | lsb-apache-2.2.14-8.lsb4.targetarch.rpm \ | ||
36 | lsb-tcl-8.5.7-8.lsb4.targetarch.rpm \ | ||
37 | lsb-expect-5.43.0-13.lsb4.targetarch.rpm \ | ||
38 | lsb-groff-1.20.1-7.lsb4.targetarch.rpm \ | ||
39 | lsb-raptor-1.4.19-5.lsb4.targetarch.rpm \ | ||
40 | lsb-xpdf-1.01-14.lsb4.targetarch.rpm \ | ||
41 | lsb-samba-3.4.3-9.lsb4.targetarch.rpm \ | ||
42 | lsb-rsync-3.0.6-6.lsb4.targetarch.rpm \ | ||
43 | " | ||
44 | |||
45 | APP_TESTFILES_LIST="expect-tests.tar \ | ||
46 | tcl-tests.tar \ | ||
47 | raptor-tests.tar \ | ||
48 | test1.pdf \ | ||
49 | test2.pdf \ | ||
50 | " | ||
51 | |||
diff --git a/meta/recipes-extended/lsb/lsbtest/session b/meta/recipes-extended/lsb/lsbtest/session new file mode 100644 index 0000000000..85ca2efe92 --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest/session | |||
@@ -0,0 +1,194 @@ | |||
1 | [GENERAL] | ||
2 | VERBOSE_LEVEL: 1 | ||
3 | ARCHITECTURE: targetarch | ||
4 | USE_INTERNET: 1 | ||
5 | STD_VERSION: LSB 4.1 | ||
6 | STD_PROFILE: no | ||
7 | [cmdchk] | ||
8 | RUN: 1 | ||
9 | VERSION: local|* | ||
10 | |||
11 | [libchk] | ||
12 | RUN: 1 | ||
13 | VERSION: local|* | ||
14 | |||
15 | [alsa-t2c] | ||
16 | RUN: 1 | ||
17 | VERSION: local|* | ||
18 | |||
19 | [alsa-t2c|local|*] | ||
20 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/alsa-t2c | ||
21 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/alsa-t2c/results | ||
22 | |||
23 | [core] | ||
24 | RUN: 1 | ||
25 | VERSION: local|* | ||
26 | |||
27 | [core|local|*] | ||
28 | AUTOREPLY_PROVIDES_BASH: n | ||
29 | AUTOREPLY_TESTRUN_PATH: /home/tet/test_sets | ||
30 | AUTOREPLY_PERSON: Automated | ||
31 | AUTOREPLY_KERNEL_NAME: vmlinuz | ||
32 | AUTOREPLY_INSTALL_LSBPAM_CONF: y | ||
33 | AUTOREPLY_PROVIDES_C_SHELL: n | ||
34 | AUTOREPLY_ORGANISATION: N/A | ||
35 | AUTOREPLY_SET_PASS_MIN_DAYS: y | ||
36 | AUTOREPLY_PROVIDES_SYSV_INIT: | ||
37 | AUTOREPLY_ISNTALL_DEVS: y | ||
38 | AUTOREPLY_SUPPORTS_FILE_CMD: y | ||
39 | AUTOREPLY_TEST_SYSTEM: Distribution Checker | ||
40 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core/tet/test_sets | ||
41 | AUTOREPLY_SUPPORTS_NLS: n | ||
42 | AUTOREPLY_SUPPORTS_PROCESS_ACCOUNTING: n | ||
43 | AUTOREPLY_PATH_TO_RC.D: | ||
44 | AUTOREPLY_ALLOWS_MAKEDEV: n | ||
45 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core/tet/test_sets/results | ||
46 | |||
47 | [core-t2c] | ||
48 | RUN: 1 | ||
49 | VERSION: local|* | ||
50 | |||
51 | [core-t2c|local|*] | ||
52 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core-t2c | ||
53 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core-t2c/results | ||
54 | |||
55 | [cpp-t2c] | ||
56 | RUN: 1 | ||
57 | VERSION: local|* | ||
58 | |||
59 | [cpp-t2c|local|*] | ||
60 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/cpp-t2c | ||
61 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/cpp-t2c/results | ||
62 | |||
63 | [desktop] | ||
64 | RUN: 1 | ||
65 | VERSION: local|* | ||
66 | |||
67 | [desktop|local|*] | ||
68 | AUTOREPLY_DESKTOP_ENVIRONMENT: [default] | ||
69 | AUTOREPLY_PERSON: Automated | ||
70 | AUTOREPLY_X_CLIENT_HOSTNAME: | ||
71 | AUTOREPLY_TEST_SYSTEM: Distribution Checker | ||
72 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop | ||
73 | AUTOREPLY_X11_FONT_PATH: [default] | ||
74 | AUTOREPLY_SHOW_SUMMARY_REPORT: | ||
75 | AUTOREPLY_ORGANISATION: N/A | ||
76 | AUTOREPLY_XVFB_DISPLAY: [default] | ||
77 | |||
78 | [desktop-t2c] | ||
79 | RUN: 1 | ||
80 | VERSION: local|* | ||
81 | |||
82 | [desktop-t2c|local|*] | ||
83 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop-t2c | ||
84 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/desktop-t2c/results | ||
85 | |||
86 | [libstdcpp] | ||
87 | RUN: 1 | ||
88 | VERSION: local|* | ||
89 | |||
90 | [libstdcpp|local|*] | ||
91 | AUTOREPLY_TEST_SYSTEM: Distribution Checker | ||
92 | AUTOREPLY_PERSON: Automated | ||
93 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/libstdcpp_4.1.0 | ||
94 | AUTOREPLY_ORGANISATION: N/A | ||
95 | AUTOREPLY_GNU_TRIPLET: | ||
96 | |||
97 | [olver] | ||
98 | RUN: 1 | ||
99 | VERSION: local|* | ||
100 | |||
101 | [olver|local|*] | ||
102 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/olver-core | ||
103 | AUTOREPLY_RESULTS_DIR: /var/opt/lsb/test/olver-core | ||
104 | |||
105 | [perl] | ||
106 | RUN: 1 | ||
107 | VERSION: local|* | ||
108 | |||
109 | [perl|local|*] | ||
110 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/perl | ||
111 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/perl/results | ||
112 | |||
113 | [printing] | ||
114 | RUN: 1 | ||
115 | VERSION: local|* | ||
116 | |||
117 | [printing|local|*] | ||
118 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/printing | ||
119 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/printing/results | ||
120 | |||
121 | [python] | ||
122 | RUN: 1 | ||
123 | VERSION: local|* | ||
124 | |||
125 | [python|local|*] | ||
126 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python | ||
127 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results | ||
128 | |||
129 | [qt3-azov] | ||
130 | RUN: 1 | ||
131 | VERSION: local|* | ||
132 | |||
133 | [qt3-azov|local|*] | ||
134 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt3-azov | ||
135 | AUTOREPLY_X11_FONT_PATH: [default] | ||
136 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt3-azov/results | ||
137 | |||
138 | [qt4-azov] | ||
139 | RUN: 1 | ||
140 | VERSION: local|* | ||
141 | |||
142 | [qt4-azov|local|*] | ||
143 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt4-azov | ||
144 | AUTOREPLY_X11_FONT_PATH: [default] | ||
145 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt4-azov/results | ||
146 | |||
147 | [xml2-azov] | ||
148 | RUN: 1 | ||
149 | VERSION: local|* | ||
150 | |||
151 | [xts5] | ||
152 | RUN: 1 | ||
153 | VERSION: local|* | ||
154 | |||
155 | [xts5|local|*] | ||
156 | AUTOREPLY_XT_FONTPATH_GOOD: [default] | ||
157 | AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/xts5 | ||
158 | AUTOREPLY_XVFB_DISPLAY: [default] | ||
159 | AUTOREPLY_RESULTS_DIR: /opt/lsb/test/xts5/xts5/results | ||
160 | AUTOREPLY_XT_FONTPATH: [default] | ||
161 | AUTOREPLY_X_CLIENT_HOSTNAME: | ||
162 | |||
163 | [apache] | ||
164 | RUN: 1 | ||
165 | VERSION: local|* | ||
166 | |||
167 | [expect] | ||
168 | RUN: 1 | ||
169 | VERSION: local|* | ||
170 | |||
171 | [groff] | ||
172 | RUN: 1 | ||
173 | VERSION: local|* | ||
174 | |||
175 | [raptor] | ||
176 | RUN: 1 | ||
177 | VERSION: local|* | ||
178 | |||
179 | [rsync] | ||
180 | RUN: 1 | ||
181 | VERSION: local|* | ||
182 | |||
183 | [samba] | ||
184 | RUN: 1 | ||
185 | VERSION: local|* | ||
186 | |||
187 | [tcl] | ||
188 | RUN: 1 | ||
189 | VERSION: local|* | ||
190 | |||
191 | [xpdf] | ||
192 | RUN: 1 | ||
193 | VERSION: local|* | ||
194 | |||
diff --git a/meta/recipes-extended/lsb/lsbtest_1.0.bb b/meta/recipes-extended/lsb/lsbtest_1.0.bb new file mode 100644 index 0000000000..f61251e2aa --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest_1.0.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | SUMMARY = "Automates Linux Standard Base (LSB) tests" | ||
2 | SECTION = "console/utils" | ||
3 | LICENSE = "GPLv2" | ||
4 | PR = "r3" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://LSB_Test.sh;beginline=3;endline=16;md5=7063bb54b04719df0716b513447f4fc0" | ||
7 | |||
8 | SRC_URI = "file://LSB_Test.sh \ | ||
9 | file://packages_list \ | ||
10 | file://session \ | ||
11 | " | ||
12 | RDEPENDS_${PN} = "rpm" | ||
13 | |||
14 | S = "${WORKDIR}" | ||
15 | |||
16 | do_install() { | ||
17 | install -d ${D}${bindir} | ||
18 | install -m 0755 ${S}/LSB_Test.sh ${D}${bindir} | ||
19 | install -d ${D}/opt/lsb-test | ||
20 | install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list | ||
21 | install -m 0644 ${S}/session ${D}/opt/lsb-test/session | ||
22 | if [ "${TARGET_ARCH}" = "i586" ];then | ||
23 | sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list | ||
24 | sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session | ||
25 | fi | ||
26 | if [ "${TARGET_ARCH}" = "x86_64" ];then | ||
27 | sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list | ||
28 | sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session | ||
29 | fi | ||
30 | if [ "${TARGET_ARCH}" = "powerpc" ];then | ||
31 | sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list | ||
32 | sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session | ||
33 | fi | ||
34 | |||
35 | # For a ppc64 target. the default userspace is 32b. | ||
36 | # Therefore, only change the lsbarch and targetarch | ||
37 | # in the package_list when MLIB=lib64 is being used. | ||
38 | # Otherwise, by default, the ppc32 LSB packages | ||
39 | # will be downloaded by LSB_Test.sh | ||
40 | if [ "${TARGET_ARCH}" = "powerpc64" ];then | ||
41 | if [ "${PN}" != "${BPN}" ];then | ||
42 | sed -i -e 's/lsbarch/ppc64/g' -e 's/targetarch/ppc64/g' ${D}/opt/lsb-test/packages_list | ||
43 | sed -i -e 's/targetarch/PPC64/g' ${D}/opt/lsb-test/session | ||
44 | fi | ||
45 | fi | ||
46 | } | ||
47 | |||
48 | FILES_${PN} += "/opt/lsb-test/* \ | ||
49 | " | ||
diff --git a/meta/recipes-extended/lsof/lsof_4.87.bb b/meta/recipes-extended/lsof/lsof_4.87.bb new file mode 100644 index 0000000000..e7a1eb2129 --- /dev/null +++ b/meta/recipes-extended/lsof/lsof_4.87.bb | |||
@@ -0,0 +1,53 @@ | |||
1 | SUMMARY = "LiSt Open Files tool" | ||
2 | DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \ | ||
3 | Its name stands for LiSt Open Files, and it does just that." | ||
4 | SECTION = "devel" | ||
5 | LICENSE = "BSD" | ||
6 | |||
7 | SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2" | ||
8 | |||
9 | SRC_URI[md5sum] = "80e2a76d0e05826db910ec88e631296c" | ||
10 | SRC_URI[sha256sum] = "dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c" | ||
11 | |||
12 | LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar" | ||
13 | S = "${WORKDIR}/lsof_${PV}_src" | ||
14 | |||
15 | LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a" | ||
16 | |||
17 | python do_unpack () { | ||
18 | bb.build.exec_func('base_do_unpack', d) | ||
19 | src_uri = d.getVar('SRC_URI') | ||
20 | d.setVar('SRC_URI', '${LOCALSRC}') | ||
21 | bb.build.exec_func('base_do_unpack', d) | ||
22 | d.setVar('SRC_URI', src_uri) | ||
23 | } | ||
24 | |||
25 | export LSOF_OS = "${TARGET_OS}" | ||
26 | LSOF_OS_libc-uclibc = "linux" | ||
27 | LSOF_OS_libc-glibc = "linux" | ||
28 | export LSOF_INCLUDE = "${STAGING_INCDIR}" | ||
29 | |||
30 | do_configure () { | ||
31 | export LSOF_AR="${AR} cr" | ||
32 | export LSOF_RANLIB="${RANLIB}" | ||
33 | if [ "x${GLIBCVERSION}" != "x" ];then | ||
34 | LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'` | ||
35 | LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}" | ||
36 | export LINUX_CLIB | ||
37 | fi | ||
38 | yes | ./Configure ${LSOF_OS} | ||
39 | } | ||
40 | |||
41 | export I = "${STAGING_INCDIR}" | ||
42 | export L = "${STAGING_INCDIR}" | ||
43 | export EXTRA_OEMAKE = "" | ||
44 | |||
45 | do_compile () { | ||
46 | oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}' | ||
47 | } | ||
48 | |||
49 | do_install () { | ||
50 | install -d ${D}${sbindir} ${D}${mandir}/man8 | ||
51 | install -m 4755 lsof ${D}${sbindir}/lsof | ||
52 | install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8 | ||
53 | } | ||
diff --git a/meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch b/meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch new file mode 100644 index 0000000000..8fb11af580 --- /dev/null +++ b/meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Fix test_proc_kill hanging | ||
2 | |||
3 | Sometimes the signal is delivered to memcg_process before the framework took | ||
4 | into consideration its pid entered in the tasks. Fixed by delaying the signal | ||
5 | send command. | ||
6 | |||
7 | Signed-off-by: George Nita <george.nita@enea.com> | ||
8 | Upstream-Status: Not Submitted | ||
9 | |||
10 | diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh | ||
11 | index ffbe006..e81bf74 100755 | ||
12 | --- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh | ||
13 | +++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh | ||
14 | @@ -220,8 +220,8 @@ test_proc_kill() | ||
15 | |||
16 | $TEST_PATH/memcg_process $2 -s $3 & | ||
17 | pid=$! | ||
18 | - sleep 1 | ||
19 | echo $pid > tasks | ||
20 | + sleep 1 | ||
21 | |||
22 | kill -s USR1 $pid 2> /dev/null | ||
23 | sleep 1 | ||
diff --git a/meta/recipes-extended/ltp/files/periodic_output.patch b/meta/recipes-extended/ltp/files/periodic_output.patch new file mode 100644 index 0000000000..153fe83524 --- /dev/null +++ b/meta/recipes-extended/ltp/files/periodic_output.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Add periodic output for long time test. | ||
2 | |||
3 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | |||
6 | diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh | ||
7 | --- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 15:54:09.515049081 +0100 | ||
8 | +++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 22:32:15.587370406 +0100 | ||
9 | @@ -37,7 +37,8 @@ | ||
10 | exit 0 | ||
11 | fi | ||
12 | |||
13 | -RUN_TIME=$(( 60 * 60 )) | ||
14 | +ONE_MINUTE=60 | ||
15 | +RUN_TIME=60 | ||
16 | |||
17 | cleanup() | ||
18 | { | ||
19 | @@ -81,7 +82,11 @@ | ||
20 | eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null | ||
21 | done | ||
22 | |||
23 | - sleep $4 | ||
24 | + for i in $(seq 0 $RUN_TIME-1) | ||
25 | + do | ||
26 | + eval echo "Started $i min ago. Still alive... " | ||
27 | + sleep $ONE_MINUTE | ||
28 | + done | ||
29 | |||
30 | for i in $(seq 0 $(($1-1))) | ||
31 | do | ||
diff --git a/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch new file mode 100644 index 0000000000..fa20b085f7 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From b601a8d1b39075a5339195fc0a4038f71ec3b49e Mon Sep 17 00:00:00 2001 | ||
2 | From: "Gary S. Robertson" <gary.robertson@linaro.org> | ||
3 | Date: Wed, 27 Aug 2014 16:23:56 -0500 | ||
4 | Subject: [LTP][PATCH] Realtime tests: Fix bad priority inheritance conditionals | ||
5 | |||
6 | testcases/realtime/lib/librttest.c and | ||
7 | testcases/realtime/stress/pi-tests/testpi-3.c | ||
8 | both referenced a non-existent autoconf configuration setting variable. | ||
9 | Replaced the invalid variable name with the variable actually created | ||
10 | by autoconf. | ||
11 | |||
12 | Upstream-Status: Submitted | ||
13 | |||
14 | Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> | ||
15 | --- | ||
16 | testcases/realtime/lib/librttest.c | 2 +- | ||
17 | testcases/realtime/stress/pi-tests/testpi-3.c | 2 +- | ||
18 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/testcases/realtime/lib/librttest.c b/testcases/realtime/lib/librttest.c | ||
21 | index c175148..3679058 100644 | ||
22 | --- a/testcases/realtime/lib/librttest.c | ||
23 | +++ b/testcases/realtime/lib/librttest.c | ||
24 | @@ -586,7 +586,7 @@ void *busy_work_us(int us) | ||
25 | |||
26 | void init_pi_mutex(pthread_mutex_t * m) | ||
27 | { | ||
28 | -#if HAVE_DECL_PTHREAD_PRIO_INHERIT | ||
29 | +#if HAS_PRIORITY_INHERIT | ||
30 | pthread_mutexattr_t attr; | ||
31 | int ret; | ||
32 | int protocol; | ||
33 | diff --git a/testcases/realtime/stress/pi-tests/testpi-3.c b/testcases/realtime/stress/pi-tests/testpi-3.c | ||
34 | index 30f38f6..e483945 100644 | ||
35 | --- a/testcases/realtime/stress/pi-tests/testpi-3.c | ||
36 | +++ b/testcases/realtime/stress/pi-tests/testpi-3.c | ||
37 | @@ -365,7 +365,7 @@ int main(int argc, char *argv[]) | ||
38 | |||
39 | printf("Start %s\n", argv[0]); | ||
40 | |||
41 | -#if HAVE_DECL_PTHREAD_PRIO_INHERIT | ||
42 | +#if HAS_PRIORITY_INHERIT | ||
43 | if (!nopi) { | ||
44 | pthread_mutexattr_t mutexattr; | ||
45 | int protocol; | ||
46 | -- | ||
47 | 1.7.9.5 | ||
48 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch new file mode 100644 index 0000000000..ccdd4d0bb3 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From 663a14423baea0e05ba79d90d2497dde5e4594bd Mon Sep 17 00:00:00 2001 | ||
2 | From: "Gary S. Robertson" <gary.robertson@linaro.org> | ||
3 | Date: Thu, 11 Sep 2014 13:02:47 -0500 | ||
4 | Subject: [LTP][PATCH] Realtime tests: Fix robust mutex conditionals | ||
5 | |||
6 | sbrk_mutex, testpi-5, and testpi-6 realtime tests in subdir | ||
7 | testcases/realtime/func/pi-tests used compile time config variables | ||
8 | which were not generated by autoconf in order to configure tests | ||
9 | for robust mutexes. Changed these conditionals to use the config | ||
10 | variables actually generated in the autoconf process. | ||
11 | |||
12 | Upstream-Status: Submitted | ||
13 | |||
14 | Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> | ||
15 | --- | ||
16 | testcases/realtime/func/pi-tests/sbrk_mutex.c | 2 +- | ||
17 | testcases/realtime/func/pi-tests/testpi-5.c | 2 +- | ||
18 | testcases/realtime/func/pi-tests/testpi-6.c | 2 +- | ||
19 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/testcases/realtime/func/pi-tests/sbrk_mutex.c b/testcases/realtime/func/pi-tests/sbrk_mutex.c | ||
22 | index 684021f..5c325b4 100644 | ||
23 | --- a/testcases/realtime/func/pi-tests/sbrk_mutex.c | ||
24 | +++ b/testcases/realtime/func/pi-tests/sbrk_mutex.c | ||
25 | @@ -45,7 +45,7 @@ | ||
26 | #include <unistd.h> | ||
27 | #include "librttest.h" | ||
28 | |||
29 | -#if defined(HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS) && defined(PTHREAD_MUTEX_ROBUST_NP) | ||
30 | +#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS | ||
31 | |||
32 | #define NUM_MUTEXES 5000 | ||
33 | #define NUM_THREADS 50 | ||
34 | diff --git a/testcases/realtime/func/pi-tests/testpi-5.c b/testcases/realtime/func/pi-tests/testpi-5.c | ||
35 | index a1d93cc..70f02fd 100644 | ||
36 | --- a/testcases/realtime/func/pi-tests/testpi-5.c | ||
37 | +++ b/testcases/realtime/func/pi-tests/testpi-5.c | ||
38 | @@ -69,7 +69,7 @@ int do_test(int argc, char **argv) | ||
39 | pthread_mutexattr_t mutexattr; | ||
40 | int retc, protocol; | ||
41 | |||
42 | -#if HAS_PTHREAD_MUTEXATTR_PROTOCOL_FUNCTIONS | ||
43 | +#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS | ||
44 | |||
45 | if (pthread_mutexattr_init(&mutexattr) != 0) | ||
46 | printf("Failed to init mutexattr\n"); | ||
47 | diff --git a/testcases/realtime/func/pi-tests/testpi-6.c b/testcases/realtime/func/pi-tests/testpi-6.c | ||
48 | index b3c3e4a..f715eee 100644 | ||
49 | --- a/testcases/realtime/func/pi-tests/testpi-6.c | ||
50 | +++ b/testcases/realtime/func/pi-tests/testpi-6.c | ||
51 | @@ -41,7 +41,7 @@ | ||
52 | #include <unistd.h> | ||
53 | #include <librttest.h> | ||
54 | |||
55 | -#if defined(PTHREAD_MUTEX_ROBUST_NP) | ||
56 | +#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS | ||
57 | pthread_mutex_t child_mutex; | ||
58 | |||
59 | void *child_thread(void *arg) | ||
60 | -- | ||
61 | 1.7.9.5 | ||
62 | |||
diff --git a/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch new file mode 100644 index 0000000000..1b4d2324a5 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch | |||
@@ -0,0 +1,202 @@ | |||
1 | From 9751a6526cffcdf4e3dc2cb33641259a7be00e19 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 7 Dec 2013 18:24:32 +0100 | ||
4 | Subject: [PATCH] Rename runtests_noltp.sh script so have unique name | ||
5 | |||
6 | * they are installed in the same target path | ||
7 | /opt/ltp/testcases/bin/runtests_noltp.sh | ||
8 | and overwrite each other in non-deterministic way | ||
9 | when multiple processes are used in "make install" | ||
10 | |||
11 | ./temp/log.do_install:install -m 00775 | ||
12 | "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh" | ||
13 | "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh" | ||
14 | ./temp/log.do_install:install -m 00775 | ||
15 | "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh" | ||
16 | "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh" | ||
17 | |||
18 | Upstream-Status: Pending | ||
19 | |||
20 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
21 | --- | ||
22 | .../kernel/containers/sysvipc/runipctests_noltp.sh | 31 ++++++++++++++++ | ||
23 | .../kernel/containers/sysvipc/runtests_noltp.sh | 31 ---------------- | ||
24 | .../kernel/containers/utsname/runtests_noltp.sh | 41 ---------------------- | ||
25 | .../kernel/containers/utsname/runutstests_noltp.sh | 41 ++++++++++++++++++++++ | ||
26 | 4 files changed, 72 insertions(+), 72 deletions(-) | ||
27 | create mode 100644 testcases/kernel/containers/sysvipc/runipctests_noltp.sh | ||
28 | delete mode 100644 testcases/kernel/containers/sysvipc/runtests_noltp.sh | ||
29 | delete mode 100755 testcases/kernel/containers/utsname/runtests_noltp.sh | ||
30 | create mode 100755 testcases/kernel/containers/utsname/runutstests_noltp.sh | ||
31 | |||
32 | diff --git a/testcases/kernel/containers/sysvipc/runipctests_noltp.sh b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh | ||
33 | new file mode 100644 | ||
34 | index 0000000..84f398f | ||
35 | --- /dev/null | ||
36 | +++ b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh | ||
37 | @@ -0,0 +1,31 @@ | ||
38 | +#!/bin/sh | ||
39 | +################################################################################ | ||
40 | +## ## | ||
41 | +## Copyright (c) International Business Machines Corp., 2007 ## | ||
42 | +## ## | ||
43 | +## This program is free software; you can redistribute it and#or modify ## | ||
44 | +## it under the terms of the GNU General Public License as published by ## | ||
45 | +## the Free Software Foundation; either version 2 of the License, or ## | ||
46 | +## (at your option) any later version. ## | ||
47 | +## ## | ||
48 | +## This program is distributed in the hope that it will be useful, but ## | ||
49 | +## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## | ||
50 | +## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## | ||
51 | +## for more details. ## | ||
52 | +## ## | ||
53 | +## You should have received a copy of the GNU General Public License ## | ||
54 | +## along with this program; if not, write to the Free Software ## | ||
55 | +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## | ||
56 | +## ## | ||
57 | +################################################################################ | ||
58 | + | ||
59 | +exit_code=0 | ||
60 | +echo "sysvipc tests" | ||
61 | +for type in none clone unshare; do | ||
62 | + echo "**sysvipc $type" | ||
63 | + ./shmnstest_noltp $type | ||
64 | + if [ $? -ne 0 ]; then | ||
65 | + exit_code=$? | ||
66 | + fi | ||
67 | +done | ||
68 | +exit $exit_code | ||
69 | diff --git a/testcases/kernel/containers/sysvipc/runtests_noltp.sh b/testcases/kernel/containers/sysvipc/runtests_noltp.sh | ||
70 | deleted file mode 100644 | ||
71 | index 84f398f..0000000 | ||
72 | --- a/testcases/kernel/containers/sysvipc/runtests_noltp.sh | ||
73 | +++ /dev/null | ||
74 | @@ -1,31 +0,0 @@ | ||
75 | -#!/bin/sh | ||
76 | -################################################################################ | ||
77 | -## ## | ||
78 | -## Copyright (c) International Business Machines Corp., 2007 ## | ||
79 | -## ## | ||
80 | -## This program is free software; you can redistribute it and#or modify ## | ||
81 | -## it under the terms of the GNU General Public License as published by ## | ||
82 | -## the Free Software Foundation; either version 2 of the License, or ## | ||
83 | -## (at your option) any later version. ## | ||
84 | -## ## | ||
85 | -## This program is distributed in the hope that it will be useful, but ## | ||
86 | -## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## | ||
87 | -## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## | ||
88 | -## for more details. ## | ||
89 | -## ## | ||
90 | -## You should have received a copy of the GNU General Public License ## | ||
91 | -## along with this program; if not, write to the Free Software ## | ||
92 | -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## | ||
93 | -## ## | ||
94 | -################################################################################ | ||
95 | - | ||
96 | -exit_code=0 | ||
97 | -echo "sysvipc tests" | ||
98 | -for type in none clone unshare; do | ||
99 | - echo "**sysvipc $type" | ||
100 | - ./shmnstest_noltp $type | ||
101 | - if [ $? -ne 0 ]; then | ||
102 | - exit_code=$? | ||
103 | - fi | ||
104 | -done | ||
105 | -exit $exit_code | ||
106 | diff --git a/testcases/kernel/containers/utsname/runtests_noltp.sh b/testcases/kernel/containers/utsname/runtests_noltp.sh | ||
107 | deleted file mode 100755 | ||
108 | index 43cb7e2..0000000 | ||
109 | --- a/testcases/kernel/containers/utsname/runtests_noltp.sh | ||
110 | +++ /dev/null | ||
111 | @@ -1,41 +0,0 @@ | ||
112 | -#!/bin/sh | ||
113 | -################################################################################ | ||
114 | -## ## | ||
115 | -## Copyright (c) International Business Machines Corp., 2007 ## | ||
116 | -## ## | ||
117 | -## This program is free software; you can redistribute it and#or modify ## | ||
118 | -## it under the terms of the GNU General Public License as published by ## | ||
119 | -## the Free Software Foundation; either version 2 of the License, or ## | ||
120 | -## (at your option) any later version. ## | ||
121 | -## ## | ||
122 | -## This program is distributed in the hope that it will be useful, but ## | ||
123 | -## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## | ||
124 | -## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## | ||
125 | -## for more details. ## | ||
126 | -## ## | ||
127 | -## You should have received a copy of the GNU General Public License ## | ||
128 | -## along with this program; if not, write to the Free Software ## | ||
129 | -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## | ||
130 | -## ## | ||
131 | -################################################################################ | ||
132 | - | ||
133 | -oldhostname=`hostname` | ||
134 | -exit_code=0 | ||
135 | -echo "unshare tests" | ||
136 | -for i in `seq 1 5`; do | ||
137 | - echo "test $i (unshare)" | ||
138 | - ./utstest_noltp unshare $i | ||
139 | - if [ $? -ne 0 ]; then | ||
140 | - exit_code=$? | ||
141 | - fi | ||
142 | -done | ||
143 | -echo "clone tests" | ||
144 | -for i in `seq 1 5`; do | ||
145 | - echo "test $i (clone)" | ||
146 | - ./utstest_noltp clone $i | ||
147 | - if [ $? -ne 0 ]; then | ||
148 | - exit_code=$? | ||
149 | - fi | ||
150 | -done | ||
151 | -hostname "$oldhostname" | ||
152 | -exit $exit_code | ||
153 | diff --git a/testcases/kernel/containers/utsname/runutstests_noltp.sh b/testcases/kernel/containers/utsname/runutstests_noltp.sh | ||
154 | new file mode 100755 | ||
155 | index 0000000..43cb7e2 | ||
156 | --- /dev/null | ||
157 | +++ b/testcases/kernel/containers/utsname/runutstests_noltp.sh | ||
158 | @@ -0,0 +1,41 @@ | ||
159 | +#!/bin/sh | ||
160 | +################################################################################ | ||
161 | +## ## | ||
162 | +## Copyright (c) International Business Machines Corp., 2007 ## | ||
163 | +## ## | ||
164 | +## This program is free software; you can redistribute it and#or modify ## | ||
165 | +## it under the terms of the GNU General Public License as published by ## | ||
166 | +## the Free Software Foundation; either version 2 of the License, or ## | ||
167 | +## (at your option) any later version. ## | ||
168 | +## ## | ||
169 | +## This program is distributed in the hope that it will be useful, but ## | ||
170 | +## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## | ||
171 | +## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## | ||
172 | +## for more details. ## | ||
173 | +## ## | ||
174 | +## You should have received a copy of the GNU General Public License ## | ||
175 | +## along with this program; if not, write to the Free Software ## | ||
176 | +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## | ||
177 | +## ## | ||
178 | +################################################################################ | ||
179 | + | ||
180 | +oldhostname=`hostname` | ||
181 | +exit_code=0 | ||
182 | +echo "unshare tests" | ||
183 | +for i in `seq 1 5`; do | ||
184 | + echo "test $i (unshare)" | ||
185 | + ./utstest_noltp unshare $i | ||
186 | + if [ $? -ne 0 ]; then | ||
187 | + exit_code=$? | ||
188 | + fi | ||
189 | +done | ||
190 | +echo "clone tests" | ||
191 | +for i in `seq 1 5`; do | ||
192 | + echo "test $i (clone)" | ||
193 | + ./utstest_noltp clone $i | ||
194 | + if [ $? -ne 0 ]; then | ||
195 | + exit_code=$? | ||
196 | + fi | ||
197 | +done | ||
198 | +hostname "$oldhostname" | ||
199 | +exit $exit_code | ||
200 | -- | ||
201 | 1.8.4.3 | ||
202 | |||
diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch new file mode 100644 index 0000000000..064f00ae3d --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | [PATCH] add knob to control whether numa support should be checked | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | otherwise the random dependency will be generated | ||
6 | |||
7 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
8 | --- | ||
9 | configure.ac | 10 +- | ||
10 | diff --git a/configure.ac b/configure.ac | ||
11 | index 9f397e7..1357256 100644 | ||
12 | --- a/configure.ac | ||
13 | +++ b/configure.ac | ||
14 | @@ -142,6 +142,12 @@ else | ||
15 | AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) | ||
16 | fi | ||
17 | |||
18 | +AC_ARG_WITH([numa], | ||
19 | + AC_HELP_STRING([--without-numa], | ||
20 | + [without the numa support]), | ||
21 | + [],[with_numa=yes], | ||
22 | +) | ||
23 | + | ||
24 | AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2]) | ||
25 | |||
26 | # END testsuites knobs | ||
27 | @@ -159,7 +165,9 @@ LTP_CHECK_SIGNAL | ||
28 | LTP_CHECK_SYSCALL_EVENTFD | ||
29 | LTP_CHECK_SYSCALL_KEYCTL | ||
30 | LTP_CHECK_SYSCALL_MODIFY_LDT | ||
31 | +if test "x$with_numa" = xyes; then | ||
32 | LTP_CHECK_SYSCALL_NUMA | ||
33 | +fi | ||
34 | LTP_CHECK_SYSCALL_QUOTACTL | ||
35 | LTP_CHECK_SYSCALL_SIGNALFD | ||
36 | LTP_CHECK_SYSCALL_UNSHARE | ||
37 | -- | ||
38 | 1.9.1 | ||
39 | |||
diff --git a/meta/recipes-extended/ltp/ltp/automake-foreign.patch b/meta/recipes-extended/ltp/ltp/automake-foreign.patch new file mode 100644 index 0000000000..c3dd891395 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/automake-foreign.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Use foreign strictness to avoid automake errors. | ||
2 | |||
3 | Upstream-Status: Submitted (https://github.com/linux-test-project/ltp/issues/16) | ||
4 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
5 | |||
6 | diff --git a/configure.ac b/configure.ac | ||
7 | index 9f397e7..fc57957 100644 | ||
8 | --- a/configure.ac | ||
9 | +++ b/configure.ac | ||
10 | @@ -4 +4 @@ | ||
11 | -AM_INIT_AUTOMAKE | ||
12 | +AM_INIT_AUTOMAKE([foreign]) | ||
13 | --- a/utils/ffsb-6.0-rc2/configure.in | ||
14 | +++ b/utils/ffsb-6.0-rc2/configure.in | ||
15 | @@ -2,2 +2,3 @@ dnl Process this file with autoconf to produce a configure script. | ||
16 | -AC_INIT(main.c) | ||
17 | -AM_INIT_AUTOMAKE(ffsb, 6.0-RC2) | ||
18 | +AC_INIT([ffsb], [6.0-RC2]) | ||
19 | +AC_CONFIG_SRCDIR([main.c]) | ||
20 | +AM_INIT_AUTOMAKE([foreign]) | ||
diff --git a/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch b/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch new file mode 100644 index 0000000000..20fd4c3691 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 5bda9c0af56869c6ff2c25d38ea087179c946bc6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chong Lu <Chong.Lu@windriver.com> | ||
3 | Date: Tue, 11 Mar 2014 14:47:22 +0800 | ||
4 | Subject: [PATCH] ltp: Don't link against libfl | ||
5 | |||
6 | We have already defined yywrap function in scan.l file. After this, we no longer need to | ||
7 | link against libfl and so no longer get errors about undefined references to yylex. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
12 | --- | ||
13 | pan/Makefile | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/pan/Makefile b/pan/Makefile | ||
17 | index 4cc6466..a4b575b 100644 | ||
18 | --- a/pan/Makefile | ||
19 | +++ b/pan/Makefile | ||
20 | @@ -31,7 +31,7 @@ CPPFLAGS += -Wno-error | ||
21 | |||
22 | CPPFLAGS += -I$(abs_srcdir) | ||
23 | |||
24 | -LDLIBS += -lm $(LEXLIB) | ||
25 | +LDLIBS += -lm | ||
26 | |||
27 | LFLAGS += -l | ||
28 | |||
29 | -- | ||
30 | 1.7.9.5 | ||
31 | |||
diff --git a/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch new file mode 100644 index 0000000000..4836010bdf --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | [PATCH] make setregid02 work | ||
2 | |||
3 | Upstream-Status: Inappropriate [configuration] | ||
4 | |||
5 | there is no "nobody" group in oe-core, the user "nobody" belongs to | ||
6 | "nogroup" group, so replace nobody with nogroup to make the test pass | ||
7 | |||
8 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
9 | --- | ||
10 | testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++-------- | ||
11 | 1 file changed, 8 insertions(+), 8 deletions(-) | ||
12 | |||
13 | diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c | ||
14 | index 8058627..866bee4 100644 | ||
15 | --- a/testcases/kernel/syscalls/setregid/setregid02.c | ||
16 | +++ b/testcases/kernel/syscalls/setregid/setregid02.c | ||
17 | @@ -41,7 +41,7 @@ static gid_t neg_one = -1; | ||
18 | |||
19 | static struct passwd *ltpuser; | ||
20 | |||
21 | -static struct group nobody, root, bin; | ||
22 | +static struct group nogroup, root, bin; | ||
23 | |||
24 | /* | ||
25 | * The following structure contains all test data. Each structure in the array | ||
26 | @@ -57,17 +57,17 @@ struct test_data_t { | ||
27 | char *test_msg; | ||
28 | } test_data[] = { | ||
29 | { | ||
30 | - &neg_one, &root.gr_gid, EPERM, &nobody, &nobody, | ||
31 | + &neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup, | ||
32 | "After setregid(-1, root),"}, { | ||
33 | - &neg_one, &bin.gr_gid, EPERM, &nobody, &nobody, | ||
34 | + &neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup, | ||
35 | "After setregid(-1, bin)"}, { | ||
36 | - &root.gr_gid, &neg_one, EPERM, &nobody, &nobody, | ||
37 | + &root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup, | ||
38 | "After setregid(root,-1),"}, { | ||
39 | - &bin.gr_gid, &neg_one, EPERM, &nobody, &nobody, | ||
40 | + &bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup, | ||
41 | "After setregid(bin, -1),"}, { | ||
42 | - &root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody, | ||
43 | + &root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup, | ||
44 | "After setregid(root, bin)"}, { | ||
45 | - &bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody, | ||
46 | + &bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup, | ||
47 | "After setregid(bin, root),"} | ||
48 | }; | ||
49 | |||
50 | @@ -165,7 +165,7 @@ static void setup(void) | ||
51 | } while (0) | ||
52 | |||
53 | GET_GID(root); | ||
54 | - GET_GID(nobody); | ||
55 | + GET_GID(nogroup); | ||
56 | GET_GID(bin); | ||
57 | |||
58 | TEST_PAUSE; | ||
59 | -- | ||
60 | 1.9.1 | ||
61 | |||
diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb new file mode 100644 index 0000000000..0632f11ad8 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp_20140422.bb | |||
@@ -0,0 +1,93 @@ | |||
1 | SUMMARY = "Linux Test Project" | ||
2 | DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." | ||
3 | HOMEPAGE = "http://ltp.sourceforge.net" | ||
4 | SECTION = "console/utils" | ||
5 | LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" | ||
6 | LIC_FILES_CHKSUM = "\ | ||
7 | file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
8 | file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
9 | file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ | ||
10 | file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ | ||
11 | file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ | ||
12 | file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \ | ||
13 | file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | ||
14 | file://tools/netpipe-2.4/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \ | ||
15 | file://tools/netpipe-2.4-ipv6/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \ | ||
16 | file://tools/top-LTP/proc/COPYING;md5=aefc88eb8a41672fbfcfe6b69ab8c49c \ | ||
17 | file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
18 | file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
19 | file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \ | ||
20 | " | ||
21 | |||
22 | DEPENDS = "attr libaio libcap acl openssl zip-native" | ||
23 | SRCREV = "f4c3bfe1eab51eb72caeb0f3336d2790c9a8bd1b" | ||
24 | |||
25 | SRC_URI = "git://github.com/linux-test-project/ltp.git \ | ||
26 | file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \ | ||
27 | file://periodic_output.patch \ | ||
28 | file://ltp-Do-not-link-against-libfl.patch \ | ||
29 | file://automake-foreign.patch \ | ||
30 | file://make-setregid02-work.patch \ | ||
31 | file://add-knob-for-numa.patch \ | ||
32 | file://0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch \ | ||
33 | file://0001-Realtime-tests-Fix-robust-mutex-conditionals.patch \ | ||
34 | file://fix-test_proc_kill-hang.patch \ | ||
35 | " | ||
36 | |||
37 | S = "${WORKDIR}/git" | ||
38 | |||
39 | inherit autotools-brokensep | ||
40 | |||
41 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
42 | |||
43 | export prefix = "/opt/ltp" | ||
44 | export exec_prefix = "/opt/ltp" | ||
45 | |||
46 | PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," | ||
47 | EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" | ||
48 | EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite " | ||
49 | |||
50 | # ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call. | ||
51 | # we explicitly force regeneration of that directory and pass configure options. | ||
52 | do_configure_append() { | ||
53 | (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS}) | ||
54 | } | ||
55 | |||
56 | # The makefiles make excessive use of make -C and several include testcases.mk | ||
57 | # which triggers a build of the syscall header. To reproduce, build ltp, | ||
58 | # then delete the header, then "make -j XX" and watch regen.sh run multiple | ||
59 | # times. Its easier to generate this once here instead. | ||
60 | do_compile_prepend () { | ||
61 | ( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h ) | ||
62 | } | ||
63 | |||
64 | do_install(){ | ||
65 | install -d ${D}/opt/ltp/ | ||
66 | oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install | ||
67 | |||
68 | # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual | ||
69 | cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases | ||
70 | |||
71 | # We need to remove all scripts which depend on /usr/bin/expect, since expect is not supported in oe-core | ||
72 | # We will add expect for enhancement in future | ||
73 | find ${D} -type f -print | xargs grep "\!.*\/usr\/bin\/expect" | awk -F":" '{print $1}' | xargs rm -f | ||
74 | } | ||
75 | |||
76 | RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk" | ||
77 | |||
78 | FILES_${PN}-dbg += "\ | ||
79 | /opt/ltp/runtest/.debug \ | ||
80 | /opt/ltp/testcases/bin/.debug \ | ||
81 | /opt/ltp/testcases/bin/*/bin/.debug \ | ||
82 | /opt/ltp/testcases/bin/*/test/.debug \ | ||
83 | /opt/ltp/scenario_groups/.debug \ | ||
84 | /opt/ltp/testscripts/.debug \ | ||
85 | /opt/ltp/testscripts/open_posix_testsuite/.debug \ | ||
86 | " | ||
87 | |||
88 | FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a" | ||
89 | |||
90 | FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/*" | ||
91 | |||
92 | # Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails | ||
93 | INHIBIT_PACKAGE_STRIP = "1" | ||
diff --git a/meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch b/meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch new file mode 100644 index 0000000000..8c7178bf8c --- /dev/null +++ b/meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | krb5 support is autodetected from sysroot making builds undeterministic | ||
2 | feel free to improve this to support explicitly enabling/disabling it | ||
3 | |||
4 | Upstream-Status: Penging | ||
5 | |||
6 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
7 | |||
8 | --- a/makeconfig 2013-07-21 15:06:11.177792334 +0200 | ||
9 | +++ b/makeconfig 2013-07-21 15:07:20.028793994 +0200 | ||
10 | @@ -424,36 +424,6 @@ | ||
11 | } | ||
12 | ! | ||
13 | |||
14 | -<$tmp2.c link_check gssapi 'for GSSAPI in libgss' \ | ||
15 | - '#define USE_GSSAPI' '-lgss' || | ||
16 | - <$tmp2.c link_check gssapi 'for GSSAPI in libgssapi_krb5' \ | ||
17 | - '#define USE_GSSAPI' '-lgssapi_krb5' || | ||
18 | - link_check gssapi 'for GSSAPI in libgssapi_krb5, old-style' \ | ||
19 | - '#define USE_GSSAPI | ||
20 | -#define GSSAPI_OLD_STYLE' '-lgssapi_krb5' <<\! || \ | ||
21 | - link_check gssapi 'for GSSAPI in libgssapi' \ | ||
22 | - '#define USE_GSSAPI | ||
23 | -#define GSSAPI_REG_INCLUDE' '-lgssapi' <<\% | ||
24 | -#include <gssapi/gssapi.h> | ||
25 | -#include <gssapi/gssapi_generic.h> | ||
26 | - | ||
27 | -int main(void) | ||
28 | -{ | ||
29 | - gss_import_name(0, 0, gss_nt_service_name, 0); | ||
30 | - gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0); | ||
31 | - return 0; | ||
32 | -} | ||
33 | -! | ||
34 | -#include <gssapi.h> | ||
35 | - | ||
36 | -int main(void) | ||
37 | -{ | ||
38 | - gss_import_name(0, 0, GSS_C_NT_HOSTBASED_SERVICE, 0); | ||
39 | - gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0); | ||
40 | - return 0; | ||
41 | -} | ||
42 | -% | ||
43 | - | ||
44 | cat >$tmp2.c <<\! | ||
45 | #include "config.h" | ||
46 | #ifdef HAVE_NL_LANGINFO | ||
diff --git a/meta/recipes-extended/mailx/mailx_12.5.bb b/meta/recipes-extended/mailx/mailx_12.5.bb new file mode 100644 index 0000000000..cc0b6bfd3a --- /dev/null +++ b/meta/recipes-extended/mailx/mailx_12.5.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "mailx is the traditional command-line-mode mail user agent" | ||
2 | |||
3 | DESCRIPTION = "Mailx is derived from Berkeley Mail and is intended provide the \ | ||
4 | functionality of the POSIX mailx command with additional support \ | ||
5 | for MIME, IMAP, POP3, SMTP, and S/MIME." | ||
6 | |||
7 | HOMEPAGE = "http://heirloom.sourceforge.net/mailx.html" | ||
8 | SECTION = "console/network" | ||
9 | PR = "r2" | ||
10 | LICENSE = "BSD & MPL-1" | ||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=4202a0a62910cf94f7af8a3436a2a2dd" | ||
12 | |||
13 | DEPENDS = "openssl" | ||
14 | |||
15 | SRC_URI = "${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_${PV}.orig.tar.gz;name=archive \ | ||
16 | ${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_${PV}-1.diff.gz;name=patch \ | ||
17 | file://explicitly.disable.krb5.support.patch \ | ||
18 | " | ||
19 | |||
20 | SRC_URI[archive.md5sum] = "29a6033ef1412824d02eb9d9213cb1f2" | ||
21 | SRC_URI[archive.sha256sum] = "015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad" | ||
22 | SRC_URI[patch.md5sum] = "f466281336183be673bf136dd7096662" | ||
23 | SRC_URI[patch.sha256sum] = "aaf2a4bbf145e5ca9cdeb0843091ec8cc01df6c9568c997207a5e97b4dc5ba43" | ||
24 | |||
25 | S = "${WORKDIR}/heirloom-mailx-${PV}" | ||
26 | |||
27 | inherit autotools-brokensep | ||
28 | |||
29 | CFLAGS_append = " -D_BSD_SOURCE -DDEBIAN -I${S}/EXT" | ||
30 | EXTRA_OEMAKE = "SENDMAIL=${sbindir}/sendmail" | ||
31 | |||
32 | PARALLEL_MAKE = "" | ||
diff --git a/meta/recipes-extended/man-pages/man-pages_3.71.bb b/meta/recipes-extended/man-pages/man-pages_3.71.bb new file mode 100644 index 0000000000..225b2567cb --- /dev/null +++ b/meta/recipes-extended/man-pages/man-pages_3.71.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | SUMMARY = "Linux man-pages" | ||
2 | DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs" | ||
3 | SECTION = "console/utils" | ||
4 | HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages" | ||
5 | LICENSE = "GPLv2+" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60" | ||
8 | SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz" | ||
9 | |||
10 | SRC_URI[md5sum] = "a853ef29d835e8522c04f832919139f1" | ||
11 | SRC_URI[sha256sum] = "307c9ac65b98a3a3d377050f0dc62d40b7a5995e6e6e6049d63fd9cc4fc27059" | ||
12 | |||
13 | RDEPENDS_${PN} = "man" | ||
14 | |||
15 | do_configure () { | ||
16 | : | ||
17 | } | ||
18 | |||
19 | do_compile() { | ||
20 | : | ||
21 | } | ||
22 | |||
23 | do_install() { | ||
24 | oe_runmake install DESTDIR=${D} | ||
25 | } | ||
26 | |||
27 | # Only deliveres man-pages so FILES_${PN} gets everything | ||
28 | FILES_${PN}-doc = "" | ||
29 | FILES_${PN} = "${mandir}/*" | ||
30 | |||
31 | inherit update-alternatives | ||
32 | |||
33 | ALTERNATIVE_PRIORITY = "100" | ||
34 | ALTERNATIVE_${PN} = "passwd.5 getspnam.3" | ||
35 | ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5" | ||
36 | ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3" | ||
diff --git a/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch b/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch new file mode 100644 index 0000000000..6f834bd01b --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | diff -u -r man-1.5g.old/configure man-1.5g/configure | ||
6 | --- man-1.5g.old/configure Wed Apr 7 04:16:05 1999 | ||
7 | +++ man-1.5g/configure Mon May 15 15:22:44 2000 | ||
8 | @@ -791,7 +791,7 @@ | ||
9 | read mode | ||
10 | if test "$mode" != ""; then man_mode=$mode; fi | ||
11 | fi | ||
12 | - man_install_flags="-m $man_mode -o $man_user -g $man_group" | ||
13 | + man_install_flags="" | ||
14 | fi | ||
15 | |||
16 | # What sections do we anticipate? | ||
diff --git a/meta/recipes-extended/man/man/man-1.5h1-gencat.patch b/meta/recipes-extended/man/man/man-1.5h1-gencat.patch new file mode 100644 index 0000000000..044b14c509 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5h1-gencat.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- gencat/genlib.c 2006-08-02 20:11:44.000000000 +0200 | ||
6 | +++ gencat/genlib.c.oden 2008-12-21 19:18:50.000000000 +0100 | ||
7 | @@ -47,6 +47,7 @@ up-to-date. Many thanks. | ||
8 | 01/14/91 4 nazgul Off by one on number specified entries | ||
9 | */ | ||
10 | |||
11 | +#undef _GNU_SOURCE | ||
12 | #include <stdio.h> | ||
13 | #include <stdlib.h> | ||
14 | #ifdef SYSV | ||
diff --git a/meta/recipes-extended/man/man/man-1.5h1-make.patch b/meta/recipes-extended/man/man/man-1.5h1-make.patch new file mode 100644 index 0000000000..8631eb2c53 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5h1-make.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.5g/man/Makefile.in.mike Fri Apr 9 13:35:54 1999 | ||
6 | +++ man-1.5g/man/Makefile.in Fri Apr 9 13:36:45 1999 | ||
7 | @@ -1,8 +1,8 @@ | ||
8 | # only executed from a subdir | ||
9 | MAN1 = man whatis apropos | ||
10 | -MAN5 = man.conf | ||
11 | +MAN5 = man.config | ||
12 | MAN8 = makewhatis | ||
13 | -ALL = man.1 whatis.1 apropos.1 man.conf.5 | ||
14 | +ALL = man.1 whatis.1 apropos.1 man.config.5 | ||
15 | MAYBE8 = makewhatis | ||
16 | |||
17 | .SUFFIXES: .man .1 .5 .8 | ||
diff --git a/meta/recipes-extended/man/man/man-1.5i2-initial.patch b/meta/recipes-extended/man/man/man-1.5i2-initial.patch new file mode 100644 index 0000000000..fe56c0706c --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5i2-initial.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.5i2/src/makewhatis.sh.initial Tue Jul 3 15:38:39 2001 | ||
6 | +++ man-1.5i2/src/makewhatis.sh Tue Jul 3 15:39:39 2001 | ||
7 | @@ -81,8 +81,10 @@ | ||
8 | continue;; | ||
9 | -s) setsections=1 | ||
10 | continue;; | ||
11 | - -u) findarg="-newer /var/cache/man/whatis" | ||
12 | - update=1 | ||
13 | + -u) if [ -e /var/cache/man/whatis ]; then | ||
14 | + findarg="-newer /var/cache/man/whatis" | ||
15 | + update=1 | ||
16 | + fi | ||
17 | continue;; | ||
18 | -v) verbose=1 | ||
19 | continue;; | ||
diff --git a/meta/recipes-extended/man/man/man-1.5i2-newline.patch b/meta/recipes-extended/man/man/man-1.5i2-newline.patch new file mode 100644 index 0000000000..611df5d259 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5i2-newline.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- src/man.c 2008-12-21 19:17:31.000000000 +0100 | ||
6 | +++ src/man.c.oden 2008-12-21 19:17:38.000000000 +0100 | ||
7 | @@ -391,7 +391,7 @@ again: | ||
8 | beg++; | ||
9 | |||
10 | end = beg; | ||
11 | - while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0') | ||
12 | + while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0' && (end-buf)<BUFSIZE) | ||
13 | end++; /* note that buf is NUL-terminated */ | ||
14 | *end = '\0'; | ||
15 | |||
diff --git a/meta/recipes-extended/man/man/man-1.5i2-overflow.patch b/meta/recipes-extended/man/man/man-1.5i2-overflow.patch new file mode 100644 index 0000000000..52d2881a89 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5i2-overflow.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.5i2/src/man.c.overflow Mon Jun 25 00:01:45 2001 | ||
6 | +++ man-1.5i2/src/man.c Mon Jun 25 00:01:45 2001 | ||
7 | @@ -381,6 +381,9 @@ | ||
8 | strcat(name, "/"); | ||
9 | strcat(name, beg); | ||
10 | } | ||
11 | + /* If this is too long, bad things have already happened. * | ||
12 | + * we should quit IMMEDIATELY. */ | ||
13 | + if(strlen(name)>sizeof(ultname)) _exit(1); | ||
14 | |||
15 | goto again; | ||
16 | } | ||
diff --git a/meta/recipes-extended/man/man/man-1.5j-i18n.patch b/meta/recipes-extended/man/man/man-1.5j-i18n.patch new file mode 100644 index 0000000000..2ae09c0ea4 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5j-i18n.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.5j/msgs/inst.sh.i18n Wed Apr 25 10:40:50 2001 | ||
6 | +++ man-1.5j/msgs/inst.sh Wed Apr 25 10:41:17 2001 | ||
7 | @@ -27,8 +27,7 @@ | ||
8 | for j in $M; do | ||
9 | if [ -f $j ]; then | ||
10 | i=`echo $j | sed -e 's/mess.//; s/.cat//'` | ||
11 | - dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"` | ||
12 | - dest=${PREFIX}$dest | ||
13 | + dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"` | ||
14 | echo "mkdir -p `dirname $dest`" | ||
15 | mkdir -p `dirname $dest`; | ||
16 | echo "install -c -m 644 $j $dest" | ||
diff --git a/meta/recipes-extended/man/man/man-1.5j-nocache.patch b/meta/recipes-extended/man/man/man-1.5j-nocache.patch new file mode 100644 index 0000000000..751dddd53b --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5j-nocache.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.5j/src/man.conf.in.nocache Thu Nov 22 15:07:12 2001 | ||
6 | +++ man-1.5j/src/man.conf.in Thu Nov 22 15:07:12 2001 | ||
7 | @@ -81,6 +81,9 @@ | ||
8 | # | ||
9 | #NOCACHE | ||
10 | # | ||
11 | +# NOCACHE keeps man from creating cache pages | ||
12 | +NOCACHE | ||
13 | +# | ||
14 | # Useful paths - note that COL should not be defined when | ||
15 | # NROFF is defined as "groff -Tascii" or "groff -Tlatin1"; | ||
16 | # not only is it superfluous, but it actually damages the output. | ||
diff --git a/meta/recipes-extended/man/man/man-1.5j-utf8.patch b/meta/recipes-extended/man/man/man-1.5j-utf8.patch new file mode 100644 index 0000000000..33d3e4c974 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5j-utf8.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.5j/configure.utf8 Thu Nov 22 15:02:35 2001 | ||
6 | +++ man-1.5j/configure Thu Nov 22 15:03:15 2001 | ||
7 | @@ -408,9 +408,9 @@ | ||
8 | Fgawk=/bin/gawk | ||
9 | Fawk=/bin/gawk | ||
10 | Fmawk=missing | ||
11 | - troff="" | ||
12 | - nroff="" | ||
13 | - jnroff="" | ||
14 | + troff=/usr/bin/troff | ||
15 | + nroff=/usr/bin/nroff | ||
16 | + jnroff=/usr/bin/nroff | ||
17 | eqn="" | ||
18 | neqn="" | ||
19 | jneqn="" | ||
20 | @@ -453,6 +453,8 @@ | ||
21 | done | ||
22 | done | ||
23 | Fgroff=/usr/bin/groff | ||
24 | + Fnroff=/usr/bin/nroff | ||
25 | + Fjnroff=/usr/bin/nroff | ||
26 | Fgeqn=/usr/bin/geqn | ||
27 | Fgtbl=/usr/bin/gtbl | ||
28 | Fcol=/usr/bin/col | ||
29 | @@ -485,25 +487,25 @@ | ||
30 | then | ||
31 | if test $Fnroff = "missing" | ||
32 | then | ||
33 | - nroff="nroff -Tlatin1 -mandoc" | ||
34 | + nroff="nroff -Tutf8 -mandoc" | ||
35 | else | ||
36 | - nroff="$Fnroff -Tlatin1 -mandoc" | ||
37 | + nroff="$Fnroff -Tutf8 -mandoc" | ||
38 | fi | ||
39 | troff="troff -mandoc" | ||
40 | echo "Warning: could not find groff" | ||
41 | else | ||
42 | if test $Fnroff = "missing" | ||
43 | then | ||
44 | - nroff="$Fgroff -Tlatin1 -mandoc" | ||
45 | + nroff="$Fgroff -Tutf8 -mandoc" | ||
46 | else | ||
47 | - nroff="$Fnroff -Tlatin1 -mandoc" | ||
48 | + nroff="$Fnroff -Tutf8 -mandoc" | ||
49 | fi | ||
50 | troff="$Fgroff -Tps -mandoc" | ||
51 | - jnroff="$Fgroff -Tnippon -mandocj" | ||
52 | + jnroff="$Fjnroff -Tutf8 -mandocj" | ||
53 | fi | ||
54 | eqn="$Fgeqn -Tps" | ||
55 | - neqn="$Fgeqn -Tlatin1" | ||
56 | - jneqn="$Fgeqn -Tnippon" | ||
57 | + neqn="$Fgeqn -Tutf8" | ||
58 | + jneqn="$Fgeqn -Tutf8" | ||
59 | tbl="$Fgtbl" | ||
60 | col="$Fcol" | ||
61 | vgrind="$Fvgrind" | ||
diff --git a/meta/recipes-extended/man/man/man-1.5k-confpath.patch b/meta/recipes-extended/man/man/man-1.5k-confpath.patch new file mode 100644 index 0000000000..b5746c2df8 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5k-confpath.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- configure 2006-05-01 19:56:14.000000000 +0200 | ||
6 | +++ configure.oden 2008-12-21 19:16:50.000000000 +0100 | ||
7 | @@ -198,7 +198,7 @@ | ||
8 | confdir="${confprefix}/share/misc" | ||
9 | fi | ||
10 | fi | ||
11 | -conffilename="man.conf" | ||
12 | +conffilename="man.config" | ||
13 | |||
14 | if test "$RANDOM" = "$RANDOM"; then | ||
15 | # Plain old Bourne shell. | ||
diff --git a/meta/recipes-extended/man/man/man-1.5k-nonascii.patch b/meta/recipes-extended/man/man/man-1.5k-nonascii.patch new file mode 100644 index 0000000000..d662d9b6a7 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5k-nonascii.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- ./src/apropos.sh.nonascii 2001-11-23 00:30:42.000000000 +0100 | ||
6 | +++ ./src/apropos.sh 2002-08-13 15:44:53.000000000 +0200 | ||
7 | @@ -18,9 +18,9 @@ | ||
8 | |||
9 | # When man pages in your favorite locale look to grep like binary files | ||
10 | # (and you use GNU grep) you may want to add the 'a' option to *grepopt1. | ||
11 | -aproposgrepopt1='i' | ||
12 | +aproposgrepopt1='ia' | ||
13 | aproposgrepopt2='' | ||
14 | -whatisgrepopt1='iw' | ||
15 | +whatisgrepopt1='iwa' | ||
16 | whatisgrepopt2='^' | ||
17 | grepopt1=$%apropos_or_whatis%grepopt1 | ||
18 | grepopt2=$%apropos_or_whatis%grepopt2 | ||
diff --git a/meta/recipes-extended/man/man/man-1.5k-sofix.patch b/meta/recipes-extended/man/man/man-1.5k-sofix.patch new file mode 100644 index 0000000000..50b925288e --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5k-sofix.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.5j/src/man.c.sofix Thu Nov 22 14:51:44 2001 | ||
6 | +++ man-1.5j/src/man.c Thu Nov 22 14:52:44 2001 | ||
7 | @@ -300,7 +300,7 @@ | ||
8 | |||
9 | if (strlen(name0) >= sizeof(ultname)) | ||
10 | return name0; | ||
11 | - strcpy(ultname, name0); | ||
12 | + strncpy(ultname, name0, BUFSIZE-32); | ||
13 | name = ultname; | ||
14 | |||
15 | again: | ||
16 | @@ -332,7 +332,7 @@ | ||
17 | * .so files - we could glob for all possible extensions, | ||
18 | * for now: only try .gz | ||
19 | */ | ||
20 | - else if (fp == NULL && get_expander(".gz") && | ||
21 | + if (fp == NULL && get_expander(".gz") && | ||
22 | strlen(name)+strlen(".gz") < BUFSIZE) { | ||
23 | strcat(name, ".gz"); | ||
24 | fp = fopen (name, "r"); | ||
diff --git a/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch b/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch new file mode 100644 index 0000000000..051299906b --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- ./configure.ad 2003-12-11 19:17:10.000000000 +0100 | ||
6 | +++ ./configure 2003-12-11 19:17:27.000000000 +0100 | ||
7 | @@ -26,7 +26,7 @@ | ||
8 | # (Indeed, -r may cause the terminal to get into funny states. | ||
9 | # Very inconvenient. For viewing pages in strange locales, set LC_*.) | ||
10 | # | ||
11 | -DEFAULTLESSOPT="-is" | ||
12 | +DEFAULTLESSOPT="-isr" | ||
13 | # | ||
14 | # Note that not creating any cat directories (/var/cache/man or so) | ||
15 | # and not making man suid or sgid is recommended. | ||
diff --git a/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch b/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch new file mode 100644 index 0000000000..bc97f56b9a --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- ./configure.less 2003-12-11 19:18:15.000000000 +0100 | ||
6 | +++ ./configure 2003-12-11 19:20:03.000000000 +0100 | ||
7 | @@ -401,18 +401,13 @@ | ||
8 | |||
9 | if test "$ans" = "false" | ||
10 | then | ||
11 | - for i in more less cmp cat awk gawk mawk | ||
12 | - do | ||
13 | - eval F$i="missing" | ||
14 | - for j in $DEFPATH | ||
15 | - do | ||
16 | - if test -f $j/$i | ||
17 | - then | ||
18 | - eval F$i=$j/$i | ||
19 | - break | ||
20 | - fi | ||
21 | - done | ||
22 | - done | ||
23 | + Fmore=/bin/more | ||
24 | + Fless=/usr/bin/less | ||
25 | + Fcmp=/usr/bin/cmp | ||
26 | + Fcat=/bin/cat | ||
27 | + Fgawk=/bin/gawk | ||
28 | + Fawk=/bin/gawk | ||
29 | + Fmawk=missing | ||
30 | troff="" | ||
31 | nroff="" | ||
32 | jnroff="" | ||
33 | @@ -457,6 +452,19 @@ | ||
34 | fi | ||
35 | done | ||
36 | done | ||
37 | + Fgroff=/usr/bin/groff | ||
38 | + Fgeqn=/usr/bin/geqn | ||
39 | + Fgtbl=/usr/bin/gtbl | ||
40 | + Fcol=/usr/bin/col | ||
41 | + Fgrefer=/usr/bin/grefer | ||
42 | + Fgpic=/usr/bin/gpic | ||
43 | + Fmore=/bin/more | ||
44 | + Fless=/usr/bin/less | ||
45 | + Fcmp=/usr/bin/cmp | ||
46 | + Fcat=/bin/cat | ||
47 | + Fgawk=/bin/gawk | ||
48 | + | ||
49 | + | ||
50 | for i in eqn tbl refer pic | ||
51 | do | ||
52 | if test `eval echo \\$Fg$i` = "missing" | ||
diff --git a/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch b/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch new file mode 100644 index 0000000000..c85ff1d8c7 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.5m2/configure.color 2006-09-16 18:27:37.000000000 +0200 | ||
6 | +++ man-1.5m2/configure 2006-09-16 18:28:44.000000000 +0200 | ||
7 | @@ -539,6 +539,8 @@ | ||
8 | troff="$troff -c" | ||
9 | nroff="$nroff -c" | ||
10 | jnroff="$jnroff -c" | ||
11 | +else | ||
12 | + troff="$troff -c" | ||
13 | fi | ||
14 | |||
15 | if [ x$default = x ]; then | ||
diff --git a/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch b/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch new file mode 100644 index 0000000000..8af78eab7b --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.5m2/src/util.c_sigpipe 2006-12-09 13:43:21.000000000 +0100 | ||
6 | +++ man-1.5m2/src/util.c 2006-12-09 13:53:13.000000000 +0100 | ||
7 | @@ -116,11 +116,14 @@ | ||
8 | static int | ||
9 | system1 (const char *command) { | ||
10 | void (*prev_handler)(int) = signal (SIGINT,catch_int); | ||
11 | + signal (SIGPIPE,SIG_IGN); | ||
12 | int ret = system(command); | ||
13 | |||
14 | /* child terminated with signal? */ | ||
15 | if (WIFSIGNALED(ret) && | ||
16 | - (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT)) | ||
17 | + (WTERMSIG(ret) == SIGINT || | ||
18 | + WTERMSIG(ret) == SIGPIPE || | ||
19 | + WTERMSIG(ret) == SIGQUIT)) | ||
20 | exit(1); | ||
21 | |||
22 | /* or we caught an interrupt? */ | ||
23 | @@ -128,6 +131,7 @@ | ||
24 | exit(1); | ||
25 | |||
26 | signal(SIGINT,prev_handler); | ||
27 | + signal(SIGPIPE,SIG_DFL); | ||
28 | return ret; | ||
29 | } | ||
30 | |||
diff --git a/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch b/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch new file mode 100644 index 0000000000..fe66d7599a --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man/Makefile.in 2008-12-21 19:19:33.000000000 +0100 | ||
6 | +++ man/Makefile.in.oden 2008-12-21 19:19:39.000000000 +0100 | ||
7 | @@ -34,6 +34,15 @@ | ||
8 | for i in $(MAN8); \ | ||
9 | do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.@man8ext@; fi; done | ||
10 | |||
11 | +install-l10n: $(ALL) | ||
12 | + mkdir -p $(mandir)/$(SLANG)/man1 $(mandir)/$(SLANG)/man5 $(mandir)/$(SLANG)/man8 | ||
13 | + for i in $(MAN1); \ | ||
14 | + do $(INSTALL) $$i.1 $(mandir)/$(SLANG)/man1/$$i.@man1ext@; done | ||
15 | + for i in $(MAN5); \ | ||
16 | + do $(INSTALL) $$i.5 $(mandir)/$(SLANG)/man5/$$i.@man5ext@; done | ||
17 | + for i in $(MAN8); \ | ||
18 | + do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/$(SLANG)/man8/$$i.@man8ext@; fi; done | ||
19 | + | ||
20 | clean: | ||
21 | rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~ | ||
22 | |||
23 | @@ -49,7 +58,7 @@ | ||
24 | @for i in @languages@; do if test -d $$i; then echo; \ | ||
25 | echo "==== Installing the `cat $$i.txt` man pages. ===="; \ | ||
26 | cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \ | ||
27 | - export SLANG; make -f ../Makefile install; cd ..; \ | ||
28 | + export SLANG; make -f ../Makefile install-l10n; cd ..; \ | ||
29 | else echo "==== No $$i man pages found. ===="; fi; done | ||
30 | |||
31 | cleansubdirs: | ||
diff --git a/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch b/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch new file mode 100644 index 0000000000..e321325d63 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch | |||
@@ -0,0 +1,145 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | diff -Naur man-1.6e.orig/src/apropos.sh man-1.6e/src/apropos.sh | ||
6 | --- man-1.6e.orig/src/apropos.sh 2007-05-18 13:49:31.000000000 -0300 | ||
7 | +++ man-1.6e/src/apropos.sh 2007-05-18 14:24:33.000000000 -0300 | ||
8 | @@ -60,16 +60,56 @@ | ||
9 | esac | ||
10 | done | ||
11 | |||
12 | +# list of languages to look for | ||
13 | +LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '` | ||
14 | +DIR_LIST="" | ||
15 | +for d in /var/cache/man $manpath /usr/lib | ||
16 | +do | ||
17 | + for l in $LANG_LIST | ||
18 | + do | ||
19 | + if [ -d $d/$l ] | ||
20 | + then | ||
21 | + # check that the path is not already in the list | ||
22 | + if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null | ||
23 | + then | ||
24 | + DIR_LIST="$DIR_LIST $d/$l" | ||
25 | + fi | ||
26 | + fi | ||
27 | + done | ||
28 | + DIR_LIST="$DIR_LIST $d" | ||
29 | + # check that the path is not already in the list | ||
30 | + if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null | ||
31 | + then | ||
32 | + DIR_LIST="$DIR_LIST $d/$l" | ||
33 | + fi | ||
34 | +done | ||
35 | + | ||
36 | while [ "$1" != "" ] | ||
37 | do | ||
38 | found=0 | ||
39 | - for d in /var/cache/man $manpath /usr/lib | ||
40 | + # in order not to display lines in more than one language for | ||
41 | + # a same man page; we check that a given man page name | ||
42 | + # hasn't already been displayed | ||
43 | + BAZ="" | ||
44 | + for d in $DIR_LIST | ||
45 | do | ||
46 | if [ -f $d/whatis ] | ||
47 | then | ||
48 | - if grep -"$grepopt1" "$grepopt2""$1" $d/whatis | ||
49 | + if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis` | ||
50 | then | ||
51 | - found=1 | ||
52 | + # the LC_ALL=C is needed in case the text is | ||
53 | + # in a different encoding than the locale | ||
54 | + BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u` | ||
55 | + for i in $BAR | ||
56 | + do | ||
57 | + if ! echo "$BAZ" | grep "$i" > /dev/null | ||
58 | + then | ||
59 | + BAZ="$BAZ $i" | ||
60 | + i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`" | ||
61 | + echo -e "$FOO" | grep "$i" | ||
62 | + found=1 | ||
63 | + fi | ||
64 | + done | ||
65 | # Some people are satisfied with a single occurrence | ||
66 | # But it is better to give all | ||
67 | # break | ||
68 | diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh | ||
69 | --- man-1.6e.orig/src/makewhatis.sh 2007-05-18 13:49:31.000000000 -0300 | ||
70 | +++ man-1.6e/src/makewhatis.sh 2007-05-18 13:50:07.000000000 -0300 | ||
71 | @@ -41,12 +41,32 @@ | ||
72 | |||
73 | program=`basename $0` | ||
74 | |||
75 | +# this allows to define language specific values fro NAME, DESCRIPTION | ||
76 | +# if not defined, using those default values | ||
77 | +if [ -z "$MAN_NAME" ] | ||
78 | +then | ||
79 | + MAN_NAME="ИМЕ|NOM|JMÉNO|NAVN|ΟÎΟΜΑ|NOMBRE|NIME|IZENA|NIMI|IME|\ | ||
80 | +NÉV|NOME|åå‰|ì´ë¦„|NAAM|NAZWA|NUME|ИМЯ|MENO|ÐÐЗВÐ|å称|å稱" | ||
81 | +fi | ||
82 | +if [ -z "$MAN_DESCRIPTION" ] | ||
83 | +then | ||
84 | + MAN_DESCRIPTION="ОПИСÐÐИЕ|DESCRIPCIÓ|POPIS|BESKRIVELSE|BESCHREIBUNG|\ | ||
85 | +ΠΕΡΙΓΡΑΦΗ|DESCRIPCIÓN|KIRJELDUS|AZALPENA|KUVAUS|OPIS|LEÃRÃS|DESCRIZIONE|\ | ||
86 | +説明|설명|BESCHRIJVING|DESCRIÇÃO|DESCRIERE|ОПИС|æè¿°" | ||
87 | +fi | ||
88 | +# make them into awk regexp | ||
89 | +MAN_NAME="^(${MAN_NAME})"; | ||
90 | +MAN_DESCRIPTION="^(${MAN_DESCRIPTION})"; | ||
91 | + | ||
92 | # In case both /usr/man and /usr/share/man exist, the former is local | ||
93 | # and should be first. | ||
94 | # It is a bug to add /var/cache/man to DEFCATPATH. | ||
95 | dm= | ||
96 | for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man | ||
97 | do | ||
98 | + if [ -n "$LANG" -a -d "$d/$LANG" ]; then | ||
99 | + if [ x$dm = x ]; then dm="$d/$LANG"; else dm=$dm:"$d/$LANG"; fi | ||
100 | + fi | ||
101 | if [ -d $d ]; then | ||
102 | if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi | ||
103 | fi | ||
104 | @@ -55,6 +75,9 @@ | ||
105 | dc= | ||
106 | for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man | ||
107 | do | ||
108 | + if [ -n "$LANG" -a -d "$d/$LANG" ]; then | ||
109 | + if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi | ||
110 | + fi | ||
111 | if [ -d $d ]; then | ||
112 | if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi | ||
113 | fi | ||
114 | @@ -194,7 +217,7 @@ | ||
115 | section=$i | ||
116 | curdir=$mandir/${pages}$i | ||
117 | export section verbose curdir | ||
118 | - find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK ' | ||
119 | + find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" ' | ||
120 | |||
121 | function readline() { | ||
122 | if (use_zcat || use_bzcat) { | ||
123 | @@ -261,13 +284,7 @@ | ||
124 | gsub(/.\b/, ""); | ||
125 | if (($1 ~ /^\.[Ss][Hh]/ && | ||
126 | ($2 ~ /[Nn][Aa][Mm][Ee]/ || | ||
127 | - $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ || | ||
128 | - $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ || | ||
129 | - $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ || | ||
130 | - $2 ~ /^N[ÉE]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾Á°/ || | ||
131 | - $2 ~ /^̾¾Î/ || $2 ~ /^À̸§/ || $2 ~ /^NAZWA/ || | ||
132 | - $2 ~ /^îáú÷áîéå/ || $2 ~ /^Ãû³Æ/ || $2 ~ /^¦WºÙ/ || | ||
133 | - $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^ÈÌÅ/)) || | ||
134 | + $2 ~ MAN_NAME )) || | ||
135 | (pages == "cat" && $1 ~ /^NAME/)) { | ||
136 | if (!insh) { | ||
137 | insh = 1; | ||
138 | @@ -278,6 +295,7 @@ | ||
139 | if ($1 ~ /^\.[Ss][HhYS]/ || | ||
140 | (pages == "cat" && | ||
141 | ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ || | ||
142 | + $1 ~ MAN_DESCRIPTION || | ||
143 | $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ || | ||
144 | $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ || | ||
145 | $0 ~ /^[^ ]/))) { | ||
diff --git a/meta/recipes-extended/man/man/man-1.6e-mandirs.patch b/meta/recipes-extended/man/man/man-1.6e-mandirs.patch new file mode 100644 index 0000000000..b240064c98 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.6e-mandirs.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.6e.orig/src/man.conf.in 2005-08-20 20:26:06.000000000 -0300 | ||
6 | +++ man-1.6e/src/man.conf.in 2007-05-18 10:30:29.000000000 -0300 | ||
7 | @@ -36,11 +36,12 @@ | ||
8 | # | ||
9 | # Every automatically generated MANPATH includes these fields | ||
10 | # | ||
11 | -MANPATH /usr/man | ||
12 | MANPATH /usr/share/man | ||
13 | +MANPATH /usr/X11R6/man | ||
14 | MANPATH /usr/local/man | ||
15 | MANPATH /usr/local/share/man | ||
16 | -MANPATH /usr/X11R6/man | ||
17 | +MANPATH /usr/kerberos/man | ||
18 | +MANPATH /usr/man | ||
19 | # | ||
20 | # Uncomment if you want to include one of these by default | ||
21 | # | ||
22 | @@ -67,6 +68,9 @@ | ||
23 | MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man | ||
24 | MANPATH_MAP /usr/bin/X11 /usr/X11R6/man | ||
25 | MANPATH_MAP /usr/bin/mh /usr/share/man | ||
26 | +MANPATH_MAP /usr/kerberos/bin /usr/kerberos/man | ||
27 | +MANPATH_MAP /usr/kerberos/sbin /usr/kerberos/man | ||
28 | + | ||
29 | # | ||
30 | # NOAUTOPATH keeps man from automatically adding directories that look like | ||
31 | # manual page directories to the path. | ||
diff --git a/meta/recipes-extended/man/man/man-1.6e-new_sections.patch b/meta/recipes-extended/man/man/man-1.6e-new_sections.patch new file mode 100644 index 0000000000..fb9773c646 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.6e-new_sections.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | --- man-1.6e.orig/configure 2006-05-01 14:56:14.000000000 -0300 | ||
6 | +++ man-1.6e/configure 2007-05-18 14:35:43.000000000 -0300 | ||
7 | @@ -960,7 +960,7 @@ | ||
8 | |||
9 | # What sections do we anticipate? | ||
10 | |||
11 | -tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o" | ||
12 | +tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o" | ||
13 | |||
14 | if [ x$default = x ]; then | ||
15 | echo "" | ||
diff --git a/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch b/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch new file mode 100644 index 0000000000..1d1cb0c724 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | Index: man-1.6f/src/makewhatis.sh | ||
6 | =================================================================== | ||
7 | --- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:42:34.000000000 -0800 | ||
8 | +++ man-1.6f/src/makewhatis.sh 2010-12-29 13:42:35.667428347 -0800 | ||
9 | @@ -124,7 +124,7 @@ | ||
10 | continue;; | ||
11 | -s) setsections=1 | ||
12 | continue;; | ||
13 | - -u) findarg="-ctime 0" | ||
14 | + -u) findarg="-newer /var/cache/man/whatis" | ||
15 | update=1 | ||
16 | continue;; | ||
17 | -v) verbose=1 | ||
18 | @@ -165,14 +165,7 @@ | ||
19 | # first truncate all the whatis files that will be created new, | ||
20 | # then only update - we might visit the same directory twice | ||
21 | if [ x$update = x ]; then | ||
22 | - for pages in man cat | ||
23 | - do | ||
24 | - eval path="\$$pages"path | ||
25 | - for mandir in $path | ||
26 | - do | ||
27 | - cp /dev/null $mandir/whatis | ||
28 | - done | ||
29 | - done | ||
30 | + cp /dev/null /var/cache/man/whatis | ||
31 | fi | ||
32 | |||
33 | for pages in man cat | ||
diff --git a/meta/recipes-extended/man/man/man-1.6e-security.patch b/meta/recipes-extended/man/man/man-1.6e-security.patch new file mode 100644 index 0000000000..312a882f06 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.6e-security.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh | ||
6 | --- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300 | ||
7 | +++ man-1.6e/src/makewhatis.sh 2007-05-18 10:18:31.000000000 -0300 | ||
8 | @@ -45,7 +45,7 @@ | ||
9 | # and should be first. | ||
10 | # It is a bug to add /var/cache/man to DEFCATPATH. | ||
11 | dm= | ||
12 | -for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man | ||
13 | +for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man | ||
14 | do | ||
15 | if [ -d $d ]; then | ||
16 | if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi | ||
17 | @@ -53,7 +53,7 @@ | ||
18 | done | ||
19 | DEFMANPATH=$dm | ||
20 | dc= | ||
21 | -for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man | ||
22 | +for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man | ||
23 | do | ||
24 | if [ -d $d ]; then | ||
25 | if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi | ||
26 | @@ -76,12 +76,12 @@ | ||
27 | # We try here to be careful (and avoid preconstructed symlinks) | ||
28 | # in case makewhatis is run as root, by creating a subdirectory of /tmp. | ||
29 | |||
30 | -TMPFILEDIR=/tmp/whatis.tmp.dir.$$ | ||
31 | -rm -rf $TMPFILEDIR | ||
32 | -if ! mkdir -m 0700 $TMPFILEDIR; then | ||
33 | - echo Could not create $TMPFILEDIR | ||
34 | - exit 1; | ||
35 | +TMPFILEDIR=`mktemp -d /tmp/makewhatisXXXXXX` | ||
36 | +if [ $? -ne 0 ]; then | ||
37 | + echo "$0: Can't create temp file, exiting..." | ||
38 | + exit 1 | ||
39 | fi | ||
40 | +chmod 0700 $TMPFILEDIR | ||
41 | TMPFILE=$TMPFILEDIR/w | ||
42 | |||
43 | # make sure TMPFILEDIR is deleted if program is killed or terminates | ||
44 | diff -Naur man-1.6e.orig/src/man.c man-1.6e/src/man.c | ||
45 | --- man-1.6e.orig/src/man.c 2006-05-01 17:34:22.000000000 -0300 | ||
46 | +++ man-1.6e/src/man.c 2007-05-18 10:11:33.000000000 -0300 | ||
47 | @@ -1234,7 +1234,6 @@ | ||
48 | #endif | ||
49 | |||
50 | |||
51 | -#if 0 | ||
52 | { | ||
53 | /* There are no known cases of buffer overflow caused by | ||
54 | excessively long environment variables. In case you find one, | ||
55 | @@ -1257,7 +1256,6 @@ | ||
56 | MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET, | ||
57 | MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */ | ||
58 | } | ||
59 | -#endif | ||
60 | |||
61 | |||
62 | #ifndef __FreeBSD__ | ||
diff --git a/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch b/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch new file mode 100644 index 0000000000..568f742100 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch | |||
@@ -0,0 +1,160 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | diff -Naur man-1.6e.orig/catopen/catopen.c man-1.6e/catopen/catopen.c | ||
6 | --- man-1.6e.orig/catopen/catopen.c 2005-08-20 20:26:06.000000000 -0300 | ||
7 | +++ man-1.6e/catopen/catopen.c 2007-05-18 11:31:05.000000000 -0300 | ||
8 | @@ -9,22 +9,63 @@ | ||
9 | extern char *index (const char *, int); /* not always in <string.h> */ | ||
10 | extern char *my_malloc(int); /* in util.c */ | ||
11 | |||
12 | +/* if the program has sgid/suid privileges then getenv doesn't return | ||
13 | + * NLSPATH; so we set here a good default value. | ||
14 | + */ | ||
15 | #ifndef DEFAULT_NLSPATH | ||
16 | # if __GLIBC__ >= 2 | ||
17 | -# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N" | ||
18 | +# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N" | ||
19 | # else | ||
20 | # define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L" | ||
21 | # endif | ||
22 | #endif | ||
23 | |||
24 | -static nl_catd my_catopenpath(char *name, char *path); | ||
25 | +static nl_catd my_catopenpath(char *name, char *path, char *lang); | ||
26 | |||
27 | static /* this source included in gripes.c */ | ||
28 | nl_catd | ||
29 | my_catopen(char *name, int oflag) { | ||
30 | - nl_catd fd; | ||
31 | + nl_catd fd = (nl_catd) -1; | ||
32 | + | ||
33 | + /* using first the my_catopenpath, which looks with LANGUAGE | ||
34 | + * and only if it fails ressort to catopen, it gives better i18n | ||
35 | + */ | ||
36 | + { | ||
37 | + char *nlspath, *lang, *s; | ||
38 | |||
39 | - fd = catopen(name, oflag); | ||
40 | + /* | ||
41 | + * "If NLSPATH does not exist in the environment, or if a | ||
42 | + * message catalog cannot be opened in any of the paths specified | ||
43 | + * by NLSPATH, then an implementation defined default path is used" | ||
44 | + */ | ||
45 | + nlspath = getenv("NLSPATH"); | ||
46 | + if (!nlspath) | ||
47 | + nlspath = DEFAULT_NLSPATH; | ||
48 | + | ||
49 | + lang = getenv("LANGUAGE"); | ||
50 | + if (!lang) | ||
51 | + lang = getenv("LC_ALL"); | ||
52 | + if (!lang) | ||
53 | + lang = getenv("LC_MESSAGES"); | ||
54 | + if (!lang) | ||
55 | + lang = getenv("LANG"); | ||
56 | + if (!lang) | ||
57 | + lang = ""; | ||
58 | + | ||
59 | + while(*lang && (fd == (nl_catd) -1)) { | ||
60 | + s = index(lang, ':'); | ||
61 | + if (s) *s = 0; | ||
62 | + fd = my_catopenpath(name, nlspath, lang); | ||
63 | + if (s) lang=s+1; | ||
64 | + else lang = ""; | ||
65 | + } | ||
66 | + if (fd == (nl_catd) -1) | ||
67 | + fd = my_catopenpath(name, nlspath, "en"); | ||
68 | + } | ||
69 | + | ||
70 | + /* still not found, use the system catopen */ | ||
71 | + if (fd == (nl_catd) -1) | ||
72 | + fd = catopen(name, oflag); | ||
73 | |||
74 | if (fd == (nl_catd) -1 && oflag) { | ||
75 | oflag = 0; | ||
76 | @@ -32,8 +73,6 @@ | ||
77 | } | ||
78 | |||
79 | if (fd == (nl_catd) -1) { | ||
80 | - char *nlspath; | ||
81 | - | ||
82 | /* The libc catopen fails - let us see if we can do better */ | ||
83 | /* The quotes below are from X/Open, XPG 1987, Vol. 3. */ | ||
84 | |||
85 | @@ -58,17 +97,6 @@ | ||
86 | #endif | ||
87 | } | ||
88 | |||
89 | - /* | ||
90 | - * "If NLSPATH does not exist in the environment, or if a | ||
91 | - * message catalog cannot be opened in any of the paths specified | ||
92 | - * by NLSPATH, then an implementation defined default path is used" | ||
93 | - */ | ||
94 | - | ||
95 | - nlspath = getenv("NLSPATH"); | ||
96 | - if (nlspath) | ||
97 | - fd = my_catopenpath(name, nlspath); | ||
98 | - if (fd == (nl_catd) -1) | ||
99 | - fd = my_catopenpath(name, DEFAULT_NLSPATH); | ||
100 | } | ||
101 | return fd; | ||
102 | } | ||
103 | @@ -90,15 +118,13 @@ | ||
104 | * | ||
105 | */ | ||
106 | static nl_catd | ||
107 | -my_catopenpath(char *name, char *nlspath) { | ||
108 | - int fd; | ||
109 | +my_catopenpath(char *name, char *nlspath, char *lang) { | ||
110 | nl_catd cfd = (nl_catd) -1; | ||
111 | - char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c; | ||
112 | + char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c; | ||
113 | int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz; | ||
114 | |||
115 | namesz = strlen(name); | ||
116 | |||
117 | - lang = getenv("LANG"); | ||
118 | if (!lang) | ||
119 | lang = ""; | ||
120 | langsz = strlen(lang); | ||
121 | @@ -194,14 +220,9 @@ | ||
122 | path = s+1; | ||
123 | } else | ||
124 | path = 0; | ||
125 | - fd = open(file, O_RDONLY); | ||
126 | - if (fd != -1) { | ||
127 | - /* we found the right catalog - but we don't know the | ||
128 | - type of nl_catd, so close it again and ask libc */ | ||
129 | - close(fd); | ||
130 | - cfd = catopen(file, 0); | ||
131 | - break; | ||
132 | - } | ||
133 | + cfd = catopen(file, 0); | ||
134 | + if (cfd != (nl_catd) -1) | ||
135 | + break; | ||
136 | } | ||
137 | |||
138 | free(path0); | ||
139 | diff -Naur man-1.6e.orig/src/manpath.c man-1.6e/src/manpath.c | ||
140 | --- man-1.6e.orig/src/manpath.c 2006-08-03 18:18:33.000000000 -0300 | ||
141 | +++ man-1.6e/src/manpath.c 2007-05-18 11:02:48.000000000 -0300 | ||
142 | @@ -282,13 +282,14 @@ | ||
143 | /* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so: | ||
144 | the return value of setlocale is an opaque string. */ | ||
145 | /* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */ | ||
146 | - if((lang = getenv("LC_ALL")) != NULL) | ||
147 | + /* LANGUAGE is GNU/Linux and overrules all */ | ||
148 | + if((lang = getenv("LANGUAGE")) != NULL) | ||
149 | split2(dir, lang, add_to_mandirlist_x, perrs); | ||
150 | - if((lang = getenv("LC_MESSAGES")) != NULL) | ||
151 | + else if((lang = getenv("LC_ALL")) != NULL) | ||
152 | split2(dir, lang, add_to_mandirlist_x, perrs); | ||
153 | - if((lang = getenv("LANG")) != NULL) | ||
154 | + else if((lang = getenv("LC_MESSAGES")) != NULL) | ||
155 | split2(dir, lang, add_to_mandirlist_x, perrs); | ||
156 | - if((lang = getenv("LANGUAGE")) != NULL) | ||
157 | + else if((lang = getenv("LANG")) != NULL) | ||
158 | split2(dir, lang, add_to_mandirlist_x, perrs); | ||
159 | add_to_mandirlist_x(dir, 0, perrs); | ||
160 | } | ||
diff --git a/meta/recipes-extended/man/man/man-1.6e-whatis2.patch b/meta/recipes-extended/man/man/man-1.6e-whatis2.patch new file mode 100644 index 0000000000..7f013836c0 --- /dev/null +++ b/meta/recipes-extended/man/man/man-1.6e-whatis2.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
4 | |||
5 | Index: man-1.6f/src/makewhatis.sh | ||
6 | =================================================================== | ||
7 | --- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:51:45.000000000 -0800 | ||
8 | +++ man-1.6f/src/makewhatis.sh 2010-12-29 13:59:35.399799412 -0800 | ||
9 | @@ -164,10 +164,15 @@ | ||
10 | fi | ||
11 | catpath=`echo ${catpath} | tr : ' '` | ||
12 | |||
13 | +#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'` | ||
14 | +WHATIS_DIR=$DESTDIR/var/cache/man/$LANG | ||
15 | +[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/ | ||
16 | + | ||
17 | # first truncate all the whatis files that will be created new, | ||
18 | # then only update - we might visit the same directory twice | ||
19 | if [ x$update = x ]; then | ||
20 | - cp /dev/null /var/cache/man/whatis | ||
21 | + mkdir -p $WHATIS_DIR/ | ||
22 | + /bin/echo -n > $WHATIS_DIR/whatis | ||
23 | fi | ||
24 | |||
25 | for pages in man cat | ||
26 | @@ -180,13 +185,7 @@ | ||
27 | echo "about to enter $mandir" > /dev/stderr | ||
28 | fi | ||
29 | |||
30 | - # kludge for Slackware's /usr/man/preformat | ||
31 | - if [ $mandir = /usr/man/preformat ] | ||
32 | - then | ||
33 | - mandir1=/usr/man | ||
34 | - else | ||
35 | - mandir1=$mandir | ||
36 | - fi | ||
37 | + mandir1=$WHATIS_DIR | ||
38 | |||
39 | # if $mandir is on a readonly partition, and the whatis file | ||
40 | # is not a symlink, then let's skip trying to update it | ||
41 | @@ -207,11 +206,6 @@ | ||
42 | fi | ||
43 | fi | ||
44 | |||
45 | - if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then | ||
46 | - if [ x$verbose != x ]; then | ||
47 | - echo skipping $mandir - we did it already > /dev/stderr | ||
48 | - fi | ||
49 | - else | ||
50 | here=`pwd` | ||
51 | cd $mandir | ||
52 | for i in $sections | ||
diff --git a/meta/recipes-extended/man/man/man.1.gz b/meta/recipes-extended/man/man/man.1.gz new file mode 100644 index 0000000000..c368045153 --- /dev/null +++ b/meta/recipes-extended/man/man/man.1.gz | |||
Binary files differ | |||
diff --git a/meta/recipes-extended/man/man/man.7.gz b/meta/recipes-extended/man/man/man.7.gz new file mode 100644 index 0000000000..e85af82426 --- /dev/null +++ b/meta/recipes-extended/man/man/man.7.gz | |||
Binary files differ | |||
diff --git a/meta/recipes-extended/man/man/man.conf b/meta/recipes-extended/man/man/man.conf new file mode 100644 index 0000000000..fc10be2758 --- /dev/null +++ b/meta/recipes-extended/man/man/man.conf | |||
@@ -0,0 +1,141 @@ | |||
1 | # | ||
2 | # Generated automatically from man.conf.in by the | ||
3 | # configure script. | ||
4 | # | ||
5 | # man.conf from man-1.5p | ||
6 | # | ||
7 | # For more information about this file, see the man pages man(1) | ||
8 | # and man.conf(5). | ||
9 | # | ||
10 | # This file is read by man to configure the default manpath (also used | ||
11 | # when MANPATH contains an empty substring), to find out where the cat | ||
12 | # pages corresponding to given man pages should be stored, | ||
13 | # and to map each PATH element to a manpath element. | ||
14 | # It may also record the pathname of the man binary. [This is unused.] | ||
15 | # The format is: | ||
16 | # | ||
17 | # MANBIN pathname | ||
18 | # MANPATH manpath_element [corresponding_catdir] | ||
19 | # MANPATH_MAP path_element manpath_element | ||
20 | # | ||
21 | # If no catdir is given, it is assumed to be equal to the mandir | ||
22 | # (so that this dir has both man1 etc. and cat1 etc. subdirs). | ||
23 | # This is the traditional Unix setup. | ||
24 | # Certain versions of the FSSTND recommend putting formatted versions | ||
25 | # of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x. | ||
26 | # The keyword FSSTND will cause this behaviour. | ||
27 | # Certain versions of the FHS recommend putting formatted versions of | ||
28 | # /usr/.../share/man/[locale/]manx/page.x into | ||
29 | # /var/cache/man/.../[locale/]catx/page.x. | ||
30 | # The keyword FHS will cause this behaviour (and overrides FSSTND). | ||
31 | # Explicitly given catdirs override. | ||
32 | # | ||
33 | # FSSTND | ||
34 | FHS | ||
35 | # | ||
36 | # This file is also read by man in order to find how to call nroff, less, etc., | ||
37 | # and to determine the correspondence between extensions and decompressors. | ||
38 | # | ||
39 | # MANBIN /usr/local/bin/man | ||
40 | # | ||
41 | # Every automatically generated MANPATH includes these fields | ||
42 | # | ||
43 | MANPATH /usr/man | ||
44 | MANPATH /usr/share/man | ||
45 | MANPATH /usr/local/man | ||
46 | MANPATH /usr/local/share/man | ||
47 | MANPATH /usr/X11R6/man | ||
48 | # | ||
49 | # Uncomment if you want to include one of these by default | ||
50 | # | ||
51 | # MANPATH /opt/*/man | ||
52 | # MANPATH /usr/lib/*/man | ||
53 | # MANPATH /usr/share/*/man | ||
54 | # MANPATH /usr/kerberos/man | ||
55 | # | ||
56 | # Set up PATH to MANPATH mapping | ||
57 | # | ||
58 | # If people ask for "man foo" and have "/dir/bin/foo" in their PATH | ||
59 | # and the docs are found in "/dir/man", then no mapping is required. | ||
60 | # | ||
61 | # The below mappings are superfluous when the right hand side is | ||
62 | # in the mandatory manpath already, but will keep man from statting | ||
63 | # lots of other nearby files and directories. | ||
64 | # | ||
65 | MANPATH_MAP /bin /usr/share/man | ||
66 | MANPATH_MAP /sbin /usr/share/man | ||
67 | MANPATH_MAP /usr/bin /usr/share/man | ||
68 | MANPATH_MAP /usr/sbin /usr/share/man | ||
69 | MANPATH_MAP /usr/local/bin /usr/local/share/man | ||
70 | MANPATH_MAP /usr/local/sbin /usr/local/share/man | ||
71 | MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man | ||
72 | MANPATH_MAP /usr/bin/X11 /usr/X11R6/man | ||
73 | MANPATH_MAP /usr/bin/mh /usr/share/man | ||
74 | # | ||
75 | # NOAUTOPATH keeps man from automatically adding directories that look like | ||
76 | # manual page directories to the path. | ||
77 | # | ||
78 | #NOAUTOPATH | ||
79 | # | ||
80 | # NOCACHE keeps man from creating cache pages ("cat pages") | ||
81 | # (generally one enables/disable cat page creation by creating/deleting | ||
82 | # the directory they would live in - man never does mkdir) | ||
83 | # | ||
84 | #NOCACHE | ||
85 | # | ||
86 | # Useful paths - note that COL should not be defined when | ||
87 | # NROFF is defined as "groff -Tascii" or "groff -Tlatin1"; | ||
88 | # not only is it superfluous, but it actually damages the output. | ||
89 | # For use with utf-8, NROFF should be "nroff -mandoc" without -T option. | ||
90 | # (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.) | ||
91 | # | ||
92 | # If you have a new troff (version 1.18.1?) and its colored output | ||
93 | # causes problems, add the -c option to TROFF, NROFF, JNROFF. | ||
94 | # | ||
95 | TROFF /usr/bin/groff -Tps -mandoc | ||
96 | NROFF /usr/bin/nroff -Tlatin1 -mandoc | ||
97 | JNROFF /usr/bin/groff -Tnippon -mandocj | ||
98 | EQN /usr/bin/eqn -Tps | ||
99 | NEQN /usr/bin/eqn -Tlatin1 | ||
100 | JNEQN /usr/bin/eqn -Tnippon | ||
101 | TBL /usr/bin/tbl | ||
102 | # COL /usr/bin/col | ||
103 | REFER /usr/bin/refer | ||
104 | PIC /usr/bin/pic | ||
105 | VGRIND | ||
106 | GRAP | ||
107 | PAGER /usr/bin/less -isR | ||
108 | CAT /bin/cat | ||
109 | # | ||
110 | # The command "man -a xyzzy" will show all man pages for xyzzy. | ||
111 | # When CMP is defined man will try to avoid showing the same | ||
112 | # text twice. (But compressed pages compare unequal.) | ||
113 | # | ||
114 | CMP /usr/bin/cmp -s | ||
115 | # | ||
116 | # Compress cat pages | ||
117 | # | ||
118 | COMPRESS /bin/bzip2 | ||
119 | COMPRESS_EXT .bz2 | ||
120 | # | ||
121 | # Default manual sections (and order) to search if -S is not specified | ||
122 | # and the MANSECT environment variable is not set. | ||
123 | # | ||
124 | MANSECT 1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o | ||
125 | # | ||
126 | # Default options to use when man is invoked without options | ||
127 | # This is mainly for the benefit of those that think -a should be the default | ||
128 | # Note that some systems have /usr/man/allman, causing pages to be shown twice. | ||
129 | # | ||
130 | #MANDEFOPTIONS -a | ||
131 | # | ||
132 | # Decompress with given decompressor when input file has given extension | ||
133 | # The command given must act as a filter. | ||
134 | # | ||
135 | .gz /bin/gunzip -c | ||
136 | .bz2 /usr/bin/bunzip2 -c | ||
137 | .xz /usr/bin/unxz -c | ||
138 | .z | ||
139 | .Z /bin/zcat | ||
140 | .F | ||
141 | .Y | ||
diff --git a/meta/recipes-extended/man/man/manpath.5.gz b/meta/recipes-extended/man/man/manpath.5.gz new file mode 100644 index 0000000000..c012ff8976 --- /dev/null +++ b/meta/recipes-extended/man/man/manpath.5.gz | |||
Binary files differ | |||
diff --git a/meta/recipes-extended/man/man_1.6g.bb b/meta/recipes-extended/man/man_1.6g.bb new file mode 100644 index 0000000000..03fffd6015 --- /dev/null +++ b/meta/recipes-extended/man/man_1.6g.bb | |||
@@ -0,0 +1,79 @@ | |||
1 | SUMMARY = "Online documentation tools" | ||
2 | DESCRIPTION = "A set of documentation tools: man, apropos and whatis" | ||
3 | SECTION = "console/utils" | ||
4 | HOMEPAGE = "http://primates.ximian.com/~flucifredi/man" | ||
5 | LICENSE = "GPLv2" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" | ||
7 | |||
8 | PR = "r1" | ||
9 | |||
10 | DEPENDS = "groff less" | ||
11 | |||
12 | def compress_pkg(d): | ||
13 | if "compress_doc" in (d.getVar("INHERIT", True) or "").split(): | ||
14 | compress = d.getVar("DOC_COMPRESS", True) | ||
15 | if compress == "gz": | ||
16 | return "gzip" | ||
17 | elif compress == "bz2": | ||
18 | return "bzip2" | ||
19 | elif compress == "xz": | ||
20 | return "xz" | ||
21 | return "" | ||
22 | |||
23 | RDEPENDS_${PN} += "${@compress_pkg(d)}" | ||
24 | |||
25 | SRC_URI = "http://primates.ximian.com/~flucifredi/${BPN}/${BPN}-${PV}.tar.gz \ | ||
26 | file://man-1.5k-confpath.patch;striplevel=0 \ | ||
27 | file://man-1.5h1-make.patch \ | ||
28 | file://man-1.5k-nonascii.patch \ | ||
29 | file://man-1.6e-security.patch \ | ||
30 | file://man-1.6e-mandirs.patch \ | ||
31 | file://man-1.5m2-bug11621.patch \ | ||
32 | file://man-1.5k-sofix.patch \ | ||
33 | file://man-1.5m2-buildroot.patch \ | ||
34 | file://man-1.6e-ro_usr.patch \ | ||
35 | file://man-1.5i2-newline.patch;striplevel=0 \ | ||
36 | file://man-1.5j-utf8.patch \ | ||
37 | file://man-1.5i2-overflow.patch \ | ||
38 | file://man-1.5j-nocache.patch \ | ||
39 | file://man-1.5i2-initial.patch \ | ||
40 | file://man-1.5h1-gencat.patch;striplevel=0 \ | ||
41 | file://man-1.5g-nonrootbuild.patch \ | ||
42 | file://man-1.5m2-tv_fhs.patch;striplevel=0 \ | ||
43 | file://man-1.5j-i18n.patch \ | ||
44 | file://man-1.6e-whatis2.patch \ | ||
45 | file://man-1.6e-use_i18n_vars_in_a_std_way.patch \ | ||
46 | file://man-1.5m2-no-color-for-printing.patch \ | ||
47 | file://man-1.5m2-sigpipe.patch \ | ||
48 | file://man-1.6e-i18n_whatis.patch \ | ||
49 | file://man-1.6e-new_sections.patch \ | ||
50 | file://man.1.gz;unpack=false \ | ||
51 | file://man.7.gz;unpack=false \ | ||
52 | file://man.conf \ | ||
53 | file://manpath.5.gz;unpack=false" | ||
54 | |||
55 | SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660" | ||
56 | SRC_URI[sha256sum] = "ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f" | ||
57 | |||
58 | do_configure () { | ||
59 | ${S}/configure -default -confdir /etc +sgid +fhs +lang all | ||
60 | } | ||
61 | |||
62 | |||
63 | fakeroot do_install() { | ||
64 | oe_runmake install DESTDIR=${D} | ||
65 | } | ||
66 | |||
67 | do_install_append(){ | ||
68 | mkdir -p ${D}${sysconfdir} | ||
69 | mkdir -p ${D}${datadir}/man/man5 | ||
70 | mkdir -p ${D}${datadir}/man/man7 | ||
71 | cp ${WORKDIR}/man.conf ${D}${sysconfdir}/man.config | ||
72 | cp ${WORKDIR}/man.1.gz ${D}${datadir}/man/man1/ | ||
73 | cp ${WORKDIR}/man.7.gz ${D}${datadir}/man/man7/ | ||
74 | cp ${WORKDIR}/manpath.5.gz ${D}${datadir}/man/man5/ | ||
75 | } | ||
76 | |||
77 | |||
78 | RDEPENDS_${PN} = "less groff" | ||
79 | FILES_${PN} += "${datadir}/locale ${sysconfdir}/man.config" | ||
diff --git a/meta/recipes-extended/mc/mc/mc-CTRL.patch b/meta/recipes-extended/mc/mc/mc-CTRL.patch new file mode 100644 index 0000000000..d532bde9a6 --- /dev/null +++ b/meta/recipes-extended/mc/mc/mc-CTRL.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Fix build with musl by ensuring CTRL is defined. | ||
2 | |||
3 | musl does not define CTRL in <termios.h>, we could include <sys/ttydefaults.h> | ||
4 | explicitly but it's easier just to ensure CTRL is defined. | ||
5 | |||
6 | This patch is taken from Sabotage Linux, the license statement for patches and | ||
7 | build scripts in Sabotage Linux says: | ||
8 | |||
9 | To the extent possible under law, Christian Neukirchen has waived | ||
10 | all copyright and related or neighboring rights to this work. | ||
11 | |||
12 | http://creativecommons.org/publicdomain/zero/1.0/ | ||
13 | |||
14 | Therefore this should be good to include in OpenEmbedded. | ||
15 | |||
16 | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> | ||
17 | |||
18 | Upstream-status: Pending | ||
19 | |||
20 | diff -u mc-4.8.1.7.org/lib/tty/tty-ncurses.c mc-4.8.1.7/lib/tty/tty-ncurses.c | ||
21 | --- mc-4.8.1.7.org/lib/tty/tty-ncurses.c | ||
22 | +++ mc-4.8.1.7/lib/tty/tty-ncurses.c | ||
23 | @@ -65,7 +65,7 @@ | ||
24 | |||
25 | /*** file scope macro definitions ****************************************************************/ | ||
26 | |||
27 | -#if defined(_AIX) && !defined(CTRL) | ||
28 | +#if !defined(CTRL) | ||
29 | #define CTRL(x) ((x) & 0x1f) | ||
30 | #endif | ||
31 | |||
diff --git a/meta/recipes-extended/mc/mc_4.7.5.2.bb b/meta/recipes-extended/mc/mc_4.7.5.2.bb new file mode 100644 index 0000000000..b47eb02323 --- /dev/null +++ b/meta/recipes-extended/mc/mc_4.7.5.2.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | SUMMARY = "Midnight Commander is an ncurses based file manager" | ||
2 | HOMEPAGE = "http://www.midnight-commander.org/" | ||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
5 | SECTION = "console/utils" | ||
6 | DEPENDS = "ncurses glib-2.0" | ||
7 | RDEPENDS_${PN} = "ncurses-terminfo" | ||
8 | |||
9 | PR = "r3" | ||
10 | |||
11 | SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ | ||
12 | file://mc-CTRL.patch \ | ||
13 | " | ||
14 | |||
15 | SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6" | ||
16 | SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab" | ||
17 | |||
18 | inherit autotools gettext pkgconfig | ||
19 | |||
20 | EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba" | ||
21 | |||
22 | FILES_${PN}-dbg += "${libexecdir}/mc/.debug/" | ||
23 | |||
24 | do_install_append () { | ||
25 | sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* | ||
26 | sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/* | ||
27 | } | ||
28 | |||
29 | PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish" | ||
30 | |||
31 | SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts" | ||
32 | FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \ | ||
33 | ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \ | ||
34 | ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \ | ||
35 | ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ | ||
36 | ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ | ||
37 | ${libexecdir}/mc/extfs.d/uzip" | ||
38 | RDEPENDS_${BPN}-helpers-perl = "perl" | ||
39 | |||
40 | SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts" | ||
41 | FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541" | ||
42 | RDEPENDS_${BPN}-helpers-python = "python" | ||
43 | |||
44 | SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts" | ||
45 | FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*" | ||
46 | |||
47 | SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts" | ||
48 | FILES_${BPN}-fish = "${libexecdir}/mc/fish" | ||
49 | |||
diff --git a/meta/recipes-extended/mc/mc_4.8.12.bb b/meta/recipes-extended/mc/mc_4.8.12.bb new file mode 100644 index 0000000000..bc462e3fc0 --- /dev/null +++ b/meta/recipes-extended/mc/mc_4.8.12.bb | |||
@@ -0,0 +1,53 @@ | |||
1 | SUMMARY = "Midnight Commander is an ncurses based file manager" | ||
2 | HOMEPAGE = "http://www.midnight-commander.org/" | ||
3 | LICENSE = "GPLv3" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2" | ||
5 | SECTION = "console/utils" | ||
6 | DEPENDS = "ncurses glib-2.0" | ||
7 | RDEPENDS_${PN} = "ncurses-terminfo" | ||
8 | |||
9 | SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ | ||
10 | file://mc-CTRL.patch \ | ||
11 | " | ||
12 | |||
13 | SRC_URI[md5sum] = "a64c426364bfaee56b628f6c0738aade" | ||
14 | SRC_URI[sha256sum] = "1054fcc27a488771cbe5b85d7c10135fa1cd1b7682a19930d44b51a023e39396" | ||
15 | |||
16 | inherit autotools gettext pkgconfig | ||
17 | |||
18 | # | ||
19 | # Both Samba (smb) and sftp require package delivered from meta-openembedded | ||
20 | # | ||
21 | PACKAGECONFIG ??= "" | ||
22 | PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba," | ||
23 | PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2," | ||
24 | |||
25 | EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x" | ||
26 | |||
27 | FILES_${PN}-dbg += "${libexecdir}/mc/.debug/" | ||
28 | |||
29 | do_install_append () { | ||
30 | sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* | ||
31 | sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/* | ||
32 | } | ||
33 | |||
34 | PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish" | ||
35 | |||
36 | SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts" | ||
37 | FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \ | ||
38 | ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \ | ||
39 | ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \ | ||
40 | ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ | ||
41 | ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ | ||
42 | ${libexecdir}/mc/extfs.d/uzip" | ||
43 | RDEPENDS_${BPN}-helpers-perl = "perl" | ||
44 | |||
45 | SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts" | ||
46 | FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541" | ||
47 | RDEPENDS_${BPN}-helpers-python = "python" | ||
48 | |||
49 | SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts" | ||
50 | FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*" | ||
51 | |||
52 | SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts" | ||
53 | FILES_${BPN}-fish = "${libexecdir}/mc/fish" | ||
diff --git a/meta/recipes-extended/mdadm/files/gcc-4.9.patch b/meta/recipes-extended/mdadm/files/gcc-4.9.patch new file mode 100644 index 0000000000..54bf1d79ab --- /dev/null +++ b/meta/recipes-extended/mdadm/files/gcc-4.9.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | super-intel.c:5063:2: error: right-hand operand of comma expression has no effect [-Werror=unused-value] | ||
2 | snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, | ||
3 | ^ | ||
4 | cc1: all warnings being treated as errors | ||
5 | make: *** [super-intel.o] Error 1 | ||
6 | |||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Index: mdadm-3.3/super-intel.c | ||
11 | =================================================================== | ||
12 | --- mdadm-3.3.orig/super-intel.c 2014-05-02 15:08:21.154319651 -0700 | ||
13 | +++ mdadm-3.3/super-intel.c 2014-05-02 15:09:31.470985794 -0700 | ||
14 | @@ -5060,7 +5060,7 @@ | ||
15 | spare->cache_size = mpb->cache_size, | ||
16 | spare->pwr_cycle_count = __cpu_to_le32(1), | ||
17 | |||
18 | - snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, | ||
19 | + (void)snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, | ||
20 | MPB_SIGNATURE MPB_VERSION_RAID0); | ||
21 | |||
22 | for (d = super->disks; d; d = d->next) { | ||
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch new file mode 100644 index 0000000000..3b3db0a7f0 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Upstream-Status: pending | ||
2 | |||
3 | By hardcoding CC's definition in the Makefile, all the gcc parameters | ||
4 | set by tune settings are lost. Causing compile failure with x32 toolchain | ||
5 | |||
6 | As the bitbake defined CC is good, there is no need to redfine CC in the | ||
7 | make file, hence making the CC definition in the Makefile conditional. | ||
8 | |||
9 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07 | ||
10 | |||
11 | Index: mdadm-3.3/Makefile | ||
12 | =================================================================== | ||
13 | --- mdadm-3.3.orig/Makefile 2013-09-03 07:47:47.000000000 +0300 | ||
14 | +++ mdadm-3.3/Makefile 2013-10-16 16:44:23.542295487 +0300 | ||
15 | @@ -41,7 +41,7 @@ | ||
16 | |||
17 | KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32 | ||
18 | |||
19 | -CC = $(CROSS_COMPILE)gcc | ||
20 | +CC ?= $(CROSS_COMPILE)gcc | ||
21 | CXFLAGS ?= -ggdb | ||
22 | CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter | ||
23 | ifdef WARN_UNUSED | ||
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.1.bb b/meta/recipes-extended/mdadm/mdadm_3.3.1.bb new file mode 100644 index 0000000000..3c43e0d867 --- /dev/null +++ b/meta/recipes-extended/mdadm/mdadm_3.3.1.bb | |||
@@ -0,0 +1,46 @@ | |||
1 | SUMMARY = "Tool for managing software RAID under Linux" | ||
2 | HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/" | ||
3 | |||
4 | # Some files are GPLv2+ while others are GPLv2. | ||
5 | LICENSE = "GPLv2 & GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
7 | file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ | ||
8 | file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" | ||
9 | |||
10 | |||
11 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ | ||
12 | file://mdadm-3.2.2_fix_for_x32.patch \ | ||
13 | file://gcc-4.9.patch \ | ||
14 | " | ||
15 | |||
16 | SRC_URI[md5sum] = "4227d48de62dfb217c92fa0c54171bbe" | ||
17 | SRC_URI[sha256sum] = "d8c74112cfd77bdc1dbc1291fe8d9243c76d91bfa276fcb95f2a75ca7717ab02" | ||
18 | |||
19 | CFLAGS += "-fno-strict-aliasing" | ||
20 | |||
21 | inherit autotools-brokensep | ||
22 | |||
23 | # We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header | ||
24 | do_configure_prepend () { | ||
25 | sed -i -e '/.*ansidecl.h.*/d' ${S}/sha1.h | ||
26 | } | ||
27 | |||
28 | EXTRA_OEMAKE = "CHECK_RUN_DIR=0" | ||
29 | # PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h | ||
30 | # prevents 64-bit userland from seeing this definition, instead defaulting | ||
31 | # to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get | ||
32 | # int-ll64.h included | ||
33 | EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' | ||
34 | EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' | ||
35 | EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' | ||
36 | |||
37 | do_compile() { | ||
38 | oe_runmake | ||
39 | } | ||
40 | |||
41 | do_install() { | ||
42 | export STRIP="" | ||
43 | autotools_do_install | ||
44 | } | ||
45 | |||
46 | FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules" | ||
diff --git a/meta/recipes-extended/mingetty/mingetty_1.08.bb b/meta/recipes-extended/mingetty/mingetty_1.08.bb new file mode 100644 index 0000000000..f1936afd23 --- /dev/null +++ b/meta/recipes-extended/mingetty/mingetty_1.08.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Compact getty terminal handler for virtual consoles only" | ||
2 | SECTION = "console/utils" | ||
3 | HOMEPAGE = "http://sourceforge.net/projects/mingetty/" | ||
4 | LICENSE = "GPLv2" | ||
5 | PR = "r3" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e" | ||
8 | SRC_URI = "http://cdnetworks-kr-1.dl.sourceforge.net/project/mingetty/mingetty/${PV}/mingetty-${PV}.tar.gz" | ||
9 | |||
10 | SRC_URI[md5sum] = "2a75ad6487ff271424ffc00a64420990" | ||
11 | SRC_URI[sha256sum] = "0f55c90ba4faa913d91ef99cbf5cb2eb4dbe2780314c3bb17953f849c8cddd17" | ||
12 | |||
13 | # substitute our CFLAGS for "-O2 -Wall -W -pipe" | ||
14 | # | ||
15 | EXTRA_OEMAKE = "CC='${CC}' \ | ||
16 | CFLAGS='${CFLAGS} -D_GNU_SOURCE'" | ||
17 | |||
18 | do_install(){ | ||
19 | install -d ${D}${mandir}/man8 ${D}/${base_sbindir} | ||
20 | oe_runmake install DESTDIR=${D} | ||
21 | } | ||
22 | |||
23 | inherit update-alternatives | ||
24 | |||
25 | ALTERNATIVE_${PN} = "getty" | ||
26 | ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" | ||
27 | ALTERNATIVE_TARGET[getty] = "${base_sbindir}/mingetty" | ||
28 | ALTERNATIVE_PRIORITY = "10" | ||
diff --git a/meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch b/meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch new file mode 100644 index 0000000000..bd8261c979 --- /dev/null +++ b/meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | Subject: [PATCH] fix minicom -h/-v return value is not 0 | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Lu Chong <Chong.Lu@windriver.com> | ||
6 | |||
7 | --- | ||
8 | src/minicom.c | 6 ++---- | ||
9 | 1 file changed, 2 insertions(+), 4 deletions(-) | ||
10 | |||
11 | diff --git a/src/minicom.c b/src/minicom.c | ||
12 | index e1a557b..730da7c 100644 | ||
13 | --- a/src/minicom.c | ||
14 | +++ b/src/minicom.c | ||
15 | @@ -1166,15 +1166,13 @@ int main(int argc, char **argv) | ||
16 | "modify it under the terms of the GNU General Public License\n" | ||
17 | "as published by the Free Software Foundation; either version\n" | ||
18 | "2 of the License, or (at your option) any later version.\n\n"); | ||
19 | - exit(1); | ||
20 | - break; | ||
21 | + exit(0); | ||
22 | case 's': /* setup mode */ | ||
23 | dosetup = 1; | ||
24 | break; | ||
25 | case 'h': | ||
26 | helpthem(); | ||
27 | - exit(1); | ||
28 | - break; | ||
29 | + exit(0); | ||
30 | case 'p': /* Pseudo terminal to use. */ | ||
31 | if (strncmp(optarg, "/dev/", 5) == 0) | ||
32 | optarg += 5; | ||
33 | -- | ||
34 | 1.7.9.5 | ||
35 | |||
diff --git a/meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch b/meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch new file mode 100644 index 0000000000..f5c08896ff --- /dev/null +++ b/meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
4 | |||
5 | --- a/configure.in 2013-02-06 18:18:13.000000000 +0100 | ||
6 | +++ b/configure.in 2013-07-21 15:31:27.614828894 +0200 | ||
7 | @@ -40,7 +40,13 @@ | ||
8 | fi | ||
9 | |||
10 | PKG_PROG_PKG_CONFIG | ||
11 | -if test -n "$PKG_CONFIG"; then | ||
12 | + | ||
13 | +AC_ARG_ENABLE([lockdev], | ||
14 | + AS_HELP_STRING([--enable-lockdev], | ||
15 | + [Enable lockdev support (def: enabled)]), | ||
16 | + [], [enable_lockdev="yes"]) | ||
17 | + | ||
18 | +if test -n "$PKG_CONFIG" && test "x$enable_lockdev" = xyes; then | ||
19 | PKG_CHECK_MODULES([LOCKDEV], [lockdev], AC_DEFINE([HAVE_LOCKDEV],[1],[Define if you have lockdev]),[:]) | ||
20 | fi | ||
21 | |||
diff --git a/meta/recipes-extended/minicom/minicom_2.7.bb b/meta/recipes-extended/minicom/minicom_2.7.bb new file mode 100644 index 0000000000..c002bc82d9 --- /dev/null +++ b/meta/recipes-extended/minicom/minicom_2.7.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "Text-based modem control and terminal emulation program" | ||
2 | DESCRIPTION = "Minicom is a text-based modem control and terminal emulation program for Unix-like operating systems" | ||
3 | SECTION = "console/network" | ||
4 | DEPENDS = "ncurses virtual/libiconv" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=420477abc567404debca0a2a1cb6b645 \ | ||
7 | file://src/minicom.h;beginline=1;endline=12;md5=a58838cb709f0db517f4e42730c49e81" | ||
8 | |||
9 | SRC_URI = "https://alioth.debian.org/frs/download.php/latestfile/3/${BP}.tar.gz \ | ||
10 | file://allow.to.disable.lockdev.patch \ | ||
11 | file://0001-fix-minicom-h-v-return-value-is-not-0.patch \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[md5sum] = "7044ca3e291268c33294f171d426dc2d" | ||
15 | SRC_URI[sha256sum] = "9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4" | ||
16 | |||
17 | PACKAGECONFIG ??= "" | ||
18 | PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev" | ||
19 | |||
20 | inherit autotools gettext pkgconfig | ||
21 | |||
22 | do_install() { | ||
23 | for d in doc extras man lib src; do make -C $d DESTDIR=${D} install; done | ||
24 | } | ||
25 | |||
diff --git a/meta/recipes-extended/mktemp/files/disable-strip.patch b/meta/recipes-extended/mktemp/files/disable-strip.patch new file mode 100644 index 0000000000..e06869e3ad --- /dev/null +++ b/meta/recipes-extended/mktemp/files/disable-strip.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | diff --git a/Makefile.in b/Makefile.in | ||
4 | index 37b3cc9..f1026f3 100644 | ||
5 | --- a/Makefile.in | ||
6 | +++ b/Makefile.in | ||
7 | @@ -95,7 +95,7 @@ install-dirs: | ||
8 | $(DESTDIR)$(mandir)/man1 | ||
9 | |||
10 | install-binaries: $(PROG) | ||
11 | - $(INSTALL) -m 0555 -s $(PROG) $(DESTDIR)$(bindir)/$(PROG) | ||
12 | + $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG) | ||
13 | |||
14 | install-man: | ||
15 | $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \ | ||
diff --git a/meta/recipes-extended/mktemp/files/fix-parallel-make.patch b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch new file mode 100644 index 0000000000..f3b6dcc34a --- /dev/null +++ b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | This fixes the parallel make install failure | ||
2 | |||
3 | Upstream-Status: Accepted | ||
4 | http://www.gratisoft.us/bugzilla/show_bug.cgi?id=528 | ||
5 | |||
6 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
7 | |||
8 | Index: mktemp-1.7/Makefile.in | ||
9 | =================================================================== | ||
10 | --- mktemp-1.7.orig/Makefile.in | ||
11 | +++ mktemp-1.7/Makefile.in | ||
12 | @@ -94,10 +94,10 @@ install-dirs: | ||
13 | $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) \ | ||
14 | $(DESTDIR)$(mandir)/man1 | ||
15 | |||
16 | -install-binaries: $(PROG) | ||
17 | +install-binaries: install-dirs $(PROG) | ||
18 | $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG) | ||
19 | |||
20 | -install-man: | ||
21 | +install-man: install-dirs | ||
22 | $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \ | ||
23 | $(DESTDIR)$(mandir)/man1/mktemp.1 | ||
24 | |||
diff --git a/meta/recipes-extended/mktemp/mktemp_1.7.bb b/meta/recipes-extended/mktemp/mktemp_1.7.bb new file mode 100644 index 0000000000..b53fc11b1e --- /dev/null +++ b/meta/recipes-extended/mktemp/mktemp_1.7.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "Enables safe temporary file creation from shell scripts" | ||
2 | HOMEPAGE = "http://www.mktemp.org/" | ||
3 | BUGTRACKER = "http://www.mktemp.org/bugs" | ||
4 | SECTION = "console/utils" | ||
5 | LICENSE = "ISC" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=430680f6322a1eb87199b5e01a82c0d4" | ||
7 | |||
8 | PR = "r3" | ||
9 | |||
10 | SRC_URI = "ftp://ftp.mktemp.org/pub/mktemp/${BPN}-${PV}.tar.gz \ | ||
11 | file://disable-strip.patch \ | ||
12 | file://fix-parallel-make.patch \ | ||
13 | " | ||
14 | |||
15 | SRC_URI[md5sum] = "787bbed9fa2ee8e7645733c0e8e65172" | ||
16 | SRC_URI[sha256sum] = "8e94b9e1edf866b2609545da65b627996ac5d158fda071e492bddb2f4a482675" | ||
17 | |||
18 | inherit autotools update-alternatives | ||
19 | |||
20 | EXTRA_OECONF = "--with-libc" | ||
21 | |||
22 | do_install_append () { | ||
23 | install -d ${D}${base_bindir} | ||
24 | mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp | ||
25 | rmdir ${D}${bindir} | ||
26 | } | ||
27 | |||
28 | ALTERNATIVE_${PN} = "mktemp" | ||
29 | ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp" | ||
30 | ALTERNATIVE_PRIORITY = "100" | ||
diff --git a/meta/recipes-extended/msmtp/msmtp_1.4.32.bb b/meta/recipes-extended/msmtp/msmtp_1.4.32.bb new file mode 100644 index 0000000000..4b7024ba85 --- /dev/null +++ b/meta/recipes-extended/msmtp/msmtp_1.4.32.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "msmtp is an SMTP client" | ||
2 | DESCRIPTION = "A sendmail replacement for use in MTAs like mutt" | ||
3 | HOMEPAGE = "http://msmtp.sourceforge.net/" | ||
4 | SECTION = "console/network" | ||
5 | |||
6 | LICENSE = "GPLv3" | ||
7 | DEPENDS = "zlib gnutls" | ||
8 | |||
9 | #COPYING or Licence | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
11 | |||
12 | SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.bz2 \ | ||
13 | " | ||
14 | |||
15 | SRC_URI[md5sum] = "aa60e22211118f222470439cea60f795" | ||
16 | SRC_URI[sha256sum] = "2bf0c5c7e78f9905f48de235a75111a1a88238793043bbeae00360b22f1a5f88" | ||
17 | |||
18 | inherit gettext autotools update-alternatives pkgconfig | ||
19 | |||
20 | EXTRA_OECONF += "--without-gnome-keyring --without-libidn" | ||
21 | |||
22 | ALTERNATIVE_${PN} = "sendmail" | ||
23 | ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp" | ||
24 | ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail" | ||
25 | ALTERNATIVE_PRIORITY = "100" | ||
diff --git a/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch new file mode 100644 index 0000000000..06f81420e9 --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 81814dc2b14843009193efd307d814c26baa61f0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jiri Popelka <jpopelka@redhat.com> | ||
3 | Date: Wed, 7 Dec 2011 19:14:09 +0100 | ||
4 | Subject: [PATCH] ifconfig interface:0 del <IP> will remove the aliased IP on IA64 | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | commit 81814dc2b14843009193efd307d814c26baa61f0 from | ||
9 | git://git.code.sf.net/p/net-tools/code | ||
10 | |||
11 | --- | ||
12 | ifconfig.c | 4 +++- | ||
13 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/ifconfig.c b/ifconfig.c | ||
16 | index bc405c6..dae8922 100644 | ||
17 | --- a/ifconfig.c | ||
18 | +++ b/ifconfig.c | ||
19 | @@ -890,7 +890,9 @@ int main(int argc, char **argv) | ||
20 | continue; | ||
21 | } | ||
22 | |||
23 | - memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long)); | ||
24 | + /* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */ | ||
25 | + ip = 0; | ||
26 | + memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr)); | ||
27 | |||
28 | if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) { | ||
29 | fprintf(stderr, _("Interface %s not initialized\n"), | ||
30 | -- | ||
31 | 1.7.9.5 | ||
32 | |||
diff --git a/meta/recipes-extended/net-tools/net-tools/net-tools-config.h b/meta/recipes-extended/net-tools/net-tools/net-tools-config.h new file mode 100644 index 0000000000..6d39c2a8cb --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/net-tools-config.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * config.h Automatically generated configuration includefile | ||
3 | * | ||
4 | * NET-TOOLS A collection of programs that form the base set of the | ||
5 | * NET-3 Networking Distribution for the LINUX operating | ||
6 | * system. | ||
7 | * | ||
8 | * DO NOT EDIT DIRECTLY | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * | ||
14 | * Internationalization | ||
15 | * | ||
16 | * The net-tools package has currently been translated to French, | ||
17 | * German and Brazilian Portugese. Other translations are, of | ||
18 | * course, welcome. Answer `n' here if you have no support for | ||
19 | * internationalization on your system. | ||
20 | * | ||
21 | */ | ||
22 | #define I18N 1 | ||
23 | |||
24 | /* | ||
25 | * | ||
26 | * Protocol Families. | ||
27 | * | ||
28 | */ | ||
29 | #define HAVE_AFUNIX 1 | ||
30 | #define HAVE_AFINET 1 | ||
31 | #define HAVE_AFINET6 1 | ||
32 | #define HAVE_AFIPX 0 | ||
33 | #define HAVE_AFATALK 0 | ||
34 | #define HAVE_AFAX25 0 | ||
35 | #define HAVE_AFNETROM 1 | ||
36 | #define HAVE_AFROSE 0 | ||
37 | #define HAVE_AFX25 0 | ||
38 | #define HAVE_AFECONET 0 | ||
39 | #define HAVE_AFDECnet 0 | ||
40 | #define HAVE_AFASH 0 | ||
41 | |||
42 | /* | ||
43 | * | ||
44 | * Device Hardware types. | ||
45 | * | ||
46 | */ | ||
47 | #define HAVE_HWETHER 1 | ||
48 | #define HAVE_HWARC 1 | ||
49 | #define HAVE_HWSLIP 1 | ||
50 | #define HAVE_HWPPP 1 | ||
51 | #define HAVE_HWTUNNEL 1 | ||
52 | #define HAVE_HWSTRIP 0 | ||
53 | #define HAVE_HWTR 0 | ||
54 | #define HAVE_HWAX25 0 | ||
55 | #define HAVE_HWROSE 0 | ||
56 | #define HAVE_HWNETROM 1 | ||
57 | #define HAVE_HWX25 0 | ||
58 | #define HAVE_HWFR 1 | ||
59 | #define HAVE_HWSIT 0 | ||
60 | #define HAVE_HWFDDI 0 | ||
61 | #define HAVE_HWHIPPI 0 | ||
62 | #define HAVE_HWASH 0 | ||
63 | #define HAVE_HWHDLCLAPB 0 | ||
64 | #define HAVE_HWIRDA 1 | ||
65 | #define HAVE_HWEC 0 | ||
66 | #define HAVE_HWIB 0 | ||
67 | |||
68 | /* | ||
69 | * | ||
70 | * Other Features. | ||
71 | * | ||
72 | */ | ||
73 | #define HAVE_FW_MASQUERADE 1 | ||
74 | #define HAVE_IP_TOOLS 1 | ||
75 | #define HAVE_MII 1 | ||
diff --git a/meta/recipes-extended/net-tools/net-tools/net-tools-config.make b/meta/recipes-extended/net-tools/net-tools/net-tools-config.make new file mode 100644 index 0000000000..ec516f27ee --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/net-tools-config.make | |||
@@ -0,0 +1,36 @@ | |||
1 | I18N=1 | ||
2 | HAVE_AFUNIX=1 | ||
3 | HAVE_AFINET=1 | ||
4 | HAVE_AFINET6=1 | ||
5 | # HAVE_AFIPX=0 | ||
6 | # HAVE_AFATALK=0 | ||
7 | # HAVE_AFAX25=0 | ||
8 | HAVE_AFNETROM=1 | ||
9 | # HAVE_AFROSE=0 | ||
10 | # HAVE_AFX25=0 | ||
11 | # HAVE_AFECONET=0 | ||
12 | # HAVE_AFDECnet=0 | ||
13 | # HAVE_AFASH=0 | ||
14 | HAVE_HWETHER=1 | ||
15 | HAVE_HWARC=1 | ||
16 | HAVE_HWSLIP=1 | ||
17 | HAVE_HWPPP=1 | ||
18 | HAVE_HWTUNNEL=1 | ||
19 | HAVE_HWSTRIP=1 | ||
20 | HAVE_HWTR=1 | ||
21 | # HAVE_HWAX25=0 | ||
22 | # HAVE_HWROSE=0 | ||
23 | HAVE_HWNETROM=1 | ||
24 | # HAVE_HWX25=0 | ||
25 | HAVE_HWFR=1 | ||
26 | # HAVE_HWSIT=0 | ||
27 | # HAVE_HWFDDI=0 | ||
28 | # HAVE_HWHIPPI=0 | ||
29 | # HAVE_HWASH=0 | ||
30 | # HAVE_HWHDLCLAPB=0 | ||
31 | HAVE_HWIRDA=1 | ||
32 | # HAVE_HWEC=0 | ||
33 | # HAVE_HWIB=0 | ||
34 | HAVE_FW_MASQUERADE=1 | ||
35 | HAVE_IP_TOOLS=1 | ||
36 | HAVE_MII=1 | ||
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb new file mode 100644 index 0000000000..0e4ee754a4 --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb | |||
@@ -0,0 +1,89 @@ | |||
1 | SUMMARY = "Basic networking tools" | ||
2 | DESCRIPTION = "A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system" | ||
3 | HOMEPAGE = "http://net-tools.berlios.de/" | ||
4 | BUGTRACKER = "http://bugs.debian.org/net-tools" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ | ||
7 | file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba" | ||
8 | |||
9 | SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \ | ||
10 | ${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \ | ||
11 | file://net-tools-config.h \ | ||
12 | file://net-tools-config.make \ | ||
13 | file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \ | ||
14 | " | ||
15 | |||
16 | S = "${WORKDIR}/net-tools-1.60" | ||
17 | |||
18 | SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d" | ||
19 | SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5" | ||
20 | |||
21 | SRC_URI[patch.md5sum] = "5ab1e2184d0fa6518031291138f2fc51" | ||
22 | SRC_URI[patch.sha256sum] = "1bddcd96ac60e794978cb20fb7ea4c2e77258c56c042c9ac8b6ec2b2033bc56f" | ||
23 | |||
24 | inherit gettext | ||
25 | |||
26 | # The Makefile is lame, no parallel build | ||
27 | PARALLEL_MAKE = "" | ||
28 | |||
29 | # Unlike other Debian packages, net-tools *.diff.gz contains another series of | ||
30 | # patches maintained by quilt. So manually apply them before applying other local | ||
31 | # patches. Also remove all temp files before leaving, because do_patch() will pop | ||
32 | # up all previously applied patches in the start | ||
33 | nettools_do_patch() { | ||
34 | cd ${S} | ||
35 | quilt pop -a || true | ||
36 | if [ -d ${S}/.pc-nettools ]; then | ||
37 | rm -rf ${S}/.pc | ||
38 | mv ${S}/.pc-nettools ${S}/.pc | ||
39 | QUILT_PATCHES=${S}/debian/patches quilt pop -a | ||
40 | rm -rf ${S}/.pc ${S}/debian | ||
41 | fi | ||
42 | patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff | ||
43 | QUILT_PATCHES=${S}/debian/patches quilt push -a | ||
44 | mv ${S}/.pc ${S}/.pc-nettools | ||
45 | } | ||
46 | |||
47 | do_unpack[cleandirs] += "${S}" | ||
48 | |||
49 | # We invoke base do_patch at end, to incorporate any local patch | ||
50 | python do_patch() { | ||
51 | bb.build.exec_func('nettools_do_patch', d) | ||
52 | bb.build.exec_func('patch_do_patch', d) | ||
53 | } | ||
54 | |||
55 | do_configure() { | ||
56 | # net-tools has its own config mechanism requiring "make config" | ||
57 | # we pre-generate desired options and copy to source directory instead | ||
58 | cp ${WORKDIR}/net-tools-config.h ${S}/config.h | ||
59 | cp ${WORKDIR}/net-tools-config.make ${S}/config.make | ||
60 | } | ||
61 | |||
62 | do_compile() { | ||
63 | # net-tools use COPTS/LOPTS to allow adding custom options | ||
64 | export COPTS="$CFLAGS" | ||
65 | export LOPTS="$LDFLAGS" | ||
66 | unset CFLAGS | ||
67 | unset LDFLAGS | ||
68 | |||
69 | oe_runmake | ||
70 | } | ||
71 | |||
72 | do_install() { | ||
73 | oe_runmake 'BASEDIR=${D}' install | ||
74 | } | ||
75 | |||
76 | inherit update-alternatives | ||
77 | |||
78 | base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach" | ||
79 | base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname" | ||
80 | |||
81 | ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}" | ||
82 | python __anonymous() { | ||
83 | for prog in d.getVar('base_sbindir_progs', True).split(): | ||
84 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog)) | ||
85 | for prog in d.getVar('base_bindir_progs', True).split(): | ||
86 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog)) | ||
87 | } | ||
88 | ALTERNATIVE_PRIORITY = "100" | ||
89 | |||
diff --git a/meta/recipes-extended/newt/files/cross_ar.patch b/meta/recipes-extended/newt/files/cross_ar.patch new file mode 100644 index 0000000000..03007aa4f4 --- /dev/null +++ b/meta/recipes-extended/newt/files/cross_ar.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | Fix cross link using autoconf detected AR | ||
2 | |||
3 | If building on 32bit host and creating 64bit libraries, the target | ||
4 | package builds should not invoke the 32bit hosts's ar. Specifically | ||
5 | you will get an error message like: | ||
6 | |||
7 | x86_64-linux-gcc -m64 --sysroot=/opt/qemux86-64/tmp/sysroots/qemux86-64 -g -o test test.o libnewt.a -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lslang | ||
8 | libnewt.a: could not read symbols: Archive has no index; run ranlib to add one | ||
9 | collect2: error: ld returned 1 exit status | ||
10 | |||
11 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
16 | --- | ||
17 | Makefile.in | 3 ++- | ||
18 | configure.ac | 4 ++++ | ||
19 | 2 files changed, 6 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/Makefile.in b/Makefile.in | ||
22 | --- a/Makefile.in | ||
23 | +++ b/Makefile.in | ||
24 | @@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@ | ||
25 | LDFLAGS = @LDFLAGS@ | ||
26 | CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ | ||
27 | GNU_LD = @GNU_LD@ | ||
28 | +AR = @AR@ | ||
29 | |||
30 | VERSION = @VERSION@ | ||
31 | TAG = r$(subst .,-,$(VERSION)) | ||
32 | @@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH) | ||
33 | $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS) | ||
34 | |||
35 | $(LIBNEWT): $(LIBOBJS) | ||
36 | - ar rv $@ $^ | ||
37 | + $(AR) rv $@ $^ | ||
38 | |||
39 | newt.o $(SHAREDDIR)/newt.o: newt.c Makefile | ||
40 | |||
41 | diff --git a/configure.ac b/configure.ac | ||
42 | index 92e6da8..cd83d57 100644 | ||
43 | --- a/configure.ac | ||
44 | +++ b/configure.ac | ||
45 | @@ -15,6 +15,10 @@ AC_PROG_INSTALL | ||
46 | AC_PROG_LN_S | ||
47 | AC_PROG_GREP | ||
48 | AC_SYS_LARGEFILE | ||
49 | +AN_MAKEVAR([AR], [AC_PROG_AR]) | ||
50 | +AN_PROGRAM([ar], [AC_PROG_AR]) | ||
51 | +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) | ||
52 | +AC_PROG_AR | ||
53 | |||
54 | # Are we using GNU ld? | ||
55 | AC_MSG_CHECKING([for GNU ld]) | ||
56 | -- | ||
57 | 1.8.1.2 | ||
58 | |||
diff --git a/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch new file mode 100644 index 0000000000..b0a1e8c105 --- /dev/null +++ b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Author: dexuan.cui@intel.com | ||
4 | Date: Fri Apr 15 16:17:39 CST 2011 | ||
5 | |||
6 | The patch fixes a parallel-make issue: when generating $(SHAREDDIR)/%.o, we should | ||
7 | ensure the directory ${SHAREDDIR} exists. | ||
8 | |||
9 | We need to push the patch to upstream. | ||
10 | |||
11 | Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> | ||
12 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
13 | --- | ||
14 | Makefile.in | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/Makefile.in b/Makefile.in | ||
18 | --- a/Makefile.in | ||
19 | +++ b/Makefile.in | ||
20 | @@ -128,12 +128,12 @@ $(SHAREDDIR): | ||
21 | |||
22 | sharedlib: $(LIBNEWTSH) | ||
23 | |||
24 | -$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS) | ||
25 | +$(LIBNEWTSH): $(SHAREDOBJS) | ||
26 | $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS) | ||
27 | ln -fs $(LIBNEWTSONAME) libnewt.$(SOEXT) | ||
28 | ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME) | ||
29 | |||
30 | -$(SHAREDDIR)/%.o : %.c | ||
31 | +$(SHAREDDIR)/%.o : %.c $(SHAREDDIR) | ||
32 | $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< | ||
33 | |||
34 | install: $(LIBNEWT) install-sh whiptail | ||
35 | -- | ||
36 | 1.8.1.2 | ||
37 | |||
diff --git a/meta/recipes-extended/newt/files/remove_slang_include.patch b/meta/recipes-extended/newt/files/remove_slang_include.patch new file mode 100644 index 0000000000..a2634ec75b --- /dev/null +++ b/meta/recipes-extended/newt/files/remove_slang_include.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | |||
2 | Upstream-Status: Pending | ||
3 | |||
4 | Index: git/Makefile.in | ||
5 | =================================================================== | ||
6 | --- git.orig/Makefile.in | ||
7 | +++ git/Makefile.in | ||
8 | @@ -5,7 +5,7 @@ CC = @CC@ | ||
9 | CPP = @CPP@ | ||
10 | CFLAGS = @CFLAGS@ | ||
11 | LDFLAGS = @LDFLAGS@ | ||
12 | -CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@ | ||
13 | +CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ | ||
14 | GNU_LD = @GNU_LD@ | ||
15 | |||
16 | VERSION = @VERSION@ | ||
diff --git a/meta/recipes-extended/newt/libnewt-python_0.52.17.bb b/meta/recipes-extended/newt/libnewt-python_0.52.17.bb new file mode 100644 index 0000000000..d591fbd3d2 --- /dev/null +++ b/meta/recipes-extended/newt/libnewt-python_0.52.17.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | require recipes-extended/newt/libnewt_${PV}.bb | ||
2 | |||
3 | SUMMARY .= " - python" | ||
4 | DEPENDS = "libnewt python" | ||
5 | RDEPENDS_${PN} += "python-core" | ||
6 | |||
7 | inherit pythonnative python-dir | ||
8 | |||
9 | EXTRA_OECONF += "--with-python" | ||
10 | EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}" | ||
11 | |||
12 | |||
13 | do_compile () { | ||
14 | VERSION="$(sed -n 's/^VERSION = //p' Makefile)" | ||
15 | oe_runmake "LIBNEWTSH=${STAGING_LIBDIR}/libnewt.so.$VERSION" _snack.so | ||
16 | } | ||
17 | |||
18 | do_install () { | ||
19 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} | ||
20 | install -m 0755 ${PYTHON_DIR}/_snack.so ${D}${PYTHON_SITEPACKAGES_DIR}/ | ||
21 | install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/ | ||
22 | } | ||
23 | |||
24 | PACKAGES_remove = "whiptail" | ||
25 | |||
26 | FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*" | ||
27 | FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" | ||
diff --git a/meta/recipes-extended/newt/libnewt_0.52.17.bb b/meta/recipes-extended/newt/libnewt_0.52.17.bb new file mode 100644 index 0000000000..28d5cf1a34 --- /dev/null +++ b/meta/recipes-extended/newt/libnewt_0.52.17.bb | |||
@@ -0,0 +1,54 @@ | |||
1 | SUMMARY = "A library for text mode user interfaces" | ||
2 | |||
3 | DESCRIPTION = "Newt is a programming library for color text mode, widget based user \ | ||
4 | interfaces. Newt can be used to add stacked windows, entry widgets, \ | ||
5 | checkboxes, radio buttons, labels, plain text fields, scrollbars, \ | ||
6 | etc., to text mode user interfaces. This package also contains the \ | ||
7 | shared library needed by programs built with newt, as well as a \ | ||
8 | /usr/bin/dialog replacement called whiptail. Newt is based on the \ | ||
9 | slang library." | ||
10 | |||
11 | HOMEPAGE = "https://fedorahosted.org/newt/" | ||
12 | SECTION = "libs" | ||
13 | |||
14 | LICENSE = "LGPLv2" | ||
15 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" | ||
16 | |||
17 | # slang needs to be >= 2.2 | ||
18 | DEPENDS = "slang popt" | ||
19 | |||
20 | PR = "r2" | ||
21 | |||
22 | SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \ | ||
23 | file://remove_slang_include.patch \ | ||
24 | file://fix_SHAREDDIR.patch \ | ||
25 | file://cross_ar.patch \ | ||
26 | " | ||
27 | |||
28 | SRC_URI[md5sum] = "f36d4d908965a0c89fd6fd8b61a6118b" | ||
29 | SRC_URI[sha256sum] = "69837973ef2ee2fa644426f1c3e48d2b18785ebcd382ef7fd01eb2e67d2d632b" | ||
30 | |||
31 | S = "${WORKDIR}/newt-${PV}" | ||
32 | |||
33 | EXTRA_OECONF = "--without-tcl --without-python" | ||
34 | |||
35 | inherit autotools-brokensep | ||
36 | |||
37 | export STAGING_INCDIR | ||
38 | export STAGING_LIBDIR | ||
39 | |||
40 | export BUILD_SYS | ||
41 | export HOST_SYS | ||
42 | |||
43 | PACKAGES_prepend = "whiptail " | ||
44 | |||
45 | do_configure_prepend() { | ||
46 | sh autogen.sh | ||
47 | } | ||
48 | |||
49 | do_compile_prepend() { | ||
50 | # Make sure the recompile is OK | ||
51 | rm -f ${B}/.depend | ||
52 | } | ||
53 | |||
54 | FILES_whiptail = "${bindir}/whiptail" | ||
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb new file mode 100644 index 0000000000..ad3f240c04 --- /dev/null +++ b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb | |||
@@ -0,0 +1,163 @@ | |||
1 | # | ||
2 | # Copyright (C) 2010 Intel Corporation | ||
3 | # | ||
4 | |||
5 | SUMMARY = "Standard full-featured Linux system" | ||
6 | DESCRIPTION = "Package group bringing in packages needed for a more traditional full-featured Linux system" | ||
7 | PR = "r6" | ||
8 | LICENSE = "MIT" | ||
9 | |||
10 | inherit packagegroup | ||
11 | |||
12 | PACKAGES = "\ | ||
13 | packagegroup-core-full-cmdline \ | ||
14 | packagegroup-core-full-cmdline-libs \ | ||
15 | packagegroup-core-full-cmdline-utils \ | ||
16 | packagegroup-core-full-cmdline-extended \ | ||
17 | packagegroup-core-full-cmdline-dev-utils \ | ||
18 | packagegroup-core-full-cmdline-multiuser \ | ||
19 | packagegroup-core-full-cmdline-initscripts \ | ||
20 | packagegroup-core-full-cmdline-sys-services \ | ||
21 | " | ||
22 | |||
23 | python __anonymous () { | ||
24 | # For backwards compatibility after rename | ||
25 | namemap = {} | ||
26 | namemap["packagegroup-core-full-cmdline"] = "packagegroup-core-basic" | ||
27 | namemap["packagegroup-core-full-cmdline-libs"] = "packagegroup-core-basic-libs" | ||
28 | namemap["packagegroup-core-full-cmdline-utils"] = "packagegroup-core-basic-utils" | ||
29 | namemap["packagegroup-core-full-cmdline-extended"] = "packagegroup-core-basic-extended" | ||
30 | namemap["packagegroup-core-full-cmdline-dev-utils"] = "packagegroup-core-dev-utils" | ||
31 | namemap["packagegroup-core-full-cmdline-multiuser"] = "packagegroup-core-multiuser" | ||
32 | namemap["packagegroup-core-full-cmdline-initscripts"] = "packagegroup-core-initscripts" | ||
33 | namemap["packagegroup-core-full-cmdline-sys-services"] = "packagegroup-core-sys-services" | ||
34 | |||
35 | packages = d.getVar("PACKAGES", True).split() | ||
36 | for pkg in packages: | ||
37 | if pkg.endswith('-dev'): | ||
38 | mapped = namemap.get(pkg[:-4], None) | ||
39 | if mapped: | ||
40 | mapped += '-dev' | ||
41 | elif pkg.endswith('-dbg'): | ||
42 | mapped = namemap.get(pkg[:-4], None) | ||
43 | if mapped: | ||
44 | mapped += '-dbg' | ||
45 | else: | ||
46 | mapped = namemap.get(pkg, None) | ||
47 | |||
48 | if mapped: | ||
49 | oldtaskname = mapped.replace("packagegroup-core", "task-core") | ||
50 | mapstr = " %s %s" % (mapped, oldtaskname) | ||
51 | d.appendVar("RPROVIDES_%s" % pkg, mapstr) | ||
52 | d.appendVar("RREPLACES_%s" % pkg, mapstr) | ||
53 | d.appendVar("RCONFLICTS_%s" % pkg, mapstr) | ||
54 | } | ||
55 | |||
56 | |||
57 | RDEPENDS_packagegroup-core-full-cmdline = "\ | ||
58 | packagegroup-core-full-cmdline-libs \ | ||
59 | packagegroup-core-full-cmdline-utils \ | ||
60 | packagegroup-core-full-cmdline-extended \ | ||
61 | packagegroup-core-full-cmdline-dev-utils \ | ||
62 | packagegroup-core-full-cmdline-multiuser \ | ||
63 | packagegroup-core-full-cmdline-initscripts \ | ||
64 | packagegroup-core-full-cmdline-sys-services \ | ||
65 | " | ||
66 | |||
67 | RDEPENDS_packagegroup-core-full-cmdline-libs = "\ | ||
68 | glib-2.0 \ | ||
69 | " | ||
70 | |||
71 | RDEPENDS_packagegroup-core-full-cmdline-utils = "\ | ||
72 | bash \ | ||
73 | acl \ | ||
74 | attr \ | ||
75 | bc \ | ||
76 | coreutils \ | ||
77 | cpio \ | ||
78 | e2fsprogs \ | ||
79 | ed \ | ||
80 | file \ | ||
81 | findutils \ | ||
82 | gawk \ | ||
83 | gmp \ | ||
84 | grep \ | ||
85 | makedevs \ | ||
86 | mc \ | ||
87 | mc-fish \ | ||
88 | mc-helpers \ | ||
89 | mc-helpers-perl \ | ||
90 | mc-helpers-python \ | ||
91 | mktemp \ | ||
92 | ncurses \ | ||
93 | net-tools \ | ||
94 | pax \ | ||
95 | popt \ | ||
96 | procps \ | ||
97 | psmisc \ | ||
98 | sed \ | ||
99 | tar \ | ||
100 | time \ | ||
101 | util-linux \ | ||
102 | zlib \ | ||
103 | " | ||
104 | |||
105 | RDEPENDS_packagegroup-core-full-cmdline-extended = "\ | ||
106 | iproute2 \ | ||
107 | iputils \ | ||
108 | iptables \ | ||
109 | module-init-tools \ | ||
110 | openssl \ | ||
111 | " | ||
112 | |||
113 | RDEPENDS_packagegroup-core-full-cmdline-dev-utils = "\ | ||
114 | byacc \ | ||
115 | diffutils \ | ||
116 | m4 \ | ||
117 | make \ | ||
118 | patch \ | ||
119 | " | ||
120 | |||
121 | VIRTUAL-RUNTIME_initscripts ?= "initscripts" | ||
122 | VIRTUAL-RUNTIME_init_manager ?= "sysvinit" | ||
123 | VIRTUAL-RUNTIME_login_manager ?= "busybox" | ||
124 | VIRTUAL-RUNTIME_syslog ?= "sysklogd" | ||
125 | RDEPENDS_packagegroup-core-full-cmdline-initscripts = "\ | ||
126 | ${VIRTUAL-RUNTIME_initscripts} \ | ||
127 | ${VIRTUAL-RUNTIME_init_manager} \ | ||
128 | ethtool \ | ||
129 | ${VIRTUAL-RUNTIME_login_manager} \ | ||
130 | ${VIRTUAL-RUNTIME_syslog} \ | ||
131 | " | ||
132 | |||
133 | RDEPENDS_packagegroup-core-full-cmdline-multiuser = "\ | ||
134 | cracklib \ | ||
135 | gzip \ | ||
136 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libuser', '', d)} \ | ||
137 | shadow \ | ||
138 | sudo \ | ||
139 | " | ||
140 | |||
141 | RDEPENDS_packagegroup-core-full-cmdline-sys-services = "\ | ||
142 | at \ | ||
143 | bzip2 \ | ||
144 | cronie \ | ||
145 | dbus \ | ||
146 | dbus-glib \ | ||
147 | python-dbus \ | ||
148 | elfutils \ | ||
149 | gzip \ | ||
150 | less \ | ||
151 | libcap \ | ||
152 | libevent \ | ||
153 | lighttpd \ | ||
154 | logrotate \ | ||
155 | nfs-utils \ | ||
156 | pciutils \ | ||
157 | libpcre \ | ||
158 | rpcbind \ | ||
159 | sysfsutils \ | ||
160 | tcp-wrappers \ | ||
161 | tzdata \ | ||
162 | " | ||
163 | |||
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb new file mode 100644 index 0000000000..e0f32e0a1d --- /dev/null +++ b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb | |||
@@ -0,0 +1,266 @@ | |||
1 | # | ||
2 | # Copyright (C) 2010 Intel Corporation | ||
3 | # | ||
4 | |||
5 | SUMMARY = "Linux Standard Base (LSB)" | ||
6 | DESCRIPTION = "Packages required to satisfy the Linux Standard Base (LSB) specification" | ||
7 | PR = "r10" | ||
8 | LICENSE = "MIT" | ||
9 | |||
10 | inherit packagegroup | ||
11 | |||
12 | PACKAGES = "\ | ||
13 | packagegroup-core-lsb \ | ||
14 | packagegroup-core-sys-extended \ | ||
15 | packagegroup-core-db \ | ||
16 | packagegroup-core-perl \ | ||
17 | packagegroup-core-python \ | ||
18 | packagegroup-core-tcl \ | ||
19 | packagegroup-core-lsb-misc \ | ||
20 | packagegroup-core-lsb-core \ | ||
21 | packagegroup-core-lsb-perl \ | ||
22 | packagegroup-core-lsb-python \ | ||
23 | packagegroup-core-lsb-desktop \ | ||
24 | packagegroup-core-lsb-runtime-add \ | ||
25 | " | ||
26 | |||
27 | |||
28 | RDEPENDS_packagegroup-core-lsb = "\ | ||
29 | packagegroup-core-sys-extended \ | ||
30 | packagegroup-core-db \ | ||
31 | packagegroup-core-perl \ | ||
32 | packagegroup-core-python \ | ||
33 | packagegroup-core-tcl \ | ||
34 | packagegroup-core-lsb-misc \ | ||
35 | packagegroup-core-lsb-core \ | ||
36 | packagegroup-core-lsb-perl \ | ||
37 | packagegroup-core-lsb-python \ | ||
38 | packagegroup-core-lsb-desktop \ | ||
39 | packagegroup-core-lsb-runtime-add \ | ||
40 | " | ||
41 | |||
42 | |||
43 | RDEPENDS_packagegroup-core-sys-extended = "\ | ||
44 | curl \ | ||
45 | dhcp-client \ | ||
46 | gamin \ | ||
47 | hdparm \ | ||
48 | libaio \ | ||
49 | lrzsz \ | ||
50 | lzo \ | ||
51 | mc \ | ||
52 | mc-fish \ | ||
53 | mc-helpers \ | ||
54 | mc-helpers-perl \ | ||
55 | mc-helpers-python \ | ||
56 | mdadm \ | ||
57 | minicom \ | ||
58 | neon \ | ||
59 | parted \ | ||
60 | ${PTH} \ | ||
61 | quota \ | ||
62 | screen \ | ||
63 | setserial \ | ||
64 | sysstat \ | ||
65 | udev-extraconf \ | ||
66 | unzip \ | ||
67 | watchdog \ | ||
68 | wget \ | ||
69 | which \ | ||
70 | xinetd \ | ||
71 | zip \ | ||
72 | " | ||
73 | |||
74 | RDEPENDS_packagegroup-core-db = "\ | ||
75 | db \ | ||
76 | sqlite3 \ | ||
77 | " | ||
78 | |||
79 | RDEPENDS_packagegroup-core-perl = "\ | ||
80 | gdbm \ | ||
81 | perl \ | ||
82 | zlib \ | ||
83 | " | ||
84 | |||
85 | |||
86 | RDEPENDS_packagegroup-core-python = "\ | ||
87 | expat \ | ||
88 | gdbm \ | ||
89 | gmp \ | ||
90 | ncurses \ | ||
91 | openssl \ | ||
92 | python \ | ||
93 | readline \ | ||
94 | zip \ | ||
95 | " | ||
96 | |||
97 | RDEPENDS_packagegroup-core-tcl = "\ | ||
98 | tcl \ | ||
99 | " | ||
100 | |||
101 | # Miscellaneous packages required by LSB (or LSB tests) | ||
102 | RDEPENDS_packagegroup-core-lsb-misc = "\ | ||
103 | chkconfig \ | ||
104 | gettext \ | ||
105 | gettext-runtime \ | ||
106 | groff \ | ||
107 | lsbinitscripts \ | ||
108 | lsbtest \ | ||
109 | lsof \ | ||
110 | strace \ | ||
111 | libusb1 \ | ||
112 | usbutils \ | ||
113 | rpm \ | ||
114 | " | ||
115 | |||
116 | SUMMARY_packagegroup-core-lsb-core = "LSB Core" | ||
117 | DESCRIPTION_packagegroup-core-lsb-core = "Packages required to support commands/libraries \ | ||
118 | specified in the LSB Core specification" | ||
119 | RDEPENDS_packagegroup-core-lsb-core = "\ | ||
120 | at \ | ||
121 | bash \ | ||
122 | bc \ | ||
123 | binutils \ | ||
124 | binutils-symlinks \ | ||
125 | coreutils \ | ||
126 | cpio \ | ||
127 | cronie \ | ||
128 | cups \ | ||
129 | diffutils \ | ||
130 | ed \ | ||
131 | glibc-utils \ | ||
132 | elfutils \ | ||
133 | file \ | ||
134 | findutils \ | ||
135 | fontconfig-utils \ | ||
136 | foomatic-filters \ | ||
137 | gawk \ | ||
138 | ghostscript \ | ||
139 | grep \ | ||
140 | gzip \ | ||
141 | localedef \ | ||
142 | lsb \ | ||
143 | m4 \ | ||
144 | mailx \ | ||
145 | make \ | ||
146 | man \ | ||
147 | man-pages \ | ||
148 | mktemp \ | ||
149 | msmtp \ | ||
150 | patch \ | ||
151 | pax \ | ||
152 | procps \ | ||
153 | psmisc \ | ||
154 | sed \ | ||
155 | shadow \ | ||
156 | tar \ | ||
157 | time \ | ||
158 | util-linux \ | ||
159 | xdg-utils \ | ||
160 | \ | ||
161 | glibc \ | ||
162 | libgcc \ | ||
163 | libpam \ | ||
164 | libxml2 \ | ||
165 | ncurses \ | ||
166 | zlib \ | ||
167 | nspr \ | ||
168 | libpng12 \ | ||
169 | nss \ | ||
170 | " | ||
171 | |||
172 | SUMMARY_packagegroup-core-lsb-perl = "LSB Runtime Languages (Perl)" | ||
173 | DESCRIPTION_packagegroup-core-lsb-perl = "Packages required to support libraries \ | ||
174 | specified in the LSB Runtime languages specification (Perl parts)" | ||
175 | RDEPENDS_packagegroup-core-lsb-perl = "\ | ||
176 | perl \ | ||
177 | perl-modules \ | ||
178 | perl-misc \ | ||
179 | perl-pod \ | ||
180 | perl-dev \ | ||
181 | perl-doc \ | ||
182 | " | ||
183 | |||
184 | SUMMARY_packagegroup-core-lsb-python = "LSB Runtime Languages (Python)" | ||
185 | DESCRIPTION_packagegroup-core-lsb-python = "Packages required to support libraries \ | ||
186 | specified in the LSB Runtime languages specification (Python parts)" | ||
187 | RDEPENDS_packagegroup-core-lsb-python = "\ | ||
188 | python \ | ||
189 | python-modules \ | ||
190 | python-misc \ | ||
191 | " | ||
192 | |||
193 | def get_libqt3(d): | ||
194 | if 'linuxstdbase' in d.getVar('DISTROOVERRIDES') or "": | ||
195 | if 'qt3' in d.getVar('BBFILE_COLLECTIONS') or "": | ||
196 | return 'libqt-mt3' | ||
197 | |||
198 | bb.warn('The meta-qt3 layer should be added, this layer provides Qt 3.x' \ | ||
199 | 'libraries. Its intended use is for passing LSB tests as Qt3 is' \ | ||
200 | 'a requirement for LSB.') | ||
201 | return '' | ||
202 | |||
203 | QT4PKGS = " \ | ||
204 | libqtcore4 \ | ||
205 | libqtgui4 \ | ||
206 | libqtsql4 \ | ||
207 | libqtsvg4 \ | ||
208 | libqtxml4 \ | ||
209 | libqtnetwork4 \ | ||
210 | qt4-plugin-sqldriver-sqlite \ | ||
211 | ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "libqtopengl4", "", d)} \ | ||
212 | " | ||
213 | QT4PKGS_mips64 = "" | ||
214 | QT4PKGS_mips64n32 = "" | ||
215 | |||
216 | SUMMARY_packagegroup-core-lsb-desktop = "LSB Desktop" | ||
217 | DESCRIPTION_packagegroup-core-lsb-desktop = "Packages required to support libraries \ | ||
218 | specified in the LSB Desktop specification" | ||
219 | RDEPENDS_packagegroup-core-lsb-desktop = "\ | ||
220 | libxt \ | ||
221 | libxxf86vm \ | ||
222 | libdrm \ | ||
223 | libglu \ | ||
224 | libxi \ | ||
225 | libxtst \ | ||
226 | libx11-locale \ | ||
227 | xorg-minimal-fonts \ | ||
228 | gdk-pixbuf-loader-ico \ | ||
229 | gdk-pixbuf-loader-bmp \ | ||
230 | gdk-pixbuf-loader-ani \ | ||
231 | gdk-pixbuf-xlib \ | ||
232 | liberation-fonts \ | ||
233 | gtk+ \ | ||
234 | atk \ | ||
235 | libasound \ | ||
236 | ${QT4PKGS} \ | ||
237 | ${@get_libqt3(d)} \ | ||
238 | " | ||
239 | |||
240 | RDEPENDS_packagegroup-core-lsb-runtime-add = "\ | ||
241 | ldd \ | ||
242 | pam-plugin-wheel \ | ||
243 | e2fsprogs-mke2fs \ | ||
244 | mkfontdir \ | ||
245 | liburi-perl \ | ||
246 | libxml-parser-perl \ | ||
247 | libxml-perl \ | ||
248 | libxml-sax-perl \ | ||
249 | glibc-localedatas \ | ||
250 | glibc-gconvs \ | ||
251 | glibc-charmaps \ | ||
252 | glibc-binaries \ | ||
253 | glibc-localedata-posix \ | ||
254 | glibc-extra-nss \ | ||
255 | glibc-pcprofile \ | ||
256 | libclass-isa-perl \ | ||
257 | libenv-perl \ | ||
258 | libdumpvalue-perl \ | ||
259 | libfile-checktree-perl \ | ||
260 | libi18n-collate-perl \ | ||
261 | libpod-plainer-perl \ | ||
262 | " | ||
263 | |||
264 | PTH = "pth" | ||
265 | PTH_libc-uclibc = "" | ||
266 | |||
diff --git a/meta/recipes-extended/pam/libpam/99_pam b/meta/recipes-extended/pam/libpam/99_pam new file mode 100644 index 0000000000..97e990d10b --- /dev/null +++ b/meta/recipes-extended/pam/libpam/99_pam | |||
@@ -0,0 +1 @@ | |||
d root root 0755 /var/run/sepermit none | |||
diff --git a/meta/recipes-extended/pam/libpam/add-checks-for-crypt-returning-NULL.patch b/meta/recipes-extended/pam/libpam/add-checks-for-crypt-returning-NULL.patch new file mode 100644 index 0000000000..d364cea97e --- /dev/null +++ b/meta/recipes-extended/pam/libpam/add-checks-for-crypt-returning-NULL.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | Backport from linux-pam git repo. | ||
2 | |||
3 | [YOCTO #4107] | ||
4 | |||
5 | Upstream-Status: Backport | ||
6 | |||
7 | Signed-off-by: Kang Kai <kai.kang@windriver.com> | ||
8 | |||
9 | From 8dc056c1c8bc7acb66c4decc49add2c3a24e6310 Mon Sep 17 00:00:00 2001 | ||
10 | From: Tomas Mraz <tmraz@fedoraproject.org> | ||
11 | Date: Fri, 8 Feb 2013 15:04:26 +0100 | ||
12 | Subject: [PATCH] Add checks for crypt() returning NULL. | ||
13 | |||
14 | modules/pam_pwhistory/opasswd.c (compare_password): Add check for crypt() NULL return. | ||
15 | modules/pam_unix/bigcrypt.c (bigcrypt): Likewise. | ||
16 | --- | ||
17 | modules/pam_pwhistory/opasswd.c | 2 +- | ||
18 | modules/pam_unix/bigcrypt.c | 9 +++++++++ | ||
19 | 2 files changed, 10 insertions(+), 1 deletions(-) | ||
20 | |||
21 | diff --git a/modules/pam_pwhistory/opasswd.c b/modules/pam_pwhistory/opasswd.c | ||
22 | index 274fdb9..836d713 100644 | ||
23 | --- a/modules/pam_pwhistory/opasswd.c | ||
24 | +++ b/modules/pam_pwhistory/opasswd.c | ||
25 | @@ -108,7 +108,7 @@ compare_password(const char *newpass, const char *oldpass) | ||
26 | outval = crypt (newpass, oldpass); | ||
27 | #endif | ||
28 | |||
29 | - return strcmp(outval, oldpass) == 0; | ||
30 | + return outval != NULL && strcmp(outval, oldpass) == 0; | ||
31 | } | ||
32 | |||
33 | /* Check, if the new password is already in the opasswd file. */ | ||
34 | diff --git a/modules/pam_unix/bigcrypt.c b/modules/pam_unix/bigcrypt.c | ||
35 | index e10d1c5..e1d57a0 100644 | ||
36 | --- a/modules/pam_unix/bigcrypt.c | ||
37 | +++ b/modules/pam_unix/bigcrypt.c | ||
38 | @@ -109,6 +109,10 @@ char *bigcrypt(const char *key, const char *salt) | ||
39 | #else | ||
40 | tmp_ptr = crypt(plaintext_ptr, salt); /* libc crypt() */ | ||
41 | #endif | ||
42 | + if (tmp_ptr == NULL) { | ||
43 | + free(dec_c2_cryptbuf); | ||
44 | + return NULL; | ||
45 | + } | ||
46 | /* and place in the static area */ | ||
47 | strncpy(cipher_ptr, tmp_ptr, 13); | ||
48 | cipher_ptr += ESEGMENT_SIZE + SALT_SIZE; | ||
49 | @@ -130,6 +134,11 @@ char *bigcrypt(const char *key, const char *salt) | ||
50 | #else | ||
51 | tmp_ptr = crypt(plaintext_ptr, salt_ptr); | ||
52 | #endif | ||
53 | + if (tmp_ptr == NULL) { | ||
54 | + _pam_overwrite(dec_c2_cryptbuf); | ||
55 | + free(dec_c2_cryptbuf); | ||
56 | + return NULL; | ||
57 | + } | ||
58 | |||
59 | /* skip the salt for seg!=0 */ | ||
60 | strncpy(cipher_ptr, (tmp_ptr + SALT_SIZE), ESEGMENT_SIZE); | ||
61 | -- | ||
62 | 1.7.5.4 | ||
63 | |||
diff --git a/meta/recipes-extended/pam/libpam/destdirfix.patch b/meta/recipes-extended/pam/libpam/destdirfix.patch new file mode 100644 index 0000000000..52145ecb34 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/destdirfix.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Avoid the failure: | ||
2 | |||
3 | | mkdir -p /etc/security/namespace.d | ||
4 | | mkdir: cannot create directory `/etc/security/namespace.d': Permission denied | ||
5 | |||
6 | if /etc/security/namespace.d doesn't exist. The DESTDIR prefix is missing. | ||
7 | |||
8 | RP 2012/8/19 | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Index: Linux-PAM-1.1.6/modules/pam_namespace/Makefile.am | ||
13 | =================================================================== | ||
14 | --- Linux-PAM-1.1.6.orig/modules/pam_namespace/Makefile.am 2012-08-15 11:08:43.000000000 +0000 | ||
15 | +++ Linux-PAM-1.1.6/modules/pam_namespace/Makefile.am 2012-08-19 12:25:32.311038943 +0000 | ||
16 | @@ -40,7 +40,7 @@ | ||
17 | secureconf_SCRIPTS = namespace.init | ||
18 | |||
19 | install-data-local: | ||
20 | - mkdir -p $(namespaceddir) | ||
21 | + mkdir -p $(DESTDIR)$(namespaceddir) | ||
22 | endif | ||
23 | |||
24 | |||
diff --git a/meta/recipes-extended/pam/libpam/fixsepbuild.patch b/meta/recipes-extended/pam/libpam/fixsepbuild.patch new file mode 100644 index 0000000000..8a9c3b2fa1 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/fixsepbuild.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Fix the build error when a separate build directory is used: | ||
2 | |||
3 | Making install in xtestsmake[1]: Entering directory `/media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/build/xtests'/usr/bin/install -c -d /media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/image/usr/share/Linux-PAM/xtestsfor file in run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd tst-pam_dispatch5.pamd tst-pam_cracklib1.pamd tst-pam_cracklib2.pamd tst-pam_unix1.pamd tst-pam_unix2.pamd tst-pam_unix3.pamd tst-pam_unix4.pamd tst-pam_unix1.sh tst-pam_unix2.sh tst-pam_unix3.sh tst-pam_unix4.sh access.conf tst-pam_access1.pamd tst-pam_access1.sh tst-pam_access2.pamd tst-pam_access2.sh tst-pam_access3.pamd tst-pam_access3.sh tst-pam_access4.pamd tst-pam_access4.sh limits.conf tst-pam_limits1.pamd tst-pam_limits1.sh tst-pam_succeed_if1.pamd tst-pam_succeed_if1.sh group.conf tst-pam_group1.pamd tst-pam_group1.sh tst-pam_authfail.pamd tst-pam_authsucceed.pamd tst-pam_substack1.pamd tst-pam_substack1a.pamd tst-pam_substack1.sh tst-pam_substack2.pamd tst-pam_substack2a.pamd tst-pam_substack2.sh tst-pam_substack3.pamd tst-pam_substack3a.pamd tst-pam_substack3.sh tst-pam_substack4.pamd tst-pam_substack4a.pamd tst-pam_substack4.sh tst-pam_substack5.pamd tst-pam_substack5a.pamd tst-pam_substack5.sh tst-pam_assemble_line1.pamd tst-pam_assemble_line1.sh tst-pam_pwhistory1.pamd tst-pam_pwhistory1.sh tst-pam_time1.pamd time.conf ; do \/usr/bin/install -c $file /media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/image/usr/share/Linux-PAM/xtests ; \ done | ||
4 | /usr/bin/install: cannot stat `run-xtests.sh': No such file or directory | ||
5 | /usr/bin/install: cannot stat `tst-pam_dispatch1.pamd': No such file or directory | ||
6 | /usr/bin/install: cannot stat `tst-pam_dispatch2.pamd': No such file or directory | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | RP 2013/03/21 | ||
11 | |||
12 | Index: Linux-PAM-1.1.6/xtests/Makefile.am | ||
13 | =================================================================== | ||
14 | --- Linux-PAM-1.1.6.orig/xtests/Makefile.am 2013-03-08 12:26:30.360266000 +0000 | ||
15 | +++ Linux-PAM-1.1.6/xtests/Makefile.am 2013-03-21 11:39:58.557166650 +0000 | ||
16 | @@ -59,7 +59,7 @@ | ||
17 | install_xtests: | ||
18 | $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests | ||
19 | for file in $(EXTRA_DIST) ; do \ | ||
20 | - $(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \ | ||
21 | + $(INSTALL) $(srcdir)/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ | ||
22 | done | ||
23 | for file in $(XTESTS); do \ | ||
24 | $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ | ||
diff --git a/meta/recipes-extended/pam/libpam/libpam-fix-for-CVE-2010-4708.patch b/meta/recipes-extended/pam/libpam/libpam-fix-for-CVE-2010-4708.patch new file mode 100644 index 0000000000..5d2b69aae0 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/libpam-fix-for-CVE-2010-4708.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Fix for CVE-2010-4708 | ||
4 | |||
5 | Change default for user_readenv to 0 and document the | ||
6 | new default for user_readenv. | ||
7 | |||
8 | This fix is got from: | ||
9 | http://pam.cvs.sourceforge.net/viewvc/pam/Linux-PAM/modules/pam_env | ||
10 | /pam_env.c?r1=1.22&r2=1.23&view=patch | ||
11 | http://pam.cvs.sourceforge.net/viewvc/pam/Linux-PAM/modules/pam_env | ||
12 | /pam_env.8.xml?r1=1.7&r2=1.8&view=patch | ||
13 | |||
14 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
15 | |||
16 | --- | ||
17 | --- a/modules/pam_env/pam_env.c 2012-09-05 13:57:47.000000000 +0800 | ||
18 | +++ b/modules/pam_env/pam_env.c 2012-09-05 13:58:05.000000000 +0800 | ||
19 | @@ -10,7 +10,7 @@ | ||
20 | #define DEFAULT_READ_ENVFILE 1 | ||
21 | |||
22 | #define DEFAULT_USER_ENVFILE ".pam_environment" | ||
23 | -#define DEFAULT_USER_READ_ENVFILE 1 | ||
24 | +#define DEFAULT_USER_READ_ENVFILE 0 | ||
25 | |||
26 | #include "config.h" | ||
27 | |||
28 | --- a/modules/pam_env/pam_env.8.xml 2012-09-05 13:58:24.000000000 +0800 | ||
29 | +++ b/modules/pam_env/pam_env.8.xml 2012-09-05 13:59:36.000000000 +0800 | ||
30 | @@ -147,7 +147,10 @@ | ||
31 | <listitem> | ||
32 | <para> | ||
33 | Turns on or off the reading of the user specific environment | ||
34 | - file. 0 is off, 1 is on. By default this option is on. | ||
35 | + file. 0 is off, 1 is on. By default this option is off as user | ||
36 | + supplied environment variables in the PAM environment could affect | ||
37 | + behavior of subsequent modules in the stack without the consent | ||
38 | + of the system administrator. | ||
39 | </para> | ||
40 | </listitem> | ||
41 | </varlistentry> | ||
diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch new file mode 100644 index 0000000000..680029ae0d --- /dev/null +++ b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch | |||
@@ -0,0 +1,226 @@ | |||
1 | From 555407ff6e2f742df64ae93859f14a0fc1397829 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Fri, 12 Sep 2014 05:35:05 -0400 | ||
4 | Subject: [PATCH] libpam/xtests: remove bash dependency | ||
5 | |||
6 | There's not bash specific syntax in the xtest scripts: | ||
7 | |||
8 | # after below patches applied: | ||
9 | $ cd Linux-PAM-1.1.6/xtests | ||
10 | $ checkbashisms *.sh | ||
11 | No output | ||
12 | |||
13 | Just remove the runtime dependency to bash. | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | |||
17 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
18 | --- | ||
19 | xtests/run-xtests.sh | 2 +- | ||
20 | xtests/tst-pam_access1.sh | 2 +- | ||
21 | xtests/tst-pam_access2.sh | 2 +- | ||
22 | xtests/tst-pam_access3.sh | 2 +- | ||
23 | xtests/tst-pam_access4.sh | 2 +- | ||
24 | xtests/tst-pam_assemble_line1.sh | 2 +- | ||
25 | xtests/tst-pam_group1.sh | 2 +- | ||
26 | xtests/tst-pam_limits1.sh | 2 +- | ||
27 | xtests/tst-pam_pwhistory1.sh | 2 +- | ||
28 | xtests/tst-pam_substack1.sh | 2 +- | ||
29 | xtests/tst-pam_substack2.sh | 2 +- | ||
30 | xtests/tst-pam_substack3.sh | 2 +- | ||
31 | xtests/tst-pam_substack4.sh | 2 +- | ||
32 | xtests/tst-pam_substack5.sh | 2 +- | ||
33 | xtests/tst-pam_succeed_if1.sh | 2 +- | ||
34 | xtests/tst-pam_unix1.sh | 2 +- | ||
35 | xtests/tst-pam_unix2.sh | 2 +- | ||
36 | xtests/tst-pam_unix3.sh | 2 +- | ||
37 | xtests/tst-pam_unix4.sh | 2 +- | ||
38 | 19 files changed, 19 insertions(+), 19 deletions(-) | ||
39 | |||
40 | diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh | ||
41 | index 3a89057..1cf8684 100755 | ||
42 | --- a/xtests/run-xtests.sh | ||
43 | +++ b/xtests/run-xtests.sh | ||
44 | @@ -1,4 +1,4 @@ | ||
45 | -#!/bin/bash | ||
46 | +#!/bin/sh | ||
47 | |||
48 | SRCDIR=$1 | ||
49 | shift 1 | ||
50 | diff --git a/xtests/tst-pam_access1.sh b/xtests/tst-pam_access1.sh | ||
51 | index 180d256..70521d2 100755 | ||
52 | --- a/xtests/tst-pam_access1.sh | ||
53 | +++ b/xtests/tst-pam_access1.sh | ||
54 | @@ -1,4 +1,4 @@ | ||
55 | -#!/bin/bash | ||
56 | +#!/bin/sh | ||
57 | |||
58 | /usr/sbin/groupadd tstpamaccess | ||
59 | /usr/sbin/useradd -G tstpamaccess -p '!!' tstpamaccess1 | ||
60 | diff --git a/xtests/tst-pam_access2.sh b/xtests/tst-pam_access2.sh | ||
61 | index 0a30275..7e3e60f 100755 | ||
62 | --- a/xtests/tst-pam_access2.sh | ||
63 | +++ b/xtests/tst-pam_access2.sh | ||
64 | @@ -1,4 +1,4 @@ | ||
65 | -#!/bin/bash | ||
66 | +#!/bin/sh | ||
67 | |||
68 | /usr/sbin/groupadd tstpamaccess | ||
69 | /usr/sbin/useradd -p '!!' tstpamaccess2 | ||
70 | diff --git a/xtests/tst-pam_access3.sh b/xtests/tst-pam_access3.sh | ||
71 | index 348e0c3..3630e2e 100755 | ||
72 | --- a/xtests/tst-pam_access3.sh | ||
73 | +++ b/xtests/tst-pam_access3.sh | ||
74 | @@ -1,4 +1,4 @@ | ||
75 | -#!/bin/bash | ||
76 | +#!/bin/sh | ||
77 | |||
78 | /usr/sbin/useradd -p '!!' tstpamaccess3 | ||
79 | ./tst-pam_access3 | ||
80 | diff --git a/xtests/tst-pam_access4.sh b/xtests/tst-pam_access4.sh | ||
81 | index 61e7b44..4538df4 100755 | ||
82 | --- a/xtests/tst-pam_access4.sh | ||
83 | +++ b/xtests/tst-pam_access4.sh | ||
84 | @@ -1,4 +1,4 @@ | ||
85 | -#!/bin/bash | ||
86 | +#!/bin/sh | ||
87 | |||
88 | /usr/sbin/useradd -p '!!' tstpamaccess4 | ||
89 | ./tst-pam_access4 | ||
90 | diff --git a/xtests/tst-pam_assemble_line1.sh b/xtests/tst-pam_assemble_line1.sh | ||
91 | index 248d47e..dc2a675 100755 | ||
92 | --- a/xtests/tst-pam_assemble_line1.sh | ||
93 | +++ b/xtests/tst-pam_assemble_line1.sh | ||
94 | @@ -1,3 +1,3 @@ | ||
95 | -#!/bin/bash | ||
96 | +#!/bin/sh | ||
97 | |||
98 | exec ./tst-pam_authfail tst-pam_assemble_line1 | ||
99 | diff --git a/xtests/tst-pam_group1.sh b/xtests/tst-pam_group1.sh | ||
100 | index b76377f..44faca9 100755 | ||
101 | --- a/xtests/tst-pam_group1.sh | ||
102 | +++ b/xtests/tst-pam_group1.sh | ||
103 | @@ -1,4 +1,4 @@ | ||
104 | -#!/bin/bash | ||
105 | +#!/bin/sh | ||
106 | |||
107 | /usr/sbin/groupadd tstpamgrpg | ||
108 | /usr/sbin/useradd -p '!!' tstpamgrp | ||
109 | diff --git a/xtests/tst-pam_limits1.sh b/xtests/tst-pam_limits1.sh | ||
110 | index 4faa822..32c021d 100755 | ||
111 | --- a/xtests/tst-pam_limits1.sh | ||
112 | +++ b/xtests/tst-pam_limits1.sh | ||
113 | @@ -1,4 +1,4 @@ | ||
114 | -#!/bin/bash | ||
115 | +#!/bin/sh | ||
116 | |||
117 | /usr/sbin/useradd -p '!!' tstpamlimits | ||
118 | ./tst-pam_limits1 | ||
119 | diff --git a/xtests/tst-pam_pwhistory1.sh b/xtests/tst-pam_pwhistory1.sh | ||
120 | index ddb3b8b..0f212e2 100644 | ||
121 | --- a/xtests/tst-pam_pwhistory1.sh | ||
122 | +++ b/xtests/tst-pam_pwhistory1.sh | ||
123 | @@ -1,4 +1,4 @@ | ||
124 | -#!/bin/bash | ||
125 | +#!/bin/sh | ||
126 | |||
127 | /usr/sbin/useradd tstpampwhistory | ||
128 | ./tst-pam_pwhistory1 | ||
129 | diff --git a/xtests/tst-pam_substack1.sh b/xtests/tst-pam_substack1.sh | ||
130 | index 5260175..f1b72a7 100755 | ||
131 | --- a/xtests/tst-pam_substack1.sh | ||
132 | +++ b/xtests/tst-pam_substack1.sh | ||
133 | @@ -1,3 +1,3 @@ | ||
134 | -#!/bin/bash | ||
135 | +#!/bin/sh | ||
136 | |||
137 | exec ./tst-pam_authfail tst-pam_substack1 | ||
138 | diff --git a/xtests/tst-pam_substack2.sh b/xtests/tst-pam_substack2.sh | ||
139 | index c02f597..3804fa7 100755 | ||
140 | --- a/xtests/tst-pam_substack2.sh | ||
141 | +++ b/xtests/tst-pam_substack2.sh | ||
142 | @@ -1,3 +1,3 @@ | ||
143 | -#!/bin/bash | ||
144 | +#!/bin/sh | ||
145 | |||
146 | exec ./tst-pam_authsucceed tst-pam_substack2 | ||
147 | diff --git a/xtests/tst-pam_substack3.sh b/xtests/tst-pam_substack3.sh | ||
148 | index 0e572aa..aa48e8e 100755 | ||
149 | --- a/xtests/tst-pam_substack3.sh | ||
150 | +++ b/xtests/tst-pam_substack3.sh | ||
151 | @@ -1,3 +1,3 @@ | ||
152 | -#!/bin/bash | ||
153 | +#!/bin/sh | ||
154 | |||
155 | exec ./tst-pam_authsucceed tst-pam_substack3 | ||
156 | diff --git a/xtests/tst-pam_substack4.sh b/xtests/tst-pam_substack4.sh | ||
157 | index a3ef08a..958a07a 100755 | ||
158 | --- a/xtests/tst-pam_substack4.sh | ||
159 | +++ b/xtests/tst-pam_substack4.sh | ||
160 | @@ -1,3 +1,3 @@ | ||
161 | -#!/bin/bash | ||
162 | +#!/bin/sh | ||
163 | |||
164 | exec ./tst-pam_authsucceed tst-pam_substack4 | ||
165 | diff --git a/xtests/tst-pam_substack5.sh b/xtests/tst-pam_substack5.sh | ||
166 | index e2714fd..7e0da74 100755 | ||
167 | --- a/xtests/tst-pam_substack5.sh | ||
168 | +++ b/xtests/tst-pam_substack5.sh | ||
169 | @@ -1,3 +1,3 @@ | ||
170 | -#!/bin/bash | ||
171 | +#!/bin/sh | ||
172 | |||
173 | exec ./tst-pam_authfail tst-pam_substack5 | ||
174 | diff --git a/xtests/tst-pam_succeed_if1.sh b/xtests/tst-pam_succeed_if1.sh | ||
175 | index a643b2e..58e57b4 100755 | ||
176 | --- a/xtests/tst-pam_succeed_if1.sh | ||
177 | +++ b/xtests/tst-pam_succeed_if1.sh | ||
178 | @@ -1,4 +1,4 @@ | ||
179 | -#!/bin/bash | ||
180 | +#!/bin/sh | ||
181 | |||
182 | /usr/sbin/useradd -p '!!' tstpamtest | ||
183 | /usr/sbin/useradd -p '!!' pamtest | ||
184 | diff --git a/xtests/tst-pam_unix1.sh b/xtests/tst-pam_unix1.sh | ||
185 | index f75bd84..72deac0 100755 | ||
186 | --- a/xtests/tst-pam_unix1.sh | ||
187 | +++ b/xtests/tst-pam_unix1.sh | ||
188 | @@ -1,4 +1,4 @@ | ||
189 | -#!/bin/bash | ||
190 | +#!/bin/sh | ||
191 | |||
192 | /usr/sbin/useradd -p '!!' tstpamunix | ||
193 | ./tst-pam_unix1 | ||
194 | diff --git a/xtests/tst-pam_unix2.sh b/xtests/tst-pam_unix2.sh | ||
195 | index 7093155..c04d6e6 100755 | ||
196 | --- a/xtests/tst-pam_unix2.sh | ||
197 | +++ b/xtests/tst-pam_unix2.sh | ||
198 | @@ -1,4 +1,4 @@ | ||
199 | -#!/bin/bash | ||
200 | +#!/bin/sh | ||
201 | |||
202 | # pamunix0 = 0aXKZztA.d1KY | ||
203 | /usr/sbin/useradd -p 0aXKZztA.d1KY tstpamunix | ||
204 | diff --git a/xtests/tst-pam_unix3.sh b/xtests/tst-pam_unix3.sh | ||
205 | index ef4a07c..b52db2b 100755 | ||
206 | --- a/xtests/tst-pam_unix3.sh | ||
207 | +++ b/xtests/tst-pam_unix3.sh | ||
208 | @@ -1,4 +1,4 @@ | ||
209 | -#!/bin/bash | ||
210 | +#!/bin/sh | ||
211 | |||
212 | # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU | ||
213 | /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix | ||
214 | diff --git a/xtests/tst-pam_unix4.sh b/xtests/tst-pam_unix4.sh | ||
215 | index 787c2f9..e7976fd 100755 | ||
216 | --- a/xtests/tst-pam_unix4.sh | ||
217 | +++ b/xtests/tst-pam_unix4.sh | ||
218 | @@ -1,4 +1,4 @@ | ||
219 | -#!/bin/bash | ||
220 | +#!/bin/sh | ||
221 | |||
222 | # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU | ||
223 | /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix | ||
224 | -- | ||
225 | 1.7.9.5 | ||
226 | |||
diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests.patch b/meta/recipes-extended/pam/libpam/libpam-xtests.patch new file mode 100644 index 0000000000..be687457f8 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/libpam-xtests.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | This patch is used to create a new sub package libpam-xtests to do more checks. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Kang Kai <kai.kang@windriver.com> | ||
6 | --- Linux-PAM-1.1.4/xtests/Makefile.am.orig 2011-07-19 17:00:09.619980001 +0800 | ||
7 | +++ Linux-PAM-1.1.4/xtests/Makefile.am 2011-07-19 16:54:00.229979998 +0800 | ||
8 | @@ -7,7 +7,7 @@ | ||
9 | AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \ | ||
10 | -L$(top_builddir)/libpam_misc -lpam_misc | ||
11 | |||
12 | -CLEANFILES = *~ $(XTESTS) | ||
13 | +CLEANFILES = *~ | ||
14 | |||
15 | EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \ | ||
16 | tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \ | ||
17 | @@ -51,3 +51,18 @@ | ||
18 | |||
19 | xtests: $(XTESTS) run-xtests.sh | ||
20 | "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS} | ||
21 | + | ||
22 | +all: $(XTESTS) | ||
23 | + | ||
24 | +install: install_xtests | ||
25 | + | ||
26 | +install_xtests: | ||
27 | + $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests | ||
28 | + for file in $(EXTRA_DIST) ; do \ | ||
29 | + $(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \ | ||
30 | + done | ||
31 | + for file in $(XTESTS); do \ | ||
32 | + $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ | ||
33 | + done | ||
34 | + | ||
35 | +.PHONY: all install_xtests | ||
diff --git a/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch b/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch new file mode 100644 index 0000000000..5e551ac48f --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch | |||
@@ -0,0 +1,97 @@ | |||
1 | innetgr may not be there so make sure that when innetgr is not present | ||
2 | then we inform about it and not use it. | ||
3 | |||
4 | -Khem | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
9 | |||
10 | Index: Linux-PAM-1.1.3/modules/pam_group/pam_group.c | ||
11 | =================================================================== | ||
12 | --- Linux-PAM-1.1.3.orig/modules/pam_group/pam_group.c | ||
13 | +++ Linux-PAM-1.1.3/modules/pam_group/pam_group.c | ||
14 | @@ -659,7 +659,11 @@ static int check_account(pam_handle_t *p | ||
15 | } | ||
16 | /* If buffer starts with @, we are using netgroups */ | ||
17 | if (buffer[0] == '@') | ||
18 | - good &= innetgr (&buffer[1], NULL, user, NULL); | ||
19 | +#ifdef HAVE_INNETGR | ||
20 | + good &= innetgr (&buffer[1], NULL, user, NULL); | ||
21 | +#else | ||
22 | + pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support"); | ||
23 | +#endif | ||
24 | /* otherwise, if the buffer starts with %, it's a UNIX group */ | ||
25 | else if (buffer[0] == '%') | ||
26 | good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]); | ||
27 | Index: Linux-PAM-1.1.3/modules/pam_time/pam_time.c | ||
28 | =================================================================== | ||
29 | --- Linux-PAM-1.1.3.orig/modules/pam_time/pam_time.c | ||
30 | +++ Linux-PAM-1.1.3/modules/pam_time/pam_time.c | ||
31 | @@ -555,9 +555,13 @@ check_account(pam_handle_t *pamh, const | ||
32 | } | ||
33 | /* If buffer starts with @, we are using netgroups */ | ||
34 | if (buffer[0] == '@') | ||
35 | - good &= innetgr (&buffer[1], NULL, user, NULL); | ||
36 | +#ifdef HAVE_INNETGR | ||
37 | + good &= innetgr (&buffer[1], NULL, user, NULL); | ||
38 | +#else | ||
39 | + pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support"); | ||
40 | +#endif | ||
41 | else | ||
42 | - good &= logic_field(pamh, user, buffer, count, is_same); | ||
43 | + good &= logic_field(pamh, user, buffer, count, is_same); | ||
44 | D(("with user: %s", good ? "passes":"fails" )); | ||
45 | |||
46 | /* here we get the time field */ | ||
47 | Index: Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c | ||
48 | =================================================================== | ||
49 | --- Linux-PAM-1.1.3.orig/modules/pam_succeed_if/pam_succeed_if.c | ||
50 | +++ Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c | ||
51 | @@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh, | ||
52 | } | ||
53 | /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */ | ||
54 | static int | ||
55 | -evaluate_innetgr(const char *host, const char *user, const char *group) | ||
56 | +evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group) | ||
57 | { | ||
58 | +#ifdef HAVE_INNETGR | ||
59 | if (innetgr(group, host, user, NULL) == 1) | ||
60 | return PAM_SUCCESS; | ||
61 | +#else | ||
62 | + pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support"); | ||
63 | +#endif | ||
64 | + | ||
65 | return PAM_AUTH_ERR; | ||
66 | } | ||
67 | /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */ | ||
68 | static int | ||
69 | -evaluate_notinnetgr(const char *host, const char *user, const char *group) | ||
70 | +evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group) | ||
71 | { | ||
72 | +#ifdef HAVE_INNETGR | ||
73 | if (innetgr(group, host, user, NULL) == 0) | ||
74 | return PAM_SUCCESS; | ||
75 | +#else | ||
76 | + pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support"); | ||
77 | +#endif | ||
78 | return PAM_AUTH_ERR; | ||
79 | } | ||
80 | |||
81 | @@ -361,14 +370,14 @@ evaluate(pam_handle_t *pamh, int debug, | ||
82 | const void *rhost; | ||
83 | if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS) | ||
84 | rhost = NULL; | ||
85 | - return evaluate_innetgr(rhost, user, right); | ||
86 | + return evaluate_innetgr(pamh, rhost, user, right); | ||
87 | } | ||
88 | /* (Rhost, user) is not in this group. */ | ||
89 | if (strcasecmp(qual, "notinnetgr") == 0) { | ||
90 | const void *rhost; | ||
91 | if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS) | ||
92 | rhost = NULL; | ||
93 | - return evaluate_notinnetgr(rhost, user, right); | ||
94 | + return evaluate_notinnetgr(pamh, rhost, user, right); | ||
95 | } | ||
96 | /* Fail closed. */ | ||
97 | return PAM_SERVICE_ERR; | ||
diff --git a/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch b/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch new file mode 100644 index 0000000000..f1834f6ce3 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch | |||
@@ -0,0 +1,200 @@ | |||
1 | Description: extract the securetty logic for use with the "nullok_secure" option | ||
2 | introduced in the "055_pam_unix_nullok_secure" patch. | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
7 | =================================================================== | ||
8 | diff -urpN a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile.am | ||
9 | --- a/modules/pam_securetty/Makefile.am 2013-07-05 11:08:23.224483237 +0800 | ||
10 | +++ b/modules/pam_securetty/Makefile.am 2013-07-05 11:15:21.304486456 +0800 | ||
11 | @@ -24,6 +24,10 @@ endif | ||
12 | securelib_LTLIBRARIES = pam_securetty.la | ||
13 | pam_securetty_la_LIBADD = -L$(top_builddir)/libpam -lpam | ||
14 | |||
15 | +pam_securetty_la_SOURCES = \ | ||
16 | + pam_securetty.c \ | ||
17 | + tty_secure.c | ||
18 | + | ||
19 | if ENABLE_REGENERATE_MAN | ||
20 | noinst_DATA = README | ||
21 | README: pam_securetty.8.xml | ||
22 | diff -urpN a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c | ||
23 | --- a/modules/pam_securetty/pam_securetty.c 2013-07-05 11:07:50.064483568 +0800 | ||
24 | +++ b/modules/pam_securetty/pam_securetty.c 2013-07-05 11:12:23.994483344 +0800 | ||
25 | @@ -1,7 +1,5 @@ | ||
26 | /* pam_securetty module */ | ||
27 | |||
28 | -#define SECURETTY_FILE "/etc/securetty" | ||
29 | -#define TTY_PREFIX "/dev/" | ||
30 | #define CMDLINE_FILE "/proc/cmdline" | ||
31 | #define CONSOLEACTIVE_FILE "/sys/class/tty/console/active" | ||
32 | |||
33 | @@ -40,6 +38,9 @@ | ||
34 | #include <security/pam_modutil.h> | ||
35 | #include <security/pam_ext.h> | ||
36 | |||
37 | +extern int _pammodutil_tty_secure(const pam_handle_t *pamh, | ||
38 | + const char *uttyname); | ||
39 | + | ||
40 | #define PAM_DEBUG_ARG 0x0001 | ||
41 | #define PAM_NOCONSOLE_ARG 0x0002 | ||
42 | |||
43 | @@ -73,11 +74,7 @@ securetty_perform_check (pam_handle_t *p | ||
44 | const char *username; | ||
45 | const char *uttyname; | ||
46 | const void *void_uttyname; | ||
47 | - char ttyfileline[256]; | ||
48 | - char ptname[256]; | ||
49 | - struct stat ttyfileinfo; | ||
50 | struct passwd *user_pwd; | ||
51 | - FILE *ttyfile; | ||
52 | |||
53 | /* log a trail for debugging */ | ||
54 | if (ctrl & PAM_DEBUG_ARG) { | ||
55 | @@ -105,50 +102,7 @@ securetty_perform_check (pam_handle_t *p | ||
56 | return PAM_SERVICE_ERR; | ||
57 | } | ||
58 | |||
59 | - /* The PAM_TTY item may be prefixed with "/dev/" - skip that */ | ||
60 | - if (strncmp(TTY_PREFIX, uttyname, sizeof(TTY_PREFIX)-1) == 0) { | ||
61 | - uttyname += sizeof(TTY_PREFIX)-1; | ||
62 | - } | ||
63 | - | ||
64 | - if (stat(SECURETTY_FILE, &ttyfileinfo)) { | ||
65 | - pam_syslog(pamh, LOG_NOTICE, "Couldn't open %s: %m", SECURETTY_FILE); | ||
66 | - return PAM_SUCCESS; /* for compatibility with old securetty handling, | ||
67 | - this needs to succeed. But we still log the | ||
68 | - error. */ | ||
69 | - } | ||
70 | - | ||
71 | - if ((ttyfileinfo.st_mode & S_IWOTH) || !S_ISREG(ttyfileinfo.st_mode)) { | ||
72 | - /* If the file is world writable or is not a | ||
73 | - normal file, return error */ | ||
74 | - pam_syslog(pamh, LOG_ERR, | ||
75 | - "%s is either world writable or not a normal file", | ||
76 | - SECURETTY_FILE); | ||
77 | - return PAM_AUTH_ERR; | ||
78 | - } | ||
79 | - | ||
80 | - ttyfile = fopen(SECURETTY_FILE,"r"); | ||
81 | - if (ttyfile == NULL) { /* Check that we opened it successfully */ | ||
82 | - pam_syslog(pamh, LOG_ERR, "Error opening %s: %m", SECURETTY_FILE); | ||
83 | - return PAM_SERVICE_ERR; | ||
84 | - } | ||
85 | - | ||
86 | - if (isdigit(uttyname[0])) { | ||
87 | - snprintf(ptname, sizeof(ptname), "pts/%s", uttyname); | ||
88 | - } else { | ||
89 | - ptname[0] = '\0'; | ||
90 | - } | ||
91 | - | ||
92 | - retval = 1; | ||
93 | - | ||
94 | - while ((fgets(ttyfileline, sizeof(ttyfileline)-1, ttyfile) != NULL) | ||
95 | - && retval) { | ||
96 | - if (ttyfileline[strlen(ttyfileline) - 1] == '\n') | ||
97 | - ttyfileline[strlen(ttyfileline) - 1] = '\0'; | ||
98 | - | ||
99 | - retval = ( strcmp(ttyfileline, uttyname) | ||
100 | - && (!ptname[0] || strcmp(ptname, uttyname)) ); | ||
101 | - } | ||
102 | - fclose(ttyfile); | ||
103 | + retval = _pammodutil_tty_secure(pamh, uttyname); | ||
104 | |||
105 | if (retval && !(ctrl & PAM_NOCONSOLE_ARG)) { | ||
106 | FILE *cmdlinefile; | ||
107 | diff -urpN a/modules/pam_securetty/tty_secure.c b/modules/pam_securetty/tty_secure.c | ||
108 | --- a/modules/pam_securetty/tty_secure.c 1970-01-01 08:30:00.000000000 +0830 | ||
109 | +++ b/modules/pam_securetty/tty_secure.c 2013-07-05 11:14:21.534482900 +0800 | ||
110 | @@ -0,0 +1,90 @@ | ||
111 | +/* | ||
112 | + * A function to determine if a particular line is in /etc/securetty | ||
113 | + */ | ||
114 | + | ||
115 | + | ||
116 | +#define SECURETTY_FILE "/etc/securetty" | ||
117 | +#define TTY_PREFIX "/dev/" | ||
118 | + | ||
119 | +/* This function taken out of pam_securetty by Sam Hartman | ||
120 | + * <hartmans@debian.org>*/ | ||
121 | +/* | ||
122 | + * by Elliot Lee <sopwith@redhat.com>, Red Hat Software. | ||
123 | + * July 25, 1996. | ||
124 | + * Slight modifications AGM. 1996/12/3 | ||
125 | + */ | ||
126 | + | ||
127 | +#include <unistd.h> | ||
128 | +#include <sys/types.h> | ||
129 | +#include <sys/stat.h> | ||
130 | +#include <security/pam_modules.h> | ||
131 | +#include <stdarg.h> | ||
132 | +#include <syslog.h> | ||
133 | +#include <sys/syslog.h> | ||
134 | +#include <stdio.h> | ||
135 | +#include <string.h> | ||
136 | +#include <stdlib.h> | ||
137 | +#include <ctype.h> | ||
138 | +#include <security/pam_modutil.h> | ||
139 | +#include <security/pam_ext.h> | ||
140 | + | ||
141 | +extern int _pammodutil_tty_secure(const pam_handle_t *pamh, | ||
142 | + const char *uttyname); | ||
143 | + | ||
144 | +int _pammodutil_tty_secure(const pam_handle_t *pamh, const char *uttyname) | ||
145 | +{ | ||
146 | + int retval = PAM_AUTH_ERR; | ||
147 | + char ttyfileline[256]; | ||
148 | + char ptname[256]; | ||
149 | + struct stat ttyfileinfo; | ||
150 | + FILE *ttyfile; | ||
151 | + /* The PAM_TTY item may be prefixed with "/dev/" - skip that */ | ||
152 | + if (strncmp(TTY_PREFIX, uttyname, sizeof(TTY_PREFIX)-1) == 0) | ||
153 | + uttyname += sizeof(TTY_PREFIX)-1; | ||
154 | + | ||
155 | + if (stat(SECURETTY_FILE, &ttyfileinfo)) { | ||
156 | + pam_syslog(pamh, LOG_NOTICE, "Couldn't open %s: %m", | ||
157 | + SECURETTY_FILE); | ||
158 | + return PAM_SUCCESS; /* for compatibility with old securetty handling, | ||
159 | + this needs to succeed. But we still log the | ||
160 | + error. */ | ||
161 | + } | ||
162 | + | ||
163 | + if ((ttyfileinfo.st_mode & S_IWOTH) || !S_ISREG(ttyfileinfo.st_mode)) { | ||
164 | + /* If the file is world writable or is not a | ||
165 | + normal file, return error */ | ||
166 | + pam_syslog(pamh, LOG_ERR, | ||
167 | + "%s is either world writable or not a normal file", | ||
168 | + SECURETTY_FILE); | ||
169 | + return PAM_AUTH_ERR; | ||
170 | + } | ||
171 | + | ||
172 | + ttyfile = fopen(SECURETTY_FILE,"r"); | ||
173 | + if(ttyfile == NULL) { /* Check that we opened it successfully */ | ||
174 | + pam_syslog(pamh, LOG_ERR, "Error opening %s: %m", SECURETTY_FILE); | ||
175 | + return PAM_SERVICE_ERR; | ||
176 | + } | ||
177 | + | ||
178 | + if (isdigit(uttyname[0])) { | ||
179 | + snprintf(ptname, sizeof(ptname), "pts/%s", uttyname); | ||
180 | + } else { | ||
181 | + ptname[0] = '\0'; | ||
182 | + } | ||
183 | + | ||
184 | + retval = 1; | ||
185 | + | ||
186 | + while ((fgets(ttyfileline,sizeof(ttyfileline)-1, ttyfile) != NULL) | ||
187 | + && retval) { | ||
188 | + if(ttyfileline[strlen(ttyfileline) - 1] == '\n') | ||
189 | + ttyfileline[strlen(ttyfileline) - 1] = '\0'; | ||
190 | + retval = ( strcmp(ttyfileline,uttyname) | ||
191 | + && (!ptname[0] || strcmp(ptname, uttyname)) ); | ||
192 | + } | ||
193 | + fclose(ttyfile); | ||
194 | + | ||
195 | + if(retval) { | ||
196 | + retval = PAM_AUTH_ERR; | ||
197 | + } | ||
198 | + | ||
199 | + return retval; | ||
200 | +} | ||
diff --git a/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch b/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch new file mode 100644 index 0000000000..b285e96c27 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch | |||
@@ -0,0 +1,222 @@ | |||
1 | Debian patch to add a new 'nullok_secure' option to pam_unix, which | ||
2 | accepts users with null passwords only when the applicant is connected | ||
3 | from a tty listed in /etc/securetty. | ||
4 | |||
5 | Authors: Sam Hartman <hartmans@debian.org>, | ||
6 | Steve Langasek <vorlon@debian.org> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
11 | =================================================================== | ||
12 | diff -urpN a/modules/pam_unix/Makefile.am b/modules/pam_unix/Makefile.am | ||
13 | --- a/modules/pam_unix/Makefile.am 2013-07-05 09:51:31.014483164 +0800 | ||
14 | +++ b/modules/pam_unix/Makefile.am 2013-07-05 10:26:12.884484000 +0800 | ||
15 | @@ -30,7 +30,8 @@ if HAVE_VERSIONING | ||
16 | pam_unix_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map | ||
17 | endif | ||
18 | pam_unix_la_LIBADD = $(top_builddir)/libpam/libpam.la \ | ||
19 | - @LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS) | ||
20 | + @LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS) \ | ||
21 | + ../pam_securetty/tty_secure.lo | ||
22 | |||
23 | securelib_LTLIBRARIES = pam_unix.la | ||
24 | |||
25 | diff -urpN a/modules/pam_unix/pam_unix.8 b/modules/pam_unix/pam_unix.8 | ||
26 | --- a/modules/pam_unix/pam_unix.8 2013-07-05 09:52:16.825108201 +0800 | ||
27 | +++ b/modules/pam_unix/pam_unix.8 2013-07-05 10:28:34.724483774 +0800 | ||
28 | @@ -220,7 +220,14 @@ A little more extreme than debug\&. | ||
29 | .RS 4 | ||
30 | The default action of this module is to not permit the user access to a service if their official password is blank\&. The | ||
31 | \fBnullok\fR | ||
32 | -argument overrides this default\&. | ||
33 | +argument overrides this default and allows any user with a blank password to access the service\&. | ||
34 | +.RE | ||
35 | +.PP | ||
36 | +\fBnullok_secure\fR | ||
37 | +.RS 4 | ||
38 | +The default action of this module is to not permit the user access to a service if their official password is blank\&. The | ||
39 | +\fBnullok_secure\fR | ||
40 | +argument overrides this default and allows any user with a blank password to access the service as long as the value of PAM_TTY is set to one of the values found in /etc/securetty\&. | ||
41 | .RE | ||
42 | .PP | ||
43 | \fBtry_first_pass\fR | ||
44 | diff -urpN a/modules/pam_unix/pam_unix.8.xml b/modules/pam_unix/pam_unix.8.xml | ||
45 | --- a/modules/pam_unix/pam_unix.8.xml 2013-07-05 09:52:38.775108523 +0800 | ||
46 | +++ b/modules/pam_unix/pam_unix.8.xml 2013-07-05 10:30:23.084483630 +0800 | ||
47 | @@ -135,7 +135,24 @@ | ||
48 | <para> | ||
49 | The default action of this module is to not permit the | ||
50 | user access to a service if their official password is blank. | ||
51 | - The <option>nullok</option> argument overrides this default. | ||
52 | + The <option>nullok</option> argument overrides this default | ||
53 | + and allows any user with a blank password to access the | ||
54 | + service. | ||
55 | + </para> | ||
56 | + </listitem> | ||
57 | + </varlistentry> | ||
58 | + <varlistentry> | ||
59 | + <term> | ||
60 | + <option>nullok_secure</option> | ||
61 | + </term> | ||
62 | + <listitem> | ||
63 | + <para> | ||
64 | + The default action of this module is to not permit the | ||
65 | + user access to a service if their official password is blank. | ||
66 | + The <option>nullok_secure</option> argument overrides this | ||
67 | + default and allows any user with a blank password to access | ||
68 | + the service as long as the value of PAM_TTY is set to one of | ||
69 | + the values found in /etc/securetty. | ||
70 | </para> | ||
71 | </listitem> | ||
72 | </varlistentry> | ||
73 | diff -urpN a/modules/pam_unix/README b/modules/pam_unix/README | ||
74 | --- a/modules/pam_unix/README 2013-07-05 09:51:52.205107846 +0800 | ||
75 | +++ b/modules/pam_unix/README 2013-07-05 10:27:10.774484537 +0800 | ||
76 | @@ -57,7 +57,16 @@ nullok | ||
77 | |||
78 | The default action of this module is to not permit the user access to a | ||
79 | service if their official password is blank. The nullok argument overrides | ||
80 | - this default. | ||
81 | + this default and allows any user with a blank password to access the | ||
82 | + service. | ||
83 | + | ||
84 | +nullok_secure | ||
85 | + | ||
86 | + The default action of this module is to not permit the user access to a | ||
87 | + service if their official password is blank. The nullok_secure argument | ||
88 | + overrides this default and allows any user with a blank password to access | ||
89 | + the service as long as the value of PAM_TTY is set to one of the values | ||
90 | + found in /etc/securetty. | ||
91 | |||
92 | try_first_pass | ||
93 | |||
94 | diff -urpN a/modules/pam_unix/support.c b/modules/pam_unix/support.c | ||
95 | --- a/modules/pam_unix/support.c 2013-07-05 09:50:49.134482523 +0800 | ||
96 | +++ b/modules/pam_unix/support.c 2013-07-05 09:56:26.924484267 +0800 | ||
97 | @@ -84,14 +84,22 @@ int _set_ctrl(pam_handle_t *pamh, int fl | ||
98 | /* now parse the arguments to this module */ | ||
99 | |||
100 | for (; argc-- > 0; ++argv) { | ||
101 | - int j; | ||
102 | + int j, sl; | ||
103 | |||
104 | D(("pam_unix arg: %s", *argv)); | ||
105 | |||
106 | for (j = 0; j < UNIX_CTRLS_; ++j) { | ||
107 | - if (unix_args[j].token | ||
108 | - && !strncmp(*argv, unix_args[j].token, strlen(unix_args[j].token))) { | ||
109 | - break; | ||
110 | + if (unix_args[j].token) { | ||
111 | + sl = strlen(unix_args[j].token); | ||
112 | + if (unix_args[j].token[sl-1] == '=') { | ||
113 | + /* exclude argument from comparison */ | ||
114 | + if (!strncmp(*argv, unix_args[j].token, sl)) | ||
115 | + break; | ||
116 | + } else { | ||
117 | + /* compare full strings */ | ||
118 | + if (!strcmp(*argv, unix_args[j].token)) | ||
119 | + break; | ||
120 | + } | ||
121 | } | ||
122 | } | ||
123 | |||
124 | @@ -461,6 +469,7 @@ static int _unix_run_helper_binary(pam_h | ||
125 | child = fork(); | ||
126 | if (child == 0) { | ||
127 | int i=0; | ||
128 | + int nullok = off(UNIX__NONULL, ctrl); | ||
129 | struct rlimit rlim; | ||
130 | static char *envp[] = { NULL }; | ||
131 | char *args[] = { NULL, NULL, NULL, NULL }; | ||
132 | @@ -488,7 +497,18 @@ static int _unix_run_helper_binary(pam_h | ||
133 | /* exec binary helper */ | ||
134 | args[0] = strdup(CHKPWD_HELPER); | ||
135 | args[1] = x_strdup(user); | ||
136 | - if (off(UNIX__NONULL, ctrl)) { /* this means we've succeeded */ | ||
137 | + | ||
138 | + if (on(UNIX_NULLOK_SECURE, ctrl)) { | ||
139 | + const void *uttyname; | ||
140 | + retval = pam_get_item(pamh, PAM_TTY, &uttyname); | ||
141 | + if (retval != PAM_SUCCESS || uttyname == NULL | ||
142 | + || _pammodutil_tty_secure(pamh, (const char *)uttyname) != PAM_SUCCESS) | ||
143 | + { | ||
144 | + nullok = 0; | ||
145 | + } | ||
146 | + } | ||
147 | + | ||
148 | + if (nullok) { | ||
149 | args[2]=strdup("nullok"); | ||
150 | } else { | ||
151 | args[2]=strdup("nonull"); | ||
152 | @@ -567,6 +587,17 @@ _unix_blankpasswd (pam_handle_t *pamh, u | ||
153 | if (on(UNIX__NONULL, ctrl)) | ||
154 | return 0; /* will fail but don't let on yet */ | ||
155 | |||
156 | + if (on(UNIX_NULLOK_SECURE, ctrl)) { | ||
157 | + int retval2; | ||
158 | + const void *uttyname; | ||
159 | + retval2 = pam_get_item(pamh, PAM_TTY, &uttyname); | ||
160 | + if (retval2 != PAM_SUCCESS || uttyname == NULL) | ||
161 | + return 0; | ||
162 | + | ||
163 | + if (_pammodutil_tty_secure(pamh, (const char *)uttyname) != PAM_SUCCESS) | ||
164 | + return 0; | ||
165 | + } | ||
166 | + | ||
167 | /* UNIX passwords area */ | ||
168 | |||
169 | retval = get_pwd_hash(pamh, name, &pwd, &salt); | ||
170 | @@ -653,7 +684,8 @@ int _unix_verify_password(pam_handle_t * | ||
171 | } | ||
172 | } | ||
173 | } else { | ||
174 | - retval = verify_pwd_hash(p, salt, off(UNIX__NONULL, ctrl)); | ||
175 | + retval = verify_pwd_hash(p, salt, | ||
176 | + _unix_blankpasswd(pamh, ctrl, name)); | ||
177 | } | ||
178 | |||
179 | if (retval == PAM_SUCCESS) { | ||
180 | diff -urpN a/modules/pam_unix/support.h b/modules/pam_unix/support.h | ||
181 | --- a/modules/pam_unix/support.h 2013-07-05 09:51:10.385107934 +0800 | ||
182 | +++ b/modules/pam_unix/support.h 2013-07-05 10:23:54.815107842 +0800 | ||
183 | @@ -90,8 +90,9 @@ typedef struct { | ||
184 | password hash algorithms */ | ||
185 | #define UNIX_BLOWFISH_PASS 26 /* new password hashes will use blowfish */ | ||
186 | #define UNIX_MIN_PASS_LEN 27 /* min length for password */ | ||
187 | +#define UNIX_NULLOK_SECURE 28 /* NULL passwords allowed only on secure ttys */ | ||
188 | /* -------------- */ | ||
189 | -#define UNIX_CTRLS_ 28 /* number of ctrl arguments defined */ | ||
190 | +#define UNIX_CTRLS_ 29 /* number of ctrl arguments defined */ | ||
191 | |||
192 | #define UNIX_DES_CRYPT(ctrl) (off(UNIX_MD5_PASS,ctrl)&&off(UNIX_BIGCRYPT,ctrl)&&off(UNIX_SHA256_PASS,ctrl)&&off(UNIX_SHA512_PASS,ctrl)&&off(UNIX_BLOWFISH_PASS,ctrl)) | ||
193 | |||
194 | @@ -109,7 +110,7 @@ static const UNIX_Ctrls unix_args[UNIX_C | ||
195 | /* UNIX_NOT_SET_PASS */ {"not_set_pass", _ALL_ON_, 0100}, | ||
196 | /* UNIX__PRELIM */ {NULL, _ALL_ON_^(0600), 0200}, | ||
197 | /* UNIX__UPDATE */ {NULL, _ALL_ON_^(0600), 0400}, | ||
198 | -/* UNIX__NONULL */ {NULL, _ALL_ON_, 01000}, | ||
199 | +/* UNIX__NONULL */ {NULL, _ALL_ON_^(0x10000000), 0x200}, | ||
200 | /* UNIX__QUIET */ {NULL, _ALL_ON_, 02000}, | ||
201 | /* UNIX_USE_AUTHTOK */ {"use_authtok", _ALL_ON_, 04000}, | ||
202 | /* UNIX_SHADOW */ {"shadow", _ALL_ON_, 010000}, | ||
203 | @@ -127,7 +128,8 @@ static const UNIX_Ctrls unix_args[UNIX_C | ||
204 | /* UNIX_SHA512_PASS */ {"sha512", _ALL_ON_^(0260420000), 040000000}, | ||
205 | /* UNIX_ALGO_ROUNDS */ {"rounds=", _ALL_ON_, 0100000000}, | ||
206 | /* UNIX_BLOWFISH_PASS */ {"blowfish", _ALL_ON_^(0260420000), 0200000000}, | ||
207 | -/* UNIX_MIN_PASS_LEN */ {"minlen=", _ALL_ON_, 0400000000}, | ||
208 | +/* UNIX_MIN_PASS_LEN */ {"minlen=", _ALL_ON_, 0400000000}, | ||
209 | +/* UNIX_NULLOK_SECURE */ {"nullok_secure", _ALL_ON_^(0x200), 0x10000000}, | ||
210 | }; | ||
211 | |||
212 | #define UNIX_DEFAULTS (unix_args[UNIX__NONULL].flag) | ||
213 | @@ -163,6 +165,9 @@ extern int _unix_read_password(pam_handl | ||
214 | ,const char *data_name | ||
215 | ,const void **pass); | ||
216 | |||
217 | +extern int _pammodutil_tty_secure(const pam_handle_t *pamh, | ||
218 | + const char *uttyname); | ||
219 | + | ||
220 | extern int _unix_run_verify_binary(pam_handle_t *pamh, | ||
221 | unsigned int ctrl, const char *user, int *daysleft); | ||
222 | #endif /* _PAM_UNIX_SUPPORT_H */ | ||
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-account b/meta/recipes-extended/pam/libpam/pam.d/common-account new file mode 100644 index 0000000000..316b17337b --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/common-account | |||
@@ -0,0 +1,25 @@ | |||
1 | # | ||
2 | # /etc/pam.d/common-account - authorization settings common to all services | ||
3 | # | ||
4 | # This file is included from other service-specific PAM config files, | ||
5 | # and should contain a list of the authorization modules that define | ||
6 | # the central access policy for use on the system. The default is to | ||
7 | # only deny service to users whose accounts are expired in /etc/shadow. | ||
8 | # | ||
9 | # As of pam 1.0.1-6, this file is managed by pam-auth-update by default. | ||
10 | # To take advantage of this, it is recommended that you configure any | ||
11 | # local modules either before or after the default block, and use | ||
12 | # pam-auth-update to manage selection of other modules. See | ||
13 | # pam-auth-update(8) for details. | ||
14 | # | ||
15 | |||
16 | # here are the per-package modules (the "Primary" block) | ||
17 | account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so | ||
18 | # here's the fallback if no module succeeds | ||
19 | account requisite pam_deny.so | ||
20 | # prime the stack with a positive return value if there isn't one already; | ||
21 | # this avoids us returning an error just because nothing sets a success code | ||
22 | # since the modules above will each just jump around | ||
23 | account required pam_permit.so | ||
24 | # and here are more per-package modules (the "Additional" block) | ||
25 | # end of pam-auth-update config | ||
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-auth b/meta/recipes-extended/pam/libpam/pam.d/common-auth new file mode 100644 index 0000000000..460b69f198 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/common-auth | |||
@@ -0,0 +1,18 @@ | |||
1 | # | ||
2 | # /etc/pam.d/common-auth - authentication settings common to all services | ||
3 | # | ||
4 | # This file is included from other service-specific PAM config files, | ||
5 | # and should contain a list of the authentication modules that define | ||
6 | # the central authentication scheme for use on the system | ||
7 | # (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the | ||
8 | # traditional Unix authentication mechanisms. | ||
9 | |||
10 | # here are the per-package modules (the "Primary" block) | ||
11 | auth [success=1 default=ignore] pam_unix.so nullok_secure | ||
12 | # here's the fallback if no module succeeds | ||
13 | auth requisite pam_deny.so | ||
14 | # prime the stack with a positive return value if there isn't one already; | ||
15 | # this avoids us returning an error just because nothing sets a success code | ||
16 | # since the modules above will each just jump around | ||
17 | auth required pam_permit.so | ||
18 | # and here are more per-package modules (the "Additional" block) | ||
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-password b/meta/recipes-extended/pam/libpam/pam.d/common-password new file mode 100644 index 0000000000..3896057328 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/common-password | |||
@@ -0,0 +1,26 @@ | |||
1 | # | ||
2 | # /etc/pam.d/common-password - password-related modules common to all services | ||
3 | # | ||
4 | # This file is included from other service-specific PAM config files, | ||
5 | # and should contain a list of modules that define the services to be | ||
6 | # used to change user passwords. The default is pam_unix. | ||
7 | |||
8 | # Explanation of pam_unix options: | ||
9 | # | ||
10 | # The "sha512" option enables salted SHA512 passwords. Without this option, | ||
11 | # the default is Unix crypt. Prior releases used the option "md5". | ||
12 | # | ||
13 | # The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in | ||
14 | # login.defs. | ||
15 | # | ||
16 | # See the pam_unix manpage for other options. | ||
17 | |||
18 | # here are the per-package modules (the "Primary" block) | ||
19 | password [success=1 default=ignore] pam_unix.so obscure sha512 | ||
20 | # here's the fallback if no module succeeds | ||
21 | password requisite pam_deny.so | ||
22 | # prime the stack with a positive return value if there isn't one already; | ||
23 | # this avoids us returning an error just because nothing sets a success code | ||
24 | # since the modules above will each just jump around | ||
25 | password required pam_permit.so | ||
26 | # and here are more per-package modules (the "Additional" block) | ||
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-session b/meta/recipes-extended/pam/libpam/pam.d/common-session new file mode 100644 index 0000000000..a4a551f711 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/common-session | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # /etc/pam.d/common-session - session-related modules common to all services | ||
3 | # | ||
4 | # This file is included from other service-specific PAM config files, | ||
5 | # and should contain a list of modules that define tasks to be performed | ||
6 | # at the start and end of sessions of *any* kind (both interactive and | ||
7 | # non-interactive). | ||
8 | # | ||
9 | |||
10 | # here are the per-package modules (the "Primary" block) | ||
11 | session [default=1] pam_permit.so | ||
12 | # here's the fallback if no module succeeds | ||
13 | session requisite pam_deny.so | ||
14 | # prime the stack with a positive return value if there isn't one already; | ||
15 | # this avoids us returning an error just because nothing sets a success code | ||
16 | # since the modules above will each just jump around | ||
17 | session required pam_permit.so | ||
18 | # and here are more per-package modules (the "Additional" block) | ||
19 | session required pam_unix.so | ||
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive b/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive new file mode 100644 index 0000000000..b110bb2b49 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # /etc/pam.d/common-session-noninteractive - session-related modules | ||
3 | # common to all non-interactive services | ||
4 | # | ||
5 | # This file is included from other service-specific PAM config files, | ||
6 | # and should contain a list of modules that define tasks to be performed | ||
7 | # at the start and end of all non-interactive sessions. | ||
8 | # | ||
9 | |||
10 | # here are the per-package modules (the "Primary" block) | ||
11 | session [default=1] pam_permit.so | ||
12 | # here's the fallback if no module succeeds | ||
13 | session requisite pam_deny.so | ||
14 | # prime the stack with a positive return value if there isn't one already; | ||
15 | # this avoids us returning an error just because nothing sets a success code | ||
16 | # since the modules above will each just jump around | ||
17 | session required pam_permit.so | ||
18 | # and here are more per-package modules (the "Additional" block) | ||
19 | session required pam_unix.so | ||
diff --git a/meta/recipes-extended/pam/libpam/pam.d/other b/meta/recipes-extended/pam/libpam/pam.d/other new file mode 100644 index 0000000000..ec970ecbe0 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/other | |||
@@ -0,0 +1,24 @@ | |||
1 | # | ||
2 | # /etc/pam.d/other - specify the PAM fallback behaviour | ||
3 | # | ||
4 | # Note that this file is used for any unspecified service; for example | ||
5 | #if /etc/pam.d/cron specifies no session modules but cron calls | ||
6 | #pam_open_session, the session module out of /etc/pam.d/other is | ||
7 | #used. | ||
8 | |||
9 | # We use pam_warn.so to generate syslog notes that the 'other' | ||
10 | #fallback rules are being used (as a hint to suggest you should setup | ||
11 | #specific PAM rules for the service and aid to debugging). Then to be | ||
12 | #secure, deny access to all services by default. | ||
13 | |||
14 | auth required pam_warn.so | ||
15 | auth required pam_deny.so | ||
16 | |||
17 | account required pam_warn.so | ||
18 | account required pam_deny.so | ||
19 | |||
20 | password required pam_warn.so | ||
21 | password required pam_deny.so | ||
22 | |||
23 | session required pam_warn.so | ||
24 | session required pam_deny.so | ||
diff --git a/meta/recipes-extended/pam/libpam/pam_timestamp-fix-potential-directory-traversal-issu.patch b/meta/recipes-extended/pam/libpam/pam_timestamp-fix-potential-directory-traversal-issu.patch new file mode 100644 index 0000000000..06cca13abe --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam_timestamp-fix-potential-directory-traversal-issu.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | From 9dcead87e6d7f66d34e7a56d11a30daca367dffb Mon Sep 17 00:00:00 2001 | ||
2 | From: "Dmitry V. Levin" <ldv@altlinux.org> | ||
3 | Date: Wed, 26 Mar 2014 22:17:23 +0000 | ||
4 | Subject: [PATCH] pam_timestamp: fix potential directory traversal issue | ||
5 | (ticket #27) | ||
6 | |||
7 | commit 9dcead87e6d7f66d34e7a56d11a30daca367dffb upstream | ||
8 | |||
9 | pam_timestamp uses values of PAM_RUSER and PAM_TTY as components of | ||
10 | the timestamp pathname it creates, so extra care should be taken to | ||
11 | avoid potential directory traversal issues. | ||
12 | |||
13 | * modules/pam_timestamp/pam_timestamp.c (check_tty): Treat | ||
14 | "." and ".." tty values as invalid. | ||
15 | (get_ruser): Treat "." and ".." ruser values, as well as any ruser | ||
16 | value containing '/', as invalid. | ||
17 | |||
18 | Fixes CVE-2014-2583. | ||
19 | |||
20 | Reported-by: Sebastian Krahmer <krahmer@suse.de> | ||
21 | |||
22 | Upstream-Status: Backport | ||
23 | |||
24 | Signed-off-by: Yue Tao <Yue.Tao@windriver.com> | ||
25 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
26 | --- | ||
27 | modules/pam_timestamp/pam_timestamp.c | 13 ++++++++++++- | ||
28 | 1 files changed, 12 insertions(+), 1 deletions(-) | ||
29 | |||
30 | diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c | ||
31 | index 5193733..b3f08b1 100644 | ||
32 | --- a/modules/pam_timestamp/pam_timestamp.c | ||
33 | +++ b/modules/pam_timestamp/pam_timestamp.c | ||
34 | @@ -158,7 +158,7 @@ check_tty(const char *tty) | ||
35 | tty = strrchr(tty, '/') + 1; | ||
36 | } | ||
37 | /* Make sure the tty wasn't actually a directory (no basename). */ | ||
38 | - if (strlen(tty) == 0) { | ||
39 | + if (!strlen(tty) || !strcmp(tty, ".") || !strcmp(tty, "..")) { | ||
40 | return NULL; | ||
41 | } | ||
42 | return tty; | ||
43 | @@ -243,6 +243,17 @@ get_ruser(pam_handle_t *pamh, char *ruserbuf, size_t ruserbuflen) | ||
44 | if (pwd != NULL) { | ||
45 | ruser = pwd->pw_name; | ||
46 | } | ||
47 | + } else { | ||
48 | + /* | ||
49 | + * This ruser is used by format_timestamp_name as a component | ||
50 | + * of constructed timestamp pathname, so ".", "..", and '/' | ||
51 | + * are disallowed to avoid potential path traversal issues. | ||
52 | + */ | ||
53 | + if (!strcmp(ruser, ".") || | ||
54 | + !strcmp(ruser, "..") || | ||
55 | + strchr(ruser, '/')) { | ||
56 | + ruser = NULL; | ||
57 | + } | ||
58 | } | ||
59 | if (ruser == NULL || strlen(ruser) >= ruserbuflen) { | ||
60 | *ruserbuf = '\0'; | ||
61 | -- | ||
62 | 1.7.5.4 | ||
63 | |||
diff --git a/meta/recipes-extended/pam/libpam/reflect-the-enforce_for_root-semantics-change-in-pam.patch b/meta/recipes-extended/pam/libpam/reflect-the-enforce_for_root-semantics-change-in-pam.patch new file mode 100644 index 0000000000..c13535ecc2 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/reflect-the-enforce_for_root-semantics-change-in-pam.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | Backport from linux-pam git repo. | ||
2 | |||
3 | [YOCTO #4107] | ||
4 | |||
5 | Upstream-Status: Backport | ||
6 | |||
7 | Signed-off-by: Kang Kai <kai.kang@windriver.com> | ||
8 | |||
9 | From bd07ad3adc626f842a4391d256541883426fd389 Mon Sep 17 00:00:00 2001 | ||
10 | From: Tomas Mraz <tmraz@fedoraproject.org> | ||
11 | Date: Tue, 13 Nov 2012 09:19:05 +0100 | ||
12 | Subject: [PATCH] Reflect the enforce_for_root semantics change in | ||
13 | pam_pwhistory xtest. | ||
14 | |||
15 | xtests/tst-pam_pwhistory1.pamd: Use enforce_for_root as the test is | ||
16 | running with real uid == 0. | ||
17 | --- | ||
18 | xtests/tst-pam_pwhistory1.pamd | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/xtests/tst-pam_pwhistory1.pamd b/xtests/tst-pam_pwhistory1.pamd | ||
22 | index 68e1b94..d60db7c 100644 | ||
23 | --- a/xtests/tst-pam_pwhistory1.pamd | ||
24 | +++ b/xtests/tst-pam_pwhistory1.pamd | ||
25 | @@ -1,6 +1,6 @@ | ||
26 | #%PAM-1.0 | ||
27 | auth required pam_permit.so | ||
28 | account required pam_permit.so | ||
29 | -password required pam_pwhistory.so remember=10 retry=1 | ||
30 | +password required pam_pwhistory.so remember=10 retry=1 enforce_for_root | ||
31 | password required pam_unix.so use_authtok md5 | ||
32 | session required pam_permit.so | ||
33 | -- | ||
34 | 1.7.11.7 | ||
35 | |||
diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb b/meta/recipes-extended/pam/libpam_1.1.6.bb new file mode 100644 index 0000000000..3b6d5144f9 --- /dev/null +++ b/meta/recipes-extended/pam/libpam_1.1.6.bb | |||
@@ -0,0 +1,165 @@ | |||
1 | SUMMARY = "Linux-PAM (Pluggable Authentication Modules)" | ||
2 | DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users" | ||
3 | HOMEPAGE = "https://fedorahosted.org/linux-pam/" | ||
4 | BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" | ||
5 | SECTION = "base" | ||
6 | # PAM is dual licensed under GPL and BSD. | ||
7 | # /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time | ||
8 | # libpam-runtime-1.0.1 is GPLv2+), by openembedded | ||
9 | LICENSE = "GPLv2+ | BSD" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3" | ||
11 | |||
12 | SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \ | ||
13 | file://99_pam \ | ||
14 | file://pam.d/common-account \ | ||
15 | file://pam.d/common-auth \ | ||
16 | file://pam.d/common-password \ | ||
17 | file://pam.d/common-session \ | ||
18 | file://pam.d/common-session-noninteractive \ | ||
19 | file://pam.d/other \ | ||
20 | file://libpam-xtests.patch \ | ||
21 | file://destdirfix.patch \ | ||
22 | file://fixsepbuild.patch \ | ||
23 | file://reflect-the-enforce_for_root-semantics-change-in-pam.patch \ | ||
24 | file://add-checks-for-crypt-returning-NULL.patch \ | ||
25 | file://libpam-fix-for-CVE-2010-4708.patch \ | ||
26 | file://pam-security-abstract-securetty-handling.patch \ | ||
27 | file://pam-unix-nullok-secure.patch \ | ||
28 | file://pam_timestamp-fix-potential-directory-traversal-issu.patch \ | ||
29 | file://libpam-xtests-remove-bash-dependency.patch \ | ||
30 | " | ||
31 | SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4" | ||
32 | SRC_URI[sha256sum] = "bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2" | ||
33 | |||
34 | SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch" | ||
35 | |||
36 | DEPENDS = "bison flex flex-native cracklib" | ||
37 | |||
38 | EXTRA_OECONF = "--with-db-uniquename=_pam \ | ||
39 | --includedir=${includedir}/security \ | ||
40 | --libdir=${base_libdir} \ | ||
41 | --disable-nis \ | ||
42 | --disable-regenerate-docu \ | ||
43 | --disable-prelude" | ||
44 | |||
45 | CFLAGS_append = " -fPIC " | ||
46 | |||
47 | PR = "r5" | ||
48 | |||
49 | S = "${WORKDIR}/Linux-PAM-${PV}" | ||
50 | |||
51 | inherit autotools gettext pkgconfig | ||
52 | |||
53 | PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," | ||
54 | |||
55 | PACKAGES += "${PN}-runtime ${PN}-xtests" | ||
56 | FILES_${PN} = "${base_libdir}/lib*${SOLIBS}" | ||
57 | FILES_${PN}-dbg += "${base_libdir}/security/.debug \ | ||
58 | ${base_libdir}/security/pam_filter/.debug \ | ||
59 | ${datadir}/Linux-PAM/xtests/.debug" | ||
60 | |||
61 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" | ||
62 | FILES_${PN}-runtime = "${sysconfdir}" | ||
63 | FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" | ||
64 | |||
65 | PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*" | ||
66 | |||
67 | def get_multilib_bit(d): | ||
68 | baselib = d.getVar('baselib', True) or '' | ||
69 | return baselib.replace('lib', '') | ||
70 | |||
71 | libpam_suffix = "suffix${@get_multilib_bit(d)}" | ||
72 | |||
73 | RPROVIDES_${PN} += "${PN}-${libpam_suffix}" | ||
74 | RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}" | ||
75 | |||
76 | RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \ | ||
77 | ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \ | ||
78 | ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \ | ||
79 | ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \ | ||
80 | ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \ | ||
81 | " | ||
82 | RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \ | ||
83 | ${MLPREFIX}pam-plugin-access-${libpam_suffix} \ | ||
84 | ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \ | ||
85 | ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \ | ||
86 | ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \ | ||
87 | ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \ | ||
88 | ${MLPREFIX}pam-plugin-time-${libpam_suffix} \ | ||
89 | coreutils" | ||
90 | |||
91 | # FIXME: Native suffix breaks here, disable it for now | ||
92 | RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}" | ||
93 | RRECOMMENDS_${PN}_class-native = "" | ||
94 | |||
95 | python populate_packages_prepend () { | ||
96 | def pam_plugin_append_file(pn, dir, file): | ||
97 | nf = os.path.join(dir, file) | ||
98 | of = d.getVar('FILES_' + pn, True) | ||
99 | if of: | ||
100 | nf = of + " " + nf | ||
101 | d.setVar('FILES_' + pn, nf) | ||
102 | |||
103 | def pam_plugin_hook(file, pkg, pattern, format, basename): | ||
104 | pn = d.getVar('PN', True) | ||
105 | libpam_suffix = d.getVar('libpam_suffix', True) | ||
106 | |||
107 | rdeps = d.getVar('RDEPENDS_' + pkg, True) | ||
108 | if rdeps: | ||
109 | rdeps = rdeps + " " + pn + "-" + libpam_suffix | ||
110 | else: | ||
111 | rdeps = pn + "-" + libpam_suffix | ||
112 | d.setVar('RDEPENDS_' + pkg, rdeps) | ||
113 | |||
114 | provides = d.getVar('RPROVIDES_' + pkg, True) | ||
115 | if provides: | ||
116 | provides = provides + " " + pkg + "-" + libpam_suffix | ||
117 | else: | ||
118 | provides = pkg + "-" + libpam_suffix | ||
119 | d.setVar('RPROVIDES_' + pkg, provides) | ||
120 | |||
121 | mlprefix = d.getVar('MLPREFIX', True) or '' | ||
122 | dvar = bb.data.expand('${WORKDIR}/package', d, True) | ||
123 | pam_libdir = d.expand('${base_libdir}/security') | ||
124 | pam_sbindir = d.expand('${sbindir}') | ||
125 | pam_filterdir = d.expand('${base_libdir}/security/pam_filter') | ||
126 | pam_pkgname = mlprefix + 'pam-plugin%s' | ||
127 | |||
128 | do_split_packages(d, pam_libdir, '^pam(.*)\.so$', pam_pkgname, | ||
129 | 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='') | ||
130 | pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd') | ||
131 | pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update') | ||
132 | pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally') | ||
133 | pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2') | ||
134 | pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check') | ||
135 | pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper') | ||
136 | pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply') | ||
137 | do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') | ||
138 | } | ||
139 | |||
140 | do_install() { | ||
141 | autotools_do_install | ||
142 | |||
143 | # don't install /var/run when populating rootfs. Do it through volatile | ||
144 | rm -rf ${D}${localstatedir} | ||
145 | install -d ${D}${sysconfdir}/default/volatiles | ||
146 | install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles | ||
147 | |||
148 | install -d ${D}${sysconfdir}/pam.d/ | ||
149 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ | ||
150 | |||
151 | # The lsb requires unix_chkpwd has setuid permission | ||
152 | chmod 4755 ${D}${sbindir}/unix_chkpwd | ||
153 | |||
154 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
155 | echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session | ||
156 | fi | ||
157 | } | ||
158 | |||
159 | python do_pam_sanity () { | ||
160 | if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d): | ||
161 | bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly") | ||
162 | } | ||
163 | addtask pam_sanity before do_configure | ||
164 | |||
165 | BBCLASSEXTEND = "nativesdk native" | ||
diff --git a/meta/recipes-extended/parted/parted-3.1/Makefile b/meta/recipes-extended/parted/parted-3.1/Makefile new file mode 100644 index 0000000000..ee90be0814 --- /dev/null +++ b/meta/recipes-extended/parted/parted-3.1/Makefile | |||
@@ -0,0 +1,285 @@ | |||
1 | am__tty_colors_dummy = \ | ||
2 | mgn= red= grn= lgn= blu= brg= std=; \ | ||
3 | am__color_tests=no | ||
4 | |||
5 | am__tty_colors = \ | ||
6 | $(am__tty_colors_dummy); \ | ||
7 | test "X$(AM_COLOR_TESTS)" != Xno \ | ||
8 | && test "X$$TERM" != Xdumb \ | ||
9 | && { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ | ||
10 | && { \ | ||
11 | am__color_tests=yes; \ | ||
12 | red='[0;31m'; \ | ||
13 | grn='[0;32m'; \ | ||
14 | lgn='[1;32m'; \ | ||
15 | blu='[1;34m'; \ | ||
16 | mgn='[0;35m'; \ | ||
17 | brg='[1m'; \ | ||
18 | std='[m'; \ | ||
19 | } | ||
20 | |||
21 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
22 | am__vpath_adj = case $$p in \ | ||
23 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
24 | *) f=$$p;; \ | ||
25 | esac; | ||
26 | am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } | ||
27 | am__rst_section = { sed 'p;s/./=/g;' && echo; } | ||
28 | am__sh_e_setup = case $$- in *e*) set +e;; esac | ||
29 | |||
30 | am__common_driver_flags = \ | ||
31 | --color-tests "$$am__color_tests" \ | ||
32 | --enable-hard-errors "$$am__enable_hard_errors" \ | ||
33 | --expect-failure "$$am__expect_failure" | ||
34 | am__check_pre = \ | ||
35 | $(am__sh_e_setup); \ | ||
36 | $(am__vpath_adj_setup) $(am__vpath_adj) \ | ||
37 | $(am__tty_colors); \ | ||
38 | srcdir=$(srcdir); export srcdir; \ | ||
39 | am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ | ||
40 | test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ | ||
41 | if test -f "./$$f"; then dir=./; \ | ||
42 | elif test -f "$$f"; then dir=; \ | ||
43 | else dir="$(srcdir)/"; fi; \ | ||
44 | tst=$$dir$$f; log='$@'; \ | ||
45 | if test -n '$(DISABLE_HARD_ERRORS)'; then \ | ||
46 | am__enable_hard_errors=no; \ | ||
47 | else \ | ||
48 | am__enable_hard_errors=yes; \ | ||
49 | fi; \ | ||
50 | $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) | ||
51 | |||
52 | am__set_TESTS_bases = \ | ||
53 | bases='$(TEST_LOGS)'; \ | ||
54 | bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ | ||
55 | bases=`echo $$bases` | ||
56 | |||
57 | RECHECK_LOGS = $(TEST_LOGS) | ||
58 | TEST_SUITE_LOG = test-suite.log | ||
59 | am__test_logs1 = $(TESTS:=.log) | ||
60 | am__test_logs2 = $(am__test_logs1:.log=.log) | ||
61 | TEST_LOGS = $(am__test_logs2:.sh.log=.log) | ||
62 | SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver | ||
63 | SH_LOG_COMPILE = $(SH_LOG_COMPILER) | ||
64 | |||
65 | am__set_b = \ | ||
66 | case '$@' in \ | ||
67 | */*) \ | ||
68 | case '$*' in \ | ||
69 | */*) b='$*';; \ | ||
70 | *) b=`echo '$@' | sed 's/\.log$$//'`; \ | ||
71 | esac;; \ | ||
72 | *) \ | ||
73 | b='$*';; \ | ||
74 | esac | ||
75 | |||
76 | MKDIR_P = /bin/mkdir -p | ||
77 | SHELL = /bin/bash | ||
78 | VERSION = 3.1 | ||
79 | PACKAGE_STRING = GNU parted 3.1 | ||
80 | PACKAGE_BUGREPORT = bug-parted@gnu.org | ||
81 | abs_srcdir = $(PWD) | ||
82 | abs_top_builddir = $(PWD)/.. | ||
83 | abs_top_srcdir = $(PWD)/.. | ||
84 | srcdir = . | ||
85 | top_srcdir = .. | ||
86 | subdir = tests | ||
87 | SH_LOG_COMPILER = $(SHELL) | ||
88 | |||
89 | TESTS = \ | ||
90 | help-version.sh \ | ||
91 | t0000-basic.sh \ | ||
92 | t0001-tiny.sh \ | ||
93 | t0010-script-no-ctrl-chars.sh \ | ||
94 | t0100-print.sh \ | ||
95 | t0101-print-empty.sh \ | ||
96 | t0200-gpt.sh \ | ||
97 | t0201-gpt.sh \ | ||
98 | t0202-gpt-pmbr.sh \ | ||
99 | t0203-gpt-tiny-device-abort.sh \ | ||
100 | t0203-gpt-shortened-device-primary-valid.sh \ | ||
101 | t0205-gpt-list-clobbers-pmbr.sh \ | ||
102 | t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh \ | ||
103 | t0207-IEC-binary-notation.sh \ | ||
104 | t0208-mkpart-end-in-IEC.sh \ | ||
105 | t0209-gpt-pmbr_boot.sh \ | ||
106 | t0210-gpt-resized-partition-entry-array.sh \ | ||
107 | t0211-gpt-rewrite-header.sh \ | ||
108 | t0212-gpt-many-partitions.sh \ | ||
109 | t0220-gpt-msftres.sh \ | ||
110 | t0250-gpt.sh \ | ||
111 | t0280-gpt-corrupt.sh \ | ||
112 | t0300-dos-on-gpt.sh \ | ||
113 | t0400-loop-clobber-infloop.sh \ | ||
114 | t0500-dup-clobber.sh \ | ||
115 | t0501-duplicate.sh \ | ||
116 | t1100-busy-label.sh \ | ||
117 | t1101-busy-partition.sh \ | ||
118 | t1700-probe-fs.sh \ | ||
119 | t2200-dos-label-recog.sh \ | ||
120 | t2201-pc98-label-recog.sh \ | ||
121 | t2300-dos-label-extended-bootcode.sh \ | ||
122 | t2310-dos-extended-2-sector-min-offset.sh \ | ||
123 | t2400-dos-hfs-partition-type.sh \ | ||
124 | t2500-probe-corrupt-hfs.sh \ | ||
125 | t3000-resize-fs.sh \ | ||
126 | t3200-type-change.sh \ | ||
127 | t3300-palo-prep.sh \ | ||
128 | t3310-flags.sh \ | ||
129 | t3400-whole-disk-FAT-partition.sh \ | ||
130 | t4000-sun-raid-type.sh \ | ||
131 | t4001-sun-vtoc.sh \ | ||
132 | t4100-msdos-partition-limits.sh \ | ||
133 | t4100-dvh-partition-limits.sh \ | ||
134 | t4100-msdos-starting-sector.sh \ | ||
135 | t4200-partprobe.sh \ | ||
136 | t4300-nilfs2-tiny.sh \ | ||
137 | t5000-tags.sh \ | ||
138 | t6000-dm.sh \ | ||
139 | t6001-psep.sh \ | ||
140 | t6100-mdraid-partitions.sh \ | ||
141 | t7000-scripting.sh \ | ||
142 | t8000-loop.sh \ | ||
143 | t8001-loop-blkpg.sh \ | ||
144 | t9010-big-sector.sh \ | ||
145 | t9020-alignment.sh \ | ||
146 | t9021-maxima.sh \ | ||
147 | t9022-one-unit-snap.sh \ | ||
148 | t9023-value-lt-one.sh \ | ||
149 | t9030-align-check.sh \ | ||
150 | t9040-many-partitions.sh \ | ||
151 | t9041-undetected-in-use-16th-partition.sh \ | ||
152 | t9042-dos-partition-limit.sh \ | ||
153 | t9050-partition-table-types.sh | ||
154 | |||
155 | TESTS_ENVIRONMENT = \ | ||
156 | export \ | ||
157 | abs_top_builddir='$(abs_top_builddir)' \ | ||
158 | abs_top_srcdir='$(abs_top_srcdir)' \ | ||
159 | abs_srcdir='$(abs_srcdir)' \ | ||
160 | built_programs=parted \ | ||
161 | srcdir='$(srcdir)' \ | ||
162 | top_srcdir='$(top_srcdir)' \ | ||
163 | VERSION=$(VERSION) \ | ||
164 | ; 9>&2 | ||
165 | |||
166 | .SUFFIXES: .log | ||
167 | |||
168 | $(TEST_SUITE_LOG): $(TEST_LOGS) | ||
169 | @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ | ||
170 | ws='[ ]'; \ | ||
171 | results=`for b in $$bases; do echo $$b.trs; done`; \ | ||
172 | test -n "$$results" || results=/dev/null; \ | ||
173 | all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ | ||
174 | pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ | ||
175 | fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ | ||
176 | skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ | ||
177 | xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ | ||
178 | xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ | ||
179 | error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ | ||
180 | if test `expr $$fail + $$xpass + $$error` -eq 0; then \ | ||
181 | success=true; \ | ||
182 | else \ | ||
183 | success=false; \ | ||
184 | fi; \ | ||
185 | br='==================='; br=$$br$$br$$br$$br; \ | ||
186 | result_count () \ | ||
187 | { \ | ||
188 | if test x"$$1" = x"--maybe-color"; then \ | ||
189 | maybe_colorize=yes; \ | ||
190 | elif test x"$$1" = x"--no-color"; then \ | ||
191 | maybe_colorize=no; \ | ||
192 | else \ | ||
193 | echo "$@: invalid 'result_count' usage" >&2; exit 4; \ | ||
194 | fi; \ | ||
195 | shift; \ | ||
196 | desc=$$1 count=$$2; \ | ||
197 | if test $$maybe_colorize = yes && test $$count -gt 0; then \ | ||
198 | color_start=$$3 color_end=$$std; \ | ||
199 | else \ | ||
200 | color_start= color_end=; \ | ||
201 | fi; \ | ||
202 | echo "$${color_start}# $$desc $$count$${color_end}"; \ | ||
203 | }; \ | ||
204 | create_testsuite_report () \ | ||
205 | { \ | ||
206 | result_count $$1 "TOTAL:" $$all "$$brg"; \ | ||
207 | result_count $$1 "PASS: " $$pass "$$grn"; \ | ||
208 | result_count $$1 "SKIP: " $$skip "$$blu"; \ | ||
209 | result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ | ||
210 | result_count $$1 "FAIL: " $$fail "$$red"; \ | ||
211 | result_count $$1 "XPASS:" $$xpass "$$red"; \ | ||
212 | result_count $$1 "ERROR:" $$error "$$mgn"; \ | ||
213 | }; \ | ||
214 | { \ | ||
215 | echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ | ||
216 | $(am__rst_title); \ | ||
217 | create_testsuite_report --no-color; \ | ||
218 | echo; \ | ||
219 | echo ".. contents:: :depth: 2"; \ | ||
220 | echo; \ | ||
221 | for i in $$bases; do \ | ||
222 | if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \ | ||
223 | >/dev/null; then continue; \ | ||
224 | fi; \ | ||
225 | glob_res=`sed -n -e "s/$$ws*$$//" \ | ||
226 | -e "s/^$$ws*:global-test-result:$$ws*//p" \ | ||
227 | $$i.trs`; \ | ||
228 | test -n "$$glob_res" || glob_res=RUN; \ | ||
229 | echo "$$glob_res: $$i" | $(am__rst_section); \ | ||
230 | if test ! -r $$i.log; then \ | ||
231 | echo "fatal: making $@: $$i.log is unreadable" >&2; \ | ||
232 | exit 1; \ | ||
233 | fi; \ | ||
234 | cat $$i.log; echo; \ | ||
235 | done; \ | ||
236 | } >$(TEST_SUITE_LOG).tmp; \ | ||
237 | mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ | ||
238 | if $$success; then \ | ||
239 | col="$$grn"; \ | ||
240 | else \ | ||
241 | col="$$red"; \ | ||
242 | test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ | ||
243 | fi; \ | ||
244 | echo "$${col}$$br$${std}"; \ | ||
245 | echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ | ||
246 | echo "$${col}$$br$${std}"; \ | ||
247 | create_testsuite_report --maybe-color; \ | ||
248 | echo "$$col$$br$$std"; \ | ||
249 | if $$success; then :; else \ | ||
250 | echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ | ||
251 | if test -n "$(PACKAGE_BUGREPORT)"; then \ | ||
252 | echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ | ||
253 | fi; \ | ||
254 | echo "$$col$$br$$std"; \ | ||
255 | fi; \ | ||
256 | $$success || exit 1 | ||
257 | |||
258 | check-TESTS: | ||
259 | @if test $@ != recheck; then \ | ||
260 | list='$(RECHECK_LOGS)'; \ | ||
261 | test -z "$$list" || rm -f $$list; \ | ||
262 | fi | ||
263 | @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) | ||
264 | @ws='[ ]'; \ | ||
265 | log_list='' trs_list=''; $(am__set_TESTS_bases); \ | ||
266 | for i in $$bases; do \ | ||
267 | if test -z "$$log_list"; then \ | ||
268 | log_list="$$i.log"; \ | ||
269 | else \ | ||
270 | log_list="$$log_list $$i.log"; \ | ||
271 | fi; \ | ||
272 | if test -z "$$trs_list"; then \ | ||
273 | trs_list="$$i.trs"; \ | ||
274 | else \ | ||
275 | trs_list="$$trs_list $$i.trs"; \ | ||
276 | fi; \ | ||
277 | done; \ | ||
278 | $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list" | ||
279 | |||
280 | .sh.log: | ||
281 | @p='$<'; \ | ||
282 | $(am__set_b); \ | ||
283 | $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ | ||
284 | --log-file $$b.log --trs-file $$b.trs \ | ||
285 | $(am__common_driver_flags) -- $(SH_LOG_COMPILE) "$$tst" | ||
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch b/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch new file mode 100644 index 0000000000..c4ca06d407 --- /dev/null +++ b/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | |||
2 | From: Gustavo Zacarias | ||
3 | Subject: bug#16929: [PATCH] ui: switch to new-style readline typedef | ||
4 | Date: Mon, 3 Mar 2014 10:40:08 -0300 | ||
5 | |||
6 | The CPPFunction typedef (among others) have been deprecated in favour of | ||
7 | specific prototyped typedefs since readline 4.2 (circa 2001). | ||
8 | It's been working since because compatibility typedefs have been in | ||
9 | place until they where removed in the recent readline 6.3 release. | ||
10 | Switch to the new style to avoid build breakage. | ||
11 | |||
12 | Signed-off-by: Gustavo Zacarias <address@hidden> | ||
13 | |||
14 | Upstream-Status: Backport | ||
15 | |||
16 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
17 | |||
18 | --- | ||
19 | parted/ui.c | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/parted/ui.c b/parted/ui.c | ||
23 | index 786deed..b33f6fc 100644 | ||
24 | --- a/parted/ui.c | ||
25 | +++ b/parted/ui.c | ||
26 | @@ -1470,7 +1470,7 @@ init_readline (void) | ||
27 | #ifdef HAVE_LIBREADLINE | ||
28 | if (!opt_script_mode) { | ||
29 | rl_initialize (); | ||
30 | - rl_attempted_completion_function = (CPPFunction*) complete_function; | ||
31 | + rl_attempted_completion_function = (rl_completion_func_t *) complete_function; | ||
32 | readline_state.in_readline = 0; | ||
33 | } | ||
34 | #endif | ||
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch b/meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch new file mode 100644 index 0000000000..0711d4e297 --- /dev/null +++ b/meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Upstream-Status: Submitted [bug-parted@gnu.org] | ||
2 | |||
3 | | for po in `ls -1 ./*.pt_BR.po 2>/dev/null`; do \ | ||
4 | | make $(basename ${po%.pt_BR.po}); \ | ||
5 | | done | ||
6 | | Makefile:904: *** Recursive variable `mandir' references itself (eventually). Stop. | ||
7 | |||
8 | Signed-off-by: Andreas Oberritter <obi@opendreambox.org> | ||
9 | |||
10 | --- parted-3.1/doc/po4a.mk.orig 2012-03-15 14:09:11.555831872 +0100 | ||
11 | +++ parted-3.1/doc/po4a.mk 2012-03-15 14:10:44.243830985 +0100 | ||
12 | @@ -23,7 +23,7 @@ | ||
13 | # threshold is 80%), it won't be distributed, and the build won't fail. | ||
14 | # | ||
15 | |||
16 | -mandir = $(mandir)/$(lang) | ||
17 | +mandir := $(mandir)/$(lang) | ||
18 | |||
19 | # Inform automake that we want to install some man pages in section 1, 5 | ||
20 | # and 8. | ||
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch b/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch new file mode 100644 index 0000000000..b1eae97988 --- /dev/null +++ b/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
4 | --- | ||
5 | dvh.h | 10 +++++----- | ||
6 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
7 | |||
8 | Index: parted-3.1/libparted/labels/dvh.h | ||
9 | =================================================================== | ||
10 | --- parted-3.1.orig/libparted/labels/dvh.h 2013-02-25 10:46:13.204477586 +0800 | ||
11 | +++ parted-3.1/libparted/labels/dvh.h 2013-02-25 10:47:20.954477065 +0800 | ||
12 | @@ -112,8 +112,8 @@ struct device_parameters { | ||
13 | |||
14 | struct volume_directory { | ||
15 | char vd_name[VDNAMESIZE]; /* name */ | ||
16 | - int vd_lbn; /* logical block number */ | ||
17 | - int vd_nbytes; /* file length in bytes */ | ||
18 | + unsigned int vd_lbn; /* logical block number */ | ||
19 | + unsigned int vd_nbytes; /* file length in bytes */ | ||
20 | }; | ||
21 | |||
22 | /* | ||
23 | @@ -125,9 +125,9 @@ struct volume_directory { | ||
24 | * NOTE: pt_firstlbn SHOULD BE CYLINDER ALIGNED | ||
25 | */ | ||
26 | struct partition_table { /* one per logical partition */ | ||
27 | - int pt_nblks; /* # of logical blks in partition */ | ||
28 | - int pt_firstlbn; /* first lbn of partition */ | ||
29 | - int pt_type; /* use of partition */ | ||
30 | + unsigned int pt_nblks; /* # of logical blks in partition */ | ||
31 | + unsigned int pt_firstlbn; /* first lbn of partition */ | ||
32 | + int pt_type; /* use of partition */ | ||
33 | }; | ||
34 | |||
35 | #define PTYPE_VOLHDR 0 /* partition is volume header */ | ||
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch b/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch new file mode 100644 index 0000000000..a9f26e9781 --- /dev/null +++ b/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | Upstream-Status: Accepted [Expected to be included in parted versions > 3.1] | ||
2 | Upstream-URL: http://git.savannah.gnu.org/cgit/gnulib.git/patch/?id=cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9 | ||
3 | |||
4 | From cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9 Mon Sep 17 00:00:00 2001 | ||
5 | From: Andreas Oberritter <obi@opendreambox.org> | ||
6 | Date: Sun, 18 Mar 2012 17:39:14 +0000 | ||
7 | Subject: git-version-gen: don't let "prefix" envvar cause trouble | ||
8 | |||
9 | * build-aux/git-version-gen (prefix): Initialize properly, | ||
10 | so as not to use a value specified via the environment. | ||
11 | Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810 | ||
12 | --- | ||
13 | diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen | ||
14 | index d5542a2..0fa9063 100755 | ||
15 | --- a/build-aux/git-version-gen | ||
16 | +++ b/build-aux/git-version-gen | ||
17 | @@ -1,6 +1,6 @@ | ||
18 | #!/bin/sh | ||
19 | # Print a version string. | ||
20 | -scriptversion=2012-01-06.07; # UTC | ||
21 | +scriptversion=2012-03-18.17; # UTC | ||
22 | |||
23 | # Copyright (C) 2007-2012 Free Software Foundation, Inc. | ||
24 | # | ||
25 | @@ -92,6 +92,8 @@ Options: | ||
26 | |||
27 | Running without arguments will suffice in most cases." | ||
28 | |||
29 | +prefix=v | ||
30 | + | ||
31 | while test $# -gt 0; do | ||
32 | case $1 in | ||
33 | --help) echo "$usage"; exit 0;; | ||
34 | @@ -120,7 +122,6 @@ if test -z "$tarball_version_file"; then | ||
35 | fi | ||
36 | |||
37 | tag_sed_script="${tag_sed_script:-s/x/x/}" | ||
38 | -prefix="${prefix:-v}" | ||
39 | |||
40 | nl=' | ||
41 | ' | ||
42 | -- | ||
43 | cgit v0.9.0.2 | ||
diff --git a/meta/recipes-extended/parted/parted-3.1/no_check.patch b/meta/recipes-extended/parted/parted-3.1/no_check.patch new file mode 100644 index 0000000000..58d8db4426 --- /dev/null +++ b/meta/recipes-extended/parted/parted-3.1/no_check.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | If check is detected, it makes the builds non-determinstic so just force | ||
4 | it to be disabled. | ||
5 | |||
6 | RP - 4/11/08 | ||
7 | |||
8 | Index: parted-1.9.0/configure.ac | ||
9 | =================================================================== | ||
10 | --- parted-1.9.0.orig/configure.ac 2009-07-23 18:52:08.000000000 +0100 | ||
11 | +++ parted-1.9.0/configure.ac 2010-02-02 14:13:56.013905093 +0000 | ||
12 | @@ -477,7 +477,7 @@ | ||
13 | AM_CONDITIONAL([BUILD_LINUX], [test "$OS" = linux]) | ||
14 | |||
15 | dnl check for "check", unit testing library/header | ||
16 | -PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no) | ||
17 | +have_check=no | ||
18 | if test "$have_check" != "yes"; then | ||
19 | AC_MSG_RESULT([Unable to locate check version 0.9.3 or higher: not building]) | ||
20 | fi | ||
diff --git a/meta/recipes-extended/parted/parted-3.1/run-ptest b/meta/recipes-extended/parted/parted-3.1/run-ptest new file mode 100644 index 0000000000..695c5e8a7b --- /dev/null +++ b/meta/recipes-extended/parted/parted-3.1/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | make -C tests check-TESTS | ||
diff --git a/meta/recipes-extended/parted/parted-3.1/syscalls.patch b/meta/recipes-extended/parted/parted-3.1/syscalls.patch new file mode 100644 index 0000000000..e9bbe9a956 --- /dev/null +++ b/meta/recipes-extended/parted/parted-3.1/syscalls.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | --- | ||
4 | libparted/arch/linux.c | 13 +++++++++++++ | ||
5 | 1 file changed, 13 insertions(+) | ||
6 | |||
7 | Index: parted-1.9.0/libparted/arch/linux.c | ||
8 | =================================================================== | ||
9 | --- parted-1.9.0.orig/libparted/arch/linux.c 2009-07-23 18:52:08.000000000 +0100 | ||
10 | +++ parted-1.9.0/libparted/arch/linux.c 2010-02-02 14:14:16.523904768 +0000 | ||
11 | @@ -17,6 +17,8 @@ | ||
12 | |||
13 | #define PROC_DEVICES_BUFSIZ 16384 | ||
14 | |||
15 | +#include <linux/version.h> | ||
16 | + | ||
17 | #include <config.h> | ||
18 | #include <arch/linux.h> | ||
19 | |||
20 | @@ -1477,12 +1479,14 @@ | ||
21 | |||
22 | #if SIZEOF_OFF_T < 8 | ||
23 | |||
24 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) | ||
25 | static _syscall5(int,_llseek, | ||
26 | unsigned int, fd, | ||
27 | unsigned long, offset_high, | ||
28 | unsigned long, offset_low, | ||
29 | loff_t*, result, | ||
30 | unsigned int, origin) | ||
31 | +#endif | ||
32 | |||
33 | loff_t | ||
34 | llseek (unsigned int fd, loff_t offset, unsigned int whence) | ||
35 | @@ -1490,11 +1494,20 @@ | ||
36 | loff_t result; | ||
37 | int retval; | ||
38 | |||
39 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) | ||
40 | retval = _llseek(fd, | ||
41 | ((unsigned long long)offset) >> 32, | ||
42 | ((unsigned long long)offset) & 0xffffffff, | ||
43 | &result, | ||
44 | whence); | ||
45 | +#else | ||
46 | + retval = syscall(__NR__llseek, fd, | ||
47 | + ((unsigned long long)offset) >> 32, | ||
48 | + ((unsigned long long)offset) & 0xffffffff, | ||
49 | + &result, | ||
50 | + whence); | ||
51 | +#endif | ||
52 | + | ||
53 | return (retval==-1 ? (loff_t) retval : result); | ||
54 | } | ||
55 | |||
diff --git a/meta/recipes-extended/parted/parted_3.1.bb b/meta/recipes-extended/parted/parted_3.1.bb new file mode 100644 index 0000000000..3f36f9f79e --- /dev/null +++ b/meta/recipes-extended/parted/parted_3.1.bb | |||
@@ -0,0 +1,45 @@ | |||
1 | SUMMARY = "Disk partition editing/resizing utility" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/parted/parted.html" | ||
3 | LICENSE = "GPLv3+" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c" | ||
5 | SECTION = "console/tools" | ||
6 | DEPENDS = "ncurses readline util-linux" | ||
7 | PR = "r1" | ||
8 | |||
9 | SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ | ||
10 | file://no_check.patch \ | ||
11 | file://syscalls.patch \ | ||
12 | file://fix-git-version-gen.patch \ | ||
13 | file://fix-doc-mandir.patch \ | ||
14 | file://fix-dvh-overflows.patch \ | ||
15 | file://fix-deprecated-readline.patch \ | ||
16 | file://run-ptest \ | ||
17 | file://Makefile \ | ||
18 | " | ||
19 | |||
20 | SRC_URI[md5sum] = "5d89d64d94bcfefa9ce8f59f4b81bdcb" | ||
21 | SRC_URI[sha256sum] = "5e9cc1f91eaf016e5033d85b9b893fd6d3ffaca532a48de1082df9b94225ca15" | ||
22 | |||
23 | EXTRA_OECONF = "--disable-device-mapper" | ||
24 | |||
25 | inherit autotools pkgconfig gettext texinfo ptest | ||
26 | |||
27 | BBCLASSEXTEND = "native" | ||
28 | |||
29 | do_compile_ptest() { | ||
30 | oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize | ||
31 | } | ||
32 | |||
33 | do_install_ptest() { | ||
34 | t=${D}${PTEST_PATH} | ||
35 | mkdir $t/build-aux | ||
36 | cp ${S}/build-aux/test-driver $t/build-aux/ | ||
37 | cp -r ${S}/tests $t | ||
38 | cp ${WORKDIR}/Makefile $t/tests/ | ||
39 | for i in print-align print-max dup-clobber duplicate fs-resize; \ | ||
40 | do cp ${B}/tests/.libs/$i $t/tests/; \ | ||
41 | done | ||
42 | sed -e 's| ../parted||' -i $t/tests/*.sh | ||
43 | } | ||
44 | |||
45 | RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python" | ||
diff --git a/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch b/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch new file mode 100644 index 0000000000..88779c3bbd --- /dev/null +++ b/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | This patch fixes this compiler error with gcc 4.6.0 | ||
4 | |||
5 | Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/08 | ||
6 | |||
7 | | fts.c: In function 'pax_fts_set': | ||
8 | | fts.c:469:7: error: parameter 'sp' set but not used [-Werror=unused-but-set-parameter] | ||
9 | | cc1: all warnings being treated as errors | ||
10 | | | ||
11 | | make[2]: *** [fts.o] Error 1 | ||
12 | |||
13 | Index: pax-3.4/lib/fts.c | ||
14 | =================================================================== | ||
15 | --- pax-3.4.orig/lib/fts.c | ||
16 | +++ pax-3.4/lib/fts.c | ||
17 | @@ -466,7 +466,7 @@ name: t = sp->fts_path + NAPPEND(p->fts | ||
18 | /* ARGSUSED */ | ||
19 | int | ||
20 | fts_set(sp, p, instr) | ||
21 | - FTS *sp; | ||
22 | + FTS __attribute__((__unused__)) *sp; | ||
23 | FTSENT *p; | ||
24 | int instr; | ||
25 | { | ||
diff --git a/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch new file mode 100644 index 0000000000..80878f38b2 --- /dev/null +++ b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch | |||
@@ -0,0 +1,185 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Author: H.J. Lu <hjl.tools@gmail.com> | ||
4 | Date: Tue Dec 6 10:34:53 2011 -0800 | ||
5 | |||
6 | Fix pax-3.4 build for x32 | ||
7 | |||
8 | off_t is 8byte for x32. We need to check both _FILE_OFFSET_BITS and | ||
9 | size of off_t to see if file offset is 64bit. This patch adds | ||
10 | AC_CHECK_SIZEOF(off_t) and checks SIZEOF_OFF_T == 8. | ||
11 | |||
12 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06 | ||
13 | |||
14 | Index: pax-3.4/configure.in | ||
15 | =================================================================== | ||
16 | --- pax-3.4.orig/configure.in | ||
17 | +++ pax-3.4/configure.in | ||
18 | @@ -33,4 +33,7 @@ dnl Checks for header files. | ||
19 | dnl Checks for typedefs, structures, and compiler characteristics. | ||
20 | AC_C_CONST | ||
21 | |||
22 | +AC_CHECK_SIZEOF(off_t) | ||
23 | +AC_CHECK_SIZEOF(long) | ||
24 | + | ||
25 | AC_OUTPUT([Makefile lib/Makefile src/Makefile]) | ||
26 | Index: pax-3.4/src/ar_io.c | ||
27 | =================================================================== | ||
28 | --- pax-3.4.orig/src/ar_io.c | ||
29 | +++ pax-3.4/src/ar_io.c | ||
30 | @@ -378,7 +378,8 @@ ar_close(void) | ||
31 | * could have written anything yet. | ||
32 | */ | ||
33 | if (frmt == NULL) { | ||
34 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
35 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
36 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
37 | (void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n", | ||
38 | #else | ||
39 | (void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n", | ||
40 | @@ -391,7 +392,8 @@ ar_close(void) | ||
41 | |||
42 | if (strcmp(NM_CPIO, argv0) == 0) | ||
43 | (void)fprintf(listf, | ||
44 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
45 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
46 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
47 | "%qu blocks\n", | ||
48 | #else | ||
49 | "%lu blocks\n", | ||
50 | @@ -399,7 +401,8 @@ ar_close(void) | ||
51 | (rdcnt ? rdcnt : wrcnt) / 5120); | ||
52 | else if (strcmp(NM_TAR, argv0) != 0) | ||
53 | (void)fprintf(listf, | ||
54 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
55 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
56 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
57 | "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n", | ||
58 | #else | ||
59 | "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n", | ||
60 | Index: pax-3.4/src/cpio.c | ||
61 | =================================================================== | ||
62 | --- pax-3.4.orig/src/cpio.c | ||
63 | +++ pax-3.4/src/cpio.c | ||
64 | @@ -218,7 +218,8 @@ rd_ln_nm (ARCHD *arcn) | ||
65 | */ | ||
66 | if ((arcn->sb.st_size == 0) || | ||
67 | (arcn->sb.st_size >= (off_t) sizeof(arcn->ln_name))) { | ||
68 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
69 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
70 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
71 | paxwarn (1, "Cpio link name length is invalid: %qu", | ||
72 | arcn->sb.st_size); | ||
73 | #else | ||
74 | Index: pax-3.4/src/gen_subs.c | ||
75 | =================================================================== | ||
76 | --- pax-3.4.orig/src/gen_subs.c | ||
77 | +++ pax-3.4/src/gen_subs.c | ||
78 | @@ -133,7 +133,8 @@ ls_list (ARCHD *arcn, time_t now, FILE * | ||
79 | * print device id's for devices, or sizes for other nodes | ||
80 | */ | ||
81 | if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK)) | ||
82 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
83 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
84 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
85 | (void) fprintf (fp, "%4lu,%4lu ", (unsigned long) MAJOR (sbp->st_rdev), | ||
86 | (unsigned long) MINOR (sbp->st_rdev)); | ||
87 | #else | ||
88 | @@ -142,7 +143,8 @@ ls_list (ARCHD *arcn, time_t now, FILE * | ||
89 | #endif | ||
90 | else | ||
91 | { | ||
92 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
93 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
94 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
95 | (void) fprintf (fp, "%9qu ", sbp->st_size); | ||
96 | #else | ||
97 | (void) fprintf (fp, "%9lu ", sbp->st_size); | ||
98 | @@ -334,7 +336,8 @@ ul_asc (u_long val, char *str, int len, | ||
99 | return (0); | ||
100 | } | ||
101 | |||
102 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
103 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
104 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
105 | /* | ||
106 | * asc_uqd() | ||
107 | * convert hex/octal character string into a u_quad_t. We do not have to | ||
108 | Index: pax-3.4/src/options.c | ||
109 | =================================================================== | ||
110 | --- pax-3.4.orig/src/options.c | ||
111 | +++ pax-3.4/src/options.c | ||
112 | @@ -1545,7 +1545,8 @@ str_offt (char *val) | ||
113 | char *expr; | ||
114 | off_t num, t; | ||
115 | |||
116 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
117 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
118 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
119 | num = strtoq (val, &expr, 0); | ||
120 | if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val)) | ||
121 | #else | ||
122 | Index: pax-3.4/src/tar.c | ||
123 | =================================================================== | ||
124 | --- pax-3.4.orig/src/tar.c | ||
125 | +++ pax-3.4/src/tar.c | ||
126 | @@ -58,7 +58,8 @@ | ||
127 | static unsigned long tar_chksm (char *, int); | ||
128 | static char *name_split (char *, int); | ||
129 | static int ul_oct (u_long, char *, int, int); | ||
130 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
131 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
132 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
133 | static int uqd_oct (u_quad_t, char *, int, int); | ||
134 | #endif | ||
135 | |||
136 | @@ -196,7 +197,8 @@ ul_oct (u_long val, register char *str, | ||
137 | return (0); | ||
138 | } | ||
139 | |||
140 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
141 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
142 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
143 | /* | ||
144 | * uqd_oct() | ||
145 | * convert an u_quad_t to an octal string. one of many oddball field | ||
146 | @@ -427,7 +429,8 @@ tar_rd (ARCHD *arcn, char *buf) | ||
147 | 0xfff); | ||
148 | arcn->sb.st_uid = (uid_t) asc_ul (hd->uid, sizeof (hd->uid), OCT); | ||
149 | arcn->sb.st_gid = (gid_t) asc_ul (hd->gid, sizeof (hd->gid), OCT); | ||
150 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
151 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
152 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
153 | arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT); | ||
154 | #else | ||
155 | arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT); | ||
156 | @@ -659,7 +662,8 @@ tar_wr (register ARCHD * arcn) | ||
157 | * data follows this file, so set the pad | ||
158 | */ | ||
159 | hd->linkflag = AREGTYPE; | ||
160 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
161 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
162 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
163 | if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size, | ||
164 | sizeof (hd->size), 1)) | ||
165 | #else | ||
166 | @@ -834,7 +838,8 @@ ustar_rd (ARCHD *arcn, char *buf) | ||
167 | */ | ||
168 | arcn->sb.st_mode = (mode_t) (asc_ul (hd->mode, sizeof (hd->mode), OCT) & | ||
169 | 0xfff); | ||
170 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
171 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
172 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
173 | arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT); | ||
174 | #else | ||
175 | arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT); | ||
176 | @@ -1081,7 +1086,8 @@ ustar_wr (register ARCHD * arcn) | ||
177 | else | ||
178 | hd->typeflag = REGTYPE; | ||
179 | arcn->pad = TAR_PAD (arcn->sb.st_size); | ||
180 | -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 | ||
181 | +#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ | ||
182 | + || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) | ||
183 | if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size, | ||
184 | sizeof (hd->size), 3)) | ||
185 | { | ||
diff --git a/meta/recipes-extended/pax/pax_3.4.bb b/meta/recipes-extended/pax/pax_3.4.bb new file mode 100644 index 0000000000..0c10688feb --- /dev/null +++ b/meta/recipes-extended/pax/pax_3.4.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | SUMMARY = "Portable Archive eXchange" | ||
2 | DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool" | ||
3 | HOMEPAGE = "http://www.openbsd.org/cgi-bin/cvsweb/src/bin/pax/" | ||
4 | BUGTRACKER = "http://www.openbsd.org/query-pr.html" | ||
5 | |||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \ | ||
8 | file://src/pax.h;endline=40;md5=309d3e241c1d82069228e5a51e9b8d60 \ | ||
9 | file://src/cpio.h;endline=40;md5=c3b4bbff6133a83387968617bbae8ac4 \ | ||
10 | file://lib/vis.h;endline=40;md5=b283f759abd4a5ad7e014b80f51fc053" | ||
11 | |||
12 | SECTION = "base" | ||
13 | PR = "r2" | ||
14 | |||
15 | SRC_URI = "ftp://ftp.suse.com/pub/people/kukuk/pax/pax-${PV}.tar.bz2 \ | ||
16 | file://fix_for_compile_with_gcc-4.6.0.patch \ | ||
17 | file://pax-3.4_fix_for_x32.patch" | ||
18 | |||
19 | SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6" | ||
20 | SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b" | ||
21 | |||
22 | inherit autotools | ||
diff --git a/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb new file mode 100644 index 0000000000..ebe042238f --- /dev/null +++ b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | SUMMARY = "Convert::ASN1 - Perl ASN.1 Encode/Decode library" | ||
2 | SECTION = "libs" | ||
3 | LICENSE = "Artistic-1.0 | GPL-1.0+" | ||
4 | LIC_FILES_CHKSUM = "file://README.md;beginline=91;endline=97;md5=ceff7fd286eb6d8e8e0d3d23e096a63f" | ||
5 | |||
6 | SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Convert-ASN1-${PV}.tar.gz" | ||
7 | |||
8 | SRC_URI[md5sum] = "68723e96be0b258a9e20480276e8a62c" | ||
9 | SRC_URI[sha256sum] = "74a4a78ae0c5e973100ac0a8f203a110f76fb047b79dae4fc1fd7d6814d3d58a" | ||
10 | |||
11 | S = "${WORKDIR}/Convert-ASN1-${PV}" | ||
12 | |||
13 | inherit cpan | ||
14 | |||
15 | EXTRA_PERLFLAGS = "-I ${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_version(d)}" | ||
16 | |||
17 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/perl/libtimedate-perl_2.30.bb b/meta/recipes-extended/perl/libtimedate-perl_2.30.bb new file mode 100644 index 0000000000..c8fcde45f4 --- /dev/null +++ b/meta/recipes-extended/perl/libtimedate-perl_2.30.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | SUMMARY = "Perl modules useful for manipulating date and time information" | ||
2 | SECTION = "libs" | ||
3 | # You can redistribute it and/or modify it under the same terms as Perl itself. | ||
4 | LICENSE = "Artistic-1.0 | GPL-1.0+" | ||
5 | LIC_FILES_CHKSUM = "file://README;beginline=21;md5=576b7cb41e5e821501a01ed66f0f9d9e" | ||
6 | |||
7 | SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/TimeDate-${PV}.tar.gz" | ||
8 | |||
9 | S = "${WORKDIR}/TimeDate-${PV}" | ||
10 | |||
11 | inherit cpan | ||
12 | |||
13 | BBCLASSEXTEND = "native" | ||
14 | |||
15 | RDEPENDS_${PN}_class-native = "" | ||
16 | RDEPENDS_${PN} += "perl-module-carp perl-module-exporter perl-module-strict perl-module-time-local" | ||
17 | |||
18 | SRC_URI[md5sum] = "b1d91153ac971347aee84292ed886c1c" | ||
19 | SRC_URI[sha256sum] = "75bd254871cb5853a6aa0403ac0be270cdd75c9d1b6639f18ecba63c15298e86" | ||
diff --git a/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb new file mode 100644 index 0000000000..9a9e71011e --- /dev/null +++ b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | SUMMARY = "Perl module for supporting simple generic namespaces" | ||
2 | DESCRIPTION = "XML::NamespaceSupport offers a simple way to process namespace-based XML names. \ | ||
3 | It also helps maintain a prefix-to-namespace URI map, and provides a number of \ | ||
4 | basic checks. " | ||
5 | |||
6 | SECTION = "libs" | ||
7 | LICENSE = "Artistic-1.0 | GPL-1.0+" | ||
8 | PR = "r3" | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://META.yml;beginline=22;endline=22;md5=3b2b564dae8b9af9e8896e85c07dcbe5" | ||
11 | |||
12 | SRC_URI = "http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-${PV}.tar.gz" | ||
13 | SRC_URI[md5sum] = "222cca76161cd956d724286d36b607da" | ||
14 | SRC_URI[sha256sum] = "6d8151f0a3f102313d76b64bfd1c2d9ed46bfe63a16f038e7d860fda287b74ea" | ||
15 | |||
16 | |||
17 | S = "${WORKDIR}/XML-NamespaceSupport-${PV}" | ||
18 | |||
19 | inherit cpan | ||
20 | |||
21 | BBCLASSEXTEND="native" | ||
22 | |||
diff --git a/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb b/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb new file mode 100644 index 0000000000..14a337057e --- /dev/null +++ b/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | SUMMARY = "Base class SAX Drivers and Filters" | ||
2 | DESCRIPTION = "This module has a very simple task - to be a base class for \ | ||
3 | PerlSAX drivers and filters. It's default behaviour is to pass \ | ||
4 | the input directly to the output unchanged. It can be useful to \ | ||
5 | use this module as a base class so you don't have to, for example, \ | ||
6 | implement the characters() callback." | ||
7 | |||
8 | SECTION = "libs" | ||
9 | LICENSE = "Artistic-1.0 | GPL-1.0+" | ||
10 | RDEPENDS_${PN} += "perl-module-extutils-makemaker" | ||
11 | |||
12 | LIC_FILES_CHKSUM = "file://dist.ini;endline=5;md5=8f9c9a55340aefaee6e9704c88466446" | ||
13 | |||
14 | SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-Base-${PV}.tar.gz" | ||
15 | |||
16 | SRC_URI[md5sum] = "38c8c3247dfd080712596118d70dbe32" | ||
17 | SRC_URI[sha256sum] = "666270318b15f88b8427e585198abbc19bc2e6ccb36dc4c0a4f2d9807330219e" | ||
18 | |||
19 | S = "${WORKDIR}/XML-SAX-Base-${PV}" | ||
20 | |||
21 | inherit cpan | ||
22 | |||
23 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb b/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb new file mode 100644 index 0000000000..45d396639b --- /dev/null +++ b/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "Perl module for using and building Perl SAX2 XML processors" | ||
2 | DESCRIPTION = "XML::SAX consists of several framework classes for using and \ | ||
3 | building Perl SAX2 XML parsers, filters, and drivers. It is designed \ | ||
4 | around the need to be able to "plug in" different SAX parsers to an \ | ||
5 | application without requiring programmer intervention. Those of you \ | ||
6 | familiar with the DBI will be right at home. Some of the designs \ | ||
7 | come from the Java JAXP specification (SAX part), only without the \ | ||
8 | javaness." | ||
9 | |||
10 | SECTION = "libs" | ||
11 | LICENSE = "Artistic-1.0 | GPL-1.0+" | ||
12 | DEPENDS += "libxml-namespacesupport-perl-native" | ||
13 | RDEPENDS_${PN} += "libxml-namespacesupport-perl libxml-sax-base-perl perl-module-file-temp" | ||
14 | PR = "r2" | ||
15 | |||
16 | LIC_FILES_CHKSUM = "file://LICENSE;md5=65c4cd8f39c24c7135ed70dacbcb09e3" | ||
17 | |||
18 | SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-${PV}.tar.gz" | ||
19 | |||
20 | SRC_URI[md5sum] = "290f5375ae87fdebfdb5bc3854019f24" | ||
21 | SRC_URI[sha256sum] = "32b04b8e36b6cc4cfc486de2d859d87af5386dd930f2383c49347050d6f5ad84" | ||
22 | |||
23 | S = "${WORKDIR}/XML-SAX-${PV}" | ||
24 | |||
25 | inherit cpan | ||
26 | |||
27 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz.inc new file mode 100644 index 0000000000..355fb2a4ec --- /dev/null +++ b/meta/recipes-extended/pigz/pigz.inc | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "A parallel implementation of gzip" | ||
2 | DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \ | ||
3 | fully functional replacement for gzip that exploits multiple processors and \ | ||
4 | multiple cores to the hilt when compressing data. pigz was written by Mark \ | ||
5 | Adler, and uses the zlib and pthread libraries." | ||
6 | HOMEPAGE = "http://zlib.net/pigz/" | ||
7 | SECTION = "console/utils" | ||
8 | LICENSE = "Zlib" | ||
9 | |||
10 | SRC_URI = "http://zlib.net/pigz/pigz-${PV}.tar.gz" | ||
11 | |||
12 | PROVIDES_class-native += "gzip-native" | ||
13 | |||
14 | DEPENDS = "zlib" | ||
15 | |||
16 | do_install () { | ||
17 | if [ "${CLASSOVERRIDE}" = "class-target" ] ; then | ||
18 | # Install files into /bin (FHS), which is typical place for gzip | ||
19 | install -d ${D}${base_bindir} | ||
20 | install ${B}/pigz ${D}${base_bindir}/gzip | ||
21 | install ${B}/unpigz ${D}${base_bindir}/gunzip | ||
22 | else | ||
23 | install -d ${D}${bindir} | ||
24 | install ${B}/pigz ${D}${bindir}/gzip | ||
25 | install ${B}/unpigz ${D}${bindir}/gunzip | ||
26 | fi | ||
27 | } | ||
28 | |||
29 | ALTERNATIVE_${PN} = "gzip gunzip" | ||
30 | ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" | ||
31 | ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" | ||
32 | ALTERNATIVE_PRIORITY = "80" | ||
diff --git a/meta/recipes-extended/pigz/pigz_2.3.1.bb b/meta/recipes-extended/pigz/pigz_2.3.1.bb new file mode 100644 index 0000000000..cd5508d63e --- /dev/null +++ b/meta/recipes-extended/pigz/pigz_2.3.1.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require pigz.inc | ||
2 | LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95" | ||
3 | |||
4 | SRC_URI[md5sum] = "e803f8bc0770c7a5e96dccb1d2dd2aab" | ||
5 | SRC_URI[sha256sum] = "629b0ce5422a3978f31742bf8275d0be2f84987140d18f390f1e3b4e46e0af54" | ||
6 | |||
7 | NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" | ||
8 | |||
9 | BBCLASSEXTEND = "native nativesdk" | ||
10 | |||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch b/meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch new file mode 100644 index 0000000000..71dc3f07e4 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 6f2fd55ef7621fd7ab7897aee2c2651b6faf9e6a Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Barker <paul@paulbarker.me.uk> | ||
3 | Date: Wed, 20 Aug 2014 11:56:11 +0200 | ||
4 | Subject: [PATCH] Fix musl build failure | ||
5 | |||
6 | Include <limits.h> for PATH_MAX. | ||
7 | |||
8 | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> | ||
9 | |||
10 | Upstream-status: Pending | ||
11 | --- | ||
12 | proc/readproc.c | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/proc/readproc.c b/proc/readproc.c | ||
16 | index 4fad11d..c5b1869 100644 | ||
17 | --- a/proc/readproc.c | ||
18 | +++ b/proc/readproc.c | ||
19 | @@ -26,6 +26,7 @@ | ||
20 | #include <sys/dir.h> | ||
21 | #include <sys/types.h> | ||
22 | #include <sys/stat.h> | ||
23 | +#include <limits.h> | ||
24 | |||
25 | // sometimes it's easier to do this manually, w/o gcc helping | ||
26 | #ifdef PROF | ||
27 | -- | ||
28 | 1.9.1 | ||
29 | |||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch b/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch new file mode 100644 index 0000000000..203ccb3347 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | ## 60_linux_init.dpatch by <david.sugar@canonical.com> | ||
2 | ## | ||
3 | ## All lines beginning with `## DP:' are a description of the patch. | ||
4 | ## DP: Fix Linux version detection which relied on elf loader side-effect. | ||
5 | ## DP: This patch also depends on 40_gnu-kbsd-version, which modified | ||
6 | ## DP: init_Linux_version(). | ||
7 | |||
8 | @DPATCH@ | ||
9 | |||
10 | Upstream-Status: inappropriate [upstream unmaintained] | ||
11 | --- | ||
12 | proc/sysinfo.c | 1 + | ||
13 | proc/version.c | 5 +++-- | ||
14 | proc/version.h | 1 + | ||
15 | 3 files changed, 5 insertions(+), 2 deletions(-) | ||
16 | |||
17 | Index: procps-3.2.8/proc/sysinfo.c | ||
18 | =================================================================== | ||
19 | --- procps-3.2.8.orig/proc/sysinfo.c | ||
20 | +++ procps-3.2.8/proc/sysinfo.c | ||
21 | @@ -212,6 +212,7 @@ static int check_for_privs(void){ | ||
22 | static void init_libproc(void) __attribute__((constructor)); | ||
23 | static void init_libproc(void){ | ||
24 | have_privs = check_for_privs(); | ||
25 | + init_Linux_version(); // make sure we have version before continuing... | ||
26 | // ought to count CPUs in /proc/stat instead of relying | ||
27 | // on glibc, which foolishly tries to parse /proc/cpuinfo | ||
28 | // | ||
29 | Index: procps-3.2.8/proc/version.c | ||
30 | =================================================================== | ||
31 | --- procps-3.2.8.orig/proc/version.c | ||
32 | +++ procps-3.2.8/proc/version.c | ||
33 | @@ -33,8 +33,7 @@ void display_version(void) { | ||
34 | |||
35 | int linux_version_code; | ||
36 | |||
37 | -static void init_Linux_version(void) __attribute__((constructor)); | ||
38 | -static void init_Linux_version(void) { | ||
39 | +void init_Linux_version(void) { | ||
40 | int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */ | ||
41 | FILE *fp; | ||
42 | char buf[256]; | ||
43 | Index: procps-3.2.8/proc/version.h | ||
44 | =================================================================== | ||
45 | --- procps-3.2.8.orig/proc/version.h | ||
46 | +++ procps-3.2.8/proc/version.h | ||
47 | @@ -14,6 +14,7 @@ | ||
48 | |||
49 | EXTERN_C_BEGIN | ||
50 | |||
51 | +extern void init_Linux_version(void); /* initialize linux version */ | ||
52 | extern void display_version(void); /* display suite version */ | ||
53 | extern const char procps_version[]; /* global buf for suite version */ | ||
54 | |||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch b/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch new file mode 100644 index 0000000000..1523c3dfb2 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | Do not try to detect 64bit/32bit system | ||
2 | we already feed that information via compiler | ||
3 | defaults | ||
4 | |||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | Upstream-Status: Inappropriate [OE specific] | ||
7 | Index: procps-3.2.8/Makefile | ||
8 | =================================================================== | ||
9 | --- procps-3.2.8.orig/Makefile 2014-05-03 01:00:01.707387583 -0700 | ||
10 | +++ procps-3.2.8/Makefile 2014-05-03 08:53:08.087175369 -0700 | ||
11 | @@ -118,15 +118,6 @@ | ||
12 | # until you go looking for a 64-bit curses library. | ||
13 | check_gcc = $(shell if $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) dummy.c $(ALL_LDFLAGS) $(1) -o /dev/null $(CURSES) > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) | ||
14 | |||
15 | -# Be 64-bit if at all possible. In a cross-compiling situation, one may | ||
16 | -# do "make m64=-m32 lib64=lib" to produce 32-bit executables. DO NOT | ||
17 | -# attempt to use a 32-bit executable on a 64-bit kernel. Packagers MUST | ||
18 | -# produce separate executables for ppc and ppc64, s390 and s390x, | ||
19 | -# i386 and x86-64, mips and mips64, sparc and sparc64, and so on. | ||
20 | -# Failure to do so will cause data corruption. | ||
21 | -m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,)) | ||
22 | -ALL_CFLAGS += $(m64) | ||
23 | - | ||
24 | ALL_CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,) | ||
25 | ALL_CFLAGS += $(call check_gcc,-Wpadded,) | ||
26 | ALL_CFLAGS += $(call check_gcc,-Wstrict-aliasing,) | ||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch b/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch new file mode 100644 index 0000000000..2582857e25 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | Upstream-Status: Inappropriate [not author, no upstream] | ||
2 | |||
3 | Imported from Debian. | ||
4 | Source: http://anonscm.debian.org/gitweb/?p=collab-maint/procps.git;a=blob;f=debian/patches/gnu-kbsd-version.patch;h=fe5489fc772a3355ff8c0dcf9b953bf0c05aa9f8;hb=b460cfd726b019f8d918b380f78af4c19c5f3e50 | ||
5 | Bugtracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632749 | ||
6 | |||
7 | Stops procps utilities from printing a warning when used with | ||
8 | kernels having only two digit versions, e.g. 3.0. | ||
9 | |||
10 | Author: <csmall@debian.org> | ||
11 | Description: Rework version parsing so its ok with other OSes | ||
12 | --- a/proc/version.c | ||
13 | +++ b/proc/version.c | ||
14 | @@ -35,15 +35,23 @@ | ||
15 | |||
16 | static void init_Linux_version(void) __attribute__((constructor)); | ||
17 | static void init_Linux_version(void) { | ||
18 | - static struct utsname uts; | ||
19 | - int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ | ||
20 | + int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */ | ||
21 | + FILE *fp; | ||
22 | + char buf[256]; | ||
23 | |||
24 | - if (uname(&uts) == -1) /* failure implies impending death */ | ||
25 | - exit(1); | ||
26 | - if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3) | ||
27 | + if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */ | ||
28 | + exit(1); | ||
29 | + if (fgets(buf, 256, fp) == NULL) { | ||
30 | + fprintf(stderr, "Cannot read kernel version from /proc/version\n"); | ||
31 | + fclose(fp); | ||
32 | + exit(1); | ||
33 | + } | ||
34 | + fclose(fp); | ||
35 | + if (sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z) < 2) | ||
36 | fprintf(stderr, /* *very* unlikely to happen by accident */ | ||
37 | "Non-standard uts for running kernel:\n" | ||
38 | - "release %s=%d.%d.%d gives version code %d\n", | ||
39 | - uts.release, x, y, z, LINUX_VERSION(x,y,z)); | ||
40 | + "release %s=%d.%d.%d gives version code %d\n", | ||
41 | + buf, | ||
42 | + x, y, z, LINUX_VERSION(x,y,z)); | ||
43 | linux_version_code = LINUX_VERSION(x, y, z); | ||
44 | } | ||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/install.patch b/meta/recipes-extended/procps/procps-3.2.8/install.patch new file mode 100644 index 0000000000..2a59a5ff68 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/install.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | diff -ruN procps-3.2.8-orig//Makefile procps-3.2.8/Makefile | ||
4 | --- procps-3.2.8-orig//Makefile 2011-08-23 22:06:46.471163999 +0800 | ||
5 | +++ procps-3.2.8/Makefile 2011-08-23 22:15:01.091163999 +0800 | ||
6 | @@ -29,9 +29,6 @@ | ||
7 | ln_sf := ln -sf | ||
8 | install := install -D --owner 0 --group 0 | ||
9 | |||
10 | -# Lame x86-64 /lib64 and /usr/lib64 abomination: | ||
11 | -lib64 := lib$(shell [ -d /lib64 ] && echo 64) | ||
12 | - | ||
13 | usr/bin := $(DESTDIR)/usr/bin/ | ||
14 | bin := $(DESTDIR)/bin/ | ||
15 | sbin := $(DESTDIR)/sbin/ | ||
16 | @@ -39,8 +36,8 @@ | ||
17 | man1 := $(DESTDIR)/usr/share/man/man1/ | ||
18 | man5 := $(DESTDIR)/usr/share/man/man5/ | ||
19 | man8 := $(DESTDIR)/usr/share/man/man8/ | ||
20 | -lib := $(DESTDIR)/$(lib64)/ | ||
21 | -usr/lib := $(DESTDIR)/usr/$(lib64)/ | ||
22 | +lib := $(DESTDIR)/$(base_libdir)/ | ||
23 | +usr/lib := $(DESTDIR)/$(libdir)/ | ||
24 | usr/include := $(DESTDIR)/usr/include/ | ||
25 | |||
26 | #SKIP := $(bin)kill $(man1)kill.1 | ||
27 | @@ -222,10 +219,10 @@ | ||
28 | ###### install | ||
29 | |||
30 | $(BINFILES) : all | ||
31 | - $(install) --mode a=rx $(notdir $@) $@ | ||
32 | + $(install) -m 555 $(notdir $@) $@ | ||
33 | |||
34 | $(MANFILES) : all | ||
35 | - $(install) --mode a=r $(notdir $@) $@ | ||
36 | + $(install) -m 444 $(notdir $@) $@ | ||
37 | |||
38 | install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL)) | ||
39 | cd $(usr/bin) && $(ln_f) skill snice | ||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch b/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch new file mode 100644 index 0000000000..2ca972482d --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | diff --git a/pwdx.c b/pwdx.c | ||
4 | index cb96a52..29ebce2 100644 | ||
5 | --- a/pwdx.c | ||
6 | +++ b/pwdx.c | ||
7 | @@ -13,7 +13,7 @@ | ||
8 | #include <stdlib.h> | ||
9 | #include <sys/types.h> | ||
10 | #include <regex.h> | ||
11 | -#include <limits.h> | ||
12 | +#include <linux/limits.h> | ||
13 | #include <unistd.h> | ||
14 | #include <errno.h> | ||
15 | |||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch b/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch new file mode 100644 index 0000000000..2a65c3509f --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | *** procps-3.2.5/proc/module.mk.orig Sun Jul 24 11:53:49 2005 | ||
4 | --- procps-3.2.5/proc/module.mk Sun Jul 24 11:54:32 2005 | ||
5 | *************** | ||
6 | *** 96,102 **** | ||
7 | #################### install rules ########################### | ||
8 | |||
9 | $(lib)$(SOFILE) : proc/$(SONAME) | ||
10 | ! $(install) --mode a=rx $< $@ | ||
11 | |||
12 | ifneq ($(SOLINK),$(SOFILE)) | ||
13 | .PHONY: $(lib)$(SOLINK) | ||
14 | --- 96,102 ---- | ||
15 | #################### install rules ########################### | ||
16 | |||
17 | $(lib)$(SOFILE) : proc/$(SONAME) | ||
18 | ! $(install) -m 555 $< $@ | ||
19 | |||
20 | ifneq ($(SOLINK),$(SOFILE)) | ||
21 | .PHONY: $(lib)$(SOLINK) | ||
22 | *************** | ||
23 | *** 115,121 **** | ||
24 | $(ldconfig) | ||
25 | |||
26 | $(usr/lib)$(ANAME) : proc/$(ANAME) | ||
27 | ! $(install) --mode a=r $< $@ | ||
28 | |||
29 | # Junk anyway... supposed to go in /usr/include/$(NAME) | ||
30 | #INSTALL += $(addprefix $(include),$(HDRFILES)) | ||
31 | --- 115,121 ---- | ||
32 | $(ldconfig) | ||
33 | |||
34 | $(usr/lib)$(ANAME) : proc/$(ANAME) | ||
35 | ! $(install) -m 444 $< $@ | ||
36 | |||
37 | # Junk anyway... supposed to go in /usr/include/$(NAME) | ||
38 | #INSTALL += $(addprefix $(include),$(HDRFILES)) | ||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch new file mode 100644 index 0000000000..0306c8d639 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch | |||
@@ -0,0 +1,111 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | fix that top will quit after cpu offline | ||
4 | |||
5 | top utiliy fails to read /proc/stat after cpu offline, because Cpu_tot | ||
6 | is still the original cpu numbers when calling cpus_refresh, in which | ||
7 | it is trying to read and sscanf Cpu_tot times /proc/stat. | ||
8 | |||
9 | The patch is from procps-3.2.8-2.fc12.src.rpm | ||
10 | |||
11 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
12 | |||
13 | --- | ||
14 | --- procps-3.2.7/top.c.remcpu 2006-07-10 10:41:11.000000000 +0200 | ||
15 | +++ procps-3.2.7/top.c 2006-07-10 10:41:35.000000000 +0200 | ||
16 | @@ -912,6 +912,7 @@ | ||
17 | static CPU_t *cpus_refresh (CPU_t *cpus) | ||
18 | { | ||
19 | static FILE *fp = NULL; | ||
20 | + static int cpu_max; | ||
21 | int i; | ||
22 | int num; | ||
23 | // enough for a /proc/stat CPU line (not the intr line) | ||
24 | @@ -926,24 +927,29 @@ | ||
25 | can hold tics representing the /proc/stat cpu summary (the first | ||
26 | line read) -- that slot supports our View_CPUSUM toggle */ | ||
27 | cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t)); | ||
28 | + cpu_max = Cpu_tot; | ||
29 | } | ||
30 | + else if (cpu_max > Cpu_tot) | ||
31 | + /* move saved CUPs summary to cpu_max possition */ | ||
32 | + memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t)); | ||
33 | + | ||
34 | rewind(fp); | ||
35 | fflush(fp); | ||
36 | |||
37 | // first value the last slot with the cpu summary line | ||
38 | if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); | ||
39 | - cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number | ||
40 | - cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number | ||
41 | - cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number | ||
42 | + cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number | ||
43 | + cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number | ||
44 | + cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number | ||
45 | num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", | ||
46 | - &cpus[Cpu_tot].u, | ||
47 | - &cpus[Cpu_tot].n, | ||
48 | - &cpus[Cpu_tot].s, | ||
49 | - &cpus[Cpu_tot].i, | ||
50 | - &cpus[Cpu_tot].w, | ||
51 | - &cpus[Cpu_tot].x, | ||
52 | - &cpus[Cpu_tot].y, | ||
53 | - &cpus[Cpu_tot].z | ||
54 | + &cpus[cpu_max].u, | ||
55 | + &cpus[cpu_max].n, | ||
56 | + &cpus[cpu_max].s, | ||
57 | + &cpus[cpu_max].i, | ||
58 | + &cpus[cpu_max].w, | ||
59 | + &cpus[cpu_max].x, | ||
60 | + &cpus[cpu_max].y, | ||
61 | + &cpus[cpu_max].z | ||
62 | ); | ||
63 | if (num < 4) | ||
64 | std_err("failed /proc/stat read"); | ||
65 | @@ -955,7 +961,7 @@ | ||
66 | } | ||
67 | |||
68 | // now value each separate cpu's tics | ||
69 | - for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) { | ||
70 | + for (i = 0; ; i++) { | ||
71 | if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); | ||
72 | cpus[i].x = 0; // FIXME: can't tell by kernel version number | ||
73 | cpus[i].y = 0; // FIXME: can't tell by kernel version number | ||
74 | @@ -964,9 +970,35 @@ | ||
75 | &cpus[i].id, | ||
76 | &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z | ||
77 | ); | ||
78 | - if (num < 4) | ||
79 | - std_err("failed /proc/stat read"); | ||
80 | + if (num < 4) { | ||
81 | + Cpu_tot = i; | ||
82 | + break; | ||
83 | + } | ||
84 | + if (i == cpu_max - 1) { | ||
85 | + // Bump cpu_max and extend cpus | ||
86 | + cpu_max++; | ||
87 | + cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t)); | ||
88 | + if (!cpus) std_err("realloc failed"); | ||
89 | + memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t)); | ||
90 | + } | ||
91 | + } | ||
92 | + | ||
93 | + if (cpu_max > Cpu_tot) | ||
94 | + memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t)); | ||
95 | + | ||
96 | + // and just in case we're 2.2.xx compiled without SMP support... | ||
97 | + if (Cpu_tot == 1) { | ||
98 | + cpus[0].id = cpus[1].id = 0; | ||
99 | + cpus[0].u = cpus[1].u; | ||
100 | + cpus[0].n = cpus[1].n; | ||
101 | + cpus[0].s = cpus[1].s; | ||
102 | + cpus[0].i = cpus[1].i; | ||
103 | + cpus[0].w = cpus[1].w; | ||
104 | + cpus[0].x = cpus[1].x; | ||
105 | + cpus[0].y = cpus[1].y; | ||
106 | + cpus[0].z = cpus[1].z; | ||
107 | } | ||
108 | + | ||
109 | return cpus; | ||
110 | } | ||
111 | |||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch new file mode 100644 index 0000000000..c8cee26eac --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Fix for stricter Makefile parser in Make 3.82 take from Gentoo bugzilla: | ||
4 | http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-3.2.8%2Bgmake-3.82.patch?revision=1.1 | ||
5 | |||
6 | Index: procps-3.2.8/Makefile | ||
7 | =================================================================== | ||
8 | --- procps-3.2.8.orig/Makefile | ||
9 | +++ procps-3.2.8/Makefile | ||
10 | @@ -174,7 +174,8 @@ INSTALL := $(BINFILES) $(MANFILES) | ||
11 | # want this rule first, use := on ALL, and ALL not filled in yet | ||
12 | all: do_all | ||
13 | |||
14 | --include */module.mk | ||
15 | +-include proc/module.mk | ||
16 | +-include ps/module.mk | ||
17 | |||
18 | do_all: $(ALL) | ||
19 | |||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch new file mode 100644 index 0000000000..1a294142f5 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | From e529ce0b53f6b73d8b760cd37b23e0397720cede Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel Novotny <dnovotny@fedoraproject.org> | ||
3 | Date: Mon, 16 Feb 2009 12:22:20 +0000 | ||
4 | Subject: add cgroup support | ||
5 | |||
6 | Rebased for 3.2.8: Andrei Gherzan <andrei.gherzan@windriver.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | The patch was imported from the meta-ivi repository | ||
11 | (git://git.yoctoproject.org/meta-ivi) as of commit id | ||
12 | 74b9624fe94b2b90810717a13d481b0db9d2d95a | ||
13 | |||
14 | Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> | ||
15 | |||
16 | Index: procps-3.2.8/ps/output.c | ||
17 | =================================================================== | ||
18 | --- procps-3.2.8.orig/ps/output.c 2012-11-15 17:44:05.501337741 +0200 | ||
19 | +++ procps-3.2.8/ps/output.c 2012-11-15 17:48:31.585328231 +0200 | ||
20 | @@ -1099,6 +1099,39 @@ | ||
21 | return snprintf(outbuf, COLWID, "*"); | ||
22 | } | ||
23 | |||
24 | +static int pr_cgroup(char *restrict const outbuf, const proc_t *restrict const pp){ | ||
25 | + char filename[48]; | ||
26 | + FILE *fd; | ||
27 | + int counter = 0; | ||
28 | + int c; | ||
29 | + int is_cgroup = 0; | ||
30 | + | ||
31 | + outbuf[0]='\0'; | ||
32 | + snprintf(filename, sizeof filename, "/proc/%d/cgroup", pp->tgid); | ||
33 | + fd = fopen(filename, "r"); | ||
34 | + if (likely(fd == NULL)) goto fail; | ||
35 | + while (( (c = fgetc(fd)) != EOF) && (counter<665)) { | ||
36 | + if (is_cgroup == 0) { | ||
37 | + if (c == ':') { | ||
38 | + is_cgroup = 1; | ||
39 | + if (counter>0) | ||
40 | + outbuf[counter++]=';'; | ||
41 | + } | ||
42 | + }else | ||
43 | + if ((c == '\n') || (c == '\0')) | ||
44 | + is_cgroup = 0; | ||
45 | + else | ||
46 | + outbuf[counter++]=c; | ||
47 | + } | ||
48 | + outbuf[counter]='\0'; | ||
49 | + close(fd); | ||
50 | + if (counter>0) | ||
51 | + return counter; | ||
52 | +fail: | ||
53 | + outbuf[0] = '-'; | ||
54 | + outbuf[1] = '\0'; | ||
55 | + return 1; | ||
56 | +} | ||
57 | |||
58 | /****************** FLASK & seLinux security stuff **********************/ | ||
59 | // move the bulk of this to libproc sometime | ||
60 | @@ -1293,6 +1326,7 @@ | ||
61 | {"bsdtime", "TIME", pr_bsdtime, sr_nop, 6, 0, LNX, ET|RIGHT}, | ||
62 | {"c", "C", pr_c, sr_pcpu, 2, 0, SUN, ET|RIGHT}, | ||
63 | {"caught", "CAUGHT", pr_sigcatch, sr_nop, 9, 0, BSD, TO|SIGNAL}, /*sigcatch*/ | ||
64 | +{"cgroup", "CGROUP", pr_cgroup, sr_nop, 35, 0, LNX, PO|LEFT}, /* cgroups*/ | ||
65 | {"class", "CLS", pr_class, sr_sched, 3, 0, XXX, TO|LEFT}, | ||
66 | {"cls", "CLS", pr_class, sr_sched, 3, 0, HPU, TO|RIGHT}, /*says HPUX or RT*/ | ||
67 | {"cmaj_flt", "-", pr_nop, sr_cmaj_flt, 1, 0, LNX, AN|RIGHT}, | ||
68 | Index: procps-3.2.8/ps/ps.1 | ||
69 | =================================================================== | ||
70 | --- procps-3.2.8.orig/ps/ps.1 2012-11-15 17:44:50.845336117 +0200 | ||
71 | +++ procps-3.2.8/ps/ps.1 2012-11-15 17:49:09.621326859 +0200 | ||
72 | @@ -904,6 +904,10 @@ | ||
73 | displayed. (alias\ \fBsig_catch\fR,\ \fBsigcatch\fR). | ||
74 | T} | ||
75 | |||
76 | +cgroup CGROUP T{ | ||
77 | +display control groups to which the process belonges. | ||
78 | +t} | ||
79 | + | ||
80 | class CLS T{ | ||
81 | scheduling class of the process. (alias\ \fBpolicy\fR,\ \fBcls\fR). | ||
82 | Field's possible values are: | ||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch b/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch new file mode 100644 index 0000000000..0775eaba26 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | *** procps-3.2.5/ps/module.mk.orig Sun Jul 24 11:54:40 2005 | ||
4 | --- procps-3.2.5/ps/module.mk Sun Jul 24 11:55:02 2005 | ||
5 | *************** | ||
6 | *** 33,40 **** | ||
7 | |||
8 | |||
9 | $(bin)ps: ps/ps | ||
10 | ! $(install) --mode a=rx $< $@ | ||
11 | |||
12 | $(man1)ps.1 : ps/ps.1 | ||
13 | ! $(install) --mode a=r $< $@ | ||
14 | -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz | ||
15 | --- 33,40 ---- | ||
16 | |||
17 | |||
18 | $(bin)ps: ps/ps | ||
19 | ! $(install) -m 555 $< $@ | ||
20 | |||
21 | $(man1)ps.1 : ps/ps.1 | ||
22 | ! $(install) -m 444 $< $@ | ||
23 | -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz | ||
diff --git a/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf b/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf new file mode 100644 index 0000000000..34e7488bf7 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf | |||
@@ -0,0 +1,64 @@ | |||
1 | # This configuration file is taken from Debian. | ||
2 | # | ||
3 | # /etc/sysctl.conf - Configuration file for setting system variables | ||
4 | # See sysctl.conf (5) for information. | ||
5 | # | ||
6 | |||
7 | #kernel.domainname = example.com | ||
8 | |||
9 | # Uncomment the following to stop low-level messages on console | ||
10 | #kernel.printk = 4 4 1 7 | ||
11 | |||
12 | ##############################################################3 | ||
13 | # Functions previously found in netbase | ||
14 | # | ||
15 | |||
16 | # Uncomment the next two lines to enable Spoof protection (reverse-path filter) | ||
17 | # Turn on Source Address Verification in all interfaces to | ||
18 | # prevent some spoofing attacks | ||
19 | net.ipv4.conf.default.rp_filter=1 | ||
20 | net.ipv4.conf.all.rp_filter=1 | ||
21 | |||
22 | # Uncomment the next line to enable TCP/IP SYN cookies | ||
23 | #net.ipv4.tcp_syncookies=1 | ||
24 | |||
25 | # Uncomment the next line to enable packet forwarding for IPv4 | ||
26 | #net.ipv4.ip_forward=1 | ||
27 | |||
28 | # Uncomment the next line to enable packet forwarding for IPv6 | ||
29 | #net.ipv6.conf.all.forwarding=1 | ||
30 | |||
31 | |||
32 | ################################################################### | ||
33 | # Additional settings - these settings can improve the network | ||
34 | # security of the host and prevent against some network attacks | ||
35 | # including spoofing attacks and man in the middle attacks through | ||
36 | # redirection. Some network environments, however, require that these | ||
37 | # settings are disabled so review and enable them as needed. | ||
38 | # | ||
39 | # Ignore ICMP broadcasts | ||
40 | #net.ipv4.icmp_echo_ignore_broadcasts = 1 | ||
41 | # | ||
42 | # Ignore bogus ICMP errors | ||
43 | #net.ipv4.icmp_ignore_bogus_error_responses = 1 | ||
44 | # | ||
45 | # Do not accept ICMP redirects (prevent MITM attacks) | ||
46 | #net.ipv4.conf.all.accept_redirects = 0 | ||
47 | #net.ipv6.conf.all.accept_redirects = 0 | ||
48 | # _or_ | ||
49 | # Accept ICMP redirects only for gateways listed in our default | ||
50 | # gateway list (enabled by default) | ||
51 | # net.ipv4.conf.all.secure_redirects = 1 | ||
52 | # | ||
53 | # Do not send ICMP redirects (we are not a router) | ||
54 | #net.ipv4.conf.all.send_redirects = 0 | ||
55 | # | ||
56 | # Do not accept IP source route packets (we are not a router) | ||
57 | #net.ipv4.conf.all.accept_source_route = 0 | ||
58 | #net.ipv6.conf.all.accept_source_route = 0 | ||
59 | # | ||
60 | # Log Martian Packets | ||
61 | #net.ipv4.conf.all.log_martians = 1 | ||
62 | # | ||
63 | |||
64 | #kernel.shmmax = 141762560 | ||
diff --git a/meta/recipes-extended/procps/procps.inc b/meta/recipes-extended/procps/procps.inc new file mode 100644 index 0000000000..da91da232d --- /dev/null +++ b/meta/recipes-extended/procps/procps.inc | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "System and process monitoring utilities" | ||
2 | DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \ | ||
3 | the /proc filesystem. The package \ includes the programs ps, top, vmstat, w, kill, and skill." | ||
4 | HOMEPAGE = "http://procps.sf.net" | ||
5 | SECTION = "base" | ||
6 | LICENSE = "GPLv2+ & LGPLv2+" | ||
7 | LIC_FILES_CHKSUM="file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
8 | file://COPYING.LIB;md5=6e29c688d912da12b66b73e32b03d812 \ | ||
9 | file://ps/COPYING;md5=6e29c688d912da12b66b73e32b03d812 \ | ||
10 | file://proc/COPYING;md5=6e29c688d912da12b66b73e32b03d812" | ||
11 | DEPENDS = "ncurses" | ||
12 | |||
13 | SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \ | ||
14 | file://install.patch" | ||
15 | |||
16 | inherit autotools-brokensep update-alternatives | ||
17 | |||
18 | do_install_append() { | ||
19 | mv ${D}${bindir}/watch ${D}${bindir}/watch.${BPN} | ||
20 | } | ||
21 | |||
22 | FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so" | ||
23 | FILES_SOLIBSDEV = "" | ||
24 | |||
25 | ALTERNATIVE_${PN} = "top uptime free pkill pmap kill sysctl ps pgrep pwdx watch" | ||
26 | ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" | ||
27 | ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" | ||
28 | ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps" | ||
29 | ALTERNATIVE_LINK_NAME[watch] = "${base_bindir}/watch" | ||
30 | ALTERNATIVE_TARGET[watch] = "${bindir}/watch.${BPN}" | ||
31 | ALTERNATIVE_PRIORITY = "110" | ||
diff --git a/meta/recipes-extended/procps/procps_3.2.8.bb b/meta/recipes-extended/procps/procps_3.2.8.bb new file mode 100644 index 0000000000..e20ff2826c --- /dev/null +++ b/meta/recipes-extended/procps/procps_3.2.8.bb | |||
@@ -0,0 +1,42 @@ | |||
1 | require procps.inc | ||
2 | |||
3 | PR = "r12" | ||
4 | |||
5 | SRC_URI += "file://procmodule.patch \ | ||
6 | file://psmodule.patch \ | ||
7 | file://linux-limits.patch \ | ||
8 | file://sysctl.conf \ | ||
9 | file://procps-3.2.8+gmake-3.82.patch \ | ||
10 | file://gnu-kbsd-version.patch \ | ||
11 | file://60_linux_version_init.patch \ | ||
12 | file://procps-3.2.7-top-remcpu.patch \ | ||
13 | file://procps-3.2.8-ps-cgroup.patch \ | ||
14 | file://detect_bitness.patch \ | ||
15 | file://0001-Fix-musl-build-failure.patch \ | ||
16 | " | ||
17 | |||
18 | SRC_URI[md5sum] = "9532714b6846013ca9898984ba4cd7e0" | ||
19 | SRC_URI[sha256sum] = "11ed68d8a4433b91cd833deb714a3aa849c02aea738c42e6b4557982419c1535" | ||
20 | |||
21 | EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -I${STAGING_INCDIR}" \ | ||
22 | CPPFLAGS=-I${STAGING_INCDIR} \ | ||
23 | LDFLAGS="${LDFLAGS}" \ | ||
24 | CURSES=-lncurses \ | ||
25 | install="install -D" \ | ||
26 | ldconfig=echo' | ||
27 | |||
28 | EXTRA_OEMAKE_append_p2041rdb = ' m64=-m32' | ||
29 | EXTRA_OEMAKE_append_p4080ds = ' m64=-m32' | ||
30 | EXTRA_OEMAKE_append_qemuppc = ' m64=-m32' | ||
31 | |||
32 | |||
33 | do_install_append () { | ||
34 | install -d ${D}${sysconfdir} | ||
35 | install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf | ||
36 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
37 | install -d ${D}${sysconfdir}/sysctl.d | ||
38 | ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf | ||
39 | fi | ||
40 | } | ||
41 | |||
42 | CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" | ||
diff --git a/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch new file mode 100644 index 0000000000..e57d60f6a3 --- /dev/null +++ b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001 | ||
2 | From: Brad Jorsch <anomie@users.sourceforge.net> | ||
3 | Date: Fri, 28 Feb 2014 21:55:02 +1100 | ||
4 | Subject: [PATCH] Typo in fuser makes -M on all the time | ||
5 | |||
6 | Brad found that fuser had the -M option on all the time. | ||
7 | A simple but significant typo caused this, thanks the the patch. | ||
8 | |||
9 | Bug-Debian: http://bugs.debian.org/740275 | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | |||
13 | Signed-off-by: Craig Small <csmall@enc.com.au> | ||
14 | --- | ||
15 | ChangeLog | 4 ++++ | ||
16 | src/fuser.c | 2 +- | ||
17 | 2 files changed, 5 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/ChangeLog b/ChangeLog | ||
20 | index fd1cccf..e5f784c 100644 | ||
21 | --- a/ChangeLog | ||
22 | +++ b/ChangeLog | ||
23 | @@ -1,3 +1,7 @@ | ||
24 | +Changes in 22.22 | ||
25 | +================ | ||
26 | + * Fixed typo in fuser which has -M on Debian #740275 | ||
27 | + | ||
28 | Changes in 22.21 | ||
29 | ================ | ||
30 | * Missing comma in fuser(1) added Debian #702391 | ||
31 | diff --git a/src/fuser.c b/src/fuser.c | ||
32 | index b485f65..389b302 100644 | ||
33 | --- a/src/fuser.c | ||
34 | +++ b/src/fuser.c | ||
35 | @@ -1174,7 +1174,7 @@ int main(int argc, char *argv[]) | ||
36 | usage(_("No process specification given")); | ||
37 | |||
38 | /* Check if -M flag was used and if so check mounts */ | ||
39 | - if (opts * OPT_ISMOUNTPOINT) { | ||
40 | + if (opts & OPT_ISMOUNTPOINT) { | ||
41 | check_mountpoints(&mounts, &names_head, &names_tail); | ||
42 | } | ||
43 | |||
44 | -- | ||
45 | 1.8.4.2 | ||
46 | |||
diff --git a/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch new file mode 100644 index 0000000000..c0835e041e --- /dev/null +++ b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From aa66afecd8ba9cc4139f25ab15ec315173413a7d Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Barker <paul@paulbarker.me.uk> | ||
3 | Date: Wed, 20 Aug 2014 10:31:37 +0000 | ||
4 | Subject: [PATCH] Include <limits.h> for PATH_MAX | ||
5 | |||
6 | When building against musl libc, PATH_MAX is defined in <limits.h>. | ||
7 | |||
8 | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> | ||
9 | |||
10 | Upstream-status: Accepted (Should be in next release after 22.21) | ||
11 | --- | ||
12 | src/pstree.c | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/src/pstree.c b/src/pstree.c | ||
16 | index 071e6c4..0d28260 100644 | ||
17 | --- a/src/pstree.c | ||
18 | +++ b/src/pstree.c | ||
19 | @@ -41,6 +41,7 @@ | ||
20 | #include <sys/types.h> | ||
21 | #include <sys/stat.h> | ||
22 | #include <sys/ioctl.h> | ||
23 | +#include <limits.h> | ||
24 | |||
25 | #include "i18n.h" | ||
26 | #include "comm.h" | ||
27 | -- | ||
28 | 2.0.4 | ||
29 | |||
diff --git a/meta/recipes-extended/psmisc/psmisc.inc b/meta/recipes-extended/psmisc/psmisc.inc new file mode 100644 index 0000000000..68e06561f9 --- /dev/null +++ b/meta/recipes-extended/psmisc/psmisc.inc | |||
@@ -0,0 +1,44 @@ | |||
1 | SUMMARY = "Utilities for managing processes on your system" | ||
2 | DESCRIPTION = "The psmisc package contains utilities for managing processes on your \ | ||
3 | system: pstree, killall and fuser. The pstree command displays a tree \ | ||
4 | structure of all of the running processes on your system. The killall \ | ||
5 | command sends a specified signal (SIGTERM if nothing is specified) to \ | ||
6 | processes identified by name. The fuser command identifies the PIDs \ | ||
7 | of processes that are using specified files or filesystems." | ||
8 | SECTION = "base" | ||
9 | DEPENDS = "ncurses virtual/libintl" | ||
10 | LICENSE = "GPLv2" | ||
11 | |||
12 | SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz" | ||
13 | |||
14 | S = "${WORKDIR}/psmisc-${PV}" | ||
15 | |||
16 | inherit autotools gettext | ||
17 | |||
18 | ALLOW_EMPTY_${PN} = "1" | ||
19 | |||
20 | PACKAGES =+ "fuser fuser-doc killall killall-doc pstree pstree-doc" | ||
21 | PACKAGES += "psmisc-extras" | ||
22 | |||
23 | FILES_${PN} = "" | ||
24 | RDEPENDS_${PN} = "fuser killall pstree" | ||
25 | |||
26 | FILES_fuser = "${bindir}/fuser.${BPN}" | ||
27 | FILES_fuser-doc = "${mandir}/man1/fuser*" | ||
28 | |||
29 | FILES_killall = "${bindir}/killall.${BPN}" | ||
30 | FILES_killall-doc = "${mandir}/man1/killall*" | ||
31 | |||
32 | FILES_pstree = "${bindir}/pstree" | ||
33 | FILES_pstree-doc = "${mandir}/man1/pstree*" | ||
34 | |||
35 | FILES_psmisc-extras = "${bindir}" | ||
36 | FILES_psmisc-extras-doc = "${mandir}" | ||
37 | |||
38 | inherit update-alternatives | ||
39 | |||
40 | ALTERNATIVE_PRIORITY = "90" | ||
41 | |||
42 | ALTERNATIVE_killall = "killall" | ||
43 | |||
44 | ALTERNATIVE_fuser = "fuser" | ||
diff --git a/meta/recipes-extended/psmisc/psmisc_22.21.bb b/meta/recipes-extended/psmisc/psmisc_22.21.bb new file mode 100644 index 0000000000..66aba9ec57 --- /dev/null +++ b/meta/recipes-extended/psmisc/psmisc_22.21.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require psmisc.inc | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
4 | |||
5 | SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf" | ||
6 | SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a" | ||
7 | |||
8 | SRC_URI += "file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \ | ||
9 | file://0002-Include-limits.h-for-PATH_MAX.patch \ | ||
10 | " | ||
diff --git a/meta/recipes-extended/quota/quota/config-tcpwrappers.patch b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch new file mode 100644 index 0000000000..5f47fbd183 --- /dev/null +++ b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | --- quota-tools.orig/configure.in | ||
4 | +++ quota-tools/configure.in | ||
5 | @@ -151,33 +151,46 @@ AC_SUBST(QUOTA_NETLINK_PROG) | ||
6 | AC_SUBST(NETLINKLIBS) | ||
7 | |||
8 | AC_SEARCH_LIBS(gethostbyname, nsl) | ||
9 | -AC_MSG_CHECKING(for host_access in -lwrap) | ||
10 | -AC_CACHE_VAL(ac_cv_lib_wrap_main, | ||
11 | - saved_LIBS="$LIBS" | ||
12 | - LIBS="$LIBS -lwrap" | ||
13 | - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | ||
14 | - #include <stdio.h> | ||
15 | - #include <sys/types.h> | ||
16 | - #include <sys/socket.h> | ||
17 | - #include <netinet/in.h> | ||
18 | - #include <tcpd.h> | ||
19 | - struct request_info request; | ||
20 | - int deny_severity, allow_severity;]],[[hosts_access(&request);]])], | ||
21 | - dnl We always restore LIBS as we add -lwrap in the next check | ||
22 | - [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)], | ||
23 | - [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)]) | ||
24 | - ]) | ||
25 | |||
26 | -if test ${ac_cv_lib_wrap_main} = yes; then | ||
27 | - AC_CHECK_HEADER(tcpd.h,, [ | ||
28 | - echo 'ERROR: could not find tcpd.h - missing TCP wrappers package' | ||
29 | - exit 1 | ||
30 | - ]) | ||
31 | - LIBS="$LIBS -lwrap" | ||
32 | - AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) | ||
33 | - COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" | ||
34 | +AC_ARG_WITH(tcpwrappers, | ||
35 | + [ --with-tcpwrappers=[yes/no/try] Use hosts.allow and hosts.deny for access checking of rpc.rquota [default=yes, if available.]], | ||
36 | + , | ||
37 | + with_tcpwrappers="try") | ||
38 | + | ||
39 | +if test "x$with_tcpwrappers" != xno; then | ||
40 | + AC_MSG_CHECKING(for host_access in -lwrap) | ||
41 | + AC_CACHE_VAL(ac_cv_lib_wrap_main, | ||
42 | + saved_LIBS="$LIBS" | ||
43 | + LIBS="$LIBS -lwrap" | ||
44 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | ||
45 | + #include <stdio.h> | ||
46 | + #include <sys/types.h> | ||
47 | + #include <sys/socket.h> | ||
48 | + #include <netinet/in.h> | ||
49 | + #include <tcpd.h> | ||
50 | + struct request_info request; | ||
51 | + int deny_severity, allow_severity;]],[[hosts_access(&request);]])], | ||
52 | + dnl We always restore LIBS as we add -lwrap in the next try | ||
53 | + [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)], | ||
54 | + [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)]) | ||
55 | + ]) | ||
56 | + | ||
57 | + if test "x$ac_cv_lib_wrap_main" = xyes; then | ||
58 | + AC_CHECK_HEADER(tcpd.h,, [ | ||
59 | + if test "x$with_tcpwrappers" != xtry; then | ||
60 | + AC_MSG_ERROR([could not find tcpd.h - missing TCP wrappers package]) | ||
61 | + fi | ||
62 | + ]) | ||
63 | + | ||
64 | + LIBS="$LIBS -lwrap" | ||
65 | + AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) | ||
66 | + COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" | ||
67 | + elif test "x$with_tcpwrappers" != xtry; then | ||
68 | + AC_MSG_ERROR([could not find libwrap - missing TCP wrappers package]) | ||
69 | + fi | ||
70 | fi | ||
71 | |||
72 | + | ||
73 | dnl Checks for typedefs, structures, and compiler characteristics. | ||
74 | AC_C_CONST | ||
75 | AC_C_INLINE | ||
diff --git a/meta/recipes-extended/quota/quota_4.01.bb b/meta/recipes-extended/quota/quota_4.01.bb new file mode 100644 index 0000000000..82f7899690 --- /dev/null +++ b/meta/recipes-extended/quota/quota_4.01.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" | ||
2 | SECTION = "base" | ||
3 | HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" | ||
4 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" | ||
5 | LICENSE = "BSD & GPLv2+ & LGPLv2.1+" | ||
6 | LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \ | ||
7 | file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \ | ||
8 | file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" | ||
9 | PR = "r1" | ||
10 | |||
11 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ | ||
12 | file://config-tcpwrappers.patch" | ||
13 | |||
14 | SRC_URI[md5sum] = "5c2c31e321d2e1322ce12d69ae5c66d6" | ||
15 | SRC_URI[sha256sum] = "a36300bbc126b79b745bf937245092808b4585aa3309ef3335d4ab9d873cd206" | ||
16 | |||
17 | S = "${WORKDIR}/quota-tools" | ||
18 | |||
19 | DEPENDS = "gettext-native e2fsprogs" | ||
20 | |||
21 | inherit autotools-brokensep gettext pkgconfig | ||
22 | |||
23 | EXTRA_OEMAKE += 'STRIP=""' | ||
24 | |||
25 | PACKAGECONFIG ??= "tcp-wrappers" | ||
26 | PACKAGECONFIG[tcp-wrappers] = "--with-tcpwrappers,--without-tcpwrappers,tcp-wrappers" | ||
27 | |||
28 | do_install() { | ||
29 | oe_runmake prefix=${D}${prefix} install | ||
30 | } | ||
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch new file mode 100644 index 0000000000..b556a46347 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 914507aa6980129fefb4decaabea1a4f60c7182b Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Dickson <steved@redhat.com> | ||
3 | Date: Wed, 21 Aug 2013 14:40:22 -0400 | ||
4 | Subject: [PATCH 1/1] rpcbind: rpcuser not being set in Makefile.am | ||
5 | |||
6 | Upstream-Status: backport | ||
7 | |||
8 | Commit 8d7a0708 cause a regression where the rpcuser id was not | ||
9 | being set, which in turn cause rpcbind to immediately exit. | ||
10 | This patch removes the extra ',' that was in the AC_ARG_WITH | ||
11 | statement in the configure.ac file. | ||
12 | |||
13 | Signed-off-by: Steve Dickson <steved@redhat.com> | ||
14 | Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> | ||
15 | --- | ||
16 | configure.ac | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/configure.ac b/configure.ac | ||
20 | index 2b67720..1cf42d3 100644 | ||
21 | --- a/configure.ac | ||
22 | +++ b/configure.ac | ||
23 | @@ -23,7 +23,7 @@ AC_ARG_WITH([statedir], | ||
24 | AC_SUBST([statedir], [$with_statedir]) | ||
25 | |||
26 | AC_ARG_WITH([rpcuser], | ||
27 | - AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]), | ||
28 | + AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]) | ||
29 | ,, [with_rpcuser=root]) | ||
30 | AC_SUBST([rpcuser], [$with_rpcuser]) | ||
31 | |||
32 | -- | ||
33 | 1.8.3.2 | ||
34 | |||
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch new file mode 100644 index 0000000000..afa55f3b76 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | From b8f0d7b7318ba344c25785d6f5cf3f8de98012d4 Mon Sep 17 00:00:00 2001 | ||
4 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
5 | Date: Tue, 2 Feb 2010 09:36:03 +0000 | ||
6 | Subject: [PATCH 1/2] uclibc-nss | ||
7 | |||
8 | --- | ||
9 | src/rpcbind.c | 4 ++++ | ||
10 | 1 files changed, 4 insertions(+), 0 deletions(-) | ||
11 | |||
12 | diff --git a/src/rpcbind.c b/src/rpcbind.c | ||
13 | index 525ffba..1fe1a60 100644 | ||
14 | --- a/src/rpcbind.c | ||
15 | +++ b/src/rpcbind.c | ||
16 | @@ -67,7 +67,11 @@ | ||
17 | #include <pwd.h> | ||
18 | #include <string.h> | ||
19 | #include <errno.h> | ||
20 | +#if defined(__UCLIBC__) | ||
21 | +#define __nss_configure_lookup(x,y) | ||
22 | +#else | ||
23 | #include <nss.h> | ||
24 | +#endif | ||
25 | #include "config.h" | ||
26 | #include "rpcbind.h" | ||
27 | |||
28 | -- | ||
29 | 1.6.6.1 | ||
30 | |||
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch b/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch new file mode 100644 index 0000000000..c54fc96fc0 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | From 077add040c2e30d3ac507362f4afe350f47be027 Mon Sep 17 00:00:00 2001 | ||
4 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
5 | Date: Tue, 2 Feb 2010 09:47:57 +0000 | ||
6 | Subject: [PATCH 2/2] uclibc-rpcsvc-defines | ||
7 | |||
8 | --- | ||
9 | src/security.c | 28 ++++++++++++++++++++++++++++ | ||
10 | 1 files changed, 28 insertions(+), 0 deletions(-) | ||
11 | |||
12 | diff --git a/src/security.c b/src/security.c | ||
13 | index 0edeac6..e9fed55 100644 | ||
14 | --- a/src/security.c | ||
15 | +++ b/src/security.c | ||
16 | @@ -20,6 +20,32 @@ | ||
17 | /* | ||
18 | * XXX for special case checks in check_callit. | ||
19 | */ | ||
20 | +#if defined(__UCLIBC__) | ||
21 | + | ||
22 | +#define MOUNTPROC_MNT 1 | ||
23 | +#define MOUNTPROC_UMNT 3 | ||
24 | + | ||
25 | +#define NFS_PROGRAM 100003 | ||
26 | +#define YPPROG 100004 | ||
27 | +#define MOUNTPROG 100005 | ||
28 | +#define YPBINDPROG 100007 | ||
29 | +#define YPPASSWDPROG 100009 | ||
30 | +#define RQUOTAPROG 100011 | ||
31 | + | ||
32 | +#define YPPROC_NULL 0 | ||
33 | +#define YPPROC_DOMAIN 1 | ||
34 | +#define YPPROC_DOMAIN_NONACK 2 | ||
35 | +#define YPPROC_MATCH 3 | ||
36 | +#define YPPROC_FIRST 4 | ||
37 | +#define YPPROC_NEXT 5 | ||
38 | +#define YPPROC_XFR 6 | ||
39 | +#define YPPROC_CLEAR 7 | ||
40 | +#define YPPROC_ALL 8 | ||
41 | + | ||
42 | +#define YPBINDPROC_SETDOM 2 | ||
43 | + | ||
44 | +#else | ||
45 | + | ||
46 | #include <rpcsvc/mount.h> | ||
47 | #include <rpcsvc/rquota.h> | ||
48 | #include <rpcsvc/nfs_prot.h> | ||
49 | @@ -27,6 +53,8 @@ | ||
50 | #include <rpcsvc/ypclnt.h> | ||
51 | #include <rpcsvc/yppasswd.h> | ||
52 | |||
53 | +#endif | ||
54 | + | ||
55 | #include "rpcbind.h" | ||
56 | |||
57 | #ifdef LIBWRAP | ||
58 | -- | ||
59 | 1.6.6.1 | ||
60 | |||
diff --git a/meta/recipes-extended/rpcbind/rpcbind/init.d b/meta/recipes-extended/rpcbind/rpcbind/init.d new file mode 100644 index 0000000000..67499aa828 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/init.d | |||
@@ -0,0 +1,87 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # start/stop rpcbind daemon. | ||
4 | |||
5 | ### BEGIN INIT INFO | ||
6 | # Provides: rpcbind | ||
7 | # Required-Start: $network | ||
8 | # Required-Stop: $network | ||
9 | # Default-Start: S 2 3 4 5 | ||
10 | # Default-Stop: 0 1 6 | ||
11 | # Short-Description: RPC portmapper replacement | ||
12 | # Description: rpcbind is a server that converts RPC (Remote | ||
13 | # Procedure Call) program numbers into DARPA | ||
14 | # protocol port numbers. It must be running in | ||
15 | # order to make RPC calls. Services that use | ||
16 | # RPC include NFS and NIS. | ||
17 | ### END INIT INFO | ||
18 | |||
19 | # Source function library. | ||
20 | . /etc/init.d/functions | ||
21 | |||
22 | test -f /sbin/rpcbind || exit 0 | ||
23 | |||
24 | OPTIONS="" | ||
25 | if [ -f /etc/default/rpcbind ] | ||
26 | then | ||
27 | . /etc/default/rpcbind | ||
28 | elif [ -f /etc/rpcbind.conf ] | ||
29 | then | ||
30 | . /etc/rpcbind.conf | ||
31 | fi | ||
32 | |||
33 | start () | ||
34 | { | ||
35 | echo -n "Starting rpcbind daemon..." | ||
36 | if pidof /sbin/rpcbind >/dev/null; then | ||
37 | echo "already running." | ||
38 | exit 0 | ||
39 | fi | ||
40 | start-stop-daemon --start --quiet --exec /sbin/rpcbind -- "$@" | ||
41 | if [ $? -eq 0 ]; then | ||
42 | echo "done." | ||
43 | else | ||
44 | echo "failed." | ||
45 | fi | ||
46 | } | ||
47 | |||
48 | stop () | ||
49 | { | ||
50 | echo "Stopping rpcbind daemon..." | ||
51 | if ! pidof /sbin/rpcbind >/dev/null; then | ||
52 | echo "not running." | ||
53 | return 0 | ||
54 | fi | ||
55 | start-stop-daemon --stop --quiet --exec /sbin/rpcbind | ||
56 | if [ $? -eq 0 ]; then | ||
57 | echo "done." | ||
58 | else | ||
59 | echo "failed." | ||
60 | fi | ||
61 | } | ||
62 | |||
63 | case "$1" in | ||
64 | start) | ||
65 | start $OPTIONS | ||
66 | ;; | ||
67 | stop) | ||
68 | stop | ||
69 | ;; | ||
70 | force-reload) | ||
71 | stop | ||
72 | start $OPTIONS | ||
73 | ;; | ||
74 | restart) | ||
75 | stop | ||
76 | start $OPTIONS | ||
77 | ;; | ||
78 | status) | ||
79 | status /sbin/rpcbind | ||
80 | ;; | ||
81 | *) | ||
82 | echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}" | ||
83 | exit 1 | ||
84 | ;; | ||
85 | esac | ||
86 | |||
87 | exit $? | ||
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf new file mode 100644 index 0000000000..2a4dfbcfbc --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf | |||
@@ -0,0 +1,3 @@ | |||
1 | # Optional arguments passed to rpcbind. | ||
2 | # | ||
3 | RPCBIND_OPTS="" | ||
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service new file mode 100644 index 0000000000..b3ae2541a0 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=RPC Bind Service | ||
3 | Requires=rpcbind.socket | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf | ||
8 | ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS | ||
9 | SuccessExitStatus=2 | ||
10 | |||
11 | [Install] | ||
12 | Also=rpcbind.socket | ||
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket new file mode 100644 index 0000000000..d63c1d9720 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket | |||
@@ -0,0 +1,8 @@ | |||
1 | [Unit] | ||
2 | Description=RPCbind Server Activation Socket | ||
3 | |||
4 | [Socket] | ||
5 | ListenStream=/var/run/rpcbind.sock | ||
6 | |||
7 | [Install] | ||
8 | WantedBy=sockets.target | ||
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb new file mode 100644 index 0000000000..b7324766f7 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb | |||
@@ -0,0 +1,64 @@ | |||
1 | SUMMARY = "Universal Addresses to RPC Program Number Mapper" | ||
2 | DESCRIPTION = "The rpcbind utility is a server that converts RPC \ | ||
3 | program numbers into universal addresses." | ||
4 | SECTION = "console/network" | ||
5 | HOMEPAGE = "http://sourceforge.net/projects/rpcbind/" | ||
6 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751" | ||
7 | DEPENDS = "libtirpc quota" | ||
8 | |||
9 | LICENSE = "BSD" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \ | ||
11 | file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" | ||
12 | |||
13 | SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ | ||
14 | file://0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch \ | ||
15 | file://init.d \ | ||
16 | ${UCLIBCPATCHES} \ | ||
17 | file://rpcbind.conf \ | ||
18 | file://rpcbind.socket \ | ||
19 | file://rpcbind.service \ | ||
20 | " | ||
21 | |||
22 | UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \ | ||
23 | file://0002-uclibc-rpcsvc-defines.patch \ | ||
24 | " | ||
25 | UCLIBCPATCHES ?= "" | ||
26 | |||
27 | SRC_URI[md5sum] = "0a5f9c2142af814c55d957aaab3bcc68" | ||
28 | SRC_URI[sha256sum] = "da169ff877a5a07581fad50a9a808ac6e96f0c277a3df49a7ef005778428496e" | ||
29 | |||
30 | inherit autotools update-rc.d systemd pkgconfig | ||
31 | |||
32 | PACKAGECONFIG ??= "tcp-wrappers" | ||
33 | PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" | ||
34 | |||
35 | INITSCRIPT_NAME = "rpcbind" | ||
36 | INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ." | ||
37 | |||
38 | SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket" | ||
39 | |||
40 | inherit useradd | ||
41 | |||
42 | USERADD_PACKAGES = "${PN}" | ||
43 | USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \ | ||
44 | --shell /bin/false --user-group rpc" | ||
45 | |||
46 | EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc" | ||
47 | |||
48 | do_install_append () { | ||
49 | mv ${D}${bindir} ${D}${sbindir} | ||
50 | |||
51 | install -d ${D}${sysconfdir}/init.d | ||
52 | sed -e 's,/etc/,${sysconfdir}/,g' \ | ||
53 | -e 's,/sbin/,${sbindir}/,g' \ | ||
54 | ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind | ||
55 | chmod 0755 ${D}${sysconfdir}/init.d/rpcbind | ||
56 | |||
57 | install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir} | ||
58 | install -d ${D}${systemd_unitdir}/system | ||
59 | install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system | ||
60 | install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system | ||
61 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
62 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
63 | ${D}${systemd_unitdir}/system/rpcbind.service | ||
64 | } | ||
diff --git a/meta/recipes-extended/screen/screen-4.0.3/configure.patch b/meta/recipes-extended/screen/screen-4.0.3/configure.patch new file mode 100644 index 0000000000..e29bcc6639 --- /dev/null +++ b/meta/recipes-extended/screen/screen-4.0.3/configure.patch | |||
@@ -0,0 +1,979 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | # The patch is borrowed from OE: | ||
4 | # http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=4ee790cc6974bdfe1c9b06c0567b1c56f56d6615 | ||
5 | # and was rebased to screen-4.0.3's configure.in | ||
6 | # by Dexuan Cui (dexuan.cui@intel.com). | ||
7 | # | ||
8 | # The description of the original patch is: | ||
9 | # | ||
10 | # Patch by Hannes Reich (hannes@skynet.ie) 22-Jul-2005 | ||
11 | # Resolves _some_ of the cross-compilation issues in screen's configure.in | ||
12 | # | ||
13 | diff --git a/configure.in b/configure.in | ||
14 | index 34c9372..d5ed48a 100644 | ||
15 | --- a/configure.in | ||
16 | +++ b/configure.in | ||
17 | @@ -37,6 +37,325 @@ pat=`sed < ${srcdir}/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVE | ||
18 | VERSION="$rev.$vers.$pat" | ||
19 | AC_NOTE(this is screen version $VERSION) | ||
20 | AC_SUBST(VERSION) | ||
21 | + | ||
22 | +AH_TOP([ | ||
23 | +/* Copyright (c) 1993-2000 | ||
24 | + * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) | ||
25 | + * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) | ||
26 | + * Copyright (c) 1987 Oliver Laumann | ||
27 | + * | ||
28 | + * This program is free software; you can redistribute it and/or modify | ||
29 | + * it under the terms of the GNU General Public License as published by | ||
30 | + * the Free Software Foundation; either version 2, or (at your option) | ||
31 | + * any later version. | ||
32 | + * | ||
33 | + * This program is distributed in the hope that it will be useful, | ||
34 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
35 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
36 | + * GNU General Public License for more details. | ||
37 | + * | ||
38 | + * You should have received a copy of the GNU General Public License | ||
39 | + * along with this program (see the file COPYING); if not, write to the | ||
40 | + * Free Software Foundation, Inc., | ||
41 | + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | ||
42 | + * | ||
43 | + */ | ||
44 | + | ||
45 | + | ||
46 | +/********************************************************************** | ||
47 | + * | ||
48 | + * User Configuration Section | ||
49 | + */ | ||
50 | + | ||
51 | +/* | ||
52 | + * Maximum of simultaneously allowed windows per screen session. | ||
53 | + */ | ||
54 | +#ifndef MAXWIN | ||
55 | +# define MAXWIN 40 | ||
56 | +#endif | ||
57 | + | ||
58 | +/* | ||
59 | + * Define SOCKDIR to be the directory to contain the named sockets | ||
60 | + * screen creates. This should be in a common subdirectory, such as | ||
61 | + * /usr/local or /tmp. It makes things a little more secure if you | ||
62 | + * choose a directory which is not writable by everyone or where the | ||
63 | + * "sticky" bit is on, but this isn't required. | ||
64 | + * If SOCKDIR is not defined screen will put the named sockets in | ||
65 | + * the user's home directory. Notice that this can cause you problems | ||
66 | + * if some user's HOME directories are AFS- or NFS-mounted. Especially | ||
67 | + * AFS is unlikely to support named sockets. | ||
68 | + * | ||
69 | + * Screen will name the subdirectories "S-$USER" (e.g /tmp/S-davison). | ||
70 | + */ | ||
71 | +#undef SOCKDIR | ||
72 | + | ||
73 | +/* | ||
74 | + * Define this if the SOCKDIR is not shared between hosts. | ||
75 | + */ | ||
76 | +#define SOCKDIR_IS_LOCAL_TO_HOST | ||
77 | + | ||
78 | +/* | ||
79 | + * Screen sources two startup files. First a global file with a path | ||
80 | + * specified here, second your local $HOME/.screenrc | ||
81 | + * Don't define this, if you don't want it. | ||
82 | + */ | ||
83 | +#ifndef ETCSCREENRC | ||
84 | +# define ETCSCREENRC "/usr/local/etc/screenrc" | ||
85 | +#endif | ||
86 | + | ||
87 | +/* | ||
88 | + * Screen can look for the environment variable $SYSSCREENRC and -if it | ||
89 | + * exists- load the file specified in that variable as global screenrc. | ||
90 | + * If you want to enable this feature, define ALLOW_SYSSCREENRC to one (1). | ||
91 | + * Otherwise ETCSCREENRC is always loaded. | ||
92 | + */ | ||
93 | +#define ALLOW_SYSSCREENRC 1 | ||
94 | + | ||
95 | +/* | ||
96 | + * Screen needs encoding files for the translation of utf8 | ||
97 | + * into some encodings, e.g. JIS, BIG5. | ||
98 | + * Only needed if FONT, ENCODINGS and UTF8 are defined. | ||
99 | + */ | ||
100 | +#ifndef SCREENENCODINGS | ||
101 | +# define SCREENENCODINGS "/usr/local/lib/screen/encodings" | ||
102 | +#endif | ||
103 | +/* | ||
104 | + * Define CHECKLOGIN to force Screen users to enter their Unix password | ||
105 | + * in addition to the screen password. | ||
106 | + * | ||
107 | + * Define NOSYSLOG if yo do not have logging facilities. Currently | ||
108 | + * syslog() will be used to trace ``su'' commands only. | ||
109 | + */ | ||
110 | +#define CHECKLOGIN 1 | ||
111 | +#undef NOSYSLOG | ||
112 | + | ||
113 | + | ||
114 | +/* | ||
115 | + * define PTYMODE if you do not like the default of 0622, which allows | ||
116 | + * public write to your pty. | ||
117 | + * define PTYGROUP to some numerical group-id if you do not want the | ||
118 | + * tty to be in "your" group. | ||
119 | + * Note, screen is unable to change mode or group of the pty if it | ||
120 | + * is not installed with sufficient privilege. (e.g. set-uid-root) | ||
121 | + * define PTYROFS if the /dev/pty devices are mounted on a read-only | ||
122 | + * filesystem so screen should not even attempt to set mode or group | ||
123 | + * even if running as root (e.g. on TiVo). | ||
124 | + */ | ||
125 | +#undef PTYMODE | ||
126 | +#undef PTYGROUP | ||
127 | +#undef PTYROFS | ||
128 | + | ||
129 | +/* | ||
130 | + * If screen is NOT installed set-uid root, screen can provide tty | ||
131 | + * security by exclusively locking the ptys. While this keeps other | ||
132 | + * users from opening your ptys, it also keeps your own subprocesses | ||
133 | + * from being able to open /dev/tty. Define LOCKPTY to add this | ||
134 | + * exclusive locking. | ||
135 | + */ | ||
136 | +#undef LOCKPTY | ||
137 | + | ||
138 | +/* | ||
139 | + * If you'd rather see the status line on the first line of your | ||
140 | + * terminal rather than the last, define TOPSTAT. | ||
141 | + */ | ||
142 | +#undef TOPSTAT | ||
143 | + | ||
144 | +/* | ||
145 | + * define DETACH can detach a session. An absolute 'must'. | ||
146 | + */ | ||
147 | +#define DETACH | ||
148 | + | ||
149 | +/* | ||
150 | + * here come the erlangen extensions to screen: | ||
151 | + * define LOCK if you want to use a lock program for a screenlock. | ||
152 | + * define PASSWORD for secure reattach of your screen. | ||
153 | + * define COPY_PASTE to use the famous hacker's treasure zoo. | ||
154 | + * define POW_DETACH to have a detach_and_logout key (requires DETACH). | ||
155 | + * define REMOTE_DETACH (-d option) to move screen between terminals. | ||
156 | + * define AUTO_NUKE to enable Tim MacKenzies clear screen nuking | ||
157 | + * define PSEUDOS to allow window input/output filtering | ||
158 | + * define MULTI to allow multiple attaches. | ||
159 | + * define MULTIUSER to allow other users attach to your session | ||
160 | + * (if they are in the acl, of course) | ||
161 | + * define MAPKEYS to include input keyboard translation. | ||
162 | + * define FONT to support ISO2022/alternet charset support | ||
163 | + * define COLOR to include ansi color support. This may expose | ||
164 | + * a bug in x11r6-color-xterm. | ||
165 | + * define DW_CHARS to include support for double-width character | ||
166 | + * sets. | ||
167 | + * define ENCODINGS to include support for encodings like euc or big5. | ||
168 | + * Needs FONT to work. | ||
169 | + * define UTF8 if you want support for UTF-8 encoding. | ||
170 | + * Needs FONT and ENCODINGS to work. | ||
171 | + * define COLORS16 if you want 16 colors. | ||
172 | + * Needs COLOR to work. | ||
173 | + * define BUILTIN_TELNET to add telnet support to screen. | ||
174 | + * Syntax: screen //telnet host [port] | ||
175 | + * define RXVT_OSC if you want support for rxvts special | ||
176 | + * change fgcolor/bgcolor/bgpicture sequences | ||
177 | + */ | ||
178 | +#undef SIMPLESCREEN | ||
179 | +#ifndef SIMPLESCREEN | ||
180 | +# define LOCK | ||
181 | +# define PASSWORD | ||
182 | +# define COPY_PASTE | ||
183 | +# define REMOTE_DETACH | ||
184 | +# define POW_DETACH | ||
185 | +# define AUTO_NUKE | ||
186 | +# define PSEUDOS | ||
187 | +# define MULTI | ||
188 | +# define MULTIUSER | ||
189 | +# define MAPKEYS | ||
190 | +# define COLOR | ||
191 | +# define FONT | ||
192 | +# define DW_CHARS | ||
193 | +# define ENCODINGS | ||
194 | +# define UTF8 | ||
195 | +# define COLORS16 | ||
196 | +# define ZMODEM | ||
197 | +# define BLANKER_PRG | ||
198 | +#endif /* SIMPLESCREEN */ | ||
199 | + | ||
200 | +#undef BUILTIN_TELNET | ||
201 | +#undef RXVT_OSC | ||
202 | +#undef COLORS256 | ||
203 | + | ||
204 | + | ||
205 | +/* | ||
206 | + * If you have a braille display you should define HAVE_BRAILLE. | ||
207 | + * The code inside #ifdef HAVE_BRAILLE was contributed by Hadi Bargi | ||
208 | + * Rangin (bargi@dots.physics.orst.edu). | ||
209 | + * WARNING: this is more or less unsupported code, it may be full of | ||
210 | + * bugs leading to security holes, enable at your own risk! | ||
211 | + */ | ||
212 | +#undef HAVE_BRAILLE | ||
213 | + | ||
214 | + | ||
215 | +/* | ||
216 | + * As error messages are mostly meaningless to the user, we | ||
217 | + * try to throw out phrases that are somewhat more familiar | ||
218 | + * to ...well, at least familiar to us NetHack players. | ||
219 | + */ | ||
220 | +#ifndef NONETHACK | ||
221 | +# define NETHACK | ||
222 | +#endif /* NONETHACK */ | ||
223 | + | ||
224 | +/* | ||
225 | + * If screen is installed with permissions to update /etc/utmp (such | ||
226 | + * as if it is installed set-uid root), define UTMPOK. | ||
227 | + */ | ||
228 | +#define UTMPOK | ||
229 | + | ||
230 | +/* Set LOGINDEFAULT to one (1) | ||
231 | + * if you want entries added to /etc/utmp by default, else set it to | ||
232 | + * zero (0). | ||
233 | + * LOGINDEFAULT will be one (1) whenever LOGOUTOK is undefined! | ||
234 | + */ | ||
235 | +#define LOGINDEFAULT 1 | ||
236 | + | ||
237 | +/* Set LOGOUTOK to one (1) | ||
238 | + * if you want the user to be able to log her/his windows out. | ||
239 | + * (Meaning: They are there, but not visible in /etc/utmp). | ||
240 | + * Disabling this feature only makes sense if you have a secure /etc/utmp | ||
241 | + * database. | ||
242 | + * Negative examples: suns usually have a world writable utmp file, | ||
243 | + * xterm will run perfectly without s-bit. | ||
244 | + * | ||
245 | + * If LOGOUTOK is undefined and UTMPOK is defined, all windows are | ||
246 | + * initially and permanently logged in. | ||
247 | + * | ||
248 | + * Set CAREFULUTMP to one (1) if you want that users have at least one | ||
249 | + * window per screen session logged in. | ||
250 | + */ | ||
251 | +#define LOGOUTOK 1 | ||
252 | +#undef CAREFULUTMP | ||
253 | + | ||
254 | + | ||
255 | +/* | ||
256 | + * If UTMPOK is defined and your system (incorrectly) counts logins by | ||
257 | + * counting non-null entries in /etc/utmp (instead of counting non-null | ||
258 | + * entries with no hostname that are not on a pseudo tty), define USRLIMIT | ||
259 | + * to have screen put an upper-limit on the number of entries to write | ||
260 | + * into /etc/utmp. This helps to keep you from exceeding a limited-user | ||
261 | + * license. | ||
262 | + */ | ||
263 | +#undef USRLIMIT | ||
264 | + | ||
265 | +/* | ||
266 | + * both must be defined if you want to favor tcsendbreak over | ||
267 | + * other calls to generate a break condition on serial lines. | ||
268 | + * (Do not bother, if you are not using plain tty windows.) | ||
269 | + */ | ||
270 | +#define POSIX_HAS_A_GOOD_TCSENDBREAK | ||
271 | +#define SUNOS4_AND_WE_TRUST_TCSENDBREAK | ||
272 | + | ||
273 | +/* | ||
274 | + * to lower the interrupt load on the host machine, you may want to | ||
275 | + * adjust the VMIN and VTIME settings used for plain tty windows. | ||
276 | + * See the termio(4) manual page (Non-Canonical Mode Input Processing) | ||
277 | + * for details. | ||
278 | + * if undefined, VMIN=1, VTIME=0 is used as a default - this gives you | ||
279 | + * best user responsiveness, but highest interrupt frequency. | ||
280 | + * (Do not bother, if you are not using plain tty windows.) | ||
281 | + */ | ||
282 | +#define TTYVMIN 100 | ||
283 | +#define TTYVTIME 2 | ||
284 | + | ||
285 | +/* | ||
286 | + * looks like the above values are ignored by setting FNDELAY. | ||
287 | + * This is default for all pty/ttys, you may disable it for | ||
288 | + * ttys here. After playing with it for a while, one may find out | ||
289 | + * that this feature may cause screen to lock up. | ||
290 | + */ | ||
291 | +#ifdef bsdi | ||
292 | +# define TTY_DISABLE_FNBLOCK /* select barfs without it ... */ | ||
293 | +#endif | ||
294 | + | ||
295 | + | ||
296 | +/* | ||
297 | + * Some terminals, e.g. Wyse 120, use a bitfield to select attributes. | ||
298 | + * This doesn't work with the standard so/ul/m? terminal entries, | ||
299 | + * because they will cancel each other out. | ||
300 | + * On TERMINFO machines, "sa" (sgr) may work. If you want screen | ||
301 | + * to switch attributes only with sgr, define USE_SGR. | ||
302 | + * This is *not* recomended, do this only if you must. | ||
303 | + */ | ||
304 | +#undef USE_SGR | ||
305 | + | ||
306 | + | ||
307 | +/* | ||
308 | + * Define USE_LOCALE if you want screen to use the locale names | ||
309 | + * for the name of the month and day of the week. | ||
310 | + */ | ||
311 | +#define USE_LOCALE | ||
312 | + | ||
313 | +/* | ||
314 | + * Define USE_PAM if your system supports PAM (Pluggable Authentication | ||
315 | + * Modules) and you want screen to use it instead of calling crypt(). | ||
316 | + * (You may also need to add -lpam to LIBS in the Makefile.) | ||
317 | + */ | ||
318 | +#undef USE_PAM | ||
319 | + | ||
320 | +/* | ||
321 | + * Define CHECK_SCREEN_W if you want screen to set TERM to screen-w | ||
322 | + * if the terminal width is greater than 131 columns. No longer needed | ||
323 | + * on modern systems which use $COLUMNS or the tty settings instead. | ||
324 | + */ | ||
325 | +#undef CHECK_SCREEN_W | ||
326 | + | ||
327 | +/********************************************************************** | ||
328 | + * | ||
329 | + * End of User Configuration Section | ||
330 | + * | ||
331 | + * Rest of this file is modified by 'configure' | ||
332 | + * Change at your own risk! | ||
333 | + * | ||
334 | + */ | ||
335 | +]) | ||
336 | +# end of AH_TOP | ||
337 | + | ||
338 | +AC_PREFIX_PROGRAM(screen) | ||
339 | +AC_PREFIX_PROGRAM(gzip) | ||
340 | AC_PREFIX_PROGRAM(screen) | ||
341 | AC_PREFIX_PROGRAM(gzip) | ||
342 | |||
343 | @@ -46,6 +365,7 @@ AC_PROG_CPP | ||
344 | AC_PROG_GCC_TRADITIONAL | ||
345 | AC_ISC_POSIX | ||
346 | |||
347 | +AC_MSG_CHECKING([for compiler sanity]) | ||
348 | AC_TRY_RUN(main(){exit(0);},,[ | ||
349 | if test $CC != cc ; then | ||
350 | AC_NOTE(Your $CC failed - restarting with CC=cc) | ||
351 | @@ -54,14 +374,9 @@ CC=cc | ||
352 | export CC | ||
353 | exec $0 $configure_args | ||
354 | fi | ||
355 | -]) | ||
356 | +],AC_MSG_WARN([skipping test due to crosscompilation])) | ||
357 | |||
358 | -AC_TRY_RUN(main(){exit(0);},, | ||
359 | -exec 5>&2 | ||
360 | -eval $ac_link | ||
361 | -AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;) | ||
362 | -AC_NOTE($ac_compile) | ||
363 | -AC_MSG_ERROR(Can't run the compiler - sorry)) | ||
364 | +AC_MSG_CHECKING([if compiler sets exit status]) | ||
365 | |||
366 | AC_TRY_RUN([ | ||
367 | main() | ||
368 | @@ -69,7 +384,8 @@ main() | ||
369 | int __something_strange_(); | ||
370 | __something_strange_(0); | ||
371 | } | ||
372 | -],AC_MSG_ERROR(Your compiler does not set the exit status - sorry)) | ||
373 | +],AC_MSG_ERROR(Your compiler does not set the exit status - sorry),, | ||
374 | +AC_MSG_WARN(skipping test due to crosscompilation)) | ||
375 | |||
376 | AC_PROG_AWK | ||
377 | |||
378 | @@ -103,6 +419,7 @@ AC_ARG_ENABLE(socket-dir, | ||
379 | dnl | ||
380 | dnl **** special unix variants **** | ||
381 | dnl | ||
382 | +AH_TEMPLATE(ISC,[]) | ||
383 | if test -n "$ISC"; then | ||
384 | AC_DEFINE(ISC) LIBS="$LIBS -linet" | ||
385 | fi | ||
386 | @@ -114,11 +431,13 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again.... | ||
387 | dnl fi | ||
388 | dnl fi | ||
389 | |||
390 | +AH_TEMPLATE([sysV68],[]) | ||
391 | if test -f /sysV68 ; then | ||
392 | AC_DEFINE(sysV68) | ||
393 | fi | ||
394 | |||
395 | AC_CHECKING(for MIPS) | ||
396 | +AH_TEMPLATE([MIPS],[]) | ||
397 | if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then | ||
398 | oldlibs="$LIBS" | ||
399 | test -f /bin/mx || LIBS="$LIBS -lmld" # for nlist. But not on alpha. | ||
400 | @@ -132,6 +451,8 @@ AC_DEFINE(MIPS) | ||
401 | AC_CHECKING(wait3) | ||
402 | AC_TRY_LINK(,[wait3();], , | ||
403 | AC_CHECKING(wait2) | ||
404 | +AH_TEMPLATE([USE_WAIT2],[On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com]) | ||
405 | +dnl TODO(Hannes) shipped config.h.in wraps the define in #ifdef BSDWAIT | ||
406 | AC_TRY_LINK(,[wait2();], | ||
407 | dnl John Rouillard (rouilj@sni-usa.com): | ||
408 | dnl need -I/usr/include/bsd in RISCOS otherwise sockets are broken, no | ||
409 | @@ -154,9 +475,11 @@ if test -f /usr/lib/libpyr.a ; then | ||
410 | oldlibs="$LIBS" | ||
411 | LIBS="$LIBS -lpyr" | ||
412 | AC_CHECKING(Pyramid OSX) | ||
413 | +AH_TEMPLATE([OSX], [Pyramid OSX]) | ||
414 | AC_TRY_LINK(,[open_controlling_pty("")], AC_DEFINE(OSX), LIBS="$oldlibs") | ||
415 | fi | ||
416 | |||
417 | +AH_TEMPLATE([POSIX],[Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX).]) | ||
418 | dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi): | ||
419 | dnl BBN butterfly is not POSIX, but a MACH BSD system. | ||
420 | dnl Do not define POSIX and TERMIO. | ||
421 | @@ -183,6 +506,7 @@ main () { | ||
422 | fi | ||
423 | |||
424 | AC_CHECKING(for System V) | ||
425 | +AH_TEMPLATE([SYSV], [Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX)]) | ||
426 | AC_TRY_COMPILE( | ||
427 | [#include <sys/types.h> | ||
428 | #include <signal.h> | ||
429 | @@ -198,6 +522,11 @@ AC_EGREP_CPP(yes, | ||
430 | oldlibs="$LIBS" | ||
431 | LIBS="$LIBS -lelf" | ||
432 | AC_CHECKING(SVR4) | ||
433 | +AH_TEMPLATE([SVR4],[]) | ||
434 | +AH_TEMPLATE([BUGGYGETLOGIN], | ||
435 | +[If ttyslot() breaks getlogin() by returning indexes to utmp entries | ||
436 | + of type DEAD_PROCESS, then our getlogin() replacement should be | ||
437 | + selected by defining BUGGYGETLOGIN.]) | ||
438 | AC_TRY_LINK([#include <utmpx.h> | ||
439 | ],, | ||
440 | [AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), | ||
441 | @@ -235,6 +564,9 @@ dnl **** Job control **** | ||
442 | dnl | ||
443 | |||
444 | AC_CHECKING(BSD job jontrol) | ||
445 | +AH_TEMPLATE([BSDJOBS], | ||
446 | +[Define BSDJOBS if you have BSD-style job control (both process | ||
447 | + groups and a tty that deals correctly with them)]) | ||
448 | AC_TRY_LINK( | ||
449 | [#include <sys/types.h> | ||
450 | #include <sys/ioctl.h> | ||
451 | @@ -255,6 +587,10 @@ dnl | ||
452 | dnl **** setreuid(), seteuid() **** | ||
453 | dnl | ||
454 | AC_CHECKING(setreuid) | ||
455 | +AH_TEMPLATE([HAVE_SETREUID], | ||
456 | +[If your system has the calls setreuid() and setregid(), | ||
457 | + define HAVE_SETREUID. Otherwise screen will use a forked process to | ||
458 | + safely create output files without retaining any special privileges.]) | ||
459 | AC_TRY_LINK(,[ | ||
460 | #ifdef __hpux | ||
461 | setresuid(0, 0, 0); | ||
462 | @@ -269,6 +605,9 @@ dnl NeXT, AUX, ISC, and ultrix are still broken (no saved uid support) | ||
463 | dnl Solaris seteuid doesn't change the saved uid, bad for | ||
464 | dnl multiuser screen sessions | ||
465 | AC_CHECKING(seteuid) | ||
466 | +AH_TEMPLATE([HAVE_SETEUID], | ||
467 | +[If your system supports BSD4.4's seteuid() and setegid(), define | ||
468 | + HAVE_SETEUID.]) | ||
469 | AC_TRY_LINK(,[ | ||
470 | #if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) | ||
471 | seteuid_is_broken(0); | ||
472 | @@ -292,7 +631,8 @@ dnl | ||
473 | dnl **** FIFO tests **** | ||
474 | dnl | ||
475 | |||
476 | -AC_CHECKING(fifos) | ||
477 | +AC_CACHE_CHECK([usable fifos], | ||
478 | + [screen_cv_sys_fifo_usable], | ||
479 | AC_TRY_RUN([ | ||
480 | #include <sys/types.h> | ||
481 | #include <sys/stat.h> | ||
482 | @@ -357,12 +697,14 @@ main() | ||
483 | exit(1); | ||
484 | exit(0); | ||
485 | } | ||
486 | -], AC_NOTE(- your fifos are usable) fifo=1, | ||
487 | -AC_NOTE(- your fifos are not usable)) | ||
488 | -rm -f /tmp/conftest* | ||
489 | - | ||
490 | -if test -n "$fifo"; then | ||
491 | -AC_CHECKING(for broken fifo implementation) | ||
492 | +], screen_cv_sys_fifo_usable=yes, screen_cv_sys_fifo_usable=no)) | ||
493 | + | ||
494 | +if test X"$screen_cv_sys_fifo_usable" = Xyes; then | ||
495 | +AH_TEMPLATE([BROKEN_PIPE], | ||
496 | +[Define this if your system exits select() immediatly if a pipe is | ||
497 | + opened read-only and no writer has opened it.]) | ||
498 | +AC_CACHE_CHECK([broken fifo implementation], | ||
499 | + [screen_cv_sys_fifo_broken_impl], | ||
500 | AC_TRY_RUN([ | ||
501 | #include <sys/types.h> | ||
502 | #include <fcntl.h> | ||
503 | @@ -407,9 +749,11 @@ main() | ||
504 | exit(1); | ||
505 | exit(0); | ||
506 | } | ||
507 | -], AC_NOTE(- your implementation is ok), | ||
508 | -AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1) | ||
509 | -rm -f /tmp/conftest* | ||
510 | +], screen_cv_sys_fifo_broken_impl=no, | ||
511 | +screen_cv_sys_fifo_broken_impl=yes)) | ||
512 | +if test X"$screen_cv_sys_fifo_broken_impl" = Xyes; then | ||
513 | + AC_DEFINE(BROKEN_PIPE) | ||
514 | +fi | ||
515 | fi | ||
516 | |||
517 | dnl | ||
518 | @@ -418,7 +762,8 @@ dnl | ||
519 | dnl may need LIBS="$LIBS -lsocket" here | ||
520 | dnl | ||
521 | |||
522 | -AC_CHECKING(sockets) | ||
523 | +AC_CACHE_CHECK([sockets are usable], | ||
524 | + [screen_cv_sys_sockets_usable], | ||
525 | AC_TRY_RUN([ | ||
526 | #include <sys/types.h> | ||
527 | #include <sys/socket.h> | ||
528 | @@ -469,12 +814,16 @@ main() | ||
529 | exit(1); | ||
530 | exit(0); | ||
531 | } | ||
532 | -], AC_NOTE(- your sockets are usable) sock=1, | ||
533 | -AC_NOTE(- your sockets are not usable)) | ||
534 | -rm -f /tmp/conftest* | ||
535 | +], screen_cv_sys_sockets_usable=yes, | ||
536 | +screen_cv_sys_sockets_usable=no)) | ||
537 | |||
538 | -if test -n "$sock"; then | ||
539 | +if test X"$screen_cv_sys_sockets_usable" = Xyes; then | ||
540 | AC_CHECKING(socket implementation) | ||
541 | +AH_TEMPLATE([SOCK_NOT_IN_FS], | ||
542 | +[Define this if the unix-domain socket implementation doesn't | ||
543 | + create a socket in the filesystem.]) | ||
544 | +AC_CACHE_CHECK([if sockets are not stored in the filesystem], | ||
545 | + [screen_cv_sys_sockets_nofs], | ||
546 | AC_TRY_RUN([ | ||
547 | #include <sys/types.h> | ||
548 | #include <sys/stat.h> | ||
549 | @@ -500,22 +849,25 @@ main() | ||
550 | close(s); | ||
551 | exit(0); | ||
552 | } | ||
553 | -],AC_NOTE(- you are normal), | ||
554 | -AC_NOTE(- unix domain sockets are not kept in the filesystem) | ||
555 | -AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1) | ||
556 | -rm -f /tmp/conftest* | ||
557 | +], screen_cv_sys_sockets_nofs=no, | ||
558 | +screen_cv_sys_sockets_nofs=yes)) | ||
559 | + | ||
560 | +if test X"$screen_cv_sys_sockets_nofs" = Xyes; then | ||
561 | + AC_DEFINE(SOCK_NOT_IN_FS) | ||
562 | +fi | ||
563 | fi | ||
564 | |||
565 | |||
566 | dnl | ||
567 | dnl **** choose sockets or fifos **** | ||
568 | dnl | ||
569 | -if test -n "$fifo"; then | ||
570 | - if test -n "$sock"; then | ||
571 | - if test -n "$nore"; then | ||
572 | +AH_TEMPLATE([NAMEDPIPE], [Define this if your system supports named pipes.]) | ||
573 | +if test X"$screen_cv_sys_fifo_usable" = Xyes; then | ||
574 | + if test X"$screen_cv_sys_sockets_usable" = Xyes; then | ||
575 | + if test X"$screen_cv_sys_sockets_nofs" = Xyes; then | ||
576 | AC_NOTE(- hmmm... better take the fifos) | ||
577 | AC_DEFINE(NAMEDPIPE) | ||
578 | - elif test -n "$fifobr"; then | ||
579 | + elif test X"$screen_cv_sys_fifo_broken_impl" = Xyes; then | ||
580 | AC_NOTE(- as your fifos are broken lets use the sockets.) | ||
581 | else | ||
582 | AC_NOTE(- both sockets and fifos usable. let's take fifos.) | ||
583 | @@ -525,7 +877,7 @@ if test -n "$fifo"; then | ||
584 | AC_NOTE(- using named pipes, of course) | ||
585 | AC_DEFINE(NAMEDPIPE) | ||
586 | fi | ||
587 | -elif test -n "$sock"; then | ||
588 | +elif test X"$screen_cv_sys_sockets_usable" = Xyes; then | ||
589 | AC_NOTE(- using unix-domain sockets, of course) | ||
590 | else | ||
591 | AC_MSG_ERROR(you have neither usable sockets nor usable pipes -> no screen) | ||
592 | @@ -535,7 +887,11 @@ dnl | ||
593 | dnl **** check the select implementation **** | ||
594 | dnl | ||
595 | |||
596 | -AC_CHECKING(select return value) | ||
597 | +AH_TEMPLATE([SELECT_BROKEN], | ||
598 | +[If the select return value doesn't treat a descriptor that is | ||
599 | + usable for reading and writing as two hits, define SELECT_BROKEN.]) | ||
600 | +AC_CACHE_CHECK([for broken select return value], | ||
601 | + [screen_cv_sys_select_broken_retval], | ||
602 | AC_TRY_RUN([ | ||
603 | #include <sys/types.h> | ||
604 | #include <sys/stat.h> | ||
605 | @@ -634,17 +990,26 @@ main() | ||
606 | exit(1); | ||
607 | exit(0); | ||
608 | } | ||
609 | -],AC_NOTE(- select is ok), | ||
610 | -AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN)) | ||
611 | +], screen_cv_sys_select_broken_retval=no, | ||
612 | +screen_cv_sys_select_broken_retval=yes)) | ||
613 | +if test X"$screen_cv_sys_select_broken_retval" = Xyes; then | ||
614 | + AC_DEFINE(SELECT_BROKEN) | ||
615 | +fi | ||
616 | |||
617 | dnl | ||
618 | dnl **** termcap or terminfo **** | ||
619 | dnl | ||
620 | +AH_TEMPLATE([TERMINFO], | ||
621 | +[Define TERMINFO if your machine emulates the termcap routines | ||
622 | + with the terminfo database. | ||
623 | + Thus the .screenrc file is parsed for | ||
624 | + the command 'terminfo' and not 'termcap']) | ||
625 | AC_CHECKING(for tgetent) | ||
626 | AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, | ||
627 | olibs="$LIBS" | ||
628 | LIBS="-lcurses $olibs" | ||
629 | AC_CHECKING(libcurses) | ||
630 | +AC_CHECK_LIB(ncursesw,tgetent) | ||
631 | AC_TRY_LINK(,[ | ||
632 | #ifdef __hpux | ||
633 | __sorry_hpux_libcurses_is_totally_broken_in_10_10(); | ||
634 | @@ -662,25 +1027,39 @@ LIBS="-lncurses $olibs" | ||
635 | AC_CHECKING(libncurses) | ||
636 | AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, | ||
637 | AC_MSG_ERROR(!!! no tgetent - no screen)))))) | ||
638 | - | ||
639 | -AC_TRY_RUN([ | ||
640 | +AC_CACHE_CHECK([using terminfo database],[screen_cv_sys_terminfo_used], | ||
641 | + AC_TRY_RUN([ | ||
642 | main() | ||
643 | { | ||
644 | exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); | ||
645 | -}], AC_NOTE(- you use the termcap database), | ||
646 | -AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO)) | ||
647 | +} | ||
648 | + ], screen_cv_sys_terminfo_used=no, | ||
649 | + screen_cv_sys_terminfo_used=yes) | ||
650 | +) | ||
651 | + | ||
652 | +if test X"$screen_cv_sys_terminfo_used" = Xyes; then | ||
653 | + AC_DEFINE(TERMINFO) | ||
654 | +fi | ||
655 | + | ||
656 | AC_CHECKING(ospeed) | ||
657 | +AH_TEMPLATE([NEED_OSPEED],[If your library does not define ospeed, define this.]) | ||
658 | AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) | ||
659 | |||
660 | dnl | ||
661 | dnl **** PTY specific things **** | ||
662 | dnl | ||
663 | +AH_TEMPLATE([HAVE_DEV_PTC], | ||
664 | +[define HAVE_DEV_PTC if you have a /dev/ptc character special | ||
665 | + device.]) | ||
666 | AC_CHECKING(for /dev/ptc) | ||
667 | if test -r /dev/ptc; then | ||
668 | AC_DEFINE(HAVE_DEV_PTC) | ||
669 | fi | ||
670 | |||
671 | AC_CHECKING(for SVR4 ptys) | ||
672 | +AH_TEMPLATE([HAVE_SVR4_PTYS], | ||
673 | +[define HAVE_SVR4_PTYS if you have a /dev/ptmx character special | ||
674 | + device and support the ptsname(), grantpt(), unlockpt() functions.]) | ||
675 | sysvr4ptys= | ||
676 | if test -c /dev/ptmx ; then | ||
677 | AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS) | ||
678 | @@ -696,6 +1075,13 @@ AC_CHECK_FUNCS(openpty,, | ||
679 | fi | ||
680 | |||
681 | AC_CHECKING(for ptyranges) | ||
682 | +AH_TEMPLATE([PTYRANGE0], | ||
683 | +[define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen | ||
684 | + to unusual environments. E.g. For SunOs the defaults are "qpr" and | ||
685 | + "0123456789abcdef". For SunOs 4.1.2 | ||
686 | + #define PTYRANGE0 "pqrstuvwxyzPQRST" | ||
687 | + is recommended by Dan Jacobson.]) | ||
688 | +AH_TEMPLATE([PTYRANGE1],[]) | ||
689 | if test -d /dev/ptym ; then | ||
690 | pdir='/dev/ptym' | ||
691 | else | ||
692 | @@ -812,6 +1198,9 @@ dnl | ||
693 | dnl **** utmp handling **** | ||
694 | dnl | ||
695 | AC_CHECKING(getutent) | ||
696 | +AH_TEMPLATE([GETUTENT], | ||
697 | +[If your system has getutent(), pututline(), etc. to write to the | ||
698 | + utmp file, define GETUTENT.]) | ||
699 | AC_TRY_LINK([ | ||
700 | #include <time.h> /* to get time_t on SCO */ | ||
701 | #include <sys/types.h> | ||
702 | @@ -845,6 +1234,7 @@ AC_TRY_LINK([ | ||
703 | [int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), LIBS="$olibs") | ||
704 | ) | ||
705 | AC_CHECKING(ut_host) | ||
706 | +AH_TEMPLATE([UTHOST],[Define UTHOST if the utmp file has a host field.]) | ||
707 | AC_TRY_COMPILE([ | ||
708 | #include <time.h> | ||
709 | #include <sys/types.h> | ||
710 | @@ -855,8 +1245,9 @@ AC_TRY_COMPILE([ | ||
711 | #include <utmp.h> | ||
712 | #endif | ||
713 | ],[struct utmp u; u.ut_host[0] = 0;], AC_DEFINE(UTHOST)) | ||
714 | +AH_TEMPLATE([HAVE_UTEMPTER],[Define if you have the utempter utmp helper program]) | ||
715 | AC_CHECK_HEADER(utempter.h, have_utempter=yes, have_utempter=no) | ||
716 | -if test "$have_utempter" = yes; then | ||
717 | +if test X"$have_utempter" = Xyes; then | ||
718 | AC_DEFINE(HAVE_UTEMPTER) | ||
719 | LIBS="$LIBS -lutempter" | ||
720 | fi | ||
721 | @@ -864,20 +1255,39 @@ fi | ||
722 | dnl | ||
723 | dnl **** loadav **** | ||
724 | dnl | ||
725 | + | ||
726 | +AH_TEMPLATE([LOADAV], | ||
727 | +[If you want the "time" command to display the current load average | ||
728 | + define LOADAV. Maybe you must install screen with the needed | ||
729 | + privileges to read /dev/kmem. | ||
730 | + Note that NLIST_ stuff is only checked, when getloadavg() is not available. | ||
731 | +]) | ||
732 | +AH_TEMPLATE([LOADAV_NUM]) | ||
733 | +AH_TEMPLATE([LOADAV_TYPE]) | ||
734 | +AH_TEMPLATE([LOADAV_SCALE]) | ||
735 | +AH_TEMPLATE([LOADAV_GETLOADAVG]) | ||
736 | +AH_TEMPLATE([LOADAV_UNIX]) | ||
737 | +AH_TEMPLATE([LOADAV_AVENRUN]) | ||
738 | +AH_TEMPLATE([LOADAV_USE_NLIST64]) | ||
739 | + | ||
740 | +AH_TEMPLATE([NLIST_DECLARED]) | ||
741 | +AH_TEMPLATE([NLIST_STRUCT]) | ||
742 | +AH_TEMPLATE([NLIST_NAME_UNION]) | ||
743 | + | ||
744 | AC_CHECKING(for libutil(s)) | ||
745 | -test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" | ||
746 | -test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" | ||
747 | +dnl I have no idea whether "login" is an appropriate symbol to check for here - Hannes | ||
748 | +AC_CHECK_LIB(utils,login) | ||
749 | +AC_CHECK_LIB(util,login) | ||
750 | |||
751 | AC_CHECKING(getloadavg) | ||
752 | AC_TRY_LINK(,[getloadavg((double *)0, 0);], | ||
753 | AC_DEFINE(LOADAV_GETLOADAVG) load=1, | ||
754 | -if test -f /usr/lib/libkvm.a ; then | ||
755 | olibs="$LIBS" | ||
756 | -LIBS="$LIBS -lkvm" | ||
757 | +AC_CHECK_LIB(kvm,kvm_open, | ||
758 | AC_CHECKING(getloadavg with -lkvm) | ||
759 | AC_TRY_LINK(,[getloadavg((double *)0, 0);], | ||
760 | AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs") | ||
761 | -fi | ||
762 | +) | ||
763 | ) | ||
764 | |||
765 | if test -z "$load" ; then | ||
766 | @@ -1019,6 +1429,12 @@ if test -n "$loadscale" ; then AC_DEFINE_UNQUOTED(LOADAV_SCALE,$loadscale) fi | ||
767 | dnl | ||
768 | dnl **** signal handling **** | ||
769 | dnl | ||
770 | + | ||
771 | +AH_TEMPLATE([SIGVOID], | ||
772 | +[Define SIGVOID if your signal handlers return void. On older | ||
773 | + systems, signal returns int, but on newer ones, it returns void.]) | ||
774 | + | ||
775 | + | ||
776 | if test -n "$posix" ; then | ||
777 | |||
778 | dnl POSIX has reliable signals with void return type. | ||
779 | @@ -1036,6 +1452,7 @@ AC_TRY_COMPILE( | ||
780 | #endif | ||
781 | extern void (*signal ()) ();], [int i;], AC_DEFINE(SIGVOID)) | ||
782 | AC_CHECKING(sigset) | ||
783 | +AH_TEMPLATE([USESIGSET], [Define USESIGSET if you have sigset for BSD 4.1 reliable signals.]) | ||
784 | AC_TRY_LINK([ | ||
785 | #include <sys/types.h> | ||
786 | #include <signal.h> | ||
787 | @@ -1047,6 +1464,9 @@ sigset(0, (int (*)())0); | ||
788 | #endif | ||
789 | ], AC_DEFINE(USESIGSET)) | ||
790 | AC_CHECKING(signal implementation) | ||
791 | +AH_TEMPLATE([SYSVSIGS], | ||
792 | +[Define SYSVSIGS if signal handlers must be reinstalled after | ||
793 | + they have been called.]) | ||
794 | AC_TRY_RUN([ | ||
795 | #include <sys/types.h> | ||
796 | #include <signal.h> | ||
797 | @@ -1089,13 +1509,14 @@ dnl **** libraries **** | ||
798 | dnl | ||
799 | |||
800 | AC_CHECKING(for crypt and sec libraries) | ||
801 | -test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d" | ||
802 | +dnl I have no idea whether "crypt" is an appropriate symbol to check for here - Hannes | ||
803 | +AC_CHECK_LIB(crypt_d,crypt) | ||
804 | oldlibs="$LIBS" | ||
805 | -LIBS="$LIBS -lcrypt" | ||
806 | AC_CHECKING(crypt) | ||
807 | AC_TRY_LINK(,,,LIBS="$oldlibs") | ||
808 | -test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" | ||
809 | -test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" | ||
810 | +AC_CHECK_LIB(crypt,crypt) | ||
811 | +AC_CHECK_LIB(sec,crypt) | ||
812 | +AC_CHECK_LIB(shadow,getspnam) | ||
813 | oldlibs="$LIBS" | ||
814 | LIBS="$LIBS -lsun" | ||
815 | AC_CHECKING(IRIX sun library) | ||
816 | @@ -1118,6 +1539,13 @@ dnl | ||
817 | dnl **** misc things **** | ||
818 | dnl | ||
819 | AC_CHECKING(wait union) | ||
820 | +AH_TEMPLATE([BSDWAIT], | ||
821 | +[Define BSDWAIT if your system defines a 'union wait' in <sys/wait.h> | ||
822 | + | ||
823 | + Only allow BSDWAIT i.e. wait3 on nonposix systems, since | ||
824 | + posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl | ||
825 | + TODO(Hannes) shipped config.h.in does that with a #ifdef | ||
826 | +]) | ||
827 | AC_TRY_COMPILE([#include <sys/types.h> | ||
828 | #include <sys/wait.h> | ||
829 | ],[ | ||
830 | @@ -1128,6 +1556,12 @@ AC_TRY_COMPILE([#include <sys/types.h> | ||
831 | #endif | ||
832 | ],AC_DEFINE(BSDWAIT)) | ||
833 | |||
834 | +AH_TEMPLATE([TERMIO], | ||
835 | +[Define TERMIO if you have struct termio instead of struct sgttyb. | ||
836 | + This is usually the case for SVID systems, where BSD uses sgttyb. | ||
837 | + POSIX systems should define this anyway, even though they use | ||
838 | + struct termios.]) | ||
839 | + | ||
840 | if test -z "$butterfly"; then | ||
841 | AC_CHECKING(for termio or termios) | ||
842 | AC_TRY_CPP([#include <termio.h>], AC_DEFINE(TERMIO), | ||
843 | @@ -1137,17 +1571,34 @@ fi | ||
844 | ) | ||
845 | fi | ||
846 | |||
847 | +AH_TEMPLATE([CYTERMIO], [Define CYTERMIO if you have cyrillic termio modes.]) | ||
848 | dnl AC_CHECK_HEADER(shadow.h, AC_DEFINE(SHADOWPW)) | ||
849 | AC_CHECKING(getspnam) | ||
850 | +AH_TEMPLATE([SHADOWPW], | ||
851 | +[If the passwords are stored in a shadow file and you want the | ||
852 | + builtin lock to work properly, define SHADOWPW.]) | ||
853 | AC_TRY_LINK([#include <shadow.h>], [getspnam("x");],AC_DEFINE(SHADOWPW)) | ||
854 | |||
855 | AC_CHECKING(getttyent) | ||
856 | +AH_TEMPLATE([GETTTYENT], | ||
857 | +[If your system has the new format /etc/ttys (like 4.3 BSD) and the | ||
858 | + getttyent(3) library functions, define GETTTYENT.]) | ||
859 | AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT)) | ||
860 | |||
861 | AC_CHECKING(fdwalk) | ||
862 | +AH_TEMPLATE([HAVE_FDWALK], | ||
863 | +[Newer versions of Solaris include fdwalk, which can greatly improve | ||
864 | + the startup time of screen; otherwise screen spends a lot of time | ||
865 | + closing file descriptors.]) | ||
866 | AC_TRY_LINK([#include <stdlib.h>], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK)) | ||
867 | |||
868 | -AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments) | ||
869 | +AH_TEMPLATE([USEBCOPY], | ||
870 | +[Define USEBCOPY if the bcopy/memcpy from your system's C library | ||
871 | + supports the overlapping of source and destination blocks. When | ||
872 | + undefined, screen uses its own (probably slower) version of bcopy().]) | ||
873 | + | ||
874 | +AC_CACHE_CHECK([if bcopy handles overlap], | ||
875 | + [screen_cv_sys_bcopy_overlap], | ||
876 | AC_TRY_RUN([ | ||
877 | main() { | ||
878 | char buf[10]; | ||
879 | @@ -1160,8 +1611,21 @@ main() { | ||
880 | if (strncmp(buf, "cdedef", 6)) | ||
881 | exit(1); | ||
882 | exit(0); /* libc version works properly. */ | ||
883 | -}], AC_DEFINE(USEBCOPY)) | ||
884 | +}], screen_cv_sys_bcopy_overlap=yes, | ||
885 | +screen_cv_sys_bcopy_overlap=no)) | ||
886 | +if test X"$screen_cv_sys_bcopy_overlap" = Xyes; then | ||
887 | + AC_DEFINE(USEBCOPY) | ||
888 | +fi | ||
889 | |||
890 | +AH_TEMPLATE([USEMEMMOVE], | ||
891 | +[SYSV machines may have a working memcpy() -- Oh, this is | ||
892 | + quite unlikely. Tell me if you see one. | ||
893 | + "But then, memmove() should work, if at all available" he thought... | ||
894 | + Boing, never say "works everywhere" unless you checked SCO UNIX. | ||
895 | + Their memove fails the test in the configure script. Sigh. (Juergen) | ||
896 | +]) | ||
897 | +AC_CACHE_CHECK([if memmove handles overlap], | ||
898 | + [screen_cv_sys_memmove_overlap], | ||
899 | AC_TRY_RUN([ | ||
900 | #define bcopy(s,d,l) memmove(d,s,l) | ||
901 | main() { | ||
902 | @@ -1175,9 +1639,15 @@ main() { | ||
903 | if (strncmp(buf, "cdedef", 6)) | ||
904 | exit(1); | ||
905 | exit(0); /* libc version works properly. */ | ||
906 | -}], AC_DEFINE(USEMEMMOVE)) | ||
907 | - | ||
908 | +}], screen_cv_sys_memmove_overlap=yes, | ||
909 | +screen_cv_sys_memmove_overlap=no)) | ||
910 | +if test X"$screen_cv_sys_memmove_overlap" = Xyes; then | ||
911 | + AC_DEFINE(USEMEMMOVE) | ||
912 | +fi | ||
913 | |||
914 | +AH_TEMPLATE([USEMEMCPY],[]) | ||
915 | +AC_CACHE_CHECK([if memcpy handles overlap], | ||
916 | + [screen_cv_sys_memcpy_overlap], | ||
917 | AC_TRY_RUN([ | ||
918 | #define bcopy(s,d,l) memcpy(d,s,l) | ||
919 | main() { | ||
920 | @@ -1191,9 +1661,19 @@ main() { | ||
921 | if (strncmp(buf, "cdedef", 6)) | ||
922 | exit(1); | ||
923 | exit(0); /* libc version works properly. */ | ||
924 | -}], AC_DEFINE(USEMEMCPY)) | ||
925 | +}], screen_cv_sys_memcpy_overlap=yes, | ||
926 | +screen_cv_sys_memcpy_overlap=no)) | ||
927 | +if test X"$screen_cv_sys_memcpy_overlap" = Xyes; then | ||
928 | + AC_DEFINE(USEMEMCPY) | ||
929 | +fi | ||
930 | |||
931 | AC_MSG_CHECKING(long file names) | ||
932 | +AH_TEMPLATE([NAME_MAX], | ||
933 | +[If you are on a SYS V machine that restricts filename length to 14 | ||
934 | + characters, you may need to enforce that by setting NAME_MAX to 14]) | ||
935 | +dnl TODO(Hannes) shipped config.h.in has | ||
936 | +dnl #undef NAME_MAX /* KEEP_UNDEF_HERE override system value */ | ||
937 | +dnl ahead of this | ||
938 | (echo 1 > /tmp/conftest9012345) 2>/dev/null | ||
939 | (echo 2 > /tmp/conftest9012346) 2>/dev/null | ||
940 | val=`cat /tmp/conftest9012345 2>/dev/null` | ||
941 | @@ -1206,17 +1686,28 @@ fi | ||
942 | rm -f /tmp/conftest* | ||
943 | |||
944 | AC_MSG_CHECKING(for vsprintf) | ||
945 | +AH_TEMPLATE([USEVARARGS], | ||
946 | +[If your system has vsprintf() and requires the use of the macros in | ||
947 | + "varargs.h" to use functions with variable arguments, | ||
948 | + define USEVARARGS.]) | ||
949 | AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) | ||
950 | |||
951 | AC_HEADER_DIRENT | ||
952 | |||
953 | AC_MSG_CHECKING(for setenv) | ||
954 | +AH_TEMPLATE([USESETENV], [If your system has setenv() and unsetenv() define USESETENV]) | ||
955 | AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE(USESETENV), | ||
956 | AC_MSG_RESULT(no) | ||
957 | AC_MSG_CHECKING(for putenv) | ||
958 | +AH_TEMPLATE([NEEDPUTENV], | ||
959 | +[If your system does not come with a setenv()/putenv()/getenv() | ||
960 | + functions, you may bring in our own code by defining NEEDPUTENV.]) | ||
961 | AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) , AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV) | ||
962 | )) | ||
963 | AC_MSG_CHECKING([for nl_langinfo(CODESET)]) | ||
964 | +AH_TEMPLATE([HAVE_NL_LANGINFO], | ||
965 | +[define HAVE_NL_LANGINFO if your system has the nl_langinfo() call | ||
966 | + and <langinfo.h> defines CODESET.]) | ||
967 | AC_TRY_LINK([ | ||
968 | #include <langinfo.h> | ||
969 | ],[nl_langinfo(CODESET);], AC_MSG_RESULT(yes);AC_DEFINE(HAVE_NL_LANGINFO), AC_MSG_RESULT(no)) | ||
970 | @@ -1266,7 +1757,8 @@ fi | ||
971 | dnl Ptx bug workaround -- insert -lc after -ltermcap | ||
972 | test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq" | ||
973 | |||
974 | -AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.)) | ||
975 | +AC_MSG_CHECKING(compiler sanity) | ||
976 | +AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.), AC_MSG_WARN(Skipping test due to crosscompilation)) | ||
977 | |||
978 | ETCSCREENRC="\"/usr/local/etc/screenrc\"" | ||
979 | if test -n "$prefix"; then | ||
diff --git a/meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch b/meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch new file mode 100644 index 0000000000..e0caf5d83e --- /dev/null +++ b/meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | This fixes the parallel make install failure | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
6 | |||
7 | Index: screen-4.0.3/Makefile.in | ||
8 | =================================================================== | ||
9 | --- screen-4.0.3.orig/Makefile.in | ||
10 | +++ screen-4.0.3/Makefile.in | ||
11 | @@ -70,7 +70,7 @@ screen: $(OFILES) | ||
12 | .c.o: | ||
13 | $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $< | ||
14 | |||
15 | -install_bin: .version screen | ||
16 | +install_bin: .version screen installdirs | ||
17 | -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \ | ||
18 | then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi | ||
19 | $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) | ||
diff --git a/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.2-CVE-2009-1215.patch b/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.2-CVE-2009-1215.patch new file mode 100644 index 0000000000..538a8fa3b2 --- /dev/null +++ b/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.2-CVE-2009-1215.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | This patch is a backport from screen_4.0.3-11+lenny1.diff | ||
4 | to fix CVE-2009-1215. | ||
5 | |||
6 | Signed-off-by: Shenbo Huang<shenbo.huang@windriver.com) | ||
7 | --- | ||
8 | properly by keeping the umask instead of dropping | ||
9 | the 'public exchange file' concept. Modify dpatch 22. | ||
10 | <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521123> | ||
11 | --- | ||
12 | fileio.c | 5 ----- | ||
13 | 1 file changed, 5 deletions(-) | ||
14 | --- a/fileio.c | ||
15 | +++ b/fileio.c | ||
16 | @@ -365,11 +365,6 @@ int dump; | ||
17 | char *mode = "w"; | ||
18 | #ifdef COPY_PASTE | ||
19 | int public = 0; | ||
20 | -# ifdef _MODE_T | ||
21 | - mode_t old_umask; | ||
22 | -# else | ||
23 | - int old_umask; | ||
24 | -# endif | ||
25 | # ifdef HAVE_LSTAT | ||
26 | struct stat stb, stb2; | ||
27 | int fd, exists = 0; | ||
diff --git a/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.3-CVE-2009-1214.patch b/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.3-CVE-2009-1214.patch new file mode 100644 index 0000000000..104fa82dd6 --- /dev/null +++ b/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.3-CVE-2009-1214.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | The patch to fix CVE-2009-1214 | ||
4 | A security flaw was found in the screen utility in the way it used to create | ||
5 | one particular temporary file. An attacker could use this flaw to perform | ||
6 | a symlink attack. | ||
7 | Fix race condition creating temporary file | ||
8 | |||
9 | Reference: | ||
10 | https://bugzilla.redhat.com/show_bug.cgi?id=492104 | ||
11 | |||
12 | Signed-off-by: Chenyang Guo <chenyang.guo@windriver.com> | ||
13 | --- | ||
14 | fileio.c | 48 ++++++++++++++++++++++++++++++++---------------- | ||
15 | 1 file changed, 32 insertions(+), 16 deletions(-) | ||
16 | |||
17 | --- a/fileio.c | ||
18 | +++ b/fileio.c | ||
19 | @@ -414,6 +414,14 @@ int dump; | ||
20 | } | ||
21 | public = !strcmp(fn, DEFAULT_BUFFERFILE); | ||
22 | # ifdef HAVE_LSTAT | ||
23 | + /* | ||
24 | + * Note: In the time between lstat() and open()/remove() below are | ||
25 | + * called, the file can be created/removed/modified. Therefore the | ||
26 | + * information lstat() returns is taken into consideration, but not | ||
27 | + * relied upon. In particular, the open()/remove() calls can fail, and | ||
28 | + * the code must account for that. Symlink attack could be mounted if | ||
29 | + * the code is changed carelessly. --rdancer 2009-01-11 | ||
30 | + */ | ||
31 | exists = !lstat(fn, &stb); | ||
32 | if (public && exists && (S_ISLNK(stb.st_mode) || stb.st_nlink > 1)) | ||
33 | { | ||
34 | @@ -432,28 +440,36 @@ int dump; | ||
35 | #ifdef COPY_PASTE | ||
36 | if (dump == DUMP_EXCHANGE && public) | ||
37 | { | ||
38 | + /* | ||
39 | + * Setting umask to zero is a bad idea -- the user surely doesn't | ||
40 | + * expect a publicly readable file in a publicly readable directory | ||
41 | + * --rdancer 2009-01-11 | ||
42 | + */ | ||
43 | + /* | ||
44 | old_umask = umask(0); | ||
45 | + */ | ||
46 | # ifdef HAVE_LSTAT | ||
47 | if (exists) | ||
48 | - { | ||
49 | - if ((fd = open(fn, O_WRONLY, 0666)) >= 0) | ||
50 | - { | ||
51 | - if (fstat(fd, &stb2) == 0 && stb.st_dev == stb2.st_dev && stb.st_ino == stb2.st_ino) | ||
52 | - ftruncate(fd, 0); | ||
53 | - else | ||
54 | - { | ||
55 | - close(fd); | ||
56 | - fd = -1; | ||
57 | - } | ||
58 | - } | ||
59 | - } | ||
60 | - else | ||
61 | - fd = open(fn, O_WRONLY|O_CREAT|O_EXCL, 0666); | ||
62 | - f = fd >= 0 ? fdopen(fd, mode) : 0; | ||
63 | + if (remove(fn) == -1) | ||
64 | + { | ||
65 | + /* Error */ | ||
66 | + debug2("WriteFile: File exists and remove(%s) failed: %s\n", | ||
67 | + fn, strerror(errno)); | ||
68 | + UserReturn(0); | ||
69 | + } | ||
70 | # else | ||
71 | - f = fopen(fn, mode); | ||
72 | + (void) remove(fn); | ||
73 | # endif | ||
74 | + /* | ||
75 | + * No r/w permissions for anybody but the user, as the file may be in | ||
76 | + * a public directory -- if the user chooses, they can chmod the file | ||
77 | + * afterwards. --rdancer 2008-01-11 | ||
78 | + */ | ||
79 | + fd = open(fn, O_WRONLY|O_CREAT|O_EXCL, 0600); | ||
80 | + f = fd >= 0 ? fdopen(fd, mode) : 0; | ||
81 | + /* | ||
82 | umask(old_umask); | ||
83 | + */ | ||
84 | } | ||
85 | else | ||
86 | #endif /* COPY_PASTE */ | ||
diff --git a/meta/recipes-extended/screen/screen-4.0.3/screen.pam b/meta/recipes-extended/screen/screen-4.0.3/screen.pam new file mode 100644 index 0000000000..ff657fa07c --- /dev/null +++ b/meta/recipes-extended/screen/screen-4.0.3/screen.pam | |||
@@ -0,0 +1,2 @@ | |||
1 | #%PAM-1.0 | ||
2 | auth include common-auth | ||
diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb new file mode 100644 index 0000000000..c5218ec1db --- /dev/null +++ b/meta/recipes-extended/screen/screen_4.0.3.bb | |||
@@ -0,0 +1,52 @@ | |||
1 | SUMMARY = "Multiplexing terminal manager" | ||
2 | DESCRIPTION = "Screen is a full-screen window manager \ | ||
3 | that multiplexes a physical terminal between several \ | ||
4 | processes, typically interactive shells." | ||
5 | HOMEPAGE = "http://www.gnu.org/software/screen/" | ||
6 | BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen" | ||
7 | |||
8 | LICENSE = "GPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=0774d66808b0f602e94448108f59448b \ | ||
10 | file://screen.h;endline=23;md5=9a7ae69a2aafed891bf7c38ddf9f6b7d" | ||
11 | |||
12 | SECTION = "console/utils" | ||
13 | DEPENDS = "ncurses \ | ||
14 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
15 | RDEPENDS_${PN} = "base-files" | ||
16 | |||
17 | PR = "r4" | ||
18 | |||
19 | SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz;name=tarball \ | ||
20 | ${DEBIAN_MIRROR}/main/s/screen/screen_4.0.3-14.diff.gz;name=patch \ | ||
21 | file://configure.patch \ | ||
22 | file://fix-parallel-make.patch \ | ||
23 | file://screen-4.0.3-CVE-2009-1214.patch \ | ||
24 | file://screen-4.0.2-CVE-2009-1215.patch \ | ||
25 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" | ||
26 | |||
27 | PAM_SRC_URI = "file://screen.pam" | ||
28 | |||
29 | SRC_URI[tarball.md5sum] = "8506fd205028a96c741e4037de6e3c42" | ||
30 | SRC_URI[tarball.sha256sum] = "78f0d5b1496084a5902586304d4a73954b2bfe33ea13edceecf21615c39e6c77" | ||
31 | |||
32 | SRC_URI[patch.md5sum] = "5960bdae6782ee9356b7e0e0a1fa7c19" | ||
33 | SRC_URI[patch.sha256sum] = "10acb274b2fb0bb7137a0d66e52fa0f18125bc5198c7a8d5af381b4b30636316" | ||
34 | |||
35 | inherit autotools texinfo | ||
36 | |||
37 | EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \ | ||
38 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}" | ||
39 | |||
40 | do_install_append () { | ||
41 | if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then | ||
42 | install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen | ||
43 | fi | ||
44 | } | ||
45 | |||
46 | pkg_postinst_${PN} () { | ||
47 | grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells | ||
48 | } | ||
49 | |||
50 | pkg_postrm_${PN} () { | ||
51 | printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells | ||
52 | } | ||
diff --git a/meta/recipes-extended/sed/sed-4.1.2/Makevars b/meta/recipes-extended/sed/sed-4.1.2/Makevars new file mode 100644 index 0000000000..8b09f53b0f --- /dev/null +++ b/meta/recipes-extended/sed/sed-4.1.2/Makevars | |||
@@ -0,0 +1,25 @@ | |||
1 | # Makefile variables for PO directory in any package using GNU gettext. | ||
2 | |||
3 | # Usually the message domain is the same as the package name. | ||
4 | DOMAIN = $(PACKAGE) | ||
5 | |||
6 | # These two variables depend on the location of this directory. | ||
7 | subdir = po | ||
8 | top_builddir = .. | ||
9 | |||
10 | # These options get passed to xgettext. | ||
11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ | ||
12 | |||
13 | # This is the copyright holder that gets inserted into the header of the | ||
14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding | ||
15 | # package. (Note that the msgstr strings, extracted from the package's | ||
16 | # sources, belong to the copyright holder of the package.) Translators are | ||
17 | # expected to transfer the copyright for their translations to this person | ||
18 | # or entity, or to disclaim their copyright. The empty string stands for | ||
19 | # the public domain; in this case the translators are expected to disclaim | ||
20 | # their copyright. | ||
21 | COPYRIGHT_HOLDER = Free Software Foundation, Inc. | ||
22 | |||
23 | # This is the list of locale categories, beyond LC_MESSAGES, for which the | ||
24 | # message catalogs shall be used. It is usually empty. | ||
25 | EXTRA_LOCALE_CATEGORIES = | ||
diff --git a/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch b/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch new file mode 100644 index 0000000000..836551ea18 --- /dev/null +++ b/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Change the getline return type to match its declaration. | ||
4 | |||
5 | Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> | ||
6 | |||
7 | diff -urN sed-4.1.2-orig/lib/getline.c sed-4.1.2/lib/getline.c | ||
8 | --- sed-4.1.2-orig/lib/getline.c 2010-08-31 08:47:50.070094024 +0800 | ||
9 | +++ sed-4.1.2/lib/getline.c 2010-08-31 08:48:50.982178172 +0800 | ||
10 | @@ -30,7 +30,7 @@ | ||
11 | necessary. Returns the number of characters read (not including the | ||
12 | null terminator), or -1 on error or EOF. */ | ||
13 | |||
14 | -size_t | ||
15 | +ssize_t | ||
16 | getline (lineptr, n, stream) | ||
17 | char **lineptr; | ||
18 | size_t *n; | ||
diff --git a/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch b/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch new file mode 100644 index 0000000000..80594068ac --- /dev/null +++ b/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | automake-1.12.x has deprecated use of @mkdir_p@, fix the issue by using @MKDIR_P@ instead. | ||
4 | |||
5 | Avoid this build issue: | ||
6 | | make[1]: mkdir_p@: Command not found | ||
7 | | make[1]: *** [install-data-yes] Error 127 | ||
8 | |||
9 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
10 | 2012/07/13 | ||
11 | |||
12 | Index: sed-4.1.2/intl/Makefile.in | ||
13 | =================================================================== | ||
14 | --- sed-4.1.2.orig/intl/Makefile.in | ||
15 | +++ sed-4.1.2/intl/Makefile.in | ||
16 | @@ -40,7 +40,7 @@ subdir = intl | ||
17 | INSTALL = @INSTALL@ | ||
18 | INSTALL_DATA = @INSTALL_DATA@ | ||
19 | mkinstalldirs = $(mkdir_p) | ||
20 | -mkdir_p = @mkdir_p@ | ||
21 | +mkdir_p = @MKDIR_P@ | ||
22 | |||
23 | l = @INTL_LIBTOOL_SUFFIX_PREFIX@ | ||
24 | |||
25 | Index: sed-4.1.2/po/Makefile.in.in | ||
26 | =================================================================== | ||
27 | --- sed-4.1.2.orig/po/Makefile.in.in | ||
28 | +++ sed-4.1.2/po/Makefile.in.in | ||
29 | @@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po | ||
30 | INSTALL = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/install -c | ||
31 | INSTALL_DATA = ${INSTALL} -m 644 | ||
32 | mkinstalldirs = $(mkdir_p) | ||
33 | -mkdir_p = @mkdir_p@ | ||
34 | +mkdir_p = @MKDIR_P@ | ||
35 | |||
36 | CC = i586-poky-linux-gcc -m32 -march=i586 --sysroot=/srv/home/nitin/builds2/build0/tmp/sysroots/qemux86 | ||
37 | GMSGFMT = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/msgfmt | ||
diff --git a/meta/recipes-extended/sed/sed-4.2.2/run-ptest b/meta/recipes-extended/sed/sed-4.2.2/run-ptest new file mode 100644 index 0000000000..7c0f62770e --- /dev/null +++ b/meta/recipes-extended/sed/sed-4.2.2/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | make -C testsuite -k runtest-TESTS | ||
diff --git a/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch b/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch new file mode 100644 index 0000000000..105e8b745b --- /dev/null +++ b/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | sed: add ptest | ||
2 | |||
3 | ptest needs buildtest-TESTS and runtest-TESTS targets. | ||
4 | serial-tests is required to generate those targets. | ||
5 | |||
6 | And fix following error after add serial-tests. | ||
7 | |||
8 | [snip] | ||
9 | help2man: can't get `--help' info from ../sed/sed | ||
10 | make[2]: *** [sed.1] Error 2 | ||
11 | [snip] | ||
12 | |||
13 | Upstream-Status: Inappropriate | ||
14 | |||
15 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
16 | --- | ||
17 | configure.ac | 2 +- | ||
18 | doc/Makefile.am | 2 +- | ||
19 | testsuite/Makefile.am | 6 ++++++ | ||
20 | 3 files changed, 8 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/configure.ac b/configure.ac | ||
23 | index 9d33ec9..4f0c532 100644 | ||
24 | --- a/configure.ac | ||
25 | +++ b/configure.ac | ||
26 | @@ -4,7 +4,7 @@ AC_CONFIG_AUX_DIR(build-aux) | ||
27 | AC_CONFIG_SRCDIR([sed/sed.c]) | ||
28 | AM_CONFIG_HEADER(config.h:config_h.in) | ||
29 | AC_PREREQ(2.60) | ||
30 | -AM_INIT_AUTOMAKE | ||
31 | +AM_INIT_AUTOMAKE([serial-tests]) | ||
32 | |||
33 | SED_FEATURE_VERSION=4.2.2 | ||
34 | AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, "$SED_FEATURE_VERSION", | ||
35 | diff --git a/doc/Makefile.am b/doc/Makefile.am | ||
36 | index af6975c..6fd8c9a 100644 | ||
37 | --- a/doc/Makefile.am | ||
38 | +++ b/doc/Makefile.am | ||
39 | @@ -25,7 +25,7 @@ $(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed | ||
40 | fi | ||
41 | echo stamp > $(srcdir)/s-texi | ||
42 | |||
43 | -sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x | ||
44 | +_sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x | ||
45 | $(HELP2MAN) --name "stream editor for filtering and transforming text" \ | ||
46 | -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED) | ||
47 | |||
48 | diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am | ||
49 | index d80e72c..b05f01e 100644 | ||
50 | --- a/testsuite/Makefile.am | ||
51 | +++ b/testsuite/Makefile.am | ||
52 | @@ -99,5 +99,11 @@ EXTRA_DIST = \ | ||
53 | # automake makes `check' depend on $(TESTS). Declare | ||
54 | # dummy targets for $(TESTS) so that make does not complain. | ||
55 | |||
56 | +install-ptest: | ||
57 | + cd $(BUILDDIR); tar -cf - $(TESTDIR) --exclude *.o | ( cd $(DESTDIR) && tar -xf - ) | ||
58 | + for i in $(EXTRA_DIST) tst-regex2.c; do install $(srcdir)/$$i $(DESTDIR)/$(TESTDIR); done | ||
59 | + sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i $(DESTDIR)/$(TESTDIR)/Makefile | ||
60 | + for i in `grep -rl "../sed/sed" $(DESTDIR)/$(TESTDIR)`; do sed -e 's/..\/sed\/sed/sed/' -i $$i; done | ||
61 | + | ||
62 | .PHONY: $(SEDTESTS) | ||
63 | $(SEDTESTS): | ||
64 | -- | ||
65 | 1.7.9.5 | ||
66 | |||
diff --git a/meta/recipes-extended/sed/sed_4.1.2.bb b/meta/recipes-extended/sed/sed_4.1.2.bb new file mode 100644 index 0000000000..fe242e16bd --- /dev/null +++ b/meta/recipes-extended/sed/sed_4.1.2.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | SUMMARY = "Stream EDitor (text filtering utility)" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/sed/" | ||
3 | LICENSE = "GPLv2+" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
5 | file://sed/sed.h;beginline=1;endline=17;md5=e00ffd1837f298439a214fd197f6a407" | ||
6 | SECTION = "console/utils" | ||
7 | PR = "r7" | ||
8 | |||
9 | SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \ | ||
10 | file://fix_return_type.patch \ | ||
11 | file://sed-4.1.2_fix_for_automake-1.12.patch \ | ||
12 | file://Makevars" | ||
13 | |||
14 | SRC_URI[md5sum] = "928f0e06422f414091917401f1a834d0" | ||
15 | SRC_URI[sha256sum] = "638e837ba765d5da0a30c98b57c2953cecea96827882f594612acace93ceeeab" | ||
16 | |||
17 | inherit autotools texinfo update-alternatives gettext | ||
18 | |||
19 | do_configure_prepend () { | ||
20 | cp ${WORKDIR}/Makevars ${S}/po/ | ||
21 | } | ||
22 | |||
23 | do_install () { | ||
24 | autotools_do_install | ||
25 | install -d ${D}${base_bindir} | ||
26 | mv ${D}${bindir}/sed ${D}${base_bindir}/sed | ||
27 | rmdir ${D}${bindir}/ | ||
28 | } | ||
29 | |||
30 | ALTERNATIVE_${PN} = "sed" | ||
31 | ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed" | ||
32 | ALTERNATIVE_PRIORITY = "100" | ||
33 | |||
34 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb b/meta/recipes-extended/sed/sed_4.2.2.bb new file mode 100644 index 0000000000..ea39dae435 --- /dev/null +++ b/meta/recipes-extended/sed/sed_4.2.2.bb | |||
@@ -0,0 +1,43 @@ | |||
1 | SUMMARY = "Stream EDitor (text filtering utility)" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/sed/" | ||
3 | LICENSE = "GPLv3+" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \ | ||
5 | file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f" | ||
6 | SECTION = "console/utils" | ||
7 | |||
8 | SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \ | ||
9 | file://sed-add-ptest.patch \ | ||
10 | file://run-ptest \ | ||
11 | " | ||
12 | |||
13 | SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056" | ||
14 | SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff" | ||
15 | |||
16 | inherit autotools texinfo update-alternatives gettext ptest | ||
17 | RDEPENDS_${PN}-ptest += "make locale-base-ru-ru ${PN}" | ||
18 | |||
19 | EXTRA_OECONF = "--disable-acl \ | ||
20 | ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}" | ||
21 | |||
22 | do_install () { | ||
23 | autotools_do_install | ||
24 | install -d ${D}${base_bindir} | ||
25 | mv ${D}${bindir}/sed ${D}${base_bindir}/sed | ||
26 | rmdir ${D}${bindir}/ | ||
27 | } | ||
28 | |||
29 | ALTERNATIVE_${PN} = "sed" | ||
30 | ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed" | ||
31 | ALTERNATIVE_PRIORITY = "100" | ||
32 | |||
33 | TESTDIR = "testsuite" | ||
34 | |||
35 | do_compile_ptest() { | ||
36 | oe_runmake -C ${TESTDIR} buildtest-TESTS | ||
37 | } | ||
38 | |||
39 | do_install_ptest() { | ||
40 | oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} | ||
41 | } | ||
42 | |||
43 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch new file mode 100644 index 0000000000..828b95a572 --- /dev/null +++ b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 170c25c8e0b5c3dc2615d1db94c8d24a13ff99bf Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Kjellerstedt <pkj@axis.com> | ||
3 | Date: Thu, 11 Sep 2014 15:11:23 +0200 | ||
4 | Subject: [PATCH] Do not read login.defs before doing chroot() | ||
5 | |||
6 | If "useradd --root <root> ..." was used, the login.defs file would still | ||
7 | be read from /etc/login.defs instead of <root>/etc/login.defs. This was | ||
8 | due to getdef_ulong() being called before process_root_flag(). | ||
9 | |||
10 | Upstream-Status: Submitted [http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2014-September/010446.html] | ||
11 | |||
12 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> | ||
13 | --- | ||
14 | src/useradd.c | 8 ++++++-- | ||
15 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/src/useradd.c b/src/useradd.c | ||
18 | index a8a1f76..e1ebf50 100644 | ||
19 | --- a/src/useradd.c | ||
20 | +++ b/src/useradd.c | ||
21 | @@ -1993,9 +1993,11 @@ int main (int argc, char **argv) | ||
22 | #endif /* USE_PAM */ | ||
23 | #endif /* ACCT_TOOLS_SETUID */ | ||
24 | |||
25 | +#ifdef ENABLE_SUBIDS | ||
26 | /* Needed for userns check */ | ||
27 | - uid_t uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL); | ||
28 | - uid_t uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL); | ||
29 | + uid_t uid_min; | ||
30 | + uid_t uid_max; | ||
31 | +#endif | ||
32 | |||
33 | /* | ||
34 | * Get my name so that I can use it to report errors. | ||
35 | @@ -2026,6 +2028,8 @@ int main (int argc, char **argv) | ||
36 | is_shadow_grp = sgr_file_present (); | ||
37 | #endif | ||
38 | #ifdef ENABLE_SUBIDS | ||
39 | + uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL); | ||
40 | + uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL); | ||
41 | is_sub_uid = sub_uid_file_present () && !rflg && | ||
42 | (!user_id || (user_id <= uid_max && user_id >= uid_min)); | ||
43 | is_sub_gid = sub_gid_file_present () && !rflg && | ||
44 | -- | ||
45 | 1.9.0 | ||
46 | |||
diff --git a/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch new file mode 100644 index 0000000000..31337de362 --- /dev/null +++ b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Subject: su.c: fix to exec command correctly | ||
4 | |||
5 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
6 | --- | ||
7 | src/su.c | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/src/su.c b/src/su.c | ||
11 | index 3704217..bc4f2ac 100644 | ||
12 | --- a/src/su.c | ||
13 | +++ b/src/su.c | ||
14 | @@ -1156,7 +1156,7 @@ int main (int argc, char **argv) | ||
15 | * Use the shell and create an argv | ||
16 | * with the rest of the command line included. | ||
17 | */ | ||
18 | - argv[-1] = cp; | ||
19 | + argv[-1] = shellstr; | ||
20 | execve_shell (shellstr, &argv[-1], environ); | ||
21 | err = errno; | ||
22 | (void) fprintf (stderr, | ||
23 | -- | ||
24 | 1.7.9.5 | ||
25 | |||
diff --git a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch new file mode 100644 index 0000000000..85dde8e1bb --- /dev/null +++ b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch | |||
@@ -0,0 +1,109 @@ | |||
1 | Upstream-Status: Inappropriate [OE specific] | ||
2 | |||
3 | Subject: useradd.c: create parent directories when necessary | ||
4 | |||
5 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
6 | --- | ||
7 | src/useradd.c | 72 +++++++++++++++++++++++++++++++++++++++------------------ | ||
8 | 1 file changed, 49 insertions(+), 23 deletions(-) | ||
9 | |||
10 | diff --git a/src/useradd.c b/src/useradd.c | ||
11 | index 4bd969d..cb5dd6c 100644 | ||
12 | --- a/src/useradd.c | ||
13 | +++ b/src/useradd.c | ||
14 | @@ -1893,6 +1893,35 @@ static void usr_update (void) | ||
15 | } | ||
16 | |||
17 | /* | ||
18 | + * mkdir_p - create directories, including parent directories when needed | ||
19 | + * | ||
20 | + * similar to `mkdir -p' | ||
21 | + */ | ||
22 | +void mkdir_p(const char *path) { | ||
23 | + int len = strlen(path); | ||
24 | + char newdir[len + 1]; | ||
25 | + mode_t mode = 0755; | ||
26 | + int i = 0; | ||
27 | + | ||
28 | + if (path[i] == '\0') { | ||
29 | + return; | ||
30 | + } | ||
31 | + | ||
32 | + /* skip the leading '/' */ | ||
33 | + i++; | ||
34 | + | ||
35 | + while(path[i] != '\0') { | ||
36 | + if (path[i] == '/') { | ||
37 | + strncpy(newdir, path, i); | ||
38 | + newdir[i] = '\0'; | ||
39 | + mkdir(newdir, mode); | ||
40 | + } | ||
41 | + i++; | ||
42 | + } | ||
43 | + mkdir(path, mode); | ||
44 | +} | ||
45 | + | ||
46 | +/* | ||
47 | * create_home - create the user's home directory | ||
48 | * | ||
49 | * create_home() creates the user's home directory if it does not | ||
50 | @@ -1907,36 +1936,33 @@ static void create_home (void) | ||
51 | fail_exit (E_HOMEDIR); | ||
52 | } | ||
53 | #endif | ||
54 | - /* XXX - create missing parent directories. --marekm */ | ||
55 | - if (mkdir (user_home, 0) != 0) { | ||
56 | - fprintf (stderr, | ||
57 | - _("%s: cannot create directory %s\n"), | ||
58 | - Prog, user_home); | ||
59 | -#ifdef WITH_AUDIT | ||
60 | - audit_logger (AUDIT_ADD_USER, Prog, | ||
61 | - "adding home directory", | ||
62 | - user_name, (unsigned int) user_id, | ||
63 | - SHADOW_AUDIT_FAILURE); | ||
64 | -#endif | ||
65 | - fail_exit (E_HOMEDIR); | ||
66 | - } | ||
67 | - chown (user_home, user_id, user_gid); | ||
68 | - chmod (user_home, | ||
69 | - 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); | ||
70 | - home_added = true; | ||
71 | + mkdir_p(user_home); | ||
72 | + } | ||
73 | + if (access (user_home, F_OK) != 0) { | ||
74 | #ifdef WITH_AUDIT | ||
75 | audit_logger (AUDIT_ADD_USER, Prog, | ||
76 | "adding home directory", | ||
77 | user_name, (unsigned int) user_id, | ||
78 | - SHADOW_AUDIT_SUCCESS); | ||
79 | + SHADOW_AUDIT_FAILURE); | ||
80 | #endif | ||
81 | -#ifdef WITH_SELINUX | ||
82 | - /* Reset SELinux to create files with default contexts */ | ||
83 | - if (reset_selinux_file_context () != 0) { | ||
84 | - fail_exit (E_HOMEDIR); | ||
85 | - } | ||
86 | + fail_exit (E_HOMEDIR); | ||
87 | + } | ||
88 | + chown (user_home, user_id, user_gid); | ||
89 | + chmod (user_home, | ||
90 | + 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); | ||
91 | + home_added = true; | ||
92 | +#ifdef WITH_AUDIT | ||
93 | + audit_logger (AUDIT_ADD_USER, Prog, | ||
94 | + "adding home directory", | ||
95 | + user_name, (unsigned int) user_id, | ||
96 | + SHADOW_AUDIT_SUCCESS); | ||
97 | #endif | ||
98 | +#ifdef WITH_SELINUX | ||
99 | + /* Reset SELinux to create files with default contexts */ | ||
100 | + if (reset_selinux_file_context () != 0) { | ||
101 | + fail_exit (E_HOMEDIR); | ||
102 | } | ||
103 | +#endif | ||
104 | } | ||
105 | |||
106 | /* | ||
107 | -- | ||
108 | 1.7.9.5 | ||
109 | |||
diff --git a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch new file mode 100644 index 0000000000..68da25f406 --- /dev/null +++ b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch | |||
@@ -0,0 +1,201 @@ | |||
1 | Upstream-Status: Inappropriate [OE specific] | ||
2 | |||
3 | Allow for setting password in clear text. | ||
4 | |||
5 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
6 | --- | ||
7 | src/Makefile.am | 8 ++++---- | ||
8 | src/groupadd.c | 8 +++++++- | ||
9 | src/groupmod.c | 8 +++++++- | ||
10 | src/useradd.c | 9 +++++++-- | ||
11 | src/usermod.c | 8 +++++++- | ||
12 | 5 files changed, 32 insertions(+), 9 deletions(-) | ||
13 | |||
14 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
15 | index 25e288d..856b087 100644 | ||
16 | --- a/src/Makefile.am | ||
17 | +++ b/src/Makefile.am | ||
18 | @@ -88,10 +88,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT) | ||
19 | chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) | ||
20 | chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT) | ||
21 | gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) | ||
22 | -groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) | ||
23 | +groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) | ||
24 | groupdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) | ||
25 | groupmems_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) | ||
26 | -groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) | ||
27 | +groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) | ||
28 | grpck_LDADD = $(LDADD) $(LIBSELINUX) | ||
29 | grpconv_LDADD = $(LDADD) $(LIBSELINUX) | ||
30 | grpunconv_LDADD = $(LDADD) $(LIBSELINUX) | ||
31 | @@ -111,9 +111,9 @@ su_SOURCES = \ | ||
32 | suauth.c | ||
33 | su_LDADD = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) | ||
34 | sulogin_LDADD = $(LDADD) $(LIBCRYPT) | ||
35 | -useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) | ||
36 | +useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT) | ||
37 | userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) | ||
38 | -usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) | ||
39 | +usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT) | ||
40 | vipw_LDADD = $(LDADD) $(LIBSELINUX) | ||
41 | |||
42 | install-am: all-am | ||
43 | diff --git a/src/groupadd.c b/src/groupadd.c | ||
44 | index f716f57..4e28c26 100644 | ||
45 | --- a/src/groupadd.c | ||
46 | +++ b/src/groupadd.c | ||
47 | @@ -124,6 +124,7 @@ static /*@noreturn@*/void usage (int status) | ||
48 | (void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n" | ||
49 | " (non-unique) GID\n"), usageout); | ||
50 | (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), usageout); | ||
51 | + (void) fputs (_(" -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout); | ||
52 | (void) fputs (_(" -r, --system create a system account\n"), usageout); | ||
53 | (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); | ||
54 | (void) fputs ("\n", usageout); | ||
55 | @@ -387,12 +388,13 @@ static void process_flags (int argc, char **argv) | ||
56 | {"key", required_argument, NULL, 'K'}, | ||
57 | {"non-unique", no_argument, NULL, 'o'}, | ||
58 | {"password", required_argument, NULL, 'p'}, | ||
59 | + {"clear-password", required_argument, NULL, 'P'}, | ||
60 | {"system", no_argument, NULL, 'r'}, | ||
61 | {"root", required_argument, NULL, 'R'}, | ||
62 | {NULL, 0, NULL, '\0'} | ||
63 | }; | ||
64 | |||
65 | - while ((c = getopt_long (argc, argv, "fg:hK:op:rR:", | ||
66 | + while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:", | ||
67 | long_options, NULL)) != -1) { | ||
68 | switch (c) { | ||
69 | case 'f': | ||
70 | @@ -444,6 +446,10 @@ static void process_flags (int argc, char **argv) | ||
71 | pflg = true; | ||
72 | group_passwd = optarg; | ||
73 | break; | ||
74 | + case 'P': | ||
75 | + pflg = true; | ||
76 | + group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); | ||
77 | + break; | ||
78 | case 'r': | ||
79 | rflg = true; | ||
80 | break; | ||
81 | diff --git a/src/groupmod.c b/src/groupmod.c | ||
82 | index d9d3807..68f49d1 100644 | ||
83 | --- a/src/groupmod.c | ||
84 | +++ b/src/groupmod.c | ||
85 | @@ -127,6 +127,7 @@ static void usage (int status) | ||
86 | (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout); | ||
87 | (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n" | ||
88 | " PASSWORD\n"), usageout); | ||
89 | + (void) fputs (_(" -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout); | ||
90 | (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); | ||
91 | (void) fputs ("\n", usageout); | ||
92 | exit (status); | ||
93 | @@ -375,10 +376,11 @@ static void process_flags (int argc, char **argv) | ||
94 | {"new-name", required_argument, NULL, 'n'}, | ||
95 | {"non-unique", no_argument, NULL, 'o'}, | ||
96 | {"password", required_argument, NULL, 'p'}, | ||
97 | + {"clear-password", required_argument, NULL, 'P'}, | ||
98 | {"root", required_argument, NULL, 'R'}, | ||
99 | {NULL, 0, NULL, '\0'} | ||
100 | }; | ||
101 | - while ((c = getopt_long (argc, argv, "g:hn:op:R:", | ||
102 | + while ((c = getopt_long (argc, argv, "g:hn:op:P:R:", | ||
103 | long_options, NULL)) != -1) { | ||
104 | switch (c) { | ||
105 | case 'g': | ||
106 | @@ -405,6 +407,10 @@ static void process_flags (int argc, char **argv) | ||
107 | group_passwd = optarg; | ||
108 | pflg = true; | ||
109 | break; | ||
110 | + case 'P': | ||
111 | + group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); | ||
112 | + pflg = true; | ||
113 | + break; | ||
114 | case 'R': /* no-op, handled in process_root_flag () */ | ||
115 | break; | ||
116 | default: | ||
117 | diff --git a/src/useradd.c b/src/useradd.c | ||
118 | index b3bd451..4416f90 100644 | ||
119 | --- a/src/useradd.c | ||
120 | +++ b/src/useradd.c | ||
121 | @@ -773,6 +773,7 @@ static void usage (int status) | ||
122 | (void) fputs (_(" -o, --non-unique allow to create users with duplicate\n" | ||
123 | " (non-unique) UID\n"), usageout); | ||
124 | (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), usageout); | ||
125 | + (void) fputs (_(" -P, --clear-password PASSWORD clear password of the new account\n"), usageout); | ||
126 | (void) fputs (_(" -r, --system create a system account\n"), usageout); | ||
127 | (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); | ||
128 | (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), usageout); | ||
129 | @@ -1047,6 +1048,7 @@ static void process_flags (int argc, char **argv) | ||
130 | {"no-user-group", no_argument, NULL, 'N'}, | ||
131 | {"non-unique", no_argument, NULL, 'o'}, | ||
132 | {"password", required_argument, NULL, 'p'}, | ||
133 | + {"clear-password", required_argument, NULL, 'P'}, | ||
134 | {"system", no_argument, NULL, 'r'}, | ||
135 | {"root", required_argument, NULL, 'R'}, | ||
136 | {"shell", required_argument, NULL, 's'}, | ||
137 | @@ -1059,9 +1061,9 @@ static void process_flags (int argc, char **argv) | ||
138 | }; | ||
139 | while ((c = getopt_long (argc, argv, | ||
140 | #ifdef WITH_SELINUX | ||
141 | - "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:", | ||
142 | + "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:UZ:", | ||
143 | #else /* !WITH_SELINUX */ | ||
144 | - "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U", | ||
145 | + "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:U", | ||
146 | #endif /* !WITH_SELINUX */ | ||
147 | long_options, NULL)) != -1) { | ||
148 | switch (c) { | ||
149 | @@ -1227,6 +1229,9 @@ static void process_flags (int argc, char **argv) | ||
150 | } | ||
151 | user_pass = optarg; | ||
152 | break; | ||
153 | + case 'P': /* set clear text password */ | ||
154 | + user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); | ||
155 | + break; | ||
156 | case 'r': | ||
157 | rflg = true; | ||
158 | break; | ||
159 | diff --git a/src/usermod.c b/src/usermod.c | ||
160 | index e7d4351..b79f7a3 100644 | ||
161 | --- a/src/usermod.c | ||
162 | +++ b/src/usermod.c | ||
163 | @@ -419,6 +419,7 @@ static /*@noreturn@*/void usage (int status) | ||
164 | " new location (use only with -d)\n"), usageout); | ||
165 | (void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout); | ||
166 | (void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout); | ||
167 | + (void) fputs (_(" -P, --clear-password PASSWORD use clear password for the new password\n"), usageout); | ||
168 | (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); | ||
169 | (void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout); | ||
170 | (void) fputs (_(" -u, --uid UID new UID for the user account\n"), usageout); | ||
171 | @@ -996,6 +997,7 @@ static void process_flags (int argc, char **argv) | ||
172 | {"move-home", no_argument, NULL, 'm'}, | ||
173 | {"non-unique", no_argument, NULL, 'o'}, | ||
174 | {"password", required_argument, NULL, 'p'}, | ||
175 | + {"clear-password", required_argument, NULL, 'P'}, | ||
176 | {"root", required_argument, NULL, 'R'}, | ||
177 | {"shell", required_argument, NULL, 's'}, | ||
178 | {"uid", required_argument, NULL, 'u'}, | ||
179 | @@ -1012,7 +1014,7 @@ static void process_flags (int argc, char **argv) | ||
180 | {NULL, 0, NULL, '\0'} | ||
181 | }; | ||
182 | while ((c = getopt_long (argc, argv, | ||
183 | - "ac:d:e:f:g:G:hl:Lmop:R:s:u:U" | ||
184 | + "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U" | ||
185 | #ifdef ENABLE_SUBIDS | ||
186 | "v:w:V:W:" | ||
187 | #endif /* ENABLE_SUBIDS */ | ||
188 | @@ -1112,6 +1114,10 @@ static void process_flags (int argc, char **argv) | ||
189 | user_pass = optarg; | ||
190 | pflg = true; | ||
191 | break; | ||
192 | + case 'P': | ||
193 | + user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); | ||
194 | + pflg = true; | ||
195 | + break; | ||
196 | case 'R': /* no-op, handled in process_root_flag () */ | ||
197 | break; | ||
198 | case 's': | ||
199 | -- | ||
200 | 1.7.9.5 | ||
201 | |||
diff --git a/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch new file mode 100644 index 0000000000..60f2ed548a --- /dev/null +++ b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001 | ||
2 | From: James Le Cuirot <chewi@aura-online.co.uk> | ||
3 | Date: Sat, 23 Aug 2014 09:46:39 +0100 | ||
4 | Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF | ||
5 | |||
6 | This built-in check is simpler than the previous method and, most | ||
7 | importantly, works when cross-compiling. | ||
8 | |||
9 | Upstream-Status: Accepted | ||
10 | [https://github.com/shadow-maint/shadow/commit/2cb54158b80cdbd97ca3b36df83f9255e923ae3f] | ||
11 | |||
12 | Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> | ||
13 | --- | ||
14 | configure.in | 14 ++++---------- | ||
15 | 1 file changed, 4 insertions(+), 10 deletions(-) | ||
16 | |||
17 | diff --git a/configure.in b/configure.in | ||
18 | index 1a3f841..4a4d6d0 100644 | ||
19 | --- a/configure.in | ||
20 | +++ b/configure.in | ||
21 | @@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then | ||
22 | dnl | ||
23 | dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc | ||
24 | dnl | ||
25 | - AC_RUN_IFELSE([AC_LANG_SOURCE([ | ||
26 | -#include <sys/types.h> | ||
27 | -int main(void) { | ||
28 | - uid_t u; | ||
29 | - gid_t g; | ||
30 | - return (sizeof u < 4) || (sizeof g < 4); | ||
31 | -} | ||
32 | - ])], [id32bit="yes"], [id32bit="no"]) | ||
33 | - | ||
34 | - if test "x$id32bit" = "xyes"; then | ||
35 | + AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"]) | ||
36 | + AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"]) | ||
37 | + | ||
38 | + if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then | ||
39 | AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.]) | ||
40 | enable_subids="yes" | ||
41 | else | ||
diff --git a/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch new file mode 100644 index 0000000000..4fa3d184ed --- /dev/null +++ b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | Upstream-Status: Inappropriate [OE specific] | ||
2 | |||
3 | commonio.c: fix unexpected open failure in chroot environment | ||
4 | |||
5 | When using commands with '-R <newroot>' option in our pseudo environment, | ||
6 | we would usually get the 'Pemission Denied' error. This patch serves as | ||
7 | a workaround to this problem. | ||
8 | |||
9 | Note that this patch doesn't change the logic in the code, it just expands | ||
10 | the codes. | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | --- | ||
14 | lib/commonio.c | 16 ++++++++++++---- | ||
15 | 1 file changed, 12 insertions(+), 4 deletions(-) | ||
16 | |||
17 | diff --git a/lib/commonio.c b/lib/commonio.c | ||
18 | index cc536bf..51cafd9 100644 | ||
19 | --- a/lib/commonio.c | ||
20 | +++ b/lib/commonio.c | ||
21 | @@ -613,10 +613,18 @@ int commonio_open (struct commonio_db *db, int mode) | ||
22 | db->cursor = NULL; | ||
23 | db->changed = false; | ||
24 | |||
25 | - fd = open (db->filename, | ||
26 | - (db->readonly ? O_RDONLY : O_RDWR) | ||
27 | - | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); | ||
28 | - saved_errno = errno; | ||
29 | + if (db->readonly) { | ||
30 | + fd = open (db->filename, | ||
31 | + (true ? O_RDONLY : O_RDWR) | ||
32 | + | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); | ||
33 | + saved_errno = errno; | ||
34 | + } else { | ||
35 | + fd = open (db->filename, | ||
36 | + (false ? O_RDONLY : O_RDWR) | ||
37 | + | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); | ||
38 | + saved_errno = errno; | ||
39 | + } | ||
40 | + | ||
41 | db->fp = NULL; | ||
42 | if (fd >= 0) { | ||
43 | #ifdef WITH_TCB | ||
44 | -- | ||
45 | 1.7.9.5 | ||
46 | |||
diff --git a/meta/recipes-extended/shadow/files/disable-syslog.patch b/meta/recipes-extended/shadow/files/disable-syslog.patch new file mode 100644 index 0000000000..1943fd6faf --- /dev/null +++ b/meta/recipes-extended/shadow/files/disable-syslog.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | Disable use of syslog to prevent sysroot user and group additions from | ||
2 | writing entries to the host's syslog. This patch should only be used | ||
3 | with the shadow-native recipe. | ||
4 | |||
5 | Upstream-Status: Inappropriate [disable feature] | ||
6 | |||
7 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
8 | |||
9 | diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3/src/groupadd.c | ||
10 | --- shadow-4.1.4.3.orig//src/groupadd.c 2011-02-13 09:58:16.000000000 -0800 | ||
11 | +++ shadow-4.1.4.3/src/groupadd.c 2012-04-05 10:05:59.440001758 -0700 | ||
12 | @@ -34,6 +34,9 @@ | ||
13 | |||
14 | #ident "$Id: groupadd.c 3015 2009-06-05 22:16:56Z nekral-guest $" | ||
15 | |||
16 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
17 | +#undef USE_SYSLOG | ||
18 | + | ||
19 | #include <ctype.h> | ||
20 | #include <fcntl.h> | ||
21 | #include <getopt.h> | ||
22 | diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3/src/useradd.c | ||
23 | --- shadow-4.1.4.3.orig//src/useradd.c 2011-02-13 09:58:16.000000000 -0800 | ||
24 | +++ shadow-4.1.4.3/src/useradd.c 2012-04-05 10:06:25.076001315 -0700 | ||
25 | @@ -34,6 +34,9 @@ | ||
26 | |||
27 | #ident "$Id: useradd.c 3015 2009-06-05 22:16:56Z nekral-guest $" | ||
28 | |||
29 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
30 | +#undef USE_SYSLOG | ||
31 | + | ||
32 | #include <assert.h> | ||
33 | #include <ctype.h> | ||
34 | #include <errno.h> | ||
diff --git a/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch new file mode 100644 index 0000000000..02cb91aafd --- /dev/null +++ b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Subject: fix installation failure with subids disabled | ||
4 | |||
5 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
6 | --- | ||
7 | src/Makefile.am | 5 ++++- | ||
8 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
11 | index 25e288d..076f8ef 100644 | ||
12 | --- a/src/Makefile.am | ||
13 | +++ b/src/Makefile.am | ||
14 | @@ -52,7 +52,10 @@ usbin_PROGRAMS = \ | ||
15 | noinst_PROGRAMS = id sulogin | ||
16 | |||
17 | suidbins = su | ||
18 | -suidubins = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap | ||
19 | +suidubins = chage chfn chsh expiry gpasswd newgrp passwd | ||
20 | +if ENABLE_SUBIDS | ||
21 | +suidubins += newgidmap newuidmap | ||
22 | +endif | ||
23 | if ACCT_TOOLS_SETUID | ||
24 | suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod | ||
25 | endif | ||
26 | -- | ||
27 | 1.7.9.5 | ||
28 | |||
diff --git a/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot b/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot new file mode 100644 index 0000000000..8a68dd341a --- /dev/null +++ b/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot | |||
@@ -0,0 +1,386 @@ | |||
1 | # | ||
2 | # /etc/login.defs - Configuration control definitions for the shadow package. | ||
3 | # | ||
4 | # $Id: login.defs 3038 2009-07-23 20:41:35Z nekral-guest $ | ||
5 | # | ||
6 | |||
7 | # | ||
8 | # Delay in seconds before being allowed another attempt after a login failure | ||
9 | # Note: When PAM is used, some modules may enfore a minimal delay (e.g. | ||
10 | # pam_unix enforces a 2s delay) | ||
11 | # | ||
12 | FAIL_DELAY 3 | ||
13 | |||
14 | # | ||
15 | # Enable logging and display of /var/log/faillog login failure info. | ||
16 | # | ||
17 | #FAILLOG_ENAB yes | ||
18 | |||
19 | # | ||
20 | # Enable display of unknown usernames when login failures are recorded. | ||
21 | # | ||
22 | LOG_UNKFAIL_ENAB no | ||
23 | |||
24 | # | ||
25 | # Enable logging of successful logins | ||
26 | # | ||
27 | LOG_OK_LOGINS no | ||
28 | |||
29 | # | ||
30 | # Enable logging and display of /var/log/lastlog login time info. | ||
31 | # | ||
32 | #LASTLOG_ENAB yes | ||
33 | |||
34 | # | ||
35 | # Enable checking and display of mailbox status upon login. | ||
36 | # | ||
37 | # Disable if the shell startup files already check for mail | ||
38 | # ("mailx -e" or equivalent). | ||
39 | # | ||
40 | ##MAIL_CHECK_ENAB yes | ||
41 | |||
42 | # | ||
43 | # Enable additional checks upon password changes. | ||
44 | # | ||
45 | #OBSCURE_CHECKS_ENAB yes | ||
46 | |||
47 | # | ||
48 | # Enable checking of time restrictions specified in /etc/porttime. | ||
49 | # | ||
50 | #PORTTIME_CHECKS_ENAB yes | ||
51 | |||
52 | # | ||
53 | # Enable setting of ulimit, umask, and niceness from passwd gecos field. | ||
54 | # | ||
55 | #QUOTAS_ENAB yes | ||
56 | |||
57 | # | ||
58 | # Enable "syslog" logging of su activity - in addition to sulog file logging. | ||
59 | # SYSLOG_SG_ENAB does the same for newgrp and sg. | ||
60 | # | ||
61 | SYSLOG_SU_ENAB yes | ||
62 | SYSLOG_SG_ENAB yes | ||
63 | |||
64 | # | ||
65 | # If defined, either full pathname of a file containing device names or | ||
66 | # a ":" delimited list of device names. Root logins will be allowed only | ||
67 | # upon these devices. | ||
68 | # | ||
69 | CONSOLE /etc/securetty | ||
70 | #CONSOLE console:tty01:tty02:tty03:tty04 | ||
71 | |||
72 | # | ||
73 | # If defined, all su activity is logged to this file. | ||
74 | # | ||
75 | #SULOG_FILE /var/log/sulog | ||
76 | |||
77 | # | ||
78 | # If defined, ":" delimited list of "message of the day" files to | ||
79 | # be displayed upon login. | ||
80 | # | ||
81 | #MOTD_FILE /etc/motd | ||
82 | #MOTD_FILE /etc/motd:/usr/lib/news/news-motd | ||
83 | |||
84 | # | ||
85 | # If defined, this file will be output before each login prompt. | ||
86 | # | ||
87 | #ISSUE_FILE /etc/issue | ||
88 | |||
89 | # | ||
90 | # If defined, file which maps tty line to TERM environment parameter. | ||
91 | # Each line of the file is in a format something like "vt100 tty01". | ||
92 | # | ||
93 | #TTYTYPE_FILE /etc/ttytype | ||
94 | |||
95 | # | ||
96 | # If defined, login failures will be logged here in a utmp format. | ||
97 | # last, when invoked as lastb, will read /var/log/btmp, so... | ||
98 | # | ||
99 | #FTMP_FILE /var/log/btmp | ||
100 | |||
101 | # | ||
102 | # If defined, name of file whose presence which will inhibit non-root | ||
103 | # logins. The contents of this file should be a message indicating | ||
104 | # why logins are inhibited. | ||
105 | # | ||
106 | #NOLOGINS_FILE /etc/nologin | ||
107 | |||
108 | # | ||
109 | # If defined, the command name to display when running "su -". For | ||
110 | # example, if this is defined as "su" then a "ps" will display the | ||
111 | # command is "-su". If not defined, then "ps" would display the | ||
112 | # name of the shell actually being run, e.g. something like "-sh". | ||
113 | # | ||
114 | SU_NAME su | ||
115 | |||
116 | # | ||
117 | # *REQUIRED* | ||
118 | # Directory where mailboxes reside, _or_ name of file, relative to the | ||
119 | # home directory. If you _do_ define both, #MAIL_DIR takes precedence. | ||
120 | # | ||
121 | #MAIL_DIR /var/spool/mail | ||
122 | MAIL_FILE .mail | ||
123 | |||
124 | # | ||
125 | # If defined, file which inhibits all the usual chatter during the login | ||
126 | # sequence. If a full pathname, then hushed mode will be enabled if the | ||
127 | # user's name or shell are found in the file. If not a full pathname, then | ||
128 | # hushed mode will be enabled if the file exists in the user's home directory. | ||
129 | # | ||
130 | HUSHLOGIN_FILE .hushlogin | ||
131 | #HUSHLOGIN_FILE /etc/hushlogins | ||
132 | |||
133 | # | ||
134 | # If defined, either a TZ environment parameter spec or the | ||
135 | # fully-rooted pathname of a file containing such a spec. | ||
136 | # | ||
137 | #ENV_TZ TZ=CST6CDT | ||
138 | #ENV_TZ /etc/tzname | ||
139 | |||
140 | # | ||
141 | # If defined, an HZ environment parameter spec. | ||
142 | # | ||
143 | # for Linux/x86 | ||
144 | #ENV_HZ HZ=100 | ||
145 | # For Linux/Alpha... | ||
146 | #ENV_HZ HZ=1024 | ||
147 | |||
148 | # | ||
149 | # *REQUIRED* The default PATH settings, for superuser and normal users. | ||
150 | # | ||
151 | # (they are minimal, add the rest in the shell startup files) | ||
152 | ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
153 | ENV_PATH PATH=/bin:/usr/bin | ||
154 | |||
155 | # | ||
156 | # Terminal permissions | ||
157 | # | ||
158 | # TTYGROUP Login tty will be assigned this group ownership. | ||
159 | # TTYPERM Login tty will be set to this permission. | ||
160 | # | ||
161 | # If you have a "write" program which is "setgid" to a special group | ||
162 | # which owns the terminals, define TTYGROUP to the group number and | ||
163 | # TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign | ||
164 | # TTYPERM to either 622 or 600. | ||
165 | # | ||
166 | TTYGROUP tty | ||
167 | TTYPERM 0600 | ||
168 | |||
169 | # | ||
170 | # Login configuration initializations: | ||
171 | # | ||
172 | # ERASECHAR Terminal ERASE character ('\010' = backspace). | ||
173 | # KILLCHAR Terminal KILL character ('\025' = CTRL/U). | ||
174 | # ULIMIT Default "ulimit" value. | ||
175 | # | ||
176 | # The ERASECHAR and KILLCHAR are used only on System V machines. | ||
177 | # The ULIMIT is used only if the system supports it. | ||
178 | # (now it works with setrlimit too; ulimit is in 512-byte units) | ||
179 | # | ||
180 | # Prefix these values with "0" to get octal, "0x" to get hexadecimal. | ||
181 | # | ||
182 | ERASECHAR 0177 | ||
183 | KILLCHAR 025 | ||
184 | #ULIMIT 2097152 | ||
185 | |||
186 | # Default initial "umask" value for non-PAM enabled systems. | ||
187 | # UMASK is also used by useradd and newusers to set the mode of new home | ||
188 | # directories. | ||
189 | # 022 is the default value, but 027, or even 077, could be considered | ||
190 | # better for privacy. There is no One True Answer here: each sysadmin | ||
191 | # must make up her mind. | ||
192 | UMASK 022 | ||
193 | |||
194 | # | ||
195 | # Password aging controls: | ||
196 | # | ||
197 | # PASS_MAX_DAYS Maximum number of days a password may be used. | ||
198 | # PASS_MIN_DAYS Minimum number of days allowed between password changes. | ||
199 | # PASS_MIN_LEN Minimum acceptable password length. | ||
200 | # PASS_WARN_AGE Number of days warning given before a password expires. | ||
201 | # | ||
202 | PASS_MAX_DAYS 99999 | ||
203 | PASS_MIN_DAYS 0 | ||
204 | #PASS_MIN_LEN 5 | ||
205 | PASS_WARN_AGE 7 | ||
206 | |||
207 | # | ||
208 | # If "yes", the user must be listed as a member of the first gid 0 group | ||
209 | # in /etc/group (called "root" on most Linux systems) to be able to "su" | ||
210 | # to uid 0 accounts. If the group doesn't exist or is empty, no one | ||
211 | # will be able to "su" to uid 0. | ||
212 | # | ||
213 | #SU_WHEEL_ONLY no | ||
214 | |||
215 | # | ||
216 | # If compiled with cracklib support, where are the dictionaries | ||
217 | # | ||
218 | #CRACKLIB_DICTPATH /var/cache/cracklib/cracklib_dict | ||
219 | |||
220 | # | ||
221 | # Min/max values for automatic uid selection in useradd | ||
222 | # | ||
223 | UID_MIN 1000 | ||
224 | UID_MAX 60000 | ||
225 | # System accounts | ||
226 | SYS_UID_MIN 101 | ||
227 | SYS_UID_MAX 999 | ||
228 | |||
229 | # | ||
230 | # Min/max values for automatic gid selection in groupadd | ||
231 | # | ||
232 | GID_MIN 1000 | ||
233 | GID_MAX 60000 | ||
234 | # System accounts | ||
235 | SYS_GID_MIN 101 | ||
236 | SYS_GID_MAX 999 | ||
237 | |||
238 | # | ||
239 | # Max number of login retries if password is bad | ||
240 | # | ||
241 | LOGIN_RETRIES 5 | ||
242 | |||
243 | # | ||
244 | # Max time in seconds for login | ||
245 | # | ||
246 | LOGIN_TIMEOUT 60 | ||
247 | |||
248 | # | ||
249 | # Maximum number of attempts to change password if rejected (too easy) | ||
250 | # | ||
251 | #PASS_CHANGE_TRIES 5 | ||
252 | |||
253 | # | ||
254 | # Warn about weak passwords (but still allow them) if you are root. | ||
255 | # | ||
256 | #PASS_ALWAYS_WARN yes | ||
257 | |||
258 | # | ||
259 | # Number of significant characters in the password for crypt(). | ||
260 | # Default is 8, don't change unless your crypt() is better. | ||
261 | # Ignored if MD5_CRYPT_ENAB set to "yes". | ||
262 | # | ||
263 | #PASS_MAX_LEN 8 | ||
264 | |||
265 | # | ||
266 | # Require password before chfn/chsh can make any changes. | ||
267 | # | ||
268 | #CHFN_AUTH yes | ||
269 | |||
270 | # | ||
271 | # Which fields may be changed by regular users using chfn - use | ||
272 | # any combination of letters "frwh" (full name, room number, work | ||
273 | # phone, home phone). If not defined, no changes are allowed. | ||
274 | # For backward compatibility, "yes" = "rwh" and "no" = "frwh". | ||
275 | # | ||
276 | CHFN_RESTRICT rwh | ||
277 | |||
278 | # | ||
279 | # Password prompt (%s will be replaced by user name). | ||
280 | # | ||
281 | # XXX - it doesn't work correctly yet, for now leave it commented out | ||
282 | # to use the default which is just "Password: ". | ||
283 | #LOGIN_STRING "%s's Password: " | ||
284 | |||
285 | # | ||
286 | # Only works if compiled with MD5_CRYPT defined: | ||
287 | # If set to "yes", new passwords will be encrypted using the MD5-based | ||
288 | # algorithm compatible with the one used by recent releases of FreeBSD. | ||
289 | # It supports passwords of unlimited length and longer salt strings. | ||
290 | # Set to "no" if you need to copy encrypted passwords to other systems | ||
291 | # which don't understand the new algorithm. Default is "no". | ||
292 | # | ||
293 | # Note: If you use PAM, it is recommended to use a value consistent with | ||
294 | # the PAM modules configuration. | ||
295 | # | ||
296 | # This variable is deprecated. You should use ENCRYPT_METHOD. | ||
297 | # | ||
298 | #MD5_CRYPT_ENAB no | ||
299 | |||
300 | # | ||
301 | # Only works if compiled with ENCRYPTMETHOD_SELECT defined: | ||
302 | # If set to MD5 , MD5-based algorithm will be used for encrypting password | ||
303 | # If set to SHA256, SHA256-based algorithm will be used for encrypting password | ||
304 | # If set to SHA512, SHA512-based algorithm will be used for encrypting password | ||
305 | # If set to DES, DES-based algorithm will be used for encrypting password (default) | ||
306 | # Overrides the MD5_CRYPT_ENAB option | ||
307 | # | ||
308 | # Note: If you use PAM, it is recommended to use a value consistent with | ||
309 | # the PAM modules configuration. | ||
310 | # | ||
311 | #ENCRYPT_METHOD DES | ||
312 | |||
313 | # | ||
314 | # Only works if ENCRYPT_METHOD is set to SHA256 or SHA512. | ||
315 | # | ||
316 | # Define the number of SHA rounds. | ||
317 | # With a lot of rounds, it is more difficult to brute forcing the password. | ||
318 | # But note also that it more CPU resources will be needed to authenticate | ||
319 | # users. | ||
320 | # | ||
321 | # If not specified, the libc will choose the default number of rounds (5000). | ||
322 | # The values must be inside the 1000-999999999 range. | ||
323 | # If only one of the MIN or MAX values is set, then this value will be used. | ||
324 | # If MIN > MAX, the highest value will be used. | ||
325 | # | ||
326 | # SHA_CRYPT_MIN_ROUNDS 5000 | ||
327 | # SHA_CRYPT_MAX_ROUNDS 5000 | ||
328 | |||
329 | # | ||
330 | # List of groups to add to the user's supplementary group set | ||
331 | # when logging in on the console (as determined by the CONSOLE | ||
332 | # setting). Default is none. | ||
333 | # | ||
334 | # Use with caution - it is possible for users to gain permanent | ||
335 | # access to these groups, even when not logged in on the console. | ||
336 | # How to do it is left as an exercise for the reader... | ||
337 | # | ||
338 | #CONSOLE_GROUPS floppy:audio:cdrom | ||
339 | |||
340 | # | ||
341 | # Should login be allowed if we can't cd to the home directory? | ||
342 | # Default in no. | ||
343 | # | ||
344 | DEFAULT_HOME yes | ||
345 | |||
346 | # | ||
347 | # If this file exists and is readable, login environment will be | ||
348 | # read from it. Every line should be in the form name=value. | ||
349 | # | ||
350 | #ENVIRON_FILE /etc/environment | ||
351 | |||
352 | # | ||
353 | # If defined, this command is run when removing a user. | ||
354 | # It should remove any at/cron/print jobs etc. owned by | ||
355 | # the user to be removed (passed as the first argument). | ||
356 | # | ||
357 | #USERDEL_CMD /usr/sbin/userdel_local | ||
358 | |||
359 | # | ||
360 | # Enable setting of the umask group bits to be the same as owner bits | ||
361 | # (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is | ||
362 | # the same as gid, and username is the same as the primary group name. | ||
363 | # | ||
364 | # This also enables userdel to remove user groups if no members exist. | ||
365 | # | ||
366 | USERGROUPS_ENAB yes | ||
367 | |||
368 | # | ||
369 | # If set to a non-nul number, the shadow utilities will make sure that | ||
370 | # groups never have more than this number of users on one line. | ||
371 | # This permit to support split groups (groups split into multiple lines, | ||
372 | # with the same group ID, to avoid limitation of the line length in the | ||
373 | # group file). | ||
374 | # | ||
375 | # 0 is the default value and disables this feature. | ||
376 | # | ||
377 | #MAX_MEMBERS_PER_GROUP 0 | ||
378 | |||
379 | # | ||
380 | # If useradd should create home directories for users by default (non | ||
381 | # system users only) | ||
382 | # This option is overridden with the -M or -m flags on the useradd command | ||
383 | # line. | ||
384 | # | ||
385 | CREATE_HOME yes | ||
386 | |||
diff --git a/meta/recipes-extended/shadow/files/login_defs_pam.sed b/meta/recipes-extended/shadow/files/login_defs_pam.sed new file mode 100644 index 0000000000..0a1f3be4af --- /dev/null +++ b/meta/recipes-extended/shadow/files/login_defs_pam.sed | |||
@@ -0,0 +1,32 @@ | |||
1 | /^FAILLOG_ENAB/b comment | ||
2 | /^LASTLOG_ENAB/b comment | ||
3 | /^MAIL_CHECK_ENAB/b comment | ||
4 | /^OBSCURE_CHECKS_ENAB/b comment | ||
5 | /^PORTTIME_CHECKS_ENAB/b comment | ||
6 | /^QUOTAS_ENAB/b comment | ||
7 | /^MOTD_FILE/b comment | ||
8 | /^FTMP_FILE/b comment | ||
9 | /^NOLOGINS_FILE/b comment | ||
10 | /^ENV_HZ/b comment | ||
11 | /^ENV_TZ/b comment | ||
12 | /^PASS_MIN_LEN/b comment | ||
13 | /^SU_WHEEL_ONLY/b comment | ||
14 | /^CRACKLIB_DICTPATH/b comment | ||
15 | /^PASS_CHANGE_TRIES/b comment | ||
16 | /^PASS_ALWAYS_WARN/b comment | ||
17 | /^PASS_MAX_LEN/b comment | ||
18 | /^PASS_MIN_LEN/b comment | ||
19 | /^CHFN_AUTH/b comment | ||
20 | /^CHSH_AUTH/b comment | ||
21 | /^ISSUE_FILE/b comment | ||
22 | /^LOGIN_STRING/b comment | ||
23 | /^ULIMIT/b comment | ||
24 | /^ENVIRON_FILE/b comment | ||
25 | |||
26 | b exit | ||
27 | |||
28 | : comment | ||
29 | s:^:#: | ||
30 | |||
31 | : exit | ||
32 | |||
diff --git a/meta/recipes-extended/shadow/files/pam.d/chfn b/meta/recipes-extended/shadow/files/pam.d/chfn new file mode 100644 index 0000000000..baf7698bba --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/chfn | |||
@@ -0,0 +1,14 @@ | |||
1 | # | ||
2 | # The PAM configuration file for the Shadow `chfn' service | ||
3 | # | ||
4 | |||
5 | # This allows root to change user infomation without being | ||
6 | # prompted for a password | ||
7 | auth sufficient pam_rootok.so | ||
8 | |||
9 | # The standard Unix authentication modules, used with | ||
10 | # NIS (man nsswitch) as well as normal /etc/passwd and | ||
11 | # /etc/shadow entries. | ||
12 | auth include common-auth | ||
13 | account include common-account | ||
14 | session include common-session | ||
diff --git a/meta/recipes-extended/shadow/files/pam.d/chpasswd b/meta/recipes-extended/shadow/files/pam.d/chpasswd new file mode 100644 index 0000000000..9e3efa68ba --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/chpasswd | |||
@@ -0,0 +1,4 @@ | |||
1 | # The PAM configuration file for the Shadow 'chpasswd' service | ||
2 | # | ||
3 | |||
4 | password include common-password | ||
diff --git a/meta/recipes-extended/shadow/files/pam.d/chsh b/meta/recipes-extended/shadow/files/pam.d/chsh new file mode 100644 index 0000000000..8fb169f64e --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/chsh | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # The PAM configuration file for the Shadow `chsh' service | ||
3 | # | ||
4 | |||
5 | # This will not allow a user to change their shell unless | ||
6 | # their current one is listed in /etc/shells. This keeps | ||
7 | # accounts with special shells from changing them. | ||
8 | auth required pam_shells.so | ||
9 | |||
10 | # This allows root to change user shell without being | ||
11 | # prompted for a password | ||
12 | auth sufficient pam_rootok.so | ||
13 | |||
14 | # The standard Unix authentication modules, used with | ||
15 | # NIS (man nsswitch) as well as normal /etc/passwd and | ||
16 | # /etc/shadow entries. | ||
17 | auth include common-auth | ||
18 | account include common-account | ||
19 | session include common-session | ||
diff --git a/meta/recipes-extended/shadow/files/pam.d/login b/meta/recipes-extended/shadow/files/pam.d/login new file mode 100644 index 0000000000..b340058539 --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/login | |||
@@ -0,0 +1,81 @@ | |||
1 | # | ||
2 | # The PAM configuration file for the Shadow `login' service | ||
3 | # | ||
4 | |||
5 | # Enforce a minimal delay in case of failure (in microseconds). | ||
6 | # (Replaces the `FAIL_DELAY' setting from login.defs) | ||
7 | # Note that other modules may require another minimal delay. (for example, | ||
8 | # to disable any delay, you should add the nodelay option to pam_unix) | ||
9 | auth optional pam_faildelay.so delay=3000000 | ||
10 | |||
11 | # Outputs an issue file prior to each login prompt (Replaces the | ||
12 | # ISSUE_FILE option from login.defs). Uncomment for use | ||
13 | # auth required pam_issue.so issue=/etc/issue | ||
14 | |||
15 | # Disallows root logins except on tty's listed in /etc/securetty | ||
16 | # (Replaces the `CONSOLE' setting from login.defs) | ||
17 | # Note that it is included as a "requisite" module. No password prompts will | ||
18 | # be displayed if this module fails to avoid having the root password | ||
19 | # transmitted on unsecure ttys. | ||
20 | # You can change it to a "required" module if you think it permits to | ||
21 | # guess valid user names of your system (invalid user names are considered | ||
22 | # as possibly being root). | ||
23 | auth [success=ok ignore=ignore user_unknown=ignore default=die] pam_securetty.so | ||
24 | |||
25 | # Disallows other than root logins when /etc/nologin exists | ||
26 | # (Replaces the `NOLOGINS_FILE' option from login.defs) | ||
27 | auth requisite pam_nologin.so | ||
28 | |||
29 | # This module parses environment configuration file(s) | ||
30 | # and also allows you to use an extended config | ||
31 | # file /etc/security/pam_env.conf. | ||
32 | # | ||
33 | # parsing /etc/environment needs "readenv=1" | ||
34 | session required pam_env.so readenv=1 | ||
35 | |||
36 | # Standard Un*x authentication. | ||
37 | auth include common-auth | ||
38 | |||
39 | # This allows certain extra groups to be granted to a user | ||
40 | # based on things like time of day, tty, service, and user. | ||
41 | # Please edit /etc/security/group.conf to fit your needs | ||
42 | # (Replaces the `CONSOLE_GROUPS' option in login.defs) | ||
43 | auth optional pam_group.so | ||
44 | |||
45 | # Uncomment and edit /etc/security/time.conf if you need to set | ||
46 | # time restrainst on logins. | ||
47 | # (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs | ||
48 | # as well as /etc/porttime) | ||
49 | # account requisite pam_time.so | ||
50 | |||
51 | # Uncomment and edit /etc/security/access.conf if you need to | ||
52 | # set access limits. | ||
53 | # (Replaces /etc/login.access file) | ||
54 | # account required pam_access.so | ||
55 | |||
56 | # Sets up user limits according to /etc/security/limits.conf | ||
57 | # (Replaces the use of /etc/limits in old login) | ||
58 | session required pam_limits.so | ||
59 | |||
60 | # Prints the last login info upon succesful login | ||
61 | # (Replaces the `LASTLOG_ENAB' option from login.defs) | ||
62 | session optional pam_lastlog.so | ||
63 | |||
64 | # Prints the motd upon succesful login | ||
65 | # (Replaces the `MOTD_FILE' option in login.defs) | ||
66 | session optional pam_motd.so | ||
67 | |||
68 | # Prints the status of the user's mailbox upon succesful login | ||
69 | # (Replaces the `MAIL_CHECK_ENAB' option from login.defs). | ||
70 | # | ||
71 | # This also defines the MAIL environment variable | ||
72 | # However, userdel also needs MAIL_DIR and MAIL_FILE variables | ||
73 | # in /etc/login.defs to make sure that removing a user | ||
74 | # also removes the user's mail spool file. | ||
75 | # See comments in /etc/login.defs | ||
76 | session optional pam_mail.so standard | ||
77 | |||
78 | # Standard Un*x account and session | ||
79 | account include common-account | ||
80 | password include common-password | ||
81 | session include common-session | ||
diff --git a/meta/recipes-extended/shadow/files/pam.d/newusers b/meta/recipes-extended/shadow/files/pam.d/newusers new file mode 100644 index 0000000000..4aa3dde48b --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/newusers | |||
@@ -0,0 +1,4 @@ | |||
1 | # The PAM configuration file for the Shadow 'newusers' service | ||
2 | # | ||
3 | |||
4 | password include common-password | ||
diff --git a/meta/recipes-extended/shadow/files/pam.d/passwd b/meta/recipes-extended/shadow/files/pam.d/passwd new file mode 100644 index 0000000000..f534992435 --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/passwd | |||
@@ -0,0 +1,5 @@ | |||
1 | # | ||
2 | # The PAM configuration file for the Shadow `passwd' service | ||
3 | # | ||
4 | |||
5 | password include common-password | ||
diff --git a/meta/recipes-extended/shadow/files/pam.d/su b/meta/recipes-extended/shadow/files/pam.d/su new file mode 100644 index 0000000000..8d590a32e6 --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/su | |||
@@ -0,0 +1,57 @@ | |||
1 | # | ||
2 | # The PAM configuration file for the Shadow `su' service | ||
3 | # | ||
4 | |||
5 | # This allows root to su without passwords (normal operation) | ||
6 | auth sufficient pam_rootok.so | ||
7 | |||
8 | # Uncomment this to force users to be a member of group root | ||
9 | # before they can use `su'. You can also add "group=foo" | ||
10 | # to the end of this line if you want to use a group other | ||
11 | # than the default "root" (but this may have side effect of | ||
12 | # denying "root" user, unless she's a member of "foo" or explicitly | ||
13 | # permitted earlier by e.g. "sufficient pam_rootok.so"). | ||
14 | # (Replaces the `SU_WHEEL_ONLY' option from login.defs) | ||
15 | # auth required pam_wheel.so | ||
16 | |||
17 | # Uncomment this if you want wheel members to be able to | ||
18 | # su without a password. | ||
19 | # auth sufficient pam_wheel.so trust | ||
20 | |||
21 | # Uncomment this if you want members of a specific group to not | ||
22 | # be allowed to use su at all. | ||
23 | # auth required pam_wheel.so deny group=nosu | ||
24 | |||
25 | # Uncomment and edit /etc/security/time.conf if you need to set | ||
26 | # time restrainst on su usage. | ||
27 | # (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs | ||
28 | # as well as /etc/porttime) | ||
29 | # account requisite pam_time.so | ||
30 | |||
31 | # This module parses environment configuration file(s) | ||
32 | # and also allows you to use an extended config | ||
33 | # file /etc/security/pam_env.conf. | ||
34 | # | ||
35 | # parsing /etc/environment needs "readenv=1" | ||
36 | session required pam_env.so readenv=1 | ||
37 | |||
38 | # Defines the MAIL environment variable | ||
39 | # However, userdel also needs MAIL_DIR and MAIL_FILE variables | ||
40 | # in /etc/login.defs to make sure that removing a user | ||
41 | # also removes the user's mail spool file. | ||
42 | # See comments in /etc/login.defs | ||
43 | # | ||
44 | # "nopen" stands to avoid reporting new mail when su'ing to another user | ||
45 | session optional pam_mail.so nopen | ||
46 | |||
47 | # Sets up user limits, please uncomment and read /etc/security/limits.conf | ||
48 | # to enable this functionality. | ||
49 | # (Replaces the use of /etc/limits in old login) | ||
50 | # session required pam_limits.so | ||
51 | |||
52 | # The standard Unix authentication modules, used with | ||
53 | # NIS (man nsswitch) as well as normal /etc/passwd and | ||
54 | # /etc/shadow entries. | ||
55 | auth include common-auth | ||
56 | account include common-account | ||
57 | session include common-session | ||
diff --git a/meta/recipes-extended/shadow/files/securetty b/meta/recipes-extended/shadow/files/securetty new file mode 100644 index 0000000000..ecc246f799 --- /dev/null +++ b/meta/recipes-extended/shadow/files/securetty | |||
@@ -0,0 +1,234 @@ | |||
1 | # /etc/securetty: list of terminals on which root is allowed to login. | ||
2 | # See securetty(5) and login(1). | ||
3 | console | ||
4 | |||
5 | # Standard serial ports | ||
6 | ttyS0 | ||
7 | ttyS1 | ||
8 | ttyS2 | ||
9 | ttyS3 | ||
10 | |||
11 | # ARM AMBA SoCs | ||
12 | ttyAM0 | ||
13 | ttyAM1 | ||
14 | ttyAM2 | ||
15 | ttyAM3 | ||
16 | ttyAMA0 | ||
17 | ttyAMA1 | ||
18 | ttyAMA2 | ||
19 | ttyAMA3 | ||
20 | |||
21 | # QCOM Socs | ||
22 | ttyHSL0 | ||
23 | ttyHSL1 | ||
24 | ttyHSL2 | ||
25 | ttyHSL3 | ||
26 | ttyMSM0 | ||
27 | ttyMSM1 | ||
28 | ttyMSM2 | ||
29 | |||
30 | # Samsung ARM SoCs | ||
31 | ttySAC0 | ||
32 | ttySAC1 | ||
33 | ttySAC2 | ||
34 | ttySAC3 | ||
35 | |||
36 | # STM SoCs | ||
37 | ttyAS0 | ||
38 | ttyAS1 | ||
39 | ttyAS2 | ||
40 | ttyAS3 | ||
41 | |||
42 | # TI OMAP SoCs | ||
43 | ttyO0 | ||
44 | ttyO1 | ||
45 | ttyO2 | ||
46 | ttyO3 | ||
47 | |||
48 | # USB dongles | ||
49 | ttyUSB0 | ||
50 | ttyUSB1 | ||
51 | ttyUSB2 | ||
52 | |||
53 | # USB serial gadget | ||
54 | ttyGS0 | ||
55 | |||
56 | # PowerMac | ||
57 | ttyPZ0 | ||
58 | ttyPZ1 | ||
59 | ttyPZ2 | ||
60 | ttyPZ3 | ||
61 | |||
62 | # Embedded MPC platforms | ||
63 | ttyPSC0 | ||
64 | ttyPSC1 | ||
65 | ttyPSC2 | ||
66 | ttyPSC3 | ||
67 | ttyPSC4 | ||
68 | ttyPSC5 | ||
69 | |||
70 | # PA-RISC mux ports | ||
71 | ttyB0 | ||
72 | ttyB1 | ||
73 | |||
74 | # Standard hypervisor virtual console | ||
75 | hvc0 | ||
76 | |||
77 | # Oldstyle Xen console | ||
78 | xvc0 | ||
79 | |||
80 | # Standard consoles | ||
81 | tty1 | ||
82 | tty2 | ||
83 | tty3 | ||
84 | tty4 | ||
85 | tty5 | ||
86 | tty6 | ||
87 | tty7 | ||
88 | tty8 | ||
89 | tty9 | ||
90 | tty10 | ||
91 | tty11 | ||
92 | tty12 | ||
93 | tty13 | ||
94 | tty14 | ||
95 | tty15 | ||
96 | tty16 | ||
97 | tty17 | ||
98 | tty18 | ||
99 | tty19 | ||
100 | tty20 | ||
101 | tty21 | ||
102 | tty22 | ||
103 | tty23 | ||
104 | tty24 | ||
105 | tty25 | ||
106 | tty26 | ||
107 | tty27 | ||
108 | tty28 | ||
109 | tty29 | ||
110 | tty30 | ||
111 | tty31 | ||
112 | tty32 | ||
113 | tty33 | ||
114 | tty34 | ||
115 | tty35 | ||
116 | tty36 | ||
117 | tty37 | ||
118 | tty38 | ||
119 | tty39 | ||
120 | tty40 | ||
121 | tty41 | ||
122 | tty42 | ||
123 | tty43 | ||
124 | tty44 | ||
125 | tty45 | ||
126 | tty46 | ||
127 | tty47 | ||
128 | tty48 | ||
129 | tty49 | ||
130 | tty50 | ||
131 | tty51 | ||
132 | tty52 | ||
133 | tty53 | ||
134 | tty54 | ||
135 | tty55 | ||
136 | tty56 | ||
137 | tty57 | ||
138 | tty58 | ||
139 | tty59 | ||
140 | tty60 | ||
141 | tty61 | ||
142 | tty62 | ||
143 | tty63 | ||
144 | |||
145 | # Local X displays (allows empty passwords with pam_unix's nullok_secure) | ||
146 | pts/0 | ||
147 | pts/1 | ||
148 | pts/2 | ||
149 | pts/3 | ||
150 | |||
151 | # Embedded Freescale i.MX ports | ||
152 | ttymxc0 | ||
153 | ttymxc1 | ||
154 | ttymxc2 | ||
155 | ttymxc3 | ||
156 | ttymxc4 | ||
157 | ttymxc5 | ||
158 | |||
159 | # Freescale lpuart ports | ||
160 | ttyLP0 | ||
161 | ttyLP1 | ||
162 | ttyLP2 | ||
163 | ttyLP3 | ||
164 | ttyLP4 | ||
165 | ttyLP5 | ||
166 | |||
167 | # Standard serial ports, with devfs | ||
168 | tts/0 | ||
169 | tts/1 | ||
170 | |||
171 | # Standard consoles, with devfs | ||
172 | vc/1 | ||
173 | vc/2 | ||
174 | vc/3 | ||
175 | vc/4 | ||
176 | vc/5 | ||
177 | vc/6 | ||
178 | vc/7 | ||
179 | vc/8 | ||
180 | vc/9 | ||
181 | vc/10 | ||
182 | vc/11 | ||
183 | vc/12 | ||
184 | vc/13 | ||
185 | vc/14 | ||
186 | vc/15 | ||
187 | vc/16 | ||
188 | vc/17 | ||
189 | vc/18 | ||
190 | vc/19 | ||
191 | vc/20 | ||
192 | vc/21 | ||
193 | vc/22 | ||
194 | vc/23 | ||
195 | vc/24 | ||
196 | vc/25 | ||
197 | vc/26 | ||
198 | vc/27 | ||
199 | vc/28 | ||
200 | vc/29 | ||
201 | vc/30 | ||
202 | vc/31 | ||
203 | vc/32 | ||
204 | vc/33 | ||
205 | vc/34 | ||
206 | vc/35 | ||
207 | vc/36 | ||
208 | vc/37 | ||
209 | vc/38 | ||
210 | vc/39 | ||
211 | vc/40 | ||
212 | vc/41 | ||
213 | vc/42 | ||
214 | vc/43 | ||
215 | vc/44 | ||
216 | vc/45 | ||
217 | vc/46 | ||
218 | vc/47 | ||
219 | vc/48 | ||
220 | vc/49 | ||
221 | vc/50 | ||
222 | vc/51 | ||
223 | vc/52 | ||
224 | vc/53 | ||
225 | vc/54 | ||
226 | vc/55 | ||
227 | vc/56 | ||
228 | vc/57 | ||
229 | vc/58 | ||
230 | vc/59 | ||
231 | vc/60 | ||
232 | vc/61 | ||
233 | vc/62 | ||
234 | vc/63 | ||
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch b/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch new file mode 100644 index 0000000000..a7bb0a9290 --- /dev/null +++ b/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | # commit message copied from openembedded: | ||
2 | # commit 246c80637b135f3a113d319b163422f98174ee6c | ||
3 | # Author: Khem Raj <raj.khem@gmail.com> | ||
4 | # Date: Wed Jun 9 13:37:03 2010 -0700 | ||
5 | # | ||
6 | # shadow-4.1.4.2: Add patches to support dots in login id. | ||
7 | # | ||
8 | # Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | # | ||
10 | # comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11 | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
15 | |||
16 | Index: shadow-4.1.4.2/libmisc/chkname.c | ||
17 | =================================================================== | ||
18 | --- shadow-4.1.4.2.orig/libmisc/chkname.c 2009-04-28 12:14:04.000000000 -0700 | ||
19 | +++ shadow-4.1.4.2/libmisc/chkname.c 2010-06-03 17:43:20.638973857 -0700 | ||
20 | @@ -61,6 +61,7 @@ static bool is_valid_name (const char *n | ||
21 | ( ('0' <= *name) && ('9' >= *name) ) || | ||
22 | ('_' == *name) || | ||
23 | ('-' == *name) || | ||
24 | + ('.' == *name) || | ||
25 | ( ('$' == *name) && ('\0' == *(name + 1)) ) | ||
26 | )) { | ||
27 | return false; | ||
diff --git a/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch b/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch new file mode 100644 index 0000000000..15f8044fa2 --- /dev/null +++ b/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch | |||
@@ -0,0 +1,91 @@ | |||
1 | The system-auth in the configure files is from Fedora which put all the 4 pam type rules | ||
2 | in one file. | ||
3 | In yocto it obey the way with Debian/Ubuntu, and the names are common-auth, common-account, | ||
4 | common-password and common-session. | ||
5 | So update them with oe way. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Kang Kai <kai.kang@windriver.com> | ||
10 | |||
11 | diff -Nur shadow-4.1.4.3/etc/pam.d.orig/chage shadow-4.1.4.3/etc/pam.d/chage | ||
12 | --- shadow-4.1.4.3/etc/pam.d.orig/chage 2011-07-20 19:02:27.384844958 +0800 | ||
13 | +++ shadow-4.1.4.3/etc/pam.d/chage 2011-07-20 19:03:08.964844958 +0800 | ||
14 | @@ -1,4 +1,4 @@ | ||
15 | #%PAM-1.0 | ||
16 | auth sufficient pam_rootok.so | ||
17 | account required pam_permit.so | ||
18 | -password include system-auth | ||
19 | +password include common-password | ||
20 | diff -Nur shadow-4.1.4.3/etc/pam.d.orig/chgpasswd shadow-4.1.4.3/etc/pam.d/chgpasswd | ||
21 | --- shadow-4.1.4.3/etc/pam.d.orig/chgpasswd 2011-07-20 19:02:27.384844958 +0800 | ||
22 | +++ shadow-4.1.4.3/etc/pam.d/chgpasswd 2011-07-20 19:03:26.544844958 +0800 | ||
23 | @@ -1,4 +1,4 @@ | ||
24 | #%PAM-1.0 | ||
25 | auth sufficient pam_rootok.so | ||
26 | account required pam_permit.so | ||
27 | -password include system-auth | ||
28 | +password include common-password | ||
29 | diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupadd shadow-4.1.4.3/etc/pam.d/groupadd | ||
30 | --- shadow-4.1.4.3/etc/pam.d.orig/groupadd 2011-07-20 19:02:27.384844958 +0800 | ||
31 | +++ shadow-4.1.4.3/etc/pam.d/groupadd 2011-07-20 19:04:08.124844958 +0800 | ||
32 | @@ -1,4 +1,4 @@ | ||
33 | #%PAM-1.0 | ||
34 | auth sufficient pam_rootok.so | ||
35 | account required pam_permit.so | ||
36 | -password include system-auth | ||
37 | +password include common-password | ||
38 | diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupdel shadow-4.1.4.3/etc/pam.d/groupdel | ||
39 | --- shadow-4.1.4.3/etc/pam.d.orig/groupdel 2011-07-20 19:02:27.384844958 +0800 | ||
40 | +++ shadow-4.1.4.3/etc/pam.d/groupdel 2011-07-20 19:04:26.114844958 +0800 | ||
41 | @@ -1,4 +1,4 @@ | ||
42 | #%PAM-1.0 | ||
43 | auth sufficient pam_rootok.so | ||
44 | account required pam_permit.so | ||
45 | -password include system-auth | ||
46 | +password include common-password | ||
47 | diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupmems shadow-4.1.4.3/etc/pam.d/groupmems | ||
48 | --- shadow-4.1.4.3/etc/pam.d.orig/groupmems 2011-07-20 19:02:27.384844958 +0800 | ||
49 | +++ shadow-4.1.4.3/etc/pam.d/groupmems 2011-07-20 19:04:35.074844958 +0800 | ||
50 | @@ -1,4 +1,4 @@ | ||
51 | #%PAM-1.0 | ||
52 | auth sufficient pam_rootok.so | ||
53 | account required pam_permit.so | ||
54 | -password include system-auth | ||
55 | +password include common-password | ||
56 | diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupmod shadow-4.1.4.3/etc/pam.d/groupmod | ||
57 | --- shadow-4.1.4.3/etc/pam.d.orig/groupmod 2011-07-20 19:02:27.384844958 +0800 | ||
58 | +++ shadow-4.1.4.3/etc/pam.d/groupmod 2011-07-20 19:04:44.864844958 +0800 | ||
59 | @@ -1,4 +1,4 @@ | ||
60 | #%PAM-1.0 | ||
61 | auth sufficient pam_rootok.so | ||
62 | account required pam_permit.so | ||
63 | -password include system-auth | ||
64 | +password include common-password | ||
65 | diff -Nur shadow-4.1.4.3/etc/pam.d.orig/useradd shadow-4.1.4.3/etc/pam.d/useradd | ||
66 | --- shadow-4.1.4.3/etc/pam.d.orig/useradd 2011-07-20 19:02:27.384844958 +0800 | ||
67 | +++ shadow-4.1.4.3/etc/pam.d/useradd 2011-07-20 19:07:26.244844958 +0800 | ||
68 | @@ -1,4 +1,4 @@ | ||
69 | #%PAM-1.0 | ||
70 | auth sufficient pam_rootok.so | ||
71 | account required pam_permit.so | ||
72 | -password include system-auth | ||
73 | +password include common-password | ||
74 | diff -Nur shadow-4.1.4.3/etc/pam.d.orig/userdel shadow-4.1.4.3/etc/pam.d/userdel | ||
75 | --- shadow-4.1.4.3/etc/pam.d.orig/userdel 2011-07-20 19:02:27.384844958 +0800 | ||
76 | +++ shadow-4.1.4.3/etc/pam.d/userdel 2011-07-20 19:07:35.734844958 +0800 | ||
77 | @@ -1,4 +1,4 @@ | ||
78 | #%PAM-1.0 | ||
79 | auth sufficient pam_rootok.so | ||
80 | account required pam_permit.so | ||
81 | -password include system-auth | ||
82 | +password include common-password | ||
83 | diff -Nur shadow-4.1.4.3/etc/pam.d.orig/usermod shadow-4.1.4.3/etc/pam.d/usermod | ||
84 | --- shadow-4.1.4.3/etc/pam.d.orig/usermod 2011-07-20 19:02:27.384844958 +0800 | ||
85 | +++ shadow-4.1.4.3/etc/pam.d/usermod 2011-07-20 19:07:42.024844958 +0800 | ||
86 | @@ -1,4 +1,4 @@ | ||
87 | #%PAM-1.0 | ||
88 | auth sufficient pam_rootok.so | ||
89 | account required pam_permit.so | ||
90 | -password include system-auth | ||
91 | +password include common-password | ||
diff --git a/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch new file mode 100644 index 0000000000..37dc153fca --- /dev/null +++ b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | usermod: fix compilation failure with subids disabled | ||
4 | |||
5 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
6 | --- | ||
7 | src/usermod.c | 3 ++- | ||
8 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/src/usermod.c b/src/usermod.c | ||
11 | index e7d4351..685b50a 100644 | ||
12 | --- a/src/usermod.c | ||
13 | +++ b/src/usermod.c | ||
14 | @@ -1360,7 +1360,7 @@ static void process_flags (int argc, char **argv) | ||
15 | Prog, (unsigned long) user_newid); | ||
16 | exit (E_UID_IN_USE); | ||
17 | } | ||
18 | - | ||
19 | +#ifdef ENABLE_SUBIDS | ||
20 | if ( (vflg || Vflg) | ||
21 | && !is_sub_uid) { | ||
22 | fprintf (stderr, | ||
23 | @@ -1376,6 +1376,7 @@ static void process_flags (int argc, char **argv) | ||
24 | Prog, sub_gid_dbname (), "-w", "-W"); | ||
25 | exit (E_USAGE); | ||
26 | } | ||
27 | +#endif | ||
28 | } | ||
29 | |||
30 | /* | ||
31 | -- | ||
32 | 1.7.9.5 | ||
33 | |||
diff --git a/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb new file mode 100644 index 0000000000..0e0410043b --- /dev/null +++ b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | SUMMARY = "Provider of the machine specific securetty file" | ||
2 | SECTION = "base utils" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
5 | |||
6 | INHIBIT_DEFAULT_DEPS = "1" | ||
7 | |||
8 | PR = "r3" | ||
9 | |||
10 | SRC_URI = "file://securetty" | ||
11 | |||
12 | # Since SERIAL_CONSOLES is likely to be set from the machine configuration | ||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | do_install () { | ||
16 | # Ensure we add a suitable securetty file to the package that has | ||
17 | # most common embedded TTYs defined. | ||
18 | install -d ${D}${sysconfdir} | ||
19 | install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty | ||
20 | if [ ! -z "${SERIAL_CONSOLES}" ]; then | ||
21 | # Our SERIAL_CONSOLES contains a baud rate and sometimes extra | ||
22 | # options as well. The following pearl :) takes that and converts | ||
23 | # it into newline-separated tty's and appends them into | ||
24 | # securetty. So if a machine has a weird looking console device | ||
25 | # node (e.g. ttyAMA0) that securetty does not know, it will get | ||
26 | # appended to securetty and root logins will be allowed on that | ||
27 | # console. | ||
28 | tmp="${SERIAL_CONSOLES}" | ||
29 | for entry in $tmp ; do | ||
30 | ttydev=`echo "$entry" | sed -e 's/^[0-9]*\;//' -e 's/\;.*//'` | ||
31 | if ! grep -q $ttydev ${D}${sysconfdir}/securetty; then | ||
32 | echo $ttydev >> ${D}${sysconfdir}/securetty | ||
33 | fi | ||
34 | done | ||
35 | fi | ||
36 | } | ||
diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb new file mode 100644 index 0000000000..697569c47e --- /dev/null +++ b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | SUMMARY = "Shadow utils requirements for useradd.bbclass" | ||
2 | HOMEPAGE = "http://pkg-shadow.alioth.debian.org" | ||
3 | BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580" | ||
4 | SECTION = "base utils" | ||
5 | LICENSE = "BSD | Artistic-1.0" | ||
6 | LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5" | ||
7 | |||
8 | DEPENDS = "base-passwd" | ||
9 | |||
10 | PR = "r3" | ||
11 | |||
12 | # The sole purpose of this recipe is to provide the /etc/login.defs | ||
13 | # file for the target sysroot - needed so the shadow-native utilities | ||
14 | # can add custom users/groups for recipes that use inherit useradd. | ||
15 | SRC_URI = "file://login.defs_shadow-sysroot" | ||
16 | |||
17 | SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" | ||
18 | SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" | ||
19 | |||
20 | S = "${WORKDIR}" | ||
21 | |||
22 | do_install() { | ||
23 | install -d ${D}${sysconfdir} | ||
24 | install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs | ||
25 | } | ||
26 | |||
27 | sysroot_stage_all() { | ||
28 | sysroot_stage_dir ${D} ${SYSROOT_DESTDIR} | ||
29 | } | ||
30 | |||
31 | # don't create any packages | ||
32 | # otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot | ||
33 | # and this has another copy of /etc/login.defs already provided by shadow | ||
34 | PACKAGES = "" | ||
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc new file mode 100644 index 0000000000..bb3a927c17 --- /dev/null +++ b/meta/recipes-extended/shadow/shadow.inc | |||
@@ -0,0 +1,176 @@ | |||
1 | SUMMARY = "Tools to change and administer password and group data" | ||
2 | HOMEPAGE = "http://pkg-shadow.alioth.debian.org" | ||
3 | BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580" | ||
4 | SECTION = "base/utils" | ||
5 | LICENSE = "BSD | Artistic-1.0" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \ | ||
7 | file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661" | ||
8 | |||
9 | DEPENDS = "shadow-native" | ||
10 | DEPENDS_class-native = "" | ||
11 | DEPENDS_class-nativesdk = "" | ||
12 | |||
13 | SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \ | ||
14 | file://shadow-4.1.3-dots-in-usernames.patch \ | ||
15 | file://usermod-fix-compilation-failure-with-subids-disabled.patch \ | ||
16 | file://fix-installation-failure-with-subids-disabled.patch \ | ||
17 | file://0001-su.c-fix-to-exec-command-correctly.patch \ | ||
18 | file://0001-Do-not-read-login.defs-before-doing-chroot.patch \ | ||
19 | file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \ | ||
20 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ | ||
21 | " | ||
22 | |||
23 | SRC_URI_append_class-target = " \ | ||
24 | file://login_defs_pam.sed \ | ||
25 | file://shadow-update-pam-conf.patch \ | ||
26 | " | ||
27 | |||
28 | SRC_URI_append_class-native = " \ | ||
29 | file://disable-syslog.patch \ | ||
30 | file://allow-for-setting-password-in-clear-text.patch \ | ||
31 | file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ | ||
32 | file://0001-useradd.c-create-parent-directories-when-necessary.patch \ | ||
33 | " | ||
34 | SRC_URI_append_class-nativesdk = " \ | ||
35 | file://disable-syslog.patch \ | ||
36 | " | ||
37 | |||
38 | SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8" | ||
39 | SRC_URI[sha256sum] = "3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41" | ||
40 | |||
41 | # Additional Policy files for PAM | ||
42 | PAM_SRC_URI = "file://pam.d/chfn \ | ||
43 | file://pam.d/chpasswd \ | ||
44 | file://pam.d/chsh \ | ||
45 | file://pam.d/login \ | ||
46 | file://pam.d/newusers \ | ||
47 | file://pam.d/passwd \ | ||
48 | file://pam.d/su" | ||
49 | |||
50 | inherit autotools gettext | ||
51 | |||
52 | EXTRA_OECONF += "--without-audit \ | ||
53 | --without-libcrack \ | ||
54 | --without-selinux \ | ||
55 | --with-group-name-max-length=24 \ | ||
56 | --enable-subordinate-ids=yes \ | ||
57 | ${NSCDOPT}" | ||
58 | |||
59 | NSCDOPT = "" | ||
60 | NSCDOPT_class-native = "--without-nscd" | ||
61 | NSCDOPT_class-nativesdk = "--without-nscd" | ||
62 | NSCDOPT_libc-uclibc = " --without-nscd" | ||
63 | NSCDOPT_libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'libc-spawn', '--with-nscd', '--without-nscd', d)}" | ||
64 | |||
65 | PAM_PLUGINS = "libpam-runtime \ | ||
66 | pam-plugin-faildelay \ | ||
67 | pam-plugin-securetty \ | ||
68 | pam-plugin-nologin \ | ||
69 | pam-plugin-env \ | ||
70 | pam-plugin-group \ | ||
71 | pam-plugin-limits \ | ||
72 | pam-plugin-lastlog \ | ||
73 | pam-plugin-motd \ | ||
74 | pam-plugin-mail \ | ||
75 | pam-plugin-shells \ | ||
76 | pam-plugin-rootok" | ||
77 | |||
78 | PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
79 | PACKAGECONFIG_class-native = "" | ||
80 | PACKAGECONFIG_class-nativesdk = "" | ||
81 | PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}" | ||
82 | PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" | ||
83 | PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" | ||
84 | |||
85 | RDEPENDS_${PN} = "shadow-securetty \ | ||
86 | base-passwd" | ||
87 | RDEPENDS_${PN}_class-native = "" | ||
88 | RDEPENDS_${PN}_class-nativesdk = "" | ||
89 | |||
90 | do_install() { | ||
91 | oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install | ||
92 | |||
93 | # Info dir listing isn't interesting at this point so remove it if it exists. | ||
94 | if [ -e "${D}${infodir}/dir" ]; then | ||
95 | rm -f ${D}${infodir}/dir | ||
96 | fi | ||
97 | |||
98 | # Enable CREATE_HOME by default. | ||
99 | sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs | ||
100 | |||
101 | # As we are on an embedded system, ensure the users mailbox is in | ||
102 | # ~/ not /var/spool/mail by default, as who knows where or how big | ||
103 | # /var is. The system MDA will set this later anyway. | ||
104 | sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs | ||
105 | sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs | ||
106 | |||
107 | # Disable checking emails. | ||
108 | sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs | ||
109 | |||
110 | # Use proper encryption for passwords | ||
111 | sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs | ||
112 | |||
113 | # Now we don't have a mail system. Disable mail creation for now. | ||
114 | sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd | ||
115 | sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd | ||
116 | |||
117 | # Use users group by default | ||
118 | sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd | ||
119 | } | ||
120 | |||
121 | do_install_append() { | ||
122 | # Ensure that the image has as a /var/spool/mail dir so shadow can | ||
123 | # put mailboxes there if the user reconfigures shadow to its | ||
124 | # defaults (see sed below). | ||
125 | install -d ${D}${localstatedir}/spool/mail | ||
126 | |||
127 | if [ -e ${WORKDIR}/pam.d ]; then | ||
128 | install -d ${D}${sysconfdir}/pam.d/ | ||
129 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ | ||
130 | # Remove defaults that are not used when supporting PAM. | ||
131 | sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs | ||
132 | fi | ||
133 | |||
134 | install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} | ||
135 | |||
136 | # Move binaries to the locations we want | ||
137 | rm ${D}${sbindir}/vigr | ||
138 | ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr | ||
139 | if [ "${sbindir}" != "${base_sbindir}" ]; then | ||
140 | mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw | ||
141 | fi | ||
142 | if [ "${bindir}" != "${base_bindir}" ]; then | ||
143 | mv ${D}${bindir}/login ${D}${base_bindir}/login | ||
144 | mv ${D}${bindir}/su ${D}${base_bindir}/su | ||
145 | fi | ||
146 | |||
147 | # Handle link properly after rename, otherwise missing files would | ||
148 | # lead rpm failed dependencies. | ||
149 | ln -sf newgrp.${BPN} ${D}${bindir}/sg | ||
150 | } | ||
151 | |||
152 | inherit update-alternatives | ||
153 | |||
154 | ALTERNATIVE_PRIORITY = "200" | ||
155 | |||
156 | ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su" | ||
157 | ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd" | ||
158 | ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login" | ||
159 | ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw" | ||
160 | ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr" | ||
161 | ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" | ||
162 | |||
163 | ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3" | ||
164 | ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5" | ||
165 | ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3" | ||
166 | |||
167 | pkg_postinst_${PN} () { | ||
168 | if [ "x$D" != "x" ]; then | ||
169 | rootarg="--root $D" | ||
170 | else | ||
171 | rootarg="" | ||
172 | fi | ||
173 | |||
174 | pwconv $rootarg || exit 1 | ||
175 | grpconv $rootarg || exit 1 | ||
176 | } | ||
diff --git a/meta/recipes-extended/shadow/shadow_4.2.1.bb b/meta/recipes-extended/shadow/shadow_4.2.1.bb new file mode 100644 index 0000000000..5675cb8cc9 --- /dev/null +++ b/meta/recipes-extended/shadow/shadow_4.2.1.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require shadow.inc | ||
2 | |||
3 | # Build falsely assumes that if --enable-libpam is set, we don't need to link against | ||
4 | # libcrypt. This breaks chsh. | ||
5 | BUILD_LDFLAGS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', bb.utils.contains('DISTRO_FEATURES', 'libc-crypt', '-lcrypt', '', d), '', d)}" | ||
6 | |||
7 | BBCLASSEXTEND = "native nativesdk" | ||
8 | |||
9 | |||
10 | |||
diff --git a/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch b/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch new file mode 100644 index 0000000000..2ea1ffda57 --- /dev/null +++ b/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch | |||
@@ -0,0 +1,218 @@ | |||
1 | slang: change char type to signed char in macros | ||
2 | |||
3 | C language has 3 distinct char types: | ||
4 | char | ||
5 | unsigned char | ||
6 | signed char | ||
7 | A char has the same range of values as signed char on X86, | ||
8 | but same as unsigned char on ARM which made Slang's typecast() | ||
9 | and array_sort() unable to work for char value on ARM, since | ||
10 | Slang is assuming "char" as "signed char". | ||
11 | |||
12 | Now we change "char" as "signed char" explicitly in | ||
13 | util/mkslarith2.sl, and use it to regenerate src/slarith2.inc | ||
14 | |||
15 | Upstream-Status: Submitted | ||
16 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
17 | --- | ||
18 | src/slarith2.inc | 72 ++++++++++++++++++++++++------------------------- | ||
19 | src/util/mkslarith2.sl | 2 - | ||
20 | 2 files changed, 37 insertions(+), 37 deletions(-) | ||
21 | |||
22 | --- a/src/util/mkslarith2.sl | ||
23 | +++ b/src/util/mkslarith2.sl | ||
24 | @@ -1,7 +1,7 @@ | ||
25 | #!/usr/bin/env slsh | ||
26 | |||
27 | private variable CTypes = | ||
28 | - ["char", "unsigned char", "short", "unsigned short", "int", "unsigned int", | ||
29 | + ["signed char", "unsigned char", "short", "unsigned short", "int", "unsigned int", | ||
30 | "long", "unsigned long", "long long", "unsigned long long", | ||
31 | "float", "double", "long double"]; | ||
32 | private variable Is_Int_Type = | ||
33 | --- a/src/slarith2.inc | ||
34 | +++ b/src/slarith2.inc | ||
35 | @@ -1,43 +1,43 @@ | ||
36 | /* DO NOT EDIT -- this file was generated by src/util/mkslarith2.sl */ | ||
37 | -/* ------------ char ---------- */ | ||
38 | -DEFUN_1(copy_char_to_char,char,char) | ||
39 | +/* ------------ signed char ---------- */ | ||
40 | +DEFUN_1(copy_char_to_char,signed char,signed char) | ||
41 | #define char_to_char NULL | ||
42 | #define copy_char_to_uchar copy_char_to_char | ||
43 | #define char_to_uchar NULL | ||
44 | -DEFUN_1(copy_char_to_short,char,short) | ||
45 | +DEFUN_1(copy_char_to_short,signed char,short) | ||
46 | #define char_to_short NULL | ||
47 | -DEFUN_1(copy_char_to_ushort,char,unsigned short) | ||
48 | +DEFUN_1(copy_char_to_ushort,signed char,unsigned short) | ||
49 | #define char_to_ushort NULL | ||
50 | -DEFUN_1(copy_char_to_int,char,int) | ||
51 | -DEFUN_2(char_to_int,char,int,copy_char_to_int) | ||
52 | -DEFUN_1(copy_char_to_uint,char,unsigned int) | ||
53 | -DEFUN_2(char_to_uint,char,unsigned int,copy_char_to_uint) | ||
54 | -DEFUN_1(copy_char_to_long,char,long) | ||
55 | -DEFUN_2(char_to_long,char,long,copy_char_to_long) | ||
56 | -DEFUN_1(copy_char_to_ulong,char,unsigned long) | ||
57 | -DEFUN_2(char_to_ulong,char,unsigned long,copy_char_to_ulong) | ||
58 | +DEFUN_1(copy_char_to_int,signed char,int) | ||
59 | +DEFUN_2(char_to_int,signed char,int,copy_char_to_int) | ||
60 | +DEFUN_1(copy_char_to_uint,signed char,unsigned int) | ||
61 | +DEFUN_2(char_to_uint,signed char,unsigned int,copy_char_to_uint) | ||
62 | +DEFUN_1(copy_char_to_long,signed char,long) | ||
63 | +DEFUN_2(char_to_long,signed char,long,copy_char_to_long) | ||
64 | +DEFUN_1(copy_char_to_ulong,signed char,unsigned long) | ||
65 | +DEFUN_2(char_to_ulong,signed char,unsigned long,copy_char_to_ulong) | ||
66 | #if defined(HAVE_LONG_LONG) | ||
67 | -DEFUN_1(copy_char_to_llong,char,long long) | ||
68 | -DEFUN_2(char_to_llong,char,long long,copy_char_to_llong) | ||
69 | +DEFUN_1(copy_char_to_llong,signed char,long long) | ||
70 | +DEFUN_2(char_to_llong,signed char,long long,copy_char_to_llong) | ||
71 | #endif /* defined(HAVE_LONG_LONG) */ | ||
72 | #if defined(HAVE_LONG_LONG) | ||
73 | -DEFUN_1(copy_char_to_ullong,char,unsigned long long) | ||
74 | -DEFUN_2(char_to_ullong,char,unsigned long long,copy_char_to_ullong) | ||
75 | +DEFUN_1(copy_char_to_ullong,signed char,unsigned long long) | ||
76 | +DEFUN_2(char_to_ullong,signed char,unsigned long long,copy_char_to_ullong) | ||
77 | #endif /* defined(HAVE_LONG_LONG) */ | ||
78 | #if SLANG_HAS_FLOAT | ||
79 | -DEFUN_1(copy_char_to_float,char,float) | ||
80 | -DEFUN_2(char_to_float,char,float,copy_char_to_float) | ||
81 | +DEFUN_1(copy_char_to_float,signed char,float) | ||
82 | +DEFUN_2(char_to_float,signed char,float,copy_char_to_float) | ||
83 | #endif /* SLANG_HAS_FLOAT */ | ||
84 | #if SLANG_HAS_FLOAT | ||
85 | -DEFUN_1(copy_char_to_double,char,double) | ||
86 | -DEFUN_2(char_to_double,char,double,copy_char_to_double) | ||
87 | +DEFUN_1(copy_char_to_double,signed char,double) | ||
88 | +DEFUN_2(char_to_double,signed char,double,copy_char_to_double) | ||
89 | #endif /* SLANG_HAS_FLOAT */ | ||
90 | #if defined(HAVE_LONG_DOUBLE) | ||
91 | -DEFUN_1(copy_char_to_ldouble,char,long double) | ||
92 | -DEFUN_2(char_to_ldouble,char,long double,copy_char_to_ldouble) | ||
93 | +DEFUN_1(copy_char_to_ldouble,signed char,long double) | ||
94 | +DEFUN_2(char_to_ldouble,signed char,long double,copy_char_to_ldouble) | ||
95 | #endif /* defined(HAVE_LONG_DOUBLE) */ | ||
96 | #if SLANG_HAS_FLOAT | ||
97 | -TO_DOUBLE_FUN(char_to_one_double,char) | ||
98 | +TO_DOUBLE_FUN(char_to_one_double,signed char) | ||
99 | #endif | ||
100 | |||
101 | /* ------------ unsigned char ---------- */ | ||
102 | @@ -82,7 +82,7 @@ TO_DOUBLE_FUN(uchar_to_one_double,unsign | ||
103 | #endif | ||
104 | |||
105 | /* ------------ short ---------- */ | ||
106 | -DEFUN_1(copy_short_to_char,short,char) | ||
107 | +DEFUN_1(copy_short_to_char,short,signed char) | ||
108 | #define short_to_char NULL | ||
109 | DEFUN_1(copy_short_to_uchar,short,unsigned char) | ||
110 | #define short_to_uchar NULL | ||
111 | @@ -123,7 +123,7 @@ TO_DOUBLE_FUN(short_to_one_double,short) | ||
112 | #endif | ||
113 | |||
114 | /* ------------ unsigned short ---------- */ | ||
115 | -DEFUN_1(copy_ushort_to_char,unsigned short,char) | ||
116 | +DEFUN_1(copy_ushort_to_char,unsigned short,signed char) | ||
117 | #define ushort_to_char NULL | ||
118 | DEFUN_1(copy_ushort_to_uchar,unsigned short,unsigned char) | ||
119 | #define ushort_to_uchar NULL | ||
120 | @@ -164,7 +164,7 @@ TO_DOUBLE_FUN(ushort_to_one_double,unsig | ||
121 | #endif | ||
122 | |||
123 | /* ------------ int ---------- */ | ||
124 | -DEFUN_1(copy_int_to_char,int,char) | ||
125 | +DEFUN_1(copy_int_to_char,int,signed char) | ||
126 | #define int_to_char NULL | ||
127 | DEFUN_1(copy_int_to_uchar,int,unsigned char) | ||
128 | #define int_to_uchar NULL | ||
129 | @@ -205,7 +205,7 @@ TO_DOUBLE_FUN(int_to_one_double,int) | ||
130 | #endif | ||
131 | |||
132 | /* ------------ unsigned int ---------- */ | ||
133 | -DEFUN_1(copy_uint_to_char,unsigned int,char) | ||
134 | +DEFUN_1(copy_uint_to_char,unsigned int,signed char) | ||
135 | #define uint_to_char NULL | ||
136 | DEFUN_1(copy_uint_to_uchar,unsigned int,unsigned char) | ||
137 | #define uint_to_uchar NULL | ||
138 | @@ -246,7 +246,7 @@ TO_DOUBLE_FUN(uint_to_one_double,unsigne | ||
139 | #endif | ||
140 | |||
141 | /* ------------ long ---------- */ | ||
142 | -DEFUN_1(copy_long_to_char,long,char) | ||
143 | +DEFUN_1(copy_long_to_char,long,signed char) | ||
144 | #define long_to_char NULL | ||
145 | DEFUN_1(copy_long_to_uchar,long,unsigned char) | ||
146 | #define long_to_uchar NULL | ||
147 | @@ -287,7 +287,7 @@ TO_DOUBLE_FUN(long_to_one_double,long) | ||
148 | #endif | ||
149 | |||
150 | /* ------------ unsigned long ---------- */ | ||
151 | -DEFUN_1(copy_ulong_to_char,unsigned long,char) | ||
152 | +DEFUN_1(copy_ulong_to_char,unsigned long,signed char) | ||
153 | #define ulong_to_char NULL | ||
154 | DEFUN_1(copy_ulong_to_uchar,unsigned long,unsigned char) | ||
155 | #define ulong_to_uchar NULL | ||
156 | @@ -329,7 +329,7 @@ TO_DOUBLE_FUN(ulong_to_one_double,unsign | ||
157 | |||
158 | /* ------------ long long ---------- */ | ||
159 | #if defined(HAVE_LONG_LONG) | ||
160 | -DEFUN_1(copy_llong_to_char,long long,char) | ||
161 | +DEFUN_1(copy_llong_to_char,long long,signed char) | ||
162 | #define llong_to_char NULL | ||
163 | DEFUN_1(copy_llong_to_uchar,long long,unsigned char) | ||
164 | #define llong_to_uchar NULL | ||
165 | @@ -372,7 +372,7 @@ TO_DOUBLE_FUN(llong_to_one_double,long l | ||
166 | |||
167 | /* ------------ unsigned long long ---------- */ | ||
168 | #if defined(HAVE_LONG_LONG) | ||
169 | -DEFUN_1(copy_ullong_to_char,unsigned long long,char) | ||
170 | +DEFUN_1(copy_ullong_to_char,unsigned long long,signed char) | ||
171 | #define ullong_to_char NULL | ||
172 | DEFUN_1(copy_ullong_to_uchar,unsigned long long,unsigned char) | ||
173 | #define ullong_to_uchar NULL | ||
174 | @@ -415,7 +415,7 @@ TO_DOUBLE_FUN(ullong_to_one_double,unsig | ||
175 | |||
176 | /* ------------ float ---------- */ | ||
177 | #if SLANG_HAS_FLOAT | ||
178 | -DEFUN_1(copy_float_to_char,float,char) | ||
179 | +DEFUN_1(copy_float_to_char,float,signed char) | ||
180 | #define float_to_char NULL | ||
181 | DEFUN_1(copy_float_to_uchar,float,unsigned char) | ||
182 | #define float_to_uchar NULL | ||
183 | @@ -458,7 +458,7 @@ TO_DOUBLE_FUN(float_to_one_double,float) | ||
184 | |||
185 | /* ------------ double ---------- */ | ||
186 | #if SLANG_HAS_FLOAT | ||
187 | -DEFUN_1(copy_double_to_char,double,char) | ||
188 | +DEFUN_1(copy_double_to_char,double,signed char) | ||
189 | #define double_to_char NULL | ||
190 | DEFUN_1(copy_double_to_uchar,double,unsigned char) | ||
191 | #define double_to_uchar NULL | ||
192 | @@ -501,7 +501,7 @@ TO_DOUBLE_FUN(double_to_one_double,doubl | ||
193 | |||
194 | /* ------------ long double ---------- */ | ||
195 | #if defined(HAVE_LONG_DOUBLE) | ||
196 | -DEFUN_1(copy_ldouble_to_char,long double,char) | ||
197 | +DEFUN_1(copy_ldouble_to_char,long double,signed char) | ||
198 | #define ldouble_to_char NULL | ||
199 | DEFUN_1(copy_ldouble_to_uchar,long double,unsigned char) | ||
200 | #define ldouble_to_uchar NULL | ||
201 | @@ -545,7 +545,7 @@ TO_DOUBLE_FUN(ldouble_to_one_double,long | ||
202 | #if SLANG_HAS_FLOAT | ||
203 | static To_Double_Fun_Table_Type To_Double_Fun_Table [MAX_ARITHMETIC_TYPES] = | ||
204 | { | ||
205 | - {sizeof(char), char_to_one_double}, | ||
206 | + {sizeof(signed char), char_to_one_double}, | ||
207 | {sizeof(unsigned char), uchar_to_one_double}, | ||
208 | {sizeof(short), short_to_one_double}, | ||
209 | {sizeof(unsigned short), ushort_to_one_double}, | ||
210 | @@ -583,7 +583,7 @@ static To_Double_Fun_Table_Type To_Doubl | ||
211 | |||
212 | static Binary_Matrix_Type Binary_Matrix [MAX_ARITHMETIC_TYPES][MAX_ARITHMETIC_TYPES] = | ||
213 | { | ||
214 | - /* char */ | ||
215 | + /* signed char */ | ||
216 | { | ||
217 | {(FVOID_STAR)copy_char_to_char, char_to_char}, | ||
218 | {(FVOID_STAR)copy_char_to_uchar, char_to_uchar}, | ||
diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/meta/recipes-extended/slang/slang/fix-check-pcre.patch new file mode 100644 index 0000000000..0c1553a661 --- /dev/null +++ b/meta/recipes-extended/slang/slang/fix-check-pcre.patch | |||
@@ -0,0 +1,108 @@ | |||
1 | fix the pcre existence checking | ||
2 | |||
3 | when check if there is pcre, the configure file always check | ||
4 | the host dir. now we make it work by adding correct prefix for | ||
5 | cross-compile environment. | ||
6 | |||
7 | When enable pcre-module, we see a QA warning because rpaths | ||
8 | hardcoded into the build, rpaths are not needed, so lets turn | ||
9 | this off. | ||
10 | |||
11 | Upstream-Status: Inappropriate | ||
12 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
13 | --- | ||
14 | configure | 60 ++++++------------------------------------------------------ | ||
15 | 1 files changed, 6 insertions(+), 54 deletions(-) | ||
16 | |||
17 | diff --git a/configure b/configure | ||
18 | index f1586c3..d22814f 100755 | ||
19 | --- a/configure | ||
20 | +++ b/configure | ||
21 | @@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; } | ||
22 | /usr/include/pcre,/usr/lib \ | ||
23 | /usr/pcre/include,/usr/pcre/lib \ | ||
24 | /usr/include,/usr/lib \ | ||
25 | + /usr/include,/usr/lib64 \ | ||
26 | /opt/include/pcre,/opt/lib \ | ||
27 | /opt/pcre/include,/opt/pcre/lib \ | ||
28 | /opt/include,/opt/lib" | ||
29 | @@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; } | ||
30 | xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` | ||
31 | xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` | ||
32 | found=0 | ||
33 | - if test -r $xincdir/$xincfile | ||
34 | + if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile | ||
35 | then | ||
36 | for E in $exts | ||
37 | do | ||
38 | - if test -r "$xlibdir/$xlibfile.$E" | ||
39 | + if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" | ||
40 | then | ||
41 | - jd_pcre_include_dir="$xincdir" | ||
42 | - jd_pcre_library_dir="$xlibdir" | ||
43 | + jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" | ||
44 | + jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" | ||
45 | jd_with_pcre_library="yes" | ||
46 | found=1 | ||
47 | break | ||
48 | @@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; } | ||
49 | then | ||
50 | PCRE_LIB="" | ||
51 | else | ||
52 | - | ||
53 | -if test "X$jd_pcre_library_dir" != "X" | ||
54 | -then | ||
55 | - if test "X$RPATH" = "X" | ||
56 | - then | ||
57 | - | ||
58 | -case "$host_os" in | ||
59 | - *linux*|*solaris* ) | ||
60 | - if test "X$GCC" = Xyes | ||
61 | - then | ||
62 | - if test "X$ac_R_nospace" = "Xno" | ||
63 | - then | ||
64 | - RPATH="-Wl,-R," | ||
65 | - else | ||
66 | - RPATH="-Wl,-R" | ||
67 | - fi | ||
68 | - else | ||
69 | - if test "X$ac_R_nospace" = "Xno" | ||
70 | - then | ||
71 | - RPATH="-R " | ||
72 | - else | ||
73 | - RPATH="-R" | ||
74 | - fi | ||
75 | - fi | ||
76 | - ;; | ||
77 | - *osf*|*openbsd*) | ||
78 | - if test "X$GCC" = Xyes | ||
79 | - then | ||
80 | - RPATH="-Wl,-rpath," | ||
81 | - else | ||
82 | - RPATH="-rpath " | ||
83 | - fi | ||
84 | - ;; | ||
85 | - *netbsd*) | ||
86 | - if test "X$GCC" = Xyes | ||
87 | - then | ||
88 | - RPATH="-Wl,-R" | ||
89 | - fi | ||
90 | - ;; | ||
91 | -esac | ||
92 | - | ||
93 | - if test "X$RPATH" != "X" | ||
94 | - then | ||
95 | - RPATH="$RPATH$jd_pcre_library_dir" | ||
96 | - fi | ||
97 | - else | ||
98 | - RPATH="$RPATH:$jd_pcre_library_dir" | ||
99 | - fi | ||
100 | -fi | ||
101 | - | ||
102 | + RPATH="" | ||
103 | fi | ||
104 | |||
105 | PCRE_INC=-I$jd_pcre_include_dir | ||
106 | -- | ||
107 | 1.7.4.1 | ||
108 | |||
diff --git a/meta/recipes-extended/slang/slang/rpathfix.patch b/meta/recipes-extended/slang/slang/rpathfix.patch new file mode 100644 index 0000000000..50cac9264f --- /dev/null +++ b/meta/recipes-extended/slang/slang/rpathfix.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | Without this patch we see rpaths hardcoded into the build which results in QA | ||
2 | warnings. These rpaths are not needed so lets turn this off. | ||
3 | |||
4 | Upstream-Status: Inappropriate | ||
5 | (but could be turned into a proper configure option) | ||
6 | |||
7 | RP 2012/03/14 | ||
8 | |||
9 | Index: slang-2.2.4/configure | ||
10 | =================================================================== | ||
11 | --- slang-2.2.4.orig/configure 2012-03-14 23:40:01.283560679 +0000 | ||
12 | +++ slang-2.2.4/configure 2012-03-14 23:41:18.023558900 +0000 | ||
13 | @@ -6081,56 +6081,7 @@ | ||
14 | ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS" | ||
15 | CFLAGS="$CFLAGS $IEEE_CFLAGS" | ||
16 | |||
17 | - | ||
18 | -if test "X$libdir" != "X" | ||
19 | -then | ||
20 | - if test "X$RPATH" = "X" | ||
21 | - then | ||
22 | - | ||
23 | -case "$host_os" in | ||
24 | - *linux*|*solaris* ) | ||
25 | - if test "X$GCC" = Xyes | ||
26 | - then | ||
27 | - if test "X$ac_R_nospace" = "Xno" | ||
28 | - then | ||
29 | - RPATH="-Wl,-R," | ||
30 | - else | ||
31 | - RPATH="-Wl,-R" | ||
32 | - fi | ||
33 | - else | ||
34 | - if test "X$ac_R_nospace" = "Xno" | ||
35 | - then | ||
36 | - RPATH="-R " | ||
37 | - else | ||
38 | - RPATH="-R" | ||
39 | - fi | ||
40 | - fi | ||
41 | - ;; | ||
42 | - *osf*|*openbsd*) | ||
43 | - if test "X$GCC" = Xyes | ||
44 | - then | ||
45 | - RPATH="-Wl,-rpath," | ||
46 | - else | ||
47 | - RPATH="-rpath " | ||
48 | - fi | ||
49 | - ;; | ||
50 | - *netbsd*) | ||
51 | - if test "X$GCC" = Xyes | ||
52 | - then | ||
53 | - RPATH="-Wl,-R" | ||
54 | - fi | ||
55 | - ;; | ||
56 | -esac | ||
57 | - | ||
58 | - if test "X$RPATH" != "X" | ||
59 | - then | ||
60 | - RPATH="$RPATH$libdir" | ||
61 | - fi | ||
62 | - else | ||
63 | - RPATH="$RPATH:$libdir" | ||
64 | - fi | ||
65 | -fi | ||
66 | - | ||
67 | +RPATH="" | ||
68 | |||
69 | # The cast to long int works around a bug in the HP C Compiler | ||
70 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | ||
diff --git a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch new file mode 100644 index 0000000000..958fe983c5 --- /dev/null +++ b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch | |||
@@ -0,0 +1,116 @@ | |||
1 | From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Zheng Junling <zhengjunling@huawei.com> | ||
3 | Date: Mon, 16 Jun 2014 12:51:25 +0000 | ||
4 | Subject: [PATCH] slang: fix the iconv existence checking | ||
5 | |||
6 | When checking whether there is iconv, the configure file always check | ||
7 | the host env. | ||
8 | |||
9 | Now we make it working properly by adding correct prefix for cross- | ||
10 | compiling environment. | ||
11 | |||
12 | When enabling iconv-module, we see a QA warning because rpaths hardcoded | ||
13 | into the build. And rpaths are not needed, so let's turn this off. | ||
14 | |||
15 | This patch is generated by referencing the existing "fix-check-pcre" | ||
16 | patch. | ||
17 | |||
18 | Upstream-Status: Inappropriate | ||
19 | |||
20 | Signed-off-by: Zheng Junling <zhengjunling@huawei.com> | ||
21 | --- | ||
22 | configure | 60 ++++++------------------------------------------------------ | ||
23 | 1 file changed, 6 insertions(+), 54 deletions(-) | ||
24 | |||
25 | diff --git a/configure b/configure | ||
26 | index 7a96256..91632f3 100755 | ||
27 | --- a/configure | ||
28 | +++ b/configure | ||
29 | @@ -7909,6 +7909,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } | ||
30 | /usr/include/iconv,/usr/lib \ | ||
31 | /usr/iconv/include,/usr/iconv/lib \ | ||
32 | /usr/include,/usr/lib \ | ||
33 | + /usr/include,/usr/lib64 \ | ||
34 | /opt/include/iconv,/opt/lib \ | ||
35 | /opt/iconv/include,/opt/iconv/lib \ | ||
36 | /opt/include,/opt/lib" | ||
37 | @@ -7939,14 +7940,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } | ||
38 | xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` | ||
39 | xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` | ||
40 | found=0 | ||
41 | - if test -r $xincdir/$xincfile | ||
42 | + if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile | ||
43 | then | ||
44 | for E in $exts | ||
45 | do | ||
46 | - if test -r "$xlibdir/$xlibfile.$E" | ||
47 | + if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" | ||
48 | then | ||
49 | - jd_iconv_include_dir="$xincdir" | ||
50 | - jd_iconv_library_dir="$xlibdir" | ||
51 | + jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" | ||
52 | + jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" | ||
53 | jd_with_iconv_library="yes" | ||
54 | found=1 | ||
55 | break | ||
56 | @@ -7972,56 +7973,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; } | ||
57 | then | ||
58 | ICONV_LIB="" | ||
59 | else | ||
60 | - | ||
61 | -if test "X$jd_iconv_library_dir" != "X" | ||
62 | -then | ||
63 | - if test "X$RPATH" = "X" | ||
64 | - then | ||
65 | - | ||
66 | -case "$host_os" in | ||
67 | - *linux*|*solaris* ) | ||
68 | - if test "X$GCC" = Xyes | ||
69 | - then | ||
70 | - if test "X$ac_R_nospace" = "Xno" | ||
71 | - then | ||
72 | - RPATH="-Wl,-R," | ||
73 | - else | ||
74 | - RPATH="-Wl,-R" | ||
75 | - fi | ||
76 | - else | ||
77 | - if test "X$ac_R_nospace" = "Xno" | ||
78 | - then | ||
79 | - RPATH="-R " | ||
80 | - else | ||
81 | - RPATH="-R" | ||
82 | - fi | ||
83 | - fi | ||
84 | - ;; | ||
85 | - *osf*|*openbsd*) | ||
86 | - if test "X$GCC" = Xyes | ||
87 | - then | ||
88 | - RPATH="-Wl,-rpath," | ||
89 | - else | ||
90 | - RPATH="-rpath " | ||
91 | - fi | ||
92 | - ;; | ||
93 | - *netbsd*) | ||
94 | - if test "X$GCC" = Xyes | ||
95 | - then | ||
96 | - RPATH="-Wl,-R" | ||
97 | - fi | ||
98 | - ;; | ||
99 | -esac | ||
100 | - | ||
101 | - if test "X$RPATH" != "X" | ||
102 | - then | ||
103 | - RPATH="$RPATH$jd_iconv_library_dir" | ||
104 | - fi | ||
105 | - else | ||
106 | - RPATH="$RPATH:$jd_iconv_library_dir" | ||
107 | - fi | ||
108 | -fi | ||
109 | - | ||
110 | + RPATH="" | ||
111 | fi | ||
112 | |||
113 | ICONV_INC=-I$jd_iconv_include_dir | ||
114 | -- | ||
115 | 1.8.3.4 | ||
116 | |||
diff --git a/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch b/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch new file mode 100644 index 0000000000..ddf5cce5cb --- /dev/null +++ b/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | Upstream-Status: Backported | ||
2 | |||
3 | From 3a05d1a920140e9f2c72791c12f664213feb46df Mon Sep 17 00:00:00 2001 | ||
4 | From: Manfred Hanke <Manfred.Hanke@tngtech.com> | ||
5 | Date: Thu, 20 Jun 2013 10:24:12 +0200 | ||
6 | Subject: [PATCH] sprintf bug (concerning %c for 8-bit character in non-UTF8 | ||
7 | mode) fixed | ||
8 | |||
9 | char *str points to SLuchar_Type utf8_buf[], which had too small scope | ||
10 | |||
11 | src/test/strops.sl failed in the following environment: | ||
12 | - compiler: gcc (Debian 4.7.2-5) 4.7.2 | ||
13 | - CFLAGS: -g -O2 | ||
14 | - libc: GNU C Library (Debian EGLIBC 2.13-38) stable release version 2.13 | ||
15 | - kernel: 3.2.0-4-686-pae #1 SMP Debian 3.2.39-2 i686 GNU/Linux | ||
16 | --- | ||
17 | src/slstrops.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/src/slstrops.c b/src/slstrops.c | ||
21 | index ce6acb0..cbbbb01 100644 | ||
22 | --- a/src/slstrops.c | ||
23 | +++ b/src/slstrops.c | ||
24 | @@ -1884,6 +1884,7 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/ | ||
25 | #endif | ||
26 | unsigned char uch; | ||
27 | int use_long = 0, use_alt_format = 0; | ||
28 | + SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1]; | ||
29 | |||
30 | while (1) | ||
31 | { | ||
32 | @@ -2071,7 +2072,6 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/ | ||
33 | #endif | ||
34 | { | ||
35 | SLwchar_Type wc; | ||
36 | - SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1]; | ||
37 | |||
38 | if (-1 == SLang_pop_wchar (&wc)) | ||
39 | return out; | ||
40 | -- | ||
41 | 1.7.9.5 | ||
42 | |||
diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb b/meta/recipes-extended/slang/slang_2.2.4.bb new file mode 100644 index 0000000000..f3003c9f08 --- /dev/null +++ b/meta/recipes-extended/slang/slang_2.2.4.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | SUMMARY = "The shared library for the S-Lang extension language" | ||
2 | |||
3 | DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \ | ||
4 | S-Lang language was designed so that it can be easily embedded into \ | ||
5 | a program to provide the program with a powerful extension language. \ | ||
6 | The S-Lang library, provided in this package, provides the S-Lang \ | ||
7 | extension language. S-Lang's syntax resembles C, which makes it easy \ | ||
8 | to recode S-Lang procedures in C if you need to." | ||
9 | |||
10 | HOMEPAGE = "http://www.jedsoft.org/slang/" | ||
11 | SECTION = "libs" | ||
12 | DEPENDS = "pcre" | ||
13 | PR = "r12" | ||
14 | |||
15 | LICENSE = "GPLv2" | ||
16 | LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02" | ||
17 | |||
18 | |||
19 | SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \ | ||
20 | file://rpathfix.patch \ | ||
21 | file://fix-check-pcre.patch \ | ||
22 | file://change-char-type-to-signed-char-in-macros.patch \ | ||
23 | file://sprintf-bug-concerning-8-bit-characters.patch \ | ||
24 | file://slang-fix-the-iconv-existence-checking.patch \ | ||
25 | " | ||
26 | |||
27 | inherit autotools-brokensep | ||
28 | |||
29 | SRC_URI[md5sum] = "7fcfd447e378f07dd0c0bae671fe6487" | ||
30 | SRC_URI[sha256sum] = "9a8257a9a2a55099af858b13338dc8f3a06dd2069f46f0df2c9c3bb84a01d5db" | ||
31 | |||
32 | EXTRA_OECONF += " --without-z --without-png --without-onig --x-includes=${STAGING_DIR_HOST}/usr/include/X11 --x-libraries=${STAGING_DIR_HOST}/usr/lib" | ||
33 | |||
34 | do_configure_prepend() { | ||
35 | # slang keeps configure.ac and rest of autoconf files in autoconf/ directory | ||
36 | # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac} | ||
37 | # to be present. Resulting files land in autoconf/autoconf/ so we need to move them. | ||
38 | cd ${S}/autoconf && gnu-configize --force && mv autoconf/config.* . | ||
39 | cd ${B} | ||
40 | } | ||
41 | |||
42 | do_install() { | ||
43 | oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib' | ||
44 | } | ||
45 | |||
46 | FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/" | ||
47 | FILES_${PN}-dbg += "${libdir}/${BPN}/v2/modules/.debug" | ||
48 | |||
49 | PARALLEL_MAKE = "" | ||
diff --git a/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch b/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch new file mode 100644 index 0000000000..032995db8f --- /dev/null +++ b/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | This patch fixies the wrong return code of stat -h. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Zhangle Yang <zhangle.yang@windriver.com> | ||
5 | |||
6 | --- stat-3.3/stat.c.orig 2013-08-22 10:49:45.000000000 +0800 | ||
7 | +++ stat-3.3/stat.c 2013-08-22 10:50:31.000000000 +0800 | ||
8 | @@ -845,7 +845,7 @@ | ||
9 | fprintf(stderr, "\t\t%%S - Security ID in SE-Linux\n"); | ||
10 | fprintf(stderr, "\t\t%%C - Security context in SE-Linux\n"); | ||
11 | fprintf(stderr, "\t\t%%d - Free file nodes in file system\n"); | ||
12 | - exit(1); | ||
13 | + exit(0); | ||
14 | } | ||
15 | |||
16 | |||
diff --git a/meta/recipes-extended/stat/stat_3.3.bb b/meta/recipes-extended/stat/stat_3.3.bb new file mode 100644 index 0000000000..6754fb8cbd --- /dev/null +++ b/meta/recipes-extended/stat/stat_3.3.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Command line file status display utility" | ||
2 | DESCRIPTION = "Displays all information about a file that the stat() call provides and all information about a filesystem that statfs() provides." | ||
3 | SECTION = "console/utils" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \ | ||
6 | file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
7 | |||
8 | SRC_URI = "ftp://metalab.unc.edu/pub/Linux/utils/file/stat-${PV}.tar.gz \ | ||
9 | file://fix-error-return.patch" | ||
10 | |||
11 | SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3" | ||
12 | SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09" | ||
13 | |||
14 | do_install() { | ||
15 | install -d ${D}${base_bindir} ${D}${mandir}/man1 | ||
16 | install -m 755 stat ${D}${base_bindir}/stat.stat | ||
17 | install -m 644 stat.1 ${D}${mandir}/man1 | ||
18 | } | ||
19 | |||
20 | inherit update-alternatives | ||
21 | |||
22 | ALTERNATIVE_${PN} = "stat" | ||
23 | ALTERNATIVE_PRIORITY[stat] = "200" | ||
24 | ALTERNATIVE_LINK_NAME[stat] = "${base_bindir}/stat" | ||
25 | ALTERNATIVE_TARGET[stat] = "${base_bindir}/stat.stat" | ||
26 | |||
27 | BBCLASSEXTEND = "native" | ||
28 | |||
diff --git a/meta/recipes-extended/sudo/files/sudo.pam b/meta/recipes-extended/sudo/files/sudo.pam new file mode 100644 index 0000000000..5bc26e7025 --- /dev/null +++ b/meta/recipes-extended/sudo/files/sudo.pam | |||
@@ -0,0 +1,6 @@ | |||
1 | #%PAM-1.0 | ||
2 | auth include common-auth | ||
3 | account include common-account | ||
4 | password include common-password | ||
5 | session required pam_keyinit.so revoke | ||
6 | session required pam_limits.so | ||
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc new file mode 100644 index 0000000000..1d7e541024 --- /dev/null +++ b/meta/recipes-extended/sudo/sudo.inc | |||
@@ -0,0 +1,43 @@ | |||
1 | SUMMARY = "Provide limited super user privileges to specific users" | ||
2 | DESCRIPTION = "Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments." | ||
3 | HOMEPAGE = "http://www.sudo.ws" | ||
4 | BUGTRACKER = "http://www.sudo.ws/bugs/" | ||
5 | SECTION = "admin" | ||
6 | LICENSE = "ISC & BSD & Zlib" | ||
7 | LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=69e337d679950e304953813158595256 \ | ||
8 | file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=e2dbb155fc49beea947515300bab99e0 \ | ||
9 | file://compat/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \ | ||
10 | file://compat/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ | ||
11 | file://compat/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \ | ||
12 | file://compat/snprintf.c;beginline=6;endline=31;md5=c98b24f02967c095d7a70ae2e4d4d4ea \ | ||
13 | file://include/queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ | ||
14 | file://compat/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a" | ||
15 | |||
16 | inherit autotools | ||
17 | |||
18 | PACKAGECONFIG ??= "" | ||
19 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" | ||
20 | |||
21 | CONFFILES_${PN} = "${sysconfdir}/sudoers" | ||
22 | |||
23 | EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor" | ||
24 | |||
25 | do_configure_prepend () { | ||
26 | if [ ! -e ${S}/acinclude.m4 ]; then | ||
27 | cat ${S}/aclocal.m4 > ${S}/acinclude.m4 | ||
28 | fi | ||
29 | } | ||
30 | |||
31 | # mksigname/mksiglist are used on build host to generate source files | ||
32 | do_compile_prepend () { | ||
33 | oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C compat mksigname mksiglist | ||
34 | } | ||
35 | |||
36 | # Explicitly create ${localstatedir}/lib before do_install to ensure | ||
37 | # the directory is accessible by all users. Otherwise the mkinstalldirs | ||
38 | # script (from sudo) will recursively create ${localstatedir}/lib/sudo | ||
39 | # and then chmod each directory with 0700 permissions, which isn't what | ||
40 | # we want (i.e, users would not be able to access /var/lib). | ||
41 | do_install_prepend (){ | ||
42 | mkdir -p ${D}/${localstatedir}/lib | ||
43 | } | ||
diff --git a/meta/recipes-extended/sudo/sudo_1.8.10p3.bb b/meta/recipes-extended/sudo/sudo_1.8.10p3.bb new file mode 100644 index 0000000000..4c53032c5d --- /dev/null +++ b/meta/recipes-extended/sudo/sudo_1.8.10p3.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | require sudo.inc | ||
2 | |||
3 | SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ | ||
4 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | ||
5 | " | ||
6 | |||
7 | PAM_SRC_URI = "file://sudo.pam" | ||
8 | |||
9 | SRC_URI[md5sum] = "fcd8d0d9f9f0397d076ee901e242ed39" | ||
10 | SRC_URI[sha256sum] = "6eda135fa68163108f1c24de6975de5ddb09d75730bb62d6390bda7b04345400" | ||
11 | |||
12 | DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
13 | RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" | ||
14 | |||
15 | EXTRA_OECONF += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}" | ||
16 | |||
17 | do_install_append () { | ||
18 | if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then | ||
19 | install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo | ||
20 | fi | ||
21 | |||
22 | chmod 4111 ${D}${bindir}/sudo | ||
23 | chmod 0440 ${D}${sysconfdir}/sudoers | ||
24 | |||
25 | # Explicitly remove the ${localstatedir}/run directory to avoid QA error | ||
26 | rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo | ||
27 | } | ||
diff --git a/meta/recipes-extended/sysklogd/files/no-strip-install.patch b/meta/recipes-extended/sysklogd/files/no-strip-install.patch new file mode 100644 index 0000000000..00fba71017 --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/no-strip-install.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: sysklogd-1.5/Makefile | ||
4 | =================================================================== | ||
5 | --- sysklogd-1.5.orig/Makefile 2009-06-09 13:02:41.000000000 +0200 | ||
6 | +++ sysklogd-1.5/Makefile 2009-06-09 13:03:06.000000000 +0200 | ||
7 | @@ -127,8 +127,8 @@ | ||
8 | rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd | ||
9 | |||
10 | install_exec: syslogd klogd | ||
11 | - ${INSTALL} -m 500 -s syslogd ${BINDIR}/syslogd | ||
12 | - ${INSTALL} -m 500 -s klogd ${BINDIR}/klogd | ||
13 | + ${INSTALL} -m 500 syslogd ${BINDIR}/syslogd | ||
14 | + ${INSTALL} -m 500 klogd ${BINDIR}/klogd | ||
15 | |||
16 | install_man: | ||
17 | ${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8 | ||
diff --git a/meta/recipes-extended/sysklogd/files/no-vectorization.patch b/meta/recipes-extended/sysklogd/files/no-vectorization.patch new file mode 100644 index 0000000000..c1cc042c9c --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/no-vectorization.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Upstream-Status: Inappropriate | ||
2 | |||
3 | The compiler should not be generating vectorized instructions on this target. | ||
4 | This is a work around until I can determine why this is occuring on this | ||
5 | particular recipe | ||
6 | |||
7 | Index: sysklogd-1.5/Makefile | ||
8 | =================================================================== | ||
9 | --- sysklogd-1.5.orig/Makefile | ||
10 | +++ sysklogd-1.5/Makefile | ||
11 | @@ -20,7 +20,8 @@ | ||
12 | CC= gcc | ||
13 | #SKFLAGS= -g -DSYSV -Wall | ||
14 | #LDFLAGS= -g | ||
15 | -SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce | ||
16 | +SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce \ | ||
17 | + -fno-tree-vectorize | ||
18 | # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE | ||
19 | # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE | ||
20 | # $(shell getconf LFS_SKFLAGS) | ||
diff --git a/meta/recipes-extended/sysklogd/files/sysklogd b/meta/recipes-extended/sysklogd/files/sysklogd new file mode 100755 index 0000000000..258f882803 --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/sysklogd | |||
@@ -0,0 +1,151 @@ | |||
1 | #! /bin/sh | ||
2 | # /etc/init.d/sysklogd: start the system log daemon. | ||
3 | |||
4 | ### BEGIN INIT INFO | ||
5 | # Provides: sysklogd | ||
6 | # Required-Start: $remote_fs $time | ||
7 | # Required-Stop: $remote_fs $time | ||
8 | # Should-Start: $network | ||
9 | # Should-Stop: $network | ||
10 | # Default-Start: 2 3 4 5 | ||
11 | # Default-Stop: 0 1 6 | ||
12 | # Short-Description: System logger | ||
13 | ### END INIT INFO | ||
14 | |||
15 | # Source function library. | ||
16 | . /etc/init.d/functions | ||
17 | |||
18 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
19 | |||
20 | pidfile_syslogd=/var/run/syslogd.pid | ||
21 | pidfile_klogd=/var/run/klogd.pid | ||
22 | binpath_syslogd=/sbin/syslogd | ||
23 | binpath_klogd=/sbin/klogd | ||
24 | |||
25 | test -x $binpath || exit 0 | ||
26 | |||
27 | test ! -r /etc/default/syslogd || . /etc/default/syslogd | ||
28 | |||
29 | create_xconsole() | ||
30 | { | ||
31 | # Only proceed if /dev/xconsole is used at all | ||
32 | if ! grep -q '^[^#].*/dev/xconsole' /etc/syslog.conf | ||
33 | then | ||
34 | return | ||
35 | fi | ||
36 | |||
37 | if [ ! -e /dev/xconsole ]; then | ||
38 | mknod -m 640 /dev/xconsole p | ||
39 | else | ||
40 | chmod 0640 /dev/xconsole | ||
41 | fi | ||
42 | chown root:adm /dev/xconsole | ||
43 | test ! -x /sbin/restorecon || /sbin/restorecon /dev/xconsole | ||
44 | } | ||
45 | |||
46 | log_begin_msg () { | ||
47 | echo -n $1 | ||
48 | } | ||
49 | |||
50 | log_end_msg () { | ||
51 | echo $1 | ||
52 | } | ||
53 | |||
54 | log_success_msg () { | ||
55 | echo $1 | ||
56 | } | ||
57 | |||
58 | running() | ||
59 | { | ||
60 | # No pidfile, probably no daemon present | ||
61 | # | ||
62 | if [ ! -f $pidfile ] | ||
63 | then | ||
64 | return 1 | ||
65 | fi | ||
66 | |||
67 | pid=`cat $pidfile_syslogd` | ||
68 | |||
69 | # No pid, probably no daemon present | ||
70 | # | ||
71 | if [ -z "$pid" ] | ||
72 | then | ||
73 | return 1 | ||
74 | fi | ||
75 | |||
76 | if [ ! -d /proc/$pid ] | ||
77 | then | ||
78 | return 1 | ||
79 | fi | ||
80 | |||
81 | cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1` | ||
82 | |||
83 | # No syslogd? | ||
84 | # | ||
85 | if [ "$cmd" != "$binpath" ] | ||
86 | then | ||
87 | return 1 | ||
88 | fi | ||
89 | |||
90 | return 0 | ||
91 | } | ||
92 | |||
93 | case "$1" in | ||
94 | start) | ||
95 | log_begin_msg "Starting system log daemon..." | ||
96 | create_xconsole | ||
97 | start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD | ||
98 | log_end_msg $? | ||
99 | log_begin_msg "Starting kernel log daemon..." | ||
100 | start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD | ||
101 | log_end_msg $? | ||
102 | ;; | ||
103 | stop) | ||
104 | log_begin_msg "Stopping system log daemon..." | ||
105 | start-stop-daemon --stop --quiet --pidfile $pidfile_syslogd --name syslogd | ||
106 | log_end_msg $? | ||
107 | log_begin_msg "Stopping kernel log daemon..." | ||
108 | start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd | ||
109 | log_end_msg $? | ||
110 | ;; | ||
111 | reload|force-reload) | ||
112 | log_begin_msg "Reloading system log daemon..." | ||
113 | start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd | ||
114 | log_end_msg $? | ||
115 | log_begin_msg "Reloading kernel log daemon..." | ||
116 | start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd | ||
117 | start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD | ||
118 | log_end_msg $? | ||
119 | ;; | ||
120 | restart) | ||
121 | log_begin_msg "Restarting system log daemon..." | ||
122 | start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile_syslogd --name syslogd | ||
123 | start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD | ||
124 | log_end_msg $? | ||
125 | log_begin_msg "Reloading kernel log daemon..." | ||
126 | start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd | ||
127 | start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD | ||
128 | log_end_msg $? | ||
129 | ;; | ||
130 | reload-or-restart) | ||
131 | if running | ||
132 | then | ||
133 | $0 reload | ||
134 | else | ||
135 | $0 start | ||
136 | fi | ||
137 | ;; | ||
138 | status) | ||
139 | status syslogd | ||
140 | RETVAL=$? | ||
141 | status klogd | ||
142 | rval=$? | ||
143 | [ $RETVAL -eq 0 ] && exit $rval | ||
144 | exit $RETVAL | ||
145 | ;; | ||
146 | *) | ||
147 | log_success_msg "Usage: /etc/init.d/sysklogd {start|stop|reload|restart|force-reload|reload-or-restart|status}" | ||
148 | exit 1 | ||
149 | esac | ||
150 | |||
151 | exit 0 | ||
diff --git a/meta/recipes-extended/sysklogd/files/syslog.conf b/meta/recipes-extended/sysklogd/files/syslog.conf new file mode 100644 index 0000000000..0849de1268 --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/syslog.conf | |||
@@ -0,0 +1,71 @@ | |||
1 | # /etc/syslog.conf Configuration file for syslogd. | ||
2 | # | ||
3 | # Ported from debian by Yu Ke <ke.yu@intel.com> | ||
4 | # | ||
5 | |||
6 | # | ||
7 | # First some standard logfiles. Log by facility. | ||
8 | # | ||
9 | |||
10 | auth,authpriv.* /var/log/auth.log | ||
11 | *.*;auth,authpriv.none -/var/log/syslog | ||
12 | #cron.* /var/log/cron.log | ||
13 | daemon.* -/var/log/daemon.log | ||
14 | kern.* -/var/log/kern.log | ||
15 | lpr.* -/var/log/lpr.log | ||
16 | mail.* -/var/log/mail.log | ||
17 | user.* -/var/log/user.log | ||
18 | |||
19 | # | ||
20 | # Logging for the mail system. Split it up so that | ||
21 | # it is easy to write scripts to parse these files. | ||
22 | # | ||
23 | mail.info -/var/log/mail.info | ||
24 | mail.warn -/var/log/mail.warn | ||
25 | mail.err /var/log/mail.err | ||
26 | |||
27 | # Logging for INN news system | ||
28 | # | ||
29 | news.crit /var/log/news.crit | ||
30 | news.err /var/log/news.err | ||
31 | news.notice -/var/log/news.notice | ||
32 | |||
33 | # | ||
34 | # Some `catch-all' logfiles. | ||
35 | # | ||
36 | *.=debug;\ | ||
37 | auth,authpriv.none;\ | ||
38 | news.none;mail.none -/var/log/debug | ||
39 | |||
40 | *.=info;*.=notice;*.=warn;\ | ||
41 | auth,authpriv.none;\ | ||
42 | cron,daemon.none;\ | ||
43 | mail,news.none -/var/log/messages | ||
44 | |||
45 | # | ||
46 | # Emergencies are sent to everybody logged in. | ||
47 | # | ||
48 | *.emerg * | ||
49 | |||
50 | # | ||
51 | # I like to have messages displayed on the console, but only on a virtual | ||
52 | # console I usually leave idle. | ||
53 | # | ||
54 | #daemon,mail.*;\ | ||
55 | #news.=crit;news.=err;news.=notice;\ | ||
56 | #*.=debug;*.=info;\ | ||
57 | #*.=notice;*.=warn /dev/tty8 | ||
58 | |||
59 | # The named pipe /dev/xconsole is for the `xconsole' utility. To use it, | ||
60 | # you must invoke `xconsole' with the `-file' option: | ||
61 | # | ||
62 | # $ xconsole -file /dev/xconsole [...] | ||
63 | # | ||
64 | # NOTE: adjust the list below, or you'll go crazy if you have a reasonably | ||
65 | # busy site.. | ||
66 | # | ||
67 | daemon.*;mail.*;\ | ||
68 | news.err;\ | ||
69 | *.=debug;*.=info;\ | ||
70 | *.=notice;*.=warn |/dev/xconsole | ||
71 | |||
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc new file mode 100644 index 0000000000..bcf8aa7a96 --- /dev/null +++ b/meta/recipes-extended/sysklogd/sysklogd.inc | |||
@@ -0,0 +1,58 @@ | |||
1 | SUMMARY = "System Log Daemons" | ||
2 | DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd" | ||
3 | HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/" | ||
4 | SECTION = "base" | ||
5 | |||
6 | LICENSE = "GPLv2+ & BSD" | ||
7 | LICENSE_syslogd = "BSD" | ||
8 | LICENSE_klogd = "GPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ | ||
10 | file://syslogd.c;beginline=2;endline=15;md5=77ffb2fec48c46d7ca0abb2d5813e7fd \ | ||
11 | file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \ | ||
12 | " | ||
13 | |||
14 | inherit update-rc.d update-alternatives | ||
15 | |||
16 | SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ | ||
17 | file://no-strip-install.patch \ | ||
18 | file://sysklogd \ | ||
19 | file://syslog.conf \ | ||
20 | " | ||
21 | |||
22 | SRC_URI_append_e500v2 = " file://no-vectorization.patch" | ||
23 | |||
24 | INITSCRIPT_NAME = "syslog" | ||
25 | CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}" | ||
26 | |||
27 | CFLAGS_append = " -DSYSV" | ||
28 | |||
29 | do_install () { | ||
30 | install -d ${D}${mandir}/man8 \ | ||
31 | ${D}${mandir}/man5 \ | ||
32 | ${D}${base_sbindir} | ||
33 | oe_runmake 'BINDIR=${D}${base_sbindir}' \ | ||
34 | 'MANDIR=${D}${mandir}' install | ||
35 | install -d ${D}${sysconfdir} | ||
36 | install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf | ||
37 | install -d ${D}${sysconfdir}/init.d | ||
38 | install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog | ||
39 | } | ||
40 | |||
41 | # sysklogd package has no internal systemd support, so we weigh busybox's | ||
42 | # sysklogd utility over it in case of systemd | ||
43 | ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}" | ||
44 | |||
45 | ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf" | ||
46 | |||
47 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" | ||
48 | ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd" | ||
49 | ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog" | ||
50 | ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" | ||
51 | |||
52 | pkg_prerm_${PN} () { | ||
53 | if test "x$D" = "x"; then | ||
54 | if test "$1" = "upgrade" -o "$1" = "remove"; then | ||
55 | /etc/init.d/syslog stop | ||
56 | fi | ||
57 | fi | ||
58 | } | ||
diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb new file mode 100644 index 0000000000..5c9588945d --- /dev/null +++ b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require sysklogd.inc | ||
2 | PR = "r7" | ||
3 | |||
4 | SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b" | ||
5 | SRC_URI[sha256sum] = "6169b8e91d29288e90404f01462b69e7f2afb1161aa419826fe4736c7f9eb773" | ||
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc new file mode 100644 index 0000000000..09a5d28d4a --- /dev/null +++ b/meta/recipes-extended/sysstat/sysstat.inc | |||
@@ -0,0 +1,44 @@ | |||
1 | SUMMARY = "System performance tools" | ||
2 | DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux." | ||
3 | HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/" | ||
4 | LICENSE = "GPLv2+" | ||
5 | SECTION = "console/utils" | ||
6 | |||
7 | SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.gz \ | ||
8 | file://99_sysstat \ | ||
9 | " | ||
10 | |||
11 | inherit autotools-brokensep gettext | ||
12 | |||
13 | EXTRA_OECONF += "--disable-sensors" | ||
14 | EXTRA_OEMAKE += 'LFLAGS=""' | ||
15 | |||
16 | do_configure_prepend() { | ||
17 | export sa_lib_dir=${libdir}/sa | ||
18 | } | ||
19 | |||
20 | do_install() { | ||
21 | autotools_do_install | ||
22 | |||
23 | # don't install /var/log/sa when populating rootfs. Do it through volatile | ||
24 | |||
25 | rm -rf ${D}/var | ||
26 | install -d ${D}/etc/default/volatiles | ||
27 | install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles | ||
28 | } | ||
29 | |||
30 | pkg_postinst_${PN} () { | ||
31 | if [ -n "$D" ]; then | ||
32 | exit 0 | ||
33 | fi | ||
34 | if [ -e /etc/init.d/populate-volatile.sh ]; then | ||
35 | /etc/init.d/populate-volatile.sh update | ||
36 | fi | ||
37 | } | ||
38 | |||
39 | |||
40 | FILES_${PN} += "${libdir}/sa" | ||
41 | FILES_${PN}-dbg += "${libdir}/sa/.debug/" | ||
42 | |||
43 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
44 | LDFLAGS_append_libc-uclibc = " -lintl" | ||
diff --git a/meta/recipes-extended/sysstat/sysstat/99_sysstat b/meta/recipes-extended/sysstat/sysstat/99_sysstat new file mode 100644 index 0000000000..0b0ec30de0 --- /dev/null +++ b/meta/recipes-extended/sysstat/sysstat/99_sysstat | |||
@@ -0,0 +1 @@ | |||
d root root 0755 /var/log/sa none | |||
diff --git a/meta/recipes-extended/sysstat/sysstat_10.2.1.bb b/meta/recipes-extended/sysstat/sysstat_10.2.1.bb new file mode 100644 index 0000000000..654457dbe1 --- /dev/null +++ b/meta/recipes-extended/sysstat/sysstat_10.2.1.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require sysstat.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" | ||
4 | |||
5 | SRC_URI[md5sum] = "039dcd235dfcfb3d4acc0a05730f9512" | ||
6 | SRC_URI[sha256sum] = "3bfd1b4c5b99314585709c092096234b6e181741729f601d18d0ed7f0612612a" | ||
diff --git a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch new file mode 100644 index 0000000000..da2ae3cb0f --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624] | ||
2 | |||
3 | This patch avoids heap overflow reported by : | ||
4 | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624 | ||
5 | |||
6 | This is a clean patch for the GPLv2 tar recipe. | ||
7 | |||
8 | Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25 | ||
9 | |||
10 | Index: tar-1.17/lib/rtapelib.c | ||
11 | =================================================================== | ||
12 | --- tar-1.17.orig/lib/rtapelib.c | ||
13 | +++ tar-1.17/lib/rtapelib.c | ||
14 | @@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si | ||
15 | |||
16 | sprintf (command_buffer, "R%lu\n", (unsigned long) length); | ||
17 | if (do_command (handle, command_buffer) == -1 | ||
18 | - || (status = get_status (handle)) == SAFE_READ_ERROR) | ||
19 | + || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length)) | ||
20 | return SAFE_READ_ERROR; | ||
21 | |||
22 | for (counter = 0; counter < status; counter += rlen, buffer += rlen) | ||
diff --git a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch new file mode 100644 index 0000000000..f8059a0a89 --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | Upstream-Status: Inappropriate [licensing] | ||
2 | |||
3 | # Fix errors when built with gcc 4.3 | ||
4 | # Patch taken from Debian bug #452096 | ||
5 | |||
6 | diff -urN tar-1.17.orig/lib/argp-fmtstream.h tar-1.17/lib/argp-fmtstream.h | ||
7 | --- tar-1.17.orig/lib/argp-fmtstream.h 2006-01-11 12:24:05.000000000 -0800 | ||
8 | +++ tar-1.17/lib/argp-fmtstream.h 2010-07-22 22:36:12.000000000 -0700 | ||
9 | @@ -198,7 +198,11 @@ | ||
10 | #endif | ||
11 | |||
12 | #ifndef ARGP_FS_EI | ||
13 | -#define ARGP_FS_EI extern inline | ||
14 | + #if defined __GNUC_STDC_INLINE__ | ||
15 | + #define ARGP_FS_EI extern inline __attribute__((__gnu_inline__)) | ||
16 | + #else | ||
17 | + #define ARGP_FS_EI extern inline | ||
18 | + #endif | ||
19 | #endif | ||
20 | |||
21 | ARGP_FS_EI size_t | ||
22 | diff -urN tar-1.17.orig/lib/argp.h tar-1.17/lib/argp.h | ||
23 | --- tar-1.17.orig/lib/argp.h 2007-03-30 00:09:11.000000000 -0700 | ||
24 | +++ tar-1.17/lib/argp.h 2010-07-22 22:38:44.000000000 -0700 | ||
25 | @@ -580,7 +580,11 @@ | ||
26 | # endif | ||
27 | |||
28 | # ifndef ARGP_EI | ||
29 | -# define ARGP_EI extern __inline__ | ||
30 | +# if defined __GNUC_STDC_INLINE__ | ||
31 | +# define ARGP_EI extern __inline__ __attribute__((__gnu_inline__)) | ||
32 | +# else | ||
33 | +# define ARGP_EI extern __inline__ | ||
34 | +# endif | ||
35 | # endif | ||
36 | |||
37 | ARGP_EI void | ||
diff --git a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch new file mode 100644 index 0000000000..30534c29ce --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Upstream-Status: Inappropriate [licensing] | ||
2 | |||
3 | # Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. | ||
4 | # This is needed to configure correctly with newer versions of autoconf. | ||
5 | |||
6 | --- tar-1.17/m4/extensions.m4.orig 2010-07-22 22:21:35.000000000 -0700 | ||
7 | +++ tar-1.17/m4/extensions.m4 2010-07-22 22:23:41.000000000 -0700 | ||
8 | @@ -1,4 +1,4 @@ | ||
9 | -# serial 4 -*- Autoconf -*- | ||
10 | +# serial 5 -*- Autoconf -*- | ||
11 | # Enable extensions on systems that normally disable them. | ||
12 | |||
13 | # Copyright (C) 2003, 2006 Free Software Foundation, Inc. | ||
14 | @@ -16,6 +16,7 @@ | ||
15 | # ------------------------ | ||
16 | # Enable extensions on systems that normally disable them, | ||
17 | # typically due to standards-conformance issues. | ||
18 | +m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ | ||
19 | AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
20 | [ | ||
21 | AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
22 | @@ -48,7 +49,7 @@ | ||
23 | AC_DEFINE([__EXTENSIONS__]) | ||
24 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
25 | AC_DEFINE([_TANDEM_SOURCE]) | ||
26 | -]) | ||
27 | +])]) | ||
28 | |||
29 | # gl_USE_SYSTEM_EXTENSIONS | ||
30 | # ------------------------ | ||
diff --git a/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb b/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb new file mode 100644 index 0000000000..071ede765b --- /dev/null +++ b/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require tar_${PV}.bb | ||
2 | |||
3 | inherit native | ||
4 | |||
5 | BPN = "tar" | ||
6 | EXTRAINSTALL = "" | ||
diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc new file mode 100644 index 0000000000..51d49340a1 --- /dev/null +++ b/meta/recipes-extended/tar/tar.inc | |||
@@ -0,0 +1,45 @@ | |||
1 | SUMMARY = "GNU file archiving program" | ||
2 | DESCRIPTION = "GNU tar saves many files together into a single tape \ | ||
3 | or disk archive, and can restore individual files from the archive." | ||
4 | HOMEPAGE = "http://www.gnu.org/software/tar/" | ||
5 | SECTION = "base" | ||
6 | |||
7 | SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" | ||
8 | |||
9 | inherit autotools gettext texinfo | ||
10 | |||
11 | EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" | ||
12 | |||
13 | EXTRAINSTALL = "do_install_extra" | ||
14 | EXTRAINSTALL_class-nativesdk = "" | ||
15 | |||
16 | do_install () { | ||
17 | autotools_do_install | ||
18 | ${EXTRAINSTALL} | ||
19 | } | ||
20 | |||
21 | do_install_extra () { | ||
22 | install -d ${D}${base_bindir} | ||
23 | mv ${D}${bindir}/tar ${D}${base_bindir}/tar | ||
24 | rmdir ${D}${bindir}/ | ||
25 | } | ||
26 | |||
27 | PACKAGES =+ "${PN}-rmt" | ||
28 | |||
29 | PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl," | ||
30 | |||
31 | FILES_${PN}-rmt = "${base_sbindir}/rmt*" | ||
32 | |||
33 | inherit update-alternatives | ||
34 | |||
35 | ALTERNATIVE_PRIORITY = "100" | ||
36 | |||
37 | ALTERNATIVE_${PN} = "tar" | ||
38 | ALTERNATIVE_${PN}-rmt = "rmt" | ||
39 | ALTERNATIVE_${PN}_class-nativesdk = "" | ||
40 | ALTERNATIVE_${PN}-rmt_class-nativesdk = "" | ||
41 | |||
42 | ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" | ||
43 | ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt" | ||
44 | |||
45 | BBCLASSEXTEND = "nativesdk" | ||
diff --git a/meta/recipes-extended/tar/tar/remove-gets.patch b/meta/recipes-extended/tar/tar/remove-gets.patch new file mode 100644 index 0000000000..0b8be39eed --- /dev/null +++ b/meta/recipes-extended/tar/tar/remove-gets.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | Index: tar-1.27/gnu/stdio.in.h | ||
7 | =================================================================== | ||
8 | --- tar-1.27.orig/gnu/stdio.in.h 2013-06-29 08:54:26.000000000 +0300 | ||
9 | +++ tar-1.27/gnu/stdio.in.h 2013-10-16 15:22:46.977204737 +0300 | ||
10 | @@ -710,10 +710,12 @@ | ||
11 | /* It is very rare that the developer ever has full control of stdin, | ||
12 | so any use of gets warrants an unconditional warning; besides, C11 | ||
13 | removed it. */ | ||
14 | +#if defined gets | ||
15 | #undef gets | ||
16 | #if HAVE_RAW_DECL_GETS | ||
17 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | ||
18 | #endif | ||
19 | +#endif | ||
20 | |||
21 | |||
22 | #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ | ||
diff --git a/meta/recipes-extended/tar/tar_1.17.bb b/meta/recipes-extended/tar/tar_1.17.bb new file mode 100644 index 0000000000..b9ca2063df --- /dev/null +++ b/meta/recipes-extended/tar/tar_1.17.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | require tar.inc | ||
2 | |||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
5 | |||
6 | PR = "r3" | ||
7 | |||
8 | SRC_URI += "file://m4extensions.patch \ | ||
9 | file://gcc43build.patch \ | ||
10 | file://avoid_heap_overflow.patch \ | ||
11 | " | ||
12 | |||
13 | SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290" | ||
14 | SRC_URI[sha256sum] = "19f9021dda51a16295e4706e80870e71f87107675e51c176a491eba0fc4ca492" | ||
diff --git a/meta/recipes-extended/tar/tar_1.27.1.bb b/meta/recipes-extended/tar/tar_1.27.1.bb new file mode 100644 index 0000000000..439bb500b9 --- /dev/null +++ b/meta/recipes-extended/tar/tar_1.27.1.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require tar.inc | ||
2 | |||
3 | LICENSE = "GPLv3" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
5 | |||
6 | SRC_URI += "file://remove-gets.patch \ | ||
7 | " | ||
8 | |||
9 | SRC_URI[md5sum] = "490e074dd7e71f553df8357a7ef9bdcf" | ||
10 | SRC_URI[sha256sum] = "9b0fb3ce8512059337add0da5f8f0f7d7647f2201f5ece24581d620ea60337c6" | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff new file mode 100644 index 0000000000..16d6719cbc --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff | |||
@@ -0,0 +1,77 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 | ||
4 | --- tcp_wrappers_7.6.orig/hosts_access.5 1995-01-30 19:51:47.000000000 +0100 | ||
5 | +++ tcp_wrappers_7.6/hosts_access.5 2004-04-09 16:59:45.000000000 +0200 | ||
6 | @@ -173,7 +173,7 @@ | ||
7 | Patterns like these can be used when the machine has different internet | ||
8 | addresses with different internet hostnames. Service providers can use | ||
9 | this facility to offer FTP, GOPHER or WWW archives with internet names | ||
10 | -that may even belong to different organizations. See also the `twist' | ||
11 | +that may even belong to different organizations. See also the `twist\' | ||
12 | option in the hosts_options(5) document. Some systems (Solaris, | ||
13 | FreeBSD) can have more than one internet address on one physical | ||
14 | interface; with other systems you may have to resort to SLIP or PPP | ||
15 | @@ -236,10 +236,10 @@ | ||
16 | Before accepting a client request, the wrappers can use the IDENT | ||
17 | service to find out that the client did not send the request at all. | ||
18 | When the client host provides IDENT service, a negative IDENT lookup | ||
19 | -result (the client matches `UNKNOWN@host') is strong evidence of a host | ||
20 | +result (the client matches `UNKNOWN@host\') is strong evidence of a host | ||
21 | spoofing attack. | ||
22 | .PP | ||
23 | -A positive IDENT lookup result (the client matches `KNOWN@host') is | ||
24 | +A positive IDENT lookup result (the client matches `KNOWN@host\') is | ||
25 | less trustworthy. It is possible for an intruder to spoof both the | ||
26 | client connection and the IDENT lookup, although doing so is much | ||
27 | harder than spoofing just a client connection. It may also be that | ||
28 | diff -ruN tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5 | ||
29 | --- tcp_wrappers_7.6.orig/hosts_options.5 1994-12-28 17:42:29.000000000 +0100 | ||
30 | +++ tcp_wrappers_7.6/hosts_options.5 2004-04-09 16:59:49.000000000 +0200 | ||
31 | @@ -124,7 +124,7 @@ | ||
32 | value is taken. | ||
33 | .SH MISCELLANEOUS | ||
34 | .IP "banners /some/directory" | ||
35 | -Look for a file in `/some/directory' with the same name as the daemon | ||
36 | +Look for a file in `/some/directory\' with the same name as the daemon | ||
37 | process (for example in.telnetd for the telnet service), and copy its | ||
38 | contents to the client. Newline characters are replaced by | ||
39 | carriage-return newline, and %<letter> sequences are expanded (see | ||
40 | diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8 | ||
41 | --- tcp_wrappers_7.6.orig/tcpdmatch.8 1996-02-11 17:01:36.000000000 +0100 | ||
42 | +++ tcp_wrappers_7.6/tcpdmatch.8 2004-04-09 17:00:49.000000000 +0200 | ||
43 | @@ -26,7 +26,7 @@ | ||
44 | A daemon process name. Typically, the last component of a daemon | ||
45 | executable pathname. | ||
46 | .IP client | ||
47 | -A host name or network address, or one of the `unknown' or `paranoid' | ||
48 | +A host name or network address, or one of the `unknown\' or `paranoid\' | ||
49 | wildcard patterns. | ||
50 | .sp | ||
51 | When a client host name is specified, \fItcpdmatch\fR gives a | ||
52 | @@ -37,13 +37,13 @@ | ||
53 | .PP | ||
54 | Optional information specified with the \fIdaemon@server\fR form: | ||
55 | .IP server | ||
56 | -A host name or network address, or one of the `unknown' or `paranoid' | ||
57 | -wildcard patterns. The default server name is `unknown'. | ||
58 | +A host name or network address, or one of the `unknown\' or `paranoid\' | ||
59 | +wildcard patterns. The default server name is `unknown\'. | ||
60 | .PP | ||
61 | Optional information specified with the \fIuser@client\fR form: | ||
62 | .IP user | ||
63 | A client user identifier. Typically, a login name or a numeric userid. | ||
64 | -The default user name is `unknown'. | ||
65 | +The default user name is `unknown\'. | ||
66 | .SH OPTIONS | ||
67 | .IP -d | ||
68 | Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current | ||
69 | @@ -70,7 +70,7 @@ | ||
70 | .ti +5 | ||
71 | tcpdmatch in.telnetd paranoid | ||
72 | .PP | ||
73 | -On some systems, daemon names have no `in.' prefix, or \fItcpdmatch\fR | ||
74 | +On some systems, daemon names have no `in.\' prefix, or \fItcpdmatch\fR | ||
75 | may need some help to locate the inetd configuration file. | ||
76 | .SH FILES | ||
77 | .PP | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch new file mode 100644 index 0000000000..9a735bff6d --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch | |||
@@ -0,0 +1,250 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruNp tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3 | ||
4 | --- tcp_wrappers_7.6.orig/hosts_access.3 2005-03-09 18:30:25.000000000 +0100 | ||
5 | +++ tcp_wrappers_7.6/hosts_access.3 2005-03-09 18:27:03.000000000 +0100 | ||
6 | @@ -3,7 +3,7 @@ | ||
7 | hosts_access, hosts_ctl, request_init, request_set \- access control library | ||
8 | .SH SYNOPSIS | ||
9 | .nf | ||
10 | -#include "tcpd.h" | ||
11 | +#include <tcpd.h> | ||
12 | |||
13 | extern int allow_severity; | ||
14 | extern int deny_severity; | ||
15 | diff -ruNp tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 | ||
16 | --- tcp_wrappers_7.6.orig/hosts_access.5 2005-03-09 18:30:25.000000000 +0100 | ||
17 | +++ tcp_wrappers_7.6/hosts_access.5 2005-03-09 18:30:18.000000000 +0100 | ||
18 | @@ -8,9 +8,9 @@ name, host name/address) patterns. Exam | ||
19 | impatient reader is encouraged to skip to the EXAMPLES section for a | ||
20 | quick introduction. | ||
21 | .PP | ||
22 | -An extended version of the access control language is described in the | ||
23 | -\fIhosts_options\fR(5) document. The extensions are turned on at | ||
24 | -program build time by building with -DPROCESS_OPTIONS. | ||
25 | +The extended version of the access control language is described in the | ||
26 | +\fIhosts_options\fR(5) document. \fBNote that this language supersedes | ||
27 | +the meaning of \fIshell_command\fB as documented below.\fR | ||
28 | .PP | ||
29 | In the following text, \fIdaemon\fR is the the process name of a | ||
30 | network daemon process, and \fIclient\fR is the name and/or address of | ||
31 | @@ -346,8 +346,8 @@ in.tftpd: LOCAL, .my.domain | ||
32 | /etc/hosts.deny: | ||
33 | .in +3 | ||
34 | .nf | ||
35 | -in.tftpd: ALL: (/some/where/safe_finger -l @%h | \\ | ||
36 | - /usr/ucb/mail -s %d-%h root) & | ||
37 | +in.tftpd: ALL: (/usr/sbin/safe_finger -l @%h | \\ | ||
38 | + /usr/bin/mail -s %d-%h root) & | ||
39 | .fi | ||
40 | .PP | ||
41 | The safe_finger command comes with the tcpd wrapper and should be | ||
42 | @@ -383,6 +383,7 @@ that shouldn\'t. All problems are repor | ||
43 | .fi | ||
44 | .SH SEE ALSO | ||
45 | .nf | ||
46 | +hosts_options(5) extended syntax. | ||
47 | tcpd(8) tcp/ip daemon wrapper program. | ||
48 | tcpdchk(8), tcpdmatch(8), test programs. | ||
49 | .SH BUGS | ||
50 | diff -ruNp tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5 | ||
51 | --- tcp_wrappers_7.6.orig/hosts_options.5 2005-03-09 18:30:24.000000000 +0100 | ||
52 | +++ tcp_wrappers_7.6/hosts_options.5 2005-03-09 18:27:03.000000000 +0100 | ||
53 | @@ -2,10 +2,8 @@ | ||
54 | .SH NAME | ||
55 | hosts_options \- host access control language extensions | ||
56 | .SH DESCRIPTION | ||
57 | -This document describes optional extensions to the language described | ||
58 | -in the hosts_access(5) document. The extensions are enabled at program | ||
59 | -build time. For example, by editing the Makefile and turning on the | ||
60 | -PROCESS_OPTIONS compile-time option. | ||
61 | +This document describes extensions to the language described | ||
62 | +in the hosts_access(5) document. | ||
63 | .PP | ||
64 | The extensible language uses the following format: | ||
65 | .sp | ||
66 | @@ -58,12 +56,12 @@ Notice the leading dot on the domain nam | ||
67 | Execute, in a child process, the specified shell command, after | ||
68 | performing the %<letter> expansions described in the hosts_access(5) | ||
69 | manual page. The command is executed with stdin, stdout and stderr | ||
70 | -connected to the null device, so that it won\'t mess up the | ||
71 | +connected to the null device, so that it won't mess up the | ||
72 | conversation with the client host. Example: | ||
73 | .sp | ||
74 | .nf | ||
75 | .ti +3 | ||
76 | -spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) & | ||
77 | +spawn (/usr/sbin/safe_finger -l @%h | /usr/bin/mail root) & | ||
78 | .fi | ||
79 | .sp | ||
80 | executes, in a background child process, the shell command "safe_finger | ||
81 | diff -ruNp tcp_wrappers_7.6.orig/inetcf.c tcp_wrappers_7.6/inetcf.c | ||
82 | --- tcp_wrappers_7.6.orig/inetcf.c 1997-02-12 02:13:24.000000000 +0100 | ||
83 | +++ tcp_wrappers_7.6/inetcf.c 2005-03-09 18:27:03.000000000 +0100 | ||
84 | @@ -26,13 +26,17 @@ extern void exit(); | ||
85 | * guesses. Shorter names follow longer ones. | ||
86 | */ | ||
87 | char *inet_files[] = { | ||
88 | +#if 0 | ||
89 | "/private/etc/inetd.conf", /* NEXT */ | ||
90 | "/etc/inet/inetd.conf", /* SYSV4 */ | ||
91 | "/usr/etc/inetd.conf", /* IRIX?? */ | ||
92 | +#endif | ||
93 | "/etc/inetd.conf", /* BSD */ | ||
94 | +#if 0 | ||
95 | "/etc/net/tlid.conf", /* SYSV4?? */ | ||
96 | "/etc/saf/tlid.conf", /* SYSV4?? */ | ||
97 | "/etc/tlid.conf", /* SYSV4?? */ | ||
98 | +#endif | ||
99 | 0, | ||
100 | }; | ||
101 | |||
102 | diff -ruNp tcp_wrappers_7.6.orig/tcpd.8 tcp_wrappers_7.6/tcpd.8 | ||
103 | --- tcp_wrappers_7.6.orig/tcpd.8 1996-02-21 16:39:16.000000000 +0100 | ||
104 | +++ tcp_wrappers_7.6/tcpd.8 2005-03-09 18:27:03.000000000 +0100 | ||
105 | @@ -12,7 +12,11 @@ The program supports both 4.3BSD-style s | ||
106 | TLI. Functionality may be limited when the protocol underneath TLI is | ||
107 | not an internet protocol. | ||
108 | .PP | ||
109 | -Operation is as follows: whenever a request for service arrives, the | ||
110 | +There are two possible modes of operation: execution of \fItcpd\fP | ||
111 | +before a service started by \fIinetd\fP, or linking a daemon with | ||
112 | +the \fIlibwrap\fP shared library as documented in the \fIhosts_access\fR(3) | ||
113 | +manual page. Operation when started by \fIinetd\fP | ||
114 | +is as follows: whenever a request for service arrives, the | ||
115 | \fIinetd\fP daemon is tricked into running the \fItcpd\fP program | ||
116 | instead of the desired server. \fItcpd\fP logs the request and does | ||
117 | some additional checks. When all is well, \fItcpd\fP runs the | ||
118 | @@ -88,11 +92,11 @@ configuration files. | ||
119 | .sp | ||
120 | .in +5 | ||
121 | # mkdir /other/place | ||
122 | -# mv /usr/etc/in.fingerd /other/place | ||
123 | -# cp tcpd /usr/etc/in.fingerd | ||
124 | +# mv /usr/sbin/in.fingerd /other/place | ||
125 | +# cp tcpd /usr/sbin/in.fingerd | ||
126 | .fi | ||
127 | .PP | ||
128 | -The example assumes that the network daemons live in /usr/etc. On some | ||
129 | +The example assumes that the network daemons live in /usr/sbin. On some | ||
130 | systems, network daemons live in /usr/sbin or in /usr/libexec, or have | ||
131 | no `in.\' prefix to their name. | ||
132 | .SH EXAMPLE 2 | ||
133 | @@ -101,35 +105,34 @@ are left in their original place. | ||
134 | .PP | ||
135 | In order to monitor access to the \fIfinger\fR service, perform the | ||
136 | following edits on the \fIinetd\fR configuration file (usually | ||
137 | -\fI/etc/inetd.conf\fR or \fI/etc/inet/inetd.conf\fR): | ||
138 | +\fI/etc/inetd.conf\fR): | ||
139 | .nf | ||
140 | .sp | ||
141 | .ti +5 | ||
142 | -finger stream tcp nowait nobody /usr/etc/in.fingerd in.fingerd | ||
143 | +finger stream tcp nowait nobody /usr/sbin/in.fingerd in.fingerd | ||
144 | .sp | ||
145 | becomes: | ||
146 | .sp | ||
147 | .ti +5 | ||
148 | -finger stream tcp nowait nobody /some/where/tcpd in.fingerd | ||
149 | +finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd | ||
150 | .sp | ||
151 | .fi | ||
152 | .PP | ||
153 | -The example assumes that the network daemons live in /usr/etc. On some | ||
154 | +The example assumes that the network daemons live in /usr/sbin. On some | ||
155 | systems, network daemons live in /usr/sbin or in /usr/libexec, the | ||
156 | daemons have no `in.\' prefix to their name, or there is no userid | ||
157 | field in the inetd configuration file. | ||
158 | .PP | ||
159 | Similar changes will be needed for the other services that are to be | ||
160 | covered by \fItcpd\fR. Send a `kill -HUP\' to the \fIinetd\fR(8) | ||
161 | -process to make the changes effective. AIX users may also have to | ||
162 | -execute the `inetimp\' command. | ||
163 | +process to make the changes effective. | ||
164 | .SH EXAMPLE 3 | ||
165 | In the case of daemons that do not live in a common directory ("secret" | ||
166 | or otherwise), edit the \fIinetd\fR configuration file so that it | ||
167 | specifies an absolute path name for the process name field. For example: | ||
168 | .nf | ||
169 | .sp | ||
170 | - ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd | ||
171 | + ntalk dgram udp wait root /usr/sbin/tcpd /usr/local/lib/ntalkd | ||
172 | .sp | ||
173 | .fi | ||
174 | .PP | ||
175 | @@ -164,6 +167,7 @@ The default locations of the host access | ||
176 | .SH SEE ALSO | ||
177 | .na | ||
178 | .nf | ||
179 | +hosts_access(3), functions provided by the libwrap library. | ||
180 | hosts_access(5), format of the tcpd access control tables. | ||
181 | syslog.conf(5), format of the syslogd control file. | ||
182 | inetd.conf(5), format of the inetd control file. | ||
183 | diff -ruNp tcp_wrappers_7.6.orig/tcpdchk.8 tcp_wrappers_7.6/tcpdchk.8 | ||
184 | --- tcp_wrappers_7.6.orig/tcpdchk.8 1995-01-08 17:00:31.000000000 +0100 | ||
185 | +++ tcp_wrappers_7.6/tcpdchk.8 2005-03-09 18:27:03.000000000 +0100 | ||
186 | @@ -9,8 +9,8 @@ tcpdchk [-a] [-d] [-i inet_conf] [-v] | ||
187 | potential and real problems it can find. The program examines the | ||
188 | \fItcpd\fR access control files (by default, these are | ||
189 | \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR), and compares the | ||
190 | -entries in these files against entries in the \fIinetd\fR or \fItlid\fR | ||
191 | -network configuration files. | ||
192 | +entries in these files against entries in the \fIinetd\fR | ||
193 | +network configuration file. | ||
194 | .PP | ||
195 | \fItcpdchk\fR reports problems such as non-existent pathnames; services | ||
196 | that appear in \fItcpd\fR access control rules, but are not controlled | ||
197 | @@ -26,14 +26,13 @@ problem. | ||
198 | .SH OPTIONS | ||
199 | .IP -a | ||
200 | Report access control rules that permit access without an explicit | ||
201 | -ALLOW keyword. This applies only when the extended access control | ||
202 | -language is enabled (build with -DPROCESS_OPTIONS). | ||
203 | +ALLOW keyword. | ||
204 | .IP -d | ||
205 | Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current | ||
206 | directory instead of the default ones. | ||
207 | .IP "-i inet_conf" | ||
208 | Specify this option when \fItcpdchk\fR is unable to find your | ||
209 | -\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when | ||
210 | +\fIinetd.conf\fR network configuration file, or when | ||
211 | you suspect that the program uses the wrong one. | ||
212 | .IP -v | ||
213 | Display the contents of each access control rule. Daemon lists, client | ||
214 | @@ -54,7 +53,6 @@ tcpdmatch(8), explain what tcpd would do | ||
215 | hosts_access(5), format of the tcpd access control tables. | ||
216 | hosts_options(5), format of the language extensions. | ||
217 | inetd.conf(5), format of the inetd control file. | ||
218 | -tlid.conf(5), format of the tlid control file. | ||
219 | .SH AUTHORS | ||
220 | .na | ||
221 | .nf | ||
222 | diff -ruNp tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8 | ||
223 | --- tcp_wrappers_7.6.orig/tcpdmatch.8 2005-03-09 18:30:24.000000000 +0100 | ||
224 | +++ tcp_wrappers_7.6/tcpdmatch.8 2005-03-09 18:27:03.000000000 +0100 | ||
225 | @@ -13,7 +13,7 @@ request for service. Examples are given | ||
226 | The program examines the \fItcpd\fR access control tables (default | ||
227 | \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR) and prints its | ||
228 | conclusion. For maximal accuracy, it extracts additional information | ||
229 | -from your \fIinetd\fR or \fItlid\fR network configuration file. | ||
230 | +from your \fIinetd\fR network configuration file. | ||
231 | .PP | ||
232 | When \fItcpdmatch\fR finds a match in the access control tables, it | ||
233 | identifies the matched rule. In addition, it displays the optional | ||
234 | @@ -50,7 +50,7 @@ Examine \fIhosts.allow\fR and \fIhosts.d | ||
235 | directory instead of the default ones. | ||
236 | .IP "-i inet_conf" | ||
237 | Specify this option when \fItcpdmatch\fR is unable to find your | ||
238 | -\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when | ||
239 | +\fIinetd.conf\fR network configuration file, or when | ||
240 | you suspect that the program uses the wrong one. | ||
241 | .SH EXAMPLES | ||
242 | To predict how \fItcpd\fR would handle a telnet request from the local | ||
243 | @@ -86,7 +86,6 @@ tcpdchk(8), tcpd configuration checker | ||
244 | hosts_access(5), format of the tcpd access control tables. | ||
245 | hosts_options(5), format of the language extensions. | ||
246 | inetd.conf(5), format of the inetd control file. | ||
247 | -tlid.conf(5), format of the tlid control file. | ||
248 | .SH AUTHORS | ||
249 | .na | ||
250 | .nf | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch new file mode 100644 index 0000000000..9e188027fc --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch | |||
@@ -0,0 +1,105 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=17847 | ||
4 | |||
5 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 | ||
6 | --- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 18:54:33.000000000 +0200 | ||
7 | +++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 18:54:27.000000000 +0200 | ||
8 | @@ -89,6 +89,10 @@ | ||
9 | bitwise AND of the address and the `mask\'. For example, the net/mask | ||
10 | pattern `131.155.72.0/255.255.254.0\' matches every address in the | ||
11 | range `131.155.72.0\' through `131.155.73.255\'. | ||
12 | +.IP \(bu | ||
13 | +Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This | ||
14 | +method of matching cannot be used in conjunction with `net/mask\' matching, | ||
15 | +hostname matching beginning with `.\' or IP address matching ending with `.\'. | ||
16 | .SH WILDCARDS | ||
17 | The access control language supports explicit wildcards: | ||
18 | .IP ALL | ||
19 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c | ||
20 | --- tcp_wrappers_7.6.orig/hosts_access.c 1997-02-12 02:13:23.000000000 +0100 | ||
21 | +++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 18:52:21.000000000 +0200 | ||
22 | @@ -289,6 +289,11 @@ | ||
23 | { | ||
24 | int n; | ||
25 | |||
26 | +#ifndef DISABLE_WILDCARD_MATCHING | ||
27 | + if (strchr(tok, '*') || strchr(tok,'?')) { /* contains '*' or '?' */ | ||
28 | + return (match_pattern_ylo(string,tok)); | ||
29 | + } else | ||
30 | +#endif | ||
31 | if (tok[0] == '.') { /* suffix */ | ||
32 | n = strlen(string) - strlen(tok); | ||
33 | return (n > 0 && STR_EQ(tok, string + n)); | ||
34 | @@ -329,3 +334,71 @@ | ||
35 | } | ||
36 | return ((addr & mask) == net); | ||
37 | } | ||
38 | + | ||
39 | +#ifndef DISABLE_WILDCARD_MATCHING | ||
40 | +/* Note: this feature has been adapted in a pretty straightforward way | ||
41 | + from Tatu Ylonen's last SSH version under free license by | ||
42 | + Pekka Savola <pekkas@netcore.fi>. | ||
43 | + | ||
44 | + Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | ||
45 | +*/ | ||
46 | + | ||
47 | +/* Returns true if the given string matches the pattern (which may contain | ||
48 | + ? and * as wildcards), and zero if it does not match. */ | ||
49 | + | ||
50 | +int match_pattern_ylo(const char *s, const char *pattern) | ||
51 | +{ | ||
52 | + while (1) | ||
53 | + { | ||
54 | + /* If at end of pattern, accept if also at end of string. */ | ||
55 | + if (!*pattern) | ||
56 | + return !*s; | ||
57 | + | ||
58 | + /* Process '*'. */ | ||
59 | + if (*pattern == '*') | ||
60 | + { | ||
61 | + /* Skip the asterisk. */ | ||
62 | + pattern++; | ||
63 | + | ||
64 | + /* If at end of pattern, accept immediately. */ | ||
65 | + if (!*pattern) | ||
66 | + return 1; | ||
67 | + | ||
68 | + /* If next character in pattern is known, optimize. */ | ||
69 | + if (*pattern != '?' && *pattern != '*') | ||
70 | + { | ||
71 | + /* Look instances of the next character in pattern, and try | ||
72 | + to match starting from those. */ | ||
73 | + for (; *s; s++) | ||
74 | + if (*s == *pattern && | ||
75 | + match_pattern_ylo(s + 1, pattern + 1)) | ||
76 | + return 1; | ||
77 | + /* Failed. */ | ||
78 | + return 0; | ||
79 | + } | ||
80 | + | ||
81 | + /* Move ahead one character at a time and try to match at each | ||
82 | + position. */ | ||
83 | + for (; *s; s++) | ||
84 | + if (match_pattern_ylo(s, pattern)) | ||
85 | + return 1; | ||
86 | + /* Failed. */ | ||
87 | + return 0; | ||
88 | + } | ||
89 | + | ||
90 | + /* There must be at least one more character in the string. If we are | ||
91 | + at the end, fail. */ | ||
92 | + if (!*s) | ||
93 | + return 0; | ||
94 | + | ||
95 | + /* Check if the next character of the string is acceptable. */ | ||
96 | + if (*pattern != '?' && *pattern != *s) | ||
97 | + return 0; | ||
98 | + | ||
99 | + /* Move to the next character, both in string and in pattern. */ | ||
100 | + s++; | ||
101 | + pattern++; | ||
102 | + } | ||
103 | + /*NOTREACHED*/ | ||
104 | +} | ||
105 | +#endif /* DISABLE_WILDCARD_MATCHING */ | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch new file mode 100644 index 0000000000..725f4b5957 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | * Mon Feb 5 2001 Preston Brown <pbrown@redhat.com> | ||
4 | - fix gethostbyname to work better with dot "." notation (#16949) | ||
5 | |||
6 | --- tcp_wrappers_7.6/socket.c.fixgethostbyname Fri Mar 21 13:27:25 1997 | ||
7 | +++ tcp_wrappers_7.6/socket.c Mon Feb 5 14:09:40 2001 | ||
8 | @@ -52,7 +52,8 @@ | ||
9 | char *name; | ||
10 | { | ||
11 | char dot_name[MAXHOSTNAMELEN + 1]; | ||
12 | - | ||
13 | + struct hostent *hp; | ||
14 | + | ||
15 | /* | ||
16 | * Don't append dots to unqualified names. Such names are likely to come | ||
17 | * from local hosts files or from NIS. | ||
18 | @@ -61,8 +62,12 @@ | ||
19 | if (strchr(name, '.') == 0 || strlen(name) >= MAXHOSTNAMELEN - 1) { | ||
20 | return (gethostbyname(name)); | ||
21 | } else { | ||
22 | - sprintf(dot_name, "%s.", name); | ||
23 | - return (gethostbyname(dot_name)); | ||
24 | + sprintf(dot_name, "%s.", name); | ||
25 | + hp = gethostbyname(dot_name); | ||
26 | + if (hp) | ||
27 | + return hp; | ||
28 | + else | ||
29 | + return (gethostbyname(name)); | ||
30 | } | ||
31 | } | ||
32 | |||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch new file mode 100644 index 0000000000..96d47c39f4 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch | |||
@@ -0,0 +1,1255 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c | ||
4 | --- tcp_wrappers_7.6.orig/fix_options.c 1997-04-08 02:29:19.000000000 +0200 | ||
5 | +++ tcp_wrappers_7.6/fix_options.c 2004-04-10 19:07:43.000000000 +0200 | ||
6 | @@ -11,6 +11,9 @@ | ||
7 | |||
8 | #include <sys/types.h> | ||
9 | #include <sys/param.h> | ||
10 | +#ifdef INET6 | ||
11 | +#include <sys/socket.h> | ||
12 | +#endif | ||
13 | #include <netinet/in.h> | ||
14 | #include <netinet/in_systm.h> | ||
15 | #include <netinet/ip.h> | ||
16 | @@ -41,6 +44,22 @@ | ||
17 | unsigned int opt; | ||
18 | int optlen; | ||
19 | struct in_addr dummy; | ||
20 | +#ifdef INET6 | ||
21 | + struct sockaddr_storage ss; | ||
22 | + int sslen; | ||
23 | + | ||
24 | + /* | ||
25 | + * check if this is AF_INET socket | ||
26 | + * XXX IPv6 support? | ||
27 | + */ | ||
28 | + sslen = sizeof(ss); | ||
29 | + if (getsockname(fd, (struct sockaddr *)&ss, &sslen) < 0) { | ||
30 | + syslog(LOG_ERR, "getpeername: %m"); | ||
31 | + clean_exit(request); | ||
32 | + } | ||
33 | + if (ss.ss_family != AF_INET) | ||
34 | + return; | ||
35 | +#endif | ||
36 | |||
37 | if ((ip = getprotobyname("ip")) != 0) | ||
38 | ipproto = ip->p_proto; | ||
39 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 | ||
40 | --- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 19:22:58.000000000 +0200 | ||
41 | +++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 19:07:43.000000000 +0200 | ||
42 | @@ -85,11 +85,18 @@ | ||
43 | for daemon process names or for client user names. | ||
44 | .IP \(bu | ||
45 | An expression of the form `n.n.n.n/m.m.m.m\' is interpreted as a | ||
46 | -`net/mask\' pair. A host address is matched if `net\' is equal to the | ||
47 | +`net/mask\' pair. An IPv4 host address is matched if `net\' is equal to the | ||
48 | bitwise AND of the address and the `mask\'. For example, the net/mask | ||
49 | pattern `131.155.72.0/255.255.254.0\' matches every address in the | ||
50 | range `131.155.72.0\' through `131.155.73.255\'. | ||
51 | .IP \(bu | ||
52 | +An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a | ||
53 | +`[net]/prefixlen\' pair. An IPv6 host address is matched if | ||
54 | +`prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the | ||
55 | +address. For example, the [net]/prefixlen pattern | ||
56 | +`[3ffe:505:2:1::]/64\' matches every address in the range | ||
57 | +`3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'. | ||
58 | +.IP \(bu | ||
59 | Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This | ||
60 | method of matching cannot be used in conjunction with `net/mask\' matching, | ||
61 | hostname matching beginning with `.\' or IP address matching ending with `.\'. | ||
62 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c | ||
63 | --- tcp_wrappers_7.6.orig/hosts_access.c 2004-04-10 19:22:58.000000000 +0200 | ||
64 | +++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 19:07:43.000000000 +0200 | ||
65 | @@ -24,7 +24,13 @@ | ||
66 | /* System libraries. */ | ||
67 | |||
68 | #include <sys/types.h> | ||
69 | +#ifdef INT32_T | ||
70 | + typedef uint32_t u_int32_t; | ||
71 | +#endif | ||
72 | #include <sys/param.h> | ||
73 | +#ifdef INET6 | ||
74 | +#include <sys/socket.h> | ||
75 | +#endif | ||
76 | #include <netinet/in.h> | ||
77 | #include <arpa/inet.h> | ||
78 | #include <stdio.h> | ||
79 | @@ -33,6 +39,9 @@ | ||
80 | #include <errno.h> | ||
81 | #include <setjmp.h> | ||
82 | #include <string.h> | ||
83 | +#ifdef INET6 | ||
84 | +#include <netdb.h> | ||
85 | +#endif | ||
86 | |||
87 | extern char *fgets(); | ||
88 | extern int errno; | ||
89 | @@ -82,6 +91,10 @@ | ||
90 | static int host_match(); | ||
91 | static int string_match(); | ||
92 | static int masked_match(); | ||
93 | +#ifdef INET6 | ||
94 | +static int masked_match4(); | ||
95 | +static int masked_match6(); | ||
96 | +#endif | ||
97 | |||
98 | /* Size of logical line buffer. */ | ||
99 | |||
100 | @@ -289,6 +302,13 @@ | ||
101 | { | ||
102 | int n; | ||
103 | |||
104 | +#ifdef INET6 | ||
105 | + /* convert IPv4 mapped IPv6 address to IPv4 address */ | ||
106 | + if (STRN_EQ(string, "::ffff:", 7) | ||
107 | + && dot_quad_addr(string + 7) != INADDR_NONE) { | ||
108 | + string += 7; | ||
109 | + } | ||
110 | +#endif | ||
111 | #ifndef DISABLE_WILDCARD_MATCHING | ||
112 | if (strchr(tok, '*') || strchr(tok,'?')) { /* contains '*' or '?' */ | ||
113 | return (match_pattern_ylo(string,tok)); | ||
114 | @@ -304,20 +324,72 @@ | ||
115 | } else if (tok[(n = strlen(tok)) - 1] == '.') { /* prefix */ | ||
116 | return (STRN_EQ(tok, string, n)); | ||
117 | } else { /* exact match */ | ||
118 | +#ifdef INET6 | ||
119 | + struct addrinfo hints, *res; | ||
120 | + struct sockaddr_in6 pat, addr; | ||
121 | + int len, ret; | ||
122 | + char ch; | ||
123 | + | ||
124 | + len = strlen(tok); | ||
125 | + if (*tok == '[' && tok[len - 1] == ']') { | ||
126 | + ch = tok[len - 1]; | ||
127 | + tok[len - 1] = '\0'; | ||
128 | + memset(&hints, 0, sizeof(hints)); | ||
129 | + hints.ai_family = AF_INET6; | ||
130 | + hints.ai_socktype = SOCK_STREAM; | ||
131 | + hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; | ||
132 | + if ((ret = getaddrinfo(tok + 1, NULL, &hints, &res)) == 0) { | ||
133 | + memcpy(&pat, res->ai_addr, sizeof(pat)); | ||
134 | + freeaddrinfo(res); | ||
135 | + } | ||
136 | + tok[len - 1] = ch; | ||
137 | + if (ret != 0 || getaddrinfo(string, NULL, &hints, &res) != 0) | ||
138 | + return NO; | ||
139 | + memcpy(&addr, res->ai_addr, sizeof(addr)); | ||
140 | + freeaddrinfo(res); | ||
141 | +#ifdef NI_WITHSCOPEID | ||
142 | + if (pat.sin6_scope_id != 0 && | ||
143 | + addr.sin6_scope_id != pat.sin6_scope_id) | ||
144 | + return NO; | ||
145 | +#endif | ||
146 | + return (!memcmp(&pat.sin6_addr, &addr.sin6_addr, | ||
147 | + sizeof(struct in6_addr))); | ||
148 | + return (ret); | ||
149 | + } | ||
150 | +#endif | ||
151 | return (STR_EQ(tok, string)); | ||
152 | } | ||
153 | } | ||
154 | |||
155 | /* masked_match - match address against netnumber/netmask */ | ||
156 | |||
157 | +#ifdef INET6 | ||
158 | static int masked_match(net_tok, mask_tok, string) | ||
159 | char *net_tok; | ||
160 | char *mask_tok; | ||
161 | char *string; | ||
162 | { | ||
163 | + return (masked_match4(net_tok, mask_tok, string) || | ||
164 | + masked_match6(net_tok, mask_tok, string)); | ||
165 | +} | ||
166 | + | ||
167 | +static int masked_match4(net_tok, mask_tok, string) | ||
168 | +#else | ||
169 | +static int masked_match(net_tok, mask_tok, string) | ||
170 | +#endif | ||
171 | +char *net_tok; | ||
172 | +char *mask_tok; | ||
173 | +char *string; | ||
174 | +{ | ||
175 | +#ifdef INET6 | ||
176 | + u_int32_t net; | ||
177 | + u_int32_t mask; | ||
178 | + u_int32_t addr; | ||
179 | +#else | ||
180 | unsigned long net; | ||
181 | unsigned long mask; | ||
182 | unsigned long addr; | ||
183 | +#endif | ||
184 | |||
185 | /* | ||
186 | * Disallow forms other than dotted quad: the treatment that inet_addr() | ||
187 | @@ -329,12 +401,78 @@ | ||
188 | return (NO); | ||
189 | if ((net = dot_quad_addr(net_tok)) == INADDR_NONE | ||
190 | || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) { | ||
191 | +#ifndef INET6 | ||
192 | tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok); | ||
193 | +#endif | ||
194 | return (NO); /* not tcpd_jump() */ | ||
195 | } | ||
196 | return ((addr & mask) == net); | ||
197 | } | ||
198 | |||
199 | +#ifdef INET6 | ||
200 | +static int masked_match6(net_tok, mask_tok, string) | ||
201 | +char *net_tok; | ||
202 | +char *mask_tok; | ||
203 | +char *string; | ||
204 | +{ | ||
205 | + struct addrinfo hints, *res; | ||
206 | + struct sockaddr_in6 net, addr; | ||
207 | + u_int32_t mask; | ||
208 | + int len, mask_len, i = 0; | ||
209 | + char ch; | ||
210 | + | ||
211 | + memset(&hints, 0, sizeof(hints)); | ||
212 | + hints.ai_family = AF_INET6; | ||
213 | + hints.ai_socktype = SOCK_STREAM; | ||
214 | + hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; | ||
215 | + if (getaddrinfo(string, NULL, &hints, &res) != 0) | ||
216 | + return NO; | ||
217 | + memcpy(&addr, res->ai_addr, sizeof(addr)); | ||
218 | + freeaddrinfo(res); | ||
219 | + | ||
220 | + if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) { | ||
221 | + if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE | ||
222 | + || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) | ||
223 | + return (NO); | ||
224 | + return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]); | ||
225 | + } | ||
226 | + | ||
227 | + /* match IPv6 address against netnumber/prefixlen */ | ||
228 | + len = strlen(net_tok); | ||
229 | + if (*net_tok != '[' || net_tok[len - 1] != ']') | ||
230 | + return NO; | ||
231 | + ch = net_tok[len - 1]; | ||
232 | + net_tok[len - 1] = '\0'; | ||
233 | + if (getaddrinfo(net_tok + 1, NULL, &hints, &res) != 0) { | ||
234 | + net_tok[len - 1] = ch; | ||
235 | + return NO; | ||
236 | + } | ||
237 | + memcpy(&net, res->ai_addr, sizeof(net)); | ||
238 | + freeaddrinfo(res); | ||
239 | + net_tok[len - 1] = ch; | ||
240 | + if ((mask_len = atoi(mask_tok)) < 0 || mask_len > 128) | ||
241 | + return NO; | ||
242 | + | ||
243 | +#ifdef NI_WITHSCOPEID | ||
244 | + if (net.sin6_scope_id != 0 && addr.sin6_scope_id != net.sin6_scope_id) | ||
245 | + return NO; | ||
246 | +#endif | ||
247 | + while (mask_len > 0) { | ||
248 | + if (mask_len < 32) { | ||
249 | + mask = htonl(~(0xffffffff >> mask_len)); | ||
250 | + if ((*(u_int32_t *)&addr.sin6_addr.s6_addr[i] & mask) != (*(u_int32_t *)&net.sin6_addr.s6_addr[i] & mask)) | ||
251 | + return NO; | ||
252 | + break; | ||
253 | + } | ||
254 | + if (*(u_int32_t *)&addr.sin6_addr.s6_addr[i] != *(u_int32_t *)&net.sin6_addr.s6_addr[i]) | ||
255 | + return NO; | ||
256 | + i += 4; | ||
257 | + mask_len -= 32; | ||
258 | + } | ||
259 | + return YES; | ||
260 | +} | ||
261 | +#endif /* INET6 */ | ||
262 | + | ||
263 | #ifndef DISABLE_WILDCARD_MATCHING | ||
264 | /* Note: this feature has been adapted in a pretty straightforward way | ||
265 | from Tatu Ylonen's last SSH version under free license by | ||
266 | diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile | ||
267 | --- tcp_wrappers_7.6.orig/Makefile 1997-03-21 19:27:21.000000000 +0100 | ||
268 | +++ tcp_wrappers_7.6/Makefile 2004-04-10 19:22:44.000000000 +0200 | ||
269 | @@ -21,7 +21,7 @@ | ||
270 | @echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix" | ||
271 | @echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211" | ||
272 | @echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4" | ||
273 | - @echo " sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2" | ||
274 | + @echo " sunos40 sunos5 solaris8 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2" | ||
275 | @echo " uts215 uxp" | ||
276 | @echo | ||
277 | @echo "If none of these match your environment, edit the system" | ||
278 | @@ -131,20 +131,34 @@ | ||
279 | NETGROUP=-DNETGROUP TLI= SYSTYPE="-systype bsd43" all | ||
280 | |||
281 | # Freebsd and linux by default have no NIS. | ||
282 | -386bsd netbsd bsdos: | ||
283 | +386bsd bsdos: | ||
284 | @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ | ||
285 | LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \ | ||
286 | EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all | ||
287 | |||
288 | freebsd: | ||
289 | @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ | ||
290 | + LIBS="-L/usr/local/v6/lib -linet6" \ | ||
291 | LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \ | ||
292 | - EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all | ||
293 | + EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" \ | ||
294 | + VSYSLOG= all | ||
295 | + | ||
296 | +netbsd: | ||
297 | + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ | ||
298 | + LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \ | ||
299 | + EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" VSYSLOG= all | ||
300 | |||
301 | linux: | ||
302 | @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ | ||
303 | - LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \ | ||
304 | - NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all | ||
305 | + LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \ | ||
306 | + NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \ | ||
307 | + EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all | ||
308 | + | ||
309 | +gnu: | ||
310 | + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ | ||
311 | + LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \ | ||
312 | + NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \ | ||
313 | + EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all | ||
314 | |||
315 | # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x. | ||
316 | hpux hpux8 hpux9 hpux10: | ||
317 | @@ -196,6 +210,13 @@ | ||
318 | NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \ | ||
319 | BUGS="$(BUGS) -DSOLARIS_24_GETHOSTBYNAME_BUG" all | ||
320 | |||
321 | +# SunOS 5.8 is another SYSV4 variant, but has IPv6 support | ||
322 | +solaris8: | ||
323 | + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ | ||
324 | + LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \ | ||
325 | + NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \ | ||
326 | + EXTRA_CFLAGS="-DINET6 -DNO_CLONE_DEVICE -DINT32_T" all | ||
327 | + | ||
328 | # Generic SYSV40 | ||
329 | esix sysv4: | ||
330 | @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ | ||
331 | diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c | ||
332 | --- tcp_wrappers_7.6.orig/misc.c 1996-02-11 17:01:30.000000000 +0100 | ||
333 | +++ tcp_wrappers_7.6/misc.c 2004-04-10 19:07:43.000000000 +0200 | ||
334 | @@ -58,9 +58,31 @@ | ||
335 | { | ||
336 | char *cp; | ||
337 | |||
338 | +#ifdef INET6 | ||
339 | + int bracket = 0; | ||
340 | + | ||
341 | + for (cp = string; cp && *cp; cp++) { | ||
342 | + switch (*cp) { | ||
343 | + case '[': | ||
344 | + bracket++; | ||
345 | + break; | ||
346 | + case ']': | ||
347 | + bracket--; | ||
348 | + break; | ||
349 | + default: | ||
350 | + if (bracket == 0 && *cp == delimiter) { | ||
351 | + *cp++ = 0; | ||
352 | + return cp; | ||
353 | + } | ||
354 | + break; | ||
355 | + } | ||
356 | + } | ||
357 | + return (NULL); | ||
358 | +#else | ||
359 | if ((cp = strchr(string, delimiter)) != 0) | ||
360 | *cp++ = 0; | ||
361 | return (cp); | ||
362 | +#endif | ||
363 | } | ||
364 | |||
365 | /* dot_quad_addr - convert dotted quad to internal form */ | ||
366 | diff -ruN tcp_wrappers_7.6.orig/refuse.c tcp_wrappers_7.6/refuse.c | ||
367 | --- tcp_wrappers_7.6.orig/refuse.c 1994-12-28 17:42:40.000000000 +0100 | ||
368 | +++ tcp_wrappers_7.6/refuse.c 2004-04-10 19:07:43.000000000 +0200 | ||
369 | @@ -25,7 +25,12 @@ | ||
370 | void refuse(request) | ||
371 | struct request_info *request; | ||
372 | { | ||
373 | +#ifdef INET6 | ||
374 | + syslog(deny_severity, "refused connect from %s (%s)", | ||
375 | + eval_client(request), eval_hostaddr(request->client)); | ||
376 | +#else | ||
377 | syslog(deny_severity, "refused connect from %s", eval_client(request)); | ||
378 | +#endif | ||
379 | clean_exit(request); | ||
380 | /* NOTREACHED */ | ||
381 | } | ||
382 | diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c | ||
383 | --- tcp_wrappers_7.6.orig/rfc931.c 1995-01-02 16:11:34.000000000 +0100 | ||
384 | +++ tcp_wrappers_7.6/rfc931.c 2004-04-10 19:07:43.000000000 +0200 | ||
385 | @@ -68,20 +68,50 @@ | ||
386 | /* rfc931 - return remote user name, given socket structures */ | ||
387 | |||
388 | void rfc931(rmt_sin, our_sin, dest) | ||
389 | +#ifdef INET6 | ||
390 | +struct sockaddr *rmt_sin; | ||
391 | +struct sockaddr *our_sin; | ||
392 | +#else | ||
393 | struct sockaddr_in *rmt_sin; | ||
394 | struct sockaddr_in *our_sin; | ||
395 | +#endif | ||
396 | char *dest; | ||
397 | { | ||
398 | unsigned rmt_port; | ||
399 | unsigned our_port; | ||
400 | +#ifdef INET6 | ||
401 | + struct sockaddr_storage rmt_query_sin; | ||
402 | + struct sockaddr_storage our_query_sin; | ||
403 | + int alen; | ||
404 | +#else | ||
405 | struct sockaddr_in rmt_query_sin; | ||
406 | struct sockaddr_in our_query_sin; | ||
407 | +#endif | ||
408 | char user[256]; /* XXX */ | ||
409 | char buffer[512]; /* XXX */ | ||
410 | char *cp; | ||
411 | char *result = unknown; | ||
412 | FILE *fp; | ||
413 | |||
414 | +#ifdef INET6 | ||
415 | + /* address family must be the same */ | ||
416 | + if (rmt_sin->sa_family != our_sin->sa_family) { | ||
417 | + STRN_CPY(dest, result, STRING_LENGTH); | ||
418 | + return; | ||
419 | + } | ||
420 | + switch (our_sin->sa_family) { | ||
421 | + case AF_INET: | ||
422 | + alen = sizeof(struct sockaddr_in); | ||
423 | + break; | ||
424 | + case AF_INET6: | ||
425 | + alen = sizeof(struct sockaddr_in6); | ||
426 | + break; | ||
427 | + default: | ||
428 | + STRN_CPY(dest, result, STRING_LENGTH); | ||
429 | + return; | ||
430 | + } | ||
431 | +#endif | ||
432 | + | ||
433 | /* | ||
434 | * Use one unbuffered stdio stream for writing to and for reading from | ||
435 | * the RFC931 etc. server. This is done because of a bug in the SunOS | ||
436 | @@ -92,7 +122,11 @@ | ||
437 | * sockets. | ||
438 | */ | ||
439 | |||
440 | +#ifdef INET6 | ||
441 | + if ((fp = fsocket(our_sin->sa_family, SOCK_STREAM, 0)) != 0) { | ||
442 | +#else | ||
443 | if ((fp = fsocket(AF_INET, SOCK_STREAM, 0)) != 0) { | ||
444 | +#endif | ||
445 | setbuf(fp, (char *) 0); | ||
446 | |||
447 | /* | ||
448 | @@ -112,6 +146,25 @@ | ||
449 | * addresses from the query socket. | ||
450 | */ | ||
451 | |||
452 | +#ifdef INET6 | ||
453 | + memcpy(&our_query_sin, our_sin, alen); | ||
454 | + memcpy(&rmt_query_sin, rmt_sin, alen); | ||
455 | + switch (our_sin->sa_family) { | ||
456 | + case AF_INET: | ||
457 | + ((struct sockaddr_in *)&our_query_sin)->sin_port = htons(ANY_PORT); | ||
458 | + ((struct sockaddr_in *)&rmt_query_sin)->sin_port = htons(RFC931_PORT); | ||
459 | + break; | ||
460 | + case AF_INET6: | ||
461 | + ((struct sockaddr_in6 *)&our_query_sin)->sin6_port = htons(ANY_PORT); | ||
462 | + ((struct sockaddr_in6 *)&rmt_query_sin)->sin6_port = htons(RFC931_PORT); | ||
463 | + break; | ||
464 | + } | ||
465 | + | ||
466 | + if (bind(fileno(fp), (struct sockaddr *) & our_query_sin, | ||
467 | + alen) >= 0 && | ||
468 | + connect(fileno(fp), (struct sockaddr *) & rmt_query_sin, | ||
469 | + alen) >= 0) { | ||
470 | +#else | ||
471 | our_query_sin = *our_sin; | ||
472 | our_query_sin.sin_port = htons(ANY_PORT); | ||
473 | rmt_query_sin = *rmt_sin; | ||
474 | @@ -121,6 +174,7 @@ | ||
475 | sizeof(our_query_sin)) >= 0 && | ||
476 | connect(fileno(fp), (struct sockaddr *) & rmt_query_sin, | ||
477 | sizeof(rmt_query_sin)) >= 0) { | ||
478 | +#endif | ||
479 | |||
480 | /* | ||
481 | * Send query to server. Neglect the risk that a 13-byte | ||
482 | @@ -129,8 +183,13 @@ | ||
483 | */ | ||
484 | |||
485 | fprintf(fp, "%u,%u\r\n", | ||
486 | +#ifdef INET6 | ||
487 | + ntohs(((struct sockaddr_in *)rmt_sin)->sin_port), | ||
488 | + ntohs(((struct sockaddr_in *)our_sin)->sin_port)); | ||
489 | +#else | ||
490 | ntohs(rmt_sin->sin_port), | ||
491 | ntohs(our_sin->sin_port)); | ||
492 | +#endif | ||
493 | fflush(fp); | ||
494 | |||
495 | /* | ||
496 | @@ -144,8 +203,13 @@ | ||
497 | && ferror(fp) == 0 && feof(fp) == 0 | ||
498 | && sscanf(buffer, "%u , %u : USERID :%*[^:]:%255s", | ||
499 | &rmt_port, &our_port, user) == 3 | ||
500 | +#ifdef INET6 | ||
501 | + && ntohs(((struct sockaddr_in *)rmt_sin)->sin_port) == rmt_port | ||
502 | + && ntohs(((struct sockaddr_in *)our_sin)->sin_port) == our_port) { | ||
503 | +#else | ||
504 | && ntohs(rmt_sin->sin_port) == rmt_port | ||
505 | && ntohs(our_sin->sin_port) == our_port) { | ||
506 | +#endif | ||
507 | |||
508 | /* | ||
509 | * Strip trailing carriage return. It is part of the | ||
510 | diff -ruN tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c | ||
511 | --- tcp_wrappers_7.6.orig/scaffold.c 1997-03-21 19:27:24.000000000 +0100 | ||
512 | +++ tcp_wrappers_7.6/scaffold.c 2004-04-10 19:07:43.000000000 +0200 | ||
513 | @@ -25,7 +25,9 @@ | ||
514 | #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ | ||
515 | #endif | ||
516 | |||
517 | +#ifndef INET6 | ||
518 | extern char *malloc(); | ||
519 | +#endif | ||
520 | |||
521 | /* Application-specific. */ | ||
522 | |||
523 | @@ -39,6 +41,7 @@ | ||
524 | int deny_severity = LOG_WARNING; | ||
525 | int rfc931_timeout = RFC931_TIMEOUT; | ||
526 | |||
527 | +#ifndef INET6 | ||
528 | /* dup_hostent - create hostent in one memory block */ | ||
529 | |||
530 | static struct hostent *dup_hostent(hp) | ||
531 | @@ -73,9 +76,46 @@ | ||
532 | } | ||
533 | return (&hb->host); | ||
534 | } | ||
535 | +#endif | ||
536 | |||
537 | /* find_inet_addr - find all addresses for this host, result to free() */ | ||
538 | |||
539 | +#ifdef INET6 | ||
540 | +struct addrinfo *find_inet_addr(host) | ||
541 | +char *host; | ||
542 | +{ | ||
543 | + struct addrinfo hints, *res; | ||
544 | + | ||
545 | + memset(&hints, 0, sizeof(hints)); | ||
546 | + hints.ai_family = PF_UNSPEC; | ||
547 | + hints.ai_socktype = SOCK_STREAM; | ||
548 | + hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; | ||
549 | + if (getaddrinfo(host, NULL, &hints, &res) == 0) | ||
550 | + return (res); | ||
551 | + | ||
552 | + memset(&hints, 0, sizeof(hints)); | ||
553 | + hints.ai_family = PF_UNSPEC; | ||
554 | + hints.ai_socktype = SOCK_STREAM; | ||
555 | + hints.ai_flags = AI_PASSIVE | AI_CANONNAME; | ||
556 | + if (getaddrinfo(host, NULL, &hints, &res) != 0) { | ||
557 | + tcpd_warn("%s: host not found", host); | ||
558 | + return (0); | ||
559 | + } | ||
560 | + if (res->ai_family != AF_INET6 && res->ai_family != AF_INET) { | ||
561 | + tcpd_warn("%d: not an internet host", res->ai_family); | ||
562 | + freeaddrinfo(res); | ||
563 | + return (0); | ||
564 | + } | ||
565 | + if (!res->ai_canonname) { | ||
566 | + tcpd_warn("%s: hostname alias", host); | ||
567 | + tcpd_warn("(cannot obtain official name)", res->ai_canonname); | ||
568 | + } else if (STR_NE(host, res->ai_canonname)) { | ||
569 | + tcpd_warn("%s: hostname alias", host); | ||
570 | + tcpd_warn("(official name: %.*s)", STRING_LENGTH, res->ai_canonname); | ||
571 | + } | ||
572 | + return (res); | ||
573 | +} | ||
574 | +#else | ||
575 | struct hostent *find_inet_addr(host) | ||
576 | char *host; | ||
577 | { | ||
578 | @@ -118,6 +158,7 @@ | ||
579 | } | ||
580 | return (dup_hostent(hp)); | ||
581 | } | ||
582 | +#endif | ||
583 | |||
584 | /* check_dns - give each address thorough workout, return address count */ | ||
585 | |||
586 | @@ -125,8 +166,13 @@ | ||
587 | char *host; | ||
588 | { | ||
589 | struct request_info request; | ||
590 | +#ifdef INET6 | ||
591 | + struct sockaddr_storage sin; | ||
592 | + struct addrinfo *hp, *res; | ||
593 | +#else | ||
594 | struct sockaddr_in sin; | ||
595 | struct hostent *hp; | ||
596 | +#endif | ||
597 | int count; | ||
598 | char *addr; | ||
599 | |||
600 | @@ -134,11 +180,18 @@ | ||
601 | return (0); | ||
602 | request_init(&request, RQ_CLIENT_SIN, &sin, 0); | ||
603 | sock_methods(&request); | ||
604 | +#ifndef INET6 | ||
605 | memset((char *) &sin, 0, sizeof(sin)); | ||
606 | sin.sin_family = AF_INET; | ||
607 | +#endif | ||
608 | |||
609 | +#ifdef INET6 | ||
610 | + for (res = hp, count = 0; res; res = res->ai_next, count++) { | ||
611 | + memcpy(&sin, res->ai_addr, res->ai_addrlen); | ||
612 | +#else | ||
613 | for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) { | ||
614 | memcpy((char *) &sin.sin_addr, addr, sizeof(sin.sin_addr)); | ||
615 | +#endif | ||
616 | |||
617 | /* | ||
618 | * Force host name and address conversions. Use the request structure | ||
619 | @@ -151,7 +204,11 @@ | ||
620 | tcpd_warn("host address %s->name lookup failed", | ||
621 | eval_hostaddr(request.client)); | ||
622 | } | ||
623 | +#ifdef INET6 | ||
624 | + freeaddrinfo(hp); | ||
625 | +#else | ||
626 | free((char *) hp); | ||
627 | +#endif | ||
628 | return (count); | ||
629 | } | ||
630 | |||
631 | diff -ruN tcp_wrappers_7.6.orig/scaffold.h tcp_wrappers_7.6/scaffold.h | ||
632 | --- tcp_wrappers_7.6.orig/scaffold.h 1994-12-31 18:19:20.000000000 +0100 | ||
633 | +++ tcp_wrappers_7.6/scaffold.h 2004-04-10 19:07:43.000000000 +0200 | ||
634 | @@ -4,6 +4,10 @@ | ||
635 | * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. | ||
636 | */ | ||
637 | |||
638 | +#ifdef INET6 | ||
639 | +extern struct addrinfo *find_inet_addr(); | ||
640 | +#else | ||
641 | extern struct hostent *find_inet_addr(); | ||
642 | +#endif | ||
643 | extern int check_dns(); | ||
644 | extern int check_path(); | ||
645 | diff -ruN tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c | ||
646 | --- tcp_wrappers_7.6.orig/socket.c 2004-04-10 19:22:58.000000000 +0200 | ||
647 | +++ tcp_wrappers_7.6/socket.c 2004-04-10 19:07:43.000000000 +0200 | ||
648 | @@ -24,13 +24,22 @@ | ||
649 | #include <sys/types.h> | ||
650 | #include <sys/param.h> | ||
651 | #include <sys/socket.h> | ||
652 | +#ifdef INT32_T | ||
653 | +typedef uint32_t u_int32_t; | ||
654 | +#endif | ||
655 | #include <netinet/in.h> | ||
656 | #include <netdb.h> | ||
657 | #include <stdio.h> | ||
658 | #include <syslog.h> | ||
659 | #include <string.h> | ||
660 | |||
661 | +#ifdef INET6 | ||
662 | +#ifndef NI_WITHSCOPEID | ||
663 | +#define NI_WITHSCOPEID 0 | ||
664 | +#endif | ||
665 | +#else | ||
666 | extern char *inet_ntoa(); | ||
667 | +#endif | ||
668 | |||
669 | /* Local stuff. */ | ||
670 | |||
671 | @@ -79,8 +88,13 @@ | ||
672 | void sock_host(request) | ||
673 | struct request_info *request; | ||
674 | { | ||
675 | +#ifdef INET6 | ||
676 | + static struct sockaddr_storage client; | ||
677 | + static struct sockaddr_storage server; | ||
678 | +#else | ||
679 | static struct sockaddr_in client; | ||
680 | static struct sockaddr_in server; | ||
681 | +#endif | ||
682 | int len; | ||
683 | char buf[BUFSIZ]; | ||
684 | int fd = request->fd; | ||
685 | @@ -109,7 +123,11 @@ | ||
686 | memset(buf, 0 sizeof(buf)); | ||
687 | #endif | ||
688 | } | ||
689 | +#ifdef INET6 | ||
690 | + request->client->sin = (struct sockaddr *)&client; | ||
691 | +#else | ||
692 | request->client->sin = &client; | ||
693 | +#endif | ||
694 | |||
695 | /* | ||
696 | * Determine the server binding. This is used for client username | ||
697 | @@ -122,7 +140,11 @@ | ||
698 | tcpd_warn("getsockname: %m"); | ||
699 | return; | ||
700 | } | ||
701 | +#ifdef INET6 | ||
702 | + request->server->sin = (struct sockaddr *)&server; | ||
703 | +#else | ||
704 | request->server->sin = &server; | ||
705 | +#endif | ||
706 | } | ||
707 | |||
708 | /* sock_hostaddr - map endpoint address to printable form */ | ||
709 | @@ -130,10 +152,26 @@ | ||
710 | void sock_hostaddr(host) | ||
711 | struct host_info *host; | ||
712 | { | ||
713 | +#ifdef INET6 | ||
714 | + struct sockaddr *sin = host->sin; | ||
715 | + int salen; | ||
716 | + | ||
717 | + if (!sin) | ||
718 | + return; | ||
719 | +#ifdef SIN6_LEN | ||
720 | + salen = sin->sa_len; | ||
721 | +#else | ||
722 | + salen = (sin->sa_family == AF_INET) ? sizeof(struct sockaddr_in) | ||
723 | + : sizeof(struct sockaddr_in6); | ||
724 | +#endif | ||
725 | + getnameinfo(sin, salen, host->addr, sizeof(host->addr), | ||
726 | + NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID); | ||
727 | +#else | ||
728 | struct sockaddr_in *sin = host->sin; | ||
729 | |||
730 | if (sin != 0) | ||
731 | STRN_CPY(host->addr, inet_ntoa(sin->sin_addr), sizeof(host->addr)); | ||
732 | +#endif | ||
733 | } | ||
734 | |||
735 | /* sock_hostname - map endpoint address to host name */ | ||
736 | @@ -141,6 +179,160 @@ | ||
737 | void sock_hostname(host) | ||
738 | struct host_info *host; | ||
739 | { | ||
740 | +#ifdef INET6 | ||
741 | + struct sockaddr *sin = host->sin; | ||
742 | + struct sockaddr_in sin4; | ||
743 | + struct addrinfo hints, *res, *res0 = NULL; | ||
744 | + int salen, alen, err = 1; | ||
745 | + char *ap = NULL, *rap, hname[NI_MAXHOST]; | ||
746 | + | ||
747 | + if (sin != NULL) { | ||
748 | + if (sin->sa_family == AF_INET6) { | ||
749 | + struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sin; | ||
750 | + | ||
751 | + if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { | ||
752 | + memset(&sin4, 0, sizeof(sin4)); | ||
753 | +#ifdef SIN6_LEN | ||
754 | + sin4.sin_len = sizeof(sin4); | ||
755 | +#endif | ||
756 | + sin4.sin_family = AF_INET; | ||
757 | + sin4.sin_port = sin6->sin6_port; | ||
758 | + sin4.sin_addr.s_addr = *(u_int32_t *)&sin6->sin6_addr.s6_addr[12]; | ||
759 | + sin = (struct sockaddr *)&sin4; | ||
760 | + } | ||
761 | + } | ||
762 | + switch (sin->sa_family) { | ||
763 | + case AF_INET: | ||
764 | + ap = (char *)&((struct sockaddr_in *)sin)->sin_addr; | ||
765 | + alen = sizeof(struct in_addr); | ||
766 | + salen = sizeof(struct sockaddr_in); | ||
767 | + break; | ||
768 | + case AF_INET6: | ||
769 | + ap = (char *)&((struct sockaddr_in6 *)sin)->sin6_addr; | ||
770 | + alen = sizeof(struct in6_addr); | ||
771 | + salen = sizeof(struct sockaddr_in6); | ||
772 | + break; | ||
773 | + default: | ||
774 | + break; | ||
775 | + } | ||
776 | + if (ap) | ||
777 | + err = getnameinfo(sin, salen, hname, sizeof(hname), | ||
778 | + NULL, 0, NI_WITHSCOPEID | NI_NAMEREQD); | ||
779 | + } | ||
780 | + if (!err) { | ||
781 | + | ||
782 | + STRN_CPY(host->name, hname, sizeof(host->name)); | ||
783 | + | ||
784 | + /* reject numeric addresses */ | ||
785 | + memset(&hints, 0, sizeof(hints)); | ||
786 | + hints.ai_family = sin->sa_family; | ||
787 | + hints.ai_socktype = SOCK_STREAM; | ||
788 | + hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST; | ||
789 | + if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) { | ||
790 | + freeaddrinfo(res0); | ||
791 | + res0 = NULL; | ||
792 | + tcpd_warn("host name/name mismatch: " | ||
793 | + "reverse lookup results in non-FQDN %s", | ||
794 | + host->name); | ||
795 | + strcpy(host->name, paranoid); /* name is bad, clobber it */ | ||
796 | + } | ||
797 | + err = !err; | ||
798 | + } | ||
799 | + if (!err) { | ||
800 | + /* we are now sure that this is non-numeric */ | ||
801 | + | ||
802 | + /* | ||
803 | + * Verify that the address is a member of the address list returned | ||
804 | + * by gethostbyname(hostname). | ||
805 | + * | ||
806 | + * Verify also that gethostbyaddr() and gethostbyname() return the same | ||
807 | + * hostname, or rshd and rlogind may still end up being spoofed. | ||
808 | + * | ||
809 | + * On some sites, gethostbyname("localhost") returns "localhost.domain". | ||
810 | + * This is a DNS artefact. We treat it as a special case. When we | ||
811 | + * can't believe the address list from gethostbyname("localhost") | ||
812 | + * we're in big trouble anyway. | ||
813 | + */ | ||
814 | + | ||
815 | + memset(&hints, 0, sizeof(hints)); | ||
816 | + hints.ai_family = sin->sa_family; | ||
817 | + hints.ai_socktype = SOCK_STREAM; | ||
818 | + hints.ai_flags = AI_PASSIVE | AI_CANONNAME; | ||
819 | + if (getaddrinfo(host->name, NULL, &hints, &res0) != 0) { | ||
820 | + | ||
821 | + /* | ||
822 | + * Unable to verify that the host name matches the address. This | ||
823 | + * may be a transient problem or a botched name server setup. | ||
824 | + */ | ||
825 | + | ||
826 | + tcpd_warn("can't verify hostname: getaddrinfo(%s, %s) failed", | ||
827 | + host->name, | ||
828 | + (sin->sa_family == AF_INET) ? "AF_INET" : "AF_INET6"); | ||
829 | + | ||
830 | + } else if ((res0->ai_canonname == NULL | ||
831 | + || STR_NE(host->name, res0->ai_canonname)) | ||
832 | + && STR_NE(host->name, "localhost")) { | ||
833 | + | ||
834 | + /* | ||
835 | + * The gethostbyaddr() and gethostbyname() calls did not return | ||
836 | + * the same hostname. This could be a nameserver configuration | ||
837 | + * problem. It could also be that someone is trying to spoof us. | ||
838 | + */ | ||
839 | + | ||
840 | + tcpd_warn("host name/name mismatch: %s != %.*s", | ||
841 | + host->name, STRING_LENGTH, | ||
842 | + (res0->ai_canonname == NULL) ? "" : res0->ai_canonname); | ||
843 | + | ||
844 | + } else { | ||
845 | + | ||
846 | + /* | ||
847 | + * The address should be a member of the address list returned by | ||
848 | + * gethostbyname(). We should first verify that the h_addrtype | ||
849 | + * field is AF_INET, but this program has already caused too much | ||
850 | + * grief on systems with broken library code. | ||
851 | + */ | ||
852 | + | ||
853 | + for (res = res0; res; res = res->ai_next) { | ||
854 | + if (res->ai_family != sin->sa_family) | ||
855 | + continue; | ||
856 | + switch (res->ai_family) { | ||
857 | + case AF_INET: | ||
858 | + rap = (char *)&((struct sockaddr_in *)res->ai_addr)->sin_addr; | ||
859 | + break; | ||
860 | + case AF_INET6: | ||
861 | + /* need to check scope_id */ | ||
862 | + if (((struct sockaddr_in6 *)sin)->sin6_scope_id != | ||
863 | + ((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id) { | ||
864 | + continue; | ||
865 | + } | ||
866 | + rap = (char *)&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr; | ||
867 | + break; | ||
868 | + default: | ||
869 | + continue; | ||
870 | + } | ||
871 | + if (memcmp(rap, ap, alen) == 0) { | ||
872 | + freeaddrinfo(res0); | ||
873 | + return; /* name is good, keep it */ | ||
874 | + } | ||
875 | + } | ||
876 | + | ||
877 | + /* | ||
878 | + * The host name does not map to the initial address. Perhaps | ||
879 | + * someone has messed up. Perhaps someone compromised a name | ||
880 | + * server. | ||
881 | + */ | ||
882 | + | ||
883 | + getnameinfo(sin, salen, hname, sizeof(hname), | ||
884 | + NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID); | ||
885 | + tcpd_warn("host name/address mismatch: %s != %.*s", | ||
886 | + hname, STRING_LENGTH, | ||
887 | + (res0->ai_canonname == NULL) ? "" : res0->ai_canonname); | ||
888 | + } | ||
889 | + strcpy(host->name, paranoid); /* name is bad, clobber it */ | ||
890 | + if (res0) | ||
891 | + freeaddrinfo(res0); | ||
892 | + } | ||
893 | +#else /* INET6 */ | ||
894 | struct sockaddr_in *sin = host->sin; | ||
895 | struct hostent *hp; | ||
896 | int i; | ||
897 | @@ -220,6 +412,7 @@ | ||
898 | } | ||
899 | strcpy(host->name, paranoid); /* name is bad, clobber it */ | ||
900 | } | ||
901 | +#endif /* INET6 */ | ||
902 | } | ||
903 | |||
904 | /* sock_sink - absorb unreceived IP datagram */ | ||
905 | @@ -228,7 +421,11 @@ | ||
906 | int fd; | ||
907 | { | ||
908 | char buf[BUFSIZ]; | ||
909 | +#ifdef INET6 | ||
910 | + struct sockaddr_storage sin; | ||
911 | +#else | ||
912 | struct sockaddr_in sin; | ||
913 | +#endif | ||
914 | int size = sizeof(sin); | ||
915 | |||
916 | /* | ||
917 | diff -ruN tcp_wrappers_7.6.orig/tcpd.c tcp_wrappers_7.6/tcpd.c | ||
918 | --- tcp_wrappers_7.6.orig/tcpd.c 1996-02-11 17:01:33.000000000 +0100 | ||
919 | +++ tcp_wrappers_7.6/tcpd.c 2004-04-10 19:07:43.000000000 +0200 | ||
920 | @@ -120,7 +120,12 @@ | ||
921 | |||
922 | /* Report request and invoke the real daemon program. */ | ||
923 | |||
924 | +#ifdef INET6 | ||
925 | + syslog(allow_severity, "connect from %s (%s)", | ||
926 | + eval_client(&request), eval_hostaddr(request.client)); | ||
927 | +#else | ||
928 | syslog(allow_severity, "connect from %s", eval_client(&request)); | ||
929 | +#endif | ||
930 | closelog(); | ||
931 | (void) execv(path, argv); | ||
932 | syslog(LOG_ERR, "error: cannot execute %s: %m", path); | ||
933 | diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c | ||
934 | --- tcp_wrappers_7.6.orig/tcpdchk.c 1997-02-12 02:13:25.000000000 +0100 | ||
935 | +++ tcp_wrappers_7.6/tcpdchk.c 2004-04-10 19:07:43.000000000 +0200 | ||
936 | @@ -22,6 +22,9 @@ | ||
937 | |||
938 | #include <sys/types.h> | ||
939 | #include <sys/stat.h> | ||
940 | +#ifdef INET6 | ||
941 | +#include <sys/socket.h> | ||
942 | +#endif | ||
943 | #include <netinet/in.h> | ||
944 | #include <arpa/inet.h> | ||
945 | #include <stdio.h> | ||
946 | @@ -397,6 +400,31 @@ | ||
947 | } | ||
948 | } | ||
949 | |||
950 | +#ifdef INET6 | ||
951 | +static int is_inet6_addr(pat) | ||
952 | + char *pat; | ||
953 | +{ | ||
954 | + struct addrinfo hints, *res; | ||
955 | + int len, ret; | ||
956 | + char ch; | ||
957 | + | ||
958 | + if (*pat != '[') | ||
959 | + return (0); | ||
960 | + len = strlen(pat); | ||
961 | + if ((ch = pat[len - 1]) != ']') | ||
962 | + return (0); | ||
963 | + pat[len - 1] = '\0'; | ||
964 | + memset(&hints, 0, sizeof(hints)); | ||
965 | + hints.ai_family = AF_INET6; | ||
966 | + hints.ai_socktype = SOCK_STREAM; | ||
967 | + hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; | ||
968 | + if ((ret = getaddrinfo(pat + 1, NULL, &hints, &res)) == 0) | ||
969 | + freeaddrinfo(res); | ||
970 | + pat[len - 1] = ch; | ||
971 | + return (ret == 0); | ||
972 | +} | ||
973 | +#endif | ||
974 | + | ||
975 | /* check_host - criticize host pattern */ | ||
976 | |||
977 | static int check_host(pat) | ||
978 | @@ -423,14 +451,27 @@ | ||
979 | #endif | ||
980 | #endif | ||
981 | } else if (mask = split_at(pat, '/')) { /* network/netmask */ | ||
982 | +#ifdef INET6 | ||
983 | + int mask_len; | ||
984 | + | ||
985 | + if ((dot_quad_addr(pat) == INADDR_NONE | ||
986 | + || dot_quad_addr(mask) == INADDR_NONE) | ||
987 | + && (!is_inet6_addr(pat) | ||
988 | + || ((mask_len = atoi(mask)) < 0 || mask_len > 128))) | ||
989 | +#else | ||
990 | if (dot_quad_addr(pat) == INADDR_NONE | ||
991 | || dot_quad_addr(mask) == INADDR_NONE) | ||
992 | +#endif | ||
993 | tcpd_warn("%s/%s: bad net/mask pattern", pat, mask); | ||
994 | } else if (STR_EQ(pat, "FAIL")) { /* obsolete */ | ||
995 | tcpd_warn("FAIL is no longer recognized"); | ||
996 | tcpd_warn("(use EXCEPT or DENY instead)"); | ||
997 | } else if (reserved_name(pat)) { /* other reserved */ | ||
998 | /* void */ ; | ||
999 | +#ifdef INET6 | ||
1000 | + } else if (is_inet6_addr(pat)) { /* IPv6 address */ | ||
1001 | + addr_count = 1; | ||
1002 | +#endif | ||
1003 | } else if (NOT_INADDR(pat)) { /* internet name */ | ||
1004 | if (pat[strlen(pat) - 1] == '.') { | ||
1005 | tcpd_warn("%s: domain or host name ends in dot", pat); | ||
1006 | diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h | ||
1007 | --- tcp_wrappers_7.6.orig/tcpd.h 1996-03-19 16:22:25.000000000 +0100 | ||
1008 | +++ tcp_wrappers_7.6/tcpd.h 2004-04-10 19:07:43.000000000 +0200 | ||
1009 | @@ -11,7 +11,11 @@ | ||
1010 | struct host_info { | ||
1011 | char name[STRING_LENGTH]; /* access via eval_hostname(host) */ | ||
1012 | char addr[STRING_LENGTH]; /* access via eval_hostaddr(host) */ | ||
1013 | +#ifdef INET6 | ||
1014 | + struct sockaddr *sin; /* socket address or 0 */ | ||
1015 | +#else | ||
1016 | struct sockaddr_in *sin; /* socket address or 0 */ | ||
1017 | +#endif | ||
1018 | struct t_unitdata *unit; /* TLI transport address or 0 */ | ||
1019 | struct request_info *request; /* for shared information */ | ||
1020 | }; | ||
1021 | diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.c tcp_wrappers_7.6/tcpdmatch.c | ||
1022 | --- tcp_wrappers_7.6.orig/tcpdmatch.c 1996-02-11 17:01:36.000000000 +0100 | ||
1023 | +++ tcp_wrappers_7.6/tcpdmatch.c 2004-04-10 19:07:43.000000000 +0200 | ||
1024 | @@ -57,7 +57,11 @@ | ||
1025 | int argc; | ||
1026 | char **argv; | ||
1027 | { | ||
1028 | +#ifdef INET6 | ||
1029 | + struct addrinfo hints, *hp, *res; | ||
1030 | +#else | ||
1031 | struct hostent *hp; | ||
1032 | +#endif | ||
1033 | char *myname = argv[0]; | ||
1034 | char *client; | ||
1035 | char *server; | ||
1036 | @@ -68,8 +72,13 @@ | ||
1037 | int ch; | ||
1038 | char *inetcf = 0; | ||
1039 | int count; | ||
1040 | +#ifdef INET6 | ||
1041 | + struct sockaddr_storage server_sin; | ||
1042 | + struct sockaddr_storage client_sin; | ||
1043 | +#else | ||
1044 | struct sockaddr_in server_sin; | ||
1045 | struct sockaddr_in client_sin; | ||
1046 | +#endif | ||
1047 | struct stat st; | ||
1048 | |||
1049 | /* | ||
1050 | @@ -172,13 +181,20 @@ | ||
1051 | if (NOT_INADDR(server) == 0 || HOSTNAME_KNOWN(server)) { | ||
1052 | if ((hp = find_inet_addr(server)) == 0) | ||
1053 | exit(1); | ||
1054 | +#ifndef INET6 | ||
1055 | memset((char *) &server_sin, 0, sizeof(server_sin)); | ||
1056 | server_sin.sin_family = AF_INET; | ||
1057 | +#endif | ||
1058 | request_set(&request, RQ_SERVER_SIN, &server_sin, 0); | ||
1059 | |||
1060 | +#ifdef INET6 | ||
1061 | + for (res = hp, count = 0; res; res = res->ai_next, count++) { | ||
1062 | + memcpy(&server_sin, res->ai_addr, res->ai_addrlen); | ||
1063 | +#else | ||
1064 | for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) { | ||
1065 | memcpy((char *) &server_sin.sin_addr, addr, | ||
1066 | sizeof(server_sin.sin_addr)); | ||
1067 | +#endif | ||
1068 | |||
1069 | /* | ||
1070 | * Force evaluation of server host name and address. Host name | ||
1071 | @@ -194,7 +210,11 @@ | ||
1072 | fprintf(stderr, "Please specify an address instead\n"); | ||
1073 | exit(1); | ||
1074 | } | ||
1075 | +#ifdef INET6 | ||
1076 | + freeaddrinfo(hp); | ||
1077 | +#else | ||
1078 | free((char *) hp); | ||
1079 | +#endif | ||
1080 | } else { | ||
1081 | request_set(&request, RQ_SERVER_NAME, server, 0); | ||
1082 | } | ||
1083 | @@ -208,6 +228,18 @@ | ||
1084 | tcpdmatch(&request); | ||
1085 | exit(0); | ||
1086 | } | ||
1087 | +#ifdef INET6 | ||
1088 | + memset(&hints, 0, sizeof(hints)); | ||
1089 | + hints.ai_family = AF_INET6; | ||
1090 | + hints.ai_socktype = SOCK_STREAM; | ||
1091 | + hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; | ||
1092 | + if (getaddrinfo(client, NULL, &hints, &res) == 0) { | ||
1093 | + freeaddrinfo(res); | ||
1094 | + request_set(&request, RQ_CLIENT_ADDR, client, 0); | ||
1095 | + tcpdmatch(&request); | ||
1096 | + exit(0); | ||
1097 | + } | ||
1098 | +#endif | ||
1099 | |||
1100 | /* | ||
1101 | * Perhaps they are testing special client hostname patterns that aren't | ||
1102 | @@ -229,6 +261,34 @@ | ||
1103 | */ | ||
1104 | if ((hp = find_inet_addr(client)) == 0) | ||
1105 | exit(1); | ||
1106 | +#ifdef INET6 | ||
1107 | + request_set(&request, RQ_CLIENT_SIN, &client_sin, 0); | ||
1108 | + | ||
1109 | + for (res = hp, count = 0; res; res = res->ai_next, count++) { | ||
1110 | + memcpy(&client_sin, res->ai_addr, res->ai_addrlen); | ||
1111 | + | ||
1112 | + /* | ||
1113 | + * getnameinfo() doesn't do reverse lookup against link-local | ||
1114 | + * address. So, we pass through host name evaluation against | ||
1115 | + * such addresses. | ||
1116 | + */ | ||
1117 | + if (res->ai_family != AF_INET6 || | ||
1118 | + !IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr)) { | ||
1119 | + /* | ||
1120 | + * Force evaluation of client host name and address. Host name | ||
1121 | + * conflicts will be reported while eval_hostname() does its job. | ||
1122 | + */ | ||
1123 | + request_set(&request, RQ_CLIENT_NAME, "", RQ_CLIENT_ADDR, "", 0); | ||
1124 | + if (STR_EQ(eval_hostname(request.client), unknown)) | ||
1125 | + tcpd_warn("host address %s->name lookup failed", | ||
1126 | + eval_hostaddr(request.client)); | ||
1127 | + } | ||
1128 | + tcpdmatch(&request); | ||
1129 | + if (res->ai_next) | ||
1130 | + printf("\n"); | ||
1131 | + } | ||
1132 | + freeaddrinfo(hp); | ||
1133 | +#else | ||
1134 | memset((char *) &client_sin, 0, sizeof(client_sin)); | ||
1135 | client_sin.sin_family = AF_INET; | ||
1136 | request_set(&request, RQ_CLIENT_SIN, &client_sin, 0); | ||
1137 | @@ -250,6 +310,7 @@ | ||
1138 | printf("\n"); | ||
1139 | } | ||
1140 | free((char *) hp); | ||
1141 | +#endif | ||
1142 | exit(0); | ||
1143 | } | ||
1144 | |||
1145 | diff -ruN tcp_wrappers_7.6.orig/tli.c tcp_wrappers_7.6/tli.c | ||
1146 | --- tcp_wrappers_7.6.orig/tli.c 1997-03-21 19:27:26.000000000 +0100 | ||
1147 | +++ tcp_wrappers_7.6/tli.c 2004-04-10 19:07:43.000000000 +0200 | ||
1148 | @@ -65,8 +65,13 @@ | ||
1149 | void tli_host(request) | ||
1150 | struct request_info *request; | ||
1151 | { | ||
1152 | +#ifdef INET6 | ||
1153 | + static struct sockaddr_storage client; | ||
1154 | + static struct sockaddr_storage server; | ||
1155 | +#else | ||
1156 | static struct sockaddr_in client; | ||
1157 | static struct sockaddr_in server; | ||
1158 | +#endif | ||
1159 | |||
1160 | /* | ||
1161 | * If we discover that we are using an IP transport, pretend we never | ||
1162 | @@ -76,14 +81,29 @@ | ||
1163 | |||
1164 | tli_endpoints(request); | ||
1165 | if ((request->config = tli_transport(request->fd)) != 0 | ||
1166 | +#ifdef INET6 | ||
1167 | + && (STR_EQ(request->config->nc_protofmly, "inet") || | ||
1168 | + STR_EQ(request->config->nc_protofmly, "inet6"))) { | ||
1169 | +#else | ||
1170 | && STR_EQ(request->config->nc_protofmly, "inet")) { | ||
1171 | +#endif | ||
1172 | if (request->client->unit != 0) { | ||
1173 | +#ifdef INET6 | ||
1174 | + client = *(struct sockaddr_storage *) request->client->unit->addr.buf; | ||
1175 | + request->client->sin = (struct sockaddr *) &client; | ||
1176 | +#else | ||
1177 | client = *(struct sockaddr_in *) request->client->unit->addr.buf; | ||
1178 | request->client->sin = &client; | ||
1179 | +#endif | ||
1180 | } | ||
1181 | if (request->server->unit != 0) { | ||
1182 | +#ifdef INET6 | ||
1183 | + server = *(struct sockaddr_storage *) request->server->unit->addr.buf; | ||
1184 | + request->server->sin = (struct sockaddr *) &server; | ||
1185 | +#else | ||
1186 | server = *(struct sockaddr_in *) request->server->unit->addr.buf; | ||
1187 | request->server->sin = &server; | ||
1188 | +#endif | ||
1189 | } | ||
1190 | tli_cleanup(request); | ||
1191 | sock_methods(request); | ||
1192 | @@ -187,7 +207,15 @@ | ||
1193 | } | ||
1194 | while (config = getnetconfig(handlep)) { | ||
1195 | if (stat(config->nc_device, &from_config) == 0) { | ||
1196 | +#ifdef NO_CLONE_DEVICE | ||
1197 | + /* | ||
1198 | + * If the network devices are not cloned (as is the case for | ||
1199 | + * Solaris 8 Beta), we must compare the major device numbers. | ||
1200 | + */ | ||
1201 | + if (major(from_config.st_rdev) == major(from_client.st_rdev)) | ||
1202 | +#else | ||
1203 | if (minor(from_config.st_rdev) == major(from_client.st_rdev)) | ||
1204 | +#endif | ||
1205 | break; | ||
1206 | } | ||
1207 | } | ||
1208 | diff -ruN tcp_wrappers_7.6.orig/update.c tcp_wrappers_7.6/update.c | ||
1209 | --- tcp_wrappers_7.6.orig/update.c 1994-12-28 17:42:56.000000000 +0100 | ||
1210 | +++ tcp_wrappers_7.6/update.c 2004-04-10 19:07:43.000000000 +0200 | ||
1211 | @@ -46,10 +46,18 @@ | ||
1212 | request->fd = va_arg(ap, int); | ||
1213 | continue; | ||
1214 | case RQ_CLIENT_SIN: | ||
1215 | +#ifdef INET6 | ||
1216 | + request->client->sin = va_arg(ap, struct sockaddr *); | ||
1217 | +#else | ||
1218 | request->client->sin = va_arg(ap, struct sockaddr_in *); | ||
1219 | +#endif | ||
1220 | continue; | ||
1221 | case RQ_SERVER_SIN: | ||
1222 | +#ifdef INET6 | ||
1223 | + request->server->sin = va_arg(ap, struct sockaddr *); | ||
1224 | +#else | ||
1225 | request->server->sin = va_arg(ap, struct sockaddr_in *); | ||
1226 | +#endif | ||
1227 | continue; | ||
1228 | |||
1229 | /* | ||
1230 | diff -ruN tcp_wrappers_7.6.orig/workarounds.c tcp_wrappers_7.6/workarounds.c | ||
1231 | --- tcp_wrappers_7.6.orig/workarounds.c 1996-03-19 16:22:26.000000000 +0100 | ||
1232 | +++ tcp_wrappers_7.6/workarounds.c 2004-04-10 19:07:43.000000000 +0200 | ||
1233 | @@ -166,11 +166,22 @@ | ||
1234 | int *len; | ||
1235 | { | ||
1236 | int ret; | ||
1237 | +#ifdef INET6 | ||
1238 | + struct sockaddr *sin = sa; | ||
1239 | +#else | ||
1240 | struct sockaddr_in *sin = (struct sockaddr_in *) sa; | ||
1241 | +#endif | ||
1242 | |||
1243 | if ((ret = getpeername(sock, sa, len)) >= 0 | ||
1244 | +#ifdef INET6 | ||
1245 | + && ((sin->su_si.si_family == AF_INET6 | ||
1246 | + && IN6_IS_ADDR_UNSPECIFIED(&sin->su_sin6.sin6_addr)) | ||
1247 | + || (sin->su_si.si_family == AF_INET | ||
1248 | + && sin->su_sin.sin_addr.s_addr == 0))) { | ||
1249 | +#else | ||
1250 | && sa->sa_family == AF_INET | ||
1251 | && sin->sin_addr.s_addr == 0) { | ||
1252 | +#endif | ||
1253 | errno = ENOTCONN; | ||
1254 | return (-1); | ||
1255 | } else { | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch new file mode 100644 index 0000000000..226106f4ff --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch | |||
@@ -0,0 +1,153 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Path: news.porcupine.org!news.porcupine.org!not-for-mail | ||
4 | From: Wietse Venema <wietse@((no)(spam)(please))wzv.win.tue.nl> | ||
5 | Newsgroups: comp.mail.sendmail,comp.security.unix | ||
6 | Subject: TCP Wrapper Blacklist Extension | ||
7 | Followup-To: poster | ||
8 | Date: 8 Sep 1997 18:53:13 -0400 | ||
9 | Organization: Wietse's hangout while on sabattical in the USA | ||
10 | Lines: 147 | ||
11 | Sender: wietse@spike.porcupine.org | ||
12 | Message-ID: <5v1vkp$h4f$1@spike.porcupine.org> | ||
13 | NNTP-Posting-Host: spike.porcupine.org | ||
14 | Xref: news.porcupine.org comp.mail.sendmail:3541 comp.security.unix:7158 | ||
15 | |||
16 | The patch below adds a new host pattern to the TCP Wrapper access | ||
17 | control language. Instead of a host name or address pattern, you | ||
18 | can specify an external /file/name with host name or address | ||
19 | patterns. The feature can be used recursively. | ||
20 | |||
21 | The /file/name extension makes it easy to blacklist bad sites, for | ||
22 | example, to block unwanted electronic mail when libwrap is linked | ||
23 | into sendmail. Adding hosts to a simple text file is much easier | ||
24 | than having to edit a more complex hosts.allow/deny file. | ||
25 | |||
26 | I developed this a year or so ago as a substitute for NIS netgroups. | ||
27 | At that time, I did not consider it of sufficient interest for | ||
28 | inclusion in the TCP Wrapper distribution. How times have changed. | ||
29 | |||
30 | The patch is relative to TCP Wrappers version 7.6. The main archive | ||
31 | site is ftp://ftp.win.tue.nl/pub/security/tcp_wrappers_7.6.tar.gz | ||
32 | |||
33 | Thanks to the Debian LINUX folks for expressing their interest in | ||
34 | this patch. | ||
35 | |||
36 | Wietse | ||
37 | |||
38 | |||
39 | [diff updated by Md] | ||
40 | |||
41 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 | ||
42 | --- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 19:28:09.000000000 +0200 | ||
43 | +++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 19:28:01.000000000 +0200 | ||
44 | @@ -97,6 +97,13 @@ | ||
45 | `[3ffe:505:2:1::]/64\' matches every address in the range | ||
46 | `3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'. | ||
47 | .IP \(bu | ||
48 | +A string that begins with a `/\' character is treated as a file | ||
49 | +name. A host name or address is matched if it matches any host name | ||
50 | +or address pattern listed in the named file. The file format is | ||
51 | +zero or more lines with zero or more host name or address patterns | ||
52 | +separated by whitespace. A file name pattern can be used anywhere | ||
53 | +a host name or address pattern can be used. | ||
54 | +.IP \(bu | ||
55 | Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This | ||
56 | method of matching cannot be used in conjunction with `net/mask\' matching, | ||
57 | hostname matching beginning with `.\' or IP address matching ending with `.\'. | ||
58 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c | ||
59 | --- tcp_wrappers_7.6.orig/hosts_access.c 2004-04-10 19:28:09.000000000 +0200 | ||
60 | +++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 19:27:05.000000000 +0200 | ||
61 | @@ -253,6 +253,26 @@ | ||
62 | } | ||
63 | } | ||
64 | |||
65 | +/* hostfile_match - look up host patterns from file */ | ||
66 | + | ||
67 | +static int hostfile_match(path, host) | ||
68 | +char *path; | ||
69 | +struct hosts_info *host; | ||
70 | +{ | ||
71 | + char tok[BUFSIZ]; | ||
72 | + int match = NO; | ||
73 | + FILE *fp; | ||
74 | + | ||
75 | + if ((fp = fopen(path, "r")) != 0) { | ||
76 | + while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host))) | ||
77 | + /* void */ ; | ||
78 | + fclose(fp); | ||
79 | + } else if (errno != ENOENT) { | ||
80 | + tcpd_warn("open %s: %m", path); | ||
81 | + } | ||
82 | + return (match); | ||
83 | +} | ||
84 | + | ||
85 | /* host_match - match host name and/or address against pattern */ | ||
86 | |||
87 | static int host_match(tok, host) | ||
88 | @@ -280,6 +300,8 @@ | ||
89 | tcpd_warn("netgroup support is disabled"); /* not tcpd_jump() */ | ||
90 | return (NO); | ||
91 | #endif | ||
92 | + } else if (tok[0] == '/') { /* /file hack */ | ||
93 | + return (hostfile_match(tok, host)); | ||
94 | } else if (STR_EQ(tok, "KNOWN")) { /* check address and name */ | ||
95 | char *name = eval_hostname(host); | ||
96 | return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name)); | ||
97 | diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c | ||
98 | --- tcp_wrappers_7.6.orig/tcpdchk.c 2004-04-10 19:28:09.000000000 +0200 | ||
99 | +++ tcp_wrappers_7.6/tcpdchk.c 2004-04-10 19:27:05.000000000 +0200 | ||
100 | @@ -353,6 +353,8 @@ | ||
101 | { | ||
102 | if (pat[0] == '@') { | ||
103 | tcpd_warn("%s: daemon name begins with \"@\"", pat); | ||
104 | + } else if (pat[0] == '/') { | ||
105 | + tcpd_warn("%s: daemon name begins with \"/\"", pat); | ||
106 | } else if (pat[0] == '.') { | ||
107 | tcpd_warn("%s: daemon name begins with dot", pat); | ||
108 | } else if (pat[strlen(pat) - 1] == '.') { | ||
109 | @@ -385,6 +387,8 @@ | ||
110 | { | ||
111 | if (pat[0] == '@') { /* @netgroup */ | ||
112 | tcpd_warn("%s: user name begins with \"@\"", pat); | ||
113 | + } else if (pat[0] == '/') { | ||
114 | + tcpd_warn("%s: user name begins with \"/\"", pat); | ||
115 | } else if (pat[0] == '.') { | ||
116 | tcpd_warn("%s: user name begins with dot", pat); | ||
117 | } else if (pat[strlen(pat) - 1] == '.') { | ||
118 | @@ -430,8 +434,13 @@ | ||
119 | static int check_host(pat) | ||
120 | char *pat; | ||
121 | { | ||
122 | + char buf[BUFSIZ]; | ||
123 | char *mask; | ||
124 | int addr_count = 1; | ||
125 | + FILE *fp; | ||
126 | + struct tcpd_context saved_context; | ||
127 | + char *cp; | ||
128 | + char *wsp = " \t\r\n"; | ||
129 | |||
130 | if (pat[0] == '@') { /* @netgroup */ | ||
131 | #ifdef NO_NETGRENT | ||
132 | @@ -450,6 +459,21 @@ | ||
133 | tcpd_warn("netgroup support disabled"); | ||
134 | #endif | ||
135 | #endif | ||
136 | + } else if (pat[0] == '/') { /* /path/name */ | ||
137 | + if ((fp = fopen(pat, "r")) != 0) { | ||
138 | + saved_context = tcpd_context; | ||
139 | + tcpd_context.file = pat; | ||
140 | + tcpd_context.line = 0; | ||
141 | + while (fgets(buf, sizeof(buf), fp)) { | ||
142 | + tcpd_context.line++; | ||
143 | + for (cp = strtok(buf, wsp); cp; cp = strtok((char *) 0, wsp)) | ||
144 | + check_host(cp); | ||
145 | + } | ||
146 | + tcpd_context = saved_context; | ||
147 | + fclose(fp); | ||
148 | + } else if (errno != ENOENT) { | ||
149 | + tcpd_warn("open %s: %m", pat); | ||
150 | + } | ||
151 | } else if (mask = split_at(pat, '/')) { /* network/netmask */ | ||
152 | #ifdef INET6 | ||
153 | int mask_len; | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch new file mode 100644 index 0000000000..260e8d3138 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -uN tcp_wrappers_7.6/hosts_access.c tcp_wrappers_7.6.new/hosts_access.c | ||
4 | --- tcp_wrappers_7.6/hosts_access.c Mon May 20 14:00:56 2002 | ||
5 | +++ tcp_wrappers_7.6.new/hosts_access.c Mon May 20 14:25:05 2002 | ||
6 | @@ -448,6 +448,15 @@ | ||
7 | int len, mask_len, i = 0; | ||
8 | char ch; | ||
9 | |||
10 | + /* | ||
11 | + * Behavior of getaddrinfo() against IPv4-mapped IPv6 address is | ||
12 | + * different between KAME and Solaris8. While KAME returns | ||
13 | + * AF_INET6, Solaris8 returns AF_INET. So, we avoid this here. | ||
14 | + */ | ||
15 | + if (STRN_EQ(string, "::ffff:", 7) | ||
16 | + && dot_quad_addr(string + 7) != INADDR_NONE) | ||
17 | + return (masked_match4(net_tok, mask_tok, string + 7)); | ||
18 | + | ||
19 | memset(&hints, 0, sizeof(hints)); | ||
20 | hints.ai_family = AF_INET6; | ||
21 | hints.ai_socktype = SOCK_STREAM; | ||
22 | @@ -457,13 +466,6 @@ | ||
23 | memcpy(&addr, res->ai_addr, sizeof(addr)); | ||
24 | freeaddrinfo(res); | ||
25 | |||
26 | - if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) { | ||
27 | - if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE | ||
28 | - || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) | ||
29 | - return (NO); | ||
30 | - return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]); | ||
31 | - } | ||
32 | - | ||
33 | /* match IPv6 address against netnumber/prefixlen */ | ||
34 | len = strlen(net_tok); | ||
35 | if (*net_tok != '[' || net_tok[len - 1] != ']') | ||
36 | diff -uN tcp_wrappers_7.6/socket.c tcp_wrappers_7.6.new/socket.c | ||
37 | --- tcp_wrappers_7.6/socket.c Mon May 20 13:48:35 2002 | ||
38 | +++ tcp_wrappers_7.6.new/socket.c Mon May 20 14:22:27 2002 | ||
39 | @@ -228,7 +228,7 @@ | ||
40 | hints.ai_family = sin->sa_family; | ||
41 | hints.ai_socktype = SOCK_STREAM; | ||
42 | hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST; | ||
43 | - if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) { | ||
44 | + if ((err = getaddrinfo(host->name, NULL, &hints, &res0)) == 0) { | ||
45 | freeaddrinfo(res0); | ||
46 | res0 = NULL; | ||
47 | tcpd_warn("host name/name mismatch: " | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch new file mode 100644 index 0000000000..e8289e44d9 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch | |||
@@ -0,0 +1,83 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile | ||
4 | --- tcp_wrappers_7.6.orig/Makefile 2003-08-21 01:43:39.000000000 +0200 | ||
5 | +++ tcp_wrappers_7.6/Makefile 2003-08-21 01:43:35.000000000 +0200 | ||
6 | @@ -45,7 +45,7 @@ | ||
7 | # | ||
8 | # SysV.4 Solaris 2.x OSF AIX | ||
9 | #REAL_DAEMON_DIR=/usr/sbin | ||
10 | -# | ||
11 | +REAL_DAEMON_DIR=/usr/sbin | ||
12 | # BSD 4.4 | ||
13 | #REAL_DAEMON_DIR=/usr/libexec | ||
14 | # | ||
15 | @@ -512,6 +519,7 @@ | ||
16 | # (examples: allow, deny, banners, twist and spawn). | ||
17 | # | ||
18 | #STYLE = -DPROCESS_OPTIONS # Enable language extensions. | ||
19 | +STYLE = -DPROCESS_OPTIONS | ||
20 | |||
21 | ################################################################ | ||
22 | # Optional: Changing the default disposition of logfile records | ||
23 | @@ -535,6 +543,7 @@ | ||
24 | # The LOG_XXX names below are taken from the /usr/include/syslog.h file. | ||
25 | |||
26 | FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use | ||
27 | +FACILITY= LOG_DAEMON | ||
28 | |||
29 | # The syslog priority at which successful connections are logged. | ||
30 | |||
31 | @@ -631,6 +640,7 @@ | ||
32 | # lookups altogether, see the next section. | ||
33 | |||
34 | PARANOID= -DPARANOID | ||
35 | +PARANOID= | ||
36 | |||
37 | ######################################## | ||
38 | # Optional: turning off hostname lookups | ||
39 | @@ -644,6 +654,7 @@ | ||
40 | # mode (see previous section) and comment out the following definition. | ||
41 | |||
42 | HOSTNAME= -DALWAYS_HOSTNAME | ||
43 | +HOSTNAME= | ||
44 | |||
45 | ############################################# | ||
46 | # Optional: Turning on host ADDRESS checking | ||
47 | @@ -670,6 +681,7 @@ | ||
48 | # Solaris 2.x, and Linux. See your system documentation for details. | ||
49 | # | ||
50 | # KILL_OPT= -DKILL_IP_OPTIONS | ||
51 | +KILL_OPT= -DKILL_IP_OPTIONS | ||
52 | |||
53 | ## End configuration options | ||
54 | ############################ | ||
55 | @@ -677,9 +689,10 @@ | ||
56 | # Protection against weird shells or weird make programs. | ||
57 | |||
58 | SHELL = /bin/sh | ||
59 | -.c.o:; $(CC) $(CFLAGS) -c $*.c | ||
60 | +.c.o:; $(CC) $(CFLAGS) -o $*.o -c $*.c | ||
61 | |||
62 | -CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ | ||
63 | +COPTS = -O2 -g | ||
64 | +CFLAGS = $(COPTS) -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ | ||
65 | $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \ | ||
66 | -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ | ||
67 | -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ | ||
68 | @@ -712,10 +725,11 @@ | ||
69 | |||
70 | config-check: | ||
71 | @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; } | ||
72 | - @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \ | ||
73 | - if cmp cflags /tmp/cflags.$$$$ ; \ | ||
74 | - then rm /tmp/cflags.$$$$ ; \ | ||
75 | - else mv /tmp/cflags.$$$$ cflags ; \ | ||
76 | + @set +e; echo $(CFLAGS) >cflags.new ; \ | ||
77 | + if cmp cflags cflags.new ; \ | ||
78 | + then rm cflags.new ; \ | ||
79 | + else mv cflags.new cflags ; \ | ||
80 | fi >/dev/null 2>/dev/null | ||
81 | + @if [ ! -d shared ]; then mkdir shared; fi | ||
82 | |||
83 | $(LIB): $(LIB_OBJ) | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch new file mode 100644 index 0000000000..bd1396bc79 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch | |||
@@ -0,0 +1,255 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile | ||
4 | --- tcp_wrappers_7.6.orig/Makefile 2004-05-02 15:37:59.000000000 +0200 | ||
5 | +++ tcp_wrappers_7.6/Makefile 2004-05-02 15:31:09.000000000 +0200 | ||
6 | @@ -150,15 +150,15 @@ | ||
7 | |||
8 | linux: | ||
9 | @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ | ||
10 | - LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \ | ||
11 | + LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \ | ||
12 | NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \ | ||
13 | - EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all | ||
14 | + EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all | ||
15 | |||
16 | gnu: | ||
17 | @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ | ||
18 | - LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \ | ||
19 | + LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \ | ||
20 | NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \ | ||
21 | - EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all | ||
22 | + EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT" all | ||
23 | |||
24 | # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x. | ||
25 | hpux hpux8 hpux9 hpux10: | ||
26 | @@ -713,7 +713,22 @@ | ||
27 | |||
28 | LIB = libwrap.a | ||
29 | |||
30 | -all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk | ||
31 | +shared/%.o: %.c | ||
32 | + $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@ | ||
33 | + | ||
34 | +SOMAJOR = 0 | ||
35 | +SOMINOR = 7.6 | ||
36 | + | ||
37 | +SHLIB = shared/libwrap.so.$(SOMAJOR).$(SOMINOR) | ||
38 | +SHLIBSOMAJ = shared/libwrap.so.$(SOMAJOR) | ||
39 | +SHLIBSO = shared/libwrap.so | ||
40 | +SHLIBFLAGS = -Lshared -lwrap | ||
41 | + | ||
42 | +SHLINKFLAGS = -shared -Xlinker -soname -Xlinker libwrap.so.$(SOMAJOR) -lc $(LIBS) | ||
43 | +SHCFLAGS = -fPIC -shared -D_REENTRANT | ||
44 | +SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ)); | ||
45 | + | ||
46 | +all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB) | ||
47 | |||
48 | # Invalidate all object files when the compiler options (CFLAGS) have changed. | ||
49 | |||
50 | @@ -731,27 +746,33 @@ | ||
51 | $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ) | ||
52 | -$(RANLIB) $(LIB) | ||
53 | |||
54 | -tcpd: tcpd.o $(LIB) | ||
55 | - $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS) | ||
56 | +$(SHLIB): $(SHLIB_OBJ) | ||
57 | + rm -f $(SHLIB) | ||
58 | + $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ) | ||
59 | + ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ) | ||
60 | + ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO) | ||
61 | + | ||
62 | +tcpd: tcpd.o $(SHLIB) | ||
63 | + $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS) | ||
64 | |||
65 | miscd: miscd.o $(LIB) | ||
66 | $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS) | ||
67 | |||
68 | -safe_finger: safe_finger.o $(LIB) | ||
69 | - $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS) | ||
70 | +safe_finger: safe_finger.o $(SHLIB) | ||
71 | + $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS) | ||
72 | |||
73 | TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o | ||
74 | |||
75 | -tcpdmatch: $(TCPDMATCH_OBJ) $(LIB) | ||
76 | - $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS) | ||
77 | +tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB) | ||
78 | + $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS) | ||
79 | |||
80 | -try-from: try-from.o fakelog.o $(LIB) | ||
81 | - $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS) | ||
82 | +try-from: try-from.o fakelog.o $(SHLIB) | ||
83 | + $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS) | ||
84 | |||
85 | TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o | ||
86 | |||
87 | -tcpdchk: $(TCPDCHK_OBJ) $(LIB) | ||
88 | - $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS) | ||
89 | +tcpdchk: $(TCPDCHK_OBJ) $(SHLIB) | ||
90 | + $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS) | ||
91 | |||
92 | shar: $(KIT) | ||
93 | @shar $(KIT) | ||
94 | @@ -767,7 +788,9 @@ | ||
95 | |||
96 | clean: | ||
97 | rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \ | ||
98 | + libwrap*.so* \ | ||
99 | cflags | ||
100 | + rm -rf shared/ | ||
101 | |||
102 | tidy: clean | ||
103 | chmod -R a+r . | ||
104 | @@ -913,5 +936,6 @@ | ||
105 | update.o: mystdarg.h | ||
106 | update.o: tcpd.h | ||
107 | vfprintf.o: cflags | ||
108 | +weak_symbols.o: tcpd.h | ||
109 | workarounds.o: cflags | ||
110 | workarounds.o: tcpd.h | ||
111 | diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h | ||
112 | --- tcp_wrappers_7.6.orig/tcpd.h 2004-05-02 15:37:59.000000000 +0200 | ||
113 | +++ tcp_wrappers_7.6/tcpd.h 2004-05-02 15:37:49.000000000 +0200 | ||
114 | @@ -4,6 +4,15 @@ | ||
115 | * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. | ||
116 | */ | ||
117 | |||
118 | +#ifndef _TCPWRAPPERS_TCPD_H | ||
119 | +#define _TCPWRAPPERS_TCPD_H | ||
120 | + | ||
121 | +/* Need definitions of struct sockaddr_in and FILE. */ | ||
122 | +#include <netinet/in.h> | ||
123 | +#include <stdio.h> | ||
124 | + | ||
125 | +__BEGIN_DECLS | ||
126 | + | ||
127 | /* Structure to describe one communications endpoint. */ | ||
128 | |||
129 | #define STRING_LENGTH 128 /* hosts, users, processes */ | ||
130 | @@ -29,10 +38,10 @@ | ||
131 | char pid[10]; /* access via eval_pid(request) */ | ||
132 | struct host_info client[1]; /* client endpoint info */ | ||
133 | struct host_info server[1]; /* server endpoint info */ | ||
134 | - void (*sink) (); /* datagram sink function or 0 */ | ||
135 | - void (*hostname) (); /* address to printable hostname */ | ||
136 | - void (*hostaddr) (); /* address to printable address */ | ||
137 | - void (*cleanup) (); /* cleanup function or 0 */ | ||
138 | + void (*sink) (int); /* datagram sink function or 0 */ | ||
139 | + void (*hostname) (struct host_info *); /* address to printable hostname */ | ||
140 | + void (*hostaddr) (struct host_info *); /* address to printable address */ | ||
141 | + void (*cleanup) (struct request_info *); /* cleanup function or 0 */ | ||
142 | struct netconfig *config; /* netdir handle */ | ||
143 | }; | ||
144 | |||
145 | @@ -70,20 +79,27 @@ | ||
146 | #define fromhost sock_host /* no TLI support needed */ | ||
147 | #endif | ||
148 | |||
149 | -extern int hosts_access(); /* access control */ | ||
150 | -extern void shell_cmd(); /* execute shell command */ | ||
151 | -extern char *percent_x(); /* do %<char> expansion */ | ||
152 | -extern void rfc931(); /* client name from RFC 931 daemon */ | ||
153 | -extern void clean_exit(); /* clean up and exit */ | ||
154 | -extern void refuse(); /* clean up and exit */ | ||
155 | -extern char *xgets(); /* fgets() on steroids */ | ||
156 | -extern char *split_at(); /* strchr() and split */ | ||
157 | -extern unsigned long dot_quad_addr(); /* restricted inet_addr() */ | ||
158 | +extern int hosts_access(struct request_info *request); /* access control */ | ||
159 | +extern void shell_cmd(char *); /* execute shell command */ | ||
160 | +extern char *percent_x(char *, int, char *, struct request_info *); | ||
161 | + /* do %<char> expansion */ | ||
162 | +extern void rfc931(struct sockaddr *, struct sockaddr *, char *); | ||
163 | + /* client name from RFC 931 daemon */ | ||
164 | +extern void clean_exit(struct request_info *); /* clean up and exit */ | ||
165 | +extern void refuse(struct request_info *); /* clean up and exit */ | ||
166 | +extern char *xgets(char *, int, FILE *); /* fgets() on steroids */ | ||
167 | +extern char *split_at(char *, int); /* strchr() and split */ | ||
168 | +extern unsigned long dot_quad_addr(char *); /* restricted inet_addr() */ | ||
169 | |||
170 | /* Global variables. */ | ||
171 | |||
172 | +#ifdef HAVE_WEAKSYMS | ||
173 | +extern int allow_severity __attribute__ ((weak)); /* for connection logging */ | ||
174 | +extern int deny_severity __attribute__ ((weak)); /* for connection logging */ | ||
175 | +#else | ||
176 | extern int allow_severity; /* for connection logging */ | ||
177 | extern int deny_severity; /* for connection logging */ | ||
178 | +#endif | ||
179 | extern char *hosts_allow_table; /* for verification mode redirection */ | ||
180 | extern char *hosts_deny_table; /* for verification mode redirection */ | ||
181 | extern int hosts_access_verbose; /* for verbose matching mode */ | ||
182 | @@ -98,6 +114,8 @@ | ||
183 | #ifdef __STDC__ | ||
184 | extern struct request_info *request_init(struct request_info *,...); | ||
185 | extern struct request_info *request_set(struct request_info *,...); | ||
186 | +extern int hosts_ctl(char *daemon, char *client_name, char *client_addr, | ||
187 | + char *client_user); | ||
188 | #else | ||
189 | extern struct request_info *request_init(); /* initialize request */ | ||
190 | extern struct request_info *request_set(); /* update request structure */ | ||
191 | @@ -121,20 +139,23 @@ | ||
192 | * host_info structures serve as caches for the lookup results. | ||
193 | */ | ||
194 | |||
195 | -extern char *eval_user(); /* client user */ | ||
196 | -extern char *eval_hostname(); /* printable hostname */ | ||
197 | -extern char *eval_hostaddr(); /* printable host address */ | ||
198 | -extern char *eval_hostinfo(); /* host name or address */ | ||
199 | -extern char *eval_client(); /* whatever is available */ | ||
200 | -extern char *eval_server(); /* whatever is available */ | ||
201 | +extern char *eval_user(struct request_info *); /* client user */ | ||
202 | +extern char *eval_hostname(struct host_info *); /* printable hostname */ | ||
203 | +extern char *eval_hostaddr(struct host_info *); /* printable host address */ | ||
204 | +extern char *eval_hostinfo(struct host_info *); /* host name or address */ | ||
205 | +extern char *eval_client(struct request_info *);/* whatever is available */ | ||
206 | +extern char *eval_server(struct request_info *);/* whatever is available */ | ||
207 | #define eval_daemon(r) ((r)->daemon) /* daemon process name */ | ||
208 | #define eval_pid(r) ((r)->pid) /* process id */ | ||
209 | |||
210 | /* Socket-specific methods, including DNS hostname lookups. */ | ||
211 | |||
212 | -extern void sock_host(); /* look up endpoint addresses */ | ||
213 | -extern void sock_hostname(); /* translate address to hostname */ | ||
214 | -extern void sock_hostaddr(); /* address to printable address */ | ||
215 | +/* look up endpoint addresses */ | ||
216 | +extern void sock_host(struct request_info *); | ||
217 | +/* translate address to hostname */ | ||
218 | +extern void sock_hostname(struct host_info *); | ||
219 | +/* address to printable address */ | ||
220 | +extern void sock_hostaddr(struct host_info *); | ||
221 | #define sock_methods(r) \ | ||
222 | { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } | ||
223 | |||
224 | @@ -182,7 +203,7 @@ | ||
225 | * behavior. | ||
226 | */ | ||
227 | |||
228 | -extern void process_options(); /* execute options */ | ||
229 | +extern void process_options(char *, struct request_info *);/* execute options */ | ||
230 | extern int dry_run; /* verification flag */ | ||
231 | |||
232 | /* Bug workarounds. */ | ||
233 | @@ -221,3 +242,7 @@ | ||
234 | #define strtok my_strtok | ||
235 | extern char *my_strtok(); | ||
236 | #endif | ||
237 | + | ||
238 | +__END_DECLS | ||
239 | + | ||
240 | +#endif | ||
241 | diff -ruN tcp_wrappers_7.6.orig/weak_symbols.c tcp_wrappers_7.6/weak_symbols.c | ||
242 | --- tcp_wrappers_7.6.orig/weak_symbols.c 1970-01-01 01:00:00.000000000 +0100 | ||
243 | +++ tcp_wrappers_7.6/weak_symbols.c 2004-05-02 15:31:09.000000000 +0200 | ||
244 | @@ -0,0 +1,11 @@ | ||
245 | + /* | ||
246 | + * @(#) weak_symbols.h 1.5 99/12/29 23:50 | ||
247 | + * | ||
248 | + * Author: Anthony Towns <ajt@debian.org> | ||
249 | + */ | ||
250 | + | ||
251 | +#ifdef HAVE_WEAKSYMS | ||
252 | +#include <syslog.h> | ||
253 | +int deny_severity = LOG_WARNING; | ||
254 | +int allow_severity = SEVERITY; | ||
255 | +#endif | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch new file mode 100644 index 0000000000..eb5685c576 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 | ||
4 | --- tcp_wrappers_7.6.orig/hosts_access.5 2003-08-21 03:15:36.000000000 +0200 | ||
5 | +++ tcp_wrappers_7.6/hosts_access.5 2003-08-21 03:15:31.000000000 +0200 | ||
6 | @@ -90,6 +90,10 @@ | ||
7 | pattern `131.155.72.0/255.255.254.0\' matches every address in the | ||
8 | range `131.155.72.0\' through `131.155.73.255\'. | ||
9 | .IP \(bu | ||
10 | +An expression of the form `n.n.n.n/mm' is interpreted as a | ||
11 | +`net/masklength' pair, where `mm' is the number of consecutive `1' | ||
12 | +bits in the netmask applied to the `n.n.n.n' address. | ||
13 | +.IP \(bu | ||
14 | An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a | ||
15 | `[net]/prefixlen\' pair. An IPv6 host address is matched if | ||
16 | `prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the | ||
17 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c | ||
18 | --- tcp_wrappers_7.6.orig/hosts_access.c 2003-08-21 03:15:36.000000000 +0200 | ||
19 | +++ tcp_wrappers_7.6/hosts_access.c 2003-08-21 03:09:30.000000000 +0200 | ||
20 | @@ -417,7 +417,8 @@ | ||
21 | if ((addr = dot_quad_addr(string)) == INADDR_NONE) | ||
22 | return (NO); | ||
23 | if ((net = dot_quad_addr(net_tok)) == INADDR_NONE | ||
24 | - || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) { | ||
25 | + || ((mask = dot_quad_addr(mask_tok)) == INADDR_NONE | ||
26 | + && (mask = cidr_mask_addr(mask_tok)) == 0)) { | ||
27 | #ifndef INET6 | ||
28 | tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok); | ||
29 | #endif | ||
30 | diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c | ||
31 | --- tcp_wrappers_7.6.orig/misc.c 2003-08-21 03:15:36.000000000 +0200 | ||
32 | +++ tcp_wrappers_7.6/misc.c 2003-08-21 03:09:30.000000000 +0200 | ||
33 | @@ -107,3 +107,17 @@ | ||
34 | } | ||
35 | return (runs == 4 ? inet_addr(str) : INADDR_NONE); | ||
36 | } | ||
37 | + | ||
38 | +/* cidr_mask_addr - convert cidr netmask length to internal form */ | ||
39 | + | ||
40 | +unsigned long cidr_mask_addr(str) | ||
41 | +char *str; | ||
42 | +{ | ||
43 | + int maskbits; | ||
44 | + | ||
45 | + maskbits = atoi(str); | ||
46 | + if (maskbits < 1 || maskbits > 32) | ||
47 | + return (0); | ||
48 | + return htonl(0xFFFFFFFF << (32 - maskbits)); | ||
49 | +} | ||
50 | + | ||
51 | diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c | ||
52 | --- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 03:15:36.000000000 +0200 | ||
53 | +++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 03:09:30.000000000 +0200 | ||
54 | @@ -497,12 +497,12 @@ | ||
55 | int mask_len; | ||
56 | |||
57 | if ((dot_quad_addr(pat) == INADDR_NONE | ||
58 | - || dot_quad_addr(mask) == INADDR_NONE) | ||
59 | + || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0) | ||
60 | && (!is_inet6_addr(pat) | ||
61 | || ((mask_len = atoi(mask)) < 0 || mask_len > 128))) | ||
62 | #else | ||
63 | if (dot_quad_addr(pat) == INADDR_NONE | ||
64 | - || dot_quad_addr(mask) == INADDR_NONE) | ||
65 | + || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0) | ||
66 | #endif | ||
67 | tcpd_warn("%s/%s: bad net/mask pattern", pat, mask); | ||
68 | } else if (STR_EQ(pat, "FAIL")) { /* obsolete */ | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch new file mode 100644 index 0000000000..3ca6874119 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 | ||
4 | --- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-25 12:17:59.000000000 +0200 | ||
5 | +++ tcp_wrappers_7.6/hosts_access.5 2004-04-25 12:17:53.000000000 +0200 | ||
6 | @@ -89,6 +89,8 @@ | ||
7 | bitwise AND of the address and the `mask\'. For example, the net/mask | ||
8 | pattern `131.155.72.0/255.255.254.0\' matches every address in the | ||
9 | range `131.155.72.0\' through `131.155.73.255\'. | ||
10 | +`255.255.255.255\' is not a valid mask value, so a single host can be | ||
11 | +matched just by its IP. | ||
12 | .IP \(bu | ||
13 | An expression of the form `n.n.n.n/mm' is interpreted as a | ||
14 | `net/masklength' pair, where `mm' is the number of consecutive `1' | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch new file mode 100644 index 0000000000..3087377976 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/eval.c tcp_wrappers_7.6/eval.c | ||
4 | --- tcp_wrappers_7.6.orig/eval.c 1995-01-30 19:51:46.000000000 +0100 | ||
5 | +++ tcp_wrappers_7.6/eval.c 2004-11-04 13:59:01.000000000 +0100 | ||
6 | @@ -98,6 +98,28 @@ | ||
7 | } | ||
8 | } | ||
9 | |||
10 | +/* eval_port - return string with the port */ | ||
11 | +char *eval_port(saddr) | ||
12 | +#ifdef INET6 | ||
13 | +struct sockaddr *saddr; | ||
14 | +#else | ||
15 | +struct sockaddr_in *saddr; | ||
16 | +#endif | ||
17 | +{ | ||
18 | + static char port[16]; | ||
19 | + if (saddr != 0) { | ||
20 | + sprintf(port, "%u", | ||
21 | +#ifdef INET6 | ||
22 | + ntohs(((struct sockaddr_in *)saddr)->sin_port)); | ||
23 | +#else | ||
24 | + ntohs(saddr->sin_port)); | ||
25 | +#endif | ||
26 | + } else { | ||
27 | + strcpy(port, "0"); | ||
28 | + } | ||
29 | + return (port); | ||
30 | +} | ||
31 | + | ||
32 | /* eval_client - return string with as much about the client as we know */ | ||
33 | |||
34 | char *eval_client(request) | ||
35 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 | ||
36 | --- tcp_wrappers_7.6.orig/hosts_access.5 2004-11-04 13:17:45.000000000 +0100 | ||
37 | +++ tcp_wrappers_7.6/hosts_access.5 2004-11-04 13:55:32.000000000 +0100 | ||
38 | @@ -175,6 +175,8 @@ | ||
39 | unavailable. | ||
40 | .IP "%n (%N)" | ||
41 | The client (server) host name (or "unknown" or "paranoid"). | ||
42 | +.IP "%r (%R)" | ||
43 | +The clients (servers) port number (or "0"). | ||
44 | .IP %p | ||
45 | The daemon process id. | ||
46 | .IP %s | ||
47 | diff -ruN tcp_wrappers_7.6.orig/percent_x.c tcp_wrappers_7.6/percent_x.c | ||
48 | --- tcp_wrappers_7.6.orig/percent_x.c 1994-12-28 17:42:38.000000000 +0100 | ||
49 | +++ tcp_wrappers_7.6/percent_x.c 2004-11-04 13:19:29.000000000 +0100 | ||
50 | @@ -63,6 +63,8 @@ | ||
51 | ch == 'n' ? eval_hostname(request->client) : | ||
52 | ch == 'N' ? eval_hostname(request->server) : | ||
53 | ch == 'p' ? eval_pid(request) : | ||
54 | + ch == 'r' ? eval_port(request->client->sin) : | ||
55 | + ch == 'R' ? eval_port(request->server->sin) : | ||
56 | ch == 's' ? eval_server(request) : | ||
57 | ch == 'u' ? eval_user(request) : | ||
58 | ch == '%' ? "%" : (tcpd_warn("unrecognized %%%c", ch), ""); | ||
59 | diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h | ||
60 | --- tcp_wrappers_7.6.orig/tcpd.h 2004-11-04 13:17:45.000000000 +0100 | ||
61 | +++ tcp_wrappers_7.6/tcpd.h 2004-11-04 13:19:13.000000000 +0100 | ||
62 | @@ -145,6 +145,11 @@ | ||
63 | extern char *eval_hostinfo(struct host_info *); /* host name or address */ | ||
64 | extern char *eval_client(struct request_info *);/* whatever is available */ | ||
65 | extern char *eval_server(struct request_info *);/* whatever is available */ | ||
66 | +#ifdef INET6 | ||
67 | +extern char *eval_port(struct sockaddr *); | ||
68 | +#else | ||
69 | +extern char *eval_port(struct sockaddr_in *); | ||
70 | +#endif | ||
71 | #define eval_daemon(r) ((r)->daemon) /* daemon process name */ | ||
72 | #define eval_pid(r) ((r)->pid) /* process id */ | ||
73 | |||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch new file mode 100644 index 0000000000..4cc554fc38 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c | ||
4 | --- tcp_wrappers_7.6.orig/percent_m.c 1994-12-28 17:42:37.000000000 +0100 | ||
5 | +++ tcp_wrappers_7.6/percent_m.c 2003-08-21 02:45:31.000000000 +0200 | ||
6 | @@ -29,11 +29,15 @@ | ||
7 | |||
8 | while (*bp = *cp) | ||
9 | if (*cp == '%' && cp[1] == 'm') { | ||
10 | +#ifdef HAVE_STRERROR | ||
11 | + strcpy(bp, strerror(errno)); | ||
12 | +#else | ||
13 | if (errno < sys_nerr && errno > 0) { | ||
14 | strcpy(bp, sys_errlist[errno]); | ||
15 | } else { | ||
16 | sprintf(bp, "Unknown error %d", errno); | ||
17 | } | ||
18 | +#endif | ||
19 | bp += strlen(bp); | ||
20 | cp += 2; | ||
21 | } else { | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch new file mode 100644 index 0000000000..3ba214d241 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Index: tcp_wrappers_7.6.orig/Makefile | ||
4 | =================================================================== | ||
5 | --- tcp_wrappers_7.6.orig.orig/Makefile 2009-04-06 10:55:47.000000000 +0000 | ||
6 | +++ tcp_wrappers_7.6.orig/Makefile 2009-04-06 10:57:04.000000000 +0000 | ||
7 | @@ -748,31 +748,31 @@ | ||
8 | |||
9 | $(SHLIB): $(SHLIB_OBJ) | ||
10 | rm -f $(SHLIB) | ||
11 | - $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ) | ||
12 | + $(CC) $(LDFLAGS) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ) | ||
13 | ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ) | ||
14 | ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO) | ||
15 | |||
16 | tcpd: tcpd.o $(SHLIB) | ||
17 | - $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS) | ||
18 | + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ tcpd.o $(SHLIBFLAGS) | ||
19 | |||
20 | miscd: miscd.o $(LIB) | ||
21 | - $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS) | ||
22 | + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ miscd.o $(LIB) $(LIBS) | ||
23 | |||
24 | safe_finger: safe_finger.o $(SHLIB) | ||
25 | - $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS) | ||
26 | + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS) | ||
27 | |||
28 | TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o | ||
29 | |||
30 | tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB) | ||
31 | - $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS) | ||
32 | + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS) | ||
33 | |||
34 | try-from: try-from.o fakelog.o $(SHLIB) | ||
35 | - $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS) | ||
36 | + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS) | ||
37 | |||
38 | TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o | ||
39 | |||
40 | tcpdchk: $(TCPDCHK_OBJ) $(SHLIB) | ||
41 | - $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS) | ||
42 | + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS) | ||
43 | |||
44 | shar: $(KIT) | ||
45 | @shar $(KIT) | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch new file mode 100644 index 0000000000..19bd7d3c0f --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3 | ||
4 | --- tcp_wrappers_7.6.orig/hosts_access.3 2004-04-25 00:10:48.000000000 +0200 | ||
5 | +++ tcp_wrappers_7.6/hosts_access.3 2004-04-25 00:09:36.000000000 +0200 | ||
6 | @@ -14,6 +14,9 @@ | ||
7 | struct request_info *request_set(request, key, value, ..., 0) | ||
8 | struct request_info *request; | ||
9 | |||
10 | +void fromhost(request) | ||
11 | +struct request_info *request; | ||
12 | + | ||
13 | int hosts_access(request) | ||
14 | struct request_info *request; | ||
15 | |||
16 | @@ -60,6 +63,7 @@ | ||
17 | is available, host names and client user names are looked up on demand, | ||
18 | using the request structure as a cache. hosts_access() returns zero if | ||
19 | access should be denied. | ||
20 | +fromhost() must be called before hosts_access(). | ||
21 | .PP | ||
22 | hosts_ctl() is a wrapper around the request_init() and hosts_access() | ||
23 | routines with a perhaps more convenient interface (though it does not | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rename_strings_variable.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rename_strings_variable.patch new file mode 100644 index 0000000000..7650600ab5 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rename_strings_variable.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | STRINGS name conflicts with variable for strings tools (e.g. i586-oe-linux-strings) | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
6 | |||
7 | --- tcp_wrappers_7.6/Makefile.orig 2013-04-18 23:41:58.277981740 +0200 | ||
8 | +++ tcp_wrappers_7.6/Makefile 2013-04-18 23:42:42.513978966 +0200 | ||
9 | @@ -309,7 +309,7 @@ | ||
10 | pyramid: | ||
11 | @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ | ||
12 | LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="environ.o vfprintf.o" \ | ||
13 | - STRINGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \ | ||
14 | + STRINGS_FLAGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \ | ||
15 | NETGROUP="-DNETGROUP -DUSE_GETDOMAIN" TLI= all | ||
16 | |||
17 | # Untested. | ||
18 | @@ -419,7 +419,7 @@ | ||
19 | # Uncomment the following if your C library does not provide the | ||
20 | # strchr/strrchr/memcmp routines, but comes with index/rindex/bcmp. | ||
21 | # | ||
22 | -#STRINGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy | ||
23 | +#STRINGS_FLAGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy | ||
24 | |||
25 | ################################################################# | ||
26 | # System dependencies: selection of non-default object libraries. | ||
27 | @@ -690,7 +690,7 @@ | ||
28 | $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \ | ||
29 | -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ | ||
30 | -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ | ||
31 | - $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \ | ||
32 | + $(UCHAR) $(TABLES) $(STRINGS_FLAGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \ | ||
33 | $(VSYSLOG) $(HOSTNAME) | ||
34 | |||
35 | LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \ | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch new file mode 100644 index 0000000000..5875b81b2f --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c | ||
4 | --- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:40:08.000000000 +0200 | ||
5 | +++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:40:02.000000000 +0200 | ||
6 | @@ -92,6 +92,8 @@ | ||
7 | char *cp; | ||
8 | char *result = unknown; | ||
9 | FILE *fp; | ||
10 | + unsigned saved_timeout; | ||
11 | + struct sigaction nact, oact; | ||
12 | |||
13 | #ifdef INET6 | ||
14 | /* address family must be the same */ | ||
15 | @@ -134,7 +136,12 @@ | ||
16 | */ | ||
17 | |||
18 | if (setjmp(timebuf) == 0) { | ||
19 | - signal(SIGALRM, timeout); | ||
20 | + /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */ | ||
21 | + saved_timeout = alarm(0); | ||
22 | + nact.sa_handler = timeout; | ||
23 | + nact.sa_flags = 0; | ||
24 | + (void) sigemptyset(&nact.sa_mask); | ||
25 | + (void) sigaction(SIGALRM, &nact, &oact); | ||
26 | alarm(rfc931_timeout); | ||
27 | |||
28 | /* | ||
29 | @@ -223,6 +230,10 @@ | ||
30 | } | ||
31 | alarm(0); | ||
32 | } | ||
33 | + /* Restore SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */ | ||
34 | + (void) sigaction(SIGALRM, &oact, NULL); | ||
35 | + if (saved_timeout > 0) | ||
36 | + alarm(saved_timeout); | ||
37 | fclose(fp); | ||
38 | } | ||
39 | STRN_CPY(dest, result, STRING_LENGTH); | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff new file mode 100644 index 0000000000..723f4f136a --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff | |||
@@ -0,0 +1,41 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruNp tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c | ||
4 | --- tcp_wrappers_7.6.orig/scaffold.c 2005-03-09 18:22:04.000000000 +0100 | ||
5 | +++ tcp_wrappers_7.6/scaffold.c 2005-03-09 18:20:47.000000000 +0100 | ||
6 | @@ -237,10 +237,17 @@ struct request_info *request; | ||
7 | |||
8 | /* ARGSUSED */ | ||
9 | |||
10 | -void rfc931(request) | ||
11 | -struct request_info *request; | ||
12 | +void rfc931(rmt_sin, our_sin, dest) | ||
13 | +#ifdef INET6 | ||
14 | +struct sockaddr *rmt_sin; | ||
15 | +struct sockaddr *our_sin; | ||
16 | +#else | ||
17 | +struct sockaddr_in *rmt_sin; | ||
18 | +struct sockaddr_in *our_sin; | ||
19 | +#endif | ||
20 | +char *dest; | ||
21 | { | ||
22 | - strcpy(request->user, unknown); | ||
23 | + strcpy(dest, unknown); | ||
24 | } | ||
25 | |||
26 | /* check_path - examine accessibility */ | ||
27 | diff -ruNp tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h | ||
28 | --- tcp_wrappers_7.6.orig/tcpd.h 2005-03-09 18:22:04.000000000 +0100 | ||
29 | +++ tcp_wrappers_7.6/tcpd.h 2005-03-09 18:21:23.000000000 +0100 | ||
30 | @@ -83,7 +83,11 @@ extern int hosts_access(struct request_i | ||
31 | extern void shell_cmd(char *); /* execute shell command */ | ||
32 | extern char *percent_x(char *, int, char *, struct request_info *); | ||
33 | /* do %<char> expansion */ | ||
34 | +#ifdef INET6 | ||
35 | extern void rfc931(struct sockaddr *, struct sockaddr *, char *); | ||
36 | +#else | ||
37 | +extern void rfc931(struct sockaddr_in *, struct sockaddr_in *, char *); | ||
38 | +#endif | ||
39 | /* client name from RFC 931 daemon */ | ||
40 | extern void clean_exit(struct request_info *); /* clean up and exit */ | ||
41 | extern void refuse(struct request_info *); /* clean up and exit */ | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 new file mode 100644 index 0000000000..875616b9ea --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 | |||
@@ -0,0 +1,34 @@ | |||
1 | .TH SAFE_FINGER 8 "21th June 1997" Linux "Linux Programmer's Manual" | ||
2 | .SH NAME | ||
3 | safe_finger \- finger client wrapper that protects against nasty stuff | ||
4 | from finger servers | ||
5 | .SH SYNOPSIS | ||
6 | .B safe_finger [finger_options] | ||
7 | .SH DESCRIPTION | ||
8 | The | ||
9 | .B safe_finger | ||
10 | command protects against nasty stuff from finger servers. Use this | ||
11 | program for automatic reverse finger probes from the | ||
12 | .B tcp_wrapper | ||
13 | .B (tcpd) | ||
14 | , not the raw finger command. The | ||
15 | .B safe_finger | ||
16 | command makes sure that the finger client is not run with root | ||
17 | privileges. It also runs the finger client with a defined PATH | ||
18 | environment. | ||
19 | .B safe_finger | ||
20 | will also protect you from problems caused by the output of some | ||
21 | finger servers. The problem: some programs may react to stuff in | ||
22 | the first column. Other programs may get upset by thrash anywhere | ||
23 | on a line. File systems may fill up as the finger server keeps | ||
24 | sending data. Text editors may bomb out on extremely long lines. | ||
25 | The finger server may take forever because it is somehow wedged. | ||
26 | .B safe_finger | ||
27 | takes care of all this badness. | ||
28 | .SH SEE ALSO | ||
29 | .BR hosts_access (5), | ||
30 | .BR hosts_options (5), | ||
31 | .BR tcpd (8) | ||
32 | .SH AUTHOR | ||
33 | Wietse Venema, Eindhoven University of Technology, The Netherlands. | ||
34 | |||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch new file mode 100644 index 0000000000..fc2afeef15 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | --- tcp-wrappers-7.6-ipv6.1.orig/safe_finger.c | ||
4 | +++ tcp-wrappers-7.6-ipv6.1/safe_finger.c | ||
5 | @@ -26,21 +26,24 @@ | ||
6 | #include <stdio.h> | ||
7 | #include <ctype.h> | ||
8 | #include <pwd.h> | ||
9 | +#include <syslog.h> | ||
10 | |||
11 | extern void exit(); | ||
12 | |||
13 | /* Local stuff */ | ||
14 | |||
15 | -char path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin"; | ||
16 | +char path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin"; | ||
17 | |||
18 | #define TIME_LIMIT 60 /* Do not keep listinging forever */ | ||
19 | #define INPUT_LENGTH 100000 /* Do not keep listinging forever */ | ||
20 | #define LINE_LENGTH 128 /* Editors can choke on long lines */ | ||
21 | #define FINGER_PROGRAM "finger" /* Most, if not all, UNIX systems */ | ||
22 | #define UNPRIV_NAME "nobody" /* Preferred privilege level */ | ||
23 | -#define UNPRIV_UGID 32767 /* Default uid and gid */ | ||
24 | +#define UNPRIV_UGID 65534 /* Default uid and gid */ | ||
25 | |||
26 | int finger_pid; | ||
27 | +int allow_severity = SEVERITY; | ||
28 | +int deny_severity = LOG_WARNING; | ||
29 | |||
30 | void cleanup(sig) | ||
31 | int sig; | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch new file mode 100644 index 0000000000..9d7ea042b2 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | * Mon Feb 10 2003 Harald Hoyer <harald@redhat.de> 7.6-29 | ||
4 | - added security patch tcp_wrappers-7.6-sig.patch | ||
5 | |||
6 | --- tcp_wrappers_7.6/hosts_access.c.sig 2003-02-10 16:18:31.000000000 +0100 | ||
7 | +++ tcp_wrappers_7.6/hosts_access.c 2003-02-10 16:50:38.000000000 +0100 | ||
8 | @@ -66,6 +66,7 @@ | ||
9 | |||
10 | #define YES 1 | ||
11 | #define NO 0 | ||
12 | +#define ERR -1 | ||
13 | |||
14 | /* | ||
15 | * These variables are globally visible so that they can be redirected in | ||
16 | @@ -129,9 +129,9 @@ | ||
17 | return (verdict == AC_PERMIT); | ||
18 | if (table_match(hosts_allow_table, request)) | ||
19 | return (YES); | ||
20 | - if (table_match(hosts_deny_table, request)) | ||
21 | - return (NO); | ||
22 | - return (YES); | ||
23 | + if (table_match(hosts_deny_table, request) == NO) | ||
24 | + return (YES); | ||
25 | + return (NO); | ||
26 | } | ||
27 | |||
28 | /* table_match - match table entries with (daemon, client) pair */ | ||
29 | @@ -175,6 +175,7 @@ | ||
30 | (void) fclose(fp); | ||
31 | } else if (errno != ENOENT) { | ||
32 | tcpd_warn("cannot open %s: %m", table); | ||
33 | + match = ERR; | ||
34 | } | ||
35 | if (match) { | ||
36 | if (hosts_access_verbose > 1) | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch new file mode 100644 index 0000000000..76dd6340b2 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruNp tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c | ||
4 | --- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:42:25.000000000 +0200 | ||
5 | +++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:41:04.000000000 +0200 | ||
6 | @@ -33,7 +33,7 @@ static char sccsid[] = "@(#) rfc931.c 1. | ||
7 | |||
8 | int rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */ | ||
9 | |||
10 | -static jmp_buf timebuf; | ||
11 | +static sigjmp_buf timebuf; | ||
12 | |||
13 | /* fsocket - open stdio stream on top of socket */ | ||
14 | |||
15 | @@ -62,7 +62,7 @@ int protocol; | ||
16 | static void timeout(sig) | ||
17 | int sig; | ||
18 | { | ||
19 | - longjmp(timebuf, sig); | ||
20 | + siglongjmp(timebuf, sig); | ||
21 | } | ||
22 | |||
23 | /* rfc931 - return remote user name, given socket structures */ | ||
24 | @@ -135,7 +135,7 @@ char *dest; | ||
25 | * Set up a timer so we won't get stuck while waiting for the server. | ||
26 | */ | ||
27 | |||
28 | - if (setjmp(timebuf) == 0) { | ||
29 | + if (sigsetjmp(timebuf, 0) == 0) { | ||
30 | /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */ | ||
31 | saved_timeout = alarm(0); | ||
32 | nact.sa_handler = timeout; | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch new file mode 100644 index 0000000000..8e46df8e1e --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | commit 88b6984ef0bf3b703c1c851092662b95e91db1ff | ||
2 | Author: farrah rashid <farrah.rashid@windriver.com> | ||
3 | Date: Tue Feb 12 09:53:50 2013 -0500 | ||
4 | |||
5 | tcp-wrappers Support for building with glibc | ||
6 | |||
7 | Added support for socklen_t type to len argument passed to socket related | ||
8 | calls. This fixes a bug that causes tcp wrappers to fail when using sshd. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: farrah rashid <farrah.rashid@windriver.com> | ||
13 | |||
14 | diff --git a/fix_options.c b/fix_options.c | ||
15 | index 7473adf..fe2b442 100644 | ||
16 | --- a/fix_options.c | ||
17 | +++ b/fix_options.c | ||
18 | @@ -38,7 +38,12 @@ struct request_info *request; | ||
19 | #ifdef IP_OPTIONS | ||
20 | unsigned char optbuf[BUFFER_SIZE / 3], *cp; | ||
21 | char lbuf[BUFFER_SIZE], *lp; | ||
22 | - int optsize = sizeof(optbuf), ipproto; | ||
23 | +#ifdef __GLIBC__ | ||
24 | + socklen_t optsize = sizeof(optbuf); | ||
25 | +#else | ||
26 | + int optsize = sizeof(optbuf); | ||
27 | +#endif | ||
28 | + int ipproto; | ||
29 | struct protoent *ip; | ||
30 | int fd = request->fd; | ||
31 | unsigned int opt; | ||
32 | diff --git a/socket.c b/socket.c | ||
33 | index 4b2c575..a0d2987 100644 | ||
34 | --- a/socket.c | ||
35 | +++ b/socket.c | ||
36 | @@ -95,7 +95,11 @@ struct request_info *request; | ||
37 | static struct sockaddr_in client; | ||
38 | static struct sockaddr_in server; | ||
39 | #endif | ||
40 | +#ifdef __GLIBC__ | ||
41 | + socklen_t len; | ||
42 | +#else | ||
43 | int len; | ||
44 | +#endif | ||
45 | char buf[BUFSIZ]; | ||
46 | int fd = request->fd; | ||
47 | |||
48 | @@ -426,7 +430,11 @@ int fd; | ||
49 | #else | ||
50 | struct sockaddr_in sin; | ||
51 | #endif | ||
52 | +#ifdef __GLIBC__ | ||
53 | + socklen_t size = sizeof(sin); | ||
54 | +#else | ||
55 | int size = sizeof(sin); | ||
56 | +#endif | ||
57 | |||
58 | /* | ||
59 | * Eat up the not-yet received datagram. Some systems insist on a | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch new file mode 100644 index 0000000000..be29bdcfaa --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c | ||
4 | --- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 02:50:37.000000000 +0200 | ||
5 | +++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 02:50:33.000000000 +0200 | ||
6 | @@ -53,6 +53,24 @@ | ||
7 | #include "inetcf.h" | ||
8 | #include "scaffold.h" | ||
9 | |||
10 | +/* list of programs which are known to be linked with libwrap in debian */ | ||
11 | +static const char *const libwrap_programs[] = { | ||
12 | + "portmap", "mountd", "statd", "ugidd", | ||
13 | + "redir", "rlinetd", | ||
14 | + "sshd", | ||
15 | + "atftpd", | ||
16 | + "diald", | ||
17 | + "esound", | ||
18 | + "gdm", "gnome-session", | ||
19 | + "icecast", "icecast_admin", "icecast_client", "icecast_source", | ||
20 | + "mysqld", | ||
21 | + "ntop", | ||
22 | + "pptpd", | ||
23 | + "rquotad", | ||
24 | + "sendmail", "smail", | ||
25 | + NULL | ||
26 | +}; | ||
27 | + | ||
28 | /* | ||
29 | * Stolen from hosts_access.c... | ||
30 | */ | ||
31 | @@ -147,8 +165,8 @@ | ||
32 | /* | ||
33 | * These are not run from inetd but may have built-in access control. | ||
34 | */ | ||
35 | - inet_set("portmap", WR_NOT); | ||
36 | - inet_set("rpcbind", WR_NOT); | ||
37 | + for (c = 0; libwrap_programs[c]; c++) | ||
38 | + inet_set(libwrap_programs[c], WR_YES); | ||
39 | |||
40 | /* | ||
41 | * Check accessibility of access control files. | ||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8 b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8 new file mode 100644 index 0000000000..9c8f30543e --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8 | |||
@@ -0,0 +1,28 @@ | |||
1 | .TH TRY-FROM 8 "21th June 1997" Linux "Linux Programmer's Manual" | ||
2 | .SH NAME | ||
3 | try-from \- test program for the tcp_wrapper | ||
4 | .SH SYNOPSIS | ||
5 | .B try-from | ||
6 | .SH DESCRIPTION | ||
7 | The | ||
8 | .B try-from | ||
9 | command can be called via a remote shell command to find out | ||
10 | if the hostname and address are properly recognized | ||
11 | by the | ||
12 | .B tcp_wrapper | ||
13 | library, if username lookup works, and (SysV only) if the TLI | ||
14 | on top of IP heuristics work. Diagnostics are reported through | ||
15 | .BR syslog (3) | ||
16 | and redirected to stderr. | ||
17 | |||
18 | Example: | ||
19 | |||
20 | rsh host /some/where/try-from | ||
21 | |||
22 | .SH SEE ALSO | ||
23 | .BR hosts_access (5), | ||
24 | .BR hosts_options (5), | ||
25 | .BR tcpd (8) | ||
26 | .SH AUTHOR | ||
27 | Wietse Venema, Eindhoven University of Technology, The Netherlands. | ||
28 | |||
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb new file mode 100644 index 0000000000..4d6430634e --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb | |||
@@ -0,0 +1,128 @@ | |||
1 | SUMMARY = "Security tool that is a wrapper for TCP daemons" | ||
2 | DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \ | ||
3 | services." | ||
4 | SECTION = "console/network" | ||
5 | |||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" | ||
8 | PR ="r10" | ||
9 | |||
10 | |||
11 | PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" | ||
12 | FILES_libwrap = "${base_libdir}/lib*${SOLIBS}" | ||
13 | FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5" | ||
14 | FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}" | ||
15 | FILES_libwrap-staticdev = "${libdir}/lib*.a" | ||
16 | FILES_${PN} = "${sbindir}" | ||
17 | FILES_${PN}-doc = "${mandir}/man8" | ||
18 | |||
19 | SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ | ||
20 | file://00_man_quoting.diff \ | ||
21 | file://01_man_portability.patch \ | ||
22 | file://05_wildcard_matching.patch \ | ||
23 | file://06_fix_gethostbyname.patch \ | ||
24 | file://10_usagi-ipv6.patch \ | ||
25 | file://11_tcpd_blacklist.patch \ | ||
26 | file://11_usagi_fix.patch \ | ||
27 | file://12_makefile_config.patch \ | ||
28 | file://13_shlib_weaksym.patch \ | ||
29 | file://14_cidr_support.patch \ | ||
30 | file://15_match_clarify.patch \ | ||
31 | file://expand_remote_port.patch \ | ||
32 | file://have_strerror.patch \ | ||
33 | file://man_fromhost.patch \ | ||
34 | file://restore_sigalarm.patch \ | ||
35 | file://rfc931.diff \ | ||
36 | file://safe_finger.patch \ | ||
37 | file://sig_fix.patch \ | ||
38 | file://siglongjmp.patch \ | ||
39 | file://socklen_t.patch \ | ||
40 | file://tcpdchk_libwrapped.patch \ | ||
41 | file://ldflags.patch \ | ||
42 | file://rename_strings_variable.patch \ | ||
43 | \ | ||
44 | file://try-from.8 \ | ||
45 | file://safe_finger.8" | ||
46 | |||
47 | SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a" | ||
48 | SRC_URI[sha256sum] = "9543d7adedf78a6de0b221ccbbd1952e08b5138717f4ade814039bb489a4315d" | ||
49 | |||
50 | S = "${WORKDIR}/tcp_wrappers_${PV}" | ||
51 | |||
52 | PARALLEL_MAKE = "" | ||
53 | EXTRA_OEMAKE = "'CC=${CC}' \ | ||
54 | 'AR=${AR}' \ | ||
55 | 'RANLIB=${RANLIB}' \ | ||
56 | 'REAL_DAEMON_DIR=${sbindir}' \ | ||
57 | 'STYLE=-DPROCESS_OPTIONS' \ | ||
58 | 'FACILITY=LOG_DAEMON' \ | ||
59 | 'SEVERITY=LOG_INFO' \ | ||
60 | 'BUGS=' \ | ||
61 | 'VSYSLOG=' \ | ||
62 | 'RFC931_TIMEOUT=10' \ | ||
63 | 'ACCESS=-DHOSTS_ACCESS' \ | ||
64 | 'KILL_OPT=-DKILL_IP_OPTIONS' \ | ||
65 | 'UMASK=-DDAEMON_UMASK=022' \ | ||
66 | 'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \ | ||
67 | 'LIBS=-lnsl' \ | ||
68 | 'ARFLAGS=rv' \ | ||
69 | 'AUX_OBJ=weak_symbols.o' \ | ||
70 | 'TLI=' \ | ||
71 | 'COPTS=' \ | ||
72 | 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'" | ||
73 | |||
74 | EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN" | ||
75 | EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN" | ||
76 | |||
77 | do_compile () { | ||
78 | oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \ | ||
79 | all | ||
80 | } | ||
81 | |||
82 | BINS = "safe_finger tcpd tcpdchk try-from tcpdmatch" | ||
83 | MANS3 = "hosts_access" | ||
84 | MANS5 = "hosts_options" | ||
85 | MANS8 = "tcpd tcpdchk tcpdmatch" | ||
86 | do_install () { | ||
87 | oe_libinstall -a libwrap ${D}${libdir} | ||
88 | oe_libinstall -C shared -so libwrap ${D}${base_libdir} | ||
89 | |||
90 | if [ "${libdir}" != "${base_libdir}" ] ; then | ||
91 | rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'` | ||
92 | libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename` | ||
93 | ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so | ||
94 | rm -f ${D}${base_libdir}/libwrap.so | ||
95 | fi | ||
96 | |||
97 | install -d ${D}${sbindir} | ||
98 | for b in ${BINS}; do | ||
99 | install -m 0755 $b ${D}${sbindir}/ || exit 1 | ||
100 | done | ||
101 | |||
102 | install -d ${D}${mandir}/man3 | ||
103 | for m in ${MANS3}; do | ||
104 | install -m 0644 $m.3 ${D}${mandir}/man3/ || exit 1 | ||
105 | done | ||
106 | |||
107 | install -d ${D}${mandir}/man5 | ||
108 | for m in ${MANS5}; do | ||
109 | install -m 0644 $m.5 ${D}${mandir}/man5/ || exit 1 | ||
110 | done | ||
111 | |||
112 | install -d ${D}${mandir}/man8 | ||
113 | for m in ${MANS8}; do | ||
114 | install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1 | ||
115 | done | ||
116 | |||
117 | install -m 0644 ${WORKDIR}/try-from.8 ${D}${mandir}/man8/ | ||
118 | install -m 0644 ${WORKDIR}/safe_finger.8 ${D}${mandir}/man8/ | ||
119 | |||
120 | install -d ${D}${includedir} | ||
121 | install -m 0644 tcpd.h ${D}${includedir}/ | ||
122 | |||
123 | install -d ${D}${sysconfdir} | ||
124 | touch ${D}${sysconfdir}/hosts.allow | ||
125 | touch ${D}${sysconfdir}/hosts.deny | ||
126 | } | ||
127 | |||
128 | FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny" | ||
diff --git a/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch b/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch new file mode 100644 index 0000000000..d1c9fe5746 --- /dev/null +++ b/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | |||
2 | Upstream-Status: Inappropriate [configuration] | ||
3 | |||
4 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
5 | |||
6 | Index: texi2html-5.0/po_document/Makefile.in.in | ||
7 | =================================================================== | ||
8 | --- texi2html-5.0.orig/po_document/Makefile.in.in | ||
9 | +++ texi2html-5.0/po_document/Makefile.in.in | ||
10 | @@ -9,7 +9,7 @@ | ||
11 | # General Public License and is *not* in the public domain. | ||
12 | # | ||
13 | # Origin: gettext-0.17 | ||
14 | -GETTEXT_MACRO_VERSION = 0.17 | ||
15 | +GETTEXT_MACRO_VERSION = 0.18 | ||
16 | |||
17 | PACKAGE = @PACKAGE@ | ||
18 | VERSION = @VERSION@ | ||
19 | Index: texi2html-5.0/po_messages/Makefile.in.in | ||
20 | =================================================================== | ||
21 | --- texi2html-5.0.orig/po_messages/Makefile.in.in | ||
22 | +++ texi2html-5.0/po_messages/Makefile.in.in | ||
23 | @@ -9,7 +9,7 @@ | ||
24 | # General Public License and is *not* in the public domain. | ||
25 | # | ||
26 | # Origin: gettext-0.17 | ||
27 | -GETTEXT_MACRO_VERSION = 0.17 | ||
28 | +GETTEXT_MACRO_VERSION = 0.18 | ||
29 | |||
30 | PACKAGE = @PACKAGE@ | ||
31 | VERSION = @VERSION@ | ||
diff --git a/meta/recipes-extended/texi2html/texi2html_5.0.bb b/meta/recipes-extended/texi2html/texi2html_5.0.bb new file mode 100644 index 0000000000..aa5f1fddaf --- /dev/null +++ b/meta/recipes-extended/texi2html/texi2html_5.0.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | SUMMARY = "Perl script that converts Texinfo to HTML" | ||
2 | HOMEPAGE = "http://www.nongnu.org/texi2html/" | ||
3 | SECTION = "console/utils" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
6 | |||
7 | PR = "r2" | ||
8 | |||
9 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/texi2html/${BPN}-${PV}.tar.bz2 \ | ||
10 | file://fix_gettext_version.patch" | ||
11 | |||
12 | SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54" | ||
13 | SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89d9f9fa" | ||
14 | |||
15 | inherit autotools gettext texinfo | ||
16 | |||
17 | do_configure_prepend() { | ||
18 | # Make a directory for the old gettext setup | ||
19 | if [ ! -d ${S}/po ]; then | ||
20 | mkdir ${S}/po | ||
21 | fi | ||
22 | } | ||
23 | |||
24 | do_configure_append() { | ||
25 | # Clean up the phony po directory | ||
26 | rm -rf ${S}/po | ||
27 | } | ||
28 | |||
29 | do_install_append () { | ||
30 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2html | ||
31 | } | ||
32 | |||
33 | FILES_${PN}-doc += "${datadir}/texinfo" | ||
diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb new file mode 100644 index 0000000000..b5420a3e5f --- /dev/null +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | DESCRIPTION = "Fake version of the texinfo utility suite" | ||
2 | SECTION = "console/utils" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d6bb62e73ca8b901d3f2e9d71542f4bb" | ||
5 | DEPENDS = "" | ||
6 | PV = "1.0" | ||
7 | |||
8 | SRC_URI = "file://template.py file://COPYING" | ||
9 | |||
10 | S = "${WORKDIR}" | ||
11 | |||
12 | NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" | ||
13 | |||
14 | inherit native | ||
15 | |||
16 | do_install_name() { | ||
17 | FILENAME="${D}${bindir}/$1" | ||
18 | # Using ln causes problems with rm_work | ||
19 | cp -T "${S}/template.py" "$FILENAME" | ||
20 | chmod +x $FILENAME | ||
21 | } | ||
22 | |||
23 | do_install() { | ||
24 | mkdir -p "${D}${bindir}" | ||
25 | for i in makeinfo pod2texi texi2dvi pdftexi2dvi texindex texi2pdf \ | ||
26 | txixml2texi texi2any install-info ginstall-info \ | ||
27 | update-info-dir; do | ||
28 | do_install_name $i | ||
29 | done | ||
30 | } | ||
diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/COPYING b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/COPYING new file mode 100644 index 0000000000..531cbe723d --- /dev/null +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/COPYING | |||
@@ -0,0 +1,19 @@ | |||
1 | Copyright (c) 2014 Intel Corp. | ||
2 | |||
3 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
4 | of this software and associated documentation files (the "Software"), to deal | ||
5 | in the Software without restriction, including without limitation the rights | ||
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
7 | copies of the Software, and to permit persons to whom the Software is | ||
8 | furnished to do so, subject to the following conditions: | ||
9 | |||
10 | The above copyright notice and this permission notice shall be included in | ||
11 | all copies or substantial portions of the Software. | ||
12 | |||
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
19 | THE SOFTWARE. | ||
diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py new file mode 100644 index 0000000000..8b7033eccc --- /dev/null +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py | |||
@@ -0,0 +1,122 @@ | |||
1 | #! /usr/bin/env python2.7 | ||
2 | |||
3 | # template.py (and other filenames) | ||
4 | # By Max Eliaser (max.eliaser@intel.com) | ||
5 | |||
6 | # Copyright (c) 2014 Intel Corp. | ||
7 | |||
8 | # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
9 | # of this software and associated documentation files (the "Software"), to deal | ||
10 | # in the Software without restriction, including without limitation the rights | ||
11 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
12 | # copies of the Software, and to permit persons to whom the Software is | ||
13 | # furnished to do so, subject to the following conditions: | ||
14 | |||
15 | # The above copyright notice and this permission notice shall be included in | ||
16 | # all copies or substantial portions of the Software. | ||
17 | |||
18 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
19 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
20 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
21 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
22 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
23 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
24 | # THE SOFTWARE. | ||
25 | |||
26 | # This program acts like a dummy version of the texinfo utilities, creating | ||
27 | # the right output files but leaving them blank. It will parse out the name | ||
28 | # of the executable from argv[0] and emulate the corresponding program, so | ||
29 | # multiple copies of this script will exist under different names. | ||
30 | |||
31 | import sys, os | ||
32 | |||
33 | olong = "--output=" | ||
34 | Elong = "--macro-expand=" | ||
35 | |||
36 | |||
37 | this_binary = sys.argv[0].split ("/")[-1] | ||
38 | |||
39 | # To be outputted if functionality that hasn't been stubbed yet is invoked. | ||
40 | stub_msg = """ | ||
41 | This stand-in version of %s is not yet fully capable of emulating the real | ||
42 | version from the GNU texinfo suite. If you see this message, file a bug report | ||
43 | with details on the recipe that failed. | ||
44 | """ % this_binary | ||
45 | |||
46 | # Autotools setups query the version, so this is actually necessary. Some of | ||
47 | # them (lookin' at you, glibc) actually look for the substring "GNU texinfo," | ||
48 | # so we put that substring in there without actually telling a lie. | ||
49 | version_str = """ %s (fake texinfo, emulating GNU texinfo) 5.2 | ||
50 | |||
51 | Super amazing version which is totally not fake in any way whatsoever. | ||
52 | Copyright (C) 2014 Intel Corp. Distributed under the terms of the MIT | ||
53 | license. | ||
54 | """ % this_binary | ||
55 | |||
56 | simple_binaries = "pod2texi texi2dvi pdftexi2dvi texindex texi2pdf \ | ||
57 | txixml2texi install-info ginstall-info \ | ||
58 | update-info-dir".split () | ||
59 | |||
60 | # These utilities use a slightly different set of options and flags. | ||
61 | complex_binaries = "makeinfo texi2any".split () | ||
62 | |||
63 | valid_binaries = simple_binaries + complex_binaries | ||
64 | |||
65 | # For generating blank output files. | ||
66 | def touch_file (path): | ||
67 | f = open (path, "w") | ||
68 | f.close () | ||
69 | |||
70 | assert this_binary in valid_binaries, \ | ||
71 | this_binary + " is not one of " + ', '.join (valid_binaries) | ||
72 | |||
73 | if "--version" in sys.argv: | ||
74 | print version_str | ||
75 | sys.exit (0) | ||
76 | |||
77 | # For debugging | ||
78 | log_interceptions = False | ||
79 | if log_interceptions: | ||
80 | f = open ("/tmp/intercepted_" + this_binary, "a") | ||
81 | f.write (' '.join ([this_binary] + sys.argv[1:]) + '\n') | ||
82 | f.close () | ||
83 | |||
84 | # Look through the options and flags, and if necessary, touch any output | ||
85 | # files. | ||
86 | arg_idx = 1 | ||
87 | while arg_idx < len (sys.argv): | ||
88 | arg = sys.argv [arg_idx] | ||
89 | |||
90 | if arg == "--": | ||
91 | break | ||
92 | |||
93 | # Something like -I . can result in a need for this (specifically the .) | ||
94 | elif len (arg) < 2: | ||
95 | pass | ||
96 | |||
97 | # Check if -o or --output is specified. These can be used at most once. | ||
98 | elif arg[0] == '-' and arg[1] != '-' and arg[len (arg) - 1] == 'o': | ||
99 | touch_file (sys.argv[arg_idx + 1]) | ||
100 | sys.exit (0) | ||
101 | elif arg.startswith (olong): | ||
102 | touch_file (arg.split ("=")[1]) | ||
103 | sys.exit (0) | ||
104 | |||
105 | # Check for functionality that isn't implemented yet. | ||
106 | else: | ||
107 | assert arg[0] != '-' or arg[1] == '-' or 'E' not in arg or \ | ||
108 | this_binary in simple_binaries, \ | ||
109 | "-E option not yet supported" + stub_msg | ||
110 | |||
111 | assert not arg.startswith (Elong), \ | ||
112 | Elong[:-1] + " option not yet supported" + stub_msg | ||
113 | |||
114 | arg_idx += 1 | ||
115 | |||
116 | # The -o/--output option overrides the default. For makeinfo and texi2any, | ||
117 | # that default is to look for a @setfilename command in the input file. | ||
118 | # Otherwise, printing nothing to stdout and then exiting should suffice. | ||
119 | assert this_binary in simple_binaries, \ | ||
120 | "Don't know how to get default output file name from input file!" + \ | ||
121 | stub_msg | ||
122 | |||
diff --git a/meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch b/meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch new file mode 100644 index 0000000000..ab6f1658aa --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | We already DEPEND on the native texinfo being present before building so | ||
2 | there isn't any need to try and build the required native texinfo binaries | ||
3 | before cross-compiling. This simplifies the recipe somewhat! | ||
4 | |||
5 | Upstream-Status: Inappropriate oe specific | ||
6 | |||
7 | Signed-off-by: Joshua Lock <josh@linux.intel.com> | ||
8 | |||
9 | Index: texinfo-4.13/configure.ac | ||
10 | =================================================================== | ||
11 | --- texinfo-4.13.orig/configure.ac | ||
12 | +++ texinfo-4.13/configure.ac | ||
13 | @@ -100,29 +100,7 @@ AC_CANONICAL_BUILD | ||
14 | # $native_tools is also added to SUBDIRS in the main Makefile.am, | ||
15 | # so that make compiles the native tools first. | ||
16 | # | ||
17 | -if test "$cross_compiling" = no; then | ||
18 | - native_tools= | ||
19 | -else | ||
20 | - native_tools=tools | ||
21 | - test -d "$native_tools" || mkdir "$native_tools" | ||
22 | - confdir=`(cd "$srcdir";pwd)` | ||
23 | - # Make sure the secondary configure won't fail with | ||
24 | - # "error: source directory already configured". | ||
25 | - rm -f config.status | ||
26 | - AC_MSG_NOTICE([[Doing configure of native tools (${build}).]]) | ||
27 | - cd "$native_tools" || exit 1 | ||
28 | - # Run secondary configure in alternate environment or | ||
29 | - # it gets the wrong CC etc. | ||
30 | - # env -i gives this build host configure a clean environment; | ||
31 | - # consequently, we have to re-initialize $PATH. | ||
32 | - env -i CC="$BUILD_CC" AR="$BUILD_AR" RANLIB="$BUILD_RANLIB" \ | ||
33 | - PATH="$PATH" \ | ||
34 | - tools_only=1 \ | ||
35 | - ${confdir}/configure --build=${build} --host=${build} \ | ||
36 | - --disable-rpath --disable-nls | ||
37 | - cd .. || exit 1 | ||
38 | - AC_MSG_NOTICE([[Continuing with main configure (${host}).]]) | ||
39 | -fi | ||
40 | +native_tools= | ||
41 | AC_SUBST(native_tools) | ||
42 | AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]]) | ||
43 | |||
diff --git a/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch b/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch new file mode 100644 index 0000000000..6e216dac78 --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | Upstream-Status: Inappropŕiate | ||
2 | |||
3 | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> | ||
4 | diff -Nurd texinfo-5.1/doc/Makefile.am texinfo-5.1/doc/Makefile.am | ||
5 | --- texinfo-5.1/doc/Makefile.am 2013-02-23 02:11:25.000000000 +0200 | ||
6 | +++ texinfo-5.1/doc/Makefile.am 2013-08-20 01:43:55.622376198 +0300 | ||
7 | @@ -40,7 +40,7 @@ | ||
8 | # Include our texinfo.tex, not Automake's. | ||
9 | EXTRA_DIST = epsf.tex texinfo.tex \ | ||
10 | fdl.texi \ | ||
11 | - $(man_MANS) $(TXI_XLATE) \ | ||
12 | + $(TXI_XLATE) \ | ||
13 | $(refcard_files) | ||
14 | |||
15 | if INSTALL_WARNINGS | ||
16 | diff -Nurd texinfo-5.1/man/Makefile.am texinfo-5.1/man/Makefile.am | ||
17 | --- texinfo-5.1/man/Makefile.am 2013-02-23 02:11:25.000000000 +0200 | ||
18 | +++ texinfo-5.1/man/Makefile.am 2013-08-20 01:53:40.542395884 +0300 | ||
19 | @@ -13,24 +13,24 @@ | ||
20 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
21 | |||
22 | # These are generated using help2man. | ||
23 | -man_MANS = install-info.1 makeinfo.1 texindex.1 texi2dvi.1 | ||
24 | +#man_MANS = install-info.1 makeinfo.1 texindex.1 texi2dvi.1 | ||
25 | |||
26 | # These require the build in info/, thus can't do if we failed to find a | ||
27 | # terminal library. | ||
28 | if HAVE_TERMLIBS | ||
29 | -man_MANS += info.1 infokey.1 | ||
30 | +#man_MANS += info.1 infokey.1 | ||
31 | endif | ||
32 | |||
33 | # These are hand-written. | ||
34 | -man_MANS += info.5 texinfo.5 | ||
35 | +#man_MANS += info.5 texinfo.5 | ||
36 | |||
37 | # This is generated by pod2man, but let's just run it by hand. | ||
38 | -man_MANS += pod2texi.1 | ||
39 | +#man_MANS += pod2texi.1 | ||
40 | |||
41 | # These are just .so's to the common program. | ||
42 | -man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1 | ||
43 | +#man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1 | ||
44 | |||
45 | -EXTRA_DIST = $(man_MANS) ginfo.h2m | ||
46 | +EXTRA_DIST = ginfo.h2m | ||
47 | |||
48 | # Maintainers should be able to regenerate. | ||
49 | MAINTAINERCLEANFILES = $(man_MANS) | ||
diff --git a/meta/recipes-extended/texinfo/texinfo/enumerate_greater_than_ten.patch b/meta/recipes-extended/texinfo/texinfo/enumerate_greater_than_ten.patch new file mode 100644 index 0000000000..ef69143bf3 --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo/enumerate_greater_than_ten.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 0e70072ce655a0d053bb7433083ced5e6eac74d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Thu, 15 Aug 2013 23:49:47 -0700 | ||
4 | Subject: [PATCH] handle correctly @enumerate specification greater than 10 | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | Revision: 5270 | ||
9 | http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5270 | ||
10 | Author: pertusus | ||
11 | Date: 2013-07-29 20:02:23 +0000 (Mon, 29 Jul 2013) | ||
12 | Log Message: | ||
13 | ----------- | ||
14 | * tp/Common.pm (enumerate_item_representation), Texinfo/Parser.pm: | ||
15 | handle correctly @enumerate specification greater than 10. Report | ||
16 | from Dmitry Shachnev. | ||
17 | |||
18 | --- | ||
19 | tp/Texinfo/Common.pm | 2 +- | ||
20 | tp/Texinfo/Parser.pm | 2 +- | ||
21 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm | ||
24 | index 8aee9f7..bdffeee 100644 | ||
25 | --- a/tp/Texinfo/Common.pm | ||
26 | +++ b/tp/Texinfo/Common.pm | ||
27 | @@ -1382,7 +1382,7 @@ sub enumerate_item_representation($$) | ||
28 | my $specification = shift; | ||
29 | my $number = shift; | ||
30 | |||
31 | - if ($specification =~ /^[0-9]$/) { | ||
32 | + if ($specification =~ /^[0-9]+$/) { | ||
33 | return $specification + $number -1; | ||
34 | } | ||
35 | |||
36 | diff --git a/tp/Texinfo/Parser.pm b/tp/Texinfo/Parser.pm | ||
37 | index cf8fa72..8e845e9 100644 | ||
38 | --- a/tp/Texinfo/Parser.pm | ||
39 | +++ b/tp/Texinfo/Parser.pm | ||
40 | @@ -2973,7 +2973,7 @@ sub _end_line($$$) | ||
41 | $current->{'cmdname'}); | ||
42 | } | ||
43 | my $arg = $current->{'extra'}->{'block_command_line_contents'}->[0]->[0]; | ||
44 | - if (!defined($arg->{'text'}) or $arg->{'text'} !~ /^[[:alnum:]]$/) { | ||
45 | + if (!defined($arg->{'text'}) or $arg->{'text'} !~ /^(([[:digit:]]+)|([[:alpha:]]+))$/) { | ||
46 | $self->_command_error($current, $line_nr, | ||
47 | $self->__("bad argument to \@%s"), | ||
48 | $current->{'cmdname'}); | ||
49 | -- | ||
50 | 1.7.1 | ||
51 | |||
diff --git a/meta/recipes-extended/texinfo/texinfo/link-zip.patch b/meta/recipes-extended/texinfo/texinfo/link-zip.patch new file mode 100644 index 0000000000..0b6e9fd7ea --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo/link-zip.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | install-info uses symbols from zlib so must link against it. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Joshua Lock <josh@linux.intel.com> | ||
6 | |||
7 | Index: texinfo-5.1/install-info/Makefile.am | ||
8 | =================================================================== | ||
9 | --- texinfo-5.1.orig/install-info/Makefile.am | ||
10 | +++ texinfo-5.1/install-info/Makefile.am | ||
11 | @@ -34,4 +34,4 @@ AM_CPPFLAGS = \ | ||
12 | -I$(top_srcdir)/gnulib/lib \ | ||
13 | -I$(top_builddir)/gnulib/lib \ | ||
14 | -DLOCALEDIR=\"$(localedir)\" | ||
15 | -LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) | ||
16 | +LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) -lz | ||
diff --git a/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch b/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch new file mode 100644 index 0000000000..bebcbdf8da --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch | |||
@@ -0,0 +1,187 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Index: texinfo-5.1/install-info/Makefile.in | ||
4 | =================================================================== | ||
5 | --- texinfo-5.1.orig/install-info/Makefile.in | ||
6 | +++ texinfo-5.1/install-info/Makefile.in | ||
7 | @@ -171,7 +171,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" | ||
8 | PROGRAMS = $(bin_PROGRAMS) | ||
9 | am_ginstall_info_OBJECTS = install-info.$(OBJEXT) | ||
10 | ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS) | ||
11 | -ginstall_info_LDADD = $(LDADD) | ||
12 | +ginstall_info_LDADD = $(LDADD) -lz | ||
13 | am__DEPENDENCIES_1 = | ||
14 | ginstall_info_DEPENDENCIES = $(top_builddir)/gnulib/lib/libgnu.a \ | ||
15 | $(am__DEPENDENCIES_1) | ||
16 | Index: texinfo-5.1/install-info/install-info.c | ||
17 | =================================================================== | ||
18 | --- texinfo-5.1.orig/install-info/install-info.c | ||
19 | +++ texinfo-5.1/install-info/install-info.c | ||
20 | @@ -22,6 +22,7 @@ | ||
21 | #include <getopt.h> | ||
22 | #include <regex.h> | ||
23 | #include <argz.h> | ||
24 | +#include <zlib.h> | ||
25 | |||
26 | #define TAB_WIDTH 8 | ||
27 | |||
28 | @@ -670,7 +671,7 @@ The first time you invoke Info you start | ||
29 | |||
30 | MAGIC number, not the filename. */ | ||
31 | |||
32 | -FILE * | ||
33 | +void * | ||
34 | open_possibly_compressed_file (char *filename, | ||
35 | void (*create_callback) (char *), | ||
36 | char **opened_filename, char **compression_program, int *is_pipe) | ||
37 | @@ -678,7 +679,7 @@ open_possibly_compressed_file (char *fil | ||
38 | char *local_opened_filename, *local_compression_program; | ||
39 | int nread; | ||
40 | char data[13]; | ||
41 | - FILE *f; | ||
42 | + gzFile *f; | ||
43 | |||
44 | /* We let them pass NULL if they don't want this info, but it's easier | ||
45 | to always determine it. */ | ||
46 | @@ -686,48 +687,48 @@ open_possibly_compressed_file (char *fil | ||
47 | opened_filename = &local_opened_filename; | ||
48 | |||
49 | *opened_filename = filename; | ||
50 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
51 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
52 | if (!f) | ||
53 | { | ||
54 | *opened_filename = concat (filename, ".gz", ""); | ||
55 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
56 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
57 | } | ||
58 | if (!f) | ||
59 | { | ||
60 | free (*opened_filename); | ||
61 | *opened_filename = concat (filename, ".xz", ""); | ||
62 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
63 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
64 | } | ||
65 | if (!f) | ||
66 | { | ||
67 | free (*opened_filename); | ||
68 | *opened_filename = concat (filename, ".bz2", ""); | ||
69 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
70 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
71 | } | ||
72 | if (!f) | ||
73 | { | ||
74 | free (*opened_filename); | ||
75 | *opened_filename = concat (filename, ".lz", ""); | ||
76 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
77 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
78 | } | ||
79 | if (!f) | ||
80 | { | ||
81 | free (*opened_filename); | ||
82 | *opened_filename = concat (filename, ".lzma", ""); | ||
83 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
84 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
85 | } | ||
86 | #ifdef __MSDOS__ | ||
87 | if (!f) | ||
88 | { | ||
89 | free (*opened_filename); | ||
90 | *opened_filename = concat (filename, ".igz", ""); | ||
91 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
92 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
93 | } | ||
94 | if (!f) | ||
95 | { | ||
96 | free (*opened_filename); | ||
97 | *opened_filename = concat (filename, ".inz", ""); | ||
98 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
99 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
100 | } | ||
101 | #endif /* __MSDOS__ */ | ||
102 | if (!f) | ||
103 | @@ -739,7 +740,7 @@ open_possibly_compressed_file (char *fil | ||
104 | /* And try opening it again. */ | ||
105 | free (*opened_filename); | ||
106 | *opened_filename = filename; | ||
107 | - f = fopen (*opened_filename, FOPEN_RBIN); | ||
108 | + f = gzopen (*opened_filename, FOPEN_RBIN); | ||
109 | if (!f) | ||
110 | pfatal_with_name (filename); | ||
111 | } | ||
112 | @@ -749,12 +750,12 @@ open_possibly_compressed_file (char *fil | ||
113 | |||
114 | /* Read first few bytes of file rather than relying on the filename. | ||
115 | If the file is shorter than this it can't be usable anyway. */ | ||
116 | - nread = fread (data, sizeof (data), 1, f); | ||
117 | - if (nread != 1) | ||
118 | + nread = gzread (f, data, sizeof (data)); | ||
119 | + if (nread != sizeof (data)) | ||
120 | { | ||
121 | /* Empty files don't set errno, so we get something like | ||
122 | "install-info: No error for foo", which is confusing. */ | ||
123 | - if (nread == 0) | ||
124 | + if (nread >= 0) | ||
125 | fatal (_("%s: empty file"), *opened_filename); | ||
126 | pfatal_with_name (*opened_filename); | ||
127 | } | ||
128 | @@ -821,20 +822,22 @@ open_possibly_compressed_file (char *fil | ||
129 | |||
130 | if (*compression_program) | ||
131 | { /* It's compressed, so fclose the file and then open a pipe. */ | ||
132 | + FILE *p; | ||
133 | char *command = concat (*compression_program," -cd <", *opened_filename); | ||
134 | - if (fclose (f) < 0) | ||
135 | + if (gzclose (f) < 0) | ||
136 | pfatal_with_name (*opened_filename); | ||
137 | - f = popen (command, "r"); | ||
138 | - if (f) | ||
139 | + p = popen (command, "r"); | ||
140 | + if (p) | ||
141 | *is_pipe = 1; | ||
142 | else | ||
143 | pfatal_with_name (command); | ||
144 | + return p; | ||
145 | } | ||
146 | else | ||
147 | { /* It's a plain file, seek back over the magic bytes. */ | ||
148 | - if (fseek (f, 0, 0) < 0) | ||
149 | + if (gzseek (f, 0, SEEK_SET) < 0) | ||
150 | pfatal_with_name (*opened_filename); | ||
151 | -#if O_BINARY | ||
152 | +#if 0 && O_BINARY | ||
153 | /* Since this is a text file, and we opened it in binary mode, | ||
154 | switch back to text mode. */ | ||
155 | f = freopen (*opened_filename, "r", f); | ||
156 | @@ -859,7 +862,7 @@ readfile (char *filename, int *sizep, | ||
157 | char **compression_program) | ||
158 | { | ||
159 | char *real_name; | ||
160 | - FILE *f; | ||
161 | + void *f; | ||
162 | int pipe_p; | ||
163 | int filled = 0; | ||
164 | int data_size = 8192; | ||
165 | @@ -873,7 +876,12 @@ readfile (char *filename, int *sizep, | ||
166 | |||
167 | for (;;) | ||
168 | { | ||
169 | - int nread = fread (data + filled, 1, data_size - filled, f); | ||
170 | + int nread; | ||
171 | + | ||
172 | + if (pipe_p) | ||
173 | + nread = fread (data + filled, 1, data_size - filled, f); | ||
174 | + else | ||
175 | + nread = gzread (f, data + filled, data_size - filled); | ||
176 | if (nread < 0) | ||
177 | pfatal_with_name (real_name); | ||
178 | if (nread == 0) | ||
179 | @@ -895,7 +903,7 @@ readfile (char *filename, int *sizep, | ||
180 | if (pipe_p) | ||
181 | pclose (f); | ||
182 | else | ||
183 | - fclose (f); | ||
184 | + gzclose (f); | ||
185 | |||
186 | *sizep = filled; | ||
187 | return data; | ||
diff --git a/meta/recipes-extended/texinfo/texinfo/texinfo-4.13a-powerpc.patch b/meta/recipes-extended/texinfo/texinfo/texinfo-4.13a-powerpc.patch new file mode 100644 index 0000000000..312430f5af --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo/texinfo-4.13a-powerpc.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | diff -up texinfo-4.13/install-info/install-info.c.patch texinfo-4.13/install-info/install-info.c | ||
4 | --- texinfo-4.13/install-info/install-info.c.patch 2010-01-11 14:46:32.000000000 +0100 | ||
5 | +++ texinfo-4.13/install-info/install-info.c 2010-01-11 14:48:47.162152695 +0100 | ||
6 | @@ -772,7 +772,7 @@ open_possibly_compressed_file (char *fil | ||
7 | } | ||
8 | else | ||
9 | { /* It's a plain file, seek back over the magic bytes. */ | ||
10 | - if (gzseek (f, 0, SEEK_SET) < 0) | ||
11 | + if (gzseek (f, 0, SEEK_SET) == -1) | ||
12 | pfatal_with_name (*opened_filename); | ||
13 | #if 0 && O_BINARY | ||
14 | /* Since this is a text file, and we opened it in binary mode, | ||
diff --git a/meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch b/meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch new file mode 100644 index 0000000000..5b7f32d9a9 --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Upstream-Status: Inappropriate [cross build specific] | ||
2 | |||
3 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
4 | |||
5 | Index: texinfo-5.1/info/Makefile.am | ||
6 | =================================================================== | ||
7 | --- texinfo-5.1.orig/info/Makefile.am | ||
8 | +++ texinfo-5.1/info/Makefile.am | ||
9 | @@ -76,7 +76,7 @@ cmd_sources = $(srcdir)/session.c $(srcd | ||
10 | # more than once. | ||
11 | funs.h: makedoc$(EXEEXT) $(cmd_sources) | ||
12 | rm -f $(generated_sources) | ||
13 | - $(top_builddir)/$(native_tools)/info/makedoc $(cmd_sources) | ||
14 | + makedoc $(cmd_sources) | ||
15 | |||
16 | # The following hack is necessary to hint make before the automatic | ||
17 | # dependencies are built. | ||
diff --git a/meta/recipes-extended/texinfo/texinfo_5.2.bb b/meta/recipes-extended/texinfo/texinfo_5.2.bb new file mode 100644 index 0000000000..cf9dcfd5de --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo_5.2.bb | |||
@@ -0,0 +1,77 @@ | |||
1 | SUMMARY = "Documentation system for on-line information and printed output" | ||
2 | DESCRIPTION = "Texinfo is a documentation system that can produce both \ | ||
3 | online information and printed output from a single source file. The \ | ||
4 | GNU Project uses the Texinfo file format for most of its documentation." | ||
5 | HOMEPAGE = "http://www.gnu.org/software/texinfo/" | ||
6 | SECTION = "console/utils" | ||
7 | LICENSE = "GPLv3+" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
9 | |||
10 | PROVIDES_append_class-native = " texinfo-replacement-native" | ||
11 | |||
12 | def compress_pkg(d): | ||
13 | if "compress_doc" in (d.getVar("INHERIT", True) or "").split(): | ||
14 | compress = d.getVar("DOC_COMPRESS", True) | ||
15 | if compress == "gz": | ||
16 | return "gzip" | ||
17 | elif compress == "bz2": | ||
18 | return "bzip2" | ||
19 | elif compress == "xz": | ||
20 | return "xz" | ||
21 | return "" | ||
22 | |||
23 | RDEPENDS_info += "${@compress_pkg(d)}" | ||
24 | |||
25 | DEPENDS = "zlib ncurses texinfo-replacement-native" | ||
26 | DEPENDS_class-native = "zlib-native ncurses-native" | ||
27 | |||
28 | TARGET_PATCH = "file://use_host_makedoc.patch" | ||
29 | TARGET_PATCH_class-native = "" | ||
30 | |||
31 | SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \ | ||
32 | file://texinfo-4.12-zlib.patch \ | ||
33 | file://texinfo-4.13a-powerpc.patch \ | ||
34 | file://disable-native-tools.patch \ | ||
35 | file://link-zip.patch \ | ||
36 | file://dont-depend-on-help2man.patch \ | ||
37 | ${TARGET_PATCH} \ | ||
38 | " | ||
39 | |||
40 | SRC_URI[md5sum] = "1b8f98b80a8e6c50422125e07522e8db" | ||
41 | SRC_URI[sha256sum] = "6b8ca30e9b6f093b54fe04439e5545e564c63698a806a48065c0bba16994cf74" | ||
42 | |||
43 | S = "${WORKDIR}/${BP}" | ||
44 | tex_texinfo = "texmf/tex/texinfo" | ||
45 | |||
46 | inherit gettext autotools | ||
47 | |||
48 | do_compile_prepend() { | ||
49 | if [ -d tools ];then | ||
50 | oe_runmake -C tools/gnulib/lib | ||
51 | fi | ||
52 | } | ||
53 | |||
54 | do_install_append() { | ||
55 | mkdir -p ${D}${datadir}/${tex_texinfo} | ||
56 | install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo} | ||
57 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi | ||
58 | } | ||
59 | |||
60 | do_install_append_class-native() { | ||
61 | install -m 755 info/makedoc ${D}${bindir} | ||
62 | } | ||
63 | |||
64 | PACKAGES += "info info-doc" | ||
65 | |||
66 | FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info" | ||
67 | FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \ | ||
68 | ${mandir}/man1/info.1* ${mandir}/man5/info.5* \ | ||
69 | ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*" | ||
70 | |||
71 | FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo" | ||
72 | RDEPENDS_${PN} = "perl" | ||
73 | FILES_${PN}-doc = "${infodir}/texinfo* \ | ||
74 | ${datadir}/${tex_texinfo} \ | ||
75 | ${mandir}/man1 ${mandir}/man5" | ||
76 | |||
77 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/time/time-1.7/debian.patch b/meta/recipes-extended/time/time-1.7/debian.patch new file mode 100644 index 0000000000..23ea0e3eb9 --- /dev/null +++ b/meta/recipes-extended/time/time-1.7/debian.patch | |||
@@ -0,0 +1,1301 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | --- time-1.7.orig/configure.in | ||
4 | +++ time-1.7/configure.in | ||
5 | @@ -1,11 +1,8 @@ | ||
6 | dnl Process this file with autoconf to produce a configure script. | ||
7 | AC_INIT(time.c) | ||
8 | -VERSION=1.7 | ||
9 | -AC_SUBST(VERSION) | ||
10 | -PACKAGE=time | ||
11 | -AC_SUBST(PACKAGE) | ||
12 | +AM_INIT_AUTOMAKE(time, 1.7) | ||
13 | |||
14 | -AC_ARG_PROGRAM | ||
15 | +AM_MAINTAINER_MODE | ||
16 | |||
17 | dnl Checks for programs. | ||
18 | AC_PROG_CC | ||
19 | @@ -15,7 +12,7 @@ | ||
20 | dnl Checks for header files. | ||
21 | AC_HEADER_STDC | ||
22 | AC_HEADER_SYS_WAIT | ||
23 | -AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h) | ||
24 | +AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h sys/resource.h) | ||
25 | |||
26 | dnl Checks for typedefs, structures, and compiler characteristics. | ||
27 | AC_C_CONST | ||
28 | --- time-1.7.orig/version.texi | ||
29 | +++ time-1.7/version.texi | ||
30 | @@ -1,3 +1,3 @@ | ||
31 | -@set UPDATED 12 June 1996 | ||
32 | +@set UPDATED 9 May 2002 | ||
33 | @set EDITION 1.7 | ||
34 | @set VERSION 1.7 | ||
35 | --- time-1.7.orig/time.c | ||
36 | +++ time-1.7/time.c | ||
37 | @@ -147,6 +147,10 @@ | ||
38 | NULL | ||
39 | }; | ||
40 | |||
41 | + | ||
42 | +/* If true, do not show the exit message */ | ||
43 | +static boolean quiet; | ||
44 | + | ||
45 | /* If true, show an English description next to each statistic. */ | ||
46 | static boolean verbose; | ||
47 | |||
48 | @@ -172,6 +176,7 @@ | ||
49 | {"help", no_argument, NULL, 'h'}, | ||
50 | {"output-file", required_argument, NULL, 'o'}, | ||
51 | {"portability", no_argument, NULL, 'p'}, | ||
52 | + {"quiet", no_argument,NULL, 'q'}, | ||
53 | {"verbose", no_argument, NULL, 'v'}, | ||
54 | {"version", no_argument, NULL, 'V'}, | ||
55 | {NULL, no_argument, NULL, 0} | ||
56 | @@ -333,7 +338,8 @@ | ||
57 | else if (WIFSIGNALED (resp->waitstatus)) | ||
58 | fprintf (fp, "Command terminated by signal %d\n", | ||
59 | WTERMSIG (resp->waitstatus)); | ||
60 | - else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus)) | ||
61 | + else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus) | ||
62 | + && !quiet) | ||
63 | fprintf (fp, "Command exited with non-zero status %d\n", | ||
64 | WEXITSTATUS (resp->waitstatus)); | ||
65 | |||
66 | @@ -523,6 +529,7 @@ | ||
67 | char *format; /* Format found in environment. */ | ||
68 | |||
69 | /* Initialize the option flags. */ | ||
70 | + quiet = false; | ||
71 | verbose = false; | ||
72 | outfile = NULL; | ||
73 | outfp = stderr; | ||
74 | @@ -536,7 +543,7 @@ | ||
75 | if (format) | ||
76 | output_format = format; | ||
77 | |||
78 | - while ((optc = getopt_long (argc, argv, "+af:o:pvV", longopts, (int *) 0)) | ||
79 | + while ((optc = getopt_long (argc, argv, "+af:o:pqvV", longopts, (int *) 0)) | ||
80 | != EOF) | ||
81 | { | ||
82 | switch (optc) | ||
83 | @@ -555,6 +562,9 @@ | ||
84 | case 'p': | ||
85 | output_format = posix_format; | ||
86 | break; | ||
87 | + case 'q': | ||
88 | + quiet = true; | ||
89 | + break; | ||
90 | case 'v': | ||
91 | verbose = true; | ||
92 | break; | ||
93 | @@ -642,9 +652,9 @@ | ||
94 | fflush (outfp); | ||
95 | |||
96 | if (WIFSTOPPED (res.waitstatus)) | ||
97 | - exit (WSTOPSIG (res.waitstatus)); | ||
98 | + exit (WSTOPSIG (res.waitstatus) + 128); | ||
99 | else if (WIFSIGNALED (res.waitstatus)) | ||
100 | - exit (WTERMSIG (res.waitstatus)); | ||
101 | + exit (WTERMSIG (res.waitstatus) + 128); | ||
102 | else if (WIFEXITED (res.waitstatus)) | ||
103 | exit (WEXITSTATUS (res.waitstatus)); | ||
104 | } | ||
105 | @@ -657,7 +667,7 @@ | ||
106 | fprintf (stream, "\ | ||
107 | Usage: %s [-apvV] [-f format] [-o file] [--append] [--verbose]\n\ | ||
108 | [--portability] [--format=format] [--output=file] [--version]\n\ | ||
109 | - [--help] command [arg...]\n", | ||
110 | + [--quiet] [--help] command [arg...]\n", | ||
111 | program_name); | ||
112 | exit (status); | ||
113 | } | ||
114 | --- time-1.7.orig/resuse.h | ||
115 | +++ time-1.7/resuse.h | ||
116 | @@ -36,19 +36,8 @@ | ||
117 | # include <sys/rusage.h> | ||
118 | #else | ||
119 | # define TV_MSEC tv_usec / 1000 | ||
120 | -# if HAVE_WAIT3 | ||
121 | +# if HAVE_SYS_RESOURCE_H | ||
122 | # include <sys/resource.h> | ||
123 | -# else | ||
124 | -/* Process resource usage structure. */ | ||
125 | -struct rusage | ||
126 | -{ | ||
127 | - struct timeval ru_utime; /* User time used. */ | ||
128 | - struct timeval ru_stime; /* System time used. */ | ||
129 | - int ru_maxrss, ru_ixrss, ru_idrss, ru_isrss, | ||
130 | - ru_minflt, ru_majflt, ru_nswap, ru_inblock, | ||
131 | - ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals, | ||
132 | - ru_nvcsw, ru_nivcsw; | ||
133 | -}; | ||
134 | # endif | ||
135 | #endif | ||
136 | |||
137 | --- time-1.7.orig/time.texi | ||
138 | +++ time-1.7/time.texi | ||
139 | @@ -11,6 +11,12 @@ | ||
140 | @finalout | ||
141 | @end iftex | ||
142 | |||
143 | +@dircategory Individual utilities | ||
144 | +@direntry | ||
145 | +* time: (time). Run programs and summarize | ||
146 | + system resource usage. | ||
147 | +@end direntry | ||
148 | + | ||
149 | @ifinfo | ||
150 | This file documents the the GNU @code{time} command for running programs | ||
151 | and summarizing the system resources they use. | ||
152 | @@ -185,6 +191,10 @@ | ||
153 | sys %S | ||
154 | @end example | ||
155 | |||
156 | +@item -q | ||
157 | +@itemx --quiet | ||
158 | +Suppress non-zero error code from the executed program. | ||
159 | + | ||
160 | @item -v | ||
161 | @itemx --verbose | ||
162 | @cindex format | ||
163 | --- time-1.7.orig/time.info | ||
164 | +++ time-1.7/time.info | ||
165 | @@ -1,5 +1,10 @@ | ||
166 | -This is Info file ./time.info, produced by Makeinfo-1.55 from the input | ||
167 | -file time.texi. | ||
168 | +This is time.info, produced by makeinfo version 4.1 from time.texi. | ||
169 | + | ||
170 | +INFO-DIR-SECTION Individual utilities | ||
171 | +START-INFO-DIR-ENTRY | ||
172 | +* time: (time). Run programs and summarize | ||
173 | + system resource usage. | ||
174 | +END-INFO-DIR-ENTRY | ||
175 | |||
176 | This file documents the the GNU `time' command for running programs | ||
177 | and summarizing the system resources they use. | ||
178 | @@ -31,7 +36,7 @@ | ||
179 | |||
180 | * Resource Measurement:: Measuring program resource use. | ||
181 | |||
182 | - -- The Detailed Node Listing -- | ||
183 | + --- The Detailed Node Listing --- | ||
184 | |||
185 | Measuring Program Resource Use | ||
186 | |||
187 | @@ -58,14 +63,14 @@ | ||
188 | The `time' command runs another program, then displays information | ||
189 | about the resources used by that program, collected by the system while | ||
190 | the program was running. You can select which information is reported | ||
191 | -and the format in which it is shown (*note Setting Format::.), or have | ||
192 | +and the format in which it is shown (*note Setting Format::), or have | ||
193 | `time' save the information in a file instead of displaying it on the | ||
194 | -screen (*note Redirecting::.). | ||
195 | +screen (*note Redirecting::). | ||
196 | |||
197 | The resources that `time' can report on fall into the general | ||
198 | categories of time, memory, and I/O and IPC calls. Some systems do not | ||
199 | provide much information about program resource use; `time' reports | ||
200 | -unavailable information as zero values (*note Accuracy::.). | ||
201 | +unavailable information as zero values (*note Accuracy::). | ||
202 | |||
203 | The format of the `time' command is: | ||
204 | |||
205 | @@ -132,6 +137,10 @@ | ||
206 | user %U | ||
207 | sys %S | ||
208 | |||
209 | +`-q' | ||
210 | +`--quiet' | ||
211 | + Suppress non-zero error code from the executed program. | ||
212 | + | ||
213 | `-v' | ||
214 | `--verbose' | ||
215 | Use the built-in verbose format, which displays each available | ||
216 | @@ -174,7 +183,7 @@ | ||
217 | The resource specifiers, which are a superset of those recognized by | ||
218 | the `tcsh' builtin `time' command, are listed below. Not all resources | ||
219 | are measured by all versions of Unix, so some of the values might be | ||
220 | -reported as zero (*note Accuracy::.). | ||
221 | +reported as zero (*note Accuracy::). | ||
222 | |||
223 | * Menu: | ||
224 | |||
225 | @@ -308,11 +317,11 @@ | ||
226 | `-o FILE' | ||
227 | `--output=FILE' | ||
228 | Write the resource use statistics to FILE. By default, this | ||
229 | - *overwrites* the file, destroying the file's previous contents. | ||
230 | + _overwrites_ the file, destroying the file's previous contents. | ||
231 | |||
232 | `-a' | ||
233 | `--append' | ||
234 | - *Append* the resource use information to the output file instead | ||
235 | + _Append_ the resource use information to the output file instead | ||
236 | of overwriting it. This option is only useful with the `-o' or | ||
237 | `--output' option. | ||
238 | |||
239 | @@ -437,7 +446,7 @@ | ||
240 | |||
241 | `-a' | ||
242 | `--append' | ||
243 | - *Append* the resource use information to the output file instead | ||
244 | + _Append_ the resource use information to the output file instead | ||
245 | of overwriting it. | ||
246 | |||
247 | `-f FORMAT' | ||
248 | @@ -462,17 +471,17 @@ | ||
249 | |||
250 | |||
251 | Tag Table: | ||
252 | -Node: Top934 | ||
253 | -Node: Resource Measurement1725 | ||
254 | -Node: Setting Format3678 | ||
255 | -Node: Format String4907 | ||
256 | -Node: Time Resources6214 | ||
257 | -Node: Memory Resources6844 | ||
258 | -Node: I/O Resources7549 | ||
259 | -Node: Command Info8747 | ||
260 | -Node: Redirecting8964 | ||
261 | -Node: Examples9754 | ||
262 | -Node: Accuracy12064 | ||
263 | -Node: Invoking time13586 | ||
264 | +Node: Top1115 | ||
265 | +Node: Resource Measurement1908 | ||
266 | +Node: Setting Format3858 | ||
267 | +Node: Format String5164 | ||
268 | +Node: Time Resources6470 | ||
269 | +Node: Memory Resources7100 | ||
270 | +Node: I/O Resources7805 | ||
271 | +Node: Command Info9003 | ||
272 | +Node: Redirecting9220 | ||
273 | +Node: Examples10010 | ||
274 | +Node: Accuracy12320 | ||
275 | +Node: Invoking time13842 | ||
276 | |||
277 | End Tag Table | ||
278 | --- time-1.7.orig/time.html | ||
279 | +++ time-1.7/time.html | ||
280 | @@ -0,0 +1,1021 @@ | ||
281 | +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
282 | + "http://www.w3.org/TR/html40/loose.dtd"> | ||
283 | +<HTML> | ||
284 | +<!-- Created on September, 1 2003 by texi2html 1.66 --> | ||
285 | +<!-- | ||
286 | +Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) | ||
287 | + Karl Berry <karl@freefriends.org> | ||
288 | + Olaf Bachmann <obachman@mathematik.uni-kl.de> | ||
289 | + and many others. | ||
290 | +Maintained by: Many creative people <dev@texi2html.cvshome.org> | ||
291 | +Send bugs and suggestions to <users@texi2html.cvshome.org> | ||
292 | + | ||
293 | +--> | ||
294 | +<HEAD> | ||
295 | +<TITLE>Measuring Program Resource Use</TITLE> | ||
296 | + | ||
297 | +<META NAME="description" CONTENT="Measuring Program Resource Use"> | ||
298 | +<META NAME="keywords" CONTENT="Measuring Program Resource Use"> | ||
299 | +<META NAME="resource-type" CONTENT="document"> | ||
300 | +<META NAME="distribution" CONTENT="global"> | ||
301 | +<META NAME="Generator" CONTENT="texi2html 1.66"> | ||
302 | + | ||
303 | +</HEAD> | ||
304 | + | ||
305 | +<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"> | ||
306 | + | ||
307 | +<A NAME="SEC_Top"></A> | ||
308 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
309 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
310 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
311 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
312 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
313 | +</TR></TABLE> | ||
314 | +<H1>Measuring Program Resource Use</H1> | ||
315 | + | ||
316 | +<P> | ||
317 | + | ||
318 | +This file documents the the GNU <CODE>time</CODE> command for running programs | ||
319 | +and summarizing the system resources they use. | ||
320 | +This is edition 1.7, for version 1.7. | ||
321 | +</P> | ||
322 | +<P> | ||
323 | + | ||
324 | +</P> | ||
325 | +<TABLE BORDER="0" CELLSPACING="0"> | ||
326 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC1">1. Measuring Program Resource Use</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Measuring program resource use.</TD></TR> | ||
327 | +<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> | ||
328 | +</TH></TR> | ||
329 | +<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -- The Detailed Node Listing --- | ||
330 | +</TH></TR> | ||
331 | +<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> | ||
332 | +</TH></TR> | ||
333 | +<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">Measuring Program Resource Use | ||
334 | +</TH></TR> | ||
335 | +<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> | ||
336 | +</TH></TR> | ||
337 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR> | ||
338 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR> | ||
339 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR> | ||
340 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR> | ||
341 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR> | ||
342 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR> | ||
343 | +<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> | ||
344 | +</TH></TR> | ||
345 | +<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">The Format String | ||
346 | +</TH></TR> | ||
347 | +<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> | ||
348 | +</TH></TR> | ||
349 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> | ||
350 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> | ||
351 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> | ||
352 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> | ||
353 | +</TABLE> | ||
354 | +<P> | ||
355 | + | ||
356 | +<HR SIZE=1> | ||
357 | +<A NAME="SEC1"></A> | ||
358 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
359 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> < </A>]</TD> | ||
360 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> > </A>]</TD> | ||
361 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[ << ]</TD> | ||
362 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
363 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
364 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
365 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
366 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
367 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
368 | +</TR></TABLE> | ||
369 | +<A NAME="Resource Measurement"></A> | ||
370 | +<H1> 1. Measuring Program Resource Use </H1> | ||
371 | +<!--docid::SEC1::--> | ||
372 | +<P> | ||
373 | + | ||
374 | +The <CODE>time</CODE> command runs another program, then displays information | ||
375 | +about the resources used by that program, collected by the system while | ||
376 | +the program was running. You can select which information is reported | ||
377 | +and the format in which it is shown (see section <A HREF="time.html#SEC2">1.1 Setting the Output Format</A>), or have | ||
378 | +<CODE>time</CODE> save the information in a file instead of displaying it on the | ||
379 | +screen (see section <A HREF="time.html#SEC8">1.3 Redirecting Output</A>). | ||
380 | +</P> | ||
381 | +<P> | ||
382 | + | ||
383 | +The resources that <CODE>time</CODE> can report on fall into the general | ||
384 | +categories of time, memory, and I/O and IPC calls. Some systems do not | ||
385 | +provide much information about program resource use; <CODE>time</CODE> | ||
386 | +reports unavailable information as zero values (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>). | ||
387 | +</P> | ||
388 | +<P> | ||
389 | + | ||
390 | +The format of the <CODE>time</CODE> command is: | ||
391 | +</P> | ||
392 | +<P> | ||
393 | + | ||
394 | +<TABLE><tr><td> </td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>] | ||
395 | +</pre></td></tr></table><P> | ||
396 | + | ||
397 | +<A NAME="IDX1"></A> | ||
398 | +<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments | ||
399 | +<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays | ||
400 | +information about resources used by <VAR>command</VAR>. | ||
401 | +</P> | ||
402 | +<P> | ||
403 | + | ||
404 | +Here is an example of using <CODE>time</CODE> to measure the time and other | ||
405 | +resources used by running the program <CODE>grep</CODE>: | ||
406 | +</P> | ||
407 | +<P> | ||
408 | + | ||
409 | +<TABLE><tr><td> </td><td class=example><pre>eg$ time grep nobody /etc/aliases | ||
410 | +nobody:/dev/null | ||
411 | +etc-files:nobody | ||
412 | +misc-group:nobody | ||
413 | +0.07user 0.50system 0:06.69elapsed 8%CPU (0avgtext+489avgdata 324maxresident)k | ||
414 | +46inputs+7outputs (43major+251minor)pagefaults 0swaps | ||
415 | +</pre></td></tr></table><P> | ||
416 | + | ||
417 | +Mail suggestions and bug reports for GNU <CODE>time</CODE> to | ||
418 | +<CODE>bug-gnu-utils@prep.ai.mit.edu</CODE>. Please include the version of | ||
419 | +<CODE>time</CODE>, which you can get by running `<SAMP>time --version</SAMP>', and the | ||
420 | +operating system and C compiler you used. | ||
421 | +</P> | ||
422 | +<P> | ||
423 | + | ||
424 | +<TABLE BORDER="0" CELLSPACING="0"> | ||
425 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR> | ||
426 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR> | ||
427 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR> | ||
428 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR> | ||
429 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR> | ||
430 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR> | ||
431 | +</TABLE> | ||
432 | +<P> | ||
433 | + | ||
434 | +<A NAME="Setting Format"></A> | ||
435 | +<HR SIZE="6"> | ||
436 | +<A NAME="SEC2"></A> | ||
437 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
438 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> < </A>]</TD> | ||
439 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> > </A>]</TD> | ||
440 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> | ||
441 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
442 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
443 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
444 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
445 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
446 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
447 | +</TR></TABLE> | ||
448 | +<H2> 1.1 Setting the Output Format </H2> | ||
449 | +<!--docid::SEC2::--> | ||
450 | +<P> | ||
451 | + | ||
452 | +<CODE>time</CODE> uses a <EM>format string</EM> to determine which information to | ||
453 | +display about the resources used by the command it runs. See section <A HREF="time.html#SEC3">1.2 The Format String</A>, for the interpretation of the format string contents. | ||
454 | +</P> | ||
455 | +<P> | ||
456 | + | ||
457 | +You can specify a format string with the command line options listed | ||
458 | +below. If no format is specified on the command line, but the | ||
459 | +<CODE>TIME</CODE> environment variable is set, its value is used as the format | ||
460 | +string. Otherwise, the default format built into <CODE>time</CODE> is used: | ||
461 | +</P> | ||
462 | +<P> | ||
463 | + | ||
464 | +<TABLE><tr><td> </td><td class=example><pre>%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k | ||
465 | +%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps | ||
466 | +</pre></td></tr></table><P> | ||
467 | + | ||
468 | +The command line options to set the format are: | ||
469 | +</P> | ||
470 | +<P> | ||
471 | + | ||
472 | +</P> | ||
473 | +<DL COMPACT> | ||
474 | +<DT><CODE>-f <VAR>format</VAR></CODE> | ||
475 | +<DD><DT><CODE>--format=<VAR>format</VAR></CODE> | ||
476 | +<DD>Use <VAR>format</VAR> as the format string. | ||
477 | +<P> | ||
478 | + | ||
479 | +</P> | ||
480 | +<DT><CODE>-p</CODE> | ||
481 | +<DD><DT><CODE>--portability</CODE> | ||
482 | +<DD>Use the following format string, for conformance with POSIX standard | ||
483 | +1003.2: | ||
484 | +<P> | ||
485 | + | ||
486 | +<TABLE><tr><td> </td><td class=example><pre>real %e | ||
487 | +user %U | ||
488 | +sys %S | ||
489 | +</pre></td></tr></table><P> | ||
490 | + | ||
491 | +</P> | ||
492 | +<DT><CODE>-q</CODE> | ||
493 | +<DD><DT><CODE>--quiet</CODE> | ||
494 | +<DD>Suppress non-zero error code from the executed program. | ||
495 | +<P> | ||
496 | + | ||
497 | +</P> | ||
498 | +<DT><CODE>-v</CODE> | ||
499 | +<DD><DT><CODE>--verbose</CODE> | ||
500 | +<DD><A NAME="IDX2"></A> | ||
501 | +Use the built-in verbose format, which displays each available piece of | ||
502 | +information on the program's resource use on its own line, with an | ||
503 | +English description of its meaning. | ||
504 | +</DL> | ||
505 | +<P> | ||
506 | + | ||
507 | +<A NAME="Format String"></A> | ||
508 | +<HR SIZE="6"> | ||
509 | +<A NAME="SEC3"></A> | ||
510 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
511 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> < </A>]</TD> | ||
512 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> > </A>]</TD> | ||
513 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> | ||
514 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
515 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
516 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
517 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
518 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
519 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
520 | +</TR></TABLE> | ||
521 | +<H2> 1.2 The Format String </H2> | ||
522 | +<!--docid::SEC3::--> | ||
523 | +<P> | ||
524 | + | ||
525 | +<A NAME="IDX3"></A> | ||
526 | +<A NAME="IDX4"></A> | ||
527 | +The <EM>format string</EM> controls the contents of the <CODE>time</CODE> output. | ||
528 | +It consists of <EM>resource specifiers</EM> and <EM>escapes</EM>, interspersed | ||
529 | +with plain text. | ||
530 | +</P> | ||
531 | +<P> | ||
532 | + | ||
533 | +A backslash introduces an <EM>escape</EM>, which is translated | ||
534 | +into a single printing character upon output. The valid escapes are | ||
535 | +listed below. An invalid escape is output as a question mark followed | ||
536 | +by a backslash. | ||
537 | +</P> | ||
538 | +<P> | ||
539 | + | ||
540 | +</P> | ||
541 | +<DL COMPACT> | ||
542 | +<DT><CODE>\t</CODE> | ||
543 | +<DD>a tab character | ||
544 | +<P> | ||
545 | + | ||
546 | +</P> | ||
547 | +<DT><CODE>\n</CODE> | ||
548 | +<DD>a newline | ||
549 | +<P> | ||
550 | + | ||
551 | +</P> | ||
552 | +<DT><CODE>\\</CODE> | ||
553 | +<DD>a literal backslash | ||
554 | +</DL> | ||
555 | +<P> | ||
556 | + | ||
557 | +<CODE>time</CODE> always prints a newline after printing the resource use | ||
558 | +information, so normally format strings do not end with a newline | ||
559 | +character (or `<SAMP>\n</SAMP>'). | ||
560 | +</P> | ||
561 | +<P> | ||
562 | + | ||
563 | +A resource specifier consists of a percent sign followed by another | ||
564 | +character. An invalid resource specifier is output as a question mark | ||
565 | +followed by the invalid character. Use `<SAMP>%%</SAMP>' to output a literal | ||
566 | +percent sign. | ||
567 | +</P> | ||
568 | +<P> | ||
569 | + | ||
570 | +The resource specifiers, which are a superset of those recognized by the | ||
571 | +<CODE>tcsh</CODE> builtin <CODE>time</CODE> command, are listed below. Not all | ||
572 | +resources are measured by all versions of Unix, so some of the values | ||
573 | +might be reported as zero (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>). | ||
574 | +</P> | ||
575 | +<P> | ||
576 | + | ||
577 | +<TABLE BORDER="0" CELLSPACING="0"> | ||
578 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> | ||
579 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> | ||
580 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> | ||
581 | +<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR> | ||
582 | +</TABLE> | ||
583 | +<P> | ||
584 | + | ||
585 | +<A NAME="Time Resources"></A> | ||
586 | +<HR SIZE="6"> | ||
587 | +<A NAME="SEC4"></A> | ||
588 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
589 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> < </A>]</TD> | ||
590 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> > </A>]</TD> | ||
591 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> | ||
592 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
593 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
594 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
595 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
596 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
597 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
598 | +</TR></TABLE> | ||
599 | +<H3> 1.2.1 Time Resources </H3> | ||
600 | +<!--docid::SEC4::--> | ||
601 | +<P> | ||
602 | + | ||
603 | +</P> | ||
604 | +<DL COMPACT> | ||
605 | +<DT><CODE>E</CODE> | ||
606 | +<DD>Elapsed real (wall clock) time used by the process, in | ||
607 | +[hours:]minutes:seconds. | ||
608 | +<P> | ||
609 | + | ||
610 | +</P> | ||
611 | +<DT><CODE>e</CODE> | ||
612 | +<DD>Elapsed real (wall clock) time used by the process, in | ||
613 | +seconds. | ||
614 | +<P> | ||
615 | + | ||
616 | +</P> | ||
617 | +<DT><CODE>S</CODE> | ||
618 | +<DD>Total number of CPU-seconds used by the system on behalf of the process | ||
619 | +(in kernel mode), in seconds. | ||
620 | +<P> | ||
621 | + | ||
622 | +</P> | ||
623 | +<DT><CODE>U</CODE> | ||
624 | +<DD>Total number of CPU-seconds that the process used directly (in user | ||
625 | +mode), in seconds. | ||
626 | +<P> | ||
627 | + | ||
628 | +</P> | ||
629 | +<DT><CODE>P</CODE> | ||
630 | +<DD>Percentage of the CPU that this job got. This is just user + system | ||
631 | +times divied by the total running time. | ||
632 | +</DL> | ||
633 | +<P> | ||
634 | + | ||
635 | +<A NAME="Memory Resources"></A> | ||
636 | +<HR SIZE="6"> | ||
637 | +<A NAME="SEC5"></A> | ||
638 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
639 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> < </A>]</TD> | ||
640 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> > </A>]</TD> | ||
641 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> | ||
642 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
643 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
644 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
645 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
646 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
647 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
648 | +</TR></TABLE> | ||
649 | +<H3> 1.2.2 Memory Resources </H3> | ||
650 | +<!--docid::SEC5::--> | ||
651 | +<P> | ||
652 | + | ||
653 | +</P> | ||
654 | +<DL COMPACT> | ||
655 | +<DT><CODE>M</CODE> | ||
656 | +<DD>Maximum resident set size of the process during its lifetime, in | ||
657 | +Kilobytes. | ||
658 | +<P> | ||
659 | + | ||
660 | +</P> | ||
661 | +<DT><CODE>t</CODE> | ||
662 | +<DD>Average resident set size of the process, in Kilobytes. | ||
663 | +<P> | ||
664 | + | ||
665 | +</P> | ||
666 | +<DT><CODE>K</CODE> | ||
667 | +<DD>Average total (data+stack+text) memory use of the process, in Kilobytes. | ||
668 | +<P> | ||
669 | + | ||
670 | +</P> | ||
671 | +<DT><CODE>D</CODE> | ||
672 | +<DD>Average size of the process's unshared data area, in Kilobytes. | ||
673 | +<P> | ||
674 | + | ||
675 | +</P> | ||
676 | +<DT><CODE>p</CODE> | ||
677 | +<DD>Average size of the process's unshared stack, in Kilobytes. | ||
678 | +<P> | ||
679 | + | ||
680 | +</P> | ||
681 | +<DT><CODE>X</CODE> | ||
682 | +<DD>Average size of the process's shared text, in Kilobytes. | ||
683 | +<P> | ||
684 | + | ||
685 | +</P> | ||
686 | +<DT><CODE>Z</CODE> | ||
687 | +<DD>System's page size, in bytes. This is a per-system constant, but | ||
688 | +varies between systems. | ||
689 | +</DL> | ||
690 | +<P> | ||
691 | + | ||
692 | +<A NAME="I/O Resources"></A> | ||
693 | +<HR SIZE="6"> | ||
694 | +<A NAME="SEC6"></A> | ||
695 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
696 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> < </A>]</TD> | ||
697 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> > </A>]</TD> | ||
698 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> | ||
699 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
700 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
701 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
702 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
703 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
704 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
705 | +</TR></TABLE> | ||
706 | +<H3> 1.2.3 I/O Resources </H3> | ||
707 | +<!--docid::SEC6::--> | ||
708 | +<P> | ||
709 | + | ||
710 | +</P> | ||
711 | +<DL COMPACT> | ||
712 | +<DT><CODE>F</CODE> | ||
713 | +<DD>Number of major, or I/O-requiring, page faults that occurred while the | ||
714 | +process was running. These are faults where the page has actually | ||
715 | +migrated out of primary memory. | ||
716 | +<P> | ||
717 | + | ||
718 | +</P> | ||
719 | +<DT><CODE>R</CODE> | ||
720 | +<DD>Number of minor, or recoverable, page faults. These are pages that are | ||
721 | +not valid (so they fault) but which have not yet been claimed by other | ||
722 | +virtual pages. Thus the data in the page is still valid but the system | ||
723 | +tables must be updated. | ||
724 | +<P> | ||
725 | + | ||
726 | +</P> | ||
727 | +<DT><CODE>W</CODE> | ||
728 | +<DD>Number of times the process was swapped out of main memory. | ||
729 | +<P> | ||
730 | + | ||
731 | +</P> | ||
732 | +<DT><CODE>c</CODE> | ||
733 | +<DD>Number of times the process was context-switched involuntarily (because | ||
734 | +the time slice expired). | ||
735 | +<P> | ||
736 | + | ||
737 | +</P> | ||
738 | +<DT><CODE>w</CODE> | ||
739 | +<DD>Number of times that the program was context-switched voluntarily, for | ||
740 | +instance while waiting for an I/O operation to complete. | ||
741 | +<P> | ||
742 | + | ||
743 | +</P> | ||
744 | +<DT><CODE>I</CODE> | ||
745 | +<DD>Number of file system inputs by the process. | ||
746 | +<P> | ||
747 | + | ||
748 | +</P> | ||
749 | +<DT><CODE>O</CODE> | ||
750 | +<DD>Number of file system outputs by the process. | ||
751 | +<P> | ||
752 | + | ||
753 | +</P> | ||
754 | +<DT><CODE>r</CODE> | ||
755 | +<DD>Number of socket messages received by the process. | ||
756 | +<P> | ||
757 | + | ||
758 | +</P> | ||
759 | +<DT><CODE>s</CODE> | ||
760 | +<DD>Number of socket messages sent by the process. | ||
761 | +<P> | ||
762 | + | ||
763 | +</P> | ||
764 | +<DT><CODE>k</CODE> | ||
765 | +<DD>Number of signals delivered to the process. | ||
766 | +</DL> | ||
767 | +<P> | ||
768 | + | ||
769 | +<A NAME="Command Info"></A> | ||
770 | +<HR SIZE="6"> | ||
771 | +<A NAME="SEC7"></A> | ||
772 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
773 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> < </A>]</TD> | ||
774 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> > </A>]</TD> | ||
775 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> | ||
776 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
777 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
778 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
779 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
780 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
781 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
782 | +</TR></TABLE> | ||
783 | +<H3> 1.2.4 Command Info </H3> | ||
784 | +<!--docid::SEC7::--> | ||
785 | +<P> | ||
786 | + | ||
787 | +</P> | ||
788 | +<DL COMPACT> | ||
789 | +<DT><CODE>C</CODE> | ||
790 | +<DD>Name and command line arguments of the command being timed. | ||
791 | +<P> | ||
792 | + | ||
793 | +</P> | ||
794 | +<DT><CODE>x</CODE> | ||
795 | +<DD>Exit status of the command. | ||
796 | +</DL> | ||
797 | +<P> | ||
798 | + | ||
799 | +<A NAME="Redirecting"></A> | ||
800 | +<HR SIZE="6"> | ||
801 | +<A NAME="SEC8"></A> | ||
802 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
803 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> < </A>]</TD> | ||
804 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> > </A>]</TD> | ||
805 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> | ||
806 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
807 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
808 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
809 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
810 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
811 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
812 | +</TR></TABLE> | ||
813 | +<H2> 1.3 Redirecting Output </H2> | ||
814 | +<!--docid::SEC8::--> | ||
815 | +<P> | ||
816 | + | ||
817 | +By default, <CODE>time</CODE> writes the resource use statistics to the | ||
818 | +standard error stream. The options below make it write the statistics | ||
819 | +to a file instead. Doing this can be useful if the program you're | ||
820 | +running writes to the standard error or you're running <CODE>time</CODE> | ||
821 | +noninteractively or in the background. | ||
822 | +</P> | ||
823 | +<P> | ||
824 | + | ||
825 | +</P> | ||
826 | +<DL COMPACT> | ||
827 | +<DT><CODE>-o <VAR>file</VAR></CODE> | ||
828 | +<DD><DT><CODE>--output=<VAR>file</VAR></CODE> | ||
829 | +<DD>Write the resource use statistics to <VAR>file</VAR>. By default, this | ||
830 | +<EM>overwrites</EM> the file, destroying the file's previous contents. | ||
831 | +<P> | ||
832 | + | ||
833 | +</P> | ||
834 | +<DT><CODE>-a</CODE> | ||
835 | +<DD><DT><CODE>--append</CODE> | ||
836 | +<DD><EM>Append</EM> the resource use information to the output file instead | ||
837 | +of overwriting it. This option is only useful with the `<SAMP>-o</SAMP>' or | ||
838 | +`<SAMP>--output</SAMP>' option. | ||
839 | +</DL> | ||
840 | +<P> | ||
841 | + | ||
842 | +<A NAME="Examples"></A> | ||
843 | +<HR SIZE="6"> | ||
844 | +<A NAME="SEC9"></A> | ||
845 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
846 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> < </A>]</TD> | ||
847 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> > </A>]</TD> | ||
848 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> | ||
849 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
850 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
851 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
852 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
853 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
854 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
855 | +</TR></TABLE> | ||
856 | +<H2> 1.4 Examples </H2> | ||
857 | +<!--docid::SEC9::--> | ||
858 | +<P> | ||
859 | + | ||
860 | +Run the command `<SAMP>wc /etc/hosts</SAMP>' and show the default information: | ||
861 | +</P> | ||
862 | +<P> | ||
863 | + | ||
864 | +<TABLE><tr><td> </td><td class=example><pre>eg$ time wc /etc/hosts | ||
865 | + 35 111 1134 /etc/hosts | ||
866 | +0.00user 0.01system 0:00.04elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k | ||
867 | +1inputs+1outputs (0major+0minor)pagefaults 0swaps | ||
868 | +</pre></td></tr></table><P> | ||
869 | + | ||
870 | +Run the command `<SAMP>ls -Fs</SAMP>' and show just the user, system, and | ||
871 | +wall-clock time: | ||
872 | +</P> | ||
873 | +<P> | ||
874 | + | ||
875 | +<TABLE><tr><td> </td><td class=example><pre>eg$ time -f "\t%E real,\t%U user,\t%S sys" ls -Fs | ||
876 | +total 16 | ||
877 | +1 account/ 1 db/ 1 mail/ 1 run/ | ||
878 | +1 backups/ 1 emacs/ 1 msgs/ 1 rwho/ | ||
879 | +1 crash/ 1 games/ 1 preserve/ 1 spool/ | ||
880 | +1 cron/ 1 log/ 1 quotas/ 1 tmp/ | ||
881 | + 0:00.03 real, 0.00 user, 0.01 sys | ||
882 | +</pre></td></tr></table><P> | ||
883 | + | ||
884 | +Edit the file `<TT>.bashrc</TT>' and have <CODE>time</CODE> append the elapsed time | ||
885 | +and number of signals to the file `<TT>log</TT>', reading the format string | ||
886 | +from the environment variable <CODE>TIME</CODE>: | ||
887 | +</P> | ||
888 | +<P> | ||
889 | + | ||
890 | +<TABLE><tr><td> </td><td class=example><pre>eg$ export TIME="\t%E,\t%k" # If using bash or ksh | ||
891 | +eg$ setenv TIME "\t%E,\t%k" # If using csh or tcsh | ||
892 | +eg$ time -a -o log emacs .bashrc | ||
893 | +eg$ cat log | ||
894 | + 0:16.55, 726 | ||
895 | +</pre></td></tr></table><P> | ||
896 | + | ||
897 | +Run the command `<SAMP>sleep 4</SAMP>' and show all of the information about it | ||
898 | +verbosely: | ||
899 | +</P> | ||
900 | +<P> | ||
901 | + | ||
902 | +<TABLE><tr><td> </td><td class=example><pre>eg$ time -v sleep 4 | ||
903 | + Command being timed: "sleep 4" | ||
904 | + User time (seconds): 0.00 | ||
905 | + System time (seconds): 0.05 | ||
906 | + Percent of CPU this job got: 1% | ||
907 | + Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.26 | ||
908 | + Average shared text size (kbytes): 36 | ||
909 | + Average unshared data size (kbytes): 24 | ||
910 | + Average stack size (kbytes): 0 | ||
911 | + Average total size (kbytes): 60 | ||
912 | + Maximum resident set size (kbytes): 32 | ||
913 | + Average resident set size (kbytes): 24 | ||
914 | + Major (requiring I/O) page faults: 3 | ||
915 | + Minor (reclaiming a frame) page faults: 0 | ||
916 | + Voluntary context switches: 11 | ||
917 | + Involuntary context switches: 0 | ||
918 | + Swaps: 0 | ||
919 | + File system inputs: 3 | ||
920 | + File system outputs: 1 | ||
921 | + Socket messages sent: 0 | ||
922 | + Socket messages received: 0 | ||
923 | + Signals delivered: 1 | ||
924 | + Page size (bytes): 4096 | ||
925 | + Exit status: 0 | ||
926 | +</pre></td></tr></table><P> | ||
927 | + | ||
928 | +<A NAME="Accuracy"></A> | ||
929 | +<HR SIZE="6"> | ||
930 | +<A NAME="SEC10"></A> | ||
931 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
932 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> < </A>]</TD> | ||
933 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC11"> > </A>]</TD> | ||
934 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> | ||
935 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
936 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
937 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
938 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
939 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
940 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
941 | +</TR></TABLE> | ||
942 | +<H2> 1.5 Accuracy </H2> | ||
943 | +<!--docid::SEC10::--> | ||
944 | +<P> | ||
945 | + | ||
946 | +The elapsed time is not collected atomically with the execution of the | ||
947 | +program; as a result, in bizarre circumstances (if the <CODE>time</CODE> | ||
948 | +command gets stopped or swapped out in between when the program being | ||
949 | +timed exits and when <CODE>time</CODE> calculates how long it took to run), it | ||
950 | +could be much larger than the actual execution time. | ||
951 | +</P> | ||
952 | +<P> | ||
953 | + | ||
954 | +When the running time of a command is very nearly zero, some values | ||
955 | +(e.g., the percentage of CPU used) may be reported as either zero (which | ||
956 | +is wrong) or a question mark. | ||
957 | +</P> | ||
958 | +<P> | ||
959 | + | ||
960 | +Most information shown by <CODE>time</CODE> is derived from the <CODE>wait3</CODE> | ||
961 | +system call. The numbers are only as good as those returned by | ||
962 | +<CODE>wait3</CODE>. Many systems do not measure all of the resources that | ||
963 | +<CODE>time</CODE> can report on; those resources are reported as zero. The | ||
964 | +systems that measure most or all of the resources are based on 4.2 or | ||
965 | +4.3BSD. Later BSD releases use different memory management code that | ||
966 | +measures fewer resources. | ||
967 | +</P> | ||
968 | +<P> | ||
969 | + | ||
970 | +On systems that do not have a <CODE>wait3</CODE> call that returns status | ||
971 | +information, the <CODE>times</CODE> system call is used instead. It provides | ||
972 | +much less information than <CODE>wait3</CODE>, so on those systems <CODE>time</CODE> | ||
973 | +reports most of the resources as zero. | ||
974 | +</P> | ||
975 | +<P> | ||
976 | + | ||
977 | +The `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' values are allegedly only "real" input | ||
978 | +and output and do not include those supplied by caching devices. The | ||
979 | +meaning of "real" I/O reported by `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' may be | ||
980 | +muddled for workstations, especially diskless ones. | ||
981 | +</P> | ||
982 | +<P> | ||
983 | + | ||
984 | +<A NAME="Invoking time"></A> | ||
985 | +<HR SIZE="6"> | ||
986 | +<A NAME="SEC11"></A> | ||
987 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
988 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> < </A>]</TD> | ||
989 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ > ]</TD> | ||
990 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> << </A>]</TD> | ||
991 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD> | ||
992 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[ >> ]</TD> | ||
993 | +<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
994 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
995 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
996 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
997 | +</TR></TABLE> | ||
998 | +<H2> 1.6 Running the <CODE>time</CODE> Command </H2> | ||
999 | +<!--docid::SEC11::--> | ||
1000 | +<P> | ||
1001 | + | ||
1002 | +The format of the <CODE>time</CODE> command is: | ||
1003 | +</P> | ||
1004 | +<P> | ||
1005 | + | ||
1006 | +<TABLE><tr><td> </td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>] | ||
1007 | +</pre></td></tr></table><P> | ||
1008 | + | ||
1009 | +<A NAME="IDX5"></A> | ||
1010 | +<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments | ||
1011 | +<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays | ||
1012 | +information about resources used by <VAR>command</VAR> (on the standard error | ||
1013 | +output, by default). If <VAR>command</VAR> exits with non-zero status or is | ||
1014 | +terminated by a signal, <CODE>time</CODE> displays a warning message and the | ||
1015 | +exit status or signal number. | ||
1016 | +</P> | ||
1017 | +<P> | ||
1018 | + | ||
1019 | +Options to <CODE>time</CODE> must appear on the command line before | ||
1020 | +<VAR>command</VAR>. Anything on the command line after <VAR>command</VAR> is | ||
1021 | +passed as arguments to <VAR>command</VAR>. | ||
1022 | +</P> | ||
1023 | +<P> | ||
1024 | + | ||
1025 | +</P> | ||
1026 | +<DL COMPACT> | ||
1027 | +<DT><CODE>-o <VAR>file</VAR></CODE> | ||
1028 | +<DD><DT><CODE>--output=<VAR>file</VAR></CODE> | ||
1029 | +<DD>Write the resource use statistics to <VAR>file</VAR>. | ||
1030 | +<P> | ||
1031 | + | ||
1032 | +</P> | ||
1033 | +<DT><CODE>-a</CODE> | ||
1034 | +<DD><DT><CODE>--append</CODE> | ||
1035 | +<DD><EM>Append</EM> the resource use information to the output file instead | ||
1036 | +of overwriting it. | ||
1037 | +<P> | ||
1038 | + | ||
1039 | +</P> | ||
1040 | +<DT><CODE>-f <VAR>format</VAR></CODE> | ||
1041 | +<DD><DT><CODE>--format=<VAR>format</VAR></CODE> | ||
1042 | +<DD>Use <VAR>format</VAR> as the format string. | ||
1043 | +<P> | ||
1044 | + | ||
1045 | +</P> | ||
1046 | +<DT><CODE>--help</CODE> | ||
1047 | +<DD>Print a summary of the command line options to <CODE>time</CODE> and exit. | ||
1048 | +<P> | ||
1049 | + | ||
1050 | +</P> | ||
1051 | +<DT><CODE>-p</CODE> | ||
1052 | +<DD><DT><CODE>--portability</CODE> | ||
1053 | +<DD>Use the POSIX format. | ||
1054 | +<P> | ||
1055 | + | ||
1056 | +</P> | ||
1057 | +<DT><CODE>-v</CODE> | ||
1058 | +<DD><DT><CODE>--verbose</CODE> | ||
1059 | +<DD><A NAME="IDX6"></A> | ||
1060 | +Use the built-in verbose format. | ||
1061 | +<P> | ||
1062 | + | ||
1063 | +</P> | ||
1064 | +<DT><CODE>-V</CODE> | ||
1065 | +<DD><DT><CODE>--version</CODE> | ||
1066 | +<DD><A NAME="IDX7"></A> | ||
1067 | +Print the version number of <CODE>time</CODE> and exit. | ||
1068 | +</DL> | ||
1069 | +<P> | ||
1070 | + | ||
1071 | +<HR SIZE="6"> | ||
1072 | +<A NAME="SEC_Contents"></A> | ||
1073 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
1074 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
1075 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
1076 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
1077 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
1078 | +</TR></TABLE> | ||
1079 | +<H1>Table of Contents</H1> | ||
1080 | +<BLOCKQUOTE> | ||
1081 | +<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A> | ||
1082 | +<BR> | ||
1083 | +<BLOCKQUOTE> | ||
1084 | +<A NAME="TOC2" HREF="time.html#SEC2">1.1 Setting the Output Format</A> | ||
1085 | +<BR> | ||
1086 | +<A NAME="TOC3" HREF="time.html#SEC3">1.2 The Format String</A> | ||
1087 | +<BR> | ||
1088 | +<BLOCKQUOTE> | ||
1089 | +<A NAME="TOC4" HREF="time.html#SEC4">1.2.1 Time Resources</A> | ||
1090 | +<BR> | ||
1091 | +<A NAME="TOC5" HREF="time.html#SEC5">1.2.2 Memory Resources</A> | ||
1092 | +<BR> | ||
1093 | +<A NAME="TOC6" HREF="time.html#SEC6">1.2.3 I/O Resources</A> | ||
1094 | +<BR> | ||
1095 | +<A NAME="TOC7" HREF="time.html#SEC7">1.2.4 Command Info</A> | ||
1096 | +<BR> | ||
1097 | +</BLOCKQUOTE> | ||
1098 | +<A NAME="TOC8" HREF="time.html#SEC8">1.3 Redirecting Output</A> | ||
1099 | +<BR> | ||
1100 | +<A NAME="TOC9" HREF="time.html#SEC9">1.4 Examples</A> | ||
1101 | +<BR> | ||
1102 | +<A NAME="TOC10" HREF="time.html#SEC10">1.5 Accuracy</A> | ||
1103 | +<BR> | ||
1104 | +<A NAME="TOC11" HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A> | ||
1105 | +<BR> | ||
1106 | +</BLOCKQUOTE> | ||
1107 | +</BLOCKQUOTE> | ||
1108 | +<HR SIZE=1> | ||
1109 | +<A NAME="SEC_OVERVIEW"></A> | ||
1110 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
1111 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
1112 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
1113 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
1114 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
1115 | +</TR></TABLE> | ||
1116 | +<H1>Short Table of Contents</H1> | ||
1117 | +<BLOCKQUOTE> | ||
1118 | +<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A> | ||
1119 | +<BR> | ||
1120 | + | ||
1121 | +</BLOCKQUOTE> | ||
1122 | +<HR SIZE=1> | ||
1123 | +<A NAME="SEC_About"></A> | ||
1124 | +<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> | ||
1125 | +<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD> | ||
1126 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD> | ||
1127 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> | ||
1128 | +<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD> | ||
1129 | +</TR></TABLE> | ||
1130 | +<H1>About this document</H1> | ||
1131 | +This document was generated | ||
1132 | +by | ||
1133 | +using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A> | ||
1134 | +<P></P> | ||
1135 | +The buttons in the navigation panels have the following meaning: | ||
1136 | +<P></P> | ||
1137 | +<table border = "1"> | ||
1138 | +<TR> | ||
1139 | +<TH> Button </TH> | ||
1140 | +<TH> Name </TH> | ||
1141 | +<TH> Go to </TH> | ||
1142 | +<TH> From 1.2.3 go to</TH> | ||
1143 | +</TR> | ||
1144 | +<TR> | ||
1145 | +<TD ALIGN="CENTER"> | ||
1146 | + [ < ] </TD> | ||
1147 | +<TD ALIGN="CENTER"> | ||
1148 | +Back | ||
1149 | +</TD> | ||
1150 | +<TD> | ||
1151 | +previous section in reading order | ||
1152 | +</TD> | ||
1153 | +<TD> | ||
1154 | +1.2.2 | ||
1155 | +</TD> | ||
1156 | +</TR> | ||
1157 | +<TR> | ||
1158 | +<TD ALIGN="CENTER"> | ||
1159 | + [ > ] </TD> | ||
1160 | +<TD ALIGN="CENTER"> | ||
1161 | +Forward | ||
1162 | +</TD> | ||
1163 | +<TD> | ||
1164 | +next section in reading order | ||
1165 | +</TD> | ||
1166 | +<TD> | ||
1167 | +1.2.4 | ||
1168 | +</TD> | ||
1169 | +</TR> | ||
1170 | +<TR> | ||
1171 | +<TD ALIGN="CENTER"> | ||
1172 | + [ << ] </TD> | ||
1173 | +<TD ALIGN="CENTER"> | ||
1174 | +FastBack | ||
1175 | +</TD> | ||
1176 | +<TD> | ||
1177 | +beginning of this chapter or previous chapter | ||
1178 | +</TD> | ||
1179 | +<TD> | ||
1180 | +1 | ||
1181 | +</TD> | ||
1182 | +</TR> | ||
1183 | +<TR> | ||
1184 | +<TD ALIGN="CENTER"> | ||
1185 | + [ Up ] </TD> | ||
1186 | +<TD ALIGN="CENTER"> | ||
1187 | +Up | ||
1188 | +</TD> | ||
1189 | +<TD> | ||
1190 | +up section | ||
1191 | +</TD> | ||
1192 | +<TD> | ||
1193 | +1.2 | ||
1194 | +</TD> | ||
1195 | +</TR> | ||
1196 | +<TR> | ||
1197 | +<TD ALIGN="CENTER"> | ||
1198 | + [ >> ] </TD> | ||
1199 | +<TD ALIGN="CENTER"> | ||
1200 | +FastForward | ||
1201 | +</TD> | ||
1202 | +<TD> | ||
1203 | +next chapter | ||
1204 | +</TD> | ||
1205 | +<TD> | ||
1206 | +2 | ||
1207 | +</TD> | ||
1208 | +</TR> | ||
1209 | +<TR> | ||
1210 | +<TD ALIGN="CENTER"> | ||
1211 | + [Top] </TD> | ||
1212 | +<TD ALIGN="CENTER"> | ||
1213 | +Top | ||
1214 | +</TD> | ||
1215 | +<TD> | ||
1216 | +cover (top) of document | ||
1217 | +</TD> | ||
1218 | +<TD> | ||
1219 | + | ||
1220 | +</TD> | ||
1221 | +</TR> | ||
1222 | +<TR> | ||
1223 | +<TD ALIGN="CENTER"> | ||
1224 | + [Contents] </TD> | ||
1225 | +<TD ALIGN="CENTER"> | ||
1226 | +Contents | ||
1227 | +</TD> | ||
1228 | +<TD> | ||
1229 | +table of contents | ||
1230 | +</TD> | ||
1231 | +<TD> | ||
1232 | + | ||
1233 | +</TD> | ||
1234 | +</TR> | ||
1235 | +<TR> | ||
1236 | +<TD ALIGN="CENTER"> | ||
1237 | + [Index] </TD> | ||
1238 | +<TD ALIGN="CENTER"> | ||
1239 | +Index | ||
1240 | +</TD> | ||
1241 | +<TD> | ||
1242 | +concept index | ||
1243 | +</TD> | ||
1244 | +<TD> | ||
1245 | + | ||
1246 | +</TD> | ||
1247 | +</TR> | ||
1248 | +<TR> | ||
1249 | +<TD ALIGN="CENTER"> | ||
1250 | + [ ? ] </TD> | ||
1251 | +<TD ALIGN="CENTER"> | ||
1252 | +About | ||
1253 | +</TD> | ||
1254 | +<TD> | ||
1255 | +this page | ||
1256 | +</TD> | ||
1257 | +<TD> | ||
1258 | + | ||
1259 | +</TD> | ||
1260 | +</TR> | ||
1261 | +</TABLE> | ||
1262 | + <P> | ||
1263 | + where the <STRONG> Example </STRONG> assumes that the current position | ||
1264 | + is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of | ||
1265 | + the following structure:</P> | ||
1266 | + <UL> | ||
1267 | + <LI> 1. Section One | ||
1268 | + <UL> | ||
1269 | + <LI>1.1 Subsection One-One | ||
1270 | + <UL> | ||
1271 | + <LI>...</LI> | ||
1272 | + </UL> | ||
1273 | + <LI>1.2 Subsection One-Two | ||
1274 | + <UL> | ||
1275 | + <LI>1.2.1 Subsubsection One-Two-One</LI> | ||
1276 | + <LI>1.2.2 Subsubsection One-Two-Two</LI> | ||
1277 | + <LI>1.2.3 Subsubsection One-Two-Three | ||
1278 | + <STRONG><== Current Position </STRONG></LI> | ||
1279 | + <LI>1.2.4 Subsubsection One-Two-Four</LI> | ||
1280 | + </UL> | ||
1281 | + </LI> | ||
1282 | + <LI>1.3 Subsection One-Three | ||
1283 | + <UL> | ||
1284 | + <LI>...</LI> | ||
1285 | + </UL> | ||
1286 | + </LI> | ||
1287 | + <LI>1.4 Subsection One-Four</LI> | ||
1288 | + </UL> | ||
1289 | + </LI> | ||
1290 | + </UL> | ||
1291 | + | ||
1292 | +<HR SIZE=1> | ||
1293 | +<BR> | ||
1294 | +<FONT SIZE="-1"> | ||
1295 | +This document was generated | ||
1296 | +by <I>root</I> on <I>September, 1 2003</I> | ||
1297 | +using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A> | ||
1298 | +</FONT> | ||
1299 | + | ||
1300 | +</BODY> | ||
1301 | +</HTML> | ||
diff --git a/meta/recipes-extended/time/time.inc b/meta/recipes-extended/time/time.inc new file mode 100644 index 0000000000..85862177b7 --- /dev/null +++ b/meta/recipes-extended/time/time.inc | |||
@@ -0,0 +1,12 @@ | |||
1 | SUMMARY = "Tool that measures CPU resources" | ||
2 | DESCRIPTION = "time measures many of the CPU resources, such as time and \ | ||
3 | memory, that other programs use." | ||
4 | HOMEPAGE = "http://www.gnu.org/software/time/" | ||
5 | SECTION = "utils" | ||
6 | LICENSE = "GPLv2+" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" | ||
8 | |||
9 | inherit texinfo update-alternatives | ||
10 | |||
11 | ALTERNATIVE_${PN} = "time" | ||
12 | ALTERNATIVE_PRIORITY = "100" | ||
diff --git a/meta/recipes-extended/time/time_1.7.bb b/meta/recipes-extended/time/time_1.7.bb new file mode 100644 index 0000000000..92c5353d09 --- /dev/null +++ b/meta/recipes-extended/time/time_1.7.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | require time.inc | ||
2 | |||
3 | PR = "r2" | ||
4 | |||
5 | SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \ | ||
6 | file://debian.patch" | ||
7 | |||
8 | SRC_URI[md5sum] = "e38d2b8b34b1ca259cf7b053caac32b3" | ||
9 | SRC_URI[sha256sum] = "e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d" | ||
10 | |||
11 | inherit autotools | ||
diff --git a/meta/recipes-extended/tzcode/tzcode-native.inc b/meta/recipes-extended/tzcode/tzcode-native.inc new file mode 100644 index 0000000000..4af1e20739 --- /dev/null +++ b/meta/recipes-extended/tzcode/tzcode-native.inc | |||
@@ -0,0 +1,15 @@ | |||
1 | DESCRIPTION = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect" | ||
2 | LICENSE = "PD & BSD" | ||
3 | |||
4 | LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=d0ff93a73dd5bc3c6e724bb4343760f6" | ||
5 | |||
6 | S = "${WORKDIR}" | ||
7 | |||
8 | inherit native | ||
9 | |||
10 | do_install () { | ||
11 | install -d ${D}${bindir}/ | ||
12 | install -m 755 zic ${D}${bindir}/ | ||
13 | install -m 755 zdump ${D}${bindir}/ | ||
14 | install -m 755 tzselect ${D}${bindir}/ | ||
15 | } | ||
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2014h.bb b/meta/recipes-extended/tzcode/tzcode-native_2014h.bb new file mode 100644 index 0000000000..87c5f23847 --- /dev/null +++ b/meta/recipes-extended/tzcode/tzcode-native_2014h.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | # note that we allow for us to use data later than our code version | ||
2 | # | ||
3 | SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \ | ||
4 | ftp://ftp.iana.org/tz/releases/tzdata2014h.tar.gz;name=tzdata" | ||
5 | |||
6 | SRC_URI[tzcode.md5sum] = "8e7741fc769ebdd94d95e5f2c3adbb60" | ||
7 | SRC_URI[tzcode.sha256sum] = "a4d9788a1bb0aa314eae4986ee991425b83ecc47da0e84f626735846be1dbf44" | ||
8 | SRC_URI[tzdata.md5sum] = "ed05111948beba8a0f30956baa46b272" | ||
9 | SRC_URI[tzdata.sha256sum] = "e78152f616fb07c1dea124215ffca57d0de66d8897e00896086542e3de30f69e" | ||
10 | |||
11 | require tzcode-native.inc | ||
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2015b.bb b/meta/recipes-extended/tzcode/tzcode-native_2015b.bb new file mode 100644 index 0000000000..a4ec72d159 --- /dev/null +++ b/meta/recipes-extended/tzcode/tzcode-native_2015b.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | # note that we allow for us to use data later than our code version | ||
2 | # | ||
3 | SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \ | ||
4 | ftp://ftp.iana.org/tz/releases/tzdata2015b.tar.gz;name=tzdata" | ||
5 | |||
6 | SRC_URI[tzcode.md5sum] = "f073a7c9bca7f9fe408491f826e92968" | ||
7 | SRC_URI[tzcode.sha256sum] = "e668f1235b998c90e43ecc93c8535728c65bb01d6bb93d22467e04b5ffa35d76" | ||
8 | SRC_URI[tzdata.md5sum] = "75571bb17c7b6be88a9f8872e45bc726" | ||
9 | SRC_URI[tzdata.sha256sum] = "556ac1a5b3a371adc1ad4e77138f78ddd7f8ddd7bc2b52545924598c7dc8ad62" | ||
10 | require tzcode-native.inc | ||
diff --git a/meta/recipes-extended/tzdata/tzdata.inc b/meta/recipes-extended/tzdata/tzdata.inc new file mode 100644 index 0000000000..37ae92647c --- /dev/null +++ b/meta/recipes-extended/tzdata/tzdata.inc | |||
@@ -0,0 +1,200 @@ | |||
1 | DESCRIPTION = "Timezone data" | ||
2 | HOMEPAGE = "http://www.iana.org/time-zones" | ||
3 | SECTION = "base" | ||
4 | LICENSE = "PD & BSD" | ||
5 | LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=996a9811747aa48db91ed239e5b355a1" | ||
6 | DEPENDS = "tzcode-native" | ||
7 | |||
8 | inherit allarch | ||
9 | |||
10 | RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \ | ||
11 | timezone-arctic timezone-asia timezone-atlantic \ | ||
12 | timezone-australia timezone-europe timezone-indian \ | ||
13 | timezone-iso3166.tab timezone-pacific timezone-zone.tab" | ||
14 | |||
15 | S = "${WORKDIR}" | ||
16 | |||
17 | DEFAULT_TIMEZONE ?= "Universal" | ||
18 | |||
19 | TZONES= "africa antarctica asia australasia europe northamerica southamerica \ | ||
20 | factory etcetera backward systemv \ | ||
21 | " | ||
22 | # pacificnew | ||
23 | |||
24 | do_compile () { | ||
25 | for zone in ${TZONES}; do \ | ||
26 | ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \ | ||
27 | -y ${S}/yearistype.sh ${S}/${zone} ; \ | ||
28 | ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \ | ||
29 | -y ${S}/yearistype.sh ${S}/${zone} ; \ | ||
30 | ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \ | ||
31 | -y ${S}/yearistype.sh ${S}/${zone} ; \ | ||
32 | done | ||
33 | } | ||
34 | |||
35 | do_install () { | ||
36 | install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo | ||
37 | cp -pPR ${S}/$exec_prefix ${D}/ | ||
38 | # libc is removing zoneinfo files from package | ||
39 | cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo | ||
40 | cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo | ||
41 | |||
42 | # Install default timezone | ||
43 | if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then | ||
44 | install -d ${D}${sysconfdir} | ||
45 | echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone | ||
46 | ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime | ||
47 | else | ||
48 | bberror "DEFAULT_TIMEZONE is set to an invalid value." | ||
49 | exit 1 | ||
50 | fi | ||
51 | |||
52 | chown -R root:root ${D} | ||
53 | } | ||
54 | |||
55 | pkg_postinst_${PN} () { | ||
56 | etc_lt="$D${sysconfdir}/localtime" | ||
57 | src="$D${sysconfdir}/timezone" | ||
58 | |||
59 | if [ -e ${src} ] ; then | ||
60 | tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") | ||
61 | fi | ||
62 | |||
63 | if [ -z ${tz} ] ; then | ||
64 | return 0 | ||
65 | fi | ||
66 | |||
67 | if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then | ||
68 | echo "You have an invalid TIMEZONE setting in ${src}" | ||
69 | echo "Your ${etc_lt} has been reset to Universal; enjoy!" | ||
70 | tz="Universal" | ||
71 | echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}" | ||
72 | if [ -L ${etc_lt} ] ; then | ||
73 | rm -f "${etc_lt}" | ||
74 | fi | ||
75 | ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}" | ||
76 | fi | ||
77 | } | ||
78 | |||
79 | # Packages primarily organized by directory with a major city | ||
80 | # in most time zones in the base package | ||
81 | |||
82 | PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \ | ||
83 | tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \ | ||
84 | tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific" | ||
85 | |||
86 | FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*" | ||
87 | RPROVIDES_tzdata-africa = "tzdata-africa" | ||
88 | |||
89 | FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \ | ||
90 | ${datadir}/zoneinfo/US/* \ | ||
91 | ${datadir}/zoneinfo/Brazil/* \ | ||
92 | ${datadir}/zoneinfo/Canada/* \ | ||
93 | ${datadir}/zoneinfo/Mexico/* \ | ||
94 | ${datadir}/zoneinfo/Chile/*" | ||
95 | RPROVIDES_tzdata-americas = "tzdata-americas" | ||
96 | |||
97 | FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*" | ||
98 | RPROVIDES_tzdata-antarctica = "tzdata-antarctica" | ||
99 | |||
100 | FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*" | ||
101 | RPROVIDES_tzdata-arctic = "tzdata-arctic" | ||
102 | |||
103 | FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \ | ||
104 | ${datadir}/zoneinfo/Indian/* \ | ||
105 | ${datadir}/zoneinfo/Mideast/*" | ||
106 | RPROVIDES_tzdata-asia = "tzdata-asia" | ||
107 | |||
108 | FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*" | ||
109 | RPROVIDES_tzdata-atlantic = "tzdata-atlantic" | ||
110 | |||
111 | FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*" | ||
112 | RPROVIDES_tzdata-australia = "tzdata-australia" | ||
113 | |||
114 | FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*" | ||
115 | RPROVIDES_tzdata-europe = "tzdata-europe" | ||
116 | |||
117 | FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*" | ||
118 | RPROVIDES_tzdata-pacific = "tzdata-pacific" | ||
119 | |||
120 | FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*" | ||
121 | RPROVIDES_tzdata-posix = "tzdata-posix" | ||
122 | |||
123 | FILES_tzdata-right += "${datadir}/zoneinfo/right/*" | ||
124 | RPROVIDES_tzdata-right = "tzdata-right" | ||
125 | |||
126 | |||
127 | FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \ | ||
128 | ${datadir}/zoneinfo/Egypt \ | ||
129 | ${datadir}/zoneinfo/Eire \ | ||
130 | ${datadir}/zoneinfo/Factory \ | ||
131 | ${datadir}/zoneinfo/GB-Eire \ | ||
132 | ${datadir}/zoneinfo/Hongkong \ | ||
133 | ${datadir}/zoneinfo/Iceland \ | ||
134 | ${datadir}/zoneinfo/Iran \ | ||
135 | ${datadir}/zoneinfo/Israel \ | ||
136 | ${datadir}/zoneinfo/Jamaica \ | ||
137 | ${datadir}/zoneinfo/Japan \ | ||
138 | ${datadir}/zoneinfo/Kwajalein \ | ||
139 | ${datadir}/zoneinfo/Libya \ | ||
140 | ${datadir}/zoneinfo/Navajo \ | ||
141 | ${datadir}/zoneinfo/Poland \ | ||
142 | ${datadir}/zoneinfo/Portugal \ | ||
143 | ${datadir}/zoneinfo/Singapore \ | ||
144 | ${datadir}/zoneinfo/Turkey" | ||
145 | RPROVIDES_tzdata-misc = "tzdata-misc" | ||
146 | |||
147 | |||
148 | FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \ | ||
149 | ${datadir}/zoneinfo/America/Anchorage \ | ||
150 | ${datadir}/zoneinfo/America/Los_Angeles \ | ||
151 | ${datadir}/zoneinfo/America/Denver \ | ||
152 | ${datadir}/zoneinfo/America/Chicago \ | ||
153 | ${datadir}/zoneinfo/America/New_York \ | ||
154 | ${datadir}/zoneinfo/America/Caracas \ | ||
155 | ${datadir}/zoneinfo/America/Sao_Paulo \ | ||
156 | ${datadir}/zoneinfo/Europe/London \ | ||
157 | ${datadir}/zoneinfo/Europe/Paris \ | ||
158 | ${datadir}/zoneinfo/Africa/Cairo \ | ||
159 | ${datadir}/zoneinfo/Europe/Moscow \ | ||
160 | ${datadir}/zoneinfo/Asia/Dubai \ | ||
161 | ${datadir}/zoneinfo/Asia/Karachi \ | ||
162 | ${datadir}/zoneinfo/Asia/Dhaka \ | ||
163 | ${datadir}/zoneinfo/Asia/Bankok \ | ||
164 | ${datadir}/zoneinfo/Asia/Hong_Kong \ | ||
165 | ${datadir}/zoneinfo/Asia/Tokyo \ | ||
166 | ${datadir}/zoneinfo/Australia/Darwin \ | ||
167 | ${datadir}/zoneinfo/Australia/Adelaide \ | ||
168 | ${datadir}/zoneinfo/Australia/Brisbane \ | ||
169 | ${datadir}/zoneinfo/Australia/Sydney \ | ||
170 | ${datadir}/zoneinfo/Pacific/Noumea \ | ||
171 | ${datadir}/zoneinfo/CET \ | ||
172 | ${datadir}/zoneinfo/CST6CDT \ | ||
173 | ${datadir}/zoneinfo/EET \ | ||
174 | ${datadir}/zoneinfo/EST \ | ||
175 | ${datadir}/zoneinfo/EST5EDT \ | ||
176 | ${datadir}/zoneinfo/GB \ | ||
177 | ${datadir}/zoneinfo/GMT \ | ||
178 | ${datadir}/zoneinfo/GMT+0 \ | ||
179 | ${datadir}/zoneinfo/GMT-0 \ | ||
180 | ${datadir}/zoneinfo/GMT0 \ | ||
181 | ${datadir}/zoneinfo/Greenwich \ | ||
182 | ${datadir}/zoneinfo/HST \ | ||
183 | ${datadir}/zoneinfo/MET \ | ||
184 | ${datadir}/zoneinfo/MST \ | ||
185 | ${datadir}/zoneinfo/MST7MDT \ | ||
186 | ${datadir}/zoneinfo/NZ \ | ||
187 | ${datadir}/zoneinfo/NZ-CHAT \ | ||
188 | ${datadir}/zoneinfo/PRC \ | ||
189 | ${datadir}/zoneinfo/PST8PDT \ | ||
190 | ${datadir}/zoneinfo/ROC \ | ||
191 | ${datadir}/zoneinfo/ROK \ | ||
192 | ${datadir}/zoneinfo/UCT \ | ||
193 | ${datadir}/zoneinfo/UTC \ | ||
194 | ${datadir}/zoneinfo/Universal \ | ||
195 | ${datadir}/zoneinfo/W-SU \ | ||
196 | ${datadir}/zoneinfo/WET \ | ||
197 | ${datadir}/zoneinfo/Zulu \ | ||
198 | ${datadir}/zoneinfo/zone.tab \ | ||
199 | ${datadir}/zoneinfo/iso3166.tab \ | ||
200 | ${datadir}/zoneinfo/Etc/*" | ||
diff --git a/meta/recipes-extended/tzdata/tzdata_2014h.bb b/meta/recipes-extended/tzdata/tzdata_2014h.bb new file mode 100644 index 0000000000..9334a6293b --- /dev/null +++ b/meta/recipes-extended/tzdata/tzdata_2014h.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata" | ||
2 | |||
3 | SRC_URI[tzdata.md5sum] = "ed05111948beba8a0f30956baa46b272" | ||
4 | SRC_URI[tzdata.sha256sum] = "e78152f616fb07c1dea124215ffca57d0de66d8897e00896086542e3de30f69e" | ||
5 | |||
6 | require tzdata.inc | ||
diff --git a/meta/recipes-extended/tzdata/tzdata_2015b.bb b/meta/recipes-extended/tzdata/tzdata_2015b.bb new file mode 100644 index 0000000000..df97d6d34e --- /dev/null +++ b/meta/recipes-extended/tzdata/tzdata_2015b.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata" | ||
2 | |||
3 | SRC_URI[tzdata.md5sum] = "75571bb17c7b6be88a9f8872e45bc726" | ||
4 | SRC_URI[tzdata.sha256sum] = "556ac1a5b3a371adc1ad4e77138f78ddd7f8ddd7bc2b52545924598c7dc8ad62" | ||
5 | |||
6 | require tzdata.inc | ||
diff --git a/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch b/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch new file mode 100644 index 0000000000..9ba3c1dc62 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch | |||
@@ -0,0 +1,402 @@ | |||
1 | From: Giovanni Scafora <giovanni.archlinux.org> | ||
2 | Subject: unzip files encoded with non-latin, non-unicode file names | ||
3 | Last-Update: 2015-02-11 | ||
4 | |||
5 | Upstream-Status: Backport | ||
6 | |||
7 | Updated 2015-02-11 by Marc Deslauriers <marc.deslauriers@canonical.com> | ||
8 | to fix buffer overflow in charset_to_intern() | ||
9 | |||
10 | Signed-off-by: Marc Deslauriers <marc.deslauriers@canonical.com> | ||
11 | |||
12 | Index: unzip-6.0/unix/unix.c | ||
13 | =================================================================== | ||
14 | --- unzip-6.0.orig/unix/unix.c 2015-02-11 08:46:43.675324290 -0500 | ||
15 | +++ unzip-6.0/unix/unix.c 2015-02-11 09:18:04.902081319 -0500 | ||
16 | @@ -30,6 +30,9 @@ | ||
17 | #define UNZIP_INTERNAL | ||
18 | #include "unzip.h" | ||
19 | |||
20 | +#include <iconv.h> | ||
21 | +#include <langinfo.h> | ||
22 | + | ||
23 | #ifdef SCO_XENIX | ||
24 | # define SYSNDIR | ||
25 | #else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */ | ||
26 | @@ -1874,3 +1877,102 @@ | ||
27 | } | ||
28 | } | ||
29 | #endif /* QLZIP */ | ||
30 | + | ||
31 | + | ||
32 | +typedef struct { | ||
33 | + char *local_charset; | ||
34 | + char *archive_charset; | ||
35 | +} CHARSET_MAP; | ||
36 | + | ||
37 | +/* A mapping of local <-> archive charsets used by default to convert filenames | ||
38 | + * of DOS/Windows Zip archives. Currently very basic. */ | ||
39 | +static CHARSET_MAP dos_charset_map[] = { | ||
40 | + { "ANSI_X3.4-1968", "CP850" }, | ||
41 | + { "ISO-8859-1", "CP850" }, | ||
42 | + { "CP1252", "CP850" }, | ||
43 | + { "UTF-8", "CP866" }, | ||
44 | + { "KOI8-R", "CP866" }, | ||
45 | + { "KOI8-U", "CP866" }, | ||
46 | + { "ISO-8859-5", "CP866" } | ||
47 | +}; | ||
48 | + | ||
49 | +char OEM_CP[MAX_CP_NAME] = ""; | ||
50 | +char ISO_CP[MAX_CP_NAME] = ""; | ||
51 | + | ||
52 | +/* Try to guess the default value of OEM_CP based on the current locale. | ||
53 | + * ISO_CP is left alone for now. */ | ||
54 | +void init_conversion_charsets() | ||
55 | +{ | ||
56 | + const char *local_charset; | ||
57 | + int i; | ||
58 | + | ||
59 | + /* Make a guess only if OEM_CP not already set. */ | ||
60 | + if(*OEM_CP == '\0') { | ||
61 | + local_charset = nl_langinfo(CODESET); | ||
62 | + for(i = 0; i < sizeof(dos_charset_map)/sizeof(CHARSET_MAP); i++) | ||
63 | + if(!strcasecmp(local_charset, dos_charset_map[i].local_charset)) { | ||
64 | + strncpy(OEM_CP, dos_charset_map[i].archive_charset, | ||
65 | + sizeof(OEM_CP)); | ||
66 | + break; | ||
67 | + } | ||
68 | + } | ||
69 | +} | ||
70 | + | ||
71 | +/* Convert a string from one encoding to the current locale using iconv(). | ||
72 | + * Be as non-intrusive as possible. If error is encountered during covertion | ||
73 | + * just leave the string intact. */ | ||
74 | +static void charset_to_intern(char *string, char *from_charset) | ||
75 | +{ | ||
76 | + iconv_t cd; | ||
77 | + char *s,*d, *buf; | ||
78 | + size_t slen, dlen, buflen; | ||
79 | + const char *local_charset; | ||
80 | + | ||
81 | + if(*from_charset == '\0') | ||
82 | + return; | ||
83 | + | ||
84 | + buf = NULL; | ||
85 | + local_charset = nl_langinfo(CODESET); | ||
86 | + | ||
87 | + if((cd = iconv_open(local_charset, from_charset)) == (iconv_t)-1) | ||
88 | + return; | ||
89 | + | ||
90 | + slen = strlen(string); | ||
91 | + s = string; | ||
92 | + | ||
93 | + /* Make sure OUTBUFSIZ + 1 never ends up smaller than FILNAMSIZ | ||
94 | + * as this function also gets called with G.outbuf in fileio.c | ||
95 | + */ | ||
96 | + buflen = FILNAMSIZ; | ||
97 | + if (OUTBUFSIZ + 1 < FILNAMSIZ) | ||
98 | + { | ||
99 | + buflen = OUTBUFSIZ + 1; | ||
100 | + } | ||
101 | + | ||
102 | + d = buf = malloc(buflen); | ||
103 | + if(!d) | ||
104 | + goto cleanup; | ||
105 | + | ||
106 | + bzero(buf,buflen); | ||
107 | + dlen = buflen - 1; | ||
108 | + | ||
109 | + if(iconv(cd, &s, &slen, &d, &dlen) == (size_t)-1) | ||
110 | + goto cleanup; | ||
111 | + strncpy(string, buf, buflen); | ||
112 | + | ||
113 | + cleanup: | ||
114 | + free(buf); | ||
115 | + iconv_close(cd); | ||
116 | +} | ||
117 | + | ||
118 | +/* Convert a string from OEM_CP to the current locale charset. */ | ||
119 | +inline void oem_intern(char *string) | ||
120 | +{ | ||
121 | + charset_to_intern(string, OEM_CP); | ||
122 | +} | ||
123 | + | ||
124 | +/* Convert a string from ISO_CP to the current locale charset. */ | ||
125 | +inline void iso_intern(char *string) | ||
126 | +{ | ||
127 | + charset_to_intern(string, ISO_CP); | ||
128 | +} | ||
129 | Index: unzip-6.0/unix/unxcfg.h | ||
130 | =================================================================== | ||
131 | --- unzip-6.0.orig/unix/unxcfg.h 2015-02-11 08:46:43.675324290 -0500 | ||
132 | +++ unzip-6.0/unix/unxcfg.h 2015-02-11 08:46:43.671324260 -0500 | ||
133 | @@ -228,4 +228,30 @@ | ||
134 | /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */ | ||
135 | /* and notfirstcall are used by do_wild(). */ | ||
136 | |||
137 | + | ||
138 | +#define MAX_CP_NAME 25 | ||
139 | + | ||
140 | +#ifdef SETLOCALE | ||
141 | +# undef SETLOCALE | ||
142 | +#endif | ||
143 | +#define SETLOCALE(category, locale) setlocale(category, locale) | ||
144 | +#include <locale.h> | ||
145 | + | ||
146 | +#ifdef _ISO_INTERN | ||
147 | +# undef _ISO_INTERN | ||
148 | +#endif | ||
149 | +#define _ISO_INTERN(str1) iso_intern(str1) | ||
150 | + | ||
151 | +#ifdef _OEM_INTERN | ||
152 | +# undef _OEM_INTERN | ||
153 | +#endif | ||
154 | +#ifndef IZ_OEM2ISO_ARRAY | ||
155 | +# define IZ_OEM2ISO_ARRAY | ||
156 | +#endif | ||
157 | +#define _OEM_INTERN(str1) oem_intern(str1) | ||
158 | + | ||
159 | +void iso_intern(char *); | ||
160 | +void oem_intern(char *); | ||
161 | +void init_conversion_charsets(void); | ||
162 | + | ||
163 | #endif /* !__unxcfg_h */ | ||
164 | Index: unzip-6.0/unzip.c | ||
165 | =================================================================== | ||
166 | --- unzip-6.0.orig/unzip.c 2015-02-11 08:46:43.675324290 -0500 | ||
167 | +++ unzip-6.0/unzip.c 2015-02-11 08:46:43.675324290 -0500 | ||
168 | @@ -327,11 +327,21 @@ | ||
169 | -2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ | ||
170 | -v verbose, multi-page format\n"; | ||
171 | |||
172 | +#ifndef UNIX | ||
173 | static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ | ||
174 | -h print header line -t print totals for listed files or for all\n\ | ||
175 | -z print zipfile comment -T print file times in sortable decimal format\ | ||
176 | \n -C be case-insensitive %s\ | ||
177 | -x exclude filenames that follow from listing\n"; | ||
178 | +#else /* UNIX */ | ||
179 | +static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ | ||
180 | + -h print header line -t print totals for listed files or for all\n\ | ||
181 | + -z print zipfile comment %c-T%c print file times in sortable decimal format\ | ||
182 | +\n %c-C%c be case-insensitive %s\ | ||
183 | + -x exclude filenames that follow from listing\n\ | ||
184 | + -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ | ||
185 | + -I CHARSET specify a character encoding for UNIX and other archives\n"; | ||
186 | +#endif /* !UNIX */ | ||
187 | #ifdef MORE | ||
188 | static ZCONST char Far ZipInfoUsageLine4[] = | ||
189 | " -M page output through built-in \"more\"\n"; | ||
190 | @@ -664,6 +674,17 @@ | ||
191 | -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ | ||
192 | -C match filenames case-insensitively -L make (some) names \ | ||
193 | lowercase\n %-42s -V retain VMS version numbers\n%s"; | ||
194 | +#elif (defined UNIX) | ||
195 | +static ZCONST char Far UnzipUsageLine4[] = "\ | ||
196 | +modifiers:\n\ | ||
197 | + -n never overwrite existing files -q quiet mode (-qq => quieter)\n\ | ||
198 | + -o overwrite files WITHOUT prompting -a auto-convert any text files\n\ | ||
199 | + -j junk paths (do not make directories) -aa treat ALL files as text\n\ | ||
200 | + -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ | ||
201 | + -C match filenames case-insensitively -L make (some) names \ | ||
202 | +lowercase\n %-42s -V retain VMS version numbers\n%s\ | ||
203 | + -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ | ||
204 | + -I CHARSET specify a character encoding for UNIX and other archives\n\n"; | ||
205 | #else /* !VMS */ | ||
206 | static ZCONST char Far UnzipUsageLine4[] = "\ | ||
207 | modifiers:\n\ | ||
208 | @@ -802,6 +823,10 @@ | ||
209 | #endif /* UNICODE_SUPPORT */ | ||
210 | |||
211 | |||
212 | +#ifdef UNIX | ||
213 | + init_conversion_charsets(); | ||
214 | +#endif | ||
215 | + | ||
216 | #if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) | ||
217 | extern void DebugMalloc(void); | ||
218 | |||
219 | @@ -1335,6 +1360,11 @@ | ||
220 | argc = *pargc; | ||
221 | argv = *pargv; | ||
222 | |||
223 | +#ifdef UNIX | ||
224 | + extern char OEM_CP[MAX_CP_NAME]; | ||
225 | + extern char ISO_CP[MAX_CP_NAME]; | ||
226 | +#endif | ||
227 | + | ||
228 | while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { | ||
229 | s = *argv + 1; | ||
230 | while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ | ||
231 | @@ -1516,6 +1546,35 @@ | ||
232 | } | ||
233 | break; | ||
234 | #endif /* MACOS */ | ||
235 | +#ifdef UNIX | ||
236 | + case ('I'): | ||
237 | + if (negative) { | ||
238 | + Info(slide, 0x401, ((char *)slide, | ||
239 | + "error: encodings can't be negated")); | ||
240 | + return(PK_PARAM); | ||
241 | + } else { | ||
242 | + if(*s) { /* Handle the -Icharset case */ | ||
243 | + /* Assume that charsets can't start with a dash to spot arguments misuse */ | ||
244 | + if(*s == '-') { | ||
245 | + Info(slide, 0x401, ((char *)slide, | ||
246 | + "error: a valid character encoding should follow the -I argument")); | ||
247 | + return(PK_PARAM); | ||
248 | + } | ||
249 | + strncpy(ISO_CP, s, sizeof(ISO_CP)); | ||
250 | + } else { /* -I charset */ | ||
251 | + ++argv; | ||
252 | + if(!(--argc > 0 && *argv != NULL && **argv != '-')) { | ||
253 | + Info(slide, 0x401, ((char *)slide, | ||
254 | + "error: a valid character encoding should follow the -I argument")); | ||
255 | + return(PK_PARAM); | ||
256 | + } | ||
257 | + s = *argv; | ||
258 | + strncpy(ISO_CP, s, sizeof(ISO_CP)); | ||
259 | + } | ||
260 | + while(*(++s)); /* No params straight after charset name */ | ||
261 | + } | ||
262 | + break; | ||
263 | +#endif /* ?UNIX */ | ||
264 | case ('j'): /* junk pathnames/directory structure */ | ||
265 | if (negative) | ||
266 | uO.jflag = FALSE, negative = 0; | ||
267 | @@ -1591,6 +1650,35 @@ | ||
268 | } else | ||
269 | ++uO.overwrite_all; | ||
270 | break; | ||
271 | +#ifdef UNIX | ||
272 | + case ('O'): | ||
273 | + if (negative) { | ||
274 | + Info(slide, 0x401, ((char *)slide, | ||
275 | + "error: encodings can't be negated")); | ||
276 | + return(PK_PARAM); | ||
277 | + } else { | ||
278 | + if(*s) { /* Handle the -Ocharset case */ | ||
279 | + /* Assume that charsets can't start with a dash to spot arguments misuse */ | ||
280 | + if(*s == '-') { | ||
281 | + Info(slide, 0x401, ((char *)slide, | ||
282 | + "error: a valid character encoding should follow the -I argument")); | ||
283 | + return(PK_PARAM); | ||
284 | + } | ||
285 | + strncpy(OEM_CP, s, sizeof(OEM_CP)); | ||
286 | + } else { /* -O charset */ | ||
287 | + ++argv; | ||
288 | + if(!(--argc > 0 && *argv != NULL && **argv != '-')) { | ||
289 | + Info(slide, 0x401, ((char *)slide, | ||
290 | + "error: a valid character encoding should follow the -O argument")); | ||
291 | + return(PK_PARAM); | ||
292 | + } | ||
293 | + s = *argv; | ||
294 | + strncpy(OEM_CP, s, sizeof(OEM_CP)); | ||
295 | + } | ||
296 | + while(*(++s)); /* No params straight after charset name */ | ||
297 | + } | ||
298 | + break; | ||
299 | +#endif /* ?UNIX */ | ||
300 | case ('p'): /* pipes: extract to stdout, no messages */ | ||
301 | if (negative) { | ||
302 | uO.cflag = FALSE; | ||
303 | Index: unzip-6.0/unzpriv.h | ||
304 | =================================================================== | ||
305 | --- unzip-6.0.orig/unzpriv.h 2015-02-11 08:46:43.675324290 -0500 | ||
306 | +++ unzip-6.0/unzpriv.h 2015-02-11 08:46:43.675324290 -0500 | ||
307 | @@ -3008,7 +3008,7 @@ | ||
308 | !(((islochdr) || (isuxatt)) && \ | ||
309 | ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \ | ||
310 | (hostnum) == FS_HPFS_ || \ | ||
311 | - ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \ | ||
312 | + ((hostnum) == FS_NTFS_ /* && (hostver) == 50 */ )) { \ | ||
313 | _OEM_INTERN((string)); \ | ||
314 | } else { \ | ||
315 | _ISO_INTERN((string)); \ | ||
316 | Index: unzip-6.0/zipinfo.c | ||
317 | =================================================================== | ||
318 | --- unzip-6.0.orig/zipinfo.c 2015-02-11 08:46:43.675324290 -0500 | ||
319 | +++ unzip-6.0/zipinfo.c 2015-02-11 08:46:43.675324290 -0500 | ||
320 | @@ -457,6 +457,10 @@ | ||
321 | int tflag_slm=TRUE, tflag_2v=FALSE; | ||
322 | int explicit_h=FALSE, explicit_t=FALSE; | ||
323 | |||
324 | +#ifdef UNIX | ||
325 | + extern char OEM_CP[MAX_CP_NAME]; | ||
326 | + extern char ISO_CP[MAX_CP_NAME]; | ||
327 | +#endif | ||
328 | |||
329 | #ifdef MACOS | ||
330 | uO.lflag = LFLAG; /* reset default on each call */ | ||
331 | @@ -501,6 +505,35 @@ | ||
332 | uO.lflag = 0; | ||
333 | } | ||
334 | break; | ||
335 | +#ifdef UNIX | ||
336 | + case ('I'): | ||
337 | + if (negative) { | ||
338 | + Info(slide, 0x401, ((char *)slide, | ||
339 | + "error: encodings can't be negated")); | ||
340 | + return(PK_PARAM); | ||
341 | + } else { | ||
342 | + if(*s) { /* Handle the -Icharset case */ | ||
343 | + /* Assume that charsets can't start with a dash to spot arguments misuse */ | ||
344 | + if(*s == '-') { | ||
345 | + Info(slide, 0x401, ((char *)slide, | ||
346 | + "error: a valid character encoding should follow the -I argument")); | ||
347 | + return(PK_PARAM); | ||
348 | + } | ||
349 | + strncpy(ISO_CP, s, sizeof(ISO_CP)); | ||
350 | + } else { /* -I charset */ | ||
351 | + ++argv; | ||
352 | + if(!(--argc > 0 && *argv != NULL && **argv != '-')) { | ||
353 | + Info(slide, 0x401, ((char *)slide, | ||
354 | + "error: a valid character encoding should follow the -I argument")); | ||
355 | + return(PK_PARAM); | ||
356 | + } | ||
357 | + s = *argv; | ||
358 | + strncpy(ISO_CP, s, sizeof(ISO_CP)); | ||
359 | + } | ||
360 | + while(*(++s)); /* No params straight after charset name */ | ||
361 | + } | ||
362 | + break; | ||
363 | +#endif /* ?UNIX */ | ||
364 | case 'l': /* longer form of "ls -l" type listing */ | ||
365 | if (negative) | ||
366 | uO.lflag = -2, negative = 0; | ||
367 | @@ -521,6 +554,35 @@ | ||
368 | G.M_flag = TRUE; | ||
369 | break; | ||
370 | #endif | ||
371 | +#ifdef UNIX | ||
372 | + case ('O'): | ||
373 | + if (negative) { | ||
374 | + Info(slide, 0x401, ((char *)slide, | ||
375 | + "error: encodings can't be negated")); | ||
376 | + return(PK_PARAM); | ||
377 | + } else { | ||
378 | + if(*s) { /* Handle the -Ocharset case */ | ||
379 | + /* Assume that charsets can't start with a dash to spot arguments misuse */ | ||
380 | + if(*s == '-') { | ||
381 | + Info(slide, 0x401, ((char *)slide, | ||
382 | + "error: a valid character encoding should follow the -I argument")); | ||
383 | + return(PK_PARAM); | ||
384 | + } | ||
385 | + strncpy(OEM_CP, s, sizeof(OEM_CP)); | ||
386 | + } else { /* -O charset */ | ||
387 | + ++argv; | ||
388 | + if(!(--argc > 0 && *argv != NULL && **argv != '-')) { | ||
389 | + Info(slide, 0x401, ((char *)slide, | ||
390 | + "error: a valid character encoding should follow the -O argument")); | ||
391 | + return(PK_PARAM); | ||
392 | + } | ||
393 | + s = *argv; | ||
394 | + strncpy(OEM_CP, s, sizeof(OEM_CP)); | ||
395 | + } | ||
396 | + while(*(++s)); /* No params straight after charset name */ | ||
397 | + } | ||
398 | + break; | ||
399 | +#endif /* ?UNIX */ | ||
400 | case 's': /* default: shorter "ls -l" type listing */ | ||
401 | if (negative) | ||
402 | uO.lflag = -2, negative = 0; | ||
diff --git a/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch b/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch new file mode 100644 index 0000000000..e137f0dc76 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From: sms | ||
2 | Subject: Fix CVE-2014-8139: CRC32 verification heap-based overflow | ||
3 | Bug-Debian: http://bugs.debian.org/773722 | ||
4 | |||
5 | The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
10 | |||
11 | --- a/extract.c | ||
12 | +++ b/extract.c | ||
13 | @@ -298,6 +298,8 @@ | ||
14 | #ifndef SFX | ||
15 | static ZCONST char Far InconsistEFlength[] = "bad extra-field entry:\n \ | ||
16 | EF block length (%u bytes) exceeds remaining EF data (%u bytes)\n"; | ||
17 | + static ZCONST char Far TooSmallEBlength[] = "bad extra-field entry:\n \ | ||
18 | + EF block length (%u bytes) invalid (< %d)\n"; | ||
19 | static ZCONST char Far InvalidComprDataEAs[] = | ||
20 | " invalid compressed data for EAs\n"; | ||
21 | # if (defined(WIN32) && defined(NTSD_EAS)) | ||
22 | @@ -2023,7 +2025,8 @@ | ||
23 | ebID = makeword(ef); | ||
24 | ebLen = (unsigned)makeword(ef+EB_LEN); | ||
25 | |||
26 | - if (ebLen > (ef_len - EB_HEADSIZE)) { | ||
27 | + if (ebLen > (ef_len - EB_HEADSIZE)) | ||
28 | + { | ||
29 | /* Discovered some extra field inconsistency! */ | ||
30 | if (uO.qflag) | ||
31 | Info(slide, 1, ((char *)slide, "%-22s ", | ||
32 | @@ -2158,11 +2161,19 @@ | ||
33 | } | ||
34 | break; | ||
35 | case EF_PKVMS: | ||
36 | - if (makelong(ef+EB_HEADSIZE) != | ||
37 | + if (ebLen < 4) | ||
38 | + { | ||
39 | + Info(slide, 1, | ||
40 | + ((char *)slide, LoadFarString(TooSmallEBlength), | ||
41 | + ebLen, 4)); | ||
42 | + } | ||
43 | + else if (makelong(ef+EB_HEADSIZE) != | ||
44 | crc32(CRCVAL_INITIAL, ef+(EB_HEADSIZE+4), | ||
45 | (extent)(ebLen-4))) | ||
46 | + { | ||
47 | Info(slide, 1, ((char *)slide, | ||
48 | LoadFarString(BadCRC_EAs))); | ||
49 | + } | ||
50 | break; | ||
51 | case EF_PKW32: | ||
52 | case EF_PKUNIX: | ||
diff --git a/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch b/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch new file mode 100644 index 0000000000..edc7d515b0 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From: sms | ||
2 | Subject: Fix CVE-2014-8140: out-of-bounds write issue in test_compr_eb() | ||
3 | Bug-Debian: http://bugs.debian.org/773722 | ||
4 | |||
5 | The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
10 | |||
11 | --- a/extract.c | ||
12 | +++ b/extract.c | ||
13 | @@ -2232,10 +2232,17 @@ | ||
14 | if (compr_offset < 4) /* field is not compressed: */ | ||
15 | return PK_OK; /* do nothing and signal OK */ | ||
16 | |||
17 | + /* Return no/bad-data error status if any problem is found: | ||
18 | + * 1. eb_size is too small to hold the uncompressed size | ||
19 | + * (eb_ucsize). (Else extract eb_ucsize.) | ||
20 | + * 2. eb_ucsize is zero (invalid). 2014-12-04 SMS. | ||
21 | + * 3. eb_ucsize is positive, but eb_size is too small to hold | ||
22 | + * the compressed data header. | ||
23 | + */ | ||
24 | if ((eb_size < (EB_UCSIZE_P + 4)) || | ||
25 | - ((eb_ucsize = makelong(eb+(EB_HEADSIZE+EB_UCSIZE_P))) > 0L && | ||
26 | - eb_size <= (compr_offset + EB_CMPRHEADLEN))) | ||
27 | - return IZ_EF_TRUNC; /* no compressed data! */ | ||
28 | + ((eb_ucsize = makelong( eb+ (EB_HEADSIZE+ EB_UCSIZE_P))) == 0L) || | ||
29 | + ((eb_ucsize > 0L) && (eb_size <= (compr_offset + EB_CMPRHEADLEN)))) | ||
30 | + return IZ_EF_TRUNC; /* no/bad compressed data! */ | ||
31 | |||
32 | if ( | ||
33 | #ifdef INT_16BIT | ||
diff --git a/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch b/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch new file mode 100644 index 0000000000..d0c1db3925 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch | |||
@@ -0,0 +1,144 @@ | |||
1 | From: sms | ||
2 | Subject: Fix CVE-2014-8141: out-of-bounds read issues in getZip64Data() | ||
3 | Bug-Debian: http://bugs.debian.org/773722 | ||
4 | |||
5 | The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
10 | |||
11 | |||
12 | --- a/fileio.c | ||
13 | +++ b/fileio.c | ||
14 | @@ -176,6 +176,8 @@ | ||
15 | #endif | ||
16 | static ZCONST char Far ExtraFieldTooLong[] = | ||
17 | "warning: extra field too long (%d). Ignoring...\n"; | ||
18 | +static ZCONST char Far ExtraFieldCorrupt[] = | ||
19 | + "warning: extra field (type: 0x%04x) corrupt. Continuing...\n"; | ||
20 | |||
21 | #ifdef WINDLL | ||
22 | static ZCONST char Far DiskFullQuery[] = | ||
23 | @@ -2295,7 +2297,12 @@ | ||
24 | if (readbuf(__G__ (char *)G.extra_field, length) == 0) | ||
25 | return PK_EOF; | ||
26 | /* Looks like here is where extra fields are read */ | ||
27 | - getZip64Data(__G__ G.extra_field, length); | ||
28 | + if (getZip64Data(__G__ G.extra_field, length) != PK_COOL) | ||
29 | + { | ||
30 | + Info(slide, 0x401, ((char *)slide, | ||
31 | + LoadFarString( ExtraFieldCorrupt), EF_PKSZ64)); | ||
32 | + error = PK_WARN; | ||
33 | + } | ||
34 | #ifdef UNICODE_SUPPORT | ||
35 | G.unipath_filename = NULL; | ||
36 | if (G.UzO.U_flag < 2) { | ||
37 | --- a/process.c | ||
38 | +++ b/process.c | ||
39 | @@ -1,5 +1,5 @@ | ||
40 | /* | ||
41 | - Copyright (c) 1990-2009 Info-ZIP. All rights reserved. | ||
42 | + Copyright (c) 1990-2014 Info-ZIP. All rights reserved. | ||
43 | |||
44 | See the accompanying file LICENSE, version 2009-Jan-02 or later | ||
45 | (the contents of which are also included in unzip.h) for terms of use. | ||
46 | @@ -1901,48 +1901,82 @@ | ||
47 | and a 4-byte version of disk start number. | ||
48 | Sets both local header and central header fields. Not terribly clever, | ||
49 | but it means that this procedure is only called in one place. | ||
50 | + | ||
51 | + 2014-12-05 SMS. | ||
52 | + Added checks to ensure that enough data are available before calling | ||
53 | + makeint64() or makelong(). Replaced various sizeof() values with | ||
54 | + simple ("4" or "8") constants. (The Zip64 structures do not depend | ||
55 | + on our variable sizes.) Error handling is crude, but we should now | ||
56 | + stay within the buffer. | ||
57 | ---------------------------------------------------------------------------*/ | ||
58 | |||
59 | +#define Z64FLGS 0xffff | ||
60 | +#define Z64FLGL 0xffffffff | ||
61 | + | ||
62 | if (ef_len == 0 || ef_buf == NULL) | ||
63 | return PK_COOL; | ||
64 | |||
65 | Trace((stderr,"\ngetZip64Data: scanning extra field of length %u\n", | ||
66 | ef_len)); | ||
67 | |||
68 | - while (ef_len >= EB_HEADSIZE) { | ||
69 | + while (ef_len >= EB_HEADSIZE) | ||
70 | + { | ||
71 | eb_id = makeword(EB_ID + ef_buf); | ||
72 | eb_len = makeword(EB_LEN + ef_buf); | ||
73 | |||
74 | - if (eb_len > (ef_len - EB_HEADSIZE)) { | ||
75 | - /* discovered some extra field inconsistency! */ | ||
76 | + if (eb_len > (ef_len - EB_HEADSIZE)) | ||
77 | + { | ||
78 | + /* Extra block length exceeds remaining extra field length. */ | ||
79 | Trace((stderr, | ||
80 | "getZip64Data: block length %u > rest ef_size %u\n", eb_len, | ||
81 | ef_len - EB_HEADSIZE)); | ||
82 | break; | ||
83 | } | ||
84 | - if (eb_id == EF_PKSZ64) { | ||
85 | - | ||
86 | + if (eb_id == EF_PKSZ64) | ||
87 | + { | ||
88 | int offset = EB_HEADSIZE; | ||
89 | |||
90 | - if (G.crec.ucsize == 0xffffffff || G.lrec.ucsize == 0xffffffff){ | ||
91 | - G.lrec.ucsize = G.crec.ucsize = makeint64(offset + ef_buf); | ||
92 | - offset += sizeof(G.crec.ucsize); | ||
93 | + if ((G.crec.ucsize == Z64FLGL) || (G.lrec.ucsize == Z64FLGL)) | ||
94 | + { | ||
95 | + if (offset+ 8 > ef_len) | ||
96 | + return PK_ERR; | ||
97 | + | ||
98 | + G.crec.ucsize = G.lrec.ucsize = makeint64(offset + ef_buf); | ||
99 | + offset += 8; | ||
100 | } | ||
101 | - if (G.crec.csize == 0xffffffff || G.lrec.csize == 0xffffffff){ | ||
102 | - G.csize = G.lrec.csize = G.crec.csize = makeint64(offset + ef_buf); | ||
103 | - offset += sizeof(G.crec.csize); | ||
104 | + | ||
105 | + if ((G.crec.csize == Z64FLGL) || (G.lrec.csize == Z64FLGL)) | ||
106 | + { | ||
107 | + if (offset+ 8 > ef_len) | ||
108 | + return PK_ERR; | ||
109 | + | ||
110 | + G.csize = G.crec.csize = G.lrec.csize = makeint64(offset + ef_buf); | ||
111 | + offset += 8; | ||
112 | } | ||
113 | - if (G.crec.relative_offset_local_header == 0xffffffff){ | ||
114 | + | ||
115 | + if (G.crec.relative_offset_local_header == Z64FLGL) | ||
116 | + { | ||
117 | + if (offset+ 8 > ef_len) | ||
118 | + return PK_ERR; | ||
119 | + | ||
120 | G.crec.relative_offset_local_header = makeint64(offset + ef_buf); | ||
121 | - offset += sizeof(G.crec.relative_offset_local_header); | ||
122 | + offset += 8; | ||
123 | } | ||
124 | - if (G.crec.disk_number_start == 0xffff){ | ||
125 | + | ||
126 | + if (G.crec.disk_number_start == Z64FLGS) | ||
127 | + { | ||
128 | + if (offset+ 4 > ef_len) | ||
129 | + return PK_ERR; | ||
130 | + | ||
131 | G.crec.disk_number_start = (zuvl_t)makelong(offset + ef_buf); | ||
132 | - offset += sizeof(G.crec.disk_number_start); | ||
133 | + offset += 4; | ||
134 | } | ||
135 | +#if 0 | ||
136 | + break; /* Expect only one EF_PKSZ64 block. */ | ||
137 | +#endif /* 0 */ | ||
138 | } | ||
139 | |||
140 | - /* Skip this extra field block */ | ||
141 | + /* Skip this extra field block. */ | ||
142 | ef_buf += (eb_len + EB_HEADSIZE); | ||
143 | ef_len -= (eb_len + EB_HEADSIZE); | ||
144 | } | ||
diff --git a/meta/recipes-extended/unzip/unzip/avoid-strip.patch b/meta/recipes-extended/unzip/unzip/avoid-strip.patch new file mode 100644 index 0000000000..8f30e42674 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/avoid-strip.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | unix/Makefile: remove hard coded strip commands | ||
4 | |||
5 | Remove the hard coded strip commands, both LF2 (used in linking) and | ||
6 | STRIP used alone. | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
9 | |||
10 | diff -ur unzip60.orig/unix/configure unzip60/unix/configure | ||
11 | --- unzip60.orig/unix/configure 2009-04-16 14:25:12.000000000 -0500 | ||
12 | +++ unzip60/unix/configure 2011-06-21 11:23:36.822849960 -0500 | ||
13 | @@ -17,7 +17,7 @@ | ||
14 | IZ_BZIP2=${3} | ||
15 | CFLAGS="${CFLAGS} -I. -DUNIX" | ||
16 | LFLAGS1="" | ||
17 | -LFLAGS2="-s" | ||
18 | +LFLAGS2="" | ||
19 | LN="ln -s" | ||
20 | |||
21 | CFLAGS_OPT='' | ||
22 | diff -ur unzip60.orig/unix/Makefile unzip60/unix/Makefile | ||
23 | --- unzip60.orig/unix/Makefile 2009-01-18 16:41:18.000000000 -0600 | ||
24 | +++ unzip60/unix/Makefile 2011-06-21 11:12:22.900003388 -0500 | ||
25 | @@ -52,7 +52,7 @@ | ||
26 | CF = $(CFLAGS) $(CF_NOOPT) | ||
27 | LFLAGS1 = | ||
28 | LF = -o unzip$E $(LFLAGS1) | ||
29 | -LF2 = -s | ||
30 | +LF2 = | ||
31 | |||
32 | # UnZipSFX flags | ||
33 | SL = -o unzipsfx$E $(LFLAGS1) | ||
34 | @@ -70,7 +70,7 @@ | ||
35 | CHMOD = chmod | ||
36 | BINPERMS = 755 | ||
37 | MANPERMS = 644 | ||
38 | -STRIP = strip | ||
39 | +STRIP = | ||
40 | E = | ||
41 | O = .o | ||
42 | M = unix | ||
43 | @@ -776,7 +776,6 @@ | ||
44 | # | ||
45 | gcc: unix_make | ||
46 | $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O3" LF2="" | ||
47 | - $(STRIP) $(UNZIPS) | ||
48 | |||
49 | # Heurikon HK68 (68010), UniPlus+ System V 5.0, Green Hills C-68000 | ||
50 | hk68: unix_make | ||
diff --git a/meta/recipes-extended/unzip/unzip/define-ldflags.patch b/meta/recipes-extended/unzip/unzip/define-ldflags.patch new file mode 100644 index 0000000000..659c6e3315 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/define-ldflags.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | Pass LDFLAGS to the linker | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Mikhail Durnev <Mikhail_Durnev@mentor.com> | ||
6 | |||
7 | diff -Naur old/unix/configure new/unix/configure | ||
8 | --- old/unix/configure 2014-01-13 21:59:27.000000000 +1100 | ||
9 | +++ new/unix/configure 2014-01-14 16:36:02.000000000 +1100 | ||
10 | @@ -16,7 +16,7 @@ | ||
11 | CFLAGSR=${CFLAGS} | ||
12 | IZ_BZIP2=${3} | ||
13 | CFLAGS="${CFLAGS} -I. -DUNIX" | ||
14 | -LFLAGS1="" | ||
15 | +LFLAGS1=${LDFLAGS} | ||
16 | LFLAGS2="" | ||
17 | LN="ln -s" | ||
18 | |||
diff --git a/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff b/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff new file mode 100644 index 0000000000..0a0bfbbb17 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff | |||
@@ -0,0 +1,45 @@ | |||
1 | From 190040ebfcf5395a6ccedede2cc9343d34f0a108 Mon Sep 17 00:00:00 2001 | ||
2 | From: mancha <mancha1 AT zoho DOT com> | ||
3 | Date: Wed, 11 Feb 2015 | ||
4 | Subject: Info-ZIP UnZip buffer overflow | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | By carefully crafting a corrupt ZIP archive with "extra fields" that | ||
9 | purport to have compressed blocks larger than the corresponding | ||
10 | uncompressed blocks in STORED no-compression mode, an attacker can | ||
11 | trigger a heap overflow that can result in application crash or | ||
12 | possibly have other unspecified impact. | ||
13 | |||
14 | This patch ensures that when extra fields use STORED mode, the | ||
15 | "compressed" and uncompressed block sizes match. | ||
16 | |||
17 | Signed-off-by: mancha <mancha1 AT zoho DOT com> | ||
18 | --- | ||
19 | extract.c | 8 ++++++++ | ||
20 | 1 file changed, 8 insertions(+) | ||
21 | |||
22 | --- a/extract.c | ||
23 | +++ b/extract.c | ||
24 | @@ -2217,6 +2217,7 @@ static int test_compr_eb(__G__ eb, eb_si | ||
25 | ulg eb_ucsize; | ||
26 | uch *eb_ucptr; | ||
27 | int r; | ||
28 | + ush method; | ||
29 | |||
30 | if (compr_offset < 4) /* field is not compressed: */ | ||
31 | return PK_OK; /* do nothing and signal OK */ | ||
32 | @@ -2226,6 +2227,13 @@ static int test_compr_eb(__G__ eb, eb_si | ||
33 | eb_size <= (compr_offset + EB_CMPRHEADLEN))) | ||
34 | return IZ_EF_TRUNC; /* no compressed data! */ | ||
35 | |||
36 | + method = makeword(eb + (EB_HEADSIZE + compr_offset)); | ||
37 | + if ((method == STORED) && | ||
38 | + (eb_size - compr_offset - EB_CMPRHEADLEN != eb_ucsize)) | ||
39 | + return PK_ERR; /* compressed & uncompressed | ||
40 | + * should match in STORED | ||
41 | + * method */ | ||
42 | + | ||
43 | if ( | ||
44 | #ifdef INT_16BIT | ||
45 | (((ulg)(extent)eb_ucsize) != eb_ucsize) || | ||
diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb b/meta/recipes-extended/unzip/unzip_6.0.bb new file mode 100644 index 0000000000..e590f8186d --- /dev/null +++ b/meta/recipes-extended/unzip/unzip_6.0.bb | |||
@@ -0,0 +1,44 @@ | |||
1 | SUMMARY = "Utilities for extracting and viewing files in .zip archives" | ||
2 | HOMEPAGE = "http://www.info-zip.org" | ||
3 | SECTION = "console/utils" | ||
4 | LICENSE = "BSD-3-Clause" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29" | ||
6 | PE = "1" | ||
7 | PR = "r5" | ||
8 | |||
9 | SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \ | ||
10 | file://avoid-strip.patch \ | ||
11 | file://define-ldflags.patch \ | ||
12 | file://06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch \ | ||
13 | file://unzip-6.0_overflow3.diff \ | ||
14 | file://09-cve-2014-8139-crc-overflow.patch \ | ||
15 | file://10-cve-2014-8140-test-compr-eb.patch \ | ||
16 | file://11-cve-2014-8141-getzip64data.patch \ | ||
17 | " | ||
18 | |||
19 | SRC_URI[md5sum] = "62b490407489521db863b523a7f86375" | ||
20 | SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37" | ||
21 | S = "${WORKDIR}/unzip60" | ||
22 | |||
23 | # Makefile uses CF_NOOPT instead of CFLAGS. We lifted the values from | ||
24 | # Makefile and add CFLAGS. Optimization will be overriden by unzip | ||
25 | # configure to be -O3. | ||
26 | # | ||
27 | EXTRA_OEMAKE += "STRIP=true LF2='' \ | ||
28 | 'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'" | ||
29 | |||
30 | export LD = "${CC}" | ||
31 | LD_class-native = "${CC}" | ||
32 | |||
33 | do_compile() { | ||
34 | oe_runmake -f unix/Makefile generic | ||
35 | } | ||
36 | |||
37 | do_install() { | ||
38 | oe_runmake -f unix/Makefile install prefix=${D}${prefix} | ||
39 | install -d ${D}${mandir} | ||
40 | mv ${D}${prefix}/man/* ${D}${mandir} | ||
41 | rmdir ${D}${prefix}/man/ | ||
42 | } | ||
43 | |||
44 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/watchdog/files/fix-ping-failure.patch b/meta/recipes-extended/watchdog/files/fix-ping-failure.patch new file mode 100644 index 0000000000..f5976eb5cf --- /dev/null +++ b/meta/recipes-extended/watchdog/files/fix-ping-failure.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | Fix ping mode failure | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | When watchdog works on ping mode, the system will be rebooted since | ||
6 | watchdog can not receive the expected ECOREPLY on a setting interval. | ||
7 | |||
8 | Ping mode uses a raw socket to send a ECO packet, then uses select() | ||
9 | to wait and recvfrom() to receive the ECOREPLY packet, if select() | ||
10 | shows the data is ready, and the data is not the expected ECOREPLY, | ||
11 | and waiting time is not overdue, it will continue use select() and | ||
12 | recvfrom(). | ||
13 | |||
14 | Problem is that the raw socket can receive any icmp packets, if we do | ||
15 | not set filters, and there are many icmp packets on socket, this | ||
16 | program will not find its interested ECOREPLY packet in a special | ||
17 | interval, which makes the ping mode fail. | ||
18 | |||
19 | |||
20 | Other program is that watchdog sometime can not reach the call of | ||
21 | recvfrom to try to receive packets since tv_sec of struct timeval | ||
22 | of select parameter is 0. | ||
23 | |||
24 | The timeout of select() is the result of ping interval minusing the | ||
25 | time of calling gettimeofday spending, when ping interval is 1 second, | ||
26 | and the call of gettimeofday() spends several useconds, the tv_sec of | ||
27 | struct timeval of select parameter must be 0, at that condition, we | ||
28 | should it is valid of tv_sec of struct timeval of select parameter be 0 | ||
29 | |||
30 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
31 | --- | ||
32 | src/net.c | 2 +- | ||
33 | src/watchdog.c | 5 ++++- | ||
34 | 2 files changed, 5 insertions(+), 2 deletions(-) | ||
35 | |||
36 | Index: watchdog-5.13/src/watchdog.c | ||
37 | =================================================================== | ||
38 | --- watchdog-5.13.orig/src/watchdog.c 2013-02-01 03:15:44.000000000 -0800 | ||
39 | +++ watchdog-5.13/src/watchdog.c 2013-03-11 22:27:48.741657881 -0700 | ||
40 | @@ -28,6 +28,7 @@ | ||
41 | #include <sys/types.h> | ||
42 | #include <sys/ioctl.h> | ||
43 | #include <linux/oom.h> | ||
44 | +#include <linux/icmp.h> | ||
45 | #include <linux/watchdog.h> | ||
46 | #include <string.h> | ||
47 | |||
48 | @@ -567,6 +568,8 @@ | ||
49 | pid_t child_pid; | ||
50 | int oom_adjusted = 0; | ||
51 | struct stat s; | ||
52 | + struct icmp_filter filt; | ||
53 | + filt.data = ~(1<<ICMP_ECHOREPLY); | ||
54 | |||
55 | #if USE_SYSLOG | ||
56 | char *opts = "d:i:n:Ffsvbql:p:t:c:r:m:a:"; | ||
57 | @@ -703,7 +706,7 @@ | ||
58 | perror(progname); | ||
59 | exit(1); | ||
60 | } | ||
61 | - | ||
62 | + setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt)); | ||
63 | /* this is necessary for broadcast pings to work */ | ||
64 | (void) setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold)); | ||
65 | |||
diff --git a/meta/recipes-extended/watchdog/files/fixsepbuild.patch b/meta/recipes-extended/watchdog/files/fixsepbuild.patch new file mode 100644 index 0000000000..2fad3a112f --- /dev/null +++ b/meta/recipes-extended/watchdog/files/fixsepbuild.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Fix out of tree build support: | ||
2 | |||
3 | | installing /etc/watchdog.conf | ||
4 | | /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5' | ||
5 | | /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8' | ||
6 | | /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.conf.5 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5' | ||
7 | | /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_keepalive.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_identify.8 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8' | ||
8 | | /usr/bin/install: cannot stat `watchdog.conf': No such file or directory | ||
9 | | make[2]: *** [install-etc-local] Error 1 | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | RP 2013/03/21 | ||
14 | |||
15 | Index: watchdog-5.13/Makefile.am | ||
16 | =================================================================== | ||
17 | --- watchdog-5.13.orig/Makefile.am 2013-02-01 11:15:44.000000000 +0000 | ||
18 | +++ watchdog-5.13/Makefile.am 2013-03-21 11:59:35.637139031 +0000 | ||
19 | @@ -16,7 +16,7 @@ | ||
20 | else \ | ||
21 | echo "installing $(CONFIG_FILENAME)"; \ | ||
22 | $(mkinstalldirs) `dirname $(DESTDIR)$(CONFIG_FILENAME)`; \ | ||
23 | - $(INSTALL_DATA) watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \ | ||
24 | + $(INSTALL_DATA) $(srcdir)/watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \ | ||
25 | fi | ||
26 | |||
27 | install-data-local: install-etc-local | ||
diff --git a/meta/recipes-extended/watchdog/watchdog_5.13.bb b/meta/recipes-extended/watchdog/watchdog_5.13.bb new file mode 100644 index 0000000000..b9e29d22fc --- /dev/null +++ b/meta/recipes-extended/watchdog/watchdog_5.13.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | SUMMARY = "Software watchdog" | ||
2 | DESCRIPTION = "Watchdog is a daemon that checks if your system is still \ | ||
3 | working. If programs in user space are not longer executed \ | ||
4 | it will reboot the system." | ||
5 | HOMEPAGE = "http://watchdog.sourceforge.net/" | ||
6 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" | ||
7 | |||
8 | LICENSE = "GPL-2.0+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569" | ||
10 | |||
11 | SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ | ||
12 | file://fixsepbuild.patch \ | ||
13 | file://fix-ping-failure.patch" | ||
14 | SRC_URI[md5sum] = "153455f008f1cf8f65f6ad9586a21ff1" | ||
15 | SRC_URI[sha256sum] = "141e0faf3ee4d8187a6ff4e00b18ef7b7a4ce432a2d4c8a6e6fdc62507fc6eb0" | ||
16 | |||
17 | inherit autotools | ||
18 | |||
19 | RRECOMMENDS_${PN} = "kernel-module-softdog" | ||
diff --git a/meta/recipes-extended/wget/wget-1.15/wget_cve-2014-4877.patch b/meta/recipes-extended/wget/wget-1.15/wget_cve-2014-4877.patch new file mode 100644 index 0000000000..bfcc36ea9e --- /dev/null +++ b/meta/recipes-extended/wget/wget-1.15/wget_cve-2014-4877.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | From 18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Darshit Shah <darnir@gmail.com> | ||
3 | Date: Sun, 07 Sep 2014 19:11:17 +0000 | ||
4 | Subject: CVE-2014-4877: Arbitrary Symlink Access | ||
5 | |||
6 | Wget was susceptible to a symlink attack which could create arbitrary | ||
7 | files, directories or symbolic links and set their permissions when | ||
8 | retrieving a directory recursively through FTP. This commit changes the | ||
9 | default settings in Wget such that Wget no longer creates local symbolic | ||
10 | links, but rather traverses them and retrieves the pointed-to file in | ||
11 | such a retrieval. | ||
12 | |||
13 | The old behaviour can be attained by passing the --retr-symlinks=no | ||
14 | option to the Wget invokation command. | ||
15 | --- | ||
16 | diff --git a/doc/wget.texi b/doc/wget.texi | ||
17 | index aef1f80..d7a4c94 100644 | ||
18 | --- a/doc/wget.texi | ||
19 | +++ b/doc/wget.texi | ||
20 | @@ -1883,17 +1883,18 @@ Preserve remote file permissions instead of permissions set by umask. | ||
21 | |||
22 | @cindex symbolic links, retrieving | ||
23 | @item --retr-symlinks | ||
24 | -Usually, when retrieving @sc{ftp} directories recursively and a symbolic | ||
25 | -link is encountered, the linked-to file is not downloaded. Instead, a | ||
26 | -matching symbolic link is created on the local filesystem. The | ||
27 | -pointed-to file will not be downloaded unless this recursive retrieval | ||
28 | -would have encountered it separately and downloaded it anyway. | ||
29 | - | ||
30 | -When @samp{--retr-symlinks} is specified, however, symbolic links are | ||
31 | -traversed and the pointed-to files are retrieved. At this time, this | ||
32 | -option does not cause Wget to traverse symlinks to directories and | ||
33 | -recurse through them, but in the future it should be enhanced to do | ||
34 | -this. | ||
35 | +By default, when retrieving @sc{ftp} directories recursively and a symbolic link | ||
36 | +is encountered, the symbolic link is traversed and the pointed-to files are | ||
37 | +retrieved. Currently, Wget does not traverse symbolic links to directories to | ||
38 | +download them recursively, though this feature may be added in the future. | ||
39 | + | ||
40 | +When @samp{--retr-symlinks=no} is specified, the linked-to file is not | ||
41 | +downloaded. Instead, a matching symbolic link is created on the local | ||
42 | +filesystem. The pointed-to file will not be retrieved unless this recursive | ||
43 | +retrieval would have encountered it separately and downloaded it anyway. This | ||
44 | +option poses a security risk where a malicious FTP Server may cause Wget to | ||
45 | +write to files outside of the intended directories through a specially crafted | ||
46 | +@sc{.listing} file. | ||
47 | |||
48 | Note that when retrieving a file (not a directory) because it was | ||
49 | specified on the command-line, rather than because it was recursed to, | ||
50 | diff --git a/src/init.c b/src/init.c | ||
51 | index 09557af..3bdaa48 100644 | ||
52 | --- a/src/init.c | ||
53 | +++ b/src/init.c | ||
54 | @@ -366,6 +366,22 @@ defaults (void) | ||
55 | |||
56 | opt.dns_cache = true; | ||
57 | opt.ftp_pasv = true; | ||
58 | + /* 2014-09-07 Darshit Shah <darnir@gmail.com> | ||
59 | + * opt.retr_symlinks is set to true by default. Creating symbolic links on the | ||
60 | + * local filesystem pose a security threat by malicious FTP Servers that | ||
61 | + * server a specially crafted .listing file akin to this: | ||
62 | + * | ||
63 | + * lrwxrwxrwx 1 root root 33 Dec 25 2012 JoCxl6d8rFU -> / | ||
64 | + * drwxrwxr-x 15 1024 106 4096 Aug 28 02:02 JoCxl6d8rFU | ||
65 | + * | ||
66 | + * A .listing file in this fashion makes Wget susceptiple to a symlink attack | ||
67 | + * wherein the attacker is able to create arbitrary files, directories and | ||
68 | + * symbolic links on the target system and even set permissions. | ||
69 | + * | ||
70 | + * Hence, by default Wget attempts to retrieve the pointed-to files and does | ||
71 | + * not create the symbolic links locally. | ||
72 | + */ | ||
73 | + opt.retr_symlinks = true; | ||
74 | |||
75 | #ifdef HAVE_SSL | ||
76 | opt.check_cert = true; | ||
77 | -- | ||
78 | cgit v0.9.0.2 | ||
diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc new file mode 100644 index 0000000000..87310300e1 --- /dev/null +++ b/meta/recipes-extended/wget/wget.inc | |||
@@ -0,0 +1,23 @@ | |||
1 | SUMMARY = "Console URL download utility supporting HTTP, FTP, etc" | ||
2 | HOMEPAGE = "https://www.gnu.org/software/wget/" | ||
3 | SECTION = "console/network" | ||
4 | LICENSE = "GPLv3" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
6 | |||
7 | DEPENDS = "gnutls zlib libpcre" | ||
8 | DEPENDS_class-nativesdk = "nativesdk-gnutls nativesdk-zlib nativesdk-libpcre" | ||
9 | |||
10 | INC_PR = "r16" | ||
11 | |||
12 | inherit autotools gettext texinfo update-alternatives | ||
13 | |||
14 | EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \ | ||
15 | --without-libgnutls-prefix ac_cv_header_uuid_uuid_h=no" | ||
16 | |||
17 | ALTERNATIVE_${PN} = "wget" | ||
18 | ALTERNATIVE_${PN}_class-nativesdk = "" | ||
19 | ALTERNATIVE_PRIORITY = "100" | ||
20 | |||
21 | RRECOMMENDS_${PN} += "ca-certificates" | ||
22 | |||
23 | BBCLASSEXTEND += "nativesdk" | ||
diff --git a/meta/recipes-extended/wget/wget/fix_makefile.patch b/meta/recipes-extended/wget/wget/fix_makefile.patch new file mode 100644 index 0000000000..8ad7c62cdf --- /dev/null +++ b/meta/recipes-extended/wget/wget/fix_makefile.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | |||
2 | Upstream-Status: Pending | ||
3 | |||
4 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
5 | |||
6 | Index: wget-1.12/po/Makefile.in.in | ||
7 | =================================================================== | ||
8 | --- wget-1.12.orig/po/Makefile.in.in 2009-09-04 09:31:54.000000000 -0700 | ||
9 | +++ wget-1.12/po/Makefile.in.in 2011-10-19 20:32:53.714812160 -0700 | ||
10 | @@ -8,8 +8,8 @@ | ||
11 | # Please note that the actual code of GNU gettext is covered by the GNU | ||
12 | # General Public License and is *not* in the public domain. | ||
13 | # | ||
14 | -# Origin: gettext-0.17 | ||
15 | -GETTEXT_MACRO_VERSION = 0.17 | ||
16 | +# Origin: gettext-0.18 | ||
17 | +GETTEXT_MACRO_VERSION = 0.18 | ||
18 | |||
19 | PACKAGE = @PACKAGE@ | ||
20 | VERSION = @VERSION@ | ||
21 | Index: wget-1.12/configure.ac | ||
22 | =================================================================== | ||
23 | --- wget-1.12.orig/configure.ac 2009-09-22 09:39:49.000000000 -0700 | ||
24 | +++ wget-1.12/configure.ac 2011-10-19 20:32:53.714812160 -0700 | ||
25 | @@ -110,7 +110,7 @@ | ||
26 | dnl Gettext | ||
27 | dnl | ||
28 | AM_GNU_GETTEXT([external],[need-ngettext]) | ||
29 | -AM_GNU_GETTEXT_VERSION([0.17]) | ||
30 | +AM_GNU_GETTEXT_VERSION([0.18]) | ||
31 | |||
32 | AC_PROG_RANLIB | ||
33 | |||
diff --git a/meta/recipes-extended/wget/wget_1.15.bb b/meta/recipes-extended/wget/wget_1.15.bb new file mode 100644 index 0000000000..5375e4e504 --- /dev/null +++ b/meta/recipes-extended/wget/wget_1.15.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \ | ||
2 | file://fix_makefile.patch \ | ||
3 | file://wget_cve-2014-4877.patch \ | ||
4 | " | ||
5 | SRC_URI[md5sum] = "506df41295afc6486662cc47470b4618" | ||
6 | SRC_URI[sha256sum] = "52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd" | ||
7 | |||
8 | require wget.inc | ||
diff --git a/meta/recipes-extended/which/which-2.18/automake-foreign.patch b/meta/recipes-extended/which/which-2.18/automake-foreign.patch new file mode 100644 index 0000000000..8ab1d028eb --- /dev/null +++ b/meta/recipes-extended/which/which-2.18/automake-foreign.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Subject: [PATCH] automake foreign strictness | ||
2 | |||
3 | Use foreign strictness to avoid automake errors. | ||
4 | |||
5 | Upstream-Status: Inappropriate [upstream no longer active] | ||
6 | |||
7 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
8 | --- | ||
9 | configure.ac | 5 +++-- | ||
10 | 1 files changed, 3 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/configure.ac b/configure.ac | ||
13 | index b30b6f5..bd3222c 100644 | ||
14 | --- a/configure.ac | ||
15 | +++ b/configure.ac | ||
16 | @@ -1,6 +1,7 @@ | ||
17 | dnl Process this file with autoconf to produce a configure script. | ||
18 | -AC_INIT(which.c) | ||
19 | -AM_INIT_AUTOMAKE(which, 2.18) | ||
20 | +AC_INIT([which],[2.18]) | ||
21 | +AC_CONFIG_SRCDIR(which.c) | ||
22 | +AM_INIT_AUTOMAKE([foreign]) | ||
23 | AM_CONFIG_HEADER(config.h) | ||
24 | AM_MAINTAINER_MODE | ||
25 | |||
26 | -- | ||
27 | 1.7.1 | ||
diff --git a/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch new file mode 100644 index 0000000000..fb9b1a4083 --- /dev/null +++ b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | Upstream-Status: Inappropriate [this is 2.18(GPLv2) specific] | ||
2 | |||
3 | # glibc also implements the function group_member. To avoid name conflict, | ||
4 | # here let us append a "_" to which's version. | ||
5 | # | ||
6 | # Signed-off-by Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20 | ||
7 | # (this patch is licensed under GPLv2) | ||
8 | |||
9 | --- which-2.18/bash.c | ||
10 | +++ which-2.18/bash.c | ||
11 | @@ -45,7 +45,12 @@ | ||
12 | * - changed all occurences of 'gid_t' into 'GID_T'. | ||
13 | * - exported functions needed in which.c | ||
14 | */ | ||
15 | -static int group_member (GID_T gid); | ||
16 | + | ||
17 | +/* | ||
18 | + * glibc also implements the function group_member. To avoid name conflict, | ||
19 | + * here let us append a "_" to which's version. | ||
20 | + */ | ||
21 | +static int _group_member (GID_T gid); | ||
22 | static char* extract_colon_unit (char const* string, int *p_index); | ||
23 | |||
24 | /*=========================================================================== | ||
25 | @@ -200,8 +205,8 @@ | ||
26 | |||
27 | /* From bash-2.05b / general.c / line 805 */ | ||
28 | /* Return non-zero if GID is one that we have in our groups list. */ | ||
29 | -int | ||
30 | -group_member (GID_T gid) | ||
31 | +static int | ||
32 | +_group_member (GID_T gid) | ||
33 | { | ||
34 | #if defined (HAVE_GETGROUPS) | ||
35 | register int i; | ||
36 | @@ -290,7 +295,7 @@ | ||
37 | return (X_BIT (u_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS; | ||
38 | |||
39 | /* Otherwise, if we are in the owning group, the group permissions apply. */ | ||
40 | - if (group_member (finfo.st_gid)) | ||
41 | + if (_group_member (finfo.st_gid)) | ||
42 | return (X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS; | ||
43 | |||
44 | /* Otherwise, if we are in the other group, the other permissions apply. */ | ||
45 | @@ -331,7 +336,7 @@ | ||
46 | /* Given a string containing units of information separated by colons, | ||
47 | return the next one pointed to by (P_INDEX), or NULL if there are no more. | ||
48 | Advance (P_INDEX) to the character after the colon. */ | ||
49 | -char* | ||
50 | +static char* | ||
51 | extract_colon_unit (char const* string, int* p_index) | ||
52 | { | ||
53 | int i, start, len; | ||
diff --git a/meta/recipes-extended/which/which-2.20/automake.patch b/meta/recipes-extended/which/which-2.20/automake.patch new file mode 100644 index 0000000000..92365dd854 --- /dev/null +++ b/meta/recipes-extended/which/which-2.20/automake.patch | |||
@@ -0,0 +1,10 @@ | |||
1 | diff --git a/configure.ac b/configure.ac | ||
2 | index d974461..a20dfa8 100644 | ||
3 | --- a/configure.ac | ||
4 | +++ b/configure.ac | ||
5 | @@ -2,2 +2,3 @@ dnl Process this file with autoconf to produce a configure script. | ||
6 | -AC_INIT(which.c) | ||
7 | -AM_INIT_AUTOMAKE(which, 2.20) | ||
8 | +AC_INIT([which],[2.20]) | ||
9 | +AC_CONFIG_SRCDIR(which.c) | ||
10 | +AM_INIT_AUTOMAKE([foreign]) | ||
diff --git a/meta/recipes-extended/which/which-2.20/remove-declaration.patch b/meta/recipes-extended/which/which-2.20/remove-declaration.patch new file mode 100644 index 0000000000..d3340a3530 --- /dev/null +++ b/meta/recipes-extended/which/which-2.20/remove-declaration.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | Remove the declaration of group_member since it has already been | ||
2 | declared in unistd.h | ||
3 | |||
4 | Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> | ||
5 | |||
6 | Upstream-Status: Inappropriate [embedded specific] | ||
7 | |||
8 | diff -ruN which-2.20-orig/bash.c which-2.20/bash.c | ||
9 | --- which-2.20-orig/bash.c 2010-08-03 12:59:08.897088878 +0800 | ||
10 | +++ which-2.20/bash.c 2010-08-03 13:17:23.406097212 +0800 | ||
11 | @@ -46,7 +46,6 @@ | ||
12 | * - changed all occurences of 'gid_t' into 'GID_T'. | ||
13 | * - exported functions needed in which.c | ||
14 | */ | ||
15 | -static int group_member (GID_T gid); | ||
16 | static char* extract_colon_unit (char const* string, int* p_index); | ||
17 | |||
18 | /*=========================================================================== | ||
diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb new file mode 100644 index 0000000000..eb6cc9967e --- /dev/null +++ b/meta/recipes-extended/which/which_2.18.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | SUMMARY = "Displays the full path of shell commands" | ||
2 | DESCRIPTION = "Which is a utility that prints out the full path of the \ | ||
3 | executables that bash(1) would execute when the passed \ | ||
4 | program names would have been entered on the shell prompt. \ | ||
5 | It does this by using the exact same algorithm as bash." | ||
6 | SECTION = "libs" | ||
7 | HOMEPAGE = "http://carlo17.home.xs4all.nl/which/" | ||
8 | |||
9 | LICENSE = "GPLv2+" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
11 | |||
12 | PR = "r2" | ||
13 | |||
14 | SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/which/which-2.18.tar.gz/42d51938e48b91f6e19fabf216f5c3e9/which-${PV}.tar.gz \ | ||
15 | file://fix_name_conflict_group_member.patch \ | ||
16 | file://automake-foreign.patch \ | ||
17 | " | ||
18 | |||
19 | SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9" | ||
20 | SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544" | ||
21 | |||
22 | DEPENDS = "cwautomacros-native" | ||
23 | |||
24 | inherit autotools texinfo update-alternatives | ||
25 | |||
26 | do_configure_prepend() { | ||
27 | OLD="@ACLOCAL_CWFLAGS@" | ||
28 | NEW="-I ${STAGING_DIR_NATIVE}/${datadir}/cwautomacros/m4" | ||
29 | sed -i "s#${OLD}#${NEW}#g" `grep -rl ${OLD} ${S}` | ||
30 | } | ||
31 | |||
32 | ALTERNATIVE_${PN} = "which" | ||
33 | ALTERNATIVE_PRIORITY = "100" | ||
34 | |||
diff --git a/meta/recipes-extended/which/which_2.20.bb b/meta/recipes-extended/which/which_2.20.bb new file mode 100644 index 0000000000..74835543de --- /dev/null +++ b/meta/recipes-extended/which/which_2.20.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "Displays the full path of shell commands" | ||
2 | DESCRIPTION = "Which is a utility that prints out the full path of the \ | ||
3 | executables that bash(1) would execute when the passed \ | ||
4 | program names would have been entered on the shell prompt. \ | ||
5 | It does this by using the exact same algorithm as bash." | ||
6 | SECTION = "libs" | ||
7 | HOMEPAGE = "http://carlo17.home.xs4all.nl/which/" | ||
8 | |||
9 | LICENSE = "GPLv3+" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\ | ||
11 | file://which.c;beginline=1;endline=17;md5=a9963693af2272e7a8df6f231164e7a2" | ||
12 | DEPENDS = "cwautomacros-native" | ||
13 | |||
14 | inherit autotools texinfo update-alternatives | ||
15 | |||
16 | PR = "r3" | ||
17 | |||
18 | EXTRA_OECONF = "--disable-iberty" | ||
19 | |||
20 | SRC_URI = "${GNU_MIRROR}/which/which-${PV}.tar.gz \ | ||
21 | file://automake.patch \ | ||
22 | file://remove-declaration.patch" | ||
23 | |||
24 | SRC_URI[md5sum] = "95be0501a466e515422cde4af46b2744" | ||
25 | SRC_URI[sha256sum] = "d417b65c650d88ad26a208293c1c6e3eb60d4b6d847f01ff8f66aca63e2857f8" | ||
26 | |||
27 | do_configure_prepend() { | ||
28 | sed -i -e 's%@ACLOCAL_CWFLAGS@%-I ${STAGING_DIR_NATIVE}/usr/share/cwautomacros/m4%g' ${S}/Makefile.am ${S}/tilde/Makefile.am | ||
29 | } | ||
30 | |||
31 | ALTERNATIVE_${PN} = "which" | ||
32 | ALTERNATIVE_PRIORITY = "100" | ||
diff --git a/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch b/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch new file mode 100644 index 0000000000..6d5cc2f917 --- /dev/null +++ b/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch | |||
@@ -0,0 +1,672 @@ | |||
1 | From 174aa7206f4b308d4d2292bb8067a07d8cc715c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 29 Apr 2014 07:29:32 +0200 | ||
4 | Subject: [PATCH] Reinstate xdg-terminal | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | |||
8 | Upstream-status: Inappropriate [Revert] | ||
9 | --- | ||
10 | scripts/Makefile.in | 6 +- | ||
11 | scripts/xdg-terminal | 622 +++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
12 | 2 files changed, 625 insertions(+), 3 deletions(-) | ||
13 | create mode 100755 scripts/xdg-terminal | ||
14 | |||
15 | diff --git a/scripts/Makefile.in b/scripts/Makefile.in | ||
16 | index 2c7d2ac..bef10d1 100644 | ||
17 | --- a/scripts/Makefile.in | ||
18 | +++ b/scripts/Makefile.in | ||
19 | @@ -20,11 +20,11 @@ SCRIPTS = \ | ||
20 | xdg-open \ | ||
21 | xdg-email \ | ||
22 | xdg-screensaver \ | ||
23 | - xdg-settings | ||
24 | + xdg-settings \ | ||
25 | + xdg-terminal | ||
26 | # xdg-su | ||
27 | # xdg-copy \ | ||
28 | # xdg-file-dialog | ||
29 | -# xdg-terminal | ||
30 | |||
31 | MANPAGES= $(SCRIPTS:%=man/%.1) | ||
32 | WEBPAGES= $(SCRIPTS:%=%.html) | ||
33 | @@ -42,7 +42,7 @@ release: scripts html man | ||
34 | rm -f xdg-*.in *~ HACKING generate-help-script.awk | ||
35 | rm -rf desc/ | ||
36 | rm -rf xsl/ | ||
37 | - rm -f xdg-file-dialog xdg-su xdg-copy xdg-terminal | ||
38 | + rm -f xdg-file-dialog xdg-su xdg-copy | ||
39 | |||
40 | distclean: clean | ||
41 | rm -f Makefile | ||
42 | diff --git a/scripts/xdg-terminal b/scripts/xdg-terminal | ||
43 | new file mode 100755 | ||
44 | index 0000000..4bd9205 | ||
45 | --- /dev/null | ||
46 | +++ b/scripts/xdg-terminal | ||
47 | @@ -0,0 +1,622 @@ | ||
48 | +#!/bin/sh | ||
49 | +#--------------------------------------------- | ||
50 | +# xdg-terminal | ||
51 | +# | ||
52 | +# Utility script to open the registered terminal emulator | ||
53 | +# | ||
54 | +# Refer to the usage() function below for usage. | ||
55 | +# | ||
56 | +# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> | ||
57 | +# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> | ||
58 | +# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at> | ||
59 | +# | ||
60 | +# LICENSE: | ||
61 | +# | ||
62 | +# Permission is hereby granted, free of charge, to any person obtaining a | ||
63 | +# copy of this software and associated documentation files (the "Software"), | ||
64 | +# to deal in the Software without restriction, including without limitation | ||
65 | +# the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
66 | +# and/or sell copies of the Software, and to permit persons to whom the | ||
67 | +# Software is furnished to do so, subject to the following conditions: | ||
68 | +# | ||
69 | +# The above copyright notice and this permission notice shall be included | ||
70 | +# in all copies or substantial portions of the Software. | ||
71 | +# | ||
72 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
73 | +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
74 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
75 | +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
76 | +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
77 | +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
78 | +# OTHER DEALINGS IN THE SOFTWARE. | ||
79 | +# | ||
80 | +#--------------------------------------------- | ||
81 | + | ||
82 | +manualpage() | ||
83 | +{ | ||
84 | +cat << _MANUALPAGE | ||
85 | +Name | ||
86 | + | ||
87 | + xdg-terminal - opens the user's preferred terminal emulator application | ||
88 | + | ||
89 | +Synopsis | ||
90 | + | ||
91 | + xdg-terminal [command] | ||
92 | + | ||
93 | + xdg-terminal { --help | --manual | --version } | ||
94 | + | ||
95 | +Description | ||
96 | + | ||
97 | + xdg-terminal opens the user's preferred terminal emulator application. If | ||
98 | + a command is provided the command will be executed by the shell within the | ||
99 | + newly opened terminal window. | ||
100 | + | ||
101 | + xdg-terminal is for use inside a desktop session only. It is not | ||
102 | + recommended to use xdg-terminal as root. | ||
103 | + | ||
104 | +Options | ||
105 | + | ||
106 | + --help | ||
107 | + Show command synopsis. | ||
108 | + | ||
109 | + --manual | ||
110 | + Show this manual page. | ||
111 | + | ||
112 | + --version | ||
113 | + Show the xdg-utils version information. | ||
114 | + | ||
115 | +Exit Codes | ||
116 | + | ||
117 | + An exit code of 0 indicates success while a non-zero exit code indicates | ||
118 | + failure. The following failure codes can be returned: | ||
119 | + | ||
120 | + 1 | ||
121 | + Error in command line syntax. | ||
122 | + | ||
123 | + 3 | ||
124 | + A required tool could not be found. | ||
125 | + | ||
126 | + 4 | ||
127 | + The action failed. | ||
128 | + | ||
129 | +Examples | ||
130 | + | ||
131 | + xdg-terminal | ||
132 | + | ||
133 | + Opens the user's default terminal emulator, just starting an interactive | ||
134 | + shell. | ||
135 | + | ||
136 | + xdg-terminal top | ||
137 | + | ||
138 | + Opens the user's default terminal emulator and lets it run the top | ||
139 | + executable. | ||
140 | +_MANUALPAGE | ||
141 | +} | ||
142 | + | ||
143 | +usage() | ||
144 | +{ | ||
145 | +cat << _USAGE | ||
146 | + xdg-terminal - opens the user's preferred terminal emulator application | ||
147 | + | ||
148 | +Synopsis | ||
149 | + | ||
150 | + xdg-terminal [command] | ||
151 | + | ||
152 | + xdg-terminal { --help | --manual | --version } | ||
153 | + | ||
154 | +_USAGE | ||
155 | +} | ||
156 | + | ||
157 | +#@xdg-utils-common@ | ||
158 | + | ||
159 | +#---------------------------------------------------------------------------- | ||
160 | +# Common utility functions included in all XDG wrapper scripts | ||
161 | +#---------------------------------------------------------------------------- | ||
162 | + | ||
163 | +DEBUG() | ||
164 | +{ | ||
165 | + [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0; | ||
166 | + [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; | ||
167 | + shift | ||
168 | + echo "$@" >&2 | ||
169 | +} | ||
170 | + | ||
171 | +# This handles backslashes but not quote marks. | ||
172 | +first_word() | ||
173 | +{ | ||
174 | + read first rest | ||
175 | + echo "$first" | ||
176 | +} | ||
177 | + | ||
178 | +#------------------------------------------------------------- | ||
179 | +# map a binary to a .desktop file | ||
180 | +binary_to_desktop_file() | ||
181 | +{ | ||
182 | + search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" | ||
183 | + binary="`which "$1"`" | ||
184 | + binary="`readlink -f "$binary"`" | ||
185 | + base="`basename "$binary"`" | ||
186 | + IFS=: | ||
187 | + for dir in $search; do | ||
188 | + unset IFS | ||
189 | + [ "$dir" ] || continue | ||
190 | + [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue | ||
191 | + for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do | ||
192 | + [ -r "$file" ] || continue | ||
193 | + # Check to make sure it's worth the processing. | ||
194 | + grep -q "^Exec.*$base" "$file" || continue | ||
195 | + # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop"). | ||
196 | + grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue | ||
197 | + command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" | ||
198 | + command="`which "$command"`" | ||
199 | + if [ x"`readlink -f "$command"`" = x"$binary" ]; then | ||
200 | + # Fix any double slashes that got added path composition | ||
201 | + echo "$file" | sed -e 's,//*,/,g' | ||
202 | + return | ||
203 | + fi | ||
204 | + done | ||
205 | + done | ||
206 | +} | ||
207 | + | ||
208 | +#------------------------------------------------------------- | ||
209 | +# map a .desktop file to a binary | ||
210 | +## FIXME: handle vendor dir case | ||
211 | +desktop_file_to_binary() | ||
212 | +{ | ||
213 | + search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" | ||
214 | + desktop="`basename "$1"`" | ||
215 | + IFS=: | ||
216 | + for dir in $search; do | ||
217 | + unset IFS | ||
218 | + [ "$dir" ] && [ -d "$dir/applications" ] || continue | ||
219 | + file="$dir/applications/$desktop" | ||
220 | + [ -r "$file" ] || continue | ||
221 | + # Remove any arguments (%F, %f, %U, %u, etc.). | ||
222 | + command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" | ||
223 | + command="`which "$command"`" | ||
224 | + readlink -f "$command" | ||
225 | + return | ||
226 | + done | ||
227 | +} | ||
228 | + | ||
229 | +#------------------------------------------------------------- | ||
230 | +# Exit script on successfully completing the desired operation | ||
231 | + | ||
232 | +exit_success() | ||
233 | +{ | ||
234 | + if [ $# -gt 0 ]; then | ||
235 | + echo "$@" | ||
236 | + echo | ||
237 | + fi | ||
238 | + | ||
239 | + exit 0 | ||
240 | +} | ||
241 | + | ||
242 | + | ||
243 | +#----------------------------------------- | ||
244 | +# Exit script on malformed arguments, not enough arguments | ||
245 | +# or missing required option. | ||
246 | +# prints usage information | ||
247 | + | ||
248 | +exit_failure_syntax() | ||
249 | +{ | ||
250 | + if [ $# -gt 0 ]; then | ||
251 | + echo "xdg-terminal: $@" >&2 | ||
252 | + echo "Try 'xdg-terminal --help' for more information." >&2 | ||
253 | + else | ||
254 | + usage | ||
255 | + echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info." | ||
256 | + fi | ||
257 | + | ||
258 | + exit 1 | ||
259 | +} | ||
260 | + | ||
261 | +#------------------------------------------------------------- | ||
262 | +# Exit script on missing file specified on command line | ||
263 | + | ||
264 | +exit_failure_file_missing() | ||
265 | +{ | ||
266 | + if [ $# -gt 0 ]; then | ||
267 | + echo "xdg-terminal: $@" >&2 | ||
268 | + fi | ||
269 | + | ||
270 | + exit 2 | ||
271 | +} | ||
272 | + | ||
273 | +#------------------------------------------------------------- | ||
274 | +# Exit script on failure to locate necessary tool applications | ||
275 | + | ||
276 | +exit_failure_operation_impossible() | ||
277 | +{ | ||
278 | + if [ $# -gt 0 ]; then | ||
279 | + echo "xdg-terminal: $@" >&2 | ||
280 | + fi | ||
281 | + | ||
282 | + exit 3 | ||
283 | +} | ||
284 | + | ||
285 | +#------------------------------------------------------------- | ||
286 | +# Exit script on failure returned by a tool application | ||
287 | + | ||
288 | +exit_failure_operation_failed() | ||
289 | +{ | ||
290 | + if [ $# -gt 0 ]; then | ||
291 | + echo "xdg-terminal: $@" >&2 | ||
292 | + fi | ||
293 | + | ||
294 | + exit 4 | ||
295 | +} | ||
296 | + | ||
297 | +#------------------------------------------------------------ | ||
298 | +# Exit script on insufficient permission to read a specified file | ||
299 | + | ||
300 | +exit_failure_file_permission_read() | ||
301 | +{ | ||
302 | + if [ $# -gt 0 ]; then | ||
303 | + echo "xdg-terminal: $@" >&2 | ||
304 | + fi | ||
305 | + | ||
306 | + exit 5 | ||
307 | +} | ||
308 | + | ||
309 | +#------------------------------------------------------------ | ||
310 | +# Exit script on insufficient permission to write a specified file | ||
311 | + | ||
312 | +exit_failure_file_permission_write() | ||
313 | +{ | ||
314 | + if [ $# -gt 0 ]; then | ||
315 | + echo "xdg-terminal: $@" >&2 | ||
316 | + fi | ||
317 | + | ||
318 | + exit 6 | ||
319 | +} | ||
320 | + | ||
321 | +check_input_file() | ||
322 | +{ | ||
323 | + if [ ! -e "$1" ]; then | ||
324 | + exit_failure_file_missing "file '$1' does not exist" | ||
325 | + fi | ||
326 | + if [ ! -r "$1" ]; then | ||
327 | + exit_failure_file_permission_read "no permission to read file '$1'" | ||
328 | + fi | ||
329 | +} | ||
330 | + | ||
331 | +check_vendor_prefix() | ||
332 | +{ | ||
333 | + file_label="$2" | ||
334 | + [ -n "$file_label" ] || file_label="filename" | ||
335 | + file=`basename "$1"` | ||
336 | + case "$file" in | ||
337 | + [[:alpha:]]*-*) | ||
338 | + return | ||
339 | + ;; | ||
340 | + esac | ||
341 | + | ||
342 | + echo "xdg-terminal: $file_label '$file' does not have a proper vendor prefix" >&2 | ||
343 | + echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2 | ||
344 | + echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2 | ||
345 | + echo "Use --novendor to override or 'xdg-terminal --manual' for additional info." >&2 | ||
346 | + exit 1 | ||
347 | +} | ||
348 | + | ||
349 | +check_output_file() | ||
350 | +{ | ||
351 | + # if the file exists, check if it is writeable | ||
352 | + # if it does not exists, check if we are allowed to write on the directory | ||
353 | + if [ -e "$1" ]; then | ||
354 | + if [ ! -w "$1" ]; then | ||
355 | + exit_failure_file_permission_write "no permission to write to file '$1'" | ||
356 | + fi | ||
357 | + else | ||
358 | + DIR=`dirname "$1"` | ||
359 | + if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then | ||
360 | + exit_failure_file_permission_write "no permission to create file '$1'" | ||
361 | + fi | ||
362 | + fi | ||
363 | +} | ||
364 | + | ||
365 | +#---------------------------------------- | ||
366 | +# Checks for shared commands, e.g. --help | ||
367 | + | ||
368 | +check_common_commands() | ||
369 | +{ | ||
370 | + while [ $# -gt 0 ] ; do | ||
371 | + parm="$1" | ||
372 | + shift | ||
373 | + | ||
374 | + case "$parm" in | ||
375 | + --help) | ||
376 | + usage | ||
377 | + echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info." | ||
378 | + exit_success | ||
379 | + ;; | ||
380 | + | ||
381 | + --manual) | ||
382 | + manualpage | ||
383 | + exit_success | ||
384 | + ;; | ||
385 | + | ||
386 | + --version) | ||
387 | + echo "xdg-terminal 1.1.0 rc1" | ||
388 | + exit_success | ||
389 | + ;; | ||
390 | + esac | ||
391 | + done | ||
392 | +} | ||
393 | + | ||
394 | +check_common_commands "$@" | ||
395 | + | ||
396 | +[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL; | ||
397 | +if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then | ||
398 | + # Be silent | ||
399 | + xdg_redirect_output=" > /dev/null 2> /dev/null" | ||
400 | +else | ||
401 | + # All output to stderr | ||
402 | + xdg_redirect_output=" >&2" | ||
403 | +fi | ||
404 | + | ||
405 | +#-------------------------------------- | ||
406 | +# Checks for known desktop environments | ||
407 | +# set variable DE to the desktop environments name, lowercase | ||
408 | + | ||
409 | +detectDE() | ||
410 | +{ | ||
411 | + # see https://bugs.freedesktop.org/show_bug.cgi?id=34164 | ||
412 | + unset GREP_OPTIONS | ||
413 | + | ||
414 | + if [ -n "${XDG_CURRENT_DESKTOP}" ]; then | ||
415 | + case "${XDG_CURRENT_DESKTOP}" in | ||
416 | + ENLIGHTENMENT) | ||
417 | + DE=enlightenment; | ||
418 | + ;; | ||
419 | + GNOME) | ||
420 | + DE=gnome; | ||
421 | + ;; | ||
422 | + KDE) | ||
423 | + DE=kde; | ||
424 | + ;; | ||
425 | + LXDE) | ||
426 | + DE=lxde; | ||
427 | + ;; | ||
428 | + MATE) | ||
429 | + DE=mate; | ||
430 | + ;; | ||
431 | + XFCE) | ||
432 | + DE=xfce | ||
433 | + ;; | ||
434 | + esac | ||
435 | + fi | ||
436 | + | ||
437 | + if [ x"$DE" = x"" ]; then | ||
438 | + # classic fallbacks | ||
439 | + if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde; | ||
440 | + elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; | ||
441 | + elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate; | ||
442 | + elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome; | ||
443 | + elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; | ||
444 | + elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce | ||
445 | + elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; | ||
446 | + fi | ||
447 | + fi | ||
448 | + | ||
449 | + if [ x"$DE" = x"" ]; then | ||
450 | + # fallback to checking $DESKTOP_SESSION | ||
451 | + case "$DESKTOP_SESSION" in | ||
452 | + gnome) | ||
453 | + DE=gnome; | ||
454 | + ;; | ||
455 | + LXDE|Lubuntu) | ||
456 | + DE=lxde; | ||
457 | + ;; | ||
458 | + MATE) | ||
459 | + DE=mate; | ||
460 | + ;; | ||
461 | + xfce|xfce4|'Xfce Session') | ||
462 | + DE=xfce; | ||
463 | + ;; | ||
464 | + esac | ||
465 | + fi | ||
466 | + | ||
467 | + if [ x"$DE" = x"" ]; then | ||
468 | + # fallback to uname output for other platforms | ||
469 | + case "$(uname 2>/dev/null)" in | ||
470 | + Darwin) | ||
471 | + DE=darwin; | ||
472 | + ;; | ||
473 | + esac | ||
474 | + fi | ||
475 | + | ||
476 | + if [ x"$DE" = x"gnome" ]; then | ||
477 | + # gnome-default-applications-properties is only available in GNOME 2.x | ||
478 | + # but not in GNOME 3.x | ||
479 | + which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3" | ||
480 | + fi | ||
481 | +} | ||
482 | + | ||
483 | +#---------------------------------------------------------------------------- | ||
484 | +# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 | ||
485 | +# It also always returns 1 in KDE 3.4 and earlier | ||
486 | +# Simply return 0 in such case | ||
487 | + | ||
488 | +kfmclient_fix_exit_code() | ||
489 | +{ | ||
490 | + version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'` | ||
491 | + major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'` | ||
492 | + minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'` | ||
493 | + release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` | ||
494 | + test "$major" -gt 3 && return $1 | ||
495 | + test "$minor" -gt 5 && return $1 | ||
496 | + test "$release" -gt 4 && return $1 | ||
497 | + return 0 | ||
498 | +} | ||
499 | + | ||
500 | +terminal_kde() | ||
501 | +{ | ||
502 | + terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole` | ||
503 | + | ||
504 | + terminal_exec=`which $terminal 2>/dev/null` | ||
505 | + | ||
506 | + if [ -x "$terminal_exec" ]; then | ||
507 | + if [ x"$1" = x"" ]; then | ||
508 | + $terminal_exec | ||
509 | + else | ||
510 | + $terminal_exec -e "$1" | ||
511 | + fi | ||
512 | + | ||
513 | + if [ $? -eq 0 ]; then | ||
514 | + exit_success | ||
515 | + else | ||
516 | + exit_failure_operation_failed | ||
517 | + fi | ||
518 | + else | ||
519 | + exit_failure_operation_impossible "configured terminal program '$terminal' not found or not executable" | ||
520 | + fi | ||
521 | +} | ||
522 | + | ||
523 | +terminal_gnome() | ||
524 | +{ | ||
525 | + term_exec_key="/desktop/gnome/applications/terminal/exec" | ||
526 | + term_exec_arg_key="/desktop/gnome/applications/terminal/exec_arg" | ||
527 | + | ||
528 | + term_exec=`gconftool-2 --get ${term_exec_key}` | ||
529 | + term_exec_arg=`gconftool-2 --get ${term_exec_arg_key}` | ||
530 | + | ||
531 | + terminal_exec=`which $term_exec 2>/dev/null` | ||
532 | + | ||
533 | + if [ -x "$terminal_exec" ]; then | ||
534 | + if [ x"$1" = x"" ]; then | ||
535 | + $terminal_exec | ||
536 | + else | ||
537 | + if [ x"$term_exec_arg" = x"" ]; then | ||
538 | + $terminal_exec "$1" | ||
539 | + else | ||
540 | + $terminal_exec "$term_exec_arg" "$1" | ||
541 | + fi | ||
542 | + fi | ||
543 | + | ||
544 | + if [ $? -eq 0 ]; then | ||
545 | + exit_success | ||
546 | + else | ||
547 | + exit_failure_operation_failed | ||
548 | + fi | ||
549 | + else | ||
550 | + exit_failure_operation_impossible "configured terminal program '$term_exec' not found or not executable" | ||
551 | + fi | ||
552 | +} | ||
553 | + | ||
554 | +terminal_xfce() | ||
555 | +{ | ||
556 | + if [ x"$1" = x"" ]; then | ||
557 | + exo-open --launch TerminalEmulator | ||
558 | + else | ||
559 | + exo-open --launch TerminalEmulator "$1" | ||
560 | + fi | ||
561 | + | ||
562 | + if [ $? -eq 0 ]; then | ||
563 | + exit_success | ||
564 | + else | ||
565 | + exit_failure_operation_failed | ||
566 | + fi | ||
567 | +} | ||
568 | + | ||
569 | +terminal_generic() | ||
570 | +{ | ||
571 | + # if $TERM is a known non-command, use hard-coded fallbacks | ||
572 | + if [ x"$TERM" = x"" ] || [ x"$TERM" = x"linux" ] || [ x"$TERM" = x"vt100" ]; then | ||
573 | + TERM=xterm | ||
574 | + fi | ||
575 | + | ||
576 | + terminal_exec=`which $TERM 2>/dev/null` | ||
577 | + | ||
578 | + if [ -x "$terminal_exec" ]; then | ||
579 | + if [ x"$1" = x"" ]; then | ||
580 | + $terminal_exec | ||
581 | + else | ||
582 | + # screen and urxvt won't do their own parsing of quoted arguments | ||
583 | + if [ x"$TERM" = x"screen" ]; then | ||
584 | + # screen has an incompatible meaning for -e | ||
585 | + sh -c "exec $terminal_exec $1" | ||
586 | + elif [ x"$TERM" = x"urxvt" ] || [ x"$TERM" = x"rxvt-unicode" ] || [ x"$TERM" = x"rxvt" ]; then | ||
587 | + #TODO: Use whatever mechanism dash supports to test for | ||
588 | + # rxvt-* to match things like rxvt-unicode-256color | ||
589 | + sh -c "exec $terminal_exec -e $1" | ||
590 | + else | ||
591 | + $terminal_exec -e "$1" | ||
592 | + fi | ||
593 | + fi | ||
594 | + | ||
595 | + if [ $? -eq 0 ]; then | ||
596 | + exit_success | ||
597 | + else | ||
598 | + exit_failure_operation_failed | ||
599 | + fi | ||
600 | + else | ||
601 | + exit_failure_operation_impossible "configured terminal program '$TERM' not found or not executable" | ||
602 | + fi | ||
603 | +} | ||
604 | + | ||
605 | +terminal_lxde() | ||
606 | +{ | ||
607 | + if which lxterminal &>/dev/null; then | ||
608 | + if [ x"$1" = x"" ]; then | ||
609 | + lxterminal | ||
610 | + else | ||
611 | + lxterminal -e "$1" | ||
612 | + fi | ||
613 | + else | ||
614 | + terminal_generic "$1" | ||
615 | + fi | ||
616 | +} | ||
617 | + | ||
618 | +#[ x"$1" != x"" ] || exit_failure_syntax | ||
619 | + | ||
620 | +command= | ||
621 | +while [ $# -gt 0 ] ; do | ||
622 | + parm="$1" | ||
623 | + shift | ||
624 | + | ||
625 | + case "$parm" in | ||
626 | + -*) | ||
627 | + exit_failure_syntax "unexpected option '$parm'" | ||
628 | + ;; | ||
629 | + | ||
630 | + *) | ||
631 | + if [ -n "$command" ] ; then | ||
632 | + exit_failure_syntax "unexpected argument '$parm'" | ||
633 | + fi | ||
634 | + command="$parm" | ||
635 | + ;; | ||
636 | + esac | ||
637 | +done | ||
638 | + | ||
639 | +detectDE | ||
640 | + | ||
641 | +if [ x"$DE" = x"" ]; then | ||
642 | + DE=generic | ||
643 | +fi | ||
644 | + | ||
645 | +case "$DE" in | ||
646 | + kde) | ||
647 | + terminal_kde "$command" | ||
648 | + ;; | ||
649 | + | ||
650 | + gnome*) | ||
651 | + terminal_gnome "$command" | ||
652 | + ;; | ||
653 | + | ||
654 | + xfce) | ||
655 | + terminal_xfce "$command" | ||
656 | + ;; | ||
657 | + | ||
658 | + lxde) | ||
659 | + terminal_lxde "$command" | ||
660 | + ;; | ||
661 | + | ||
662 | + generic) | ||
663 | + terminal_generic "$command" | ||
664 | + ;; | ||
665 | + | ||
666 | + *) | ||
667 | + exit_failure_operation_impossible "no terminal emulator available" | ||
668 | + ;; | ||
669 | +esac | ||
670 | -- | ||
671 | 1.9.0 | ||
672 | |||
diff --git a/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb new file mode 100644 index 0000000000..2ac979b0b9 --- /dev/null +++ b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Basic desktop integration functions" | ||
2 | |||
3 | DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \ | ||
4 | desktop integration functions for any Free Desktop, such as Linux. \ | ||
5 | They are intended to provide a set of defacto standards. \ | ||
6 | The following scripts are provided at this time: \ | ||
7 | xdg-desktop-icon \ | ||
8 | xdg-desktop-menu \ | ||
9 | xdg-email \ | ||
10 | xdg-icon-resource \ | ||
11 | xdg-mime \ | ||
12 | xdg-open \ | ||
13 | xdg-screensaver \ | ||
14 | xdg-terminal \ | ||
15 | " | ||
16 | |||
17 | LICENSE = "MIT" | ||
18 | LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014" | ||
19 | |||
20 | SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \ | ||
21 | file://0001-Reinstate-xdg-terminal.patch \ | ||
22 | " | ||
23 | |||
24 | SRC_URI[md5sum] = "fadf5e7a08e0526fc60dbe3e5b7ef8d6" | ||
25 | SRC_URI[sha256sum] = "7b05558ae4bb8ede356863cae8c42e3e012aa421bf9d45130a570fd209d79102" | ||
26 | |||
27 | inherit autotools-brokensep | ||
28 | |||
29 | RDEPENDS_${PN} += "xprop" | ||
diff --git a/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch b/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch new file mode 100644 index 0000000000..cd6e6c1078 --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | Upstream-Status: Pending [from other distro Debian] | ||
2 | |||
3 | From d588b6530e1382a624898b3f4307f636c72c80a9 Mon Sep 17 00:00:00 2001 | ||
4 | From: Pierre Habouzit <madcoder@debian.org> | ||
5 | Date: Wed, 28 Nov 2007 10:13:08 +0100 | ||
6 | Subject: [PATCH] Disable services from inetd.conf if a service with the same id exists. | ||
7 | |||
8 | This way, if a service is enabled in /etc/xinetd* _and_ in | ||
9 | /etc/inetd.conf, the one (even if disabled) from /etc/xinetd* takes | ||
10 | precedence. | ||
11 | |||
12 | Signed-off-by: Pierre Habouzit <madcoder@debian.org> | ||
13 | --- | ||
14 | xinetd/inet.c | 22 +++++++++++++++++++--- | ||
15 | 1 files changed, 19 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/xinetd/inet.c b/xinetd/inet.c | ||
18 | index 1cb2ba2..8caab45 100644 | ||
19 | --- a/xinetd/inet.c | ||
20 | +++ b/xinetd/inet.c | ||
21 | @@ -23,6 +23,8 @@ | ||
22 | #include "parsesup.h" | ||
23 | #include "nvlists.h" | ||
24 | |||
25 | +static psi_h iter ; | ||
26 | + | ||
27 | static int get_next_inet_entry( int fd, pset_h sconfs, | ||
28 | struct service_config *defaults); | ||
29 | |||
30 | @@ -32,12 +34,15 @@ void parse_inet_conf_file( int fd, struct configuration *confp ) | ||
31 | struct service_config *default_config = CNF_DEFAULTS( confp ); | ||
32 | |||
33 | line_count = 0; | ||
34 | + iter = psi_create (sconfs); | ||
35 | |||
36 | for( ;; ) | ||
37 | { | ||
38 | if (get_next_inet_entry(fd, sconfs, default_config) == -2) | ||
39 | break; | ||
40 | } | ||
41 | + | ||
42 | + psi_destroy(iter); | ||
43 | } | ||
44 | |||
45 | static int get_next_inet_entry( int fd, pset_h sconfs, | ||
46 | @@ -46,7 +51,7 @@ static int get_next_inet_entry( int fd, pset_h sconfs, | ||
47 | char *p; | ||
48 | str_h strp; | ||
49 | char *line = next_line(fd); | ||
50 | - struct service_config *scp; | ||
51 | + struct service_config *scp, *tmp; | ||
52 | unsigned u, i; | ||
53 | const char *func = "get_next_inet_entry"; | ||
54 | char *name = NULL, *rpcvers = NULL, *rpcproto = NULL; | ||
55 | @@ -405,7 +410,16 @@ static int get_next_inet_entry( int fd, pset_h sconfs, | ||
56 | SC_SPECIFY( scp, A_SOCKET_TYPE ); | ||
57 | SC_SPECIFY( scp, A_WAIT ); | ||
58 | |||
59 | - if( ! pset_add(sconfs, scp) ) | ||
60 | + for ( tmp = SCP( psi_start( iter ) ) ; tmp ; tmp = SCP( psi_next(iter)) ){ | ||
61 | + if (EQ(SC_ID(scp), SC_ID(tmp))) { | ||
62 | + parsemsg(LOG_DEBUG, func, "removing duplicate service %s", SC_NAME(scp)); | ||
63 | + sc_free(scp); | ||
64 | + scp = NULL; | ||
65 | + break; | ||
66 | + } | ||
67 | + } | ||
68 | + | ||
69 | + if( scp && ! pset_add(sconfs, scp) ) | ||
70 | { | ||
71 | out_of_memory( func ); | ||
72 | pset_destroy(args); | ||
73 | @@ -414,7 +428,9 @@ static int get_next_inet_entry( int fd, pset_h sconfs, | ||
74 | } | ||
75 | |||
76 | pset_destroy(args); | ||
77 | - parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp)); | ||
78 | + if (scp) { | ||
79 | + parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp)); | ||
80 | + } | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | -- | ||
85 | 1.5.3.6.2040.g15e6 | ||
86 | |||
diff --git a/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch new file mode 100644 index 0000000000..8e59cdcaae --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | Upstream-Status: Pending [from other distro Debian] | ||
2 | |||
3 | From a3410b0bc81ab03a889d9ffc14e351badf8372f1 Mon Sep 17 00:00:00 2001 | ||
4 | From: Pierre Habouzit <madcoder@debian.org> | ||
5 | Date: Mon, 26 Nov 2007 16:02:04 +0100 | ||
6 | Subject: [PATCH] Various fixes from the previous maintainer. | ||
7 | |||
8 | --- | ||
9 | xinetd/child.c | 20 +++++++++++++++++--- | ||
10 | xinetd/service.c | 8 ++++---- | ||
11 | 2 files changed, 21 insertions(+), 7 deletions(-) | ||
12 | |||
13 | diff --git a/xinetd/child.c b/xinetd/child.c | ||
14 | index 89ee54c..48e9615 100644 | ||
15 | --- a/xinetd/child.c | ||
16 | +++ b/xinetd/child.c | ||
17 | @@ -284,6 +284,7 @@ void child_process( struct server *serp ) | ||
18 | connection_s *cp = SERVER_CONNECTION( serp ) ; | ||
19 | struct service_config *scp = SVC_CONF( sp ) ; | ||
20 | const char *func = "child_process" ; | ||
21 | + int fd, null_fd; | ||
22 | |||
23 | signal_default_state(); | ||
24 | |||
25 | @@ -296,9 +297,22 @@ void child_process( struct server *serp ) | ||
26 | signals_pending[0] = -1; | ||
27 | signals_pending[1] = -1; | ||
28 | |||
29 | - Sclose(0); | ||
30 | - Sclose(1); | ||
31 | - Sclose(2); | ||
32 | + if ( ( null_fd = open( "/dev/null", O_RDONLY ) ) == -1 ) | ||
33 | + { | ||
34 | + msg( LOG_ERR, func, "open('/dev/null') failed: %m") ; | ||
35 | + _exit( 1 ) ; | ||
36 | + } | ||
37 | + | ||
38 | + for ( fd = 0 ; fd <= MAX_PASS_FD ; fd++ ) | ||
39 | + { | ||
40 | + if ( fd != null_fd && dup2( null_fd, fd ) == -1 ) | ||
41 | + { | ||
42 | + msg( LOG_ERR, func, "dup2(%d, %d) failed: %m") ; | ||
43 | + _exit( 1 ) ; | ||
44 | + } | ||
45 | + } | ||
46 | + if ( null_fd > MAX_PASS_FD ) | ||
47 | + (void) Sclose( null_fd ) ; | ||
48 | |||
49 | |||
50 | #ifdef DEBUG_SERVER | ||
51 | diff --git a/xinetd/service.c b/xinetd/service.c | ||
52 | index 3d68d78..0132d6c 100644 | ||
53 | --- a/xinetd/service.c | ||
54 | +++ b/xinetd/service.c | ||
55 | @@ -745,8 +745,8 @@ static status_e failed_service(struct service *sp, | ||
56 | return FAILED; | ||
57 | |||
58 | if ( last == NULL ) { | ||
59 | - last = SAIN( calloc( 1, sizeof(union xsockaddr) ) ); | ||
60 | - SVC_LAST_DGRAM_ADDR(sp) = (union xsockaddr *)last; | ||
61 | + SVC_LAST_DGRAM_ADDR(sp) = SAIN( calloc( 1, sizeof(union xsockaddr) ) ); | ||
62 | + last = SAIN( SVC_LAST_DGRAM_ADDR(sp) ); | ||
63 | } | ||
64 | |||
65 | (void) time( ¤t_time ) ; | ||
66 | @@ -772,8 +772,8 @@ static status_e failed_service(struct service *sp, | ||
67 | return FAILED; | ||
68 | |||
69 | if( last == NULL ) { | ||
70 | - last = SAIN6(calloc( 1, sizeof(union xsockaddr) ) ); | ||
71 | - SVC_LAST_DGRAM_ADDR( sp ) = (union xsockaddr *)last; | ||
72 | + SVC_LAST_DGRAM_ADDR(sp) = SAIN6(calloc( 1, sizeof(union xsockaddr) ) ); | ||
73 | + last = SAIN6(SVC_LAST_DGRAM_ADDR(sp)); | ||
74 | } | ||
75 | |||
76 | (void) time( ¤t_time ) ; | ||
77 | -- | ||
78 | 1.5.3.6.2040.g15e6 | ||
79 | |||
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch new file mode 100644 index 0000000000..0542dbe835 --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | xinetd: CVE-2013-4342 | ||
2 | |||
3 | xinetd does not enforce the user and group configuration directives | ||
4 | for TCPMUX services, which causes these services to be run as root | ||
5 | and makes it easier for remote attackers to gain privileges by | ||
6 | leveraging another vulnerability in a service. | ||
7 | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4342 | ||
8 | |||
9 | the patch come from: | ||
10 | https://bugzilla.redhat.com/attachment.cgi?id=799732&action=diff | ||
11 | |||
12 | Signed-off-by: Li Wang <li.wang@windriver.com> | ||
13 | --- | ||
14 | xinetd/builtins.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/xinetd/builtins.c b/xinetd/builtins.c | ||
18 | index 3b85579..34a5bac 100644 | ||
19 | --- a/xinetd/builtins.c | ||
20 | +++ b/xinetd/builtins.c | ||
21 | @@ -617,7 +617,7 @@ static void tcpmux_handler( const struct server *serp ) | ||
22 | if( SC_IS_INTERNAL( scp ) ) { | ||
23 | SC_INTERNAL(scp, nserp); | ||
24 | } else { | ||
25 | - exec_server(nserp); | ||
26 | + child_process(nserp); | ||
27 | } | ||
28 | } | ||
29 | |||
30 | -- | ||
31 | 1.7.9.5 | ||
32 | |||
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch new file mode 100644 index 0000000000..2365ca123b --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch | |||
@@ -0,0 +1,112 @@ | |||
1 | Upstream-Status: Pending [from other distro Debian] | ||
2 | |||
3 | From f44b218ccc779ab3f4aed072390ccf129d94b58d Mon Sep 17 00:00:00 2001 | ||
4 | From: David Madore <david@pleiades.stars> | ||
5 | Date: Mon, 24 Mar 2008 12:45:36 +0100 | ||
6 | Subject: [PATCH] xinetd should be able to listen on IPv6 even in -inetd_compat mode | ||
7 | |||
8 | xinetd does not bind to IPv6 addresses (and does not seem to have an | ||
9 | option to do so) when used in -inetd_compat mode. As current inetd's | ||
10 | are IPv6-aware, this is a problem: this means xinetd cannot be used as | ||
11 | a drop-in inetd replacement. | ||
12 | |||
13 | The attached patch is a suggestion: it adds a -inetd_ipv6 global | ||
14 | option that, if used, causes inetd-compatibility lines to have an | ||
15 | implicit "IPv6" option. Perhaps this is not the best solution, but | ||
16 | there should definitely be a way to get inetd.conf to be read in | ||
17 | IPv6-aware mode. | ||
18 | --- | ||
19 | xinetd/confparse.c | 1 + | ||
20 | xinetd/inet.c | 17 +++++++++++++++++ | ||
21 | xinetd/options.c | 3 +++ | ||
22 | xinetd/xinetd.man | 6 ++++++ | ||
23 | 4 files changed, 27 insertions(+), 0 deletions(-) | ||
24 | |||
25 | diff --git a/xinetd/confparse.c b/xinetd/confparse.c | ||
26 | index db9f431..d7b0bcc 100644 | ||
27 | --- a/xinetd/confparse.c | ||
28 | +++ b/xinetd/confparse.c | ||
29 | @@ -40,6 +40,7 @@ | ||
30 | #include "inet.h" | ||
31 | #include "main.h" | ||
32 | |||
33 | +extern int inetd_ipv6; | ||
34 | extern int inetd_compat; | ||
35 | |||
36 | /* | ||
37 | diff --git a/xinetd/inet.c b/xinetd/inet.c | ||
38 | index 8caab45..2e617ae 100644 | ||
39 | --- a/xinetd/inet.c | ||
40 | +++ b/xinetd/inet.c | ||
41 | @@ -25,6 +25,8 @@ | ||
42 | |||
43 | static psi_h iter ; | ||
44 | |||
45 | +extern int inetd_ipv6; | ||
46 | + | ||
47 | static int get_next_inet_entry( int fd, pset_h sconfs, | ||
48 | struct service_config *defaults); | ||
49 | |||
50 | @@ -360,6 +362,21 @@ static int get_next_inet_entry( int fd, pset_h sconfs, | ||
51 | } | ||
52 | SC_SERVER_ARGV(scp)[u] = p; | ||
53 | } | ||
54 | + | ||
55 | + /* Set the IPv6 flag if we were passed the -inetd_ipv6 option */ | ||
56 | + if ( inetd_ipv6 ) | ||
57 | + { | ||
58 | + nvp = nv_find_value( service_flags, "IPv6" ); | ||
59 | + if ( nvp == NULL ) | ||
60 | + { | ||
61 | + parsemsg( LOG_WARNING, func, "inetd.conf - Bad foo %s", name ) ; | ||
62 | + pset_destroy(args); | ||
63 | + sc_free(scp); | ||
64 | + return -1; | ||
65 | + } | ||
66 | + M_SET(SC_XFLAGS(scp), nvp->value); | ||
67 | + } | ||
68 | + | ||
69 | /* Set the reuse flag, as this is the default for inetd */ | ||
70 | nvp = nv_find_value( service_flags, "REUSE" ); | ||
71 | if ( nvp == NULL ) | ||
72 | diff --git a/xinetd/options.c b/xinetd/options.c | ||
73 | index b058b6a..dc2f3a0 100644 | ||
74 | --- a/xinetd/options.c | ||
75 | +++ b/xinetd/options.c | ||
76 | @@ -30,6 +30,7 @@ int logprocs_option ; | ||
77 | unsigned logprocs_option_arg ; | ||
78 | int stayalive_option=0; | ||
79 | char *program_name ; | ||
80 | +int inetd_ipv6 = 0 ; | ||
81 | int inetd_compat = 0 ; | ||
82 | int dont_fork = 0; | ||
83 | |||
84 | @@ -128,6 +129,8 @@ int opt_recognize( int argc, char *argv[] ) | ||
85 | fprintf(stderr, "\n"); | ||
86 | exit(0); | ||
87 | } | ||
88 | + else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_ipv6" ) == 0 ) | ||
89 | + inetd_ipv6 = 1; | ||
90 | else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_compat" ) == 0 ) | ||
91 | inetd_compat = 1; | ||
92 | } | ||
93 | diff --git a/xinetd/xinetd.man b/xinetd/xinetd.man | ||
94 | index c76c3c6..c9dd803 100644 | ||
95 | --- a/xinetd/xinetd.man | ||
96 | +++ b/xinetd/xinetd.man | ||
97 | @@ -106,6 +106,12 @@ This option causes xinetd to read /etc/inetd.conf in addition to the | ||
98 | standard xinetd config files. /etc/inetd.conf is read after the | ||
99 | standard xinetd config files. | ||
100 | .TP | ||
101 | +.BI \-inetd_ipv6 | ||
102 | +This option causes xinetd to bind to IPv6 (AF_INET6) addresses for | ||
103 | +inetd compatibility lines (see previous option). This only affects | ||
104 | +how /etc/inetd.conf is interpreted and thus only has any effect if | ||
105 | +the \-inetd_compat option is also used. | ||
106 | +.TP | ||
107 | .BI \-cc " interval" | ||
108 | This option instructs | ||
109 | .B xinetd | ||
110 | -- | ||
111 | 1.5.5.rc0.127.gb4337 | ||
112 | |||
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.conf b/meta/recipes-extended/xinetd/xinetd/xinetd.conf new file mode 100644 index 0000000000..9e6ea2577e --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/xinetd.conf | |||
@@ -0,0 +1,11 @@ | |||
1 | # Simple configuration file for xinetd | ||
2 | # | ||
3 | # Some defaults, and include /etc/xinetd.d/ | ||
4 | |||
5 | defaults | ||
6 | { | ||
7 | |||
8 | |||
9 | } | ||
10 | |||
11 | includedir /etc/xinetd.d | ||
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.default b/meta/recipes-extended/xinetd/xinetd/xinetd.default new file mode 100644 index 0000000000..20a38e3f3e --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/xinetd.default | |||
@@ -0,0 +1,12 @@ | |||
1 | # Default settings for xinetd. This file is sourced by /bin/sh from | ||
2 | # /etc/init.d/xinetd | ||
3 | |||
4 | # enable xinetd Inetd compat mode | ||
5 | INETD_COMPAT=Yes | ||
6 | |||
7 | # Options to pass to xinetd | ||
8 | # | ||
9 | # -stayalive comes by default : it can be removed if xinetd is expected | ||
10 | # not to start when no service is configured | ||
11 | # | ||
12 | XINETD_OPTS="-stayalive" | ||
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.init b/meta/recipes-extended/xinetd/xinetd/xinetd.init new file mode 100644 index 0000000000..777c2c8b46 --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/xinetd.init | |||
@@ -0,0 +1,64 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # /etc/init.d/xinetd -- script to start and stop xinetd. | ||
4 | |||
5 | # Source function library. | ||
6 | . /etc/init.d/functions | ||
7 | |||
8 | if test -f /etc/default/xinetd; then | ||
9 | . /etc/default/xinetd | ||
10 | fi | ||
11 | |||
12 | |||
13 | test -x /usr/sbin/xinetd || exit 0 | ||
14 | |||
15 | checkportmap () { | ||
16 | if grep "^[^ *#]" /etc/xinetd.conf | grep -q 'rpc/'; then | ||
17 | if ! rpcinfo -u localhost portmapper >/dev/null 2>&1; then | ||
18 | echo | ||
19 | echo "WARNING: portmapper inactive - RPC services unavailable!" | ||
20 | echo " Commenting out or removing the RPC services from" | ||
21 | echo " the /etc/xinetd.conf file will remove this message." | ||
22 | echo | ||
23 | fi | ||
24 | fi | ||
25 | } | ||
26 | |||
27 | case "$1" in | ||
28 | start) | ||
29 | checkportmap | ||
30 | echo -n "Starting internet superserver: xinetd" | ||
31 | start-stop-daemon --start --quiet --background --exec /usr/sbin/xinetd -- -pidfile /var/run/xinetd.pid $XINETD_OPTS | ||
32 | echo "." | ||
33 | ;; | ||
34 | stop) | ||
35 | echo -n "Stopping internet superserver: xinetd" | ||
36 | start-stop-daemon --stop --signal 3 --quiet --exec /usr/sbin/xinetd | ||
37 | echo "." | ||
38 | ;; | ||
39 | status) | ||
40 | status /usr/sbin/xinetd; | ||
41 | exit $? | ||
42 | ;; | ||
43 | reload) | ||
44 | echo -n "Reloading internet superserver configuration: xinetd" | ||
45 | start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd | ||
46 | echo "." | ||
47 | ;; | ||
48 | force-reload) | ||
49 | echo "$0 force-reload: Force Reload is deprecated" | ||
50 | echo -n "Forcefully reloading internet superserver configuration: xinetd" | ||
51 | start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd | ||
52 | echo "." | ||
53 | ;; | ||
54 | restart) | ||
55 | $0 stop | ||
56 | $0 start | ||
57 | ;; | ||
58 | *) | ||
59 | echo "Usage: /etc/init.d/xinetd {start|stop|status|reload|force-reload|restart}" | ||
60 | exit 1 | ||
61 | ;; | ||
62 | esac | ||
63 | |||
64 | exit 0 | ||
diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb new file mode 100644 index 0000000000..1928949e94 --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | SUMMARY = "Socket-based service activation daemon" | ||
2 | HOMEPAGE = "http://www.xinetd.org" | ||
3 | |||
4 | # xinetd is a BSD-like license | ||
5 | # Apple and Gentoo say BSD here. | ||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8" | ||
8 | |||
9 | DEPENDS = "" | ||
10 | PR = "r2" | ||
11 | |||
12 | SRC_URI = "http://www.xinetd.org/xinetd-${PV}.tar.gz \ | ||
13 | file://xinetd.init \ | ||
14 | file://xinetd.conf \ | ||
15 | file://xinetd.default \ | ||
16 | file://Various-fixes-from-the-previous-maintainer.patch \ | ||
17 | file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \ | ||
18 | file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \ | ||
19 | file://xinetd-CVE-2013-4342.patch \ | ||
20 | " | ||
21 | |||
22 | SRC_URI[md5sum] = "77358478fd58efa6366accae99b8b04c" | ||
23 | SRC_URI[sha256sum] = "bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3" | ||
24 | |||
25 | inherit autotools update-rc.d | ||
26 | |||
27 | INITSCRIPT_NAME = "xinetd" | ||
28 | INITSCRIPT_PARAMS = "defaults" | ||
29 | |||
30 | EXTRA_OECONF="--disable-nls" | ||
31 | |||
32 | PACKAGECONFIG ??= "tcp-wrappers" | ||
33 | PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers" | ||
34 | |||
35 | do_configure() { | ||
36 | # Looks like configure.in is broken, so we are skipping | ||
37 | # rebuilding configure and are just using the shipped one | ||
38 | ( cd ${S}; gnu-configize --force ) | ||
39 | oe_runconf | ||
40 | } | ||
41 | |||
42 | do_install() { | ||
43 | # Same here, the Makefile does some really stupid things, | ||
44 | # but since we only want two files why not override | ||
45 | # do_install from autotools and doing it ourselfs? | ||
46 | install -d "${D}${sbindir}" | ||
47 | install -d "${D}${sysconfdir}/init.d" | ||
48 | install -d "${D}${sysconfdir}/xinetd.d" | ||
49 | install -d "${D}${sysconfdir}/default" | ||
50 | install -m 644 "${WORKDIR}/xinetd.conf" "${D}${sysconfdir}" | ||
51 | install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd" | ||
52 | install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd" | ||
53 | install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}" | ||
54 | install -m 755 "${B}/xinetd/itox" "${D}${sbindir}" | ||
55 | } | ||
56 | |||
57 | CONFFILES_${PN} = "${sysconfdir}/xinetd.conf" | ||
diff --git a/meta/recipes-extended/xz/xz_5.1.3alpha.bb b/meta/recipes-extended/xz/xz_5.1.3alpha.bb new file mode 100644 index 0000000000..168e3837d8 --- /dev/null +++ b/meta/recipes-extended/xz/xz_5.1.3alpha.bb | |||
@@ -0,0 +1,42 @@ | |||
1 | SUMMARY = "Utilities for managing LZMA compressed files" | ||
2 | HOMEPAGE = "http://tukaani.org/xz/" | ||
3 | SECTION = "base" | ||
4 | |||
5 | # The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file | ||
6 | # which is GPLv3 is an m4 macro which isn't shipped in any of our packages, | ||
7 | # and the LGPL bits are under lib/, which appears to be used for libgnu, which | ||
8 | # appears to be used for DOS builds. So we're left with GPLv2+ and PD. | ||
9 | LICENSE = "GPLv2+ & GPLv3+ & LGPLv2.1+ & PD" | ||
10 | LICENSE_${PN} = "GPLv2+" | ||
11 | LICENSE_${PN}-dev = "GPLv2+" | ||
12 | LICENSE_${PN}-staticdev = "GPLv2+" | ||
13 | LICENSE_${PN}-doc = "GPLv2+" | ||
14 | LICENSE_${PN}-dbg = "GPLv2+" | ||
15 | LICENSE_${PN}-locale = "GPLv2+" | ||
16 | LICENSE_liblzma = "PD" | ||
17 | LICENSE_liblzma-dev = "PD" | ||
18 | LICENSE_liblzma-staticdev = "PD" | ||
19 | LICENSE_liblzma-dbg = "PD" | ||
20 | |||
21 | LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \ | ||
22 | file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
23 | file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
24 | file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \ | ||
25 | file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 " | ||
26 | |||
27 | SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz" | ||
28 | SRC_URI[md5sum] = "bbb2daa876c87fb2cf9fe4590af9694e" | ||
29 | SRC_URI[sha256sum] = "9f94506e301d5b6863921bba861a99ba00de384dafb4e5f409679a93e41613d4" | ||
30 | |||
31 | inherit autotools gettext | ||
32 | |||
33 | PACKAGES =+ "liblzma liblzma-dev liblzma-staticdev liblzma-dbg" | ||
34 | |||
35 | FILES_liblzma = "${libdir}/liblzma*${SOLIBS}" | ||
36 | FILES_liblzma-dev = "${includedir}/lzma* ${libdir}/liblzma*${SOLIBSDEV} ${libdir}/liblzma.la ${libdir}/pkgconfig/liblzma.pc" | ||
37 | FILES_liblzma-staticdev = "${libdir}/liblzma.a" | ||
38 | FILES_liblzma-dbg = "${libdir}/.debug/liblzma*" | ||
39 | |||
40 | BBCLASSEXTEND = "native nativesdk" | ||
41 | |||
42 | export CONFIG_SHELL="/bin/sh" | ||
diff --git a/meta/recipes-extended/zip/zip.inc b/meta/recipes-extended/zip/zip.inc new file mode 100644 index 0000000000..6221c5e139 --- /dev/null +++ b/meta/recipes-extended/zip/zip.inc | |||
@@ -0,0 +1,26 @@ | |||
1 | SUMMARY = "Compressor/archiver for creating and modifying .zip files" | ||
2 | HOMEPAGE = "http://www.info-zip.org" | ||
3 | SECTION = "console/utils" | ||
4 | |||
5 | LICENSE = "BSD-3-Clause" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d" | ||
7 | |||
8 | SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz" | ||
9 | |||
10 | EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \ | ||
11 | 'CFLAGS=-I. -DUNIX ${CFLAGS}' 'INSTALL=install' \ | ||
12 | 'BINFLAGS=0755' 'INSTALL_D=install -d'" | ||
13 | |||
14 | do_compile() { | ||
15 | oe_runmake -f unix/Makefile flags IZ_BZIP2=no_such_directory | ||
16 | sed -i 's#LFLAGS1=""#LFLAGS1="${LDFLAGS}"#' flags | ||
17 | oe_runmake -f unix/Makefile generic IZ_BZIP2=no_such_directory | ||
18 | } | ||
19 | |||
20 | do_install() { | ||
21 | oe_runmake -f unix/Makefile prefix=${D}${prefix} \ | ||
22 | BINDIR=${D}${bindir} MANDIR=${D}${mandir}/man1 \ | ||
23 | install | ||
24 | } | ||
25 | |||
26 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb new file mode 100644 index 0000000000..1e961101bc --- /dev/null +++ b/meta/recipes-extended/zip/zip_3.0.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | require zip.inc | ||
2 | |||
3 | PR="r2" | ||
4 | |||
5 | # zip-2.32 still uses directory name of zip-2.30 | ||
6 | S = "${WORKDIR}/zip30" | ||
7 | |||
8 | SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37" | ||
9 | SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369" | ||
10 | |||
11 | # zip.inc sets CFLAGS, but what Makefile actually uses is | ||
12 | # CFLAGS_NOOPT. It will also force -O3 optimization, overriding | ||
13 | # whatever we set. | ||
14 | # | ||
15 | EXTRA_OEMAKE_append = " 'CFLAGS_NOOPT=-I. -DUNIX ${CFLAGS}'" | ||