forked from pool/nanomsg
Compare commits
12 Commits
fd5feb1341
...
8b1581cf06
Author | SHA256 | Date | |
---|---|---|---|
8b1581cf06 | |||
88017cd19f | |||
91897d2f54 | |||
|
899f196bee | ||
cc32754ef8 | |||
398ba5b840 | |||
5420d803cb | |||
c6a5f1c444 | |||
fb2cc1df28 | |||
|
6e90d8c6ff | ||
1532d64e7f | |||
e3cc45a81c |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3c52165a735c2fb597d2306593ae4b17900688b90113d4115ad8480288f28ccb
|
||||
size 308420
|
3
nanomsg-1.2.1.tar.gz
Normal file
3
nanomsg-1.2.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2e6c20dbfcd4882e133c819ac77501e9b323cb17ae5b3376702c4446261fbc23
|
||||
size 310191
|
17
nanomsg-fix-rpath-issue.patch
Normal file
17
nanomsg-fix-rpath-issue.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 62e5beb..3cd37d2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -39,12 +39,6 @@ if (POLICY CMP0042)
|
||||
cmake_policy (SET CMP0042 NEW)
|
||||
endif ()
|
||||
|
||||
-set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
-list (FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" isSystemDir)
|
||||
-if ("${isSystemDir}" STREQUAL "-1")
|
||||
- set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
-endif ("${isSystemDir}" STREQUAL "-1")
|
||||
-
|
||||
set (NN_DESCRIPTION "High-Performance Scalability Protocols")
|
||||
set (ISSUE_REPORT_MSG "Please consider opening an issue at https://github.com/nanomsg/nanomsg")
|
||||
|
@@ -1,3 +1,62 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 4 17:03:18 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 1.2.1:
|
||||
* Fix SIGBUS on some platforms due to misaligned access
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 21:54:53 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 1.2:
|
||||
* IPv6 support and fixes a couple of bugs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 30 10:09:27 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Add patch:
|
||||
* nanomsg-fix-rpath-issue.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 29 11:19:25 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 1.1.5
|
||||
* This release is a minor bug fix release, and includes some
|
||||
improvements to the CMake logic that should make incorporating
|
||||
nanomsg into larger projects easier.
|
||||
* Removed patch:
|
||||
- strict.diff (fixed by upstream) GH#990
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 8 13:06:39 UTC 2018 - mardnh@gmx.de
|
||||
|
||||
- Update to version 1.1.4
|
||||
* This release is primarily a bug-fix release for Windows
|
||||
platforms, but it also adds support for building on Android.
|
||||
* The main change in this release is a fix for the IPC transport
|
||||
on Windows, which was subject to crashing if the remote peer
|
||||
breaks messages into smaller pieces.
|
||||
As some other SP implementations do this to avoid data copies,
|
||||
this fix is very important.
|
||||
* A fix for leaking handles on Windows is included.
|
||||
* Support for compilation on Android using the NDK and the
|
||||
bundled cmake and toolchain file from Android is now present.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 1 19:39:08 UTC 2018 - mardnh@gmx.de
|
||||
|
||||
- Update to version 1.1.3
|
||||
* CMake exported target, easing inclusion in larger projects
|
||||
(see demos/CMakeLists.txt for an example)
|
||||
* Windows no longer uses a single fixed TCP port for eventfd
|
||||
(this should improve reliability)
|
||||
* Fix for an assertion failure in efd_unsignal
|
||||
* The ABI version is separate from the library version now.
|
||||
* Fixed a crash when calling nn_term without first opening a
|
||||
socket.
|
||||
* Fix for building Windows tests on case-sensitive file systems.
|
||||
* CI/CD improvements: switch to CircleCI, and use CodeCov for
|
||||
coverage analysis.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 7 15:19:02 UTC 2017 - mardnh@gmx.de
|
||||
|
||||
|
32
nanomsg.spec
32
nanomsg.spec
@@ -1,7 +1,8 @@
|
||||
#
|
||||
# spec file for package nanomsg
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -12,24 +13,23 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define sover 5_1_0
|
||||
%define sover 6
|
||||
Name: nanomsg
|
||||
Version: 1.1.2
|
||||
Version: 1.2.1
|
||||
Release: 0
|
||||
Summary: Socket library providing several common communication patterns
|
||||
License: MIT
|
||||
Group: Development/Languages/C and C++
|
||||
Url: http://nanomsg.org/
|
||||
URL: https://nanomsg.org/
|
||||
Source: https://github.com/nanomsg/nanomsg/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch1: strict.diff
|
||||
Patch0: nanomsg-fix-rpath-issue.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
nanomsg is a C socket library providing several common communication
|
||||
@@ -52,29 +52,31 @@ Requires: libnanomsg%{sover} = %{version}
|
||||
Development and header files for nanomsg.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -P 1 -p1
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%cmake
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
%post -n libnanomsg%{sover} -p /sbin/ldconfig
|
||||
%postun -n libnanomsg%{sover} -p /sbin/ldconfig
|
||||
%check
|
||||
%ctest
|
||||
|
||||
%ldconfig_scriptlets -n libnanomsg%{sover}
|
||||
|
||||
%files -n libnanomsg%{sover}
|
||||
%defattr(-,root,root)
|
||||
%doc RELEASING AUTHORS README.md COPYING
|
||||
%license COPYING
|
||||
%doc RELEASING AUTHORS README.md
|
||||
%{_libdir}/libnanomsg.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%license COPYING
|
||||
%{_includedir}/nanomsg
|
||||
%{_libdir}/libnanomsg.so
|
||||
%{_bindir}/nanocat
|
||||
%{_libdir}/pkgconfig/nanomsg.pc
|
||||
%{_libdir}/cmake/nanomsg-*
|
||||
|
||||
%changelog
|
||||
|
38
strict.diff
38
strict.diff
@@ -1,38 +0,0 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2017-04-28 22:38:15.425823291 +0200
|
||||
|
||||
Rewrite section that invokes undefined behavior.
|
||||
|
||||
|
||||
src/aio/usock_posix.inc: In function 'nn_usock_recv_raw':
|
||||
src/aio/usock_posix.inc:1143:21: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
|
||||
*self->in.pfd = *((int*) CMSG_DATA (cmsg));
|
||||
^
|
||||
cd build/src && /usr/bin/cc -DNN_HAVE_ACCEPT4=1 -DNN_HAVE_BACKTRACE=1 -DNN_HAVE_CLOCK_GETTIME=1 -DNN_HAVE_CLOCK_MONOTONIC=1 -DNN_HAVE_EPOLL=1 -DNN_HAVE_EVENTFD=1 -DNN_HAVE_GCC_ATOMIC_BUILTINS -DNN_HAVE_GETADDRINFO_A=1 -DNN_HAVE_LIBNSL=1 -DNN_HAVE_LINUX -DNN_HAVE_MSG_CONTROL=1 -DNN_HAVE_PIPE2=1 -DNN_HAVE_PIPE=1 -DNN_HAVE_POLL=1 -DNN_HAVE_SEMAPHORE -DNN_HAVE_SEMAPHORE_PTHREAD=1 -DNN_HAVE_SOCKETPAIR=1 -DNN_HAVE_UNIX_SOCKETS=1 -DNN_SHARED_LIB -DNN_USE_EPOLL -DNN_USE_EVENTFD -D_GNU_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_THREAD_SAFE -Dnanomsg_EXPORTS -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -O2 -g -DNDEBUG -fPIC -o CMakeFiles/nanomsg.dir/utils/chunk.c.o -c src/utils/chunk.c
|
||||
src/aio/usock_posix.inc:1147:21: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
|
||||
nn_closefd (*((int*) CMSG_DATA (cmsg)));
|
||||
^~~~~~~~~~
|
||||
---
|
||||
src/aio/usock_posix.inc | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: nanomsg-1.0.0/src/aio/usock_posix.inc
|
||||
===================================================================
|
||||
--- nanomsg-1.0.0.orig/src/aio/usock_posix.inc
|
||||
+++ nanomsg-1.0.0/src/aio/usock_posix.inc
|
||||
@@ -1140,11 +1140,13 @@ static int nn_usock_recv_raw (struct nn_
|
||||
while (cmsg) {
|
||||
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
|
||||
if (self->in.pfd) {
|
||||
- *self->in.pfd = *((int*) CMSG_DATA (cmsg));
|
||||
+ memcpy(self->in.pfd, CMSG_DATA(cmsg), sizeof(int));
|
||||
self->in.pfd = NULL;
|
||||
}
|
||||
else {
|
||||
- nn_closefd (*((int*) CMSG_DATA (cmsg)));
|
||||
+ int tmp;
|
||||
+ memcpy(&tmp, CMSG_DATA(cmsg), sizeof(tmp));
|
||||
+ nn_closefd(tmp);
|
||||
}
|
||||
break;
|
||||
}
|
Reference in New Issue
Block a user