public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/netopeer2] f45: Fixing FTBFS with new openssl
@ 2026-09-18 12:44 Michal Ruprich
  0 siblings, 0 replies; only message in thread
From: Michal Ruprich @ 2026-09-18 12:44 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/netopeer2
Branch : f45
Commit : abd1bb1bb79e34620af1e58ac8cd079f61074085
Author : Michal Ruprich <mruprich@redhat.com>
Date   : 2026-09-18T12:37:42+02:00
Stats  : +67/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/netopeer2/c/abd1bb1bb79e34620af1e58ac8cd079f61074085?branch=f45

Log:
Fixing FTBFS with new openssl

---
diff --git a/0001-openssl4-changes.patch b/0001-openssl4-changes.patch
new file mode 100644
index 0000000..02a0e5f
--- /dev/null
+++ b/0001-openssl4-changes.patch
@@ -0,0 +1,60 @@
+From 5b9a987ef5d937574fd14cbd45ed46c31306be5b Mon Sep 17 00:00:00 2001
+From: Michal Ruprich <michalruprich@gmail.com>
+Date: Fri, 18 Sep 2026 12:27:06 +0200
+Subject: [PATCH] cli UPDATE support for OpenSSL 4
+
+---
+ cli/commands.c | 24 ++++++++++++++----------
+ 1 file changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/cli/commands.c b/cli/commands.c
+index e8ebb28d..1fbd6b56 100644
+--- a/cli/commands.c
++++ b/cli/commands.c
+@@ -2052,7 +2052,8 @@ static void
+ parse_cert(const char *name, const char *path)
+ {
+     int i, j, has_san, first_san;
+-    ASN1_OCTET_STRING *ip;
++    int ip_length, bs_length;
++    const unsigned char *ip_data, *bs_data;
+     ASN1_INTEGER *bs;
+     BIO *bio_out;
+     FILE *fp;
+@@ -2077,8 +2078,10 @@ parse_cert(const char *name, const char *path)
+ 
+     bs = X509_get_serialNumber(cert);
+     BIO_printf(bio_out, "-----%s----- serial: ", name);
+-    for (i = 0; i < bs->length; i++) {
+-        BIO_printf(bio_out, "%02x", bs->data[i]);
++    bs_data = ASN1_STRING_get0_data(bs);
++    bs_length = ASN1_STRING_length(bs);
++    for (i = 0; i < bs_length; i++) {
++        BIO_printf(bio_out, "%02x", bs_data[i]);
+     }
+     BIO_printf(bio_out, "\n");
+ 
+@@ -2119,15 +2122,16 @@ parse_cert(const char *name, const char *path)
+                 }
+                 if (san_name->type == GEN_IPADD) {
+                     BIO_printf(bio_out, "IP:");
+-                    ip = san_name->d.iPAddress;
+-                    if (ip->length == 4) {
+-                        BIO_printf(bio_out, "%d.%d.%d.%d", ip->data[0], ip->data[1], ip->data[2], ip->data[3]);
+-                    } else if (ip->length == 16) {
+-                        for (j = 0; j < ip->length; ++j) {
++                    ip_data = ASN1_STRING_get0_data(san_name->d.iPAddress);
++                    ip_length = ASN1_STRING_length(san_name->d.iPAddress);
++                    if (ip_length == 4) {
++                        BIO_printf(bio_out, "%d.%d.%d.%d", ip_data[0], ip_data[1], ip_data[2], ip_data[3]);
++                    } else if (ip_length == 16) {
++                        for (j = 0; j < ip_length; ++j) {
+                             if ((j > 0) && (j < 15) && (j % 2 == 1)) {
+-                                BIO_printf(bio_out, "%02x:", ip->data[j]);
++                                BIO_printf(bio_out, "%02x:", ip_data[j]);
+                             } else {
+-                                BIO_printf(bio_out, "%02x", ip->data[j]);
++                                BIO_printf(bio_out, "%02x", ip_data[j]);
+                             }
+                         }
+                     }

diff --git a/netopeer2.spec b/netopeer2.spec
index 01dd8d5..fd302e1 100644
--- a/netopeer2.spec
+++ b/netopeer2.spec
@@ -1,6 +1,6 @@
 Name: netopeer2
 Version: 2.4.5
-Release: 6%{?dist}
+Release: 7%{?dist}
 Summary: Netopeer2 NETCONF tools suite
 Url: https://github.com/CESNET/netopeer2
 Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
@@ -8,6 +8,7 @@ Source2: netopeer2-server.service
 License: BSD-3-Clause
 
 Patch0: 0000-force-remove-modules.patch
+Patch1: 0001-openssl4-changes.patch
 
 BuildRequires: gcc
 BuildRequires: cmake
@@ -20,6 +21,7 @@ BuildRequires: libssh-devel
 BuildRequires: openssl-devel
 BuildRequires: systemd-devel
 BuildRequires: systemd
+BuildRequires: git-core
 
 %if 0%{?fedora}
 # c_rehash needed by CLI
@@ -69,7 +71,7 @@ a single established NETCONF session.
 
 
 %prep
-%autosetup -p1
+%autosetup -p1 -S git
 
 %build
 %cmake -DCMAKE_BUILD_TYPE=RELWITHDEBINFO \
@@ -127,6 +129,9 @@ set -e
 %{_datadir}/man/man1/netopeer2-cli.1.gz
 
 %changelog
+* Fri Sep 18 2026 Michal Ruprich <mruprich@redhat.com> - 2.4.5-7
+- Fixing FTBFS with new openssl
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.5-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-18 12:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-18 12:44 [rpms/netopeer2] f45: Fixing FTBFS with new openssl Michal Ruprich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox