diff --git a/debian/control b/debian/control index fe185678..33e53e7e 100644 --- a/debian/control +++ b/debian/control @@ -1,67 +1,67 @@ Source: kronosnet Priority: extra Maintainer: Fabio M. Di Nitto Build-Depends: debhelper (>= 7.0.50~), autotools-dev, libqb-dev (>= 0.14.3), libnss3-dev, libnspr4-dev, pkg-config, libpam-dev, zlib1g-dev, liblz4-dev, liblzo2-dev, liblzma-dev, libbz2-devel Standards-Version: 3.8.4 Section: admin Package: kronosnetd Section: admin Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Multipoint-to-Multipoint VPN daemon 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. . This package contains the kronosnet daemon and utils. -Package: libtap0 +Package: libtap1 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Simple userland wrapper around kernel tap devices 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. . This package contains libraries that should be used by libtap clients. Package: libtap-dev Section: libdevel Architecture: any -Depends: libtap0 (= ${binary:Version}), ${misc:Depends} +Depends: libtap1 (= ${binary:Version}), ${misc:Depends} Description: Simple userland wrapper around kernel tap devices (developer files) 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. . This package contains header files required to build clients for libtap clients. -Package: libknet0 +Package: libknet1 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: kronosnet core switching implementation The whole kronosnet core is implemented in this library. Please refer to the not-yet-existing documentation for further information. . This package contains libraries that should be used by libknet clients. Package: libknet-dev Section: libdevel Architecture: any -Depends: libknet0 (= ${binary:Version}), ${misc:Depends} +Depends: libknet1 (= ${binary:Version}), ${misc:Depends} Description: kronosnet core switching implementation (developer files) The whole kronosnet core is implemented in this library. Please refer to the not-yet-existing documentation for further information. . This package contains header files required to build clients for libknet clients. diff --git a/debian/libknet0.install b/debian/libknet1.install similarity index 100% rename from debian/libknet0.install rename to debian/libknet1.install diff --git a/debian/libtap0.install b/debian/libtap1.install similarity index 100% rename from debian/libtap0.install rename to debian/libtap1.install diff --git a/kronosnet.spec.in b/kronosnet.spec.in index ab7459c3..5e9f70ef 100644 --- a/kronosnet.spec.in +++ b/kronosnet.spec.in @@ -1,336 +1,336 @@ ############################################################################### ############################################################################### ## ## Copyright (C) 2010-2017 Red Hat, Inc. All rights reserved. ## ## 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 ## ############################################################################### ############################################################################### # keep around ready for later user %global alphatag @alphatag@ %global numcomm @numcomm@ %global dirty @dirty@ # set defaults from ./configure invokation %@sctp@ sctp %@nss@ nss %@zlib@ zlib %@lz4@ lz4 %@lzo2@ lzo2 %@lzma@ lzma %@bzip2@ bzip2 %@kronosnetd@ kronosnetd %@libtap@ libtap %if %{with sctp} %global buildsctp 1 %endif %if %{with nss} %global buildcryptonss 1 %endif %if %{with zlib} %global buildcompresszlib 1 %endif %if %{with lz4} %global buildcompresslz4 1 %endif %if %{with lzo2} %global buildcompresslzo2 1 %endif %if %{with lzma} %global buildcompresslzma 1 %endif %if %{with bzip2} %global buildcompressbzip2 1 %endif %if %{with libtap} %global buildlibtap 1 %endif %if %{with kronosnetd} %global buildlibtap 1 %global buildkronosnetd 1 %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: @version@ Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/fabbione/kronosnet/ Source0: https://github.com/fabbione/kronosnet/archive/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz ## Setup/build bits BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) # Build dependencies %if %{defined buildsctp} BuildRequires: lksctp-tools-devel %endif %if %{defined buildcryptonss} BuildRequires: nss-devel %endif %if %{defined buildcompresszlib} BuildRequires: zlib-devel %endif %if %{defined buildcompresslz4} BuildRequires: lz4-devel %endif %if %{defined buildcompresslzo2} BuildRequires: lzo-devel %endif %if %{defined buildcompresslzma} BuildRequires: xz-devel %endif %if %{defined buildcompressbzip2} BuildRequires: bzip2-devel %endif %if %{defined buildkronosnetd} BuildRequires: libqb-devel pam-devel %endif %prep %setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} %build %{configure} --disable-poc \ %if %{defined buildsctp} --enable-libknet-sctp \ %else --disable-libknet-sctp \ %endif %if %{defined buildcryptonss} --enable-crypto-nss \ %else --disable-crypto-nss \ %endif %if %{defined buildcompresszlib} --enable-compress-zlib \ %else --disable-compress-zlib \ %endif %if %{defined buildcompresslz4} --enable-compress-lz4 \ %else --disable-compress-lz4 \ %endif %if %{defined buildcompresslzo2} --enable-compress-lzo2 \ %else --disable-compress-lzo2 \ %endif %if %{defined buildcompresslzma} --enable-compress-lzma \ %else --disable-compress-lzma \ %endif %if %{defined buildcompressbzip2} --enable-compress-bzip2 \ %else --disable-compress-bzip2 \ %endif %if %{defined buildkronosnetd} --enable-kronosnetd \ %endif %if %{defined buildlibtap} --enable-libtap \ %endif --with-initdefaultdir=%{_sysconfdir}/sysconfig/ \ %if %{defined _unitdir} --with-systemddir=%{_unitdir} %else --with-initddir=%{_sysconfdir}/rc.d/init.d/ %endif make %{_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} # tree cleanup # remove static libraries find %{buildroot} -name "*.a" -exec rm {} \; # remove libtools leftovers find %{buildroot} -name "*.la" -exec rm {} \; # handle systemd vs init script %if %{defined _unitdir} # remove init scripts rm -rf %{buildroot}/etc/init.d %else # remove systemd specific bits find %{buildroot} -name "*.service" -exec rm {} \; %endif # remove docs rm -rf %{buildroot}/usr/share/doc/kronosnet %clean rm -rf %{buildroot} # main empty package %description kronosnet source %if %{defined buildkronosnetd} ## Runtime and subpackages section %package -n kronosnetd Group: System Environment/Base Summary: Multipoint-to-Multipoint VPN daemon %if %{defined _unitdir} # Needed for systemd unit Requires(post): systemd-sysv Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units %else Requires(post): chkconfig Requires(preun): chkconfig, initscripts %endif 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 %if %{defined _unitdir} %if 0%{?systemd_post:1} %systemd_post kronosnetd.service %else /bin/systemctl daemon-reload >/dev/null 2>&1 || : %endif %else /sbin/chkconfig --add kronosnetd %endif /usr/sbin/groupadd --force --system @defaultadmgroup@ %preun -n kronosnetd %if %{defined _unitdir} %if 0%{?systemd_preun:1} %systemd_preun kronosnetd.service %else if [ "$1" -eq 0 ]; then /bin/systemctl --no-reload disable kronosnetd.service /bin/systemctl stop kronosnetd.service >/dev/null 2>&1 fi %endif %else if [ "$1" = 0 ]; then /sbin/service kronosnetd stop >/dev/null 2>&1 /sbin/chkconfig --del kronosnetd fi %endif %files -n kronosnetd %defattr(-,root,root,-) %doc 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 %if %{defined _unitdir} %{_unitdir}/kronosnetd.service %else %config(noreplace) %{_sysconfdir}/rc.d/init.d/kronosnetd %endif %{_sbindir}/* %{_mandir}/man8/* %endif %if %{defined buildlibtap} -%package -n libtap0 +%package -n libtap1 Group: System Environment/Libraries Summary: Simple userland wrapper around kernel tap devices -%description -n libtap0 +%description -n libtap1 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. -%files -n libtap0 +%files -n libtap1 %defattr(-,root,root,-) %doc COPYING.* COPYRIGHT %{_libdir}/libtap.so.* -%post -n libtap0 -p /sbin/ldconfig +%post -n libtap1 -p /sbin/ldconfig -%postun -n libtap0 -p /sbin/ldconfig +%postun -n libtap1 -p /sbin/ldconfig -%package -n libtap0-devel +%package -n libtap1-devel Group: Development/Libraries Summary: Simple userland wrapper around kernel tap devices (developer files) -Requires: libtap0 = %{version}-%{release} +Requires: libtap1 = %{version}-%{release} Requires: pkgconfig -%description -n libtap0-devel +%description -n libtap1-devel 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. -%files -n libtap0-devel +%files -n libtap1-devel %defattr(-,root,root,-) %doc COPYING.* COPYRIGHT %{_libdir}/libtap.so %{_includedir}/libtap.h %{_libdir}/pkgconfig/libtap.pc %endif -%package -n libknet0 +%package -n libknet1 Group: System Environment/Libraries Summary: Kronosnet core switching implementation -%description -n libknet0 +%description -n libknet1 The whole kronosnet core is implemented in this library. Please refer to the not-yet-existing documentation for further information. -%files -n libknet0 +%files -n libknet1 %defattr(-,root,root,-) %doc COPYING.* COPYRIGHT %{_libdir}/libknet.so.* -%post -n libknet0 -p /sbin/ldconfig +%post -n libknet1 -p /sbin/ldconfig -%postun -n libknet0 -p /sbin/ldconfig +%postun -n libknet1 -p /sbin/ldconfig -%package -n libknet0-devel +%package -n libknet1-devel Group: Development/Libraries Summary: Kronosnet core switching implementation (developer files) -Requires: libknet0 = %{version}-%{release} +Requires: libknet1 = %{version}-%{release} Requires: pkgconfig -%description -n libknet0-devel +%description -n libknet1-devel The whole kronosnet core is implemented in this library. Please refer to the not-yet-existing documentation for further information. -%files -n libknet0-devel +%files -n libknet1-devel %defattr(-,root,root,-) %doc COPYING.* COPYRIGHT %{_libdir}/libknet.so %{_includedir}/libknet.h %{_libdir}/pkgconfig/libknet.pc %changelog * @date@ Autotools generated version - @version@-1-@numcomm@.@alphatag@.@dirty@ - These aren't the droids you're looking for. diff --git a/libknet/Makefile.am b/libknet/Makefile.am index c570e47f..a1399827 100644 --- a/libknet/Makefile.am +++ b/libknet/Makefile.am @@ -1,96 +1,96 @@ # # Copyright (C) 2010-2015 Red Hat, Inc. All rights reserved. # # Authors: Fabio M. Di Nitto # Federico Simoncelli # # This software licensed under GPL-2.0+, LGPL-2.0+ # MAINTAINERCLEANFILES = Makefile.in include $(top_srcdir)/build-aux/check.mk SYMFILE = libknet_exported_syms EXTRA_DIST = $(SYMFILE) SUBDIRS = . tests -libversion = 0:0:0 +libversion = 1:0:0 # override global LIBS that pulls in lots of craft we don't need here LIBS = sources = \ common.c \ compat.c \ compress.c \ compress_zlib.c \ compress_lz4.c \ compress_lzo2.c \ compress_lzma.c \ compress_bzip2.c \ crypto.c \ crypto_nss.c \ handle.c \ host.c \ links.c \ logging.c \ netutils.c \ threads_common.c \ threads_dsthandler.c \ threads_heartbeat.c \ threads_pmtud.c \ threads_rx.c \ threads_tx.c \ transport_udp.c \ transport_sctp.c \ transport_loopback.c \ transport_common.c include_HEADERS = libknet.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libknet.pc noinst_HEADERS = \ common.h \ compat.h \ compress.h \ compress_zlib.h \ compress_lz4.h \ compress_lzo2.h \ compress_lzma.h \ compress_bzip2.h \ crypto.h \ crypto_nss.h \ host.h \ internals.h \ links.h \ logging.h \ netutils.h \ onwire.h \ threads_common.h \ threads_dsthandler.h \ threads_heartbeat.h \ threads_pmtud.h \ threads_rx.h \ threads_tx.h \ transports.h lib_LTLIBRARIES = libknet.la libknet_la_SOURCES = $(sources) libknet_la_CFLAGS = $(nss_CFLAGS) \ $(zlib_CFLAGS) $(liblz4_CFLAGS) $(lzo2_CFLAGS) $(liblzma_CFLAGS) $(bzip2_CFLAGS) EXTRA_libknet_la_DEPENDENCIES = $(SYMFILE) libknet_la_LDFLAGS = -Wl,--version-script=$(srcdir)/$(SYMFILE) \ --export-dynamic \ -version-number $(libversion) libknet_la_LIBADD = $(dl_LIBS) $(pthread_LIBS) $(rt_LIBS) $(m_LIBS) diff --git a/libtap/Makefile.am b/libtap/Makefile.am index 607da4d9..5c5efb93 100644 --- a/libtap/Makefile.am +++ b/libtap/Makefile.am @@ -1,60 +1,60 @@ # # Copyright (C) 2010-2015 Red Hat, Inc. All rights reserved. # # Author: Fabio M. Di Nitto # # This software licensed under GPL-2.0+, LGPL-2.0+ # MAINTAINERCLEANFILES = Makefile.in include $(top_srcdir)/build-aux/check.mk SYMFILE = libtap_exported_syms EXTRA_DIST = $(SYMFILE) tap_updown_bad tap_updown_good api-test-coverage sources = libtap.c -libversion = 0:0:0 +libversion = 1:0:0 # override global LIBS that pulls in lots of craft we don't need here LIBS = $(pthread_LIBS) if BUILD_LIBTAP include_HEADERS = libtap.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libtap.pc lib_LTLIBRARIES = libtap.la libtap_la_SOURCES = $(sources) EXTRA_libtap_la_DEPENDENCIES = $(SYMFILE) libtap_la_LDFLAGS = -Wl,-version-script,$(srcdir)/$(SYMFILE) \ --export-dynamic \ -version-number $(libversion) TESTS = $(check_PROGRAMS) noinst_PROGRAMS = $(check_PROGRAMS) check_PROGRAMS = tap_test check-local: check-api-test-coverage check-api-test-coverage: chmod u+x $(top_srcdir)/libtap/api-test-coverage $(top_srcdir)/libtap/api-test-coverage $(top_srcdir) $(top_builddir) tap_test_SOURCES = $(sources) tap_test_CPPFLAGS = -DTEST \ -DABSBUILDDIR=\"$(abs_builddir)\" endif