Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ninja for openSUSE:Factory checked 
in at 2025-12-29 15:15:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ninja (Old)
 and      /work/SRC/openSUSE:Factory/.ninja.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ninja"

Mon Dec 29 15:15:56 2025 rev:34 rq:1324564 version:1.13.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/ninja/ninja.changes      2025-10-02 
19:18:32.910308403 +0200
+++ /work/SRC/openSUSE:Factory/.ninja.new.1928/ninja.changes    2025-12-29 
15:16:16.405702899 +0100
@@ -1,0 +2,6 @@
+Sun Dec 28 13:13:01 UTC 2025 - Dirk Müller <[email protected]>
+
+- update to 1.13.2:
+  * Fix Ninja exit code when interrupted (issue #2681) #2690
+
+-------------------------------------------------------------------

Old:
----
  ninja-1.13.1.tar.gz

New:
----
  ninja-1.13.2.tar.gz

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

Other differences:
------------------
++++++ ninja.spec ++++++
--- /var/tmp/diff_new_pack.HyEtWC/_old  2025-12-29 15:16:19.053811669 +0100
+++ /var/tmp/diff_new_pack.HyEtWC/_new  2025-12-29 15:16:19.073812490 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ninja
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,6 +15,7 @@
 # Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 %global flavor @BUILD_FLAVOR@%{nil}
 %if "%{flavor}" == "test"
 %define name_ext -test
@@ -25,7 +26,7 @@
 %endif
 
 Name:           ninja%{name_ext}
-Version:        1.13.1
+Version:        1.13.2
 Release:        0
 Summary:        A small build system closest in spirit to Make
 License:        Apache-2.0
@@ -86,4 +87,5 @@
 %{_datadir}/vim
 %{_datadir}/zsh
 %{_rpmconfigdir}/macros.d/macros.ninja
+%endif
 

++++++ ninja-1.13.1.tar.gz -> ninja-1.13.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ninja-1.13.1/doc/manual.asciidoc 
new/ninja-1.13.2/doc/manual.asciidoc
--- old/ninja-1.13.1/doc/manual.asciidoc        2025-07-10 22:43:08.000000000 
+0200
+++ new/ninja-1.13.2/doc/manual.asciidoc        2025-11-20 17:26:20.000000000 
+0100
@@ -1,6 +1,6 @@
 The Ninja build system
 ======================
-v1.13.1, Jul 2025
+v1.13.2, Nov 2025
 
 
 Introduction
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ninja-1.13.1/misc/output_test.py 
new/ninja-1.13.2/misc/output_test.py
--- old/ninja-1.13.1/misc/output_test.py        2025-07-10 22:43:08.000000000 
+0200
+++ new/ninja-1.13.2/misc/output_test.py        2025-11-20 17:26:20.000000000 
+0100
@@ -7,9 +7,11 @@
 
 import os
 import platform
+import signal
 import subprocess
 import sys
 import tempfile
+import time
 import unittest
 from textwrap import dedent
 import typing as T
@@ -631,5 +633,23 @@
 """,
         )
 
+    def test_issue_2681(self):
+        """Ninja should return a status code of 130 when interrupted."""
+        plan = r"""rule sleep
+  command = sleep 10
+
+build foo: sleep
+"""
+        with BuildDir(plan) as b:
+            for signum in (signal.SIGINT, signal.SIGHUP, signal.SIGTERM):
+                proc = subprocess.Popen([NINJA_PATH, "foo"], cwd=b.path, 
env=default_env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+                # Sleep a bit to let Ninja start the build, otherwise the 
signal could be received
+                # before it, and returncode will be -2.
+                time.sleep(0.2)
+                os.kill(proc.pid, signum)
+                proc.wait()
+                self.assertEqual(proc.returncode, 130, msg=f"For signal 
{signum}")
+
+
 if __name__ == '__main__':
     unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ninja-1.13.1/src/build.h new/ninja-1.13.2/src/build.h
--- old/ninja-1.13.1/src/build.h        2025-07-10 22:43:08.000000000 +0200
+++ new/ninja-1.13.2/src/build.h        2025-11-20 17:26:20.000000000 +0100
@@ -154,9 +154,8 @@
 
   /// The result of waiting for a command.
   struct Result {
-    Result() : edge(NULL) {}
-    Edge* edge;
-    ExitStatus status;
+    Edge* edge = nullptr;
+    ExitStatus status = ExitFailure;
     std::string output;
     bool success() const { return status == ExitSuccess; }
   };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ninja-1.13.1/src/real_command_runner.cc 
new/ninja-1.13.2/src/real_command_runner.cc
--- old/ninja-1.13.1/src/real_command_runner.cc 2025-07-10 22:43:08.000000000 
+0200
+++ new/ninja-1.13.2/src/real_command_runner.cc 2025-11-20 17:26:20.000000000 
+0100
@@ -98,8 +98,10 @@
   Subprocess* subproc;
   while ((subproc = subprocs_.NextFinished()) == NULL) {
     bool interrupted = subprocs_.DoWork();
-    if (interrupted)
+    if (interrupted) {
+      result->status = ExitInterrupted;
       return false;
+    }
   }
 
   result->status = subproc->Finish();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ninja-1.13.1/src/version.cc 
new/ninja-1.13.2/src/version.cc
--- old/ninja-1.13.1/src/version.cc     2025-07-10 22:43:08.000000000 +0200
+++ new/ninja-1.13.2/src/version.cc     2025-11-20 17:26:20.000000000 +0100
@@ -20,7 +20,7 @@
 
 using namespace std;
 
-const char* kNinjaVersion = "1.13.1";
+const char* kNinjaVersion = "1.13.2";
 
 void ParseVersion(const string& version, int* major, int* minor) {
   size_t end = version.find('.');

Reply via email to