* [Buildroot] [PATCH v2, 1/1] meson: fix error when restorecon unavailable
@ 2018-03-13 21:18 Fabrice Fontaine
2018-03-31 20:58 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2018-03-13 21:18 UTC (permalink / raw)
To: buildroot
host-meson is used by some packages such as libmpdclient.
If selinuxenabled is installed on host but restorecon is unavailable
(for an "unknwown" reason), install will crash.
Fixes:
- http://autobuild.buildroot.net/results/d5dcdfdfab3503fdc387f99e68267972a38c417d
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1->v2:
- Update patch following upstream review: https://github.com/mesonbuild/meson/pull/3236#pullrequestreview-103570704
...NotFoundError-when-restorecon-unavailable.patch | 31 ++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 package/meson/0001-Fix-FileNotFoundError-when-restorecon-unavailable.patch
diff --git a/package/meson/0001-Fix-FileNotFoundError-when-restorecon-unavailable.patch b/package/meson/0001-Fix-FileNotFoundError-when-restorecon-unavailable.patch
new file mode 100644
index 0000000000..3f1ca68dfc
--- /dev/null
+++ b/package/meson/0001-Fix-FileNotFoundError-when-restorecon-unavailable.patch
@@ -0,0 +1,31 @@
+From 8edc477b7d7b160004eb700a1b7523237333d9ec Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 13 Mar 2018 18:52:36 +0100
+Subject: [PATCH] Fix FileNotFoundError when restorecon unavailable
+
+Fixes:
+ - http://autobuild.buildroot.net/results/d5dcdfdfab3503fdc387f99e68267972a38c417d
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ mesonbuild/scripts/meson_install.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py
+index f895f17d..1414ace2 100644
+--- a/mesonbuild/scripts/meson_install.py
++++ b/mesonbuild/scripts/meson_install.py
+@@ -97,6 +97,10 @@ def restore_selinux_contexts():
+ # is ignored quietly.
+ return
+
++ if not shutil.which('restorecon'):
++ # If we don't have restorecon, failure is ignored quietly.
++ return
++
+ with subprocess.Popen(['restorecon', '-F', '-f-', '-0'],
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as proc:
+ out, err = proc.communicate(input=b'\0'.join(os.fsencode(f) for f in selinux_updates) + b'\0')
+--
+2.14.1
+
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v2, 1/1] meson: fix error when restorecon unavailable
2018-03-13 21:18 [Buildroot] [PATCH v2, 1/1] meson: fix error when restorecon unavailable Fabrice Fontaine
@ 2018-03-31 20:58 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-03-31 20:58 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 13 Mar 2018 22:18:25 +0100, Fabrice Fontaine wrote:
> host-meson is used by some packages such as libmpdclient.
> If selinuxenabled is installed on host but restorecon is unavailable
> (for an "unknwown" reason), install will crash.
>
> Fixes:
> - http://autobuild.buildroot.net/results/d5dcdfdfab3503fdc387f99e68267972a38c417d
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1->v2:
> - Update patch following upstream review: https://github.com/mesonbuild/meson/pull/3236#pullrequestreview-103570704
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-31 20:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-13 21:18 [Buildroot] [PATCH v2, 1/1] meson: fix error when restorecon unavailable Fabrice Fontaine
2018-03-31 20:58 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox