kronosnet/kronosnet.spec

521 lines
13 KiB
RPMSpec
Raw Normal View History

2018-03-20 22:07:32 +00:00
###############################################################################
###############################################################################
##
2019-04-04 04:57:15 +00:00
## Copyright (C) 2012-2019 Red Hat, Inc. All rights reserved.
2018-03-20 22:07:32 +00:00
##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
## of the GNU General Public License v.2 or higher
##
###############################################################################
###############################################################################
2019-04-04 04:57:15 +00:00
# set defaults from ./configure invocation
2018-03-20 22:07:32 +00:00
%bcond_without sctp
%bcond_without nss
%bcond_without openssl
%bcond_without zlib
%bcond_without lz4
%bcond_without lzo2
%bcond_without lzma
%bcond_without bzip2
%bcond_without zstd
2018-03-20 22:07:32 +00:00
%bcond_with kronosnetd
2019-04-04 04:57:15 +00:00
%bcond_without libnozzle
2018-03-20 22:07:32 +00:00
%bcond_with runautogen
%bcond_with rpmdebuginfo
%bcond_with overriderpmdebuginfo
2018-11-27 21:50:24 +00:00
%bcond_without buildman
2019-04-04 04:57:15 +00:00
%bcond_with installtests
2018-03-20 22:07:32 +00:00
%if %{with overriderpmdebuginfo}
%undefine _enable_debug_packages
%endif
# main (empty) package
# http://www.rpm.org/max-rpm/s1-rpm-subpack-spec-file-changes.html
Name: kronosnet
Summary: Multipoint-to-Multipoint VPN daemon
Version: 1.13
Release: 2%{?dist}
2018-03-20 22:07:32 +00:00
License: GPLv2+ and LGPLv2+
URL: https://kronosnet.org
Source0: https://kronosnet.org/releases/%{name}-%{version}.tar.xz
2018-11-27 21:50:24 +00:00
2018-03-20 22:07:32 +00:00
# Build dependencies
BuildRequires: gcc
# required to build man pages
%if %{with buildman}
2018-11-27 21:50:24 +00:00
BuildRequires: libqb-devel libxml2-devel doxygen
%endif
%if %{with sctp}
2018-03-20 22:07:32 +00:00
BuildRequires: lksctp-tools-devel
%endif
%if %{with nss}
BuildRequires: nss-devel
2018-03-20 22:07:32 +00:00
%endif
%if %{with openssl}
2018-03-20 22:07:32 +00:00
BuildRequires: openssl-devel
%endif
%if %{with zlib}
2018-03-20 22:07:32 +00:00
BuildRequires: zlib-devel
%endif
%if %{with lz4}
2018-03-20 22:07:32 +00:00
BuildRequires: lz4-devel
%endif
%if %{with lzo2}
2018-03-20 22:07:32 +00:00
BuildRequires: lzo-devel
%endif
%if %{with lzma}
2018-03-20 22:07:32 +00:00
BuildRequires: xz-devel
%endif
%if %{with bzip2}
2018-03-20 22:07:32 +00:00
BuildRequires: bzip2-devel
%endif
%if %{with zstd}
BuildRequires: libzstd-devel
%endif
%if %{with kronosnetd}
2018-03-20 22:07:32 +00:00
BuildRequires: pam-devel
%endif
%if %{with libnozzle}
2019-04-04 04:57:15 +00:00
BuildRequires: libnl3-devel
%endif
%if %{with runautogen}
BuildRequires: autoconf automake libtool
2018-03-20 22:07:32 +00:00
%endif
%prep
%setup -q -n %{name}-%{version}
%build
%if %{with runautogen}
./autogen.sh
2018-03-20 22:07:32 +00:00
%endif
%{configure} \
%if %{with installtests}
--enable-install-tests \
2019-04-04 04:57:15 +00:00
%else
--disable-install-tests \
2019-04-04 04:57:15 +00:00
%endif
%if %{with buildman}
--enable-man \
2018-11-27 21:50:24 +00:00
%else
--disable-man \
2018-11-27 21:50:24 +00:00
%endif
%if %{with sctp}
--enable-libknet-sctp \
2018-03-20 22:07:32 +00:00
%else
--disable-libknet-sctp \
2018-03-20 22:07:32 +00:00
%endif
%if %{with nss}
--enable-crypto-nss \
2018-03-20 22:07:32 +00:00
%else
--disable-crypto-nss \
2018-03-20 22:07:32 +00:00
%endif
%if %{with openssl}
--enable-crypto-openssl \
2018-03-20 22:07:32 +00:00
%else
--disable-crypto-openssl \
2018-03-20 22:07:32 +00:00
%endif
%if %{with zlib}
--enable-compress-zlib \
2018-03-20 22:07:32 +00:00
%else
--disable-compress-zlib \
2018-03-20 22:07:32 +00:00
%endif
%if %{with lz4}
--enable-compress-lz4 \
2018-03-20 22:07:32 +00:00
%else
--disable-compress-lz4 \
2018-03-20 22:07:32 +00:00
%endif
%if %{with lzo2}
--enable-compress-lzo2 \
2018-03-20 22:07:32 +00:00
%else
--disable-compress-lzo2 \
2018-03-20 22:07:32 +00:00
%endif
%if %{with lzma}
--enable-compress-lzma \
2018-03-20 22:07:32 +00:00
%else
--disable-compress-lzma \
2018-03-20 22:07:32 +00:00
%endif
%if %{with bzip2}
--enable-compress-bzip2 \
2018-03-20 22:07:32 +00:00
%else
--disable-compress-bzip2 \
2018-03-20 22:07:32 +00:00
%endif
%if %{with zstd}
--enable-compress-zstd \
%else
--disable-compress-zstd \
2019-04-04 04:57:15 +00:00
%endif
%if %{with kronosnetd}
--enable-kronosnetd \
%else
--disable-kronosnetd \
2018-03-20 22:07:32 +00:00
%endif
%if %{with libnozzle}
--enable-libnozzle \
2019-04-04 04:57:15 +00:00
%else
--disable-libnozzle \
2018-03-20 22:07:32 +00:00
%endif
--with-initdefaultdir=%{_sysconfdir}/sysconfig/ \
--with-systemddir=%{_unitdir}
2018-03-20 22:07:32 +00:00
make %{_smp_mflags}
%install
2018-11-27 21:50:24 +00:00
rm -rf %{buildroot}
2018-03-20 22:07:32 +00:00
make install DESTDIR=%{buildroot}
# tree cleanup
# remove static libraries
find %{buildroot} -name "*.a" -exec rm {} \;
# remove libtools leftovers
find %{buildroot} -name "*.la" -exec rm {} \;
2019-04-04 04:57:15 +00:00
# remove init scripts
rm -rf %{buildroot}/etc/init.d
2018-03-20 22:07:32 +00:00
# remove docs
rm -rf %{buildroot}/usr/share/doc/kronosnet
# main empty package
%description
2019-04-04 04:57:15 +00:00
The kronosnet source
2018-03-20 22:07:32 +00:00
%if %{with kronosnetd}
2018-03-20 22:07:32 +00:00
## Runtime and subpackages section
%package -n kronosnetd
Summary: Multipoint-to-Multipoint VPN daemon
License: GPLv2+
2018-11-27 21:50:24 +00:00
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): shadow-utils
Requires(preun): shadow-utils
2018-03-20 22:07:32 +00:00
Requires: pam, /etc/pam.d/passwd
%description -n kronosnetd
2018-11-27 21:50:24 +00:00
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.
2018-03-20 22:07:32 +00:00
%post -n kronosnetd
2019-04-04 04:57:15 +00:00
%systemd_post kronosnetd.service
getent group kronosnetadm >/dev/null || groupadd --force --system kronosnetadm
2018-03-20 22:07:32 +00:00
%preun -n kronosnetd
2019-04-04 04:57:15 +00:00
%systemd_preun kronosnetd.service
2018-03-20 22:07:32 +00:00
%files -n kronosnetd
2018-11-27 21:50:24 +00:00
%license COPYING.* COPYRIGHT
2018-03-20 22:07:32 +00:00
%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}
2019-04-04 04:57:15 +00:00
%package -n libnozzle1
2018-03-20 22:07:32 +00:00
Summary: Simple userland wrapper around kernel tap devices
License: LGPLv2+
2019-04-04 04:57:15 +00:00
%description -n libnozzle1
2018-11-27 21:50:24 +00:00
This is an over-engineered commodity library to manage a pool
of tap devices and provides the basic
pre-up.d/up.d/down.d/post-down.d infrastructure.
2018-03-20 22:07:32 +00:00
2019-04-04 04:57:15 +00:00
%files -n libnozzle1
2018-03-20 22:07:32 +00:00
%license COPYING.* COPYRIGHT
2019-04-04 04:57:15 +00:00
%{_libdir}/libnozzle.so.*
%if 0%{?ldconfig_scriptlets}
%ldconfig_scriptlets -n libnozzle1
%else
%post -n libnozzle1 -p /sbin/ldconfig
%postun -n libnozzle1 -p /sbin/ldconfig
%endif
2018-03-20 22:07:32 +00:00
2019-04-04 04:57:15 +00:00
%package -n libnozzle1-devel
2018-03-20 22:07:32 +00:00
Summary: Simple userland wrapper around kernel tap devices (developer files)
License: LGPLv2+
Requires: libnozzle1%{_isa} = %{version}-%{release}
2018-03-20 22:07:32 +00:00
Requires: pkgconfig
2019-04-04 04:57:15 +00:00
%description -n libnozzle1-devel
2018-11-27 21:50:24 +00:00
This is an over-engineered commodity library to manage a pool
of tap devices and provides the basic
pre-up.d/up.d/down.d/post-down.d infrastructure.
2018-03-20 22:07:32 +00:00
2019-04-04 04:57:15 +00:00
%files -n libnozzle1-devel
2018-03-20 22:07:32 +00:00
%license COPYING.* COPYRIGHT
2019-04-04 04:57:15 +00:00
%{_libdir}/libnozzle.so
%{_includedir}/libnozzle.h
%{_libdir}/pkgconfig/libnozzle.pc
%if %{with buildman}
2019-04-04 04:57:15 +00:00
%{_mandir}/man3/nozzle*.3.gz
2018-03-20 22:07:32 +00:00
%endif
%endif
2018-03-20 22:07:32 +00:00
%package -n libknet1
2018-11-27 21:50:24 +00:00
Summary: Kronosnet core switching implementation
2018-03-20 22:07:32 +00:00
License: LGPLv2+
%description -n libknet1
2018-11-27 21:50:24 +00:00
The whole kronosnet core is implemented in this library.
Please refer to the not-yet-existing documentation for further
information.
2018-03-20 22:07:32 +00:00
%files -n libknet1
%license COPYING.* COPYRIGHT
%{_libdir}/libknet.so.*
%dir %{_libdir}/kronosnet
%if 0%{?ldconfig_scriptlets}
%ldconfig_scriptlets -n libknet1
%else
%post -n libknet1 -p /sbin/ldconfig
%postun -n libknet1 -p /sbin/ldconfig
%endif
2018-03-20 22:07:32 +00:00
%package -n libknet1-devel
Summary: Kronosnet core switching implementation (developer files)
License: LGPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
Requires: pkgconfig
%description -n libknet1-devel
2018-11-27 21:50:24 +00:00
The whole kronosnet core is implemented in this library.
Please refer to the not-yet-existing documentation for further
information.
2018-03-20 22:07:32 +00:00
%files -n libknet1-devel
2019-04-04 04:57:15 +00:00
%license COPYING.* COPYRIGHT
2018-03-20 22:07:32 +00:00
%{_libdir}/libknet.so
%{_includedir}/libknet.h
%{_libdir}/pkgconfig/libknet.pc
%if %{with buildman}
2018-11-27 21:50:24 +00:00
%{_mandir}/man3/knet*.3.gz
%endif
2018-03-20 22:07:32 +00:00
%if %{with nss}
2018-03-20 22:07:32 +00:00
%package -n libknet1-crypto-nss-plugin
2019-04-04 04:57:15 +00:00
Summary: Provides libknet1 nss support
2018-03-20 22:07:32 +00:00
License: LGPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
%description -n libknet1-crypto-nss-plugin
2019-04-04 04:57:15 +00:00
Provides NSS crypto support for libknet1.
2018-03-20 22:07:32 +00:00
%files -n libknet1-crypto-nss-plugin
%{_libdir}/kronosnet/crypto_nss.so
%endif
%if %{with openssl}
2018-03-20 22:07:32 +00:00
%package -n libknet1-crypto-openssl-plugin
2019-04-04 04:57:15 +00:00
Summary: Provides libknet1 openssl support
2018-03-20 22:07:32 +00:00
License: LGPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
%description -n libknet1-crypto-openssl-plugin
2019-04-04 04:57:15 +00:00
Provides OpenSSL crypto support for libknet1.
2018-03-20 22:07:32 +00:00
%files -n libknet1-crypto-openssl-plugin
%{_libdir}/kronosnet/crypto_openssl.so
%endif
%if %{with zlib}
2018-03-20 22:07:32 +00:00
%package -n libknet1-compress-zlib-plugin
2019-04-04 04:57:15 +00:00
Summary: Provides libknet1 zlib support
2018-03-20 22:07:32 +00:00
License: LGPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
%description -n libknet1-compress-zlib-plugin
2019-04-04 04:57:15 +00:00
Provides zlib compression support for libknet1.
2018-03-20 22:07:32 +00:00
%files -n libknet1-compress-zlib-plugin
%{_libdir}/kronosnet/compress_zlib.so
%endif
%if %{with lz4}
2018-03-20 22:07:32 +00:00
%package -n libknet1-compress-lz4-plugin
2019-04-04 04:57:15 +00:00
Summary: Provides libknet1 lz4 and lz4hc support
2018-03-20 22:07:32 +00:00
License: LGPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
%description -n libknet1-compress-lz4-plugin
2019-04-04 04:57:15 +00:00
Provides lz4 and lz4hc compression support for libknet1.
2018-03-20 22:07:32 +00:00
%files -n libknet1-compress-lz4-plugin
%{_libdir}/kronosnet/compress_lz4.so
%{_libdir}/kronosnet/compress_lz4hc.so
%endif
%if %{with lzo2}
2018-03-20 22:07:32 +00:00
%package -n libknet1-compress-lzo2-plugin
2019-04-04 04:57:15 +00:00
Summary: Provides libknet1 lzo2 support
2018-03-20 22:07:32 +00:00
License: LGPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
%description -n libknet1-compress-lzo2-plugin
2019-04-04 04:57:15 +00:00
Provides lzo2 compression support for libknet1.
2018-03-20 22:07:32 +00:00
%files -n libknet1-compress-lzo2-plugin
%{_libdir}/kronosnet/compress_lzo2.so
%endif
%if %{with lzma}
2018-03-20 22:07:32 +00:00
%package -n libknet1-compress-lzma-plugin
2019-04-04 04:57:15 +00:00
Summary: Provides libknet1 lzma support
2018-03-20 22:07:32 +00:00
License: LGPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
%description -n libknet1-compress-lzma-plugin
2019-04-04 04:57:15 +00:00
Provides lzma compression support for libknet1.
2018-03-20 22:07:32 +00:00
%files -n libknet1-compress-lzma-plugin
%{_libdir}/kronosnet/compress_lzma.so
%endif
%if %{with bzip2}
2018-03-20 22:07:32 +00:00
%package -n libknet1-compress-bzip2-plugin
2019-04-04 04:57:15 +00:00
Summary: Provides libknet1 bzip2 support
2018-03-20 22:07:32 +00:00
License: LGPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
%description -n libknet1-compress-bzip2-plugin
2019-04-04 04:57:15 +00:00
Provides bzip2 compression support for libknet1.
2018-03-20 22:07:32 +00:00
%files -n libknet1-compress-bzip2-plugin
%{_libdir}/kronosnet/compress_bzip2.so
%endif
%if %{with zstd}
%package -n libknet1-compress-zstd-plugin
Summary: Provides libknet1 zstd support
License: LGPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
%description -n libknet1-compress-zstd-plugin
Provides zstd compression support for libknet1.
%files -n libknet1-compress-zstd-plugin
%{_libdir}/kronosnet/compress_zstd.so
%endif
2018-03-20 22:07:32 +00:00
%package -n libknet1-crypto-plugins-all
2019-04-04 04:57:15 +00:00
Summary: Provides libknet1 crypto plugins meta package
2018-03-20 22:07:32 +00:00
License: LGPLv2+
%if %{with nss}
2018-03-20 22:07:32 +00:00
Requires: libknet1-crypto-nss-plugin%{_isa} = %{version}-%{release}
%endif
%if %{with openssl}
2018-03-20 22:07:32 +00:00
Requires: libknet1-crypto-openssl-plugin%{_isa} = %{version}-%{release}
%endif
%description -n libknet1-crypto-plugins-all
2019-04-04 04:57:15 +00:00
Provides meta package to install all of libknet1 crypto plugins
2018-03-20 22:07:32 +00:00
%files -n libknet1-crypto-plugins-all
%package -n libknet1-compress-plugins-all
2019-04-04 04:57:15 +00:00
Summary: Provides libknet1 compress plugins meta package
2018-03-20 22:07:32 +00:00
License: LGPLv2+
%if %{with zlib}
2018-03-20 22:07:32 +00:00
Requires: libknet1-compress-zlib-plugin%{_isa} = %{version}-%{release}
%endif
%if %{with lz4}
2018-03-20 22:07:32 +00:00
Requires: libknet1-compress-lz4-plugin%{_isa} = %{version}-%{release}
%endif
%if %{with lzo2}
2018-03-20 22:07:32 +00:00
Requires: libknet1-compress-lzo2-plugin%{_isa} = %{version}-%{release}
%endif
%if %{with lzma}
2018-03-20 22:07:32 +00:00
Requires: libknet1-compress-lzma-plugin%{_isa} = %{version}-%{release}
%endif
%if %{with bzip2}
2018-03-20 22:07:32 +00:00
Requires: libknet1-compress-bzip2-plugin%{_isa} = %{version}-%{release}
%endif
%if %{with zstd}
Requires: libknet1-compress-zstd-plugin%{_isa} = %{version}-%{release}
%endif
2018-03-20 22:07:32 +00:00
%description -n libknet1-compress-plugins-all
2019-04-04 04:57:15 +00:00
Meta package to install all of libknet1 compress plugins
2018-03-20 22:07:32 +00:00
%files -n libknet1-compress-plugins-all
%package -n libknet1-plugins-all
2019-04-04 04:57:15 +00:00
Summary: Provides libknet1 plugins meta package
2018-03-20 22:07:32 +00:00
License: LGPLv2+
Requires: libknet1-compress-plugins-all%{_isa} = %{version}-%{release}
Requires: libknet1-crypto-plugins-all%{_isa} = %{version}-%{release}
%description -n libknet1-plugins-all
2019-04-04 04:57:15 +00:00
Meta package to install all of libknet1 plugins
2018-03-20 22:07:32 +00:00
%files -n libknet1-plugins-all
2019-04-04 04:57:15 +00:00
%if %{with installtests}
%package -n kronosnet-tests
Summary: Provides kronosnet test suite
License: GPLv2+
Requires: libknet1%{_isa} = %{version}-%{release}
2019-04-04 04:57:15 +00:00
%description -n kronosnet-tests
This package contains all the libknet and libnozzle test suite.
2019-04-04 04:57:15 +00:00
%files -n kronosnet-tests
%{_libdir}/kronosnet/tests/*
%endif
2018-03-20 22:07:32 +00:00
%if %{with rpmdebuginfo}
%debug_package
%endif
%changelog
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Oct 16 2019 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.13-1
- New upstream release
- Fixes more memory corruption problems on unstable networks.
* Fri Sep 20 2019 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.12-1
- New upstream release
- Fixes memory corruption problem on unstable networks.
* Wed Aug 21 2019 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.11-1
- New upstream release
- Fixes major issues with PMTUd implementation when used in combination with
crypto.
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jun 12 2019 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.10-1
- New upstream release
- fix URL in spec file (rhbz#1708616)
* Thu May 09 2019 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.9-1
- New upstream release
* Wed May 08 2019 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.8-2
- Fix ldconfig scriptlet (Resolves rhbz#1699074)
- Cleanup .gitignore (Resolves rhbz#1699093)
2019-04-04 04:57:15 +00:00
* Wed Apr 03 2019 Madison Kelly <mkelly@alteeve.ca> - 1.8-1
- Updated to upstream release v1.8.