summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2022-08-28 10:29:32 +0800
committerJoe MacDonald <joe@deserted.net>2022-08-28 13:54:59 -0400
commite37231db767bd5216eec561adc85d0a724070dd1 (patch)
tree4fa3f16a6ff56758086b0d0e699f52aa9c42f61e
parentcf3c9d14de75fac8103a29f24e582538db5c7511 (diff)
downloadmeta-selinux-e37231db767bd5216eec561adc85d0a724070dd1.tar.gz
selinux-sandbox: upgrade 3.3 -> 3.4
* Backport a patch to fix chcat runtime error. * Refresh patch. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r--recipes-security/selinux/selinux-sandbox/0001-gettext-handle-unsupported-languages-properly.patch49
-rw-r--r--recipes-security/selinux/selinux-sandbox/sandbox-de-bashify.patch6
-rw-r--r--recipes-security/selinux/selinux-sandbox_3.4.bb (renamed from recipes-security/selinux/selinux-sandbox_3.3.bb)8
3 files changed, 57 insertions, 6 deletions
diff --git a/recipes-security/selinux/selinux-sandbox/0001-gettext-handle-unsupported-languages-properly.patch b/recipes-security/selinux/selinux-sandbox/0001-gettext-handle-unsupported-languages-properly.patch
new file mode 100644
index 0000000..f1d8235
--- /dev/null
+++ b/recipes-security/selinux/selinux-sandbox/0001-gettext-handle-unsupported-languages-properly.patch
@@ -0,0 +1,49 @@
1From 70602601ac1cfc4399430ef8609b96fc224d1e25 Mon Sep 17 00:00:00 2001
2From: Vit Mojzis <vmojzis@redhat.com>
3Date: Fri, 24 Jun 2022 16:24:25 +0200
4Subject: [PATCH] gettext: handle unsupported languages properly
5
6With "fallback=True" gettext.translation behaves the same as
7gettext.install and uses NullTranslations in case the
8translation file for given language was not found (as opposed to
9throwing an exception).
10
11Fixes:
12 # LANG is set to any "unsupported" language, e.g. en_US.UTF-8
13 $ chcat --help
14 Traceback (most recent call last):
15 File "/usr/bin/chcat", line 39, in <module>
16 t = gettext.translation(PROGNAME,
17 File "/usr/lib64/python3.9/gettext.py", line 592, in translation
18 raise FileNotFoundError(ENOENT,
19 FileNotFoundError: [Errno 2] No translation file found for domain: 'selinux-python'
20
21Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
22Reviewed-by: Daniel Burgener <dburgener@linux.microsoft.com>
23Acked-by: Petr Lautrbach <plautrba@redhat.com>
24
25Upstream-Status: Backport
26[https://github.com/SELinuxProject/selinux/commit/344463076b2a91e1d2c7f5cc3835dc1a53a05e88]
27
28Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
29---
30 sandbox | 3 ++-
31 1 file changed, 2 insertions(+), 1 deletion(-)
32
33diff --git a/sandbox b/sandbox
34index cd5709f..789621e 100644
35--- a/sandbox
36+++ b/sandbox
37@@ -45,7 +45,8 @@ try:
38 kwargs['unicode'] = True
39 t = gettext.translation(PROGNAME,
40 localedir="/usr/share/locale",
41- **kwargs)
42+ **kwargs,
43+ fallback=True)
44 _ = t.gettext
45 except:
46 try:
47--
482.25.1
49
diff --git a/recipes-security/selinux/selinux-sandbox/sandbox-de-bashify.patch b/recipes-security/selinux/selinux-sandbox/sandbox-de-bashify.patch
index e9622f0..6258b7c 100644
--- a/recipes-security/selinux/selinux-sandbox/sandbox-de-bashify.patch
+++ b/recipes-security/selinux/selinux-sandbox/sandbox-de-bashify.patch
@@ -1,4 +1,4 @@
1From b92c39f0be5552c19923f75aef4487348a08b7dc Mon Sep 17 00:00:00 2001 1From d592d59eb4e7dbf8ce6dc84b3f4c0026fd7cc60c Mon Sep 17 00:00:00 2001
2From: Joe MacDonald <joe_macdonald@mentor.com> 2From: Joe MacDonald <joe_macdonald@mentor.com>
3Date: Fri, 20 Feb 2015 21:07:47 -0500 3Date: Fri, 20 Feb 2015 21:07:47 -0500
4Subject: [PATCH] sandbox: de-bashify 4Subject: [PATCH] sandbox: de-bashify
@@ -6,7 +6,7 @@ Subject: [PATCH] sandbox: de-bashify
6There's no bashisms apparent in either the sandbox initscript nor the 6There's no bashisms apparent in either the sandbox initscript nor the
7sandboxX script, so point them at /bin/sh instead. 7sandboxX script, so point them at /bin/sh instead.
8 8
9Upstream-Status: Pending 9Upstream-Status: Inappropriate [embedded specific]
10 10
11Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> 11Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
12Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> 12Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
@@ -37,5 +37,5 @@ index eaa500d..8755d75 100644
37 context=`id -Z | secon -t -l -P` 37 context=`id -Z | secon -t -l -P`
38 export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut -b8-80`" 38 export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut -b8-80`"
39-- 39--
402.7.4 402.25.1
41 41
diff --git a/recipes-security/selinux/selinux-sandbox_3.3.bb b/recipes-security/selinux/selinux-sandbox_3.4.bb
index cc9baad..a5a8e13 100644
--- a/recipes-security/selinux/selinux-sandbox_3.3.bb
+++ b/recipes-security/selinux/selinux-sandbox_3.4.bb
@@ -9,13 +9,15 @@ LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=393a5ca445f6965873eca0259a17f833"
9 9
10require selinux_common.inc 10require selinux_common.inc
11 11
12SRC_URI += "file://sandbox-de-bashify.patch" 12SRC_URI += "file://sandbox-de-bashify.patch \
13 file://0001-gettext-handle-unsupported-languages-properly.patch \
14 "
13 15
14S = "${WORKDIR}/git/sandbox" 16S = "${WORKDIR}/git/sandbox"
15 17
16DEPENDS += "libcap-ng libselinux" 18DEPENDS = "libselinux libcap-ng gettext-native"
17 19
18RDEPENDS:${PN} += "\ 20RDEPENDS:${PN} = "\
19 python3-core \ 21 python3-core \
20 python3-math \ 22 python3-math \
21 python3-shell \ 23 python3-shell \