Blame SOURCES/1001-Do-not-use-Werror-during-build.patch

6e0e92
From 4b3dc6b38abbd32cda557d5ef9ea1383ac5fdcf2 Mon Sep 17 00:00:00 2001
44fb84
From: rpm-build <rpm-build>
44fb84
Date: Thu, 23 Feb 2017 08:17:07 +0100
6e0e92
Subject: [PATCH 2/3] Do not use -Werror during build
44fb84
MIME-Version: 1.0
44fb84
Content-Type: text/plain; charset=UTF-8
44fb84
Content-Transfer-Encoding: 8bit
44fb84
44fb84
There are new warnings when setools are built with gcc 7 therefore we
44fb84
want to suppress -Werror for now
44fb84
44fb84
Fixes:
44fb84
libqpol/policy_extend.c: In function ‘policy_extend’:
44fb84
libqpol/policy_extend.c:161:27: error: ‘%04zd’ directive output may be truncated writing between 4 and 10 bytes into a region of size 5 [-Werror=format-truncation=]
44fb84
    snprintf(buff, 9, "@ttr%04zd", i + 1);
44fb84
                           ^~~~~
44fb84
libqpol/policy_extend.c:161:22: note: directive argument in the range [1, 4294967295]
44fb84
    snprintf(buff, 9, "@ttr%04zd", i + 1);
44fb84
                      ^~~~~~~~~~~
44fb84
In file included from /usr/include/stdio.h:939:0,
44fb84
                 from /usr/include/sepol/policydb/policydb.h:53,
44fb84
                 from libqpol/policy_extend.c:29:
44fb84
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 9 and 15 bytes into a destination of size 9
44fb84
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
44fb84
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44fb84
        __bos (__s), __fmt, __va_arg_pack ());
44fb84
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44fb84
cc1: all warnings being treated as errors
44fb84
error: command 'gcc' failed with exit status 1
44fb84
---
44fb84
 setup.py | 2 +-
44fb84
 1 file changed, 1 insertion(+), 1 deletion(-)
44fb84
44fb84
diff --git a/setup.py b/setup.py
6e0e92
index c94daf1..a7442ac 100644
44fb84
--- a/setup.py
44fb84
+++ b/setup.py
44fb84
@@ -105,7 +105,7 @@ ext_py_mods = [Extension('setools.policyrep', ['setools/policyrep.pyx'],
44fb84
                          libraries=['selinux', 'sepol'],
44fb84
                          library_dirs=lib_dirs,
44fb84
                          define_macros=macros,
44fb84
-                         extra_compile_args=['-Werror', '-Wextra',
44fb84
+                         extra_compile_args=['-Wextra',
44fb84
                                              '-Waggregate-return',
44fb84
                                              '-Wfloat-equal',
44fb84
                                              '-Wformat', '-Wformat=2',
44fb84
-- 
6e0e92
2.17.2
44fb84