[packages/ploop] - added gcc patch (workaround over-zelous gcc 8+ warning)
qboosh
qboosh at pld-linux.org
Sun Jun 28 21:30:45 CEST 2020
commit 6c2cc55bf476dfb7e3349899037081d3cb3e1742
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jun 28 21:31:57 2020 +0200
- added gcc patch (workaround over-zelous gcc 8+ warning)
ploop-gcc.patch | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
ploop.spec | 2 ++
2 files changed, 55 insertions(+)
---
diff --git a/ploop.spec b/ploop.spec
index 1ed8850..26cb048 100644
--- a/ploop.spec
+++ b/ploop.spec
@@ -10,6 +10,7 @@ Source0: https://github.com/OpenVZ/ploop/archive/v%{version}/%{name}-%{version}.
# Source0-md5: 76bc12dd67ed9201d02bc156fbb6a17a
Patch0: %{name}-types.patch
Patch1: %{name}-python.patch
+Patch2: %{name}-gcc.patch
URL: https://wiki.openvz.org/Ploop
BuildRequires: libxml2-devel >= 2.0
BuildRequires: python3-devel >= 1:3.2
@@ -94,6 +95,7 @@ Interfejs Pythona 3 do biblioteki ploop.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
# honour %{_libexecdir} whatever it's set to
%{__sed} -i -e '/exe = / s,/usr/libexec,%{_libexecdir},' scripts/crypthelper
diff --git a/ploop-gcc.patch b/ploop-gcc.patch
new file mode 100644
index 0000000..62391ed
--- /dev/null
+++ b/ploop-gcc.patch
@@ -0,0 +1,53 @@
+#--- ploop-8.0.14/lib/xml.c.orig 2020-06-19 13:24:40.000000000 +0200
+#+++ ploop-8.0.14/lib/xml.c 2020-06-28 14:39:06.351261541 +0200
+#@@ -554,7 +554,15 @@
+# }
+# root_element = xmlDocGetRootElement(doc);
+#
+#+#if __GNUC__ >= 8
+#+# pragma GCC diagnostic push
+#+# pragma GCC diagnostic ignored "-Wstringop-truncation"
+#+ /* disable "specified bound ... equals destination size", which is OK here */
+#+#endif
+# get_basedir(fname, basedir, sizeof(basedir));
+#+#if __GNUC__ >= 8
+#+# pragma GCC diagnostic pop
+#+#endif
+# ret = parse_xml(basedir, root_element, di);
+# if (ret == 0)
+# ret = validate_disk_descriptor(di);
+#@@ -697,7 +697,16 @@
+# if (di->runtime->xml_fname == NULL)
+# di->runtime->xml_fname = strdup(fname);
+#
+#+#if __GNUC__ >= 8
+#+# pragma GCC diagnostic push
+#+# pragma GCC diagnostic ignored "-Wstringop-truncation"
+#+ /* disable "specified bound ... equals destination size", which is OK here */
+#+#endif
+# get_basedir(fname, tmp, sizeof(tmp));
+#+#if __GNUC__ >= 8
+#+# pragma GCC diagnostic pop
+#+#endif
+#+
+# if (tmp[0] == '\0')
+# strcpy(tmp, "./");
+#
+--- ploop-8.0.14/lib/xml.c.orig 2020-06-28 15:30:04.941218766 +0200
++++ ploop-8.0.14/lib/xml.c 2020-06-28 20:57:50.857172796 +0200
+@@ -433,7 +433,15 @@
+ {
+ char *p;
+
++#if __GNUC__ >= 8
++# pragma GCC diagnostic push
++# pragma GCC diagnostic ignored "-Wstringop-truncation"
++ /* disable "specified bound ... equals destination size", which is OK here */
++#endif
+ strncpy(out, fname, len);
++#if __GNUC__ >= 8
++# pragma GCC diagnostic pop
++#endif
+
+ p = strrchr(out, '/');
+ if (p != NULL)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ploop.git/commitdiff/6c2cc55bf476dfb7e3349899037081d3cb3e1742
More information about the pld-cvs-commit
mailing list