Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 09d550570e48f9424547f90558e5df20 > files > 6

wireshark-1.4.14-1.mga1.src.rpm

%define Werror_cflags %{nil}

%define	blurb Wireshark is a fork of Ethereal(tm)

%define	major 0
%define libname %mklibname wireshark %{major}
%define libname_devel %mklibname -d wireshark

%define release %mkrel 1

Summary:	Network traffic analyzer
Name:		wireshark
Version:	1.4.14
Release:	%{release}
License:	GPLv2+ and GPLv3
Group: 		Monitoring
URL: 		http://www.wireshark.org
Source0:	http://www.wireshark.org/download/src/%{name}-%{version}.tar.bz2
Source1:	http://www.wireshark.org/download/src/all-versions/SIGNATURES-%{version}.txt
Patch0:		wireshark_help_browser.patch
Patch1:		wireshark-plugindir.patch
# improve error messages when calling lua functions, partial fix for mga#2352
Patch4:		wireshark-1.4.6-mga-improve_lua_error_messages.patch
# don't unconditionally call disabled lua dofile function when running as root, partial fix for mga#2352
Patch5:		wireshark-1.4.10-mga-skip_disabled_function_when_running_as_root.patch
Requires:	usermode-consoleonly
Requires:	dumpcap
BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	doxygen
BuildRequires:	glib2-devel
BuildRequires:	gtk+2-devel
BuildRequires:	krb5-devel
BuildRequires:	libcap-devel
BuildRequires:	libelf-devel
BuildRequires:	libpcap-devel >= 0.7.2
BuildRequires:	libsmi-devel
BuildRequires:	libtool
BuildRequires:	openssl-devel
BuildRequires:	pcre-devel
BuildRequires:	lua-devel
BuildRequires:	portaudio-devel
BuildRequires:	libgcrypt-devel >= 1.1.92
BuildRequires:	libgnutls-devel >= 1.2.0
BuildRequires:	zlib-devel
BuildRequires:	bison
BuildRequires:	flex
BuildRequires:	libgeoip-devel

%description
Wireshark is a network traffic analyzer for Unix-ish operating systems. It is
based on GTK+, a graphical user interface library, and libpcap, a packet
capture and filtering library.

%{blurb}

%package -n	%{libname}
Summary:	Network traffic and protocol analyzer libraries
Group:		System/Libraries

%description -n	%{libname}
Wireshark is a network traffic analyzer for Unix-ish operating systems. It is
based on GTK+, a graphical user interface library, and libpcap, a packet
capture and filtering library.

%{blurb}

%package -n	%{libname_devel}
Summary:	Development files for %{name}
Group:		Development/Other
Provides:	libwireshark-devel = %{version}
Provides:	wireshark-devel = %{version}
Requires:	%{libname} = %{version}

%description -n	%{libname_devel}
This package contains files used for development with %{name}.


%package	tools
Summary:	Tools for manipulating capture files
Group:		Monitoring

%description	tools
Set of tools for manipulating capture files. Contains:

- editcap - Edit and/or translate the format of capture files
- mergecap - Merges two capture files into one
- text2cap - Generate a capture file from an ASCII hexdump of packets

%{blurb}

%package -n	tshark
Summary:	Text-mode network traffic and protocol analyzer
Group:		Monitoring
Requires:	dumpcap

%description -n	tshark
Tshark is a network protocol analyzer. It lets you capture packet data from a
live network, or read packets from a previously saved capture file, either
printing a decoded form of those packets to the standard output or writing the
packets to a file. Twireshark's native capture file format is libpcap format,
which is also the format used by tcpdump and various other tools.

%{blurb}

%package -n	rawshark
Summary:	Dump and analyze raw libpcap data
Group:		Monitoring

%description -n rawshark
Rawshark reads a stream of packets from a file or pipe, and prints a line
describing its output, followed by a set of matching fields for each packet on
stdout.

%{blurb}

%package -n	dumpcap
Summary:	Network traffic dump tool
Group:		Monitoring

%description -n dumpcap
Dumpcap is a network traffic dump tool. It lets you capture packet data from a
live network and write the packets to a file. Many wireshark utilities require it.

%{blurb}

