summaryrefslogtreecommitdiffstats
path: root/package/refpolicy/0001-fix-regex-escape-sequence-error.patch
diff options
context:
space:
mode:
authorAdam Duskett <aduskett@gmail.com>2017-11-07 09:49:15 -0500
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-11-23 23:03:34 +0100
commit9edec7d2687bf36363ec1e07272ccd03778e59d0 (patch)
treee6f83f8b0250e95dc73f76c6514e363b6e810aa2 /package/refpolicy/0001-fix-regex-escape-sequence-error.patch
parent7d55b9351d68f7dc47c52b725b7ab9a1d5f0ec0a (diff)
downloadbuildroot-9edec7d2687bf36363ec1e07272ccd03778e59d0.tar.gz
buildroot-9edec7d2687bf36363ec1e07272ccd03778e59d0.zip
refpolicy: bump to 2.20170805
In addition to a simple bump, the following extra changes have occured: - Change the refpolicy site to the official release URL. - Remove REFPOLICY_SITE_METHOD and REFPOLICY_GIT_SUBMODULES as the contrib submodule is included in the release tarball. - Refpolicy is now compatible with python3, as such, remove host-python. from the dependencies and add a check for python3 or python in it's place. - Add upstreamed 0001-fix-regex-escape-sequence-error.patch to fix building against python3.6. - Add sha256 license hash to hash file. Signed-off-by: Adam Duskett <Adamduskett@outlook.com> Tested-by: Matt Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/refpolicy/0001-fix-regex-escape-sequence-error.patch')
-rw-r--r--package/refpolicy/0001-fix-regex-escape-sequence-error.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/package/refpolicy/0001-fix-regex-escape-sequence-error.patch b/package/refpolicy/0001-fix-regex-escape-sequence-error.patch
new file mode 100644
index 0000000000..1aa01892d0
--- /dev/null
+++ b/package/refpolicy/0001-fix-regex-escape-sequence-error.patch
@@ -0,0 +1,59 @@
+From 6c9cc47e6cc9c6e67b1b822f7a1a2e1f6d836118 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <Adamduskett@outlook.com>
+Date: Tue, 10 Oct 2017 18:00:30 -0400
+Subject: [PATCH] fix regex escape sequence error.
+
+python3.6 will error out with the message "invalid escape sequence"
+in genhomedircon.py. This patch fixes these errors by turning the string
+in the into a raw string.
+
+Upstream status: accepted
+
+Signed-off-by: Adam Duskett <aduskett@gmail.com>
+---
+ support/genhomedircon.py | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/support/genhomedircon.py b/support/genhomedircon.py
+index 036f5cc9..6662f412 100644
+--- a/support/genhomedircon.py
++++ b/support/genhomedircon.py
+@@ -189,13 +189,13 @@ def oldgenhomedircon(filecontextdir, filecontext):
+ addme = 1
+ for regex in prefix_regex:
+ #match a trailing (/*)? which is actually a bug in rpc_pipefs
+- regex = re.sub("\(/\*\)\?$", "", regex)
++ regex = re.sub(r"\(/\*\)\?$", "", regex)
+ #match a trailing .+
+- regex = re.sub("\.+$", "", regex)
++ regex = re.sub(r"\.+$", "", regex)
+ #match a trailing .*
+- regex = re.sub("\.\*$", "", regex)
++ regex = re.sub(r"\.\*$", "", regex)
+ #strip a (/.*)? which matches anything trailing to a /*$ which matches trailing /'s
+- regex = re.sub("\(\/\.\*\)\?", "", regex)
++ regex = re.sub(r"\(\/\.\*\)\?", "", regex)
+ regex = regex + "/*$"
+ if re.search(regex, potential, 0):
+ addme = 0
+@@ -391,13 +391,13 @@ class selinuxConfig:
+ exists=1
+ for regex in prefix_regex:
+ #match a trailing (/*)? which is actually a bug in rpc_pipefs
+- regex = re.sub("\(/\*\)\?$", "", regex)
++ regex = re.sub(r"\(/\*\)\?$", "", regex)
+ #match a trailing .+
+- regex = re.sub("\.+$", "", regex)
++ regex = re.sub(r"\.+$", "", regex)
+ #match a trailing .*
+- regex = re.sub("\.\*$", "", regex)
++ regex = re.sub(r"\.\*$", "", regex)
+ #strip a (/.*)? which matches anything trailing to a /*$ which matches trailing /'s
+- regex = re.sub("\(\/\.\*\)\?", "", regex)
++ regex = re.sub(r"\(\/\.\*\)\?", "", regex)
+ regex = regex + "/*$"
+ if re.search(regex, home, 0):
+ exists = 0
+--
+2.13.6
+
OpenPOWER on IntegriCloud