Accepting request 1199890 from devel:libraries:c_c++

- update to 14.2.5:
  * reproc_strerror: avoid undefined behaviour for error == INT_MIN
- drop gcc13.patch (upstream)

- update to 14.1.0

OBS-URL: https://build.opensuse.org/request/show/1199890
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/reproc?expand=0&rev=4
This commit is contained in:
Ana Guerrero 2024-09-10 19:14:46 +00:00 committed by Git OBS Bridge
commit d9654e6d47
5 changed files with 13 additions and 144 deletions

View File

@ -1,136 +0,0 @@
From 0b23d88894ccedde04537fa23ea55cb2f8365342 Mon Sep 17 00:00:00 2001
From: Daan De Meyer <daan.j.demeyer@gmail.com>
Date: Sat, 18 Mar 2023 19:38:19 +0100
Subject: [PATCH] reproc++: Try to fix gcc 13 build
---
reproc++/include/reproc++/reproc.hpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: reproc-14.2.4/reproc++/include/reproc++/reproc.hpp
===================================================================
--- reproc-14.2.4.orig/reproc++/include/reproc++/reproc.hpp
+++ reproc-14.2.4/reproc++/include/reproc++/reproc.hpp
@@ -88,7 +88,7 @@ struct redirect {
struct options {
struct {
- env::type behavior;
+ enum env::type behavior;
/*! Implicitly converts from any STL container of string pairs to the
environment format expected by `reproc_start`. */
class env extra;
@@ -97,9 +97,9 @@ struct options {
const char *working_directory = nullptr;
struct {
- redirect in;
- redirect out;
- redirect err;
+ struct redirect in;
+ struct redirect out;
+ struct redirect err;
bool parent;
bool discard;
FILE *file;
@@ -138,30 +138,12 @@ enum class stream {
err,
};
-class process;
-
namespace event {
-enum {
- in = 1 << 0,
- out = 1 << 1,
- err = 1 << 2,
- exit = 1 << 3,
- deadline = 1 << 4,
-};
-
-struct source {
- class process &process;
- int interests;
- int events;
-};
+class source;
}
-REPROCXX_EXPORT std::error_code poll(event::source *sources,
- size_t num_sources,
- milliseconds timeout = infinite);
-
/*! Improves on reproc's API by adding RAII and changing the API of some
functions to be more idiomatic C++. */
class process {
@@ -220,4 +202,26 @@ private:
std::unique_ptr<reproc_t, reproc_t *(*) (reproc_t *)> impl_;
};
+namespace event {
+
+enum {
+ in = 1 << 0,
+ out = 1 << 1,
+ err = 1 << 2,
+ exit = 1 << 3,
+ deadline = 1 << 4,
+};
+
+struct source {
+ class process process;
+ int interests;
+ int events;
+};
+
+}
+
+REPROCXX_EXPORT std::error_code poll(event::source *sources,
+ size_t num_sources,
+ milliseconds timeout = infinite);
+
}
Index: reproc-14.2.4/reproc++/src/reproc.cpp
===================================================================
--- reproc-14.2.4.orig/reproc++/src/reproc.cpp
+++ reproc-14.2.4/reproc++/src/reproc.cpp
@@ -86,8 +86,9 @@ std::pair<bool, std::error_code> process
std::pair<int, std::error_code> process::poll(int interests,
milliseconds timeout)
{
- event::source source{ *this, interests, 0 };
+ event::source source{ std::move(*this), interests, 0 };
std::error_code ec = ::reproc::poll(&source, 1, timeout);
+ *this = std::move(source.process);
return { source.events, ec };
}
From 9f399675b821e175f85ac3ee6e3fd2e6056573eb Mon Sep 17 00:00:00 2001
From: Daan De Meyer <daan.j.demeyer@gmail.com>
Date: Fri, 21 Apr 2023 19:36:45 +0200
Subject: [PATCH] Fix gcc 13 build
---
reproc++/include/reproc++/reproc.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/reproc++/include/reproc++/reproc.hpp b/reproc++/include/reproc++/reproc.hpp
index b52f495e..7b614a94 100644
--- a/reproc++/include/reproc++/reproc.hpp
+++ b/reproc++/include/reproc++/reproc.hpp
@@ -88,10 +88,10 @@ struct redirect {
struct options {
struct {
- enum env::type behavior;
+ reproc::env::type behavior;
/*! Implicitly converts from any STL container of string pairs to the
environment format expected by `reproc_start`. */
- class env extra;
+ reproc::env extra;
} env = {};
const char *working_directory = nullptr;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:55c780f7faa5c8cabd83ebbb84b68e5e0e09732de70a129f6b3c801e905415dd
size 64956

3
reproc-14.2.5.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:69467be0cfc80734b821c54ada263c8f1439f964314063f76b7cf256c3dc7ee8
size 65290

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Sep 10 13:26:04 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 14.2.5:
* reproc_strerror: avoid undefined behaviour for error == INT_MIN
- drop gcc13.patch (upstream)
-------------------------------------------------------------------
Fri May 19 08:08:57 UTC 2023 - Dirk Müller <dmueller@suse.com>
@ -38,7 +45,7 @@ Fri Feb 24 08:58:37 UTC 2023 - Dirk Müller <dmueller@suse.com>
-------------------------------------------------------------------
Mon Aug 31 15:00:45 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
- update to 14.1.0
- update to 14.1.0
-------------------------------------------------------------------
Fri Jul 31 00:32:43 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package reproc
#
# Copyright (c) 2023 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
@ -19,14 +19,12 @@
%define lib_name libreproc14
%define libpp_name libreproc++14
Name: reproc
Version: 14.2.4
Version: 14.2.5
Release: 0
Summary: A cross-platform (C99/C++11) process library
License: MIT
URL: https://github.com/DaanDeMeyer/reproc
Source: https://github.com/DaanDeMeyer/reproc/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM: https://github.com/DaanDeMeyer/reproc/commit/0b23d88894ccedde04537fa23ea55cb2f8365342.patch
Patch1: gcc13.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig