Browse Source

libpcap-1.8.1-1, tcpdump-4.9.2-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11185 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 5 years ago
parent
commit
4a7d7c1b69
2 changed files with 62 additions and 60 deletions
  1. 15 10
      lib/libp/libpcap/libpcap-vl.spec
  2. 47 50
      t/tcpdump/tcpdump-vl.spec

+ 15 - 10
lib/libp/libpcap/libpcap-vl.spec

@@ -1,7 +1,7 @@
 Name: libpcap
 Summary: A system-independent interface for user-level packet capture.
 Summary(ja): ユーザレベルでパケットをキャプチャするインターフェイス
-Version: 1.7.3
+Version: 1.8.1
 Release: 1%{?_dist_release}
 Epoch: 1
 
@@ -12,12 +12,16 @@ URL: http://www.tcpdump.org/
 
 Source0: http://www.tcpdump.org/release/libpcap-%{version}.tar.gz
 
+Patch0001:      0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch
+Patch0002:      0002-pcap-config-mitigate-multilib-conflict.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: kernel-headers >= 2.2.0
 BuildRequires: flex >= 2.4
 BuildRequires: bison
 BuildRequires: openssl-devel
 BuildRequires: libnl-devel
+BuildRequires: git
 
 Vendor: Project Vine
 Distribution: Vine Linux
@@ -62,20 +66,17 @@ with %{name}.
 含まれています.
 
 %prep
-%setup -q
+%autosetup -S git
+
 
 %build
-%configure 
-DEFS="-g -D_U_=\"\" -fPIC -DHAVE_CONFIG_H"
-%ifarch alpha sparc sparc64
-DEFS="$DEFS -DHAVE_ETHER_HOSTTON=1 -DLBL_ALIGN=1"
-%endif
-make DEFS="$DEFS"
+export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
+%configure
+make %{?_smp_mflags}
+
 
 %install
 rm -rf %{buildroot}
-mkdir -p %{buildroot}%{_libdir}
-mkdir -p %{buildroot}%{_bindir}
 
 make DESTDIR=%{buildroot} install
 rm -f %{buildroot}%{_libdir}/libpcap.a
@@ -105,6 +106,10 @@ rm -rf %{buildroot}
 %{_mandir}/man7/*
 
 %changelog
+* Sun Sep 17 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1:1.8.1-1
+- new upstream release.
+- imported patches from rawhide.
+
 * Sun Jun 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1:1.7.3-1
 - new upstream release
 

+ 47 - 50
t/tcpdump/tcpdump-vl.spec

@@ -1,13 +1,15 @@
-%define	tcpdump_ver	4.7.4
+%define	tcpdump_ver	4.9.2
 %define	libpcap_ver	1.7.3
 
+%{!?_licensedir:%global license %%doc}
+
 Summary: A network traffic monitoring tool.
 Summary(ja): ネットワークのトラフィックをモニタするツール
 Name: tcpdump
 Version: %{tcpdump_ver}
 %define	tcpdump_dir	tcpdump-%{tcpdump_ver}
 %define tcpslice_dir	tcpslice
-Release: 2%{?_dist_release}
+Release: 1%{?_dist_release}
 Epoch: 1
 
 Group: Applications/System
@@ -16,21 +18,25 @@ License: BSD
 URL: http://www.tcpdump.org/
 
 Source0: http://www.tcpdump.org/release/tcpdump-%{tcpdump_ver}.tar.gz
-Source4: tcpslice-CVS.20010207.tar.gz
+Source1: ftp://ftp.ee.lbl.gov/tcpslice-1.2a3.tar.gz
 
-Patch5: tcpdump-3.6.2-tcpslice-time.patch
-Patch10: tcpdump-4.7.3-portnumbers.patch
-Patch15: tcpdump-3.6.2-ip6opts.patch
-Patch19: tcpdump-3.8.2-rsvp-dos.patch
-Patch21: tcpdump-4.7.3-isis-dos.patch
+Patch0001:      0001-icmp6-print-Reachable-Time-and-Retransmit-Time-from-.patch
+Patch0002:      0002-Use-getnameinfo-instead-of-gethostbyaddr.patch
+Patch0003:      0003-Drop-root-priviledges-before-opening-first-savefile-.patch
+Patch0004:      0004-tcpslice-update-tcpslice-patch-to-1.2a3.patch
+Patch0005:      0005-tcpslice-remove-unneeded-include.patch
+Patch0006:      0006-tcpslice-don-t-test-the-pointer-but-pointee-for-NULL.patch
+Patch0007:      0007-Introduce-nn-option.patch
+Patch0008:      0008-Don-t-print-out-we-dropped-root-we-are-always-droppi.patch
 
-Patch70: tcpslice-CVS.20010207-bpf.patch
+%define tcpslice_dir tcpslice-1.2a3
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: glibc-kernheaders >= 2.2.0
 BuildRequires: openssl-devel
 BuildRequires: libpcap-devel >= %{libpcap_ver}
 BuildRequires: autoconf, automake
+BuildRequires: git
 
 
 Vendor: Project Vine
@@ -59,42 +65,20 @@ tcpdump はネットワークのトラフィックをモニタする、コマン
 
 
 %prep
-%setup -q -c -a 4
-
-%patch5 -p1 -b .tcpslicetime
-
-pushd %tcpdump_dir
-%patch10 -p1 -b .portnumbers
-%patch15 -p1 -b .ip6opts
-%patch19 -p1 -b .rsvp-dos
-%patch21 -p1 -b .isis-dos
-popd
-
-pushd tcpslice
-%patch70 -p1 -b .bpf
-popd
+%autosetup -a 1 -S git
 
 %build
-pushd %tcpslice_dir
+export CFLAGS="$RPM_OPT_FLAGS $(getconf LFS_CFLAGS) -fno-strict-aliasing"
+
+pushd %{tcpslice_dir}
+# update config.{guess,sub}
+automake -a -f 2> /dev/null || :
 %configure
-make
+make %{?_smp_mflags}
 popd
 
-pushd %tcpdump_dir
-%define	optflags $RPM_OPT_FLAGS -DIP_MAX_MEMBERSHIPS=20
-%configure --enable-ipv6
-%undefine optflags
-
-DEFS="-g -D_U_=\"\" -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
-%ifarch alpha sparc sparc64
-DEFS="$DEFS -DHAVE_ETHER_HOSTTON=1 -DLBL_ALIGN=1 -DHAVE_ETHER_NTOA=1"
-%endif
-%ifarch sparc sparc64
-DEFS="$DEFS -DWORDS_BIGENDIAN"
-%endif
-
-make DEFS="$DEFS"
-popd
+%configure --with-crypto --with-user=tcpdump --without-smi
+make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
@@ -102,26 +86,33 @@ mkdir -p %{buildroot}%{_libdir}
 mkdir -p %{buildroot}%{_mandir}/man{3,8}
 mkdir -p %{buildroot}%{_sbindir}
 
-pushd %tcpslice_dir
-install -m755 -s tcpslice %{buildroot}%{_sbindir}
-install -m644 tcpslice.1 %{buildroot}%{_mandir}/man8/tcpslice.8
+pushd %{tcpslice_dir}
+install -m755 tcpslice ${RPM_BUILD_ROOT}%{_sbindir}
+install -m644 tcpslice.1 ${RPM_BUILD_ROOT}%{_mandir}/man8/tcpslice.8
 popd
 
-pushd %tcpdump_dir
-install -m755 -s tcpdump %{buildroot}%{_sbindir}
-install -m644 tcpdump.1 %{buildroot}%{_mandir}/man8/tcpdump.8
-popd
+install -m755 tcpdump ${RPM_BUILD_ROOT}%{_sbindir}
+install -m644 tcpdump.1 ${RPM_BUILD_ROOT}%{_mandir}/man8/tcpdump.8
 
+# fix section numbers
+sed -i 's/\(\.TH[a-zA-Z ]*\)[1-9]\(.*\)/\18\2/' \
+        ${RPM_BUILD_ROOT}%{_mandir}/man8/*
 
 %clean
 rm -rf %{buildroot}
 
 
+%pre
+groupadd -g 72 tcpdump 2> /dev/null ||:
+useradd -u 72 -g 72 -s /sbin/nologin -M -r \
+        -d / tcpdump 2> /dev/null ||:
+exit 0
+
+
 %files
 %defattr(-,root,root)
-%doc %{name}-%{version}/README.md
-%doc %{name}-%{version}/CHANGES
-%doc %{name}-%{version}/LICENSE
+%license LICENSE
+%doc README.md CHANGES CREDITS
 %{_sbindir}/tcpdump
 %{_sbindir}/tcpslice
 %{_mandir}/man8/tcpslice.8*
@@ -129,6 +120,12 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Sun Sep 17 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1:4.9.2-1
+- new upstream release.
+- dropped all patches.
+- imported patches from rawhide.
+- updated %%SOURCE1.
+
 * Tue Mar 29 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1:4.7.4-2
 - rebuild with openssl-1.0.2g