From 0f6f163b560aaa472899c5188b215c5b9ecca58a Mon Sep 17 00:00:00 2001 From: basebuilder_pel7ppc64bebuilder0 Date: Thu, 17 May 2018 19:13:33 +0200 Subject: [PATCH] util linux patches Signed-off-by: basebuilder_pel7ppc64bebuilder0 --- ...rate-ENOTSUP-when-failing-to-relabel.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 SOURCES/0148-mkswap-tolerate-ENOTSUP-when-failing-to-relabel.patch diff --git a/SOURCES/0148-mkswap-tolerate-ENOTSUP-when-failing-to-relabel.patch b/SOURCES/0148-mkswap-tolerate-ENOTSUP-when-failing-to-relabel.patch new file mode 100644 index 00000000..986b519f --- /dev/null +++ b/SOURCES/0148-mkswap-tolerate-ENOTSUP-when-failing-to-relabel.patch @@ -0,0 +1,33 @@ +From a656eda4cf268f555563d45808df4bb1df54c95f Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 18 Apr 2016 09:01:23 +0200 +Subject: [PATCH] mkswap: tolerate ENOTSUP when failing to relabel + +It might be that the underlying filesystem just doesn't support SELinux +labeling. This fixes creating swap on vfat live media: + + # livecd-iso-to-disk.sh --msdos --swap-size-mb 666 ... + +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1538545 +Upstream: http://github.com/karelzak/util-linux/commit/d97dc0ee2505e80c8e9fca89aa2001b2ec2c3695 +Signed-off-by: Lubomir Rintel +Signed-off-by: Karel Zak +--- + disk-utils/mkswap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c +index ec6fc5f99..ff47f2038 100644 +--- a/disk-utils/mkswap.c ++++ b/disk-utils/mkswap.c +@@ -656,7 +656,7 @@ main(int argc, char **argv) { + context_string = context_str(newcontext); + + if (strcmp(context_string, oldcontext)!=0) { +- if (fsetfilecon(DEV, context_string)) ++ if (fsetfilecon(DEV, context_string) && errno != ENOTSUP) + err(EXIT_FAILURE, _("unable to relabel %s to %s"), + device_name, context_string); + } +-- +2.13.6