diff options
author | Wenzong Fan <wenzong.fan@windriver.com> | 2013-12-31 04:33:13 -0500 |
---|---|---|
committer | Mark Hatle <mark.hatle@windriver.com> | 2014-01-10 14:54:40 -0600 |
commit | 50ae9d2527b328372d2d1aa7a9fddc85816f2b60 (patch) | |
tree | fd3ffabf032d966ddc31ccc3a262bdce912e1a2a | |
parent | a536b4b603afaee96db540542f56f0d87353b0fd (diff) | |
download | meta-selinux-50ae9d2527b328372d2d1aa7a9fddc85816f2b60.tar.gz |
policycoreutils: migrate SRC_URI and patches to 2.2.5
This patch is removed since it is merged by new version:
- policycoreutils-fix-strict-prototypes.patch
These two patches are updated:
- policycoreutils-fix-sepolicy-install-path.patch
- policycoreutils-make-O_CLOEXEC-optional.patch
(From meta-selinux master rev: e19c88195b667506e0450947cfec11e75f386d47)
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6 files changed, 32 insertions, 67 deletions
diff --git a/recipes-security/selinux/policycoreutils.inc b/recipes-security/selinux/policycoreutils.inc index a474cb0..430b03f 100644 --- a/recipes-security/selinux/policycoreutils.inc +++ b/recipes-security/selinux/policycoreutils.inc | |||
@@ -1,4 +1,4 @@ | |||
1 | PRINC = "3" | 1 | PRINC = "1" |
2 | 2 | ||
3 | SUMMARY = "SELinux policy core utilities" | 3 | SUMMARY = "SELinux policy core utilities" |
4 | DESCRIPTION = "policycoreutils contains the policy core utilities that are required \ | 4 | DESCRIPTION = "policycoreutils contains the policy core utilities that are required \ |
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-fix-sepolicy-install-path.patch b/recipes-security/selinux/policycoreutils/policycoreutils-fix-sepolicy-install-path.patch index aaf2e66..617908a 100644 --- a/recipes-security/selinux/policycoreutils/policycoreutils-fix-sepolicy-install-path.patch +++ b/recipes-security/selinux/policycoreutils/policycoreutils-fix-sepolicy-install-path.patch | |||
@@ -1,35 +1,33 @@ | |||
1 | From 086f715e2a0dd05c07f0428f424017cc96acc387 Mon Sep 17 00:00:00 2001 | ||
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
3 | Date: Thu, 22 Aug 2013 16:40:26 +0800 | ||
4 | Subject: [PATCH] policycoreutils: fix install path for new pymodule sepolicy | 1 | Subject: [PATCH] policycoreutils: fix install path for new pymodule sepolicy |
5 | 2 | ||
6 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | 3 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> |
4 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
7 | --- | 5 | --- |
8 | sepolicy/Makefile | 4 +++- | 6 | sepolicy/Makefile | 4 +++- |
9 | 1 file changed, 3 insertions(+), 1 deletion(-) | 7 | 1 file changed, 3 insertions(+), 1 deletion(-) |
10 | 8 | ||
11 | diff --git a/sepolicy/Makefile b/sepolicy/Makefile | 9 | diff --git a/sepolicy/Makefile b/sepolicy/Makefile |
12 | index 11b534f..9e46b74 100644 | 10 | index 2b8716c..70f4bdd 100644 |
13 | --- a/sepolicy/Makefile | 11 | --- a/sepolicy/Makefile |
14 | +++ b/sepolicy/Makefile | 12 | +++ b/sepolicy/Makefile |
15 | @@ -11,6 +11,8 @@ BASHCOMPLETIONDIR ?= $(DESTDIR)/etc/bash_completion.d/ | 13 | @@ -12,6 +12,8 @@ BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions |
16 | SHAREDIR ?= $(PREFIX)/share/sandbox | 14 | SHAREDIR ?= $(PREFIX)/share/sandbox |
17 | override CFLAGS = $(LDFLAGS) -I$(PREFIX)/include -DPACKAGE="policycoreutils" -Wall -Werror -Wextra -W -DSHARED -shared | 15 | override CFLAGS = -I$(PREFIX)/include -DPACKAGE="policycoreutils" -Wall -Werror -Wextra -W -DSHARED -shared |
18 | 16 | ||
19 | +PYLIBVER ?= $(shell python -c 'import sys;print "python%d.%d" % sys.version_info[0:2]') | 17 | +PYLIBVER ?= $(shell python -c 'import sys;print "python%d.%d" % sys.version_info[0:2]') |
20 | + | 18 | + |
21 | BASHCOMPLETIONS=sepolicy-bash-completion.sh | 19 | BASHCOMPLETIONS=sepolicy-bash-completion.sh |
22 | 20 | ||
23 | all: python-build | 21 | all: python-build |
24 | @@ -23,7 +25,7 @@ clean: | 22 | @@ -30,7 +32,7 @@ test: |
25 | -rm -rf build *~ \#* *pyc .#* | 23 | @python test_sepolicy.py -v |
26 | 24 | ||
27 | install: | 25 | install: |
28 | - $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` | 26 | - $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` |
29 | + $(PYTHON) setup.py install --install-lib $(LIBDIR)/$(PYLIBVER)/site-packages | 27 | + $(PYTHON) setup.py install --install-lib $(LIBDIR)/$(PYLIBVER)/site-packages |
30 | [ -d $(BINDIR) ] || mkdir -p $(BINDIR) | 28 | [ -d $(BINDIR) ] || mkdir -p $(BINDIR) |
31 | install -m 755 sepolicy.py $(BINDIR)/sepolicy | 29 | install -m 755 sepolicy.py $(BINDIR)/sepolicy |
32 | -mkdir -p $(MANDIR)/man8 | 30 | (cd $(BINDIR); ln -sf sepolicy sepolgen) |
33 | -- | 31 | -- |
34 | 1.7.9.5 | 32 | 1.7.9.5 |
35 | 33 | ||
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-fix-strict-prototypes.patch b/recipes-security/selinux/policycoreutils/policycoreutils-fix-strict-prototypes.patch deleted file mode 100644 index 9bb353a..0000000 --- a/recipes-security/selinux/policycoreutils/policycoreutils-fix-strict-prototypes.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 5944e9908fc12d69d19a1d24128cbc6d1a423c3d Mon Sep 17 00:00:00 2001 | ||
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
3 | Date: Tue, 18 Jun 2013 12:29:00 +0800 | ||
4 | Subject: [PATCH] policycoreutils: fix build strict-prototypes failure | ||
5 | |||
6 | | policy.c:90:6: error: function declaration isn't a prototype | ||
7 | [-Werror=strict-prototypes] | ||
8 | | cc1: all warnings being treated as errors | ||
9 | | error: command 'i586-poky-linux-gcc' failed with exit status 1 | ||
10 | | make[1]: *** [python-build] Error 1 | ||
11 | |||
12 | Upstream-Status: pending | ||
13 | |||
14 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
15 | --- | ||
16 | sepolicy/policy.c | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/sepolicy/policy.c b/sepolicy/policy.c | ||
20 | index 4eca22d..e454e75 100644 | ||
21 | --- a/sepolicy/policy.c | ||
22 | +++ b/sepolicy/policy.c | ||
23 | @@ -87,7 +87,7 @@ static PyMethodDef methods[] = { | ||
24 | {NULL, NULL, 0, NULL} /* sentinel */ | ||
25 | }; | ||
26 | |||
27 | -void init_policy() { | ||
28 | +void init_policy(void) { | ||
29 | PyObject *m; | ||
30 | m = Py_InitModule("_policy", methods); | ||
31 | init_info(m); | ||
32 | -- | ||
33 | 1.7.9.5 | ||
34 | |||
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-make-O_CLOEXEC-optional.patch b/recipes-security/selinux/policycoreutils/policycoreutils-make-O_CLOEXEC-optional.patch index aaaa1e5..d50356e 100644 --- a/recipes-security/selinux/policycoreutils/policycoreutils-make-O_CLOEXEC-optional.patch +++ b/recipes-security/selinux/policycoreutils/policycoreutils-make-O_CLOEXEC-optional.patch | |||
@@ -1,7 +1,4 @@ | |||
1 | From dca6a89058d818827d6f1c80c9b6abb46002b855 Mon Sep 17 00:00:00 2001 | 1 | Subject: [PATCH] policycoreutils: make O_CLOEXEC optional |
2 | From: Joe MacDonald <joe.macdonald@windriver.com> | ||
3 | Date: Fri, 11 Oct 2013 09:55:43 -0400 | ||
4 | Subject: [PATCH 1/2] policycoreutils: make O_CLOEXEC optional | ||
5 | 2 | ||
6 | Various commits in the selinux tree in the current release added O_CLOEXEC | 3 | Various commits in the selinux tree in the current release added O_CLOEXEC |
7 | to open() calls in an attempt to address file descriptor leaks as | 4 | to open() calls in an attempt to address file descriptor leaks as |
@@ -17,29 +14,30 @@ produce curious AVC Denied messages. | |||
17 | Uptream-Status: Inappropriate [O_CLOEXEC has been in Linux since 2007 and POSIX since 2008] | 14 | Uptream-Status: Inappropriate [O_CLOEXEC has been in Linux since 2007 and POSIX since 2008] |
18 | 15 | ||
19 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> | 16 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> |
17 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
20 | --- | 18 | --- |
21 | restorecond/user.c | 8 +++++++- | 19 | restorecond/user.c | 8 +++++++- |
22 | 1 file changed, 7 insertions(+), 1 deletion(-) | 20 | 1 file changed, 7 insertions(+), 1 deletion(-) |
23 | 21 | ||
24 | diff --git a/restorecond/user.c b/restorecond/user.c | 22 | diff --git a/restorecond/user.c b/restorecond/user.c |
25 | index 00a646f..50f3ab6 100644 | 23 | index 2c28676..6235772 100644 |
26 | --- a/restorecond/user.c | 24 | --- a/restorecond/user.c |
27 | +++ b/restorecond/user.c | 25 | +++ b/restorecond/user.c |
28 | @@ -201,7 +201,13 @@ static int local_server() { | 26 | @@ -202,7 +202,13 @@ static int local_server() { |
29 | perror("asprintf"); | 27 | perror("asprintf"); |
30 | return -1; | 28 | return -1; |
31 | } | 29 | } |
32 | - int fd = open(ptr, O_CREAT | O_WRONLY | O_NOFOLLOW | O_CLOEXEC, S_IRUSR | S_IWUSR); | 30 | - local_lock_fd = open(ptr, O_CREAT | O_WRONLY | O_NOFOLLOW | O_CLOEXEC, S_IRUSR | S_IWUSR); |
33 | + int fd = open(ptr, O_CREAT | O_WRONLY | O_NOFOLLOW | 31 | + local_lock_fd = open(ptr, O_CREAT | O_WRONLY | O_NOFOLLOW |
34 | +#ifdef O_CLOEXEC | 32 | + #ifdef O_CLOEXEC |
35 | + | O_CLOEXEC | 33 | + | O_CLOEXEC |
36 | +#else | 34 | + #else |
37 | +#warning O_CLOEXEC undefined on this platform, this may leak file descriptors | 35 | + #warning O_CLOEXEC undefined on this platform, this may leak file descriptors |
38 | +#endif | 36 | + #endif |
39 | + , S_IRUSR | S_IWUSR); | 37 | + , S_IRUSR | S_IWUSR); |
40 | if (debug_mode) | 38 | if (debug_mode) |
41 | g_warning ("Lock file: %s", ptr); | 39 | g_warning ("Lock file: %s", ptr); |
42 | 40 | ||
43 | -- | 41 | -- |
44 | 1.7.10.4 | 42 | 1.7.9.5 |
45 | 43 | ||
diff --git a/recipes-security/selinux/policycoreutils_2.2.5.bb b/recipes-security/selinux/policycoreutils_2.2.5.bb index da91ddb..d851f74 100644 --- a/recipes-security/selinux/policycoreutils_2.2.5.bb +++ b/recipes-security/selinux/policycoreutils_2.2.5.bb | |||
@@ -1,15 +1,14 @@ | |||
1 | PR = "r3" | 1 | PR = "r0" |
2 | 2 | ||
3 | include selinux_20130423.inc | 3 | include selinux_20131030.inc |
4 | include ${BPN}.inc | 4 | include ${BPN}.inc |
5 | 5 | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" |
7 | 7 | ||
8 | SRC_URI[md5sum] = "f34216414b650a0a25dec89a758234fb" | 8 | SRC_URI[md5sum] = "a2963d7024c5c4ce89f2459d48f91ec8" |
9 | SRC_URI[sha256sum] = "b6881741f9f9988346a73bfeccb0299941dc117349753f0ef3f23ee86f06c1b5" | 9 | SRC_URI[sha256sum] = "bbf850a8c3c2f371f439d6525663eecdd3a737acd594d2f27f8d8f3a07830cc4" |
10 | 10 | ||
11 | SRC_URI += "\ | 11 | SRC_URI += "\ |
12 | file://policycoreutils-fix-strict-prototypes.patch \ | ||
13 | file://policycoreutils-revert-run_init-open_init_pty.patch \ | 12 | file://policycoreutils-revert-run_init-open_init_pty.patch \ |
14 | file://policycoreutils-fix-sepolicy-install-path.patch \ | 13 | file://policycoreutils-fix-sepolicy-install-path.patch \ |
15 | file://policycoreutils-make-O_CLOEXEC-optional.patch \ | 14 | file://policycoreutils-make-O_CLOEXEC-optional.patch \ |
diff --git a/recipes-security/selinux/policycoreutils_git.bb b/recipes-security/selinux/policycoreutils_git.bb index fb7b48f..9a6425b 100644 --- a/recipes-security/selinux/policycoreutils_git.bb +++ b/recipes-security/selinux/policycoreutils_git.bb | |||
@@ -1,9 +1,13 @@ | |||
1 | PR = "r0" | 1 | PR = "r0" |
2 | PV = "2.1.14+git${SRCPV}" | 2 | PV = "2.2.5+git${SRCPV}" |
3 | 3 | ||
4 | include selinux_git.inc | 4 | include selinux_git.inc |
5 | include ${BPN}.inc | 5 | include ${BPN}.inc |
6 | 6 | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" |
8 | 8 | ||
9 | SRC_URI += "file://policycoreutils-fix-strict-prototypes.patch" | 9 | SRC_URI += "\ |
10 | file://policycoreutils-revert-run_init-open_init_pty.patch \ | ||
11 | file://policycoreutils-fix-sepolicy-install-path.patch \ | ||
12 | file://policycoreutils-make-O_CLOEXEC-optional.patch \ | ||
13 | " | ||