- fixes #666746 - Packaging mistake: confusing %doc files patched+unpatched

- fixes printing statistics using -v option
This commit is contained in:
Jiri Skala 2011-01-03 15:44:16 +01:00
parent 56c2c314f9
commit c57825cb09
2 changed files with 23 additions and 3 deletions

14
tftp-hpa-0.49-stats.patch Normal file
View File

@ -0,0 +1,14 @@
diff -up tftp-hpa-0.49/tftp/tftp.c.stats tftp-hpa-0.49/tftp/tftp.c
--- tftp-hpa-0.49/tftp/tftp.c.stats 2011-01-03 15:38:34.217918067 +0100
+++ tftp-hpa-0.49/tftp/tftp.c 2011-01-03 15:38:37.498917014 +0100
@@ -400,8 +400,8 @@ static void printstats(const char *direc
{
double delta;
- delta = (tstop.tv_sec + (tstop.tv_usec / 100000.0)) -
- (tstart.tv_sec + (tstart.tv_usec / 100000.0));
+ delta = (tstop.tv_sec + (tstop.tv_usec / 1000000.0)) -
+ (tstart.tv_sec + (tstart.tv_usec / 1000000.0));
if (verbose) {
printf("%s %lu bytes in %.1f seconds", direction, amount, delta);
printf(" [%.0f bit/s]", (amount * 8.) / delta);

View File

@ -1,7 +1,7 @@
Summary: The client for the Trivial File Transfer Protocol (TFTP)
Name: tftp
Version: 0.49
Release: 6%{?dist}
Release: 7%{?dist}
License: BSD
Group: Applications/Internet
Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{version}.tar.bz2
@ -13,6 +13,7 @@ Patch3: tftp-0.42-tftpboot.patch
Patch4: tftp-0.49-chk_retcodes.patch
Patch5: tftp-hpa-0.49-fortify-strcpy-crash.patch
Patch6: tftp-0.49-cmd_arg.patch
Patch7: tftp-hpa-0.49-stats.patch
BuildRequires: tcp_wrappers-devel readline-devel autoconf
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -47,6 +48,7 @@ enabled unless it is expressly needed. The TFTP server is run from
%patch4 -p1 -b .chk_retcodes
%patch5 -p1 -b .fortify-strcpy-crash
%patch6 -p1 -b .cmd_arg
%patch7 -p1 -b .stats
%build
autoreconf
@ -79,19 +81,23 @@ rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root,-)
%doc README* CHANGES
%doc README README.security CHANGES
%{_bindir}/tftp
%{_mandir}/man1/*
%files server
%defattr(-,root,root,-)
%doc README* CHANGES
%doc README README.security CHANGES
%config(noreplace) %{_sysconfdir}/xinetd.d/tftp
%dir %{_localstatedir}/lib/tftpboot
%{_sbindir}/in.tftpd
%{_mandir}/man8/*
%changelog
* Mon Jan 03 2011 Jiri Skala <jskala@redhat.com> - 0.49-7
- fixes #666746 - Packaging mistake: confusing %doc files patched+unpatched
- fixes printing statistics using -v option
* Fri May 28 2010 Jiri Skala <jskala@redhat.com> - 0.49-6
- patched handling arguments of commands (put)