%prep
%setup -q -n %{name}-%{version}
%patch0 -p0
%patch1 -p0
%patch4 -p1 -b .improve_lua_error_messages
%patch5 -p1 -b .skip_disabled_function_when_running_as_root

%build
autoreconf -fi
%serverbuild
%configure2_5x \
    --disable-static \
    --disable-warnings-as-errors --enable-warnings-as-errors=no \
    --disable-usr-local \
    --enable-threads \
    --enable-tshark \
    --enable-editcap \
    --enable-capinfos \
    --enable-mergecap \
    --enable-text2pcap \
    --enable-idl2wrs \
    --enable-dftest \
    --enable-randpkt \
    --enable-dumpcap \
    --enable-ipv6 \
    --with-libsmi=%{_prefix} \
    --with-pcap=%{_prefix} \
    --with-zlib=%{_prefix} \
    --with-pcre=%{_prefix} \
    --with-lua=%{_prefix} \
    --with-portaudio=%{_prefix} \
    --with-gnutls=yes \
    --with-gcrypt=yes \
    --with-libcap=%{_prefix} \
    --with-ssl=%{_prefix} \
    --with-krb5 \
    --with-adns=no \
    --with-plugins=%{_libdir}/%{name}

%make

%install
rm -rf %{buildroot}

%makeinstall_std 

# setup links for consolehelpper support to allow root access
install -d %{buildroot}%{_sbindir}
pushd %{buildroot}%{_bindir}
ln -sf consolehelper %{name}-root
cd %{buildroot}%{_sbindir}
ln -s ../bin/%{name} %{name}-root
popd

# icon
install -d %{buildroot}%{_miconsdir}
install -d %{buildroot}%{_iconsdir}
install -d %{buildroot}%{_liconsdir}

install -m0644 image/wsicon16.png %{buildroot}%{_miconsdir}/%{name}.png
install -m0644 image/wsicon32.png %{buildroot}%{_iconsdir}/%{name}.png
install -m0644 image/wsicon48.png %{buildroot}%{_liconsdir}/%{name}.png

# XDG menu
install -d %{buildroot}%{_datadir}/applications
install -m0644 wireshark.desktop %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop

cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF
[Desktop Entry]
Name=Wireshark
Comment=Network traffic analyzer
Exec=%{name}
Icon=%{name}
Terminal=false
Type=Application
Categories=GTK;X-MandrivaLinux-System-Monitoring;System;Monitor;
EOF

cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}-root.desktop << EOF
[Desktop Entry]
Name=Wireshark (root user)
Comment=Network traffic analyzer (root user)
Exec=%{name}-root
Icon=%{name}
Terminal=false
Type=Application
Categories=GTK;System;Monitor;
EOF

# move this one to /usr/sbin
mv %{buildroot}%{_bindir}/dumpcap %{buildroot}%{_sbindir}/dumpcap

# fix one odd bug...
pushd %{buildroot}%{_bindir}
    ln -s ../sbin/dumpcap dumpcap
popd

