Add patch from Steven Chamberlain to fix crash on kFreeBSD
Fix syntax in changelog for Closes, missing :
Ritesh Raj Sarraf
9 years ago
0 | openrc (0.13.1-2) unstable; urgency=medium | |
1 | ||
2 | [ Steven Chamberlain ] | |
3 | * Add 0210-GNU-kFreeBSD_workaround-nxstack.patch: | |
4 | - loopsolver: don't use executable stacks | |
5 | - fixes a crash on newer versions of kfreebsd that enforce | |
6 | non-executable stacks (Closes: #765070) | |
7 | * Drop unnecessary dependency on libkvm-dev [kfreebsd-any] | |
8 | ||
9 | -- Steven Chamberlain <steven@pyro.eu.org> Sat, 18 Oct 2014 17:28:16 +0100 | |
10 | ||
0 | 11 | openrc (0.13.1-1) unstable; urgency=medium |
1 | 12 | |
2 | 13 | * New upstream release |
4 | 4 | Uploaders: Roger Leigh <rleigh@debian.org>, |
5 | 5 | Thomas Goirand <zigo@debian.org>, |
6 | 6 | Benda Xu <heroxbd@gentoo.org>, Ritesh Raj Sarraf <rrs@debian.org> |
7 | Build-Depends: debhelper (>= 9), libkvm-dev [kfreebsd-any] | |
7 | Build-Depends: debhelper (>= 9) | |
8 | 8 | Standards-Version: 3.9.5 |
9 | 9 | Homepage: http://www.gentoo.org/proj/en/base/openrc/ |
10 | 10 | Vcs-Git: git://anonscm.debian.org/openrc/openrc.git |
44 | 44 | =================================================================== |
45 | 45 | --- openrc.orig/mk/os-GNU-kFreeBSD.mk 2014-10-17 15:56:36.422098290 +0530 |
46 | 46 | +++ openrc/mk/os-GNU-kFreeBSD.mk 2014-10-17 15:56:36.418098290 +0530 |
47 | @@ -3,7 +3,9 @@ | |
47 | @@ -2,7 +2,9 @@ | |
48 | 48 | |
49 | 49 | # Generic definitions |
50 | 50 | |
53 | 53 | + |
54 | 54 | CPPFLAGS+= -D_BSD_SOURCE -D_XOPEN_SOURCE=700 |
55 | 55 | LIBDL= -Wl,-Bdynamic -ldl |
56 | -LIBKVM?= | |
56 | LIBKVM?= | |
57 | 57 | -include ${MK}/os-BSD.mk |
58 | +LIBKVM?= -lkvm | |
59 | 58 | Index: openrc/conf.d/network.GNU-kFreeBSD.in |
60 | 59 | =================================================================== |
61 | 60 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 |
0 | From: Steven Chamberlain <steven@pyro.eu.org> | |
1 | Subject: loopsolver: don't use executable stacks | |
2 | Date: Sat, 18 Oct 2014 20:48:40 +0100 | |
3 | ||
4 | Avoid use of executable stacks, since FreeBSD 9.2, 10.0 and newer | |
5 | enforce kern.elf64.nxstack / kern.elf32.nxstack by default. | |
6 | ||
7 | --- a/src/librc/librc-depend.c | |
8 | +++ b/src/librc/librc-depend.c | |
9 | @@ -886,6 +886,27 @@ | |
10 | return '?'; | |
11 | } | |
12 | ||
13 | +static int idid_count2; | |
14 | +static idid_entry_t *idid_counters; | |
15 | + | |
16 | +static void | |
17 | +idid_btree_builddescarray(const void *nodep, const VISIT which, const int depth) { | |
18 | + (void)depth; | |
19 | + switch (which) { | |
20 | + case preorder: | |
21 | + case leaf: { | |
22 | + const idid_entry_t *idid_entry_p = *(idid_entry_t * const*)nodep; | |
23 | + | |
24 | + memcpy(&idid_counters[idid_count2], idid_entry_p, sizeof(idid_counters[idid_count2])); | |
25 | + idid_count2++; | |
26 | + break; | |
27 | + } | |
28 | + default: | |
29 | + break; | |
30 | + } | |
31 | + return; | |
32 | +} | |
33 | + | |
34 | /*! Solves dependecies loops | |
35 | * @param unap_matrix matrixes to scan ways to solve the loop | |
36 | * @param service_id looped service id | |
37 | @@ -1243,26 +1264,6 @@ | |
38 | /* building array of dependencies sorted by descending presence counter */ | |
39 | ||
40 | { | |
41 | - int idid_count2; | |
42 | - idid_entry_t *idid_counters; | |
43 | - | |
44 | - void idid_btree_builddescarray(const void *nodep, const VISIT which, const int depth) { | |
45 | - (void)depth; | |
46 | - switch (which) { | |
47 | - case preorder: | |
48 | - case leaf: { | |
49 | - const idid_entry_t *idid_entry_p = *(idid_entry_t * const*)nodep; | |
50 | - | |
51 | - memcpy(&idid_counters[idid_count2], idid_entry_p, sizeof(idid_counters[idid_count2])); | |
52 | - idid_count2++; | |
53 | - break; | |
54 | - } | |
55 | - default: | |
56 | - break; | |
57 | - } | |
58 | - return; | |
59 | - } | |
60 | - | |
61 | idid_counters = xmalloc(idid_count * sizeof(*idid_counters)); | |
62 | ||
63 | idid_count2 = 0; |