Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kbuild for openSUSE:Factory checked 
in at 2024-06-09 20:18:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kbuild (Old)
 and      /work/SRC/openSUSE:Factory/.kbuild.new.19518 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kbuild"

Sun Jun  9 20:18:56 2024 rev:42 rq:1179187 version:0.1.9998svn3427

Changes:
--------
--- /work/SRC/openSUSE:Factory/kbuild/kbuild.changes    2024-02-23 
16:41:31.495062378 +0100
+++ /work/SRC/openSUSE:Factory/.kbuild.new.19518/kbuild.changes 2024-06-09 
20:19:10.891325270 +0200
@@ -1,0 +2,11 @@
+Fri Jun  7 11:04:30 UTC 2024 - Martin Jambor <[email protected]>
+
+- Make kbuild buildable with GCC 14 (boo#1225792)
+  * Changes to configure machinery so that it does not fail and detect
+    what it has detected with previous GCC versions.
+    (kBuild-configure-c99.patch, kBuild-configure-c99-2.patch)
+  * Add many missing includes (kBuild-c99.patch).
+  * Fix an actual bug in a call to eval_buffer that also manifests as
+    a C99 violation (kBuild-c99-2.patch).
+
+-------------------------------------------------------------------

New:
----
  kBuild-c99-2.patch
  kBuild-c99.patch
  kBuild-configure-c99-2.patch
  kBuild-configure-c99.patch

BETA DEBUG BEGIN:
  New:  * Fix an actual bug in a call to eval_buffer that also manifests as
    a C99 violation (kBuild-c99-2.patch).
  New:    (kBuild-configure-c99.patch, kBuild-configure-c99-2.patch)
  * Add many missing includes (kBuild-c99.patch).
  * Fix an actual bug in a call to eval_buffer that also manifests as
  New:    what it has detected with previous GCC versions.
    (kBuild-configure-c99.patch, kBuild-configure-c99-2.patch)
  * Add many missing includes (kBuild-c99.patch).
  New:    what it has detected with previous GCC versions.
    (kBuild-configure-c99.patch, kBuild-configure-c99-2.patch)
  * Add many missing includes (kBuild-c99.patch).
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kbuild.spec ++++++
--- /var/tmp/diff_new_pack.JK6Uih/_old  2024-06-09 20:19:11.511346898 +0200
+++ /var/tmp/diff_new_pack.JK6Uih/_new  2024-06-09 20:19:11.515347037 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package kbuild
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -34,6 +34,17 @@
 Patch9:         ppc64le.patch
 Patch10:        aarch64.patch
 Patch13:        glob-lstat.patch
+
+# C99 compatibility patches to resolve boo#1225792:
+# From from https://bugzilla.redhat.com/show_bug.cgi?id=2154544
+Patch14:        kBuild-configure-c99.patch
+# Somehow RedHat did not need this one:
+Patch15:        kBuild-configure-c99-2.patch
+# From from https://bugzilla.redhat.com/show_bug.cgi?id=2154544
+Patch16:        kBuild-c99.patch
+# From from https://bugzilla.redhat.com/show_bug.cgi?id=2154544
+Patch17:        kBuild-c99-2.patch
+
 BuildRequires:  automake
 BuildRequires:  bison
 BuildRequires:  byacc
@@ -66,6 +77,10 @@
 %patch -P 9 -p1
 %patch -P 10 -p1
 %patch -P 13 -p1
+%patch -P 14 -p1
+%patch -P 15 -p1
+%patch -P 16 -p1
+%patch -P 17 -p0
 
 %build
 export CFLAGS="%{optflags} -fno-strict-aliasing"

++++++ kBuild-c99-2.patch ++++++
The eval_buffer function expects the end of the string as the
(optional) last argument, not its length.

Index: src/kmk/loadapi.c
===================================================================
--- src/kmk/loadapi.c   (revision 3600)
+++ src/kmk/loadapi.c   (working copy)
@@ -59,7 +59,7 @@
   install_variable_buffer (&pbuf, &plen);
 
   s = xstrdup (buffer);
-  eval_buffer (s, flp IF_WITH_VALUE_LENGTH_PARAM (strlen (s) /** @todo 
suboptimal */));
+  eval_buffer (s, flp IF_WITH_VALUE_LENGTH_PARAM (s + strlen (s) /** @todo 
suboptimal */));
   free (s);
 
   restore_variable_buffer (pbuf, plen);

++++++ kBuild-c99.patch ++++++
Do not treat <strings.h> as an umbrella header for <string.h>
The two are distinct on GNU/Linux.
    
Also add missing #include <string.h> in some files.

Index: kbuild-0.1.9998svn3427/src/sed/lib/getline.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/lib/getline.c
+++ kbuild-0.1.9998svn3427/src/sed/lib/getline.c
@@ -9,10 +9,10 @@
 #include <stdio.h>
 #undef getline                         /* bird */
 
+#include <string.h>
+
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
-#else
-# include <string.h>
 #endif /* HAVE_STRINGS_H */
 
 #ifdef HAVE_STDLIB_H
Index: kbuild-0.1.9998svn3427/src/sed/lib/mkstemp.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/lib/mkstemp.c
+++ kbuild-0.1.9998svn3427/src/sed/lib/mkstemp.c
@@ -2,10 +2,10 @@
 #include "config.h"
 #endif
 
+#include <string.h>
+
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
-#else
-# include <string.h>
 #endif /* HAVE_STRINGS_H */
 
 #ifdef HAVE_STDLIB_H
Index: kbuild-0.1.9998svn3427/src/sed/lib/utils.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/lib/utils.c
+++ kbuild-0.1.9998svn3427/src/sed/lib/utils.c
@@ -19,16 +19,17 @@
 #include "config.h"
 
 #include <stdio.h>
+#include <unistd.h>
 
 #include <errno.h>
 #ifndef errno
   extern int errno;
 #endif
 
+#include <string.h>
+
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
-#else
-# include <string.h>
 #endif /* HAVE_STRINGS_H */
 
 #ifdef HAVE_STDLIB_H
Index: kbuild-0.1.9998svn3427/src/sed/sed/compile.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/compile.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/compile.c
@@ -22,14 +22,13 @@
 #include "strverscmp.h"
 #include <stdio.h>
 #include <ctype.h>
+#include <string.h>
 
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 # ifdef HAVE_MEMORY_H
 #  include <memory.h>
 # endif
-#else
-# include <string.h>
 #endif /* HAVE_STRINGS_H */
 
 #ifdef HAVE_STDLIB_H
Index: kbuild-0.1.9998svn3427/src/sed/sed/execute.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/execute.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/execute.c
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 #include <ctype.h>
+#include <string.h>
 
 #include <errno.h>
 #ifndef errno
@@ -46,8 +47,6 @@ extern int errno;
 
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
-#else
-# include <string.h>
 #endif /*HAVE_STRINGS_H*/
 #ifdef HAVE_MEMORY_H
 # include <memory.h>
Index: kbuild-0.1.9998svn3427/src/sed/sed/fmt.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/fmt.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/fmt.c
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <sys/types.h>
+#include <string.h>
 
 #if HAVE_LIMITS_H
 # include <limits.h>
Index: kbuild-0.1.9998svn3427/src/sed/sed/mbcs.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/mbcs.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/mbcs.c
@@ -17,6 +17,7 @@
 
 #include "sed.h"
 #include <stdlib.h>
+#include <string.h>
 
 int mb_cur_max;
 
Index: kbuild-0.1.9998svn3427/src/sed/sed/regexp.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/regexp.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/regexp.c
@@ -19,6 +19,7 @@
 
 #include <ctype.h>
 #include <stdio.h>
+#include <string.h>
 #ifdef HAVE_STDLIB_H
 # include <stdlib.h>
 #endif
Index: kbuild-0.1.9998svn3427/src/sed/sed/sed.c
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/sed/sed/sed.c
+++ kbuild-0.1.9998svn3427/src/sed/sed/sed.c
@@ -22,12 +22,10 @@
 
 #include "sed.h"
 
-
 #include <stdio.h>
+#include <string.h>
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
-#else
-# include <string.h>
 #endif /*HAVE_STRINGS_H*/
 #ifdef HAVE_MEMORY_H
 # include <memory.h>

++++++ kBuild-configure-c99-2.patch ++++++
Index: kbuild-0.1.9998svn3427/src/kmk/configure.ac
===================================================================
--- kbuild-0.1.9998svn3427.orig/src/kmk/configure.ac
+++ kbuild-0.1.9998svn3427/src/kmk/configure.ac
@@ -121,6 +121,7 @@ pds_AC_DOS_PATHS
 AC_CACHE_CHECK([for standard gettimeofday], [ac_cv_func_gettimeofday],
   [ac_cv_func_gettimeofday=no
    AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/time.h>
+                  #include <stdlib.h>
                   int main ()
                   {
                     struct timeval t; t.tv_sec = -1; t.tv_usec = -1;

++++++ kBuild-configure-c99.patch ++++++
Fix some typical C99 compatibility issues in old configure scripts.

diff --git a/src/sed/config/getline.m4 b/src/sed/config/getline.m4
index ff8b5f4b..52d2e3e7 100644
--- a/src/sed/config/getline.m4
+++ b/src/sed/config/getline.m4
@@ -27,7 +27,7 @@ AC_DEFUN([AM_FUNC_GETLINE],
       if (!in)
        return 1;
       len = getline (&line, &siz, in);
-      exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
+      return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1;
     }
     ], am_cv_func_working_getline=yes dnl The library version works.
     , am_cv_func_working_getline=no dnl The library version does NOT work.
diff --git a/src/sed/configure b/src/sed/configure
index 0b01618f..b1172113 100755
--- a/src/sed/configure
+++ b/src/sed/configure
@@ -2593,7 +2593,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   for ac_declaration in \
-   '' \
+   '#include <stdlib.h>' \
    'extern "C" void std::exit (int) throw (); using std::exit;' \
    'extern "C" void std::exit (int); using std::exit;' \
    'extern "C" void exit (int) throw ();' \
@@ -3378,8 +3378,8 @@ main ()
   for (i = 0; i < 256; i++)
     if (XOR (islower (i), ISLOWER (i))
        || toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
+      return 2;
+  return 0;
 }
 _ACEOF
 rm -f conftest$ac_exeext
@@ -5747,7 +5747,7 @@ cat >>conftest.$ac_ext <<_ACEOF
       if (!in)
        return 1;
       len = getline (&line, &siz, in);
-      exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
+      return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1;
     }
 
 _ACEOF

Reply via email to