# remove uneeded files
rm -f %{buildroot}%{_libdir}/wireshark/*.la

# install includes
mkdir -p %{buildroot}%{_includedir}/wireshark
for include in `find epan -type f -name '*.h'`; do
        mkdir -p %{buildroot}%{_includedir}/wireshark/`dirname $include`
        install -m 0644 $include %{buildroot}%{_includedir}/wireshark/`dirname $include`
done
# remaining include files
install -m 0644 *.h %{buildroot}%{_includedir}/wireshark
mkdir -p %{buildroot}%{_includedir}/wireshark/wiretap
install -m 0644 wiretap/*.h %{buildroot}%{_includedir}/wireshark/wiretap

# fix @SHELL@
perl -pi -e "s|\@SHELL\@|/bin/sh|g" %{buildroot}%{_bindir}/idl2wrs

%files -n dumpcap
%attr(755,root,root) %{_bindir}/dumpcap
%attr(755,root,root) %{_sbindir}/dumpcap
%{_mandir}/man1/dumpcap.1*

%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/%{name}
%attr(755,root,root) %{_bindir}/%{name}-root
%attr(755,root,root) %{_sbindir}/%{name}-root
%dir %{_libdir}/%{name}
%attr(755,root,root) %{_libdir}/%{name}/*.so
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/diameter
%dir %{_datadir}/%{name}/help
%dir %{_datadir}/%{name}/radius
%{_datadir}/%{name}/radius/*
%dir %{_datadir}/%{name}/tpncp
%dir %{_datadir}/%{name}/wimaxasncp
%config(noreplace) %attr(644,root,root) %{_datadir}/%{name}/cfilters
%config(noreplace) %attr(644,root,root) %{_datadir}/%{name}/colorfilters
%config(noreplace) %attr(644,root,root) %{_datadir}/%{name}/dfilters
%config(noreplace) %attr(644,root,root) %{_datadir}/%{name}/diameter/*
%config(noreplace) %attr(644,root,root) %{_datadir}/%{name}/manuf
%config(noreplace) %attr(644,root,root) %{_datadir}/%{name}/radius/dictionary*
%config(noreplace) %attr(644,root,root) %{_datadir}/%{name}/services
%config(noreplace) %attr(644,root,root) %{_datadir}/%{name}/smi_modules
%config(noreplace) %attr(644,root,root) %{_datadir}/%{name}/tpncp/*
%config(noreplace) %attr(644,root,root) %{_datadir}/%{name}/wimaxasncp/dictionary.*
%attr(644,root,root) %{_datadir}/%{name}/console.lua
%attr(644,root,root) %{_datadir}/%{name}/dtd_gen.lua
%attr(644,root,root) %{_datadir}/%{name}/init.lua
%attr(644,root,root) %{_datadir}/%{name}/help/*
%attr(644,root,root) %{_datadir}/%{name}/ws.css
%{_iconsdir}/*.png
%{_miconsdir}/*.png
%{_liconsdir}/*.png
%{_mandir}/man1/%{name}.1*
%{_mandir}/man4/%{name}-filter.4*
%{_datadir}/%{name}/*.html
%{_datadir}/%{name}/AUTHORS-SHORT
%{_datadir}/%{name}/COPYING
%dir %{_datadir}/%{name}/dtds
%{_datadir}/%{name}/dtds/*
%{_datadir}/applications/*.desktop

%files tools
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/capinfos
%attr(755,root,root) %{_bindir}/dftest
%attr(755,root,root) %{_bindir}/editcap
%attr(755,root,root) %{_bindir}/idl2wrs
%attr(755,root,root) %{_bindir}/mergecap
%attr(755,root,root) %{_bindir}/randpkt
%attr(755,root,root) %{_bindir}/text2pcap
%{_mandir}/man1/capinfo*
%{_mandir}/man1/dftest*
%{_mandir}/man1/editcap*
%{_mandir}/man1/idl2wrs*
%{_mandir}/man1/mergecap*
%{_mandir}/man1/randpkt*
%{_mandir}/man1/text2pcap*

%files -n tshark
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/tshark
%{_mandir}/man1/tshark*

%files -n rawshark
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/rawshark
%{_mandir}/man1/rawshark.1*

%files -n %{libname}
%defattr(644,root,root,755)
%doc AUTHORS NEWS README{,.[lv]*} doc/{randpkt.txt,README.*}
%attr(755,root,root) %{_libdir}/lib*.so.*

%files -n %{libname_devel}
%doc ChangeLog
%{_includedir}/wireshark
%{_libdir}/libwireshark.la
%{_libdir}/libwireshark.so
%{_libdir}/libwiretap.la
%{_libdir}/libwiretap.so
%{_libdir}/libwsutil.la
%{_libdir}/libwsutil.so


%changelog

* Thu Aug 09 2012 luigiwalser <luigiwalser> 1.4.14-1.mga1
+ Revision: 280184
- 1.4.14 (fixes CVE-2012-4048 and CVE-2012-4049)

  + doktor5000 <doktor5000>
    - new security/bugfix release 1.4.13
      o Infinite and large loops in ANSI MAP, BACapp, Bluetooth HCI, IEEE 802.3,
        LTP, and R3 dissectors have been fixed. Discovered by Laurent Butti
        (http://www.wireshark.org/security/wnpa-sec-2012-08.html [CVE-2012-2392])
      o The DIAMETER dissector could try to allocate memory improperly and crash
        (http://www.wireshark.org/security/wnpa-sec-2012-09.html [CVE-2012-2393])
      o Wireshark could crash on SPARC processors due to misaligned memory.
        Discovered by Klaus Heckelmann
        (http://www.wireshark.org/security/wnpa-sec-2012-10.html [CVE-2012-2394])
      o fixes 4 various other bugs (not security-related)
    - new security/bugfix release 1.4.12
      o The ANSI A dissector could dereference a NULL pointer and crash
        ( http://www.wireshark.org/security/wnpa-sec-2012-04.html )
      o The pcap and pcap-ng file parsers could crash trying to read ERF data
        ( http://www.wireshark.org/security/wnpa-sec-2012-06.html )
      o The MP2T dissector could try to allocate too much memory and crash
        ( http://www.wireshark.org/security/wnpa-sec-2012-07.html )
      o fixes 13 various other bugs (not security-related)
    - new security/bugfix release 1.4.11
      o fixes multiple file parser vulnerabilities
        ( http://www.wireshark.org/security/wnpa-sec-2012-01.html )
      o fixes multiple NULL pointer vulnerabilities
        ( http://www.wireshark.org/security/wnpa-sec-2012-02.html )
      o fixes an RLC dissector buffer overflow
        ( http://www.wireshark.org/security/wnpa-sec-2012-03.html )
      o fixes 27 various other bugs (not security-related)
    - new security/bugfix release 1.4.10
      o fixes CVE-2011-4101, Infiniband dissector could dereference a NULL
        pointer through a malformed package, leading to a segfault
      o fixes CVE-2011-1957, large/infinite loop in the DICOM dissector
      o fixes CVE-2011-1958, corrupt Diameter dictionary file could crash Wireshark
      o fixes CVE-2011-1959, corrupted snoop file could crash Wireshark
      o fixes CVE-2011-2174, malformed compressed capture data could crash Wireshark
      o fixes CVE-2011-2175, corrupted Visual Networks file could crash Wireshark
      o fixes CVE-2011-2597, the Lucent/Ascend file parser was susceptible to an
        infinite loop
      o fixes CVE-2011-2698, the ANSI MAP dissector was susceptible to an infinite
        loop
      o fixes 71 various other bugs (not security-related)
    - dropped CVE-2011-3360.patch, CVE-2011-3483.patch, CVE-2011-3266.patch
      CVE-2011-4102 (already fixed in 1.4.10)
    - rediffed skip_disabled_function_when_running_as_root.patch
    - fix CVE-2011-4102, buffer overflow in the ERF file reader through a malformed
      packet trace file (upstream, wireshark-1.4.6-mga-CVE-2011-4102.patch)
    - remove obsolete empty %%defattrs and %%clean section
    - fix CVE-2011-3266, denial of service through a malformed IKEv1 packet causing
      excessive resource usage (upstream, wireshark-1.4.6-mga-CVE-2011-3266.patch)
    - fixed CVE-2011-3360, untrusted search path vulnerability allowing local users
      to gain privileges via a Trojan horse Lua script in an unspecified directory
      (from upstream)
    - fixed CVE-2011-3483, denial of service (application crash) via a malformed
      capture file that leads to an invalid root tvbuff, related to a
      buffer exception handling vulnerability (from upstream)
    - added improve_lua_error_messages.patch, improves error messages when calling
      disabled lua functions when run as root, partial fix for (mga#2352)
    - added skip_disabled_function_when_running_as_root.patch, skips disabled
      dofile function call when run as root, removes error message (mga#2352)

* Wed Apr 27 2011 wally <wally> 1.4.6-2.mga1
+ Revision: 92025
- fix desktop file names (mga#954)
- drop buildroot definition

* Wed Apr 20 2011 pterjan <pterjan> 1.4.6-1.mga1
+ Revision: 88879
- Update to 1.4.6

  + ennael <ennael>
    - clean spec file

* Fri Mar 04 2011 pterjan <pterjan> 1.4.4-1.mga1
+ Revision: 64182
- Drop plenty of old stuff
- imported package wireshark