|
|
@ -1,22 +1,15 @@
|
|
|
|
Summary: C library for portable packet creation and injection
|
|
|
|
Summary: C library for portable packet creation and injection
|
|
|
|
Name: libnet
|
|
|
|
Name: libnet
|
|
|
|
Version: 1.2
|
|
|
|
Version: 1.1.6
|
|
|
|
Release: 7%{?dist}
|
|
|
|
Release: 15%{?dist}
|
|
|
|
License: BSD
|
|
|
|
License: BSD
|
|
|
|
URL: https://github.com/libnet/libnet
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
# This used to be https://github.com/libnet/libnet/releases/download/v%%{version}/%%{name}-%%{version}.tar.gz
|
|
|
|
URL: http://www.sourceforge.net/projects/libnet-dev/
|
|
|
|
# But because of licensing a repacked tarball is used
|
|
|
|
Source: http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz
|
|
|
|
# The repacked tarball has the directory win32/wpdpack removed
|
|
|
|
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
|
|
|
# which was never used. Upstream also removed that directory:
|
|
|
|
BuildRequires: autoconf, automake, libtool
|
|
|
|
# https://github.com/libnet/libnet/commit/eba016f9506d9041e1bc8786c10ca94ebe626057
|
|
|
|
%endif
|
|
|
|
Source0: libnet-1.2-repack.tar.gz
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
Patch0: libnet-config.patch
|
|
|
|
|
|
|
|
Patch1: libnet_pblock.patch
|
|
|
|
|
|
|
|
Patch2: https://patch-diff.githubusercontent.com/raw/libnet/libnet/pull/120.patch
|
|
|
|
|
|
|
|
Patch3: https://patch-diff.githubusercontent.com/raw/libnet/libnet/pull/102.patch
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
|
|
|
BuildRequires: %{_bindir}/pod2man
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
%description
|
|
|
|
Libnet is an API to help with the construction and handling of network
|
|
|
|
Libnet is an API to help with the construction and handling of network
|
|
|
@ -27,123 +20,90 @@ layer and at the link layer as well as a host of supplementary and
|
|
|
|
complementary functionality.
|
|
|
|
complementary functionality.
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for the libnet library
|
|
|
|
Summary: Development files for the libnet library
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: pkgconfig
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
%description devel
|
|
|
|
The libnet-devel package includes header files and libraries necessary
|
|
|
|
The libnet-devel package includes header files and libraries necessary
|
|
|
|
for developing programs which use the libnet library. Libnet is very
|
|
|
|
for developing programs which use the libnet library. Libnet is very handy
|
|
|
|
handy with which to write network tools and network test code. See the
|
|
|
|
with which to write network tools and network test code. See the manpage
|
|
|
|
man page and sample test code for more detailed information.
|
|
|
|
and sample test code for more detailed information.
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{!?_without_doc:1}
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
|
|
|
Summary: Documentation files for the libnet library
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
BuildRequires: doxygen
|
|
|
|
|
|
|
|
BuildRequires: graphviz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
|
|
|
Libnet is an API to help with the construction and handling of network
|
|
|
|
|
|
|
|
packets. It provides a portable framework for low-level network packet
|
|
|
|
|
|
|
|
writing and handling. This package contains the API documentation for
|
|
|
|
|
|
|
|
developing applications that use libnet.
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%setup -q
|
|
|
|
%patch0 -p1
|
|
|
|
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
|
|
|
%patch1 -p1
|
|
|
|
autoreconf --force --install
|
|
|
|
%patch2 -p1
|
|
|
|
%endif
|
|
|
|
%patch3 -p1
|
|
|
|
|
|
|
|
# Avoid library soname bump (https://github.com/libnet/libnet/issues/115)
|
|
|
|
# Keep the sample directory untouched by make
|
|
|
|
sed -e 's/-version-info 9:0:0/-version-info 9:0:8/' -i src/Makefile.{am,in}
|
|
|
|
rm -rf __dist_sample
|
|
|
|
|
|
|
|
mkdir __dist_sample
|
|
|
|
|
|
|
|
cp -a sample __dist_sample
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
|
|
|
|
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
|
|
|
|
|
|
|
%configure --libdir=/%{_lib}
|
|
|
|
|
|
|
|
%else
|
|
|
|
%configure
|
|
|
|
%configure
|
|
|
|
%make_build
|
|
|
|
%endif
|
|
|
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
%make_install INSTALL='install -p'
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' install
|
|
|
|
# Don't install any libtool .la files
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
|
|
|
|
|
|
|
# Move %{name}.so to %{_libdir}, remove static .a and libtool .la files
|
|
|
|
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.{a,la,so}
|
|
|
|
|
|
|
|
pushd $RPM_BUILD_ROOT/%{_lib}
|
|
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
|
|
|
|
|
|
|
ln -sf ../../%{_lib}/$(ls %{name}.so.?.?.?) $RPM_BUILD_ROOT%{_libdir}/%{name}.so
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
%else
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.{a,la}
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.{a,la}
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Prepare samples directory and perform some fixes
|
|
|
|
|
|
|
|
rm -rf __dist_sample/sample/win32
|
|
|
|
|
|
|
|
rm -f __dist_sample/sample/Makefile.{am,in}
|
|
|
|
|
|
|
|
sed -e 's@#include "../include/libnet.h"@#include <libnet.h>@' \
|
|
|
|
|
|
|
|
__dist_sample/sample/libnet_test.h > __dist_sample/sample/libnet_test.h.new
|
|
|
|
|
|
|
|
touch -c -r __dist_sample/sample/libnet_test.h{,.new}
|
|
|
|
|
|
|
|
mv -f __dist_sample/sample/libnet_test.h{.new,}
|
|
|
|
|
|
|
|
|
|
|
|
# Clean up for later usage in documentation
|
|
|
|
# Remove makefile relics from documentation
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}
|
|
|
|
rm -f doc/html/Makefile*
|
|
|
|
|
|
|
|
|
|
|
|
# Prepare samples for usage in documentation
|
|
|
|
%clean
|
|
|
|
rm -rf sample/{Makefile*,win32}
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
for file in sample/*.[hc]; do
|
|
|
|
|
|
|
|
sed \
|
|
|
|
|
|
|
|
-e 's@#include "../include/libnet.h"@#include <libnet.h>@' \
|
|
|
|
|
|
|
|
-e 's@#include "../include/config.h"@#include <config.h>@' \
|
|
|
|
|
|
|
|
$file > $file.new
|
|
|
|
|
|
|
|
touch -c -r $file{,.new}
|
|
|
|
|
|
|
|
mv -f $file{.new,}
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc README.md ChangeLog.md
|
|
|
|
%doc README doc/CHANGELOG doc/CONTRIB doc/COPYING
|
|
|
|
|
|
|
|
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
|
|
|
|
|
|
|
/%{_lib}/%{name}.so.*
|
|
|
|
|
|
|
|
%else
|
|
|
|
%{_libdir}/%{name}.so.*
|
|
|
|
%{_libdir}/%{name}.so.*
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%files devel
|
|
|
|
%doc doc/MIGRATION.md doc/RAWSOCKET.md sample/
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
|
|
|
%doc doc/CHANGELOG doc/CONTRIB doc/COPYING doc/DESIGN_NOTES doc/MIGRATION doc/PACKET_BUILDING
|
|
|
|
|
|
|
|
%doc doc/RAWSOCKET_NON_SEQUITUR doc/TODO doc/html/ __dist_sample/sample/
|
|
|
|
%{_bindir}/%{name}-config
|
|
|
|
%{_bindir}/%{name}-config
|
|
|
|
%{_libdir}/%{name}.so
|
|
|
|
%{_libdir}/%{name}.so
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
%{_includedir}/libnet.h
|
|
|
|
%{_includedir}/%{name}.h
|
|
|
|
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
%{_mandir}/man3/%{name}*.3*
|
|
|
|
%{_mandir}/man3/%{name}*.3*
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{!?_without_doc:1}
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
|
|
|
%doc doc/html/
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
* Thu Mar 07 2024 Adrian Reber <areber@redhat.com> - 1.2-7
|
|
|
|
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 1.1.6-15
|
|
|
|
- Apply upstream patch to fix 3 findings from static application security testing
|
|
|
|
- Rebuilt for MSVSphere 8.8
|
|
|
|
Resolves: RHEL-27656
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.2-6
|
|
|
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Apr 23 2021 Adrian Reber <areber@redhat.com> - 1.2-5
|
|
|
|
|
|
|
|
- Repack tarball to remove problematic license from unused code
|
|
|
|
|
|
|
|
- Apply fixes for warnings found by gcc -fanalyzer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.2-4
|
|
|
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Apr 08 2021 Adrian Reber <adrian@lisas.de> - 1.2-3
|
|
|
|
|
|
|
|
- Fix file conflicts with libnet-devel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-2
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jan 02 2021 Robert Scheck <robert@fedoraproject.org> 1.2-1
|
|
|
|
|
|
|
|
- Upgrade to 1.2 (#1912031)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-20
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-19
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-18
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-17
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-16
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-15
|
|
|
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-15
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|