!19 Update package to version 1.22

From: @jxy_git 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
This commit is contained in:
openeuler-ci-bot 2023-02-02 09:28:13 +00:00 committed by Gitee
commit 71c11bca25
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 34 additions and 91 deletions

View File

@ -1,31 +0,0 @@
diff -urN a/libknet/host.c b/libknet/host.c
--- a/libknet/host.c 2021-08-04 10:17:01.912099056 +0800
+++ b/libknet/host.c 2021-08-04 10:17:55.708739020 +0800
@@ -77,7 +77,7 @@
/*
* set default host->name to host_id for logging
*/
- snprintf(host->name, KNET_MAX_HOST_LEN - 1, "%u", host_id);
+ snprintf(host->name, KNET_MAX_HOST_LEN, "%u", host_id);
/*
* initialize links internal data
@@ -226,7 +226,7 @@
}
for (host = knet_h->host_head; host != NULL; host = host->next) {
- if (!strncmp(host->name, name, KNET_MAX_HOST_LEN - 1)) {
+ if (!strncmp(host->name, name, KNET_MAX_HOST_LEN)) {
err = -1;
savederrno = EEXIST;
log_err(knet_h, KNET_SUB_HOST, "Duplicated name found on host_id %u",
@@ -235,7 +235,7 @@
}
}
- snprintf(knet_h->host_index[host_id]->name, KNET_MAX_HOST_LEN - 1, "%s", name);
+ snprintf(knet_h->host_index[host_id]->name, KNET_MAX_HOST_LEN, "%s", name);
exit_unlock:
pthread_rwlock_unlock(&knet_h->global_rwlock);

Binary file not shown.

BIN
kronosnet-1.22.tar.xz Normal file

Binary file not shown.

View File

@ -7,26 +7,28 @@
%bcond_without lzma
%bcond_without bzip2
%bcond_without zstd
%bcond_with kronosnetd
%bcond_without libnozzle
%bcond_with runautogen
%bcond_with rpmdebuginfo
%bcond_with overriderpmdebuginfo
%bcond_without buildman
%bcond_with installtests
%if %{with overriderpmdebuginfo}
%undefine _enable_debug_packages
%endif
Name: kronosnet
Summary: Multipoint-to-Multipoint VPN daemon
Version: 1.13
Release: 4
Version: 1.22
Release: 1
License: GPLv2+ and LGPLv2+
URL: https://kronosnet.org
Source0: https://kronosnet.org/releases/%{name}-%{version}.tar.xz
BuildRequires: gcc
Patch0: fix-epoll-event-size-to-scope-with-extra-event-on-send-to-link.patch
BuildRequires: gcc chrpath make libqb-devel
%if %{with buildman}
BuildRequires: libqb-devel libxml2-devel doxygen
BuildRequires: libxml2-devel doxygen doxygen2man
%endif
%if %{with sctp}
BuildRequires: lksctp-tools-devel
@ -55,9 +57,6 @@ BuildRequires: bzip2-devel
%if %{with zstd}
BuildRequires: libzstd-devel
%endif
%if %{with kronosnetd}
BuildRequires: pam-devel
%endif
%if %{with libnozzle}
BuildRequires: libnl3-devel
%endif
@ -65,11 +64,8 @@ BuildRequires: libnl3-devel
BuildRequires: autoconf automake libtool
%endif
Patch0001: backport-kronosnet-fix-format-truncation.patch
Patch0002: fix-epoll-event-size-to-scope-with-extra-event-on-send-to-link.patch
%prep
%autosetup -n kronosnet-%{version} -p1
%autosetup -n %{name}-%{version} -p1
%build
%if %{with runautogen}
@ -131,11 +127,6 @@ Patch0002: fix-epoll-event-size-to-scope-with-extra-event-on-send-to-link.p
%else
--disable-compress-zstd \
%endif
%if %{with kronosnetd}
--enable-kronosnetd \
%else
--disable-kronosnetd \
%endif
%if %{with libnozzle}
--enable-libnozzle \
%else
@ -152,48 +143,21 @@ find %{buildroot} -name "*.a" -exec rm {} \;
find %{buildroot} -name "*.la" -exec rm {} \;
rm -rf %{buildroot}/etc/init.d
rm -rf %{buildroot}/usr/share/doc/kronosnet
file `find %{buildroot}/%{_libdir} -type f` | grep -w ELF | awk -F: '{print $1}' | xargs chrpath -d
mkdir -p %{buildroot}/etc/ld.so.conf.d
echo "%{_libdir}/%{name}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
pushd %{buildroot}%{_prefix}/lib64/kronosnet
ls *.so | awk '{print $1}' | for line in `xargs`;do
%{__ln_s} %{_prefix}/lib64/kronosnet/$line %{buildroot}%{_prefix}/lib64/kronosnet/lib$line
done
popd
%description
The kronosnet source
%if %{with kronosnetd}
%package -n kronosnetd
Summary: Multipoint-to-Multipoint VPN daemon
License: GPLv2+
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): shadow-utils
Requires(preun): shadow-utils
Requires: pam, /etc/pam.d/passwd
%description -n kronosnetd
The kronosnet daemon is a bridge between kronosnet switching engine
and kernel network tap devices, to create and administer a
distributed LAN over multipoint-to-multipoint VPNs.
The daemon does a poor attempt to provide a configure UI similar
to other known network devices/tools (Cisco, quagga).
Beside looking horrific, it allows runtime changes and
reconfiguration of the kronosnet(s) without daemon reload
or service disruption.
%post -n kronosnetd
%systemd_post kronosnetd.service
getent group kronosnetadm >/dev/null || groupadd --force --system kronosnetadm
%preun -n kronosnetd
%systemd_preun kronosnetd.service
%files -n kronosnetd
%license COPYING.* COPYRIGHT
%dir %{_sysconfdir}/kronosnet
%dir %{_sysconfdir}/kronosnet/*
%config(noreplace) %{_sysconfdir}/sysconfig/kronosnetd
%config(noreplace) %{_sysconfdir}/pam.d/kronosnetd
%config(noreplace) %{_sysconfdir}/logrotate.d/kronosnetd
%{_unitdir}/kronosnetd.service
%{_sbindir}/*
%{_mandir}/man8/*
%endif
%if %{with libnozzle}
%package -n libnozzle1
@ -207,12 +171,11 @@ License: LGPLv2+
%files -n libnozzle1
%license COPYING.* COPYRIGHT
%{_libdir}/libnozzle.so.*
%config(noreplace) /etc/ld.so.conf.d/*
%if 0%{?ldconfig_scriptlets}
%ldconfig_scriptlets -n libnozzle1
%else
%post -n libnozzle1 -p /sbin/ldconfig
%postun -n libnozzle1 -p /sbin/ldconfig
%endif
@ -250,9 +213,7 @@ License: LGPLv2+
%if 0%{?ldconfig_scriptlets}
%ldconfig_scriptlets -n libknet1
%else
%post -n libknet1 -p /sbin/ldconfig
%postun -n libknet1 -p /sbin/ldconfig
%endif
@ -284,6 +245,7 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%files -n libknet1-crypto-nss-plugin
%{_libdir}/kronosnet/crypto_nss.so
%{_prefix}/lib64/kronosnet/libcrypto_nss.so
%endif
%if %{with openssl}
@ -296,6 +258,7 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%files -n libknet1-crypto-openssl-plugin
%{_libdir}/kronosnet/crypto_openssl.so
%{_prefix}/lib64/kronosnet/libcrypto_openssl.so
%endif
%if %{with zlib}
@ -308,6 +271,7 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%files -n libknet1-compress-zlib-plugin
%{_libdir}/kronosnet/compress_zlib.so
%{_libdir}/kronosnet/libcompress_zlib.so
%endif
%if %{with lz4}
@ -321,6 +285,8 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%files -n libknet1-compress-lz4-plugin
%{_libdir}/kronosnet/compress_lz4.so
%{_libdir}/kronosnet/compress_lz4hc.so
%{_libdir}/kronosnet/libcompress_lz4.so
%{_libdir}/kronosnet/libcompress_lz4hc.so
%endif
%if %{with lzo2}
@ -333,6 +299,7 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%files -n libknet1-compress-lzo2-plugin
%{_libdir}/kronosnet/compress_lzo2.so
%{_libdir}/kronosnet/libcompress_lzo2.so
%endif
%if %{with lzma}
@ -345,6 +312,7 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%files -n libknet1-compress-lzma-plugin
%{_libdir}/kronosnet/compress_lzma.so
%{_libdir}/kronosnet/libcompress_lzma.so
%endif
%if %{with bzip2}
@ -357,6 +325,7 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%files -n libknet1-compress-bzip2-plugin
%{_libdir}/kronosnet/compress_bzip2.so
%{_libdir}/kronosnet/libcompress_bzip2.so
%endif
%if %{with zstd}
@ -369,6 +338,7 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%files -n libknet1-compress-zstd-plugin
%{_libdir}/kronosnet/compress_zstd.so
%{_libdir}/kronosnet/libcompress_zstd.so
%endif
%package -n libknet1-crypto-plugins-all
@ -432,11 +402,15 @@ Requires: libknet1%{_isa} = %{version}-%{release}
%files -n kronosnet-tests
%{_libdir}/kronosnet/tests/*
%endif
%if %{with rpmdebuginfo}
%debug_package
%endif
%changelog
* Thu Feb 02 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 1.22-1
- Update package to version 1.22
* Tue Nov 15 2022 Ge Wang <wangge20@h-partners.com> - 1.13-4
- fix epoll event size to scope with extra event on send